mentoswzq 5 years ago
parent
commit
92ee9f57b8

+ 169 - 96
js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx

@@ -21,6 +21,7 @@ import {
 import Receivable from "./receivable";
 import Assign from "@/manageCenter/publicComponent/assign";
 import ReactToPrint from "react-to-print";
+import ResolutionDetail from "@/resolutionDetail";
 import OrderRiZi from "@/orderRiZi.jsx";
 import {
   getjiedian,
@@ -51,7 +52,7 @@ const approvedOutsourcing = 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) {
@@ -59,7 +60,7 @@ const approvedOutsourcing = React.createClass({
             message.warning(data.error[0].message);
           }
         } else {
-          thedata.map(function (item, index) {
+          thedata.map(function(item, index) {
             theArr.push({
               key: index,
               name: item.name,
@@ -72,7 +73,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -106,7 +107,7 @@ const approvedOutsourcing = React.createClass({
         liquidationStatus: this.state.liquidationStatus,
         amountStatus: this.state.amountStatus
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (!data.data || !data.data.pagination.list) {
           if (data.error && data.error.length) {
@@ -165,7 +166,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loadingA: false
         });
@@ -197,10 +198,10 @@ const approvedOutsourcing = 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 + "条数据";
         }
       },
@@ -212,14 +213,14 @@ const approvedOutsourcing = React.createClass({
           dataIndex: "contractNo",
           key: "contractNo",
           className: "title-table",
-          fixed: 'left',
+          fixed: "left"
         },
         {
           title: "客户名称",
           dataIndex: "buyerName",
           key: "buyerName",
           className: "title-table",
-          fixed: 'left',
+          fixed: "left"
         },
         {
           title: "订单编号",
@@ -359,7 +360,7 @@ const approvedOutsourcing = React.createClass({
                     收款
                   </Button>
                 )} */}
-                {recard.backStatus == 3 ? (<Tag>已驳回</Tag>) : ("")}
+                {recard.backStatus == 3 ? <Tag>已驳回</Tag> : ""}
                 {recard.processStatus == 3 ? (
                   <Button
                     type="primary"
@@ -372,22 +373,26 @@ const approvedOutsourcing = React.createClass({
                     通过
                   </Button>
                 ) : (
-                    ""
-                  )}
+                  ""
+                )}
                 {!(
                   recard.actuallyTotalAmount &&
                   Number(recard.actuallyTotalAmount) > 0
                 ) && (
-                    <Button
-                      type="danger"
-                      style={{ marginLeft: "5px", display: recard.processStatus == 3 ? "inline-block" : "none" }}
-                      onClick={e => {
-                        e.stopPropagation(), this.reject(recard);
-                      }}
-                    >
-                      驳回
-                    </Button>
-                  )}
+                  <Button
+                    type="danger"
+                    style={{
+                      marginLeft: "5px",
+                      display:
+                        recard.processStatus == 3 ? "inline-block" : "none"
+                    }}
+                    onClick={e => {
+                      e.stopPropagation(), this.reject(recard);
+                    }}
+                  >
+                    驳回
+                  </Button>
+                )}
                 {
                   // <Button
                   //   type="primary"
@@ -452,7 +457,27 @@ const approvedOutsourcing = React.createClass({
         {
           title: "项目数量",
           dataIndex: "commodityQuantity",
-          key: "commodityQuantity"
+          key: "commodityQuantity",
+          render: (text, record) => {
+            if (record.splitStatus == 1) {
+              return (
+                <span>
+                  {text}{" "}
+                  <Tag
+                    color="#108ee9"
+                    onClick={e => {
+                      e.stopPropagation();
+                      this.showRes(record);
+                    }}
+                  >
+                    已拆
+                  </Tag>
+                </span>
+              );
+            } else {
+              return text;
+            }
+          }
         },
         {
           title: "服务市价",
@@ -769,9 +794,9 @@ const approvedOutsourcing = React.createClass({
           key: "outsource",
           render: text => {
             if (text == 0) {
-              return "否"
+              return "否";
             } else if (text == 1) {
-              return "是"
+              return "是";
             }
           }
         },
@@ -883,6 +908,7 @@ const approvedOutsourcing = React.createClass({
           }
         }
       ],
+      resVisible: false,
       columnsX: [
         {
           title: "业务项目名称",
@@ -892,8 +918,8 @@ const approvedOutsourcing = React.createClass({
             return text && text.length > 6 ? (
               <span title={text}>{text.substr(0, 8)}...</span>
             ) : (
-                text
-              );
+              text
+            );
           }
         },
         {
@@ -902,9 +928,29 @@ const approvedOutsourcing = React.createClass({
           key: "cname"
         },
         {
-          title: "项目数量(个)",
+          title: "项目数量",
           dataIndex: "commodityQuantity",
-          key: "commodityQuantity"
+          key: "commodityQuantity",
+          render: (text, record) => {
+            if (record.splitStatus == 1) {
+              return (
+                <span>
+                  {text}{" "}
+                  <Tag
+                    color="#108ee9"
+                    onClick={e => {
+                      e.stopPropagation();
+                      this.showRes(record);
+                    }}
+                  >
+                    已拆
+                  </Tag>
+                </span>
+              );
+            } else {
+              return text;
+            }
+          }
         },
         {
           title: "服务市价(万元)",
@@ -940,8 +986,8 @@ const approvedOutsourcing = React.createClass({
             return text && text.length > 8 ? (
               <span title={text}>{text.substr(0, 8)}...</span>
             ) : (
-                text
-              );
+              text
+            );
           }
         }
       ],
@@ -1016,10 +1062,10 @@ const approvedOutsourcing = React.createClass({
             return test[0] === null
               ? ""
               : getprovince(test[0]) +
-              "/" +
-              getprovince(test[1]) +
-              "/" +
-              getprovince(test[2]);
+                  "/" +
+                  getprovince(test[1]) +
+                  "/" +
+                  getprovince(test[2]);
           }
         },
         {
@@ -1238,15 +1284,11 @@ const approvedOutsourcing = React.createClass({
                   okText="删除"
                   cancelText="不删除"
                 >
-                  <Button>
-                    删除
-                  </Button>
+                  <Button>删除</Button>
                 </Popconfirm>
-              )
+              );
             } else {
-              return (
-                <Tag>已删除</Tag>
-              )
+              return <Tag>已删除</Tag>;
             }
           }
         }
@@ -1267,17 +1309,17 @@ const approvedOutsourcing = React.createClass({
       data: {
         billNo
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (data.error && data.error.length) {
           message.warning(data.error[0].message);
         } else {
-          message.warning("删除流水成功!")
-          this.waterData()
+          message.warning("删除流水成功!");
+          this.waterData();
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1295,7 +1337,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: record.orderNo
       }
     }).done(
-      function (data) {
+      function(data) {
         if (!data.error.length) {
           message.success("通过成功!");
           this.setState({
@@ -1318,7 +1360,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let thisData = data.data;
         if (!thisData.length) {
           if (data.error && data.error.length) {
@@ -1332,7 +1374,7 @@ const approvedOutsourcing = React.createClass({
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1404,7 +1446,7 @@ const approvedOutsourcing = React.createClass({
     }
     if (this.state.pictureUrl.length) {
       let picArr = [];
-      this.state.pictureUrl.map(function (item) {
+      this.state.pictureUrl.map(function(item) {
         if (item.response && item.response.data && item.response.data.length) {
           picArr.push(item.response.data);
         }
@@ -1427,7 +1469,7 @@ const approvedOutsourcing = React.createClass({
         data: {
           orderNo: this.state.orderNo
         },
-        success: function (data) {
+        success: function(data) {
           let thisdata = data.data;
           this.setState({
             id: thisdata.id,
@@ -1436,17 +1478,17 @@ const approvedOutsourcing = React.createClass({
             remarks: thisdata.remarks,
             attachmentUrl: thisdata.attachmentUrl
               ? splitUrl(
-                thisdata.attachmentUrl,
-                ",",
-                globalConfig.avatarHost + "/upload"
-              )
+                  thisdata.attachmentUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
               : [],
             pictureUrl: thisdata.pictureUrl
               ? splitUrl(
-                thisdata.pictureUrl,
-                ",",
-                globalConfig.avatarHost + "/upload"
-              )
+                  thisdata.pictureUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
               : [], //图片地址
             amount: thisdata.amount,
             companyName: thisdata.companyName,
@@ -1457,7 +1499,7 @@ const approvedOutsourcing = React.createClass({
           });
         }.bind(this)
       }).always(
-        function () {
+        function() {
           this.setState({
             loading: false
           });
@@ -1465,6 +1507,20 @@ const approvedOutsourcing = React.createClass({
       );
     }
   },
+
+  // 拆分详细
+  showRes(record) {
+    this.setState({
+      resVisible: true,
+      resRecord: record
+    });
+  },
+  resCancel() {
+    this.setState({
+      resVisible: false
+    });
+  },
+
   //外包详情
   loadWaiBao() {
     $.ajax({
@@ -1477,7 +1533,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: this.state.orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (data.error.length || data.data.list == "") {
           if (data.error && data.error.length) {
@@ -1515,11 +1571,11 @@ const approvedOutsourcing = React.createClass({
           {
             dataSourceW: theArr
           },
-          () => { }
+          () => {}
         );
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1539,7 +1595,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: record.orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (!data.data) {
           if (data.error && data.error.length) {
@@ -1563,7 +1619,8 @@ const approvedOutsourcing = React.createClass({
               cname: thisdata.cname,
               certificateNumber: thisdata.certificateNumber,
               projectStatus: thisdata.projectStatus,
-              sort: thisdata.cSort
+              sort: thisdata.cSort,
+              splitStatus: thisdata.splitStatus
             });
           }
         }
@@ -1572,7 +1629,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1589,7 +1646,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: record.orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let thisData = data.data;
         if (!thisData) {
           if (data.error && data.error.length) {
@@ -1607,10 +1664,10 @@ const approvedOutsourcing = React.createClass({
           orderRemarks: thisData.orderRemarks,
           orgCodeUrl: thisData.contractPictureUrl
             ? splitUrl(
-              thisData.contractPictureUrl,
-              ",",
-              globalConfig.avatarHost + "/upload"
-            )
+                thisData.contractPictureUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
             : [],
           orderNo: thisData.orderNo, //订单编号
           buyerId: thisData.buyerId,
@@ -1618,7 +1675,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1637,7 +1694,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: this.state.orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let thisData = data.data;
         if (!thisData.length) {
@@ -1661,7 +1718,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1766,7 +1823,7 @@ const approvedOutsourcing = React.createClass({
         reason: this.state.reason
       }
     }).done(
-      function (data) {
+      function(data) {
         if (!data.error.length) {
           message.success("驳回成功!");
           this.setState({
@@ -1825,7 +1882,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: this.state.selectedRowKeys[0],
         pageSize: 9999
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let sum = 0;
         if (!data.data) {
@@ -1852,7 +1909,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).done(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1879,7 +1936,7 @@ const approvedOutsourcing = React.createClass({
         pageSize: 9999,
         whoType: 1
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let waterSum = 0;
         if (!data.data || !data.data.list) {
@@ -1906,11 +1963,16 @@ const approvedOutsourcing = React.createClass({
               createrName: thisdata.createrName,
               saleName: thisdata.saleName,
               createTimes: thisdata.createTimes,
-              type: thisdata.type == 0 ? "手工" : thisdata.type == 1 ? "批量" : "合同变更退款",
+              type:
+                thisdata.type == 0
+                  ? "手工"
+                  : thisdata.type == 1
+                  ? "批量"
+                  : "合同变更退款",
               deleteSign: thisdata.deleteSign,
               deleteTimes: thisdata.deleteTimes,
               refundTimes: thisdata.refundTimes,
-              remarks: thisdata.remarks,
+              remarks: thisdata.remarks
             });
           }
         }
@@ -1920,7 +1982,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2022,7 +2084,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: this.state.selectedRowKeys[0],
         pageSize: 9999
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (!data.data || !data.data.list) {
           if (data.error && data.error.length) {
@@ -2060,7 +2122,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2113,7 +2175,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: this.state.selectedRowKeys[0],
         pageSize: 9999
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (!data.data || !data.data.list) {
           if (data.error && data.error.length) {
@@ -2155,7 +2217,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2175,7 +2237,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: this.state.selectedRowKeys[0],
         pageSize: 9999
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let totalWaibao = 0;
         if (!data.data) {
@@ -2216,7 +2278,8 @@ const approvedOutsourcing = React.createClass({
               certificateNumber: thisdata.certificateNumber,
               taskComment: thisdata.taskComment,
               outsourceName: thisdata.outsourceName,
-              outsourcePrice: thisdata.outsourcePrice
+              outsourcePrice: thisdata.outsourcePrice,
+              splitStatus: thisdata.splitStatus
             });
           }
         }
@@ -2227,7 +2290,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2257,7 +2320,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: this.state.checkOrderNo,
         remarks: this.state.checkData
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (!data.data) {
           if (data.error && data.error.length) {
@@ -2273,7 +2336,7 @@ const approvedOutsourcing = React.createClass({
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2289,7 +2352,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let thisData = [];
         if (data.error.length || data.data.list == "") {
@@ -2316,7 +2379,7 @@ const approvedOutsourcing = React.createClass({
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2334,7 +2397,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function (data) {
+      success: function(data) {
         if (data.error && data.error.length) {
           message.warning(data.error[0].message);
         } else {
@@ -2375,7 +2438,7 @@ const approvedOutsourcing = React.createClass({
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2403,6 +2466,16 @@ const approvedOutsourcing = React.createClass({
     const jsDate = this.state.jsDate || [];
     return (
       <div className="user-content">
+        {this.state.resVisible ? (
+          <ResolutionDetail
+            cancel={this.resCancel}
+            detail={this.state.resRecord}
+            visible={this.state.resVisible}
+            id={this.state.resRecord.orderNo}
+          />
+        ) : (
+          ""
+        )}
         <div className="content-title" style={{ marginBottom: 10 }}>
           <span style={{ fontWeight: 900, fontSize: 16 }}>外包结算管理</span>
         </div>
@@ -2442,7 +2515,7 @@ const approvedOutsourcing = React.createClass({
                   this.setState({ departmenttList: e });
                 }}
               >
-                {departmentArr.map(function (item) {
+                {departmentArr.map(function(item) {
                   return (
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
@@ -2772,7 +2845,7 @@ const approvedOutsourcing = React.createClass({
               <span>
                 {`合同额总计(万元):${
                   this.state.totalHui ? this.state.totalHui : "0"
-                  }`}
+                }`}
               </span>
             }
           </p>

+ 147 - 79
js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx

@@ -20,6 +20,7 @@ import {
 import Receivable from "./receivable";
 import Assign from "@/manageCenter/publicComponent/assign";
 import ReactToPrint from "react-to-print";
+import ResolutionDetail from "@/resolutionDetail";
 import OrderRiZi from "@/orderRiZi.jsx";
 import {
   getjiedian,
@@ -51,7 +52,7 @@ const approvedOutsourcing = 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) {
@@ -59,7 +60,7 @@ const approvedOutsourcing = React.createClass({
             message.warning(data.error[0].message);
           }
         } else {
-          thedata.map(function (item, index) {
+          thedata.map(function(item, index) {
             theArr.push({
               key: index,
               name: item.name,
@@ -72,7 +73,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -104,9 +105,9 @@ const approvedOutsourcing = React.createClass({
         contractNo: this.state.contractNoSearch,
         outsource: 1,
         liquidationStatus: this.state.liquidationStatus,
-        amountStatus: this.state.amountStatus,
+        amountStatus: this.state.amountStatus
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (!data.data || !data.data.pagination.list) {
           if (data.error && data.error.length) {
@@ -165,7 +166,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loadingA: false
         });
@@ -196,10 +197,10 @@ const approvedOutsourcing = 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 + "条数据";
         }
       },
@@ -212,14 +213,14 @@ const approvedOutsourcing = React.createClass({
           dataIndex: "contractNo",
           key: "contractNo",
           className: "title-table",
-          fixed: 'left',
+          fixed: "left"
         },
         {
           title: "客户名称",
           dataIndex: "buyerName",
           key: "buyerName",
           className: "title-table",
-          fixed: 'left',
+          fixed: "left"
         },
         {
           title: "订单编号",
@@ -338,9 +339,9 @@ const approvedOutsourcing = React.createClass({
           className: "title-table",
           render: text => {
             if (text == 3) {
-              return (<Tag>已驳回</Tag>)
+              return <Tag>已驳回</Tag>;
             } else {
-              return ("")
+              return "";
             }
           }
         }
@@ -567,7 +568,27 @@ const approvedOutsourcing = React.createClass({
         {
           title: "项目数量",
           dataIndex: "commodityQuantity",
-          key: "commodityQuantity"
+          key: "commodityQuantity",
+          render: (text, record) => {
+            if (record.splitStatus == 1) {
+              return (
+                <span>
+                  {text}{" "}
+                  <Tag
+                    color="#108ee9"
+                    onClick={e => {
+                      e.stopPropagation();
+                      this.showRes(record);
+                    }}
+                  >
+                    已拆
+                  </Tag>
+                </span>
+              );
+            } else {
+              return text;
+            }
+          }
         },
         {
           title: "服务市价",
@@ -780,9 +801,9 @@ const approvedOutsourcing = React.createClass({
           key: "outsource",
           render: text => {
             if (text == 0) {
-              return "否"
+              return "否";
             } else if (text == 1) {
-              return "是"
+              return "是";
             }
           }
         },
@@ -903,8 +924,8 @@ const approvedOutsourcing = React.createClass({
             return text && text.length > 6 ? (
               <span title={text}>{text.substr(0, 8)}...</span>
             ) : (
-                text
-              );
+              text
+            );
           }
         },
         {
@@ -913,9 +934,29 @@ const approvedOutsourcing = React.createClass({
           key: "cname"
         },
         {
-          title: "项目数量(个)",
+          title: "项目数量",
           dataIndex: "commodityQuantity",
-          key: "commodityQuantity"
+          key: "commodityQuantity",
+          render: (text, record) => {
+            if (record.splitStatus == 1) {
+              return (
+                <span>
+                  {text}{" "}
+                  <Tag
+                    color="#108ee9"
+                    onClick={e => {
+                      e.stopPropagation();
+                      this.showRes(record);
+                    }}
+                  >
+                    已拆
+                  </Tag>
+                </span>
+              );
+            } else {
+              return text;
+            }
+          }
         },
         {
           title: "服务市价(万元)",
@@ -951,8 +992,8 @@ const approvedOutsourcing = React.createClass({
             return text && text.length > 8 ? (
               <span title={text}>{text.substr(0, 8)}...</span>
             ) : (
-                text
-              );
+              text
+            );
           }
         }
       ],
@@ -1027,10 +1068,10 @@ const approvedOutsourcing = React.createClass({
             return test[0] === null
               ? ""
               : getprovince(test[0]) +
-              "/" +
-              getprovince(test[1]) +
-              "/" +
-              getprovince(test[2]);
+                  "/" +
+                  getprovince(test[1]) +
+                  "/" +
+                  getprovince(test[2]);
           }
         },
         {
@@ -1240,13 +1281,9 @@ const approvedOutsourcing = React.createClass({
           key: "deleteSign",
           render: (text, record) => {
             if (!text) {
-              return (
-                ""
-              )
+              return "";
             } else {
-              return (
-                <Tag>已删除</Tag>
-              )
+              return <Tag>已删除</Tag>;
             }
           }
         }
@@ -1265,7 +1302,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: record.orderNo
       }
     }).done(
-      function (data) {
+      function(data) {
         if (!data.error.length) {
           message.success("通过成功!");
           this.setState({
@@ -1288,7 +1325,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let thisData = data.data;
         if (!thisData.length) {
           if (data.error && data.error.length) {
@@ -1302,7 +1339,7 @@ const approvedOutsourcing = React.createClass({
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1357,6 +1394,20 @@ const approvedOutsourcing = React.createClass({
     this.jiedian(record.orderNo);
     this.jiedianNew(record.orderNo);
   },
+
+  // 拆分详细
+  showRes(record) {
+    this.setState({
+      resVisible: true,
+      resRecord: record
+    });
+  },
+  resCancel() {
+    this.setState({
+      resVisible: false
+    });
+  },
+
   //详情
   callBack(key) {
     if (key === "2") {
@@ -1374,7 +1425,7 @@ const approvedOutsourcing = React.createClass({
     }
     if (this.state.pictureUrl.length) {
       let picArr = [];
-      this.state.pictureUrl.map(function (item) {
+      this.state.pictureUrl.map(function(item) {
         if (item.response && item.response.data && item.response.data.length) {
           picArr.push(item.response.data);
         }
@@ -1397,7 +1448,7 @@ const approvedOutsourcing = React.createClass({
         data: {
           orderNo: this.state.orderNo
         },
-        success: function (data) {
+        success: function(data) {
           let thisdata = data.data;
           this.setState({
             id: thisdata.id,
@@ -1406,17 +1457,17 @@ const approvedOutsourcing = React.createClass({
             remarks: thisdata.remarks,
             attachmentUrl: thisdata.attachmentUrl
               ? splitUrl(
-                thisdata.attachmentUrl,
-                ",",
-                globalConfig.avatarHost + "/upload"
-              )
+                  thisdata.attachmentUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
               : [],
             pictureUrl: thisdata.pictureUrl
               ? splitUrl(
-                thisdata.pictureUrl,
-                ",",
-                globalConfig.avatarHost + "/upload"
-              )
+                  thisdata.pictureUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
               : [], //图片地址
             amount: thisdata.amount,
             companyName: thisdata.companyName,
@@ -1427,7 +1478,7 @@ const approvedOutsourcing = React.createClass({
           });
         }.bind(this)
       }).always(
-        function () {
+        function() {
           this.setState({
             loading: false
           });
@@ -1447,7 +1498,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: this.state.orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (data.error.length || data.data.list == "") {
           if (data.error && data.error.length) {
@@ -1485,11 +1536,11 @@ const approvedOutsourcing = React.createClass({
           {
             dataSourceW: theArr
           },
-          () => { }
+          () => {}
         );
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1509,7 +1560,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: record.orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (!data.data) {
           if (data.error && data.error.length) {
@@ -1533,7 +1584,8 @@ const approvedOutsourcing = React.createClass({
               cname: thisdata.cname,
               certificateNumber: thisdata.certificateNumber,
               projectStatus: thisdata.projectStatus,
-              sort: thisdata.cSort
+              sort: thisdata.cSort,
+              splitStatus: thisdata.splitStatus
             });
           }
         }
@@ -1542,7 +1594,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1559,7 +1611,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: record.orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let thisData = data.data;
         if (!thisData) {
           if (data.error && data.error.length) {
@@ -1577,10 +1629,10 @@ const approvedOutsourcing = React.createClass({
           orderRemarks: thisData.orderRemarks,
           orgCodeUrl: thisData.contractPictureUrl
             ? splitUrl(
-              thisData.contractPictureUrl,
-              ",",
-              globalConfig.avatarHost + "/upload"
-            )
+                thisData.contractPictureUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
             : [],
           orderNo: thisData.orderNo, //订单编号
           buyerId: thisData.buyerId,
@@ -1588,7 +1640,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1607,7 +1659,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: this.state.orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let thisData = data.data;
         if (!thisData.length) {
@@ -1631,7 +1683,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1736,7 +1788,7 @@ const approvedOutsourcing = React.createClass({
         reason: this.state.reason
       }
     }).done(
-      function (data) {
+      function(data) {
         if (!data.error.length) {
           message.success("驳回成功!");
           this.setState({
@@ -1795,7 +1847,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: this.state.selectedRowKeys[0],
         pageSize: 9999
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let sum = 0;
         if (!data.data) {
@@ -1822,7 +1874,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).done(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1849,7 +1901,7 @@ const approvedOutsourcing = React.createClass({
         pageSize: 9999,
         whoType: 1
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let waterSum = 0;
         if (!data.data || !data.data.list) {
@@ -1876,11 +1928,16 @@ const approvedOutsourcing = React.createClass({
               createrName: thisdata.createrName,
               saleName: thisdata.saleName,
               createTimes: thisdata.createTimes,
-              type: thisdata.type == 0 ? "手工" : thisdata.type == 1 ? "批量" : "合同变更退款",
+              type:
+                thisdata.type == 0
+                  ? "手工"
+                  : thisdata.type == 1
+                  ? "批量"
+                  : "合同变更退款",
               deleteSign: thisdata.deleteSign,
               deleteTimes: thisdata.deleteTimes,
               refundTimes: thisdata.refundTimes,
-              remarks: thisdata.remarks,
+              remarks: thisdata.remarks
             });
           }
         }
@@ -1890,7 +1947,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -1992,7 +2049,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: this.state.selectedRowKeys[0],
         pageSize: 9999
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (!data.data || !data.data.list) {
           if (data.error && data.error.length) {
@@ -2030,7 +2087,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2083,7 +2140,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: this.state.selectedRowKeys[0],
         pageSize: 9999
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (!data.data || !data.data.list) {
           if (data.error && data.error.length) {
@@ -2125,7 +2182,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2145,7 +2202,7 @@ const approvedOutsourcing = React.createClass({
         orderNo: this.state.selectedRowKeys[0],
         pageSize: 9999
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let totalWaibao = 0;
         if (!data.data) {
@@ -2186,7 +2243,8 @@ const approvedOutsourcing = React.createClass({
               certificateNumber: thisdata.certificateNumber,
               taskComment: thisdata.taskComment,
               outsourceName: thisdata.outsourceName,
-              outsourcePrice: thisdata.outsourcePrice
+              outsourcePrice: thisdata.outsourcePrice,
+              splitStatus: thisdata.splitStatus
             });
           }
         }
@@ -2197,7 +2255,7 @@ const approvedOutsourcing = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2213,7 +2271,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let thisData = [];
         if (data.error.length || data.data.list == "") {
@@ -2240,7 +2298,7 @@ const approvedOutsourcing = React.createClass({
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2258,7 +2316,7 @@ const approvedOutsourcing = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function (data) {
+      success: function(data) {
         if (data.error && data.error.length) {
           message.warning(data.error[0].message);
         } else {
@@ -2299,7 +2357,7 @@ const approvedOutsourcing = React.createClass({
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -2327,6 +2385,16 @@ const approvedOutsourcing = React.createClass({
     const jsDate = this.state.jsDate || [];
     return (
       <div className="user-content">
+        {this.state.resVisible ? (
+          <ResolutionDetail
+            cancel={this.resCancel}
+            detail={this.state.resRecord}
+            visible={this.state.resVisible}
+            id={this.state.resRecord.orderNo}
+          />
+        ) : (
+          ""
+        )}
         <div className="content-title" style={{ marginBottom: 10 }}>
           <span style={{ fontWeight: 900, fontSize: 16 }}>外包结算管理</span>
         </div>
@@ -2366,7 +2434,7 @@ const approvedOutsourcing = React.createClass({
                   this.setState({ departmenttList: e });
                 }}
               >
-                {departmentArr.map(function (item) {
+                {departmentArr.map(function(item) {
                   return (
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
@@ -2696,7 +2764,7 @@ const approvedOutsourcing = React.createClass({
               <span>
                 {`合同额总计(万元):${
                   this.state.totalHui ? this.state.totalHui : "0"
-                  }`}
+                }`}
               </span>
             }
           </p>

+ 55 - 4
js/component/manageCenter/financialManage/distribute/outOutsourcingList.jsx

@@ -13,9 +13,11 @@ import {
   DatePicker,
   Modal,
   Upload,
-  Tabs
+  Tabs,
+  Tag
 } from "antd";
 import Assign from "@/manageCenter/publicComponent/assign";
+import ResolutionDetail from "@/resolutionDetail";
 import {
   getjiedian,
   getProcessStatus,
@@ -220,9 +222,29 @@ const outsourcingPaiDan = React.createClass({
           key: "cname"
         },
         {
-          title: "项目数量(个)",
+          title: "项目数量",
           dataIndex: "commodityQuantity",
-          key: "commodityQuantity"
+          key: "commodityQuantity",
+          render: (text, record) => {
+            if (record.splitStatus == 1) {
+              return (
+                <span>
+                  {text}{" "}
+                  <Tag
+                    color="#108ee9"
+                    onClick={e => {
+                      e.stopPropagation();
+                      this.showRes(record);
+                    }}
+                  >
+                    已拆
+                  </Tag>
+                </span>
+              );
+            } else {
+              return text;
+            }
+          }
         },
         {
           title: "服务市价(万元)",
@@ -475,6 +497,20 @@ const outsourcingPaiDan = React.createClass({
       });
     }
   },
+
+  // 拆分详细
+  showRes(record) {
+    this.setState({
+      resVisible: true,
+      resRecord: record
+    });
+  },
+  resCancel() {
+    this.setState({
+      resVisible: false
+    });
+  },
+
   //外包详情
   loadWaiBao() {
     $.ajax({
@@ -572,7 +608,8 @@ const outsourcingPaiDan = React.createClass({
               contactsMobile: thisdata.contactsMobile,
               cname: thisdata.cname,
               certificateNumber: thisdata.certificateNumber,
-              projectStatus: thisdata.projectStatus
+              projectStatus: thisdata.projectStatus,
+              splitStatus: thisdata.splitStatus
             });
           }
         }
@@ -741,6 +778,16 @@ const outsourcingPaiDan = React.createClass({
     const jsDate = this.state.jsDate || [];
     return (
       <div className="user-content">
+        {this.state.resVisible ? (
+          <ResolutionDetail
+            cancel={this.resCancel}
+            detail={this.state.resRecord}
+            visible={this.state.resVisible}
+            id={this.state.resRecord.orderNo}
+          />
+        ) : (
+          ""
+        )}
         <div className="content-title">
           <span>外省外包列表</span>
         </div>
@@ -799,6 +846,8 @@ const outsourcingPaiDan = React.createClass({
               columns={this.state.columns}
               dataSource={this.state.dataSource}
               scroll={{ x: 1500, y: 0 }}
+              size="small"
+              bordered
               rowSelection={false}
               pagination={this.state.pagination}
               onRowClick={this.tableRowClick.bind(this)}
@@ -1040,6 +1089,8 @@ const outsourcingPaiDan = React.createClass({
                           <Table
                             columns={this.state.columnsX}
                             dataSource={this.state.dataSourceX}
+                            size="small"
+                            bordered
                             pagination={this.state.pagination}
                             onRowClick={this.tableRowClick}
                           />

+ 57 - 4
js/component/manageCenter/financialManage/distribute/outsourcingPaiDan.jsx

@@ -13,9 +13,11 @@ import {
   DatePicker,
   Modal,
   Upload,
-  Tabs
+  Tabs,
+  Tag
 } from "antd";
 import Assign from "@/manageCenter/publicComponent/assign";
+import ResolutionDetail from "@/resolutionDetail";
 import {
   getjiedian,
   getProcessStatus,
@@ -269,9 +271,29 @@ const outsourcingPaiDan = React.createClass({
           key: "cname"
         },
         {
-          title: "项目数量(个)",
+          title: "项目数量",
           dataIndex: "commodityQuantity",
-          key: "commodityQuantity"
+          key: "commodityQuantity",
+          render: (text, record) => {
+            if (record.splitStatus == 1) {
+              return (
+                <span>
+                  {text}{" "}
+                  <Tag
+                    color="#108ee9"
+                    onClick={e => {
+                      e.stopPropagation();
+                      this.showRes(record);
+                    }}
+                  >
+                    已拆
+                  </Tag>
+                </span>
+              );
+            } else {
+              return text;
+            }
+          }
         },
         {
           title: "服务市价(万元)",
@@ -497,6 +519,20 @@ const outsourcingPaiDan = React.createClass({
     this.departmentList();
     this.loadData();
   },
+
+  // 拆分详细
+  showRes(record) {
+    this.setState({
+      resVisible: true,
+      resRecord: record
+    });
+  },
+  resCancel() {
+    this.setState({
+      resVisible: false
+    });
+  },
+
   tableRowClick(record) {
     this.state.RowData = record;
     this.setState({
@@ -684,7 +720,8 @@ const outsourcingPaiDan = React.createClass({
               contactsMobile: thisdata.contactsMobile,
               cname: thisdata.cname,
               certificateNumber: thisdata.certificateNumber,
-              projectStatus: thisdata.projectStatus
+              projectStatus: thisdata.projectStatus,
+              splitStatus: thisdata.splitStatus
             });
           }
         }
@@ -876,6 +913,16 @@ const outsourcingPaiDan = React.createClass({
     const jsDate = this.state.jsDate || [];
     return (
       <div className="user-content">
+        {this.state.resVisible ? (
+          <ResolutionDetail
+            cancel={this.resCancel}
+            detail={this.state.resRecord}
+            visible={this.state.resVisible}
+            id={this.state.resRecord.orderNo}
+          />
+        ) : (
+          ""
+        )}
         <div className="content-title">
           <span>外包派单</span>
         </div>
@@ -956,6 +1003,8 @@ const outsourcingPaiDan = React.createClass({
               dataSource={this.state.dataSource}
               scroll={{ x: 1500, y: 0 }}
               rowSelection={false}
+              size="small"
+              bordered
               pagination={this.state.pagination}
               onRowClick={this.tableRowClick.bind(this)}
             />
@@ -1183,6 +1232,8 @@ const outsourcingPaiDan = React.createClass({
                         <Spin spinning={this.state.loading}>
                           <Table
                             columns={this.state.columnsY}
+                            size="small"
+                            bordered
                             dataSource={this.state.dataSourceY}
                             pagination={false}
                           />
@@ -1197,6 +1248,8 @@ const outsourcingPaiDan = React.createClass({
                             columns={this.state.columnsX}
                             dataSource={this.state.dataSourceX}
                             pagination={false}
+                            size="small"
+                            bordered
                             onRowClick={this.tableRowClick}
                           />
                         </Spin>

+ 51 - 4
js/component/manageCenter/financialManage/orderDetail/orderDetail.jsx

@@ -8,7 +8,8 @@ import {
 	Button,
     Form,
     Table,
-    Col
+    Col,
+    Tag
 } from 'antd';
 import {
   getjiedian,
@@ -21,6 +22,7 @@ import {
   getCuikuan
 } from "@/tools";
 import OrderRiZi from "@/orderRiZi.jsx";
+import ResolutionDetail from "@/resolutionDetail";
 const OrderDetail = Form.create()(
   React.createClass({
     loadXmu(record) {
@@ -60,7 +62,8 @@ const OrderDetail = Form.create()(
                 cname: thisdata.cname,
                 certificateNumber: thisdata.certificateNumber,
                 projectStatus: thisdata.projectStatus,
-                sort: thisdata.cSort
+                sort: thisdata.cSort,
+                splitStatus: thisdata.splitStatus
               });
             }
           }
@@ -108,9 +111,29 @@ const OrderDetail = Form.create()(
             key: "cname"
           },
           {
-            title: "项目数量(个)",
+            title: "项目数量",
             dataIndex: "commodityQuantity",
-            key: "commodityQuantity"
+            key: "commodityQuantity",
+            render: (text, record) => {
+              if (record.splitStatus == 1) {
+                return (
+                  <span>
+                    {text}{" "}
+                    <Tag
+                      color="#108ee9"
+                      onClick={e => {
+                        e.stopPropagation();
+                        this.showRes(record);
+                      }}
+                    >
+                      已拆
+                    </Tag>
+                  </span>
+                );
+              } else {
+                return text;
+              }
+            }
           },
           {
             title: "服务市价(万元)",
@@ -274,6 +297,20 @@ const OrderDetail = Form.create()(
         ]
       };
     },
+
+    // 拆分详细
+    showRes(record) {
+      this.setState({
+        resVisible: true,
+        resRecord: record
+      });
+    },
+    resCancel() {
+      this.setState({
+        resVisible: false
+      });
+    },
+
     loadData(record) {
       this.state.orderList = [];
       $.ajax({
@@ -592,6 +629,16 @@ const OrderDetail = Form.create()(
       const cuiDataList = this.state.contactList || [];
       return (
         <div className="login">
+          {this.state.resVisible ? (
+            <ResolutionDetail
+              cancel={this.resCancel}
+              detail={this.state.resRecord}
+              visible={this.state.resVisible}
+              id={this.state.resRecord.orderNo}
+            />
+          ) : (
+            ""
+          )}
           <Form layout="horizontal" id="demand-form">
             <Spin spinning={this.state.loading}>
               <div className="clearfix">

+ 61 - 29
js/component/manageCenter/order/orderNew/addService.jsx

@@ -255,8 +255,8 @@ const NewService = Form.create()(
                       删除
                     </Button>
                   ) : (
-                      ""
-                    )}
+                    ""
+                  )}
                 </div>
               );
             }
@@ -267,7 +267,7 @@ const NewService = Form.create()(
             title: "变更状态",
             dataIndex: "type",
             key: "type",
-            render: text => {
+            render: (text, record) => {
               let str = "";
               let color = "";
               if (text == 1) {
@@ -281,12 +281,24 @@ const NewService = Form.create()(
                 color = "#f50";
               }
               return (
-                <Tag
-                  color={color}
-                  style={{ display: text == 0 ? "none" : "inline-block" }}
-                >
-                  {str}
-                </Tag>
+                <span>
+                  <Tag
+                    color={color}
+                    style={{ display: text == 0 ? "none" : "inline-block" }}
+                  >
+                    {str}
+                  </Tag>
+                  {record.splitStatus == 1 ? (
+                    <Tag color="#108ee9">父项目</Tag>
+                  ) : (
+                    ""
+                  )}
+                  {record.splitStatus == 2 ? (
+                    <Tag color="#108ee9">子项目</Tag>
+                  ) : (
+                    ""
+                  )}
+                </span>
               );
             }
           },
@@ -355,7 +367,7 @@ const NewService = Form.create()(
             title: "变更状态",
             dataIndex: "type",
             key: "type",
-            render: text => {
+            render: (text, record) => {
               let str = "";
               let color = "";
               if (text == 1) {
@@ -369,12 +381,32 @@ const NewService = Form.create()(
                 color = "#f50";
               }
               return (
-                <Tag
-                  color={color}
-                  style={{ display: text == 0 ? "none" : "inline-block" }}
-                >
-                  {str}
-                </Tag>
+                <span>
+                  <Tag
+                    color={color}
+                    style={{ display: text == 0 ? "none" : "inline-block" }}
+                  >
+                    {str}
+                  </Tag>
+                  {record.splitStatus == 1 ? (
+                    <Tag
+                      color="#108ee9"
+                    >
+                      父项目
+                    </Tag>
+                  ) : (
+                    ""
+                  )}
+                  {record.splitStatus == 2 ? (
+                    <Tag
+                      color="#108ee9"
+                    >
+                      子项目
+                    </Tag>
+                  ) : (
+                    ""
+                  )}
+                </span>
               );
             }
           },
@@ -425,7 +457,7 @@ const NewService = Form.create()(
               if (this.props.isZxs) {
                 return <span>***</span>;
               } else {
-                return <span>{text}</span>
+                return <span>{text}</span>;
               }
             }
           },
@@ -548,11 +580,11 @@ const NewService = Form.create()(
                   return (
                     <span>
                       {text}(比例:{record.appropriationRatio})
-                  </span>
+                    </span>
                   );
                 } else {
                   if (this.props.isZxs) {
-                    return <span>***</span>
+                    return <span>***</span>;
                   }
                   return <span>{text}</span>;
                 }
@@ -615,7 +647,7 @@ const NewService = Form.create()(
                     this.setState({ contactList: this.state.contactList });
                   }}
                 >
-                  {jiedian.map(function (item) {
+                  {jiedian.map(function(item) {
                     return (
                       <Select.Option key={item.value}>{item.key}</Select.Option>
                     );
@@ -686,10 +718,10 @@ const NewService = Form.create()(
                   {record.id ? (
                     ""
                   ) : (
-                      <Button type="primary" onClick={this.contactSave}>
-                        保存
+                    <Button type="primary" onClick={this.contactSave}>
+                      保存
                     </Button>
-                    )}
+                  )}
                 </div>
               );
             }
@@ -1022,8 +1054,8 @@ const NewService = Form.create()(
                       </Button>
                     </Popconfirm>
                   ) : (
-                      ""
-                    )}
+                    ""
+                  )}
                   {record.isSave ? (
                     <Button
                       type="primary"
@@ -1034,8 +1066,8 @@ const NewService = Form.create()(
                       保存
                     </Button>
                   ) : (
-                      ""
-                    )}
+                    ""
+                  )}
                 </div>
               );
             }
@@ -1402,8 +1434,8 @@ const NewService = Form.create()(
                       保存
                     </Button>
                   ) : (
-                      ""
-                    )}
+                    ""
+                  )}
                 </div>
               );
             }

+ 50 - 3
js/component/manageCenter/order/orderNew/addorders.js

@@ -12,7 +12,8 @@ import {
   Popconfirm,
   AutoComplete,
   DatePicker,
-  Col
+  Col,
+  Tag
 } from "antd";
 import $ from "jquery/src/ajax";
 import "../userMangagement.less";
@@ -31,6 +32,7 @@ import {
   getProjectStatus
 } from "../../../tools.js";
 import PicturesWall from "./changeComponent/picturesWall.js";
+import ResolutionDetail from "@/resolutionDetail";
 
 const Addorders = Form.create()(
   React.createClass({
@@ -71,7 +73,8 @@ const Addorders = Form.create()(
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
                 projectStatus: thisdata.projectStatus, //项目状态
-                sort: thisdata.cSort
+                sort: thisdata.cSort,
+                splitStatus: thisdata.splitStatus
               });
             }
           }
@@ -137,6 +140,7 @@ const Addorders = Form.create()(
       return {
         loading: false,
         visible: false,
+        resVisible: false,
         orgCodeUrl: [],
         voucherUrl: [],
         customerArr: [],
@@ -169,7 +173,27 @@ const Addorders = Form.create()(
           {
             title: "项目数量",
             dataIndex: "commodityQuantity",
-            key: "commodityQuantity"
+            key: "commodityQuantity",
+            render: (text, record) => {
+              if (record.splitStatus == 1) {
+                return (
+                  <span>
+                    {text}{" "}
+                    <Tag
+                      color="#108ee9"
+                      onClick={e => {
+                        e.stopPropagation();
+                        this.showRes(record);
+                      }}
+                    >
+                      已拆
+                    </Tag>
+                  </span>
+                );
+              } else {
+                return text;
+              }
+            }
           },
           {
             title: "金额(万元)",
@@ -750,6 +774,19 @@ const Addorders = Form.create()(
       );
     },
 
+    // 拆分详细
+    showRes(record) {
+      this.setState({
+        resVisible: true,
+        resRecord: record
+      });
+    },
+    resCancel() {
+      this.setState({
+        resVisible: false
+      });
+    },
+
     //新建订单、编辑订单保存
     handleSubmit() {
       let theorgCodeUrl = [];
@@ -1947,6 +1984,16 @@ const Addorders = Form.create()(
 
       return (
         <div>
+          {this.state.resVisible ? (
+            <ResolutionDetail
+              cancel={this.resCancel}
+              detail={this.state.resRecord}
+              visible={this.state.resVisible}
+              id={this.state.resRecord.orderNo}
+            />
+          ) : (
+            ""
+          )}
           <Spin spinning={this.state.loading}>
             <div className="clearfix">
               <FormItem

+ 134 - 13
js/component/manageCenter/order/orderNew/changeComponent/changeApply.js

@@ -14,6 +14,7 @@ import {
   AutoComplete
 } from "antd";
 import $ from "jquery/src/ajax";
+import ResolutionDetail from "@/resolutionDetail";
 import PicturesWall from "./picturesWall";
 import Rizhi from "./rizhi";
 import {
@@ -403,12 +404,13 @@ class ChangeApply extends Component {
           }
         }
       ],
+      resVisible: false,
       proColumns: [
         {
           title: "变更状态",
           dataIndex: "type",
           key: "type",
-          render: text => {
+          render: (text, record) => {
             let str = "";
             let color = "";
             if (text == 1) {
@@ -422,12 +424,40 @@ class ChangeApply extends Component {
               color = "#f50";
             }
             return (
-              <Tag
-                color={color}
-                style={{ display: text == 0 ? "none" : "inline-block" }}
-              >
-                {str}
-              </Tag>
+              <span>
+                <Tag
+                  color={color}
+                  style={{ display: text == 0 ? "none" : "inline-block" }}
+                >
+                  {str}
+                </Tag>
+                {record.splitStatus == 1 ? (
+                  <Tag
+                    color="#108ee9"
+                    // onClick={e => {
+                    //   e.stopPropagation();
+                    //   this.showRes(record);
+                    // }}
+                  >
+                    父项目
+                  </Tag>
+                ) : (
+                  ""
+                )}
+                {record.splitStatus == 2 ? (
+                  <Tag
+                    color="#108ee9"
+                    // onClick={e => {
+                    //   e.stopPropagation();
+                    //   this.showRes(record);
+                    // }}
+                  >
+                    子项目
+                  </Tag>
+                ) : (
+                  ""
+                )}
+              </span>
             );
           }
         },
@@ -514,6 +544,8 @@ class ChangeApply extends Component {
     this.selectAuto = this.selectAuto.bind(this);
     this.supervisor = this.supervisor.bind(this);
     this.httpChange = this.httpChange.bind(this);
+    this.showRes = this.showRes.bind(this);
+    this.resCancel = this.resCancel.bind(this);
   }
 
   componentDidMount() {
@@ -718,6 +750,19 @@ class ChangeApply extends Component {
   //   });
   // }
 
+   // 拆分详细
+  showRes(record) {
+    this.setState({
+      resVisible: true,
+      resRecord: record
+    })
+  }
+  resCancel() {
+    this.setState({
+      resVisible: false
+    })
+  }
+
   cuiList(id) {
     $.ajax({
       method: "get",
@@ -1218,8 +1263,74 @@ class ChangeApply extends Component {
       }.bind(this)
     );
   }
+  componentWillMount() {
+    this.departmentList();
+    console.log(this.props.orderData);
+
+    this.state.data = this.props.orderData;
+    this.state.data.oldPrice = this.props.orderData.totalAmount;
+    this.setState({
+      data: this.state.data,
+      voucherUrl: this.props.voucherUrl
+    });
+
+    this.proList();
+    this.cuiList();
+    let e = this.props.orderData.type;
+    if (e == 1) {
+      this.setState({
+        hetongFlag: false,
+        listFlag: false,
+        listCuiFlag: false,
+        tuiKuanFlag: false,
+        displayList: false
+      });
+    } else if (e == 2) {
+      this.setState({
+        hetongFlag: true,
+        listFlag: false,
+        listCuiFlag: false,
+        tuiKuanFlag: true,
+        displayList: false
+      });
+    } else if (e == 3) {
+      this.setState({
+        listFlag: false,
+        hetongFlag: false,
+        listCuiFlag: false,
+        tuiKuanFlag: false,
+        displayList: true
+      });
+    } else if (e == 4) {
+      this.setState({
+        listFlag: false,
+        listCuiFlag: false,
+        hetongFlag: false,
+        tuiKuanFlag: true,
+        displayList: false
+      });
+    } else if (e == 5) {
+      this.setState({
+        listFlag: false,
+        listCuiFlag: false,
+        hetongFlag: true,
+        tuiKuanFlag: true,
+        displayList: false
+      });
+    } else {
+      this.setState({
+        listFlag: true,
+        hetongFlag: true,
+        listCuiFlag: true,
+        tuiKuanFlag: false,
+        displayList: false
+      });
+    }
+  }
   componentWillReceiveProps(nextProps) {
-    // if (this.state.data.id != nextProps.orderData.id) {
+      console.log(nextProps.orderData);
+      
+      
     this.state.data = nextProps.orderData;
     this.state.data.oldPrice = nextProps.orderData.totalAmount;
     this.setState({
@@ -1282,9 +1393,9 @@ class ChangeApply extends Component {
     // }
   }
 
-  componentWillMount() {
-    this.departmentList();
-  }
+  // componentWillMount() {
+  //   this.departmentList();
+  // }
 
   render() {
     const { TextArea } = Input;
@@ -1306,6 +1417,16 @@ class ChangeApply extends Component {
       ));
     return (
       <div>
+        {this.state.resVisible ? (
+          <ResolutionDetail
+            cancel={this.resCancel}
+            detail={this.state.resRecord}
+            visible={this.state.resVisible}
+            id={this.state.resRecord.orderNo}
+          />
+        ) : (
+          ""
+        )}
         <div className="clearfix">
           <FormItem className="half-item" {...formItemLayout} label="客户名称">
             <span>{data.userName}</span>
@@ -1765,7 +1886,7 @@ class ChangeApply extends Component {
         >
           <Form
             layout="horizontal"
-          // id="demand-form"
+            // id="demand-form"
           >
             {/* <Spin spinning={this.state.loading}> */}
             <div className="clearfix">
@@ -1837,7 +1958,7 @@ class ChangeApply extends Component {
                     this.setState({ main: e });
                   }}
                 >
-                  {boutique.map(function (item) {
+                  {boutique.map(function(item) {
                     return (
                       <Select.Option key={item.value}>{item.key}</Select.Option>
                     );

+ 10 - 0
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzy.js

@@ -737,6 +737,10 @@ class ChangeDetail extends Component {
 
   // 完成订单
   finish() {
+    // this.props.onCancel()
+    this.setState({
+      loading: true
+    })
     $.ajax({
       url: globalConfig.context + "/api/admin/orderChange/completeOrderChange",
       method: "get",
@@ -749,9 +753,15 @@ class ChangeDetail extends Component {
         if (data.data && data.data.length) {
           message.success("保存成功!");
           // window.location.reload();
+          this.setState({
+            loading: false
+          })
           this.props.onCancel()
         } else if (data.error && data.error.length) {
           message.warning(data.error[0].message)
+          this.setState({
+            loading: false
+          });
         }
       }
     });

+ 66 - 22
js/component/manageCenter/order/orderNew/changeComponent/proAndCuiList.jsx

@@ -12,17 +12,19 @@ import {
 } from "antd";
 import $ from "jquery/src/ajax";
 import {getProjectStatus } from "@/tools.js"
+import ResolutionDetail from "@/resolutionDetail";
 
 
 const ProAndCuiList = React.createClass({
   getInitialState() {
     return {
+      resVisible: false,
       columns: [
         {
           title: "变更状态",
           dataIndex: "type",
           key: "type",
-          render: text => {
+          render: (text, record) => {
             let str = "";
             let color = "";
             if (text == 1) {
@@ -36,12 +38,32 @@ const ProAndCuiList = React.createClass({
               color = "#f50";
             }
             return (
-              <Tag
-                color={color}
-                style={{ display: text == 0 ? "none" : "inline-block" }}
-              >
-                {str}
-              </Tag>
+              <span>
+                <Tag
+                  color={color}
+                  style={{ display: text == 0 ? "none" : "inline-block" }}
+                >
+                  {str}
+                </Tag>
+                {record.splitStatus == 1 ? (
+                  <Tag
+                    color="#108ee9"
+                  >
+                    父项目
+                  </Tag>
+                ) : (
+                  ""
+                )}
+                {record.splitStatus == 2 ? (
+                  <Tag
+                    color="#108ee9"
+                  >
+                    子项目
+                  </Tag>
+                ) : (
+                  ""
+                )}
+              </span>
             );
           }
         },
@@ -91,8 +113,8 @@ const ProAndCuiList = React.createClass({
           render: text => {
             if (this.props.isZxs) {
               return <span>***</span>;
-            }else {
-              return <span>{text}</span>
+            } else {
+              return <span>{text}</span>;
             }
           }
         },
@@ -118,7 +140,7 @@ const ProAndCuiList = React.createClass({
           title: "变更状态",
           dataIndex: "type",
           key: "type",
-          render: text => {
+          render: (text, record) => {
             let str = "";
             let color = "";
             if (text == 1) {
@@ -132,12 +154,14 @@ const ProAndCuiList = React.createClass({
               color = "#f50";
             }
             return (
-              <Tag
-                color={color}
-                style={{ display: text == 0 ? "none" : "inline-block" }}
-              >
-                {str}
-              </Tag>
+              <span>
+                <Tag
+                  color={color}
+                  style={{ display: text == 0 ? "none" : "inline-block" }}
+                >
+                  {str}
+                </Tag>
+              </span>
             );
           }
         },
@@ -218,8 +242,8 @@ const ProAndCuiList = React.createClass({
                   </span>
                 );
               } else {
-                if(this.props.isZxs) {
-                  return <span>***</span>
+                if (this.props.isZxs) {
+                  return <span>***</span>;
                 }
                 return <span>{text}</span>;
               }
@@ -258,6 +282,19 @@ const ProAndCuiList = React.createClass({
     this.proList();
   },
 
+  // 拆分详细
+  showRes(record) {
+    this.setState({
+      resVisible: true,
+      resRecord: record
+    });
+  },
+  resCancel() {
+    this.setState({
+      resVisible: false
+    });
+  },
+
   cuiList(id) {
     $.ajax({
       method: "get",
@@ -305,12 +342,19 @@ const ProAndCuiList = React.createClass({
     return (
       <div
         style={{
-          display:
-            proArr && proArr.length
-              ? "block"
-              : "none"
+          display: proArr && proArr.length ? "block" : "none"
         }}
       >
+        {this.state.resVisible ? (
+          <ResolutionDetail
+            cancel={this.resCancel}
+            detail={this.state.resRecord}
+            visible={this.state.resVisible}
+            id={this.state.resRecord.orderNo}
+          />
+        ) : (
+          ""
+        )}
         <div>
           <span style={{ marginLeft: "50px", fontSize: "20px" }}>项目业务</span>
           <span style={{ color: "red" }}>

+ 7 - 0
js/component/manageCenter/order/orderNew/contractYxy.js

@@ -883,6 +883,8 @@ const contractChange = Form.create()(
     },
 
     callback(key) {
+      console.log("key",key);
+      
       this.setState(
         {
           activeKey: key
@@ -890,9 +892,13 @@ const contractChange = Form.create()(
         () => {
 
           if (key != "a" && key != "c" && key.length < 10) {
+            console.log("执行前");
+            
             this.ChangeDetail(key);
             this.loadDataChange(key);
           } else if (key != "a" && key != "c" && key.length > 10) {
+            console.log("执行");
+            
             this.primaryOrder(key);
             this.ChangeDetail(key);
             this.xiangmu(key);
@@ -1233,6 +1239,7 @@ const contractChange = Form.create()(
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
                       {this.state.contractData.processState === 0 ? (
                         <ChangeApply
+                          id={Math.random()}
                           orderData={this.state.contractData}
                           voucherUrl={this.state.voucherUrl}
                           onCancel={this.visitCancel}

+ 5 - 2
js/component/manageCenter/project/project/outsourceTaskAssignment.jsx

@@ -555,8 +555,11 @@ const OutsourceTaskAssignment = React.createClass({
         columns = [
           {
             title: "任务编号",
-            dataIndex: "id",
-            key: "id"
+            dataIndex: "splitSuper",
+            key: "splitSuper",
+            render: (text, record) => {
+              return text + "-" + record.splitId;
+            }
           },
           {
             title: "任务名称",

+ 7 - 2
js/component/manageCenter/project/task/taskAssignment.jsx

@@ -552,8 +552,13 @@ const Task = React.createClass({
       columns = [
         {
           title: "任务编号",
-          dataIndex: "id",
-          key: "id"
+          dataIndex: "splitSuper",
+          key: "splitSuper",
+          render: (text, record) => {
+            return (
+              text + "-" + record.splitId
+            )
+          }
         },
         {
           title: "任务名称",

+ 254 - 152
js/component/manageCenter/set/userManagementS/user.jsx

@@ -735,161 +735,263 @@ const User = Form.create()(React.createClass({
 		const { RangePicker } = DatePicker;
 		let departmentArr = this.state.departmentArr || [];
 		let roleArr = this.state.roleArr || [];
-		return(
-			<div className="user-content" >
-				<div className="content-title">
-					<Tabs
-						defaultActiveKey="1"
-						onChange={this.callback}
-						className="test">
-						<TabPane tab="搜索" key="1">
-	                <div className="user-search">
-	                    <Input placeholder="用户姓名" style={{width:'150px'}}
-	                        value={this.state.userNameSearch}
-	                        onChange={(e) => { this.setState({ userNameSearch: e.target.value }); }} />
-	                    {window.adminData.isSuperAdmin?<Select placeholder="部门"
-                            style={{ width: 160 }}
-                            value={this.state.organizationSearch}
-                            onChange={(e) => { this.setState({ organizationSearch: e }) }}>
-                            {
-                                departmentArr.map(function (item) {
-                                        return <Select.Option key={item.id} >{item.name}</Select.Option>
-                                })
-                            }
-                        </Select>:''}
-                        <Select placeholder="角色"
-                            style={{ width: 160 }}
-                            value={this.state.rolesSearch}
-                            onChange={(e) => { this.setState({ rolesSearch: e }) }}>
-                            {
-                                roleArr.map(function (item) {
-                                        return <Select.Option key={item.id} >{item.roleName}</Select.Option>
-                                })
-                            }
-                        </Select>    
-	                    <Button type="primary" onClick={this.search}>搜索</Button>
-	                    <Button onClick={this.reset}>重置</Button>
-	                    <Button style={{ background: "red", border: "none", color: "#fff" }}
-	                        disabled={!hasSelected}
-							onClick={this.delectRow} style={{display:"none"}}>删除<Icon type="minus" />
-						</Button>
+		return (
+      <div className="user-content">
+        <div className="content-title">
+          <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
+            <TabPane tab="搜索" key="1">
+              <div className="user-search">
+                <Input
+                  placeholder="用户姓名"
+                  style={{ width: "150px" }}
+                  value={this.state.userNameSearch}
+                  onChange={e => {
+                    this.setState({ userNameSearch: e.target.value });
+                  }}
+                />
+                {window.adminData.isSuperAdmin ? (
+                  <Select
+                    placeholder="部门"
+                    style={{ width: 160 }}
+                    value={this.state.organizationSearch}
+                    onChange={e => {
+                      this.setState({ organizationSearch: e });
+                    }}
+                  >
+                    {departmentArr.map(function(item) {
+                      return (
+                        <Select.Option key={item.id}>{item.name}</Select.Option>
+                      );
+                    })}
+                  </Select>
+                ) : (
+                  ""
+                )}
+                <Select
+                  placeholder="角色"
+                  style={{ width: 160 }}
+                  value={this.state.rolesSearch}
+                  onChange={e => {
+                    this.setState({ rolesSearch: e });
+                  }}
+                >
+                  {roleArr.map(function(item) {
+                    return (
+                      <Select.Option key={item.id}>
+                        {item.roleName}
+                      </Select.Option>
+                    );
+                  })}
+                </Select>
+                <div
+                  className="search-more"
+                  style={{ display: "inline-block" }}
+                >
+                  <Select
+                    placeholder="职务"
+                    style={{ width: 160 }}
+                    value={this.state.postSearch}
+                    onChange={e => {
+                      this.setState({ postSearch: e });
+                    }}
+                  >
+                    {post.map(function(item) {
+                      return (
+                        <Select.Option key={item.value}>
+                          {item.key}
+                        </Select.Option>
+                      );
+                    })}
+                  </Select>
+                  <Select
+                    placeholder="岗位"
+                    style={{ width: 160 }}
+                    value={this.state.stationSearch}
+                    onChange={e => {
+                      this.setState({ stationSearch: e });
+                    }}
+                  >
+                    {station.map(function(item) {
+                      return (
+                        <Select.Option key={item.value}>
+                          {item.key}
+                        </Select.Option>
+                      );
+                    })}
+                  </Select>
+                  <Select
+                    placeholder="状态"
+                    style={{ width: 160 }}
+                    value={this.state.statusSeach}
+                    onChange={e => {
+                      this.setState({ statusSeach: e });
+                    }}
+                  >
+                    <Select.Option value="正常">正常</Select.Option>
+                    <Select.Option value="锁定">锁定</Select.Option>
+                    <Select.Option value="注销">注销</Select.Option>
+                  </Select>
+                  <Input
+                    placeholder="登录用户名"
+                    style={{ width: "150px" }}
+                    value={this.state.signNameSearch}
+                    onChange={e => {
+                      this.setState({ signNameSearch: e.target.value });
+                    }}
+                  />
 
-	                    
-	                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
+                  <AutoComplete
+                    className="certain-category-search"
+                    dropdownClassName="certain-category-search-dropdown"
+                    dropdownMatchSelectWidth={false}
+                    dropdownStyle={{ width: 200 }}
+                    size="large"
+                    style={{
+                      width: "150px",
+                      height: "28px",
+                      marginLeft: "10px"
+                    }}
+                    dataSource={options}
+                    placeholder="输入上级主管名字"
+                    value={this.state.auto}
+                    onChange={this.httpChange}
+                    filterOption={true}
+                    onBlur={this.blurChange}
+                    onSelect={this.selectAuto}
+                  >
+                    <Input />
+                  </AutoComplete>
+                </div>
+                <Button type="primary" onClick={this.search}>
+                  搜索
+                </Button>
+                <Button onClick={this.reset}>重置</Button>
+                <Button
+                  style={{ background: "red", border: "none", color: "#fff" }}
+                  disabled={!hasSelected}
+                  onClick={this.delectRow}
+                  style={{ display: "none" }}
+                >
+                  删除
+                  <Icon type="minus" />
+                </Button>
 
-	                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
-	                    	<Select placeholder="职务"
-	                            style={{ width: 160 }}
-	                            value={this.state.postSearch}
-	                            onChange={(e) => { this.setState({ postSearch: e }) }}>
-	                            {
-                                    post.map(function (item) {
-                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                    })
-                                }
-                            </Select>
-                            <Select placeholder="岗位"
-	                            style={{ width: 160 }}
-	                            value={this.state.stationSearch}
-	                            onChange={(e) => { this.setState({ stationSearch: e }) }}>
-	                             {
-                                    station.map(function (item) {
-                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                    })
-                                }
-                       		</Select>
-                       		<Select placeholder="状态"
-	                            style={{ width: 160 }}
-	                            value={this.state.statusSeach}
-	                            onChange={(e) => { this.setState({ statusSeach: e }) }}>
-	                            <Select.Option value="正常" >正常</Select.Option>
-   								<Select.Option value="锁定" >锁定</Select.Option>
-                       		</Select>
-                       		<Input placeholder="登录用户名" style={{width:'150px'}}
-		                        value={this.state.signNameSearch}
-		                        onChange={(e) => { this.setState({ signNameSearch: e.target.value }); }} />
-	                        
-	                        <AutoComplete
-						        className="certain-category-search"
-						        dropdownClassName="certain-category-search-dropdown"
-						        dropdownMatchSelectWidth={false}
-						        dropdownStyle={{ width: 200 }}
-						        size="large"
-						        style={{ width: '150px',height:'28px' ,marginLeft:'10px'}}
-						        dataSource={options}
-						        placeholder="输入上级主管名字"
-						        value={this.state.auto}
-						        onChange={this.httpChange}
-						        filterOption={true}
-						        onBlur={this.blurChange}
-						        onSelect={this.selectAuto}
-						      >
-						        <Input/>
-						      </AutoComplete> 
-	                    </div>
-	                </div>
-				   
-					</TabPane>
-					<TabPane tab="锁定/激活" key="2">
-					<Button style={{ background: "#333333", border: "none", color: "#fff" ,marginLeft:10,marginBottom:10,marginRight:10}}
-						disabled={!hasSelected}
-						onClick={this.locking}>锁定<Icon type="lock" /></Button>
-					<Button style={{ background: "green", border: "none", color: "#fff" }}
-						disabled={!hasSelected}
-						onClick={this.activation}>激活<Icon type="unlock" /></Button>
-					 </TabPane>
-					 <TabPane tab="新增" key="3">
-							<Button type="primary" className="addButton" style={{float:"left",marginBottom:10,marginLeft:10}} onClick={this.addClick} >新增用户<Icon type="user" /></Button>
-					 </TabPane>
-					 <TabPane tab="离职转交" key="4">
-							<Button type="primary" className="addButton" style={{ float: "left", marginBottom: 10, marginLeft: 10 }} onClick={this.resources} disabled={!hasSelected} >离职一键转交<Icon type="user" /></Button>
-					 </TabPane>
+                {/* <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span> */}
+              </div>
+            </TabPane>
+            <TabPane tab="操作" key="2">
+              <Button
+                style={{
+                  background: "#333333",
+                  border: "none",
+                  color: "#fff",
+				  marginBottom: 10,
+				  marginTop: 12,
+                  marginRight: 10
+                }}
+                disabled={!hasSelected}
+                onClick={this.locking}
+              >
+                锁定
+                <Icon type="lock" />
+              </Button>
+              <Button
+                style={{ background: "green", border: "none", color: "#fff", marginTop: 12 }}
+                disabled={!hasSelected}
+                onClick={this.activation}
+              >
+                激活
+                <Icon type="unlock" />
+              </Button>
+              {/* </TabPane>
+					 <TabPane tab="新增" key="3"> */}
+              <Button
+                type="primary"
+                className="addButton"
+                style={{ float: "left", marginBottom: 10, marginTop: 12 }}
+                onClick={this.addClick}
+              >
+                新增用户
+                <Icon type="user" />
+              </Button>
+              {/* </TabPane>
+					 <TabPane tab="离职转交" key="4"> */}
+              <Button
+                type="primary"
+                className="addButton"
+                style={{ float: "left", marginBottom: 10, marginTop: 12 }}
+                onClick={this.resources}
+                disabled={!hasSelected}
+              >
+                离职一键转交
+                <Icon type="user" />
+              </Button>
+            </TabPane>
+          </Tabs>
+          <div className="patent-table">
+            <Spin spinning={this.state.loading}>
+              <Table
+                columns={this.state.columns}
+                dataSource={this.state.dataSource}
+                rowSelection={rowSelection}
+                pagination={this.state.pagination}
+                onRowClick={this.tableRowClick}
+              />
+            </Spin>
+          </div>
+          <Newuser
+            role={this.state.role}
+            addId={this.state.addId}
+            roleArr={this.state.roleArr}
+            departmentArr={this.state.departmentArr}
+            userDetaile={this.state.userDetaile}
+            datauser={this.state.datauser}
+            showDesc={this.state.showDesc}
+            closeDesc={this.closeDesc}
+          />
+          <div className="patent-desc">
+            <Modal
+              maskClosable={false}
+              visible={this.state.visible}
+              onOk={this.checkResources}
+              onCancel={this.handleCancel}
+              width="800px"
+              title="离职一键转交"
+              footer=""
+              className="admin-desc-content"
+            >
+              <Input
+                placeholder="用户姓名"
+                style={{
+                  width: "150px",
+                  marginRight: "10px",
+                  marginBottom: "10px"
+                }}
+                value={this.state.userNameSearchs}
+                onChange={e => {
+                  this.setState({ userNameSearchs: e.target.value });
+                }}
+              />
+              <Button type="primary" onClick={this.searchs}>
+                搜索
+              </Button>
+              <Button onClick={this.resets}>重置</Button>
 
-					</Tabs>
-					<div className="patent-table">
-	                    <Spin spinning={this.state.loading}>
-	                        <Table columns={this.state.columns}
-	                            dataSource={this.state.dataSource}
-	                            rowSelection={rowSelection}
-	                            pagination={this.state.pagination}
-	                            onRowClick={this.tableRowClick} />
-	                    </Spin>
-	                </div>
-	                <Newuser
-	                    role={this.state.role}
-	                    addId={this.state.addId}
-	                    roleArr={this.state.roleArr}
-	                    departmentArr={this.state.departmentArr}
-	                    userDetaile={this.state.userDetaile}
-	                    datauser={this.state.datauser}
-	                    showDesc={this.state.showDesc}
-	                    closeDesc={this.closeDesc} />
-	            	<div className="patent-desc">
-	                    <Modal maskClosable={false} visible={this.state.visible}
-	                        onOk={this.checkResources} onCancel={this.handleCancel}
-	                        width='800px'
-	                        title='离职一键转交'                       
-	                        footer=''
-	                        className="admin-desc-content">
-		                    <Input placeholder="用户姓名" style={{width:'150px',marginRight:"10px",marginBottom:"10px"}}
-		                        value={this.state.userNameSearchs}
-		                        onChange={(e) => { this.setState({ userNameSearchs: e.target.value }); }} />
-		                    <Button type="primary" onClick={this.searchs}>搜索</Button> 
-		                    <Button onClick={this.resets}>重置</Button>
-							
-							<div className="patent-table">
-			                    <Spin spinning={this.state.loading}>
-			                        <Table columns={this.state.column}
-			                            dataSource={this.state.dataSourceData}
-			                            pagination={this.state.paginations}
-			                            onRowClick={this.tableRowClick} />
-			                    </Spin>
-			                </div>
-	                    </Modal>
-	            	 </div>
-	            </div >
-            </div>
-		);
+              <div className="patent-table">
+                <Spin spinning={this.state.loading}>
+                  <Table
+                    columns={this.state.column}
+                    dataSource={this.state.dataSourceData}
+                    pagination={this.state.paginations}
+                    onRowClick={this.tableRowClick}
+                  />
+                </Spin>
+              </div>
+            </Modal>
+          </div>
+        </div>
+      </div>
+    );
 	}
 }));
 

+ 6 - 3
js/component/manageCenter/set/userManagementS/userMangagement.less

@@ -7,7 +7,7 @@
         overflow: hidden;
     }
     .user-search {
-        margin-bottom: 10px;
+        // margin-bottom: 10px;
         > input {
             width: 140px;
         }
@@ -15,7 +15,7 @@
         .ant-select,
         > input {
             margin-right: 10px;
-            margin-top: 10px;
+            // margin-top: 10px;
         }
         .ant-switch {
             margin-left: 10px;
@@ -29,9 +29,12 @@
     }
     .addButton {
         float: right;
-        margin-right: 50px!important;
+        margin-right: 10px!important;
     }
 }
+.ant-tabs-bar {
+    margin-bottom: 0px;
+}
 .half-item {
     float: left;
     width: 50%;

+ 140 - 78
js/component/project.jsx

@@ -1,6 +1,6 @@
 import React from "react";
 import $ from "jquery";
-import { Spin, Button, Tabs, Table, message, Modal, Form, Upload, } from "antd";
+import { Spin, Button, Tabs, Table, message, Modal, Form, Upload, Tag } from "antd";
 import {
   getProcessStatus,
   getApproval,
@@ -14,6 +14,7 @@ import {
   getRefundStatus
 } from "@/tools";
 const FormItem = Form.Item;
+import ResolutionDetail from "@/resolutionDetail";
 const { TabPane } = Tabs
 const project = React.createClass({
   getInitialState() {
@@ -35,7 +36,27 @@ const project = React.createClass({
         {
           title: "项目数量",
           dataIndex: "commodityQuantity",
-          key: "commodityQuantity"
+          key: "commodityQuantity",
+          render: (text, record) => {
+            if (record.splitStatus == 1) {
+              return (
+                <span>
+                  {text}{" "}
+                  <Tag
+                    color="#108ee9"
+                    onClick={e => {
+                      e.stopPropagation();
+                      this.showRes(record);
+                    }}
+                  >
+                    已拆
+                  </Tag>
+                </span>
+              );
+            } else {
+              return text;
+            }
+          }
         },
         {
           title: "金额(万元)",
@@ -71,22 +92,25 @@ const project = React.createClass({
       ],
       columnsA: [
         {
-          title: '流程',
-          dataIndex: 'content',
-          key: 'content',
-          align: 'center'
-        }, {
-          title: '操作人',
-          dataIndex: 'aName',
-          key: 'aName',
-          align: 'center'
-        }, {
-          title: '时间',
-          dataIndex: 'createTimes',
-          key: 'createTimes',
-          align: 'center'
+          title: "流程",
+          dataIndex: "content",
+          key: "content",
+          align: "center"
+        },
+        {
+          title: "操作人",
+          dataIndex: "aName",
+          key: "aName",
+          align: "center"
+        },
+        {
+          title: "时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+          align: "center"
         }
       ],
+      resVisible: false,
       companyColumns: [
         {
           title: "公司",
@@ -114,17 +138,17 @@ const project = React.createClass({
             return test[0] === null
               ? ""
               : getprovince(test[0]) +
-              "/" +
-              getprovince(test[1]) +
-              "/" +
-              getprovince(test[2]);
+                  "/" +
+                  getprovince(test[1]) +
+                  "/" +
+                  getprovince(test[2]);
           }
         },
         {
           title: "详细地址",
           dataIndex: "address",
           key: "address"
-        },
+        }
       ]
     };
   },
@@ -153,11 +177,25 @@ const project = React.createClass({
   //   //   });
   //   // },)
   // },
-  componentDidMount() { },
+
+  // 拆分详细
+  showRes(record) {
+    this.setState({
+      resVisible: true,
+      resRecord: record
+    });
+  },
+  resCancel() {
+    this.setState({
+      resVisible: false
+    });
+  },
+
+  componentDidMount() {},
   xiangqing(id) {
     this.setState({
       loading: true
-    })
+    });
     $.ajax({
       method: "get",
       dataType: "json",
@@ -166,7 +204,7 @@ const project = React.createClass({
       data: {
         id: id
       },
-      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);
@@ -186,10 +224,10 @@ const project = React.createClass({
             taskComment: thisdata.taskComment, //说明
             attachmentUrl: thisdata.attachmentUrl
               ? splitUrl(
-                thisdata.attachmentUrl,
-                ",",
-                globalConfig.avatarHost + "/upload"
-              )
+                  thisdata.attachmentUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
               : [], //图片地址
             salesmanName: thisdata.salesmanName, //订单负责人
             startDate: thisdata.startDate, //启动日期
@@ -219,7 +257,7 @@ const project = React.createClass({
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -230,7 +268,7 @@ const project = React.createClass({
   xiangqings(orderNos) {
     this.setState({
       loading: true
-    })
+    });
     $.ajax({
       method: "get",
       dataType: "json",
@@ -239,7 +277,7 @@ const project = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function (data) {
+      success: function(data) {
         let thisdata = data.data;
         let ProvinceCityArr = [];
         let ProvinceS = thisdata.locationProvince; //省
@@ -275,7 +313,7 @@ const project = React.createClass({
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -286,7 +324,7 @@ const project = React.createClass({
   loaduserss(record) {
     this.setState({
       loading: true
-    })
+    });
     $.ajax({
       method: "get",
       dataType: "json",
@@ -295,7 +333,7 @@ const project = React.createClass({
       data: {
         tid: record.id
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         let thisData = [];
         if (!thisData) {
@@ -322,7 +360,7 @@ const project = React.createClass({
         }
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -333,7 +371,7 @@ const project = React.createClass({
   xiangmu(orderNos) {
     this.setState({
       loading: true
-    })
+    });
     $.ajax({
       method: "get",
       dataType: "json",
@@ -342,7 +380,7 @@ const project = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
 
         if (data.error.length || data.data.list == "") {
@@ -365,7 +403,8 @@ const project = React.createClass({
               taskComment: thisdata.taskComment, //任务说明
               contacts: thisdata.contacts, //联系人
               contactsMobile: thisdata.contactsMobile, //联系人电话
-              taskStatus: thisdata.taskStatus //是否分配
+              taskStatus: thisdata.taskStatus, //是否分配
+              splitStatus: thisdata.splitStatus
             });
           }
         }
@@ -374,7 +413,7 @@ const project = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -397,7 +436,7 @@ const project = React.createClass({
   caozuorizhi() {
     this.setState({
       loading: true
-    })
+    });
     this.setState({
       visibleA: true
     });
@@ -409,7 +448,7 @@ const project = React.createClass({
       data: {
         id: this.state.id
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
 
         if (data.error.length || data.data.list == "") {
@@ -434,7 +473,7 @@ const project = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -450,18 +489,19 @@ const project = React.createClass({
     let url = window.location.href.substring(7);
     this.setState({
       loading: true
-    })
+    });
     $.ajax({
       method: "get",
       dataType: "json",
       crossDomain: false,
-      url: globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
+      url:
+        globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
       data: {
         tid: this.props.record.id,
-        orderNo: this.props.record.orderNo,
+        orderNo: this.props.record.orderNo
       }
     }).done(
-      function (data) {
+      function(data) {
         this.setState({
           loading: false
         });
@@ -477,22 +517,21 @@ const project = React.createClass({
             unitNumber: data.data.unitNumber,
             pictureUrl: data.data.pictureUrl
               ? splitUrl(
-                data.data.pictureUrl,
-                ",",
-                globalConfig.avatarHost + "/upload",
-                url
-              )
+                  data.data.pictureUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload",
+                  url
+                )
               : [], //图片地址
             createTimes: data.data.createTimes,
-            auditTimes: data.data.auditTimes,
-          })
-
+            auditTimes: data.data.auditTimes
+          });
         } else if (data.error && data.error.length) {
           message.warning(data.error[0].message);
         } else if (!data.data) {
           this.setState({
             refundStatus: undefined
-          })
+          });
         }
       }.bind(this)
     );
@@ -509,9 +548,9 @@ const project = React.createClass({
       url: globalConfig.context + "/api/admin/outsourceOrg/selectOutsourceOrg",
       data: {
         tid: this.props.record.id,
-        orderNo: this.props.record.orderNo,
+        orderNo: this.props.record.orderNo
       },
-      success: function (data) {
+      success: function(data) {
         let theArr = [];
         if (data.error.length || data.data.list == "") {
           if (data.error && data.error.length) {
@@ -542,7 +581,7 @@ const project = React.createClass({
         });
       }.bind(this)
     }).always(
-      function () {
+      function() {
         this.setState({
           loading: false
         });
@@ -551,9 +590,9 @@ const project = React.createClass({
   },
   tabChange(e) {
     if (e == 2) {
-      this.waiDetail()
+      this.waiDetail();
     } else if (e == 3) {
-      this.loadCompany()
+      this.loadCompany();
     }
   },
   render() {
@@ -562,7 +601,7 @@ const project = React.createClass({
       wrapperCol: { span: 14 }
     };
     const utils = {
-      getSatisfaction: function (num) {
+      getSatisfaction: function(num) {
         switch (num) {
           case 0:
             return "未收回";
@@ -572,7 +611,7 @@ const project = React.createClass({
             return "其它";
         }
       },
-      getChargeback: function (num) {
+      getChargeback: function(num) {
         switch (num) {
           case 0:
             return "已完成";
@@ -595,6 +634,16 @@ const project = React.createClass({
           this.props.cancel();
         }}
       >
+        {this.state.resVisible ? (
+          <ResolutionDetail
+            cancel={this.resCancel}
+            detail={this.state.resRecord}
+            visible={this.state.resVisible}
+            id={this.state.resRecord.orderNo}
+          />
+        ) : (
+          ""
+        )}
         <Tabs defaultActiveKey="1" onChange={this.tabChange}>
           <TabPane tab="项目概况" key="1">
             <Form
@@ -619,7 +668,7 @@ const project = React.createClass({
                         onClick={this.caozuorizhi}
                       >
                         操作日志
-                  </Button>
+                      </Button>
                     </FormItem>
                     <FormItem
                       className="half-item"
@@ -682,7 +731,9 @@ const project = React.createClass({
                       {...formItemLayout}
                       label="满意度表格"
                     >
-                      <span>{utils.getSatisfaction(this.state.formRetrieve)}</span>
+                      <span>
+                        {utils.getSatisfaction(this.state.formRetrieve)}
+                      </span>
                     </FormItem>
                     <FormItem
                       className="half-item"
@@ -769,8 +820,8 @@ const project = React.createClass({
                       </FormItem>
                     </div>
                   ) : (
-                      ""
-                    )}
+                    ""
+                  )}
                   {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
                   <div className="clearfix">
                     <h3 className="sub-title">联系信息</h3>
@@ -816,8 +867,8 @@ const project = React.createClass({
                     >
                       <span>
                         {getprovince(this.state.locationProvince)}/
-                    {getprovince(this.state.locationCity)}/
-                    {getprovince(this.state.locationArea)}
+                        {getprovince(this.state.locationCity)}/
+                        {getprovince(this.state.locationArea)}
                       </span>
                     </FormItem>
                     <FormItem
@@ -840,7 +891,10 @@ const project = React.createClass({
                       label="负责人"
                     >
                       <span>
-                        {this.state.salesmanName + "(" + this.state.depName + ")"}
+                        {this.state.salesmanName +
+                          "(" +
+                          this.state.depName +
+                          ")"}
                       </span>
                     </FormItem>
                     <FormItem
@@ -1138,7 +1192,12 @@ const project = React.createClass({
 
                 <div className="clearfix">
                   <hr className="division" />
-                  <div className="clearfix" style={{ display: this.state.refundStatus == 0 ? "none" : "block" }}>
+                  <div
+                    className="clearfix"
+                    style={{
+                      display: this.state.refundStatus == 0 ? "none" : "block"
+                    }}
+                  >
                     <FormItem
                       className="half-item"
                       {...formItemLayout}
@@ -1153,12 +1212,15 @@ const project = React.createClass({
                       {...formItemLayout}
                       label="审核结果"
                     >
-                      <span>
-                        {getRefundStatus(this.state.refundStatus)}
-                      </span>
+                      <span>{getRefundStatus(this.state.refundStatus)}</span>
                     </FormItem>
                   </div>
-                  <div className="clearfix" style={{ display: this.state.refundStatus == 0 ? "none" : "block" }}>
+                  <div
+                    className="clearfix"
+                    style={{
+                      display: this.state.refundStatus == 0 ? "none" : "block"
+                    }}
+                  >
                     <FormItem
                       className="half-item"
                       {...formItemLayout}
@@ -1171,8 +1233,8 @@ const project = React.createClass({
               </Spin>
             </TabPane>
           ) : (
-              ""
-            )}
+            ""
+          )}
           {this.props.record && this.props.record.outsource == 1 ? (
             <TabPane tab="外包公司信息" key="3">
               <div className="patent-table" style={{ marginTop: "10px" }}>
@@ -1192,8 +1254,8 @@ const project = React.createClass({
               </div>
             </TabPane>
           ) : (
-              ""
-            )}
+            ""
+          )}
         </Tabs>
         <Modal
           width="800px"