Browse Source

完成订单驳回修改催款节点

mentoswzq 5 years ago
parent
commit
1ada438d67

+ 3 - 2
js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx

@@ -1626,7 +1626,8 @@ const approvedOutsourcing = React.createClass({
       url: globalConfig.context + "/api/admin/financial/myBillList",
       data: {
         orderNo: this.state.selectedRowKeys[0],
-        pageSize: 9999
+        pageSize: 9999,
+        whoType: 1
       },
       success: function(data) {
         let theArr = [];
@@ -1705,7 +1706,7 @@ const approvedOutsourcing = React.createClass({
     window.location.href =
       globalConfig.context +
       "/api/admin/receivables/exportMyBill?" +
-      `orderNo=${this.state.selectedRowKeys}`;
+      `orderNo=${this.state.selectedRowKeys}&whoType=1`;
   },
   printAll() {
     this.setState({

+ 3 - 2
js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx

@@ -1625,7 +1625,8 @@ const approvedOutsourcing = React.createClass({
       url: globalConfig.context + "/api/admin/financial/myBillList",
       data: {
         orderNo: this.state.selectedRowKeys[0],
-        pageSize: 9999
+        pageSize: 9999,
+        whoType: 1
       },
       success: function(data) {
         let theArr = [];
@@ -1704,7 +1705,7 @@ const approvedOutsourcing = React.createClass({
     window.location.href =
       globalConfig.context +
       "/api/admin/receivables/exportMyBill?" +
-      `orderNo=${this.state.selectedRowKeys}`;
+      `orderNo=${this.state.selectedRowKeys}&whoType=1`;
   },
   printAll() {
     this.setState({

+ 3 - 2
js/component/manageCenter/financialManage/distribute/shouKuanAll.jsx

@@ -1041,7 +1041,8 @@ const ShouKuang = React.createClass({
       url: globalConfig.context + "/api/admin/financial/myBillList",
       data: {
         orderNo: this.state.selectedRowKeys[0],
-        pageSize: 9999
+        pageSize: 9999,
+        whoType: 1
       },
       success: function(data) {
         let theArr = [];
@@ -1114,7 +1115,7 @@ const ShouKuang = React.createClass({
     window.location.href =
       globalConfig.context +
       "/api/admin/receivables/exportMyBill?" +
-      `orderNo=${this.state.selectedRowKeys}`;
+      `orderNo=${this.state.selectedRowKeys}&whoType=1`;
   },
   printAll() {
     this.setState({

+ 6 - 3
js/component/manageCenter/financialManage/distribute/shouKuang.jsx

@@ -1055,7 +1055,8 @@ const ShouKuang = React.createClass({
       url: globalConfig.context + "/api/admin/financial/myBillList",
       data: {
         orderNo: this.state.selectedRowKeys[0],
-        pageSize: 9999
+        pageSize: 9999,
+        whoType: 1
       },
       success: function(data) {
         let theArr = [];
@@ -1128,7 +1129,7 @@ const ShouKuang = React.createClass({
     window.location.href =
       globalConfig.context +
       "/api/admin/receivables/exportMyBill?" +
-      `orderNo=${this.state.selectedRowKeys}`;
+      `orderNo=${this.state.selectedRowKeys}&whoType=1`;
   },
   printAll() {
     this.setState({
@@ -1229,6 +1230,7 @@ const ShouKuang = React.createClass({
       url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
       data: {
         orderNo: this.state.selectedRowKeys[0],
+        newStatus: 1,
         pageSize: 9999
       },
       success: function(data) {
@@ -1385,7 +1387,8 @@ const ShouKuang = React.createClass({
           message.success("通过成功!");
           this.loadData();
           this.setState({
-            checkVisible: false
+            checkVisible: false,
+            checkData: ""
           });
         }
       }.bind(this)

+ 5 - 1
js/component/manageCenter/financialManage/flowWater/departWater.jsx

@@ -207,8 +207,12 @@ const MyWater = React.createClass({
             payerName:this.state.payerNameSearch,
             startTime: this.state.releaseDate[0],
             endTime: this.state.releaseDate[1],
+            whoType: 1
         }
-        window.location.href=(globalConfig.context+'/api/admin/financial/exportBillData?'+$.param(data));
+        window.location.href =
+          globalConfig.context +
+          "/api/admin/receivables/exportMyBill?" +
+          $.param(data);
     },
     componentWillMount() {
         this.loadData();

+ 521 - 83
js/component/manageCenter/order/orderNew/addService.jsx

@@ -280,6 +280,103 @@ const NewService = Form.create()(
         loading: false,
         ContactsLists: [
           {
+            title: "催款科目",
+            dataIndex: "dunSubject",
+            key: "dunSubject",
+            render: (text, record) => {
+              return (
+                <Select
+                  placeholder="请选择催款科目"
+                  value={record.dunSubject}
+                  style={{ width: "150px" }}
+                  disabled
+                  onChange={e => {
+                    record.dunSubject = e;
+                    this.setState({ contactList: this.state.contactList });
+                  }}
+                >
+                  {jiedian.map(function(item) {
+                    return (
+                      <Select.Option key={item.value}>{item.key}</Select.Option>
+                    );
+                  })}
+                </Select>
+              );
+            }
+          },
+          {
+            title: "金额(万)",
+            dataIndex: "money",
+            key: "money",
+            render: (text, record) => {
+              return (
+                <Input
+                  value={record.money}
+                  placeholder="请输入金额(必填项)"
+                  disabled
+                  key={record.id}
+                  required="required"
+                  onChange={e => {
+                    record.money = e.target.value;
+                    this.setState({ contactList: this.state.contactList });
+                  }}
+                  style={{ width: "120px" }}
+                />
+              );
+            }
+          },
+          {
+            title: "催款状态",
+            dataIndex: "dunStatus",
+            key: "dunStatus",
+            render: text => {
+              return getCuikuan(text);
+            }
+          },
+          {
+            title: "操作",
+            dataIndex: "dels",
+            key: "dels",
+            render: (text, record) => {
+              return (
+                <div>
+                  {
+                    <Popconfirm
+                      title="是否删除?"
+                      onConfirm={() => {
+                        this.confirmDelet(record.key);
+                      }}
+                      okText="删除"
+                      cancelText="不删除"
+                    >
+                      <Button
+                        style={{
+                          marginRight: "10px",
+                          color: "#ffffff",
+                          background: "#f00",
+                          border: "none",
+                          display:
+                            this.state.processStatus == 0 ? "block" : "none"
+                        }}
+                      >
+                        删除
+                      </Button>
+                    </Popconfirm>
+                  }
+                  {record.id ? (
+                    ""
+                  ) : (
+                    <Button type="primary" onClick={this.contactSave}>
+                      保存
+                    </Button>
+                  )}
+                </div>
+              );
+            }
+          }
+        ],
+        ContactsListsNew: [
+          {
             title: "项目名称",
             dataIndex: "commodityName",
             key: "commodityName",
@@ -292,6 +389,9 @@ const NewService = Form.create()(
                 <Select
                   placeholder="请选择名称"
                   style={{ width: "150px" }}
+                  disabled={
+                    this.state.getLoad && record.sortName ? true : false
+                  }
                   onChange={e => {
                     record.sortName = e;
                     dataArr.forEach(item => {
@@ -300,6 +400,8 @@ const NewService = Form.create()(
                         record.tid = item.id;
                         record.isSave = true;
                         record.sort = item.sort;
+                        console.log(record);
+                        
                         cuiJieDian.forEach(item => {
                           if (item.value == record.sort) {
                             record.arr = item.children;
@@ -447,7 +549,7 @@ const NewService = Form.create()(
               }
               return (
                 <div>
-                  {this.state.processStatus == 0 ? (
+                  {/* {this.state.processStatus == 0 ? (
                     <Input
                       value={record.money}
                       placeholder="请输入金额(必填项)"
@@ -461,7 +563,18 @@ const NewService = Form.create()(
                     />
                   ) : (
                     <span>{text}</span>
-                  )}
+                  )} */}
+                  <Input
+                    value={record.money}
+                    placeholder="请输入金额(必填项)"
+                    key={record.id}
+                    required="required"
+                    onChange={e => {
+                      record.money = e.target.value;
+                      this.setState({ contactList: this.state.contactList });
+                    }}
+                    style={{ width: "120px" }}
+                  />
                 </div>
               );
             }
@@ -514,7 +627,7 @@ const NewService = Form.create()(
                     <Popconfirm
                       title="是否删除?"
                       onConfirm={() => {
-                        this.confirmDelet(record);
+                        this.confirmDeletNew(record);
                       }}
                       okText="删除"
                       cancelText="不删除"
@@ -537,7 +650,7 @@ const NewService = Form.create()(
                     <Button
                       type="primary"
                       onClick={e => {
-                        this.contactSave(record);
+                        this.contactSaveNew(record);
                       }}
                     >
                       保存
@@ -643,6 +756,12 @@ const NewService = Form.create()(
         }
       } else {
       }
+      for(let i = 0; i < this.state.contactListNew.length; i++) {
+        if(!this.state.contactListNew[i].id) {
+          message.warning("请保存催款节点")
+          return false
+        }
+      }
       this.setState({
         loading: true
       });
@@ -812,29 +931,200 @@ const NewService = Form.create()(
         }.bind(this)
       );
     },
-    //查看催款节点
-    loaduserss(record) {
-      this.state.orderList = [];
-      this.setState({
-        orderNoss: record ? record.orderNo : this.props.datauser.orderNo
-      });
+    // //查看催款节点
+    // loaduserss(record) {
+    //   this.state.orderList = [];
+    //   this.setState({
+    //     orderNoss: record ? record.orderNo : this.props.datauser.orderNo
+    //   });
+
+    //   $.ajax({
+    //     method: "get",
+    //     dataType: "json",
+    //     crossDomain: false,
+    //     url: globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
+    //     data: {
+    //       orderNo: record ? record.orderNo : this.props.datauser.orderNo
+    //     },
+    //     success: function(data) {
+    //       let theArr = [];
+    //       let thisData = [];
+    //       if (!thisData) {
+    //         if (data.error && data.error.length) {
+    //           message.warning(data.error[0].message);
+    //         }
+    //         thisData = {};
+    //       } else {
+    //         for (let i = 0; i < data.data.length; i++) {
+    //           thisData = data.data[i];
+    //           theArr.push({
+    //             key: i,
+    //             dunSubject: thisData.dunSubject
+    //               ? thisData.dunSubject.toString()
+    //               : "", //催款科目
+    //             id: thisData.id, //节点Id
+    //             money: thisData.money, //催款金额
+    //             orderNo: record ? record.orderNo : this.props.datauser.orderNo,
+    //             commodityName: thisData.commodityName,
+    //             projectType: thisData.projectType,
+    //             dunTypeName: thisData.dunTypeName,
+    //             status: thisData.status,
+    //             waitDay: thisData.waitDay,
+    //             effectiveCount: thisData.effectiveCount,
+    //             startDate: thisData.startDate
+    //           });
+    //         }
+    //         this.setState({
+    //           contactList: theArr
+    //         });
+    //       }
+    //     }.bind(this)
+    //   }).always(
+    //     function() {
+    //       this.setState({
+    //         loading: false
+    //       });
+    //     }.bind(this)
+    //   );
+    // },
+    // //催款节点保存
+    // contactSave(record) {
+    //   if(!this.state.yearFlag) {
+    //     if(!record.effectiveCount) {
+    //       message.warning("请选择服务年限")
+    //       return
+    //     }
+    //   }else {
+    //     record.effectiveCount = ""
+    //   }
+    //   if(record.money == "" ) {
+    //     message.warning("请填写金额")
+    //     return
+    //   }
+    //   if(!record.dunType) {
+    //     message.warning("请选择对应科目")
+    //     return
+    //   }
 
+    //   // if (this.state.contactList) {
+    //   //   let cuiData = this.state.contactList;
+    //   //   for (var a = 0; a < cuiData.length; a++) {
+    //   //     if (cuiData[a].money == "") {
+    //   //       message.warning("催款金额不能为空");
+    //   //       this.refs.signFirstPayment.focus();
+    //   //       return false;
+    //   //     } else if (!cuiData[a].dunSubject) {
+    //   //       message.warning("催款科目不能为空");
+    //   //       this.refs.signFirstPayment.focus();
+    //   //       return false;
+    //   //     }
+    //   //     if (moneyVerify(cuiData[a].money)) {
+    //   //       return;
+    //   //     }
+    //   //   }
+    //   // }
+    //   this.setState({
+    //     loading: true
+    //   });
+    //   $.ajax({
+    //     url: globalConfig.context + "/api/admin/newOrderDun/createDun",
+    //     method: "post",
+    //     data: {
+    //       orderNo: record.orderNo,
+    //       tid: record.tid,
+    //       projectType: record.sort,
+    //       dunType: record.dunType,
+    //       money: record.money,
+    //       waitDay: record.waitDay,
+    //       effectiveCount: record.effectiveCount
+    //     }
+    //   }).done(
+    //     function(data) {
+    //       this.setState({
+    //         loading: false
+    //       });
+    //       if (!data.error.length) {
+    //         message.success("保存成功!");
+    //         this.setState({
+    //           cuiFlag: false
+    //         });
+    //         this.jiedian();
+    //       } else {
+    //         message.warning(data.error[0].message);
+    //       }
+    //     }.bind(this)
+    //   );
+    // },
+    // //点击新增催款节点
+    // addcontact() {
+    //   this.state.contactList.push({
+    //     key: this.state.contactList.length,
+    //     money: "",
+    //     dunSubject: undefined,
+    //     orderNo: this.state.orderNoss,
+    //     dunTarget: this.state.kehuId
+    //   });
+    //   this.setState({
+    //     contactList: this.state.contactList,
+    //     cuiFlag: true
+    //   });
+    // },
+
+    // //删除收款节点
+    // confirmDelet(index) {
+    //   if (index.id) {
+    //     this.state.contactList.splice(index.key, 1);
+    //     this.setState({
+    //       contactList: this.state.contactList,
+    //       cuiFlag: false
+    //     });
+    //     $.ajax({
+    //       url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
+    //       method: "post",
+    //       data: {
+    //         id: index.id,
+    //       }
+    //     }).done(
+    //       function(data) {
+    //         this.setState({
+    //           loading: false
+    //         });
+    //         if (!data.error.length) {
+    //           message.success("删除成功!");
+    //           this.setState({
+    //             cuiFlag: false
+    //           });
+    //           this.jiedian();
+    //         } else {
+    //           message.warning(data.error[0].message);
+    //         }
+    //       }.bind(this)
+    //     );
+    //   } else {
+    //     this.state.contactList.splice(index.key, 1);
+    //     this.setState({
+    //       contactList: this.state.contactList,
+    //       cuiFlag: false
+    //     });
+    //   }
+    // },
+    //节点列表
+    jiedian(orderNos) {
       $.ajax({
         method: "get",
         dataType: "json",
         crossDomain: false,
-        url: globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
+        url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
         data: {
-          orderNo: record ? record.orderNo : this.props.datauser.orderNo
+          orderNo: orderNos
         },
         success: function(data) {
           let theArr = [];
           let thisData = [];
-          if (!thisData) {
+          if (data.error.length || data.data.list == "") {
             if (data.error && data.error.length) {
               message.warning(data.error[0].message);
             }
-            thisData = {};
           } else {
             for (let i = 0; i < data.data.length; i++) {
               thisData = data.data[i];
@@ -845,17 +1135,65 @@ const NewService = Form.create()(
                   : "", //催款科目
                 id: thisData.id, //节点Id
                 money: thisData.money, //催款金额
-                orderNo: record ? record.orderNo : this.props.datauser.orderNo,
+                dunStatus: thisData.dunStatus, //催款状态
+                orderNo: thisData.orderNo
+              });
+            }
+            this.setState({
+              contactList: theArr
+            });
+          }
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
+    //查看催款节点
+    jiedianNew(orderNos) {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
+        data: {
+          orderNo: orderNos
+        },
+        success: function(data) {
+          let theArr = [];
+          let thisData = [];
+          if (!thisData) {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+            thisData = {};
+          } else {
+            let arr = data.data || []
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              theArr.push({
+                key: i,
+                dunSubject: thisData.dunSubject
+                  ? thisData.dunSubject.toString()
+                  : "", //催款科目
+                id: thisData.id, //节点Id
+                money: thisData.money, //催款金额
+                // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
                 commodityName: thisData.commodityName,
                 projectType: thisData.projectType,
                 dunTypeName: thisData.dunTypeName,
                 status: thisData.status,
                 waitDay: thisData.waitDay,
-                effectiveCount: thisData.effectiveCount
+                effectiveCount: thisData.effectiveCount,
+                startDate: thisData.startDate
               });
             }
             this.setState({
-              contactList: theArr
+              contactListNew: theArr
             });
           }
         }.bind(this)
@@ -869,41 +1207,53 @@ const NewService = Form.create()(
     },
     //催款节点保存
     contactSave(record) {
-      if(!this.state.yearFlag) {
-        if(!record.effectiveCount) {
-          message.warning("请选择服务年限")
-          return
+      for (let i = 0; i < this.state.contactList.length; i++) {
+        if (moneyVerify(this.state.contactList[i].money)) {
+          return;
         }
-      }else {
-        record.effectiveCount = ""	
       }
-      if(record.money == "" ) {
-        message.warning("请填写金额")
-        return
+      this.setState({
+        loading: true
+      });
+      $.ajax({
+        url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
+        method: "post",
+        data: {
+          orderNo: this.state.orderNo,
+          orderDun: JSON.stringify(this.state.contactList)
+        }
+      }).done(
+        function(data) {
+          this.setState({
+            loading: false
+          });
+          if (!data.error.length) {
+            message.success("保存成功!");
+            this.jiedian(record.orderNo);
+          } else {
+            message.warning(data.error[0].message);
+          }
+        }.bind(this)
+      );
+    },
+    //催款节点保存
+    contactSaveNew(record) {
+      if (!this.state.yearFlag) {
+        if (!record.effectiveCount) {
+          message.warning("请选择服务年限");
+          return;
+        }
+      } else {
+        record.effectiveCount = "";
       }
-      if(!record.dunType) {
-        message.warning("请选择对应科目")
-        return
+      if (record.money == "") {
+        message.warning("请填写金额");
+        return;
+      }
+      if (!record.dunType) {
+        message.warning("请选择对应科目");
+        return;
       }
-      console.log("保存",record);
-      
-      // if (this.state.contactList) {
-      //   let cuiData = this.state.contactList;
-      //   for (var a = 0; a < cuiData.length; a++) {
-      //     if (cuiData[a].money == "") {
-      //       message.warning("催款金额不能为空");
-      //       this.refs.signFirstPayment.focus();
-      //       return false;
-      //     } else if (!cuiData[a].dunSubject) {
-      //       message.warning("催款科目不能为空");
-      //       this.refs.signFirstPayment.focus();
-      //       return false;
-      //     }
-      //     if (moneyVerify(cuiData[a].money)) {
-      //       return;
-      //     }
-      //   }
-      // }
       this.setState({
         loading: true
       });
@@ -929,7 +1279,7 @@ const NewService = Form.create()(
             this.setState({
               cuiFlag: false
             });
-            this.loaduserss();
+            this.jiedianNew(record.orderNo);
           } else {
             message.warning(data.error[0].message);
           }
@@ -942,28 +1292,50 @@ const NewService = Form.create()(
         key: this.state.contactList.length,
         money: "",
         dunSubject: undefined,
-        orderNo: this.state.orderNoss,
+        orderNo: this.state.orderNo,
         dunTarget: this.state.kehuId
       });
       this.setState({
-        contactList: this.state.contactList,
+        contactList: this.state.contactList
+      });
+    },
+    //点击新增催款节点
+    addcontactNew() {
+      this.state.contactListNew.push({
+        key: this.state.contactListNew.length,
+        money: "",
+        dunSubject: undefined,
+        orderNo: this.state.orderNo,
+        dunTarget: this.state.kehuId
+      });
+      this.setState({
+        contactListNew: this.state.contactListNew,
         cuiFlag: true
       });
     },
-
     //删除收款节点
     confirmDelet(index) {
+      this.state.contactList.splice(index, 1);
+      this.setState({
+        contactList: this.state.contactList
+      });
+      this.contactSave();
+    },
+    //删除收款节点
+    confirmDeletNew(index) {
+      console.log(index);
+
       if (index.id) {
-        this.state.contactList.splice(index.key, 1);
+        this.state.contactListNew.splice(index.key, 1);
         this.setState({
-          contactList: this.state.contactList,
+          contactListNew: this.state.contactListNew,
           cuiFlag: false
         });
         $.ajax({
           url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
           method: "post",
           data: {
-            id: index.id,
+            id: index.id
           }
         }).done(
           function(data) {
@@ -975,16 +1347,16 @@ const NewService = Form.create()(
               this.setState({
                 cuiFlag: false
               });
-              this.loaduserss();
+              this.jiedianNew(this.state.orderNo);
             } else {
               message.warning(data.error[0].message);
             }
           }.bind(this)
         );
       } else {
-        this.state.contactList.splice(index.key, 1);
+        this.state.contactListNew.splice(index.key, 1);
         this.setState({
-          contactList: this.state.contactList,
+          contactListNew: this.state.contactListNew,
           cuiFlag: false
         });
       }
@@ -1057,8 +1429,9 @@ const NewService = Form.create()(
             this.setState({
               loading: false
             });
-            this.loaduserss()
-            this.loaduser()
+            this.jiedian(this.state.orderNo);
+            this.jiedianNew(this.state.orderNo);
+            this.loaduser();
             this.loadData();
           } else {
             message.warning(data.error[0].message);
@@ -1692,7 +2065,8 @@ const NewService = Form.create()(
       }
       if (nextProps.userDetaile && nextProps.showDesc) {
         this.loaduser(nextProps.datauser);
-        this.loaduserss(nextProps.datauser);
+        this.jiedian(nextProps.datauser.orderNo);
+        this.jiedianNew(nextProps.datauser.orderNo);
         this.loadData(nextProps.datauser);
       } else {
         this.setState({
@@ -1754,6 +2128,7 @@ const NewService = Form.create()(
         }
       ];
       const dataSources = this.state.customerArr || [];
+      const cuiDataList = this.state.contactList || [];
       let departmentArr = this.state.departmentArr || [];
       const options = this.state.states
         ? dataSources.map(group => (
@@ -1766,7 +2141,6 @@ const NewService = Form.create()(
               {group.bname}
             </Select.Option>
           ));
-      
 
       return (
         <div>
@@ -2457,38 +2831,102 @@ const NewService = Form.create()(
                               />
                             </Spin>
                           </div>
-                          <div>
+                          <div
+                            style={{
+                              display: cuiDataList.length ? "block" : "none"
+                            }}
+                          >
                             <span
                               style={{ marginLeft: "50px", fontSize: "20px" }}
                             >
-                              催款节点
+                              催款节点
                             </span>
-                            {this.state.processStatus == 0 ? (
-                              <Button
-                                type="primary"
-                                onClick={this.addcontact}
-                                style={{
-                                  float: "right",
-                                  marginRight: "50px",
-                                  marginBottom: "15px"
-                                }}
-                                disabled={this.state.cuiFlag ? true : false}
-                              >
-                                添加催款节点
-                              </Button>
-                            ) : (
-                              ""
-                            )}
+                            <Button
+                              type="primary"
+                              // onClick={this.addcontact}
+                              disabled
+                              onClick={e => {
+                                cuiDataList.length
+                                  ? this.addcontact()
+                                  : this.addcontactNew();
+                              }}
+                              style={{
+                                float: "right",
+                                marginRight: "50px",
+                                marginBottom: "15px",
+                                display:
+                                  this.state.processStatus == 0
+                                    ? "block"
+                                    : "none"
+                              }}
+                            >
+                              添加催款节点
+                            </Button>
                           </div>
-                          <div className="clearfix">
+                          <div
+                            className="clearfix"
+                            style={{
+                              display: cuiDataList.length ? "block" : "none"
+                            }}
+                          >
                             <Spin spinning={this.state.loading}>
                               <Form layout="horizontal" id="demand-form">
                                 <Table
                                   pagination={false}
                                   columns={this.state.ContactsLists}
                                   dataSource={this.state.contactList}
-                                  bordered
-                                  size="small"
+                                  scroll={{ x: "max-content", y: 0 }}
+                                />
+                                <Col
+                                  span={24}
+                                  offset={9}
+                                  style={{ marginTop: "15px" }}
+                                ></Col>
+                              </Form>
+                            </Spin>
+                          </div>
+                          <div>
+                            <span
+                              style={{
+                                marginLeft: "50px",
+                                fontSize: "20px",
+                                display: cuiDataList.length ? "none" : "block"
+                              }}
+                            >
+                              新催款节点
+                            </span>
+                            <Button
+                              type="primary"
+                              disabled={cuiDataList.length ? true : false}
+                              // onClick={this.addcontact}
+                              onClick={e => {
+                                this.addcontactNew();
+                              }}
+                              style={{
+                                float: "right",
+                                marginRight: "50px",
+                                marginBottom: "15px",
+                                display:
+                                  this.state.processStatus == 0
+                                    ? "block"
+                                    : "none"
+                              }}
+                            >
+                              添加催款节点
+                            </Button>
+                          </div>
+                          <div
+                            className="clearfix"
+                            style={{
+                              display: cuiDataList.length ? "none" : "block"
+                            }}
+                          >
+                            <Spin spinning={this.state.loading}>
+                              <Form layout="horizontal" id="demand-form">
+                                <Table
+                                  pagination={false}
+                                  columns={this.state.ContactsListsNew}
+                                  dataSource={this.state.contactListNew}
                                   scroll={{ x: "max-content", y: 0 }}
                                 />
                                 <Col

+ 83 - 2
js/component/manageCenter/order/orderNew/changeComponent/orderDetail.js

@@ -17,6 +17,77 @@ class OrderDetail extends Component {
   constructor(props) {
     super(props);
     this.state = {
+      newContactsLists: [
+        {
+          title: "项目名称",
+          dataIndex: "commodityName",
+          key: "commodityName",
+          render: text => {
+            return <span>{text}</span>;
+          }
+        },
+        {
+          title: "项目分类",
+          dataIndex: "projectType",
+          key: "projectType",
+          render: text => {
+            let arr = this.state.dataSourceX || [];
+            let str = "";
+            for (let i = 0; i < arr.length; i++) {
+              if (this.state.dataSourceX[i].sort == text) {
+                str = this.state.dataSourceX[i].cname;
+                return <span>{str}</span>;
+              }
+            }
+          }
+        },
+        {
+          title: "催款科目",
+          dataIndex: "dunTypeName",
+          key: "dunTypeName",
+          render: text => {
+            return <span>{text}</span>;
+          }
+        },
+        {
+          title: "时间",
+          dataIndex: "waitDay",
+          key: "waitDay",
+          render: (text, record) => {
+            if (record.dunTypeName) {
+              return <span>{text}</span>;
+            }
+          }
+        },
+        {
+          title: "金额(万)",
+          dataIndex: "money",
+          key: "money",
+          render: (text, record) => {
+            if (record.dunTypeName) {
+              return <span>{text}</span>;
+            }
+          }
+        },
+        {
+          title: "服务年限",
+          dataIndex: "startDate",
+          key: "startDate",
+          render: (text, record) => {
+            if (record.dunTypeName) {
+              return <span>{text}</span>;
+            }
+          }
+        },
+        {
+          title: "催款状态",
+          dataIndex: "status",
+          key: "status",
+          render: text => {
+            return <span>{text == 1 ? "已启动" : "未启动"}</span>;
+          }
+        }
+      ],
       ContactsLists: [
         {
           title: "催款科目",
@@ -227,6 +298,7 @@ class OrderDetail extends Component {
       wrapperCol: { span: 14 }
     };
     const data = this.props.orderData;
+    const propsList = this.props.contactList || [];
     return (
       <div
         className="clearfix"
@@ -485,8 +557,17 @@ class OrderDetail extends Component {
           <Form layout="horizontal" id="demand-form">
             <Table
               pagination={false}
-              columns={this.state.ContactsLists}
-              dataSource={this.props.contactList}
+              // columns={this.state.ContactsLists}
+              columns={
+                propsList.length
+                  ? this.state.ContactsLists
+                  : this.state.newContactsLists
+              }
+              dataSource={
+                propsList.length
+                  ? this.props.contactList
+                  : this.props.contactListNew
+              }
             />
             <Col span={24} offset={9} style={{ marginTop: "15px" }}></Col>
           </Form>

File diff suppressed because it is too large
+ 1215 - 1005
js/component/manageCenter/order/orderNew/chargeback.jsx


+ 2 - 1
js/component/manageCenter/order/orderNew/contractCwzj.js

@@ -562,7 +562,8 @@ const contractChange = Form.create()(
                 taskComment: thisdata.taskComment, //任务说明
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
-                projectStatus: thisdata.projectStatus //项目状态
+                projectStatus: thisdata.projectStatus, //项目状态
+                sort: thisdata.cSort
               });
             }
           }

+ 2 - 1
js/component/manageCenter/order/orderNew/contractCwzy.js

@@ -617,7 +617,8 @@ const contractChange = Form.create()(
                 taskComment: thisdata.taskComment, //任务说明
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
-                projectStatus: thisdata.projectStatus //项目状态
+                projectStatus: thisdata.projectStatus, //项目状态
+                sort: thisdata.cSort
               });
             }
           }

+ 2 - 1
js/component/manageCenter/order/orderNew/contractJsjl.js

@@ -561,7 +561,8 @@ const contractChange = Form.create()(
                 taskComment: thisdata.taskComment, //任务说明
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
-                projectStatus: thisdata.projectStatus //项目状态
+                projectStatus: thisdata.projectStatus, //项目状态
+                sort: thisdata.cSort
               });
             }
           }

+ 2 - 1
js/component/manageCenter/order/orderNew/contractJsy.js

@@ -506,7 +506,8 @@ const contractChange = Form.create()(
                 taskComment: thisdata.taskComment, //任务说明
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
-                projectStatus: thisdata.projectStatus //项目状态
+                projectStatus: thisdata.projectStatus, //项目状态
+                sort: thisdata.cSort
               });
             }
           }

+ 2 - 1
js/component/manageCenter/order/orderNew/contractJszj.js

@@ -558,7 +558,8 @@ const contractChange = Form.create()(
                 taskComment: thisdata.taskComment, //任务说明
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
-                projectStatus: thisdata.projectStatus //项目状态
+                projectStatus: thisdata.projectStatus, //项目状态
+                sort: thisdata.cSort
               });
             }
           }

+ 2 - 1
js/component/manageCenter/order/orderNew/contractYxgly.js

@@ -551,7 +551,8 @@ const contractChange = Form.create()(
                 taskComment: thisdata.taskComment, //任务说明
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
-                projectStatus: thisdata.projectStatus //项目状态
+                projectStatus: thisdata.projectStatus, //项目状态
+                sort: thisdata.cSort
               });
             }
           }

+ 98 - 42
js/component/manageCenter/order/orderNew/contractYxy.js

@@ -334,7 +334,7 @@ const contractChange = Form.create()(
           buttonStatus: true,
           orderStatus: record.orderStatus,
           id: record.id,
-          processStateText:record.processStateText,
+          processStateText: record.processStateText,
           orderNo: record.orderNo
         },
         () => {
@@ -383,7 +383,7 @@ const contractChange = Form.create()(
             Object.assign(thisdata, {
               id: this.state.id,
               userName: this.state.userName,
-              processStateText:this.state.processStateText,
+              processStateText: this.state.processStateText,
               contractNo: this.state.contractNo
             });
             this.setState({
@@ -401,8 +401,7 @@ const contractChange = Form.create()(
         }.bind(this)
       });
 
-
-        $.ajax({
+      $.ajax({
         method: "get",
         dataType: "json",
         crossDomain: false,
@@ -413,9 +412,9 @@ const contractChange = Form.create()(
           orderNo: this.state.orderNo
         },
         success: function(data) {
-          if(!data.data) return
-          let proTotal = 0
-          let invTotal = 0
+          if (!data.data) return;
+          let proTotal = 0;
+          let invTotal = 0;
           data.data.bill.forEach(item => {
             proTotal += item.transactionAmount;
           });
@@ -441,10 +440,10 @@ const contractChange = Form.create()(
           orderNo: this.state.orderNo
         },
         success: data => {
-          if(!data) return
-          data.data.forEach((item) => {
-            item.load = true
-          })
+          if (!data) return;
+          data.data.forEach(item => {
+            item.load = true;
+          });
           this.setState({
             refundInvoice: data.data
           });
@@ -482,6 +481,7 @@ const contractChange = Form.create()(
                 if (this.state.orderData.deleteSign !== 3) {
                   this.xiangmu(this.state.orderNo);
                   this.jiedian(this.state.orderNo);
+                  this.jiedianNew(this.state.orderNo);
                 }
               }
             );
@@ -573,7 +573,8 @@ const contractChange = Form.create()(
                 taskComment: thisdata.taskComment, //任务说明
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
-                projectStatus: thisdata.projectStatus //项目状态
+                projectStatus: thisdata.projectStatus, //项目状态
+                sort: thisdata.cSort
               });
             }
           }
@@ -677,6 +678,58 @@ const contractChange = Form.create()(
         }.bind(this)
       });
     },
+    jiedianNew(orderNos) {
+      this.state.orderList = [];
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
+        data: {
+          orderNo: orderNos
+        },
+        success: function(data) {
+          let theArr = [];
+          let thisData = [];
+          if (!thisData) {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+            thisData = {};
+          } else {
+            for (let i = 0; i < data.data.length; i++) {
+              thisData = data.data[i];
+              theArr.push({
+                key: i,
+                dunSubject: thisData.dunSubject
+                  ? thisData.dunSubject.toString()
+                  : "", //催款科目
+                id: thisData.id, //节点Id
+                money: thisData.money, //催款金额
+                orderNo: record ? record.orderNo : this.props.datauser.orderNo,
+                commodityName: thisData.commodityName,
+                projectType: thisData.projectType,
+                dunTypeName: thisData.dunTypeName,
+                status: thisData.status,
+                waitDay: thisData.waitDay,
+                effectiveCount: thisData.effectiveCount,
+                startDate: thisData.startDate
+              });
+            }
+            this.setState({
+              contactListNew: theArr
+            });
+          }
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
     //审核通过
     examOk() {
       $.ajax({
@@ -792,29 +845,28 @@ const contractChange = Form.create()(
     },
 
     loadDataChange() {
-    $.ajax({
-      method: "get",
-      dataType: "json",
-      async: false,
-      crossDomain: false,
-      url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
-      data: {
-        changeId: this.state.id
-      },
-      success: function(data) {
-        if (data.error.length || data.data.list == "") {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        async: false,
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+        data: {
+          changeId: this.state.id
+        },
+        success: function(data) {
+          if (data.error.length || data.data.list == "") {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+          } else {
+            this.setState({
+              dataProps: data.data
+            });
           }
-        } else {
-          
-          this.setState({
-            dataProps: data.data
-          });
-        }
-      }.bind(this)
-    });
-  },
+        }.bind(this)
+      });
+    },
 
     callback(key) {
       this.setState(
@@ -832,17 +884,20 @@ const contractChange = Form.create()(
         if (this.state.orderData.deleteSign !== 3) {
           this.xiangmu(this.state.orderNo);
           this.jiedian(this.state.orderNo);
+          this.jiedianNew(this.state.orderNo);
         }
       }
       if (key === "3") {
         this.primaryOrder(this.state.primaryOrderNo);
         this.xiangmu(this.state.primaryOrderNo);
         this.jiedian(this.state.primaryOrderNo);
+        this.jiedianNew(this.state.primaryOrderNo);
       }
       if (key === "4") {
         this.additionalOrder(this.state.additionalOrder);
         this.xiangmu(this.state.additionalOrder);
         this.jiedian(this.state.additionalOrder);
+        this.jiedianNew(this.state.additionalOrder);
         this.setState({
           buttonStatusA: false
         });
@@ -1011,17 +1066,17 @@ const contractChange = Form.create()(
       });
     },
     changeList(arr) {
-      const newArr = []
-      this.state.columns.forEach((item) => {
-        arr.forEach((val) => {
-          if(val === item.title) {
-            newArr.push(item)
+      const newArr = [];
+      this.state.columns.forEach(item => {
+        arr.forEach(val => {
+          if (val === item.title) {
+            newArr.push(item);
           }
-        })
-      })
+        });
+      });
       this.setState({
         changeList: newArr
-      })
+      });
     },
     render() {
       const formItemLayout = {
@@ -1098,6 +1153,7 @@ const contractChange = Form.create()(
                           getOrderLog={this.getOrderLog}
                           dataSourceX={this.state.dataSourceX}
                           contactList={this.state.contactList}
+                          contactListNew={this.state.contactListNew}
                           orderNo={this.state.orderNo}
                         />
                       </Spin>

+ 145 - 11
js/component/manageCenter/order/orderNew/examine.jsx

@@ -335,6 +335,77 @@ const IntentionCustomer = Form.create()(
           }
         ],
         dataSourceX: [],
+        ContactsListsNew: [
+          {
+            title: "项目名称",
+            dataIndex: "commodityName",
+            key: "commodityName",
+            render: text => {
+              return <span>{text}</span>;
+            }
+          },
+          {
+            title: "项目分类",
+            dataIndex: "projectType",
+            key: "projectType",
+            render: text => {
+              let arr = this.state.dataSourceX || [];
+              let str = "";
+              for (let i = 0; i < arr.length; i++) {
+                if (this.state.dataSourceX[i].sort == text) {
+                  str = this.state.dataSourceX[i].cname;
+                  return <span>{str}</span>;
+                }
+              }
+            }
+          },
+          {
+            title: "催款科目",
+            dataIndex: "dunTypeName",
+            key: "dunTypeName",
+            render: text => {
+              return <span>{text}</span>;
+            }
+          },
+          {
+            title: "时间",
+            dataIndex: "waitDay",
+            key: "waitDay",
+            render: (text, record) => {
+              if (record.dunTypeName) {
+                return <span>{text}</span>;
+              }
+            }
+          },
+          {
+            title: "金额(万)",
+            dataIndex: "money",
+            key: "money",
+            render: (text, record) => {
+              if (record.dunTypeName) {
+                return <span>{text}</span>;
+              }
+            }
+          },
+          {
+            title: "服务年限",
+            dataIndex: "startDate",
+            key: "startDate",
+            render: (text, record) => {
+              if (record.dunTypeName) {
+                return <span>{text}</span>;
+              }
+            }
+          },
+          {
+            title: "催款状态",
+            dataIndex: "status",
+            key: "status",
+            render: text => {
+              return <span>{text == 1 ? "已启动" : "未启动"}</span>;
+            }
+          }
+        ],
         ContactsLists: [
           {
             title: "催款科目",
@@ -374,6 +445,7 @@ const IntentionCustomer = Form.create()(
       this.xiangqing(record.orderNo);
       this.xiangmu(record.orderNo);
       this.jiedian(record.orderNo);
+      this.jiedianNew(record.orderNo);
     },
     //点击打卡项目详情
     tableRowClickX(record) {
@@ -489,7 +561,8 @@ const IntentionCustomer = Form.create()(
                 taskComment: thisdata.taskComment, //任务说明
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
-                projectStatus: thisdata.projectStatus //项目状态
+                projectStatus: thisdata.projectStatus, //项目状态
+                sort: thisdata.cSort
               });
             }
           }
@@ -603,12 +676,64 @@ const IntentionCustomer = Form.create()(
         }.bind(this)
       );
     },
+    //查看催款节点
+    jiedianNew(orderNos) {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
+        data: {
+          orderNo: orderNos
+        },
+        success: function(data) {
+          let theArr = [];
+          let thisData = [];
+          if (!thisData) {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+            thisData = {};
+          } else {
+            for (let i = 0; i < data.data.length; i++) {
+              thisData = data.data[i];
+              theArr.push({
+                key: i,
+                dunSubject: thisData.dunSubject
+                  ? thisData.dunSubject.toString()
+                  : "", //催款科目
+                id: thisData.id, //节点Id
+                money: thisData.money, //催款金额
+                // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
+                commodityName: thisData.commodityName,
+                projectType: thisData.projectType,
+                dunTypeName: thisData.dunTypeName,
+                status: thisData.status,
+                waitDay: thisData.waitDay,
+                effectiveCount: thisData.effectiveCount,
+                startDate: thisData.startDate
+              });
+            }
+            this.setState({
+              contactListNew: theArr
+            });
+          }
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
     //审核通过
     examOk() {
-      if(this.state.flag) return
+      if (this.state.flag) return;
       this.setState({
         flag: true
-      })
+      });
       $.ajax({
         method: "post",
         dataType: "json",
@@ -624,7 +749,7 @@ const IntentionCustomer = Form.create()(
               message.warning(data.error[0].message);
               this.setState({
                 flag: false
-              })
+              });
             }
           } else {
             message.success("该订单已通过审核~");
@@ -645,10 +770,10 @@ const IntentionCustomer = Form.create()(
     },
     //通过发给外包
     outsourcing() {
-      if(this.state.flag) return
+      if (this.state.flag) return;
       this.setState({
         flag: true
-      })
+      });
       $.ajax({
         method: "post",
         dataType: "json",
@@ -665,7 +790,7 @@ const IntentionCustomer = Form.create()(
               message.warning(data.error[0].message);
               this.setState({
                 flag: false
-              })
+              });
             }
           } else {
             message.success("该订单已通过审核~");
@@ -847,8 +972,8 @@ const IntentionCustomer = Form.create()(
         message.warning("单价不能为空");
         return;
       }
-      if(moneyVerify(this.state.unitPrice)) {
-        return 
+      if (moneyVerify(this.state.unitPrice)) {
+        return;
       }
       if (!this.state.unitNumber) {
         message.warning("数量不能为空");
@@ -983,6 +1108,7 @@ const IntentionCustomer = Form.create()(
       const { TabPane } = Tabs;
       const { TextArea } = Input;
       const { RangePicker } = DatePicker;
+      const cuiDataList = this.state.contactList || [];
       return (
         <div className="user-content">
           <ShowModalDiv ShowModal={this.state.showModal} />
@@ -1323,8 +1449,16 @@ const IntentionCustomer = Form.create()(
                             <Form layout="horizontal" id="demand-form">
                               <Table
                                 pagination={false}
-                                columns={this.state.ContactsLists}
-                                dataSource={this.state.contactList}
+                                columns={
+                                  cuiDataList.length
+                                    ? this.state.ContactsLists
+                                    : this.state.ContactsListsNew
+                                }
+                                dataSource={
+                                  cuiDataList.length
+                                    ? this.state.contactList
+                                    : this.state.contactListNew
+                                }
                               />
                               <Col
                                 span={24}

File diff suppressed because it is too large
+ 1164 - 986
js/component/manageCenter/order/orderNew/inquiry.jsx


+ 400 - 5
js/component/manageCenter/order/orderNew/outsourcingList.jsx

@@ -194,6 +194,287 @@ const outsourcingList = Form.create()(
             return "共" + total + "条数据";
           }
         },
+        ContactsListsNew: [
+          {
+            title: "项目名称",
+            dataIndex: "commodityName",
+            key: "commodityName",
+            render: (text, record, index) => {
+              let dataArr = this.state.dataSourceX || [];
+              if (text) {
+                return <span>{text}</span>;
+              }
+              return (
+                <Select
+                  placeholder="请选择名称"
+                  style={{ width: "150px" }}
+                  disabled={
+                    this.state.getLoad && record.sortName ? true : false
+                  }
+                  onChange={e => {
+                    record.sortName = e;
+                    dataArr.forEach(item => {
+                      if (item.commodityName == record.sortName) {
+                        record.cname = item.cname;
+                        record.tid = item.id;
+                        record.isSave = true;
+                        record.sort = item.sort;
+                        console.log(record);
+
+                        cuiJieDian.forEach(item => {
+                          if (item.value == record.sort) {
+                            record.arr = item.children;
+                            let yearFlag = true;
+                            if (record.sort == 6) {
+                              yearFlag = false;
+                            }
+                            this.setState({
+                              getLoad: true,
+                              yearFlag
+                            });
+                          }
+                        });
+                      }
+                    });
+                    console.log(e);
+                  }}
+                >
+                  {dataArr.map(item => {
+                    return (
+                      <Select.Option key={item.id} value={item.commodityName}>
+                        {item.commodityName}
+                      </Select.Option>
+                    );
+                  })}
+                </Select>
+              );
+            }
+          },
+          {
+            title: "项目分类",
+            dataIndex: "projectType",
+            key: "projectType",
+            render: (text, record) => {
+              console.log("看分类", record);
+
+              if (text) {
+                let arr = this.state.dataSourceX || [];
+                let str = "";
+                for (let i = 0; i < arr.length; i++) {
+                  if (this.state.dataSourceX[i].sort == text) {
+                    str = this.state.dataSourceX[i].cname;
+                    return <span>{str}</span>;
+                  }
+                }
+              }
+              if (this.state.getLoad) {
+                return (
+                  <Select
+                    style={{ width: "150px" }}
+                    placeholder="请选择分类"
+                    value={record.cname}
+                  >
+                    <Select.Option key={record.sort} value={record.cname}>
+                      {record.cname}
+                    </Select.Option>
+                  </Select>
+                );
+              } else {
+                return (
+                  <Select style={{ width: "150px" }} placeholder="请选择分类">
+                    <Select.Option key={record.sort} value={record.cname}>
+                      {record.cname}
+                    </Select.Option>
+                  </Select>
+                );
+              }
+            }
+          },
+          {
+            title: "催款科目",
+            dataIndex: "dunTypeName",
+            key: "dunTypeName",
+            render: (text, record) => {
+              if (text) {
+                return <span>{text}</span>;
+              }
+              if (this.state.getLoad) {
+                let arr = record.arr || [];
+                console.log("arrrr", arr);
+
+                return (
+                  <Select
+                    style={{ width: "150px" }}
+                    placeholder="请选择分类"
+                    onChange={e => {
+                      record.dunType = e;
+                      console.log(e);
+                    }}
+                  >
+                    {arr.map(item => {
+                      record;
+                      return (
+                        <Select.Option key={item.value} value={item.value}>
+                          {item.key}
+                        </Select.Option>
+                      );
+                    })}
+                  </Select>
+                );
+              } else {
+                return (
+                  <Select style={{ width: "150px" }} placeholder="请选择分类">
+                    <Select.Option
+                      key={0}
+                      value={"请选择上一项"}
+                    ></Select.Option>
+                  </Select>
+                );
+              }
+            }
+          },
+          {
+            title: "时间",
+            dataIndex: "waitDay",
+            key: "waitDay",
+            render: (text, record) => {
+              if (record.dunTypeName) {
+                return <span>{text}</span>;
+              }
+              return (
+                <Select
+                  placeholder="请选择时间"
+                  style={{ width: "150px" }}
+                  disabled={this.state.approval == 0 ? true : false}
+                  onChange={e => {
+                    console.log("ee", e);
+                    record.waitDay = e;
+                    console.log("time", record);
+                  }}
+                >
+                  <Select.Option key={3}>3天</Select.Option>
+                  <Select.Option key={5}>5天</Select.Option>
+                  <Select.Option key={7}>7天</Select.Option>
+                  <Select.Option key={15}>15天</Select.Option>
+                </Select>
+              );
+            }
+          },
+          {
+            title: "金额(万)",
+            dataIndex: "money",
+            key: "money",
+            render: (text, record) => {
+              if (record.dunTypeName) {
+                return <span>{text}</span>;
+              }
+              return (
+                <div>
+                  {this.state.processStatus == 0 ? (
+                    <Input
+                      value={record.money}
+                      placeholder="请输入金额(必填项)"
+                      key={record.id}
+                      required="required"
+                      onChange={e => {
+                        record.money = e.target.value;
+                        this.setState({
+                          contactListNew: this.state.contactListNew
+                        });
+                      }}
+                      style={{ width: "120px" }}
+                    />
+                  ) : (
+                    <span>{text}</span>
+                  )}
+                </div>
+              );
+            }
+          },
+          {
+            title: "服务年限",
+            dataIndex: "startDate",
+            key: "startDate",
+            render: (text, record) => {
+              if (record.dunTypeName) {
+                return <span>{text}</span>;
+              }
+              return (
+                <Select
+                  placeholder="请选择时间"
+                  style={{ width: "150px" }}
+                  disabled={this.state.yearFlag ? true : false}
+                  onChange={e => {
+                    console.log("ee", e);
+                    record.effectiveCount = e;
+                    console.log("year", record);
+                  }}
+                >
+                  {/* <Select.Option key={null}>无</Select.Option> */}
+                  <Select.Option key={1}>一年</Select.Option>
+                  <Select.Option key={3}>两年</Select.Option>
+                  <Select.Option key={5}>三年</Select.Option>
+                  <Select.Option key={7}>四年</Select.Option>
+                  <Select.Option key={9}>五年</Select.Option>
+                </Select>
+              );
+            }
+          },
+          {
+            title: "催款状态",
+            dataIndex: "status",
+            key: "status",
+            render: text => {
+              return <span>{text == 1 ? "已启动" : "未启动"}</span>;
+            }
+          },
+          {
+            title: "操作",
+            dataIndex: "dels",
+            key: "dels",
+            render: (text, record, index) => {
+              return (
+                <div>
+                  {this.state.processStatus == 0 ? (
+                    <Popconfirm
+                      title="是否删除?"
+                      onConfirm={() => {
+                        this.confirmDeletNew(record);
+                      }}
+                      okText="删除"
+                      cancelText="不删除"
+                    >
+                      <Button
+                        style={{
+                          marginRight: "10px",
+                          color: "#ffffff",
+                          background: "#f00",
+                          border: "none"
+                        }}
+                      >
+                        删除
+                      </Button>
+                    </Popconfirm>
+                  ) : (
+                    ""
+                  )}
+                  {record.isSave ? (
+                    <Button
+                      type="primary"
+                      onClick={e => {
+                        this.contactSaveNew(record);
+                      }}
+                    >
+                      保存
+                    </Button>
+                  ) : (
+                    ""
+                  )}
+                </div>
+              );
+            }
+          }
+        ],
         columns: [
           {
             title: "订单编号",
@@ -371,6 +652,7 @@ const outsourcingList = Form.create()(
       this.xiangqing(record.orderNo);
       this.xiangmu(record.orderNo);
       this.jiedian(record.orderNo);
+      this.jiedianNew(record.orderNo);
     },
     //点击打卡项目详情
     tableRowClickX(record) {
@@ -486,7 +768,8 @@ const outsourcingList = Form.create()(
                 taskComment: thisdata.taskComment, //任务说明
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
-                projectStatus: thisdata.projectStatus //项目状态
+                projectStatus: thisdata.projectStatus, //项目状态
+                sort: thisdata.cSort
               });
             }
           }
@@ -600,6 +883,57 @@ const outsourcingList = Form.create()(
         }.bind(this)
       );
     },
+    jiedianNew(orderNos) {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
+        data: {
+          orderNo: orderNos
+        },
+        success: function(data) {
+          let theArr = [];
+          let thisData = [];
+          if (!thisData) {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+            thisData = {};
+          } else {
+            for (let i = 0; i < data.data.length; i++) {
+              thisData = data.data[i];
+              theArr.push({
+                key: i,
+                dunSubject: thisData.dunSubject
+                  ? thisData.dunSubject.toString()
+                  : "", //催款科目
+                id: thisData.id, //节点Id
+                money: thisData.money, //催款金额
+                // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
+                commodityName: thisData.commodityName,
+                projectType: thisData.projectType,
+                dunTypeName: thisData.dunTypeName,
+                status: thisData.status,
+                waitDay: thisData.waitDay,
+                effectiveCount: thisData.effectiveCount,
+                startDate: thisData.startDate
+              });
+            }
+            this.setState({
+              contactListNew: theArr
+            });
+          }
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
     //审核通过
     examOk() {
       $.ajax({
@@ -634,10 +968,10 @@ const outsourcingList = Form.create()(
     },
     //通过发给外包
     outsourcing() {
-      if(this.state.flag) return
+      if (this.state.flag) return;
       this.setState({
         flag: true
-      })
+      });
       $.ajax({
         method: "post",
         dataType: "json",
@@ -952,6 +1286,7 @@ const outsourcingList = Form.create()(
       const { TextArea } = Input;
       const { TabPane } = Tabs;
       const { RangePicker } = DatePicker;
+      const cuiDataList = this.state.contactList || [];
       return (
         <div className="user-content">
           <ShowModalDiv ShowModal={this.state.showModal} />
@@ -1280,7 +1615,11 @@ const outsourcingList = Form.create()(
                             <span>{this.state.financeMobile}</span>
                           </FormItem>
                         </div>
-                        <div>
+                        <div
+                          style={{
+                            display: cuiDataList.length ? "block" : "none"
+                          }}
+                        >
                           <span
                             style={{ marginLeft: "50px", fontSize: "20px" }}
                           >
@@ -1290,6 +1629,7 @@ const outsourcingList = Form.create()(
                             <Button
                               type="primary"
                               onClick={this.addcontact}
+                              disabled
                               style={{
                                 float: "right",
                                 marginRight: "50px",
@@ -1302,13 +1642,68 @@ const outsourcingList = Form.create()(
                             ""
                           )}
                         </div>
-                        <div className="clearfix">
+                        <div
+                          className="clearfix"
+                          style={{
+                            display: cuiDataList.length ? "block" : "none"
+                          }}
+                        >
                           <Spin spinning={this.state.loading}>
                             <Form layout="horizontal" id="demand-form">
                               <Table
                                 pagination={false}
                                 columns={this.state.ContactsLists}
                                 dataSource={this.state.contactList}
+                                scroll={{ x: "max-content", y: 0 }}
+                              />
+                              <Col
+                                span={24}
+                                offset={9}
+                                style={{ marginTop: "15px" }}
+                              ></Col>
+                            </Form>
+                          </Spin>
+                        </div>
+                        <div
+                          style={{
+                            display: cuiDataList.length ? "none" : "block"
+                          }}
+                        >
+                          <span
+                            style={{ marginLeft: "50px", fontSize: "20px" }}
+                          >
+                            催款节点
+                          </span>
+                          {this.state.processStatus == 0 ? (
+                            <Button
+                              type="primary"
+                              onClick={this.addcontactNew}
+                              disabled={cuiDataList.length ? true : false}
+                              style={{
+                                float: "right",
+                                marginRight: "50px",
+                                marginBottom: "15px"
+                              }}
+                            >
+                              添加催款节点
+                            </Button>
+                          ) : (
+                            ""
+                          )}
+                        </div>
+                        <div
+                          className="clearfix"
+                          style={{
+                            display: cuiDataList.length ? "none" : "block"
+                          }}
+                        >
+                          <Spin spinning={this.state.loading}>
+                            <Form layout="horizontal" id="demand-form">
+                              <Table
+                                pagination={false}
+                                columns={this.state.ContactsListsNew}
+                                dataSource={this.state.contactListNew}
+                                scroll={{ x: "max-content", y: 0 }}
                               />
                               <Col
                                 span={24}

File diff suppressed because it is too large
+ 2275 - 1644
js/component/manageCenter/order/orderNew/reject.jsx