dev01 2 jaren geleden
bovenliggende
commit
9cd9fed6c4

+ 327 - 305
js/component/manageCenter/project/project/projectAssignment.jsx

@@ -17,7 +17,7 @@ import {
   message,
   DatePicker,
   Modal,
-  AutoComplete,Tag,Tabs,Radio
+  AutoComplete, Tag, Tabs, Radio, Tooltip,
 } from "antd";
 import Assign from "@/manageCenter/publicComponent/assign";
 import {
@@ -33,11 +33,12 @@ import ImgList from "../../../common/imgList";
 import PicturesWall from "../../order/orderNew/changeComponent/picturesWall";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderRiZi from "@/orderRiZi.jsx";
-import {ChooseList} from "../../order/orderNew/chooseList";
+import { ChooseList } from "../../order/orderNew/chooseList";
 import ProjectOperation from "../../../common/projectOperation";
 import OrderCoor from "../../order/orderNew/changeComponent/orderCoor";
 import ContentUrl from "../../order/orderNew/contentUrl";
-const {TabPane} = Tabs
+import { salesList } from "@/dataDic.js";
+const { TabPane } = Tabs
 
 const PaiDan = React.createClass({
   loadData(pageNo) {
@@ -62,7 +63,7 @@ const PaiDan = React.createClass({
         endTime: this.state.releaseDate[1], //结束时间
         outsource: 0
       },
-      success: function(data) {
+      success: function (data) {
         ShowModal(this);
         let theArr = [];
         if (!data.data || !data.data.list) {
@@ -105,7 +106,7 @@ const PaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -115,9 +116,9 @@ const PaiDan = React.createClass({
   getInitialState() {
     return {
       distribution: "0",
-      activeKey:"1",
+      activeKey: "1",
       customerArr: [],
-      orderNos:'',
+      orderNos: '',
       searchMore: true,
       visible: false,
       assignVisible: false,
@@ -137,10 +138,10 @@ const PaiDan = React.createClass({
         defaultPageSize: 10,
         showQuickJumper: true,
         pageSize: 10,
-        onChange: function(page) {
+        onChange: function (page) {
           this.loadData(page);
         }.bind(this),
-        showTotal: function(total) {
+        showTotal: function (total) {
           return "共" + total + "条数据";
         }
       },
@@ -274,9 +275,9 @@ const PaiDan = React.createClass({
           key: "commodityName",
           render: (text, record) => {
             return (
-                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+              <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
             )
-        }
+          }
         },
         {
           title: "项目类别",
@@ -384,7 +385,7 @@ const PaiDan = React.createClass({
     this.setState({
       displayFees: "block",
       visible: true,
-      orderNos:record.orderNo
+      orderNos: record.orderNo
     });
     this.xiangqing(record.orderNo);
     this.xiangmu(record.orderNo);
@@ -405,7 +406,7 @@ const PaiDan = React.createClass({
         orderNo: this.state.orderNo,
         reason: this.state.reason
       },
-      success: function(data) {
+      success: function (data) {
         if (data.error.length || data.data == "") {
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
@@ -425,7 +426,7 @@ const PaiDan = React.createClass({
         }
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -471,7 +472,7 @@ const PaiDan = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function(data) {
+      success: function (data) {
         if (data.error.length || data.data.list == "") {
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
@@ -479,6 +480,9 @@ const PaiDan = React.createClass({
         } else {
           let thisdata = data.data;
           this.setState({
+            userType: thisdata.userType,
+            salesType: thisdata.salesType,
+            other: thisdata.other,
             orderNo: thisdata.orderNo, //订单编号
             contractNo: thisdata.contractNo, //合同编号
             userName: thisdata.userName, //客户名称
@@ -497,25 +501,25 @@ const PaiDan = React.createClass({
             orderRemarks: thisdata.orderRemarks, //订单留言
             orgCodeUrl: thisdata.contractPictureUrl
               ? splitUrl(
-                  thisdata.contractPictureUrl,
-                  ",",
-                  globalConfig.avatarHost + "/upload"
-                )
+                thisdata.contractPictureUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
+              : [], //图片地址
+            contentUrl: thisdata.serviceContent
+              ? splitUrl(
+                thisdata.serviceContent,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
+              : [], //图片地址
+            replenishUrl: thisdata.agreementUrl
+              ? splitUrl(
+                thisdata.agreementUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
               : [], //图片地址
-          contentUrl:thisdata.serviceContent
-                ? splitUrl(
-                    thisdata.serviceContent,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
-                : [], //图片地址
-                replenishUrl: thisdata.agreementUrl
-                ? splitUrl(
-                    thisdata.agreementUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                )
-                : [], //图片地址
             salesmanName: thisdata.salesmanName, //营销员名称
             salesmanMobile: thisdata.salesmanMobile, //营销员电话
             financeName: thisdata.financeName, //财务名称
@@ -528,7 +532,7 @@ const PaiDan = React.createClass({
         }
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -545,7 +549,7 @@ const PaiDan = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
 
         if (data.error.length || data.data.list == "") {
@@ -564,7 +568,7 @@ const PaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -585,7 +589,7 @@ const PaiDan = React.createClass({
       data: {
         orderNo: this.state.orderNo
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         let thisData = data.data;
         if (!thisData.length) {
@@ -609,7 +613,7 @@ const PaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -640,7 +644,7 @@ const PaiDan = React.createClass({
       data: {
         businessName: e
       },
-      success: function(data) {
+      success: function (data) {
         let thedata = data.data;
         if (!thedata) {
           if (data.error && data.error.length) {
@@ -654,7 +658,7 @@ const PaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -677,7 +681,7 @@ const PaiDan = React.createClass({
   selectAuto(value) {
     let kid = [];
     let fwList = this.state.customerArr;
-    fwList.map(function(item) {
+    fwList.map(function (item) {
       if (value == item.bname) {
         kid = item;
       }
@@ -696,7 +700,7 @@ const PaiDan = React.createClass({
       gid: kid.id,
       //commodityPrice:kid.price==0?kid.price.toString():kid.price,
       isIso: value.indexOf("贯标") !== -1,// 是否为贯标项目
-      addProjectType:  kid.type,
+      addProjectType: kid.type,
       commodityFirstPayment:
         kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
     });
@@ -719,7 +723,7 @@ const PaiDan = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         let thisData = [];
         if (data.error.length || data.data.list == "") {
@@ -745,7 +749,7 @@ const PaiDan = React.createClass({
         }
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -782,16 +786,16 @@ const PaiDan = React.createClass({
   nextCancel() {
     this.setState({
       projectOperationVisible: false,
-      dataInfor:{},
-    },()=>{
+      dataInfor: {},
+    }, () => {
       this.xiangmu(this.state.orderNo);
     });
   },
   //点击打卡项目详情
   tableRowClickX(record) {
     this.setState({
-      projectOperationVisible:true,
-      dataInfor:record,
+      projectOperationVisible: true,
+      dataInfor: record,
     });
   },
   searchSwitch() {
@@ -830,7 +834,7 @@ const PaiDan = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/organization/selectSuperId",
       data: {},
-      success: function(data) {
+      success: function (data) {
         let thedata = data.data;
         let theArr = [];
         if (!thedata) {
@@ -839,7 +843,7 @@ const PaiDan = React.createClass({
           }
           thedata = {};
         } else {
-          thedata.map(function(item, index) {
+          thedata.map(function (item, index) {
             theArr.push({
               key: index,
               name: item.name,
@@ -852,7 +856,7 @@ const PaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -1075,11 +1079,11 @@ const PaiDan = React.createClass({
           <TabPane tab="更改表格显示数据" key="2">
             <div style={{ marginLeft: 10 }}>
               <ChooseList
-                  columns={this.state.columns}
-                  changeFn={this.changeList}
-                  changeList={this.state.changeList}
-                  top={55}
-                  margin={11}
+                columns={this.state.columns}
+                changeFn={this.changeList}
+                changeList={this.state.changeList}
+                top={55}
+                margin={11}
               />
             </div>
           </TabPane>
@@ -1087,11 +1091,11 @@ const PaiDan = React.createClass({
         <div className="patent-table">
           <Spin spinning={this.state.loading}>
             <Table
-                columns={
-                  this.state.changeList
-                      ? this.state.changeList
-                      : this.state.columns
-                }
+              columns={
+                this.state.changeList
+                  ? this.state.changeList
+                  : this.state.columns
+              }
               style={{
                 cursor: 'pointer',
               }}
@@ -1156,6 +1160,24 @@ const PaiDan = React.createClass({
                 <FormItem
                   className="half-item"
                   {...formItemLayout}
+                  label="销售类型"
+                >
+                  <span>
+                    {(["私有客户-", "签单客户-"][this.state.userType] || " ") +
+                      (salesList[this.state.salesType] || "")}
+                    {
+                      this.state.other != null && this.state.other != "" &&
+                      <Tooltip title={this.state.other}>
+                        <span>
+                          {"(" + this.state.other.toString().slice(0, 10) + (this.state.other.toString().length > 9 ? "...)" : ")")}
+                        </span>
+                      </Tooltip>
+                    }
+                  </span>
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
                   label="合同签订时间"
                 >
                   <span>{this.state.signDate}</span>
@@ -1256,161 +1278,161 @@ const PaiDan = React.createClass({
                   </Button> */}
                 </div>
                 <div className="clearfix">
-                            {this.state.processStatus == 0 ? (
-                              <div>
-                                <FormItem
-                                  labelCol={{ span: 4 }}
-                                  wrapperCol={{ span: 18 }}
-                                  label={
-                                    <span>
-                                      <strong style={{ color: "#f00" }}>
-                                        *
-                                      </strong>
-                                      合同扫描件
-                                    </span>
-                                  }
-                                >
-                                  <PicturesWall
-                                    domId={"addService1"}
-                                    fileList={this.getOrgCodeUrl}
-                                    pictureUrl={this.state.orgCodeUrl}
-                                    url="/api/admin/order/uploadOrderImg"
-                                    sign=""
-                                  />
-                                  <p>图片建议:要清晰。</p>
-                                  <Button
-                                    style={{
-                                      float: "right",
-                                      marginRight: "140px",
-                                      marginTop: "20px",
-                                    }}
-                                    onClick={this.getOrderLog}
-                                  >
-                                    查看订单日志
-                                  </Button>
-                                </FormItem>
-                                <FormItem
-                                  labelCol={{ span: 4 }}
-                                  wrapperCol={{ span: 18 }}
-                                  label={<span>补充协议</span>}
-                                >
-                                  <PicturesWall
-                                    domId={"addService2"}
-                                    fileList={this.getReplenishUrl}
-                                    pictureUrl={this.state.replenishUrl}
-                                    url="/api/admin/order/uploadOrderImg"
-                                    sign=""
-                                  />
-                                  <p>图片建议:要清晰。</p>
-                                </FormItem>
-                              </div>
-                            ) : (
-                              <div>
-                                <FormItem
-                                  labelCol={{ span: 4 }}
-                                  wrapperCol={{ span: 18 }}
-                                  label="合同扫描件"
-                                >
-                                  {/*<Upload*/}
-                                  {/*  className="demandDetailShow-upload"*/}
-                                  {/*  listType="picture-card"*/}
-                                  {/*  fileList={this.state.orgCodeUrl}*/}
-                                  {/*  onPreview={(file) => {*/}
-                                  {/*    this.setState({*/}
-                                  {/*      previewImage: file.url || file.thumbUrl,*/}
-                                  {/*      previewVisible: true,*/}
-                                  {/*    });*/}
-                                  {/*  }}*/}
-                                  {/*/>*/}
-                                  <div
-                                    style={{
-                                      paddingTop: "10px",
-                                      paddingBottom: "10px",
-                                    }}
-                                  >
-                                    {this.state.orgCodeUrl &&
-                                    this.state.visible &&
-                                    this.state.activeKey === "1" ? (
-                                      <ImgList
-                                        domId={"addService3"}
-                                        fileList={this.state.orgCodeUrl}
-                                        ItemWidth={"96px"}
-                                      />
-                                    ) : (
-                                      <div />
-                                    )}
-                                  </div>
-                                  <Modal
-                                    maskClosable={false}
-                                    footer={null}
-                                    width={"50%"}
-                                    visible={this.state.previewVisible}
-                                    onCancel={() => {
-                                      this.setState({
-                                        previewVisible: false,
-                                        rotateDeg: 0,
-                                      });
-                                    }}
-                                  >
-                                    <img
-                                      alt=""
-                                      style={{
-                                        width: "100%",
-                                        transform: `rotate(${this.state.rotateDeg}deg)`,
-                                      }}
-                                      src={this.state.previewImage || ""}
-                                    />
-                                    <Button
-                                      onClick={this.rotate}
-                                      style={{
-                                        position: "relative",
-                                        left: "50%",
-                                        transform: "translateX(-50%)",
-                                      }}
-                                    >
-                                      旋转
-                                    </Button>
-                                    <Button
-                                      onClick={this.upImg}
-                                      style={{
-                                        position: "absolute",
-                                        left: -81,
-                                        top: "50%",
-                                        transform: "translateY(-50%)",
-                                      }}
-                                    >
-                                      上一张
-                                    </Button>
-                                    <Button
-                                      onClick={this.downImg}
-                                      style={{
-                                        position: "absolute",
-                                        right: -81,
-                                        top: "50%",
-                                        transform: "translateY(-50%)",
-                                      }}
-                                    >
-                                      下一张
-                                    </Button>
-                                  </Modal>
-                                  <Button
-                                    style={{
-                                      float: "right",
-                                      marginRight: "140px",
-                                      marginTop: "20px",
-                                    }}
-                                    onClick={this.getOrderLog}
-                                  >
-                                    查看订单日志
-                                  </Button>
-                                </FormItem>
-                                <FormItem
-                                style={{right:"15px"}}
-                                  labelCol={{ span: 4 }}
-                                  wrapperCol={{ span: 18 }}
-                                  label="补充协议"
-                                > 
-                                  {/* <Upload
+                  {this.state.processStatus == 0 ? (
+                    <div>
+                      <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label={
+                          <span>
+                            <strong style={{ color: "#f00" }}>
+                              *
+                            </strong>
+                            合同扫描件
+                          </span>
+                        }
+                      >
+                        <PicturesWall
+                          domId={"addService1"}
+                          fileList={this.getOrgCodeUrl}
+                          pictureUrl={this.state.orgCodeUrl}
+                          url="/api/admin/order/uploadOrderImg"
+                          sign=""
+                        />
+                        <p>图片建议:要清晰。</p>
+                        <Button
+                          style={{
+                            float: "right",
+                            marginRight: "140px",
+                            marginTop: "20px",
+                          }}
+                          onClick={this.getOrderLog}
+                        >
+                          查看订单日志
+                        </Button>
+                      </FormItem>
+                      <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label={<span>补充协议</span>}
+                      >
+                        <PicturesWall
+                          domId={"addService2"}
+                          fileList={this.getReplenishUrl}
+                          pictureUrl={this.state.replenishUrl}
+                          url="/api/admin/order/uploadOrderImg"
+                          sign=""
+                        />
+                        <p>图片建议:要清晰。</p>
+                      </FormItem>
+                    </div>
+                  ) : (
+                    <div>
+                      <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="合同扫描件"
+                      >
+                        {/*<Upload*/}
+                        {/*  className="demandDetailShow-upload"*/}
+                        {/*  listType="picture-card"*/}
+                        {/*  fileList={this.state.orgCodeUrl}*/}
+                        {/*  onPreview={(file) => {*/}
+                        {/*    this.setState({*/}
+                        {/*      previewImage: file.url || file.thumbUrl,*/}
+                        {/*      previewVisible: true,*/}
+                        {/*    });*/}
+                        {/*  }}*/}
+                        {/*/>*/}
+                        <div
+                          style={{
+                            paddingTop: "10px",
+                            paddingBottom: "10px",
+                          }}
+                        >
+                          {this.state.orgCodeUrl &&
+                            this.state.visible &&
+                            this.state.activeKey === "1" ? (
+                            <ImgList
+                              domId={"addService3"}
+                              fileList={this.state.orgCodeUrl}
+                              ItemWidth={"96px"}
+                            />
+                          ) : (
+                            <div />
+                          )}
+                        </div>
+                        <Modal
+                          maskClosable={false}
+                          footer={null}
+                          width={"50%"}
+                          visible={this.state.previewVisible}
+                          onCancel={() => {
+                            this.setState({
+                              previewVisible: false,
+                              rotateDeg: 0,
+                            });
+                          }}
+                        >
+                          <img
+                            alt=""
+                            style={{
+                              width: "100%",
+                              transform: `rotate(${this.state.rotateDeg}deg)`,
+                            }}
+                            src={this.state.previewImage || ""}
+                          />
+                          <Button
+                            onClick={this.rotate}
+                            style={{
+                              position: "relative",
+                              left: "50%",
+                              transform: "translateX(-50%)",
+                            }}
+                          >
+                            旋转
+                          </Button>
+                          <Button
+                            onClick={this.upImg}
+                            style={{
+                              position: "absolute",
+                              left: -81,
+                              top: "50%",
+                              transform: "translateY(-50%)",
+                            }}
+                          >
+                            上一张
+                          </Button>
+                          <Button
+                            onClick={this.downImg}
+                            style={{
+                              position: "absolute",
+                              right: -81,
+                              top: "50%",
+                              transform: "translateY(-50%)",
+                            }}
+                          >
+                            下一张
+                          </Button>
+                        </Modal>
+                        <Button
+                          style={{
+                            float: "right",
+                            marginRight: "140px",
+                            marginTop: "20px",
+                          }}
+                          onClick={this.getOrderLog}
+                        >
+                          查看订单日志
+                        </Button>
+                      </FormItem>
+                      <FormItem
+                        style={{ right: "15px" }}
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="补充协议"
+                      >
+                        {/* <Upload
                                     className="demandDetailShow-upload"
                                     listType="picture-card"
                                    fileList={this.state.replenishUrl}
@@ -1421,87 +1443,87 @@ const PaiDan = React.createClass({
                                       });
                                     }}
                                   /> */}
-                                   <div
-                                    style={{
-                                      paddingTop: "10px",
-                                      paddingBottom: "10px",
-                                    }}
-                                  >
-                                    {this.state.visible &&
-                                    this.state.activeKey === "1" &&
-                                    this.state.replenishUrl ? (
-                                      <ImgList
-                                        domId={"addService4"}
-                                        fileList={this.state.replenishUrl}
-                                        ItemWidth={"96px"}
-                                      />
-                                    ) : (
-                                      <div />
-                                    )}
-                                  </div>
-                                  <Modal
-                                    maskClosable={false}
-                                    footer={null}
-                                    width={"50%"}
-                                    visible={this.state.previewVisibles}
-                                    onCancel={() => {
-                                      this.setState({
-                                        previewVisibles: false,
-                                        rotateDeg: 0,
-                                      });
-                                    }}
-                                  >
-                                    <img
-                                      alt=""
-                                      style={{
-                                        width: "100%",
-                                        transform: `rotate(${this.state.rotateDeg}deg)`,
-                                      }}
-                                      src={this.state.previewImage || ""}
-                                    />
-                                    <Button
-                                      onClick={this.rotates}
-                                      style={{
-                                        position: "relative",
-                                        left: "50%",
-                                        transform: "translateX(-50%)",
-                                      }}
-                                    >
-                                      旋转
-                                    </Button>
-                                    <Button
-                                      onClick={this.upImgs}
-                                      style={{
-                                        position: "absolute",
-                                        left: -81,
-                                        top: "50%",
-                                        transform: "translateY(-50%)",
-                                      }}
-                                    >
-                                      上一张
-                                    </Button>
-                                    <Button
-                                      onClick={this.downImgs}
-                                      style={{
-                                        position: "absolute",
-                                        right: -81,
-                                        top: "50%",
-                                        transform: "translateY(-50%)",
-                                      }}
-                                    >
-                                      下一张
-                                    </Button>
-                                  </Modal>
-                                </FormItem> 
-                              </div>
-                            )}
-                          </div>
-                    <ContentUrl
-                    processStatus={1}
-                    domId = {"projectsContents"}
-                    contentUrl = {this.state.contentUrl }
-                    imgId = {"projectsContentsImg"}
-                    />
+                        <div
+                          style={{
+                            paddingTop: "10px",
+                            paddingBottom: "10px",
+                          }}
+                        >
+                          {this.state.visible &&
+                            this.state.activeKey === "1" &&
+                            this.state.replenishUrl ? (
+                            <ImgList
+                              domId={"addService4"}
+                              fileList={this.state.replenishUrl}
+                              ItemWidth={"96px"}
+                            />
+                          ) : (
+                            <div />
+                          )}
+                        </div>
+                        <Modal
+                          maskClosable={false}
+                          footer={null}
+                          width={"50%"}
+                          visible={this.state.previewVisibles}
+                          onCancel={() => {
+                            this.setState({
+                              previewVisibles: false,
+                              rotateDeg: 0,
+                            });
+                          }}
+                        >
+                          <img
+                            alt=""
+                            style={{
+                              width: "100%",
+                              transform: `rotate(${this.state.rotateDeg}deg)`,
+                            }}
+                            src={this.state.previewImage || ""}
+                          />
+                          <Button
+                            onClick={this.rotates}
+                            style={{
+                              position: "relative",
+                              left: "50%",
+                              transform: "translateX(-50%)",
+                            }}
+                          >
+                            旋转
+                          </Button>
+                          <Button
+                            onClick={this.upImgs}
+                            style={{
+                              position: "absolute",
+                              left: -81,
+                              top: "50%",
+                              transform: "translateY(-50%)",
+                            }}
+                          >
+                            上一张
+                          </Button>
+                          <Button
+                            onClick={this.downImgs}
+                            style={{
+                              position: "absolute",
+                              right: -81,
+                              top: "50%",
+                              transform: "translateY(-50%)",
+                            }}
+                          >
+                            下一张
+                          </Button>
+                        </Modal>
+                      </FormItem>
+                    </div>
+                  )}
+                </div>
+                <ContentUrl
+                  processStatus={1}
+                  domId={"projectsContents"}
+                  contentUrl={this.state.contentUrl}
+                  imgId={"projectsContentsImg"}
+                />
                 <div className="clearfix">
                   <FormItem
                     className="half-item"
@@ -1577,7 +1599,7 @@ const PaiDan = React.createClass({
                     <span>{this.state.financeMobile}</span>
                   </FormItem>
                 </div>
-                <OrderCoor orderNo={this.state.orderNos}/>
+                <OrderCoor orderNo={this.state.orderNos} />
                 {
                   <div>
                     <span style={{ marginLeft: "50px", fontSize: "20px" }}>
@@ -1612,7 +1634,7 @@ const PaiDan = React.createClass({
               </div>
             </Spin>
           </Form>
-        </Modal> : <div/>}
+        </Modal> : <div />}
         {this.state.noVisible ? <Modal
           maskClosable={false}
           visible={this.state.noVisible}
@@ -1663,7 +1685,7 @@ const PaiDan = React.createClass({
               </div>
             </Spin>
           </Form>
-        </Modal> : <div/>}
+        </Modal> : <div />}
         {/* <Modal
           visible={this.state.rizhivisible}
           className="admin-desc-content"
@@ -1690,11 +1712,11 @@ const PaiDan = React.createClass({
           loading={this.state.loading}
         />
         {this.state.projectOperationVisible ? <ProjectOperation
-            readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
-            orderNo={this.state.orderNo}
-            visible={this.state.projectOperationVisible}
-            dataInfor={this.state.dataInfor}
-            onCancel={this.nextCancel}
+          readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
+          orderNo={this.state.orderNo}
+          visible={this.state.projectOperationVisible}
+          dataInfor={this.state.dataInfor}
+          onCancel={this.nextCancel}
         /> : null}
       </div>
     );

+ 91 - 69
js/component/manageCenter/project/project/projectQuery.jsx

@@ -1,9 +1,9 @@
- import React,{Component} from 'react';
+import React, { Component } from 'react';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import '@/manageCenter/financialManage/distribute/public.less';
-import { Icon, Button,Form, Input, Select, Spin,Tag, Table, Switch, message, DatePicker, Modal,Upload ,Col,Tabs} from 'antd';
+import { Icon, Button, Form, Input, Select, Spin, Tag, Table, Switch, message, DatePicker, Modal, Upload, Col, Tabs, Tooltip } from 'antd';
 import OrderDesc from '@/manageCenter/financialManage/orderDetail/orderDesc'
 import Assign from '@/manageCenter/publicComponent/assign';
 import ResolutionDetail from "@/resolutionDetail";
@@ -20,13 +20,14 @@ import {
 import ShowModalDiv from "@/showModal.jsx";
 import OrderRiZi from "@/orderRiZi.jsx";
 import ImgList from "../../../common/imgList";
-import {ChooseList} from "../../order/orderNew/chooseList";
+import { ChooseList } from "../../order/orderNew/chooseList";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
- import OrderItemStatus from "../../../common/orderItemStatus";
- import EnterpriseNameChange from "../../../common/enterpriseNameChange";
+import OrderItemStatus from "../../../common/orderItemStatus";
+import EnterpriseNameChange from "../../../common/enterpriseNameChange";
 import OrderCoor from '../../order/orderNew/changeComponent/orderCoor';
 import ContentUrl from '../../order/orderNew/contentUrl';
-const {TabPane} = Tabs
+import { salesList } from "@/dataDic.js";
+const { TabPane } = Tabs
 const PaiDan = React.createClass({
   loadData(pageNo) {
     this.state.data = [];
@@ -50,7 +51,7 @@ const PaiDan = React.createClass({
         starTime: this.state.releaseDate[0], //开始时间
         endTime: this.state.releaseDate[1] //结束时间
       },
-      success: function(data) {
+      success: function (data) {
         ShowModal(this);
         let theArr = [];
         if (!data.data || !data.data.list) {
@@ -90,7 +91,7 @@ const PaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -100,7 +101,7 @@ const PaiDan = React.createClass({
   getInitialState() {
     return {
       rotateDeg: 0,
-      orderNos:'',
+      orderNos: '',
       searchMore: true,
       releaseDate: [],
       activeKey: "1",
@@ -119,10 +120,10 @@ const PaiDan = React.createClass({
         defaultPageSize: 10,
         showQuickJumper: true,
         pageSize: 10,
-        onChange: function(page) {
+        onChange: function (page) {
           this.loadData(page);
         }.bind(this),
-        showTotal: function(total) {
+        showTotal: function (total) {
           return "共" + total + "条数据";
         }
       },
@@ -215,9 +216,9 @@ const PaiDan = React.createClass({
           key: "commodityName",
           render: (text, record) => {
             return (
-                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+              <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
             )
-        }
+          }
         },
         {
           title: "项目类别",
@@ -293,7 +294,7 @@ const PaiDan = React.createClass({
     this.state.RowData = record;
     this.setState({
       visible: true,
-      orderNos:record.orderNo
+      orderNos: record.orderNo
     });
     this.xiangqing(record.orderNo);
     this.xiangmu(record.orderNo);
@@ -322,7 +323,7 @@ const PaiDan = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
 
         if (data.error.length || data.data.list == "") {
@@ -333,6 +334,9 @@ const PaiDan = React.createClass({
           let thisdata = data.data;
           this.setState({
             orderUid: thisdata.uid,
+            userType: thisdata.userType,
+            salesType: thisdata.salesType,
+            other: thisdata.other,
             orderNo: thisdata.orderNo, //订单编号
             contractNo: thisdata.contractNo, //合同编号
             userName: thisdata.userName, //客户名称
@@ -350,24 +354,24 @@ const PaiDan = React.createClass({
             orderRemarks: thisdata.orderRemarks, //订单留言
             orgCodeUrl: thisdata.contractPictureUrl
               ? splitUrl(
-                  thisdata.contractPictureUrl,
-                  ",",
-                  globalConfig.avatarHost + "/upload"
-                )
+                thisdata.contractPictureUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
               : [], //图片地址
             replenishUrl: thisdata.agreementUrl
               ? splitUrl(
-                  thisdata.agreementUrl,
-                  ",",
-                  globalConfig.avatarHost + "/upload"
-                )
+                thisdata.agreementUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
               : [], //图片地址
-            contentUrl:thisdata.serviceContent
+            contentUrl: thisdata.serviceContent
               ? splitUrl(
-                  thisdata.serviceContent,
-                  ",",
-                  globalConfig.avatarHost + "/upload"
-                )
+                thisdata.serviceContent,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
               : [], //图片地址
             salesmanName: thisdata.salesmanName, //营销员名称
             salesmanMobile: thisdata.salesmanMobile, //营销员电话
@@ -379,12 +383,12 @@ const PaiDan = React.createClass({
             nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
             depName: thisdata.depName, //订单部门
             outsource: thisdata.outsource == 0 ? "否" : "是",
-            deleteSign:thisdata.deleteSign,
+            deleteSign: thisdata.deleteSign,
           });
         }
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -401,7 +405,7 @@ const PaiDan = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
 
         if (data.error.length || data.data.list == "") {
@@ -420,7 +424,7 @@ const PaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -473,7 +477,7 @@ const PaiDan = React.createClass({
       data: {
         orderNo: this.state.orderNo
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         let thisData = data.data;
         if (!thisData.length) {
@@ -497,7 +501,7 @@ const PaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -547,7 +551,7 @@ const PaiDan = React.createClass({
       taskComment: record.taskComment, //备注
       main: record.main.toString(), //是否为主要
       addnextVisible: true,
-      dataInfor:record,
+      dataInfor: record,
       addState: 0
     });
   },
@@ -569,7 +573,7 @@ const PaiDan = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/organization/selectSuperId",
       data: {},
-      success: function(data) {
+      success: function (data) {
         let thedata = data.data;
         let theArr = [];
         if (!thedata) {
@@ -578,7 +582,7 @@ const PaiDan = React.createClass({
           }
           thedata = {};
         } else {
-          thedata.map(function(item, index) {
+          thedata.map(function (item, index) {
             theArr.push({
               key: index,
               name: item.name,
@@ -591,7 +595,7 @@ const PaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -800,11 +804,11 @@ const PaiDan = React.createClass({
           <TabPane tab="更改表格显示数据" key="2">
             <div style={{ marginLeft: 10 }}>
               <ChooseList
-                  columns={this.state.columns}
-                  changeFn={this.changeList}
-                  changeList={this.state.changeList}
-                  top={55}
-                  margin={11}
+                columns={this.state.columns}
+                changeFn={this.changeList}
+                changeList={this.state.changeList}
+                top={55}
+                margin={11}
               />
             </div>
           </TabPane>
@@ -812,11 +816,11 @@ const PaiDan = React.createClass({
         <div className="patent-table">
           <Spin spinning={this.state.loading}>
             <Table
-                columns={
-                  this.state.changeList
-                      ? this.state.changeList
-                      : this.state.columns
-                }
+              columns={
+                this.state.changeList
+                  ? this.state.changeList
+                  : this.state.columns
+              }
               dataSource={this.state.dataSource}
               rowSelection={rowSelection}
               pagination={this.state.pagination}
@@ -843,8 +847,8 @@ const PaiDan = React.createClass({
           >
             <Spin spinning={this.state.loading}>
               <div className="clearfix">
-                <div style={{position:"absolute",top:'-52px',left:'81px',zIndex:10000}}>
-                  <OrderItemStatus deleteSign={this.state.deleteSign}/>
+                <div style={{ position: "absolute", top: '-52px', left: '81px', zIndex: 10000 }}>
+                  <OrderItemStatus deleteSign={this.state.deleteSign} />
                 </div>
                 <FormItem
                   className="half-item"
@@ -867,9 +871,27 @@ const PaiDan = React.createClass({
                 >
                   <span>{this.state.userName}</span>
                   <EnterpriseNameChange
-                      type='journal'
-                      style={{ marginLeft: 10 }}
-                      enterpriseId={this.state.orderUid}/>
+                    type='journal'
+                    style={{ marginLeft: 10 }}
+                    enterpriseId={this.state.orderUid} />
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label="销售类型"
+                >
+                  <span>
+                    {(["私有客户-", "签单客户-"][this.state.userType] || " ") +
+                      (salesList[this.state.salesType] || "")}
+                    {
+                      this.state.other != null && this.state.other != "" &&
+                      <Tooltip title={this.state.other}>
+                        <span>
+                          {"(" + this.state.other.toString().slice(0, 10) + (this.state.other.toString().length > 9 ? "...)" : ")")}
+                        </span>
+                      </Tooltip>
+                    }
+                  </span>
                 </FormItem>
                 <FormItem
                   className="half-item"
@@ -983,8 +1005,8 @@ const PaiDan = React.createClass({
                     {/*    });*/}
                     {/*  }}*/}
                     {/*/>*/}
-                    <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
-                      {this.state.visible && this.state.orgCodeUrl  ? <ImgList fileList={this.state.orgCodeUrl} domId={'projectQuery1'}/> : <div/>}
+                    <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
+                      {this.state.visible && this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} domId={'projectQuery1'} /> : <div />}
                     </div>
                     <Modal
                       maskClosable={false}
@@ -992,7 +1014,7 @@ const PaiDan = React.createClass({
                       width={"50%"}
                       visible={this.state.previewVisible}
                       onCancel={() => {
-                        this.setState({ previewVisible: false,rotateDeg: 0 });
+                        this.setState({ previewVisible: false, rotateDeg: 0 });
                       }}
                     >
                       <img
@@ -1063,8 +1085,8 @@ const PaiDan = React.createClass({
                     {/*    });*/}
                     {/*  }}*/}
                     {/*/>*/}
-                    <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
-                      {this.state.visible && this.state.replenishUrl  ? <ImgList fileList={this.state.replenishUrl} domId={'projectQuery2'}/> : <div/>}
+                    <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
+                      {this.state.visible && this.state.replenishUrl ? <ImgList fileList={this.state.replenishUrl} domId={'projectQuery2'} /> : <div />}
                     </div>
                     <Modal
                       maskClosable={false}
@@ -1072,7 +1094,7 @@ const PaiDan = React.createClass({
                       width={"50%"}
                       visible={this.state.previewVisibles}
                       onCancel={() => {
-                        this.setState({ previewVisibles: false,rotateDeg: 0 });
+                        this.setState({ previewVisibles: false, rotateDeg: 0 });
                       }}
                     >
                       <img
@@ -1119,11 +1141,11 @@ const PaiDan = React.createClass({
                   </FormItem>
                 </div>
                 <ContentUrl
-                    processStatus={1}
-                    domId = {"projectQueryContents"}
-                    contentUrl = {this.state.contentUrl }
-                    imgId = {"projectQueryContentsImg"}
-                    />
+                  processStatus={1}
+                  domId={"projectQueryContents"}
+                  contentUrl={this.state.contentUrl}
+                  imgId={"projectQueryContentsImg"}
+                />
                 <div className="clearfix">
                   <FormItem
                     className="half-item"
@@ -1200,7 +1222,7 @@ const PaiDan = React.createClass({
                   </FormItem>
                 </div>
                 <div>
-                  <OrderCoor orderNo={this.state.orderNos}/>
+                  <OrderCoor orderNo={this.state.orderNos} />
                   <span style={{ marginLeft: "50px", fontSize: "20px" }}>
                     项目业务
                   </span>
@@ -1235,7 +1257,7 @@ const PaiDan = React.createClass({
               </div>
             </Spin>
           </Form>
-        </Modal> : <div/>}
+        </Modal> : <div />}
         {/* <Modal
               visible={this.state.rizhivisible}
               className="admin-desc-content"
@@ -1262,9 +1284,9 @@ const PaiDan = React.createClass({
           loading={this.state.loading}
         />
         {this.state.addnextVisible && <ProjectDetailsReadOnly
-            infor={this.state.dataInfor}
-            visible={this.state.addnextVisible}
-            onCancel={this.nextCancel}
+          infor={this.state.dataInfor}
+          visible={this.state.addnextVisible}
+          onCancel={this.nextCancel}
         />}
       </div>
     );