Browse Source

营销端优化

mentoswzq 5 years ago
parent
commit
f496fc461e
24 changed files with 6052 additions and 2395 deletions
  1. 100 85
      js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx
  2. 27 12
      js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx
  3. 10 10
      js/component/manageCenter/financialManage/distribute/huiKuan.less
  4. 26 11
      js/component/manageCenter/financialManage/orderDetail/orderDetail.jsx
  5. 61 44
      js/component/manageCenter/order/orderNew/addService.jsx
  6. 25 10
      js/component/manageCenter/order/orderNew/approveds.jsx
  7. 21 34
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzy.js
  8. 24 8
      js/component/manageCenter/order/orderNew/changeComponent/orderDetail.js
  9. 1 1
      js/component/manageCenter/order/orderNew/changeComponent/table.less
  10. 25 10
      js/component/manageCenter/order/orderNew/chargeback.jsx
  11. 1569 1373
      js/component/manageCenter/order/orderNew/checkOutsourcing.jsx
  12. 68 0
      js/component/manageCenter/order/orderNew/contractCwzj.js
  13. 69 1
      js/component/manageCenter/order/orderNew/contractCwzy.js
  14. 76 11
      js/component/manageCenter/order/orderNew/contractJsjl.js
  15. 68 0
      js/component/manageCenter/order/orderNew/contractJsy.js
  16. 116 49
      js/component/manageCenter/order/orderNew/contractJszj.js
  17. 120 51
      js/component/manageCenter/order/orderNew/contractYxgly.js
  18. 23 13
      js/component/manageCenter/order/orderNew/contractYxy.js
  19. 34 16
      js/component/manageCenter/order/orderNew/examine.jsx
  20. 3487 620
      js/component/manageCenter/order/orderNew/inquiry.jsx
  21. 62 20
      js/component/manageCenter/order/orderNew/outsourcingList.jsx
  22. 36 12
      js/component/manageCenter/order/orderNew/reject.jsx
  23. 3 3
      js/component/manageCenter/project/task/myTask.jsx
  24. 1 1
      package.json

+ 100 - 85
js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx

@@ -2176,101 +2176,107 @@ const approvedOutsourcing = React.createClass({
     );
   },
   jiedian(orderNos) {
-      $.ajax({
-        method: "get",
-        dataType: "json",
-        crossDomain: false,
-        url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
-        data: {
-          orderNo: orderNos
-        },
-        success: function(data) {
-          let theArr = [];
-          let thisData = [];
-          if (data.error.length || data.data.list == "") {
-            if (data.error && data.error.length) {
-              message.warning(data.error[0].message);
-            }
-          } 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, //催款金额
-                dunStatus: thisData.dunStatus, //催款状态
-                orderNo: thisData.orderNo
-              });
-            }
-            this.setState({
-              contactList: theArr
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
+      data: {
+        orderNo: orderNos
+      },
+      success: function(data) {
+        let theArr = [];
+        let thisData = [];
+        if (data.error.length || data.data.list == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } 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, //催款金额
+              dunStatus: thisData.dunStatus, //催款状态
+              orderNo: thisData.orderNo
             });
           }
-        }.bind(this)
-      }).always(
-        function() {
           this.setState({
-            loading: false
+            contactList: theArr
           });
-        }.bind(this)
-      );
-    },
-    //查看催款节点
-    jiedianNew(orderNos) {
-      $.ajax({
-        method: "get",
-        dataType: "json",
-        crossDomain: false,
-        url:
-          globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
-        data: {
-          orderNo: orderNos
-        },
-        success: function(data) {
+        }
+      }.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) {
+        if (data.error && data.error.length) {
+          message.warning(data.error[0].message);
+        } else {
           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,
-                appropriationRatio: thisData.appropriationRatio
-              });
-            }
-            this.setState({
-              contactListNew: theArr
+          let arr = data.data || [];
+          let totalCui = 0;
+          for (let i = 0; i < arr.length; i++) {
+            thisData = arr[i];
+            totalCui += +thisData.money;
+            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,
+              dunType: thisData.dunType,
+              appropriationRatio: thisData.appropriationRatio
             });
           }
-        }.bind(this)
-      }).always(
-        function() {
+          if (!totalCui) {
+            totalCui = 0;
+          }
+          totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
           this.setState({
-            loading: false
+            contactListNew: theArr,
+            totalCui
           });
-        }.bind(this)
-      );
-    },
+        }
+      }.bind(this)
+    }).always(
+      function() {
+        this.setState({
+          loading: false
+        });
+      }.bind(this)
+    );
+  },
   render() {
     const { TextArea } = Input;
     const { RangePicker } = DatePicker;
@@ -2971,6 +2977,15 @@ const approvedOutsourcing = React.createClass({
                       <span style={{ marginLeft: 20, fontSize: "18px" }}>
                         催款节点
                       </span>
+                      <span
+                        style={{
+                          display: cuiDataList.length ? "none" : "inline-block",
+                          marginLeft: 10,
+                          color: "red"
+                        }}
+                      >
+                        金额总计(万元): {this.state.totalCui}
+                      </span>
                     </div>
                     <div className="clearfix">
                       <Spin spinning={this.state.loading}>

+ 27 - 12
js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx

@@ -1289,8 +1289,8 @@ const approvedOutsourcing = React.createClass({
     this.jdDate(record.orderNo);
     this.loadXmu(record);
     this.loadModal(record);
-     this.jiedian(record.orderNo);
-     this.jiedianNew(record.orderNo);
+    this.jiedian(record.orderNo);
+    this.jiedianNew(record.orderNo);
   },
   //详情
   callBack(key) {
@@ -2184,16 +2184,16 @@ const approvedOutsourcing = React.createClass({
         orderNo: orderNos
       },
       success: function(data) {
-        let theArr = [];
-        let thisData = [];
-        if (!thisData) {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
-          }
-          thisData = {};
+        if (data.error && data.error.length) {
+          message.warning(data.error[0].message);
         } else {
-          for (let i = 0; i < data.data.length; i++) {
-            thisData = data.data[i];
+          let theArr = [];
+          let thisData = [];
+          let arr = data.data || [];
+          let totalCui = 0;
+          for (let i = 0; i < arr.length; i++) {
+            thisData = arr[i];
+            totalCui += +thisData.money;
             theArr.push({
               key: i,
               dunSubject: thisData.dunSubject
@@ -2209,11 +2209,17 @@ const approvedOutsourcing = React.createClass({
               waitDay: thisData.waitDay,
               effectiveCount: thisData.effectiveCount,
               startDate: thisData.startDate,
+              dunType: thisData.dunType,
               appropriationRatio: thisData.appropriationRatio
             });
           }
+          if (!totalCui) {
+            totalCui = 0;
+          }
+          totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
           this.setState({
-            contactListNew: theArr
+            contactListNew: theArr,
+            totalCui
           });
         }
       }.bind(this)
@@ -2923,6 +2929,15 @@ const approvedOutsourcing = React.createClass({
                       <span style={{ marginLeft: 20, fontSize: "18px" }}>
                         催款节点
                       </span>
+                      <span
+                        style={{
+                          display: cuiDataList.length ? "none" : "inline-block",
+                          marginLeft: 10,
+                          color: "red"
+                        }}
+                      >
+                        金额总计(万元): {this.state.totalCui}
+                      </span>
                     </div>
                     <div className="clearfix">
                       <Spin spinning={this.state.loading}>

+ 10 - 10
js/component/manageCenter/financialManage/distribute/huiKuan.less

@@ -15,16 +15,16 @@
     font-weight: 900;
     // font-size: 16px;
 }
-.ant-btn.ant-btn-sm {
-    position: absolute;
-    left: 50%;
-    bottom: 10px;
-}
-.ant-btn.ant-btn-primary.ant-btn-sm {
-    position: absolute;
-    left: 33%;
-    bottom: 10px;
-}
+// .ant-btn.ant-btn-sm {
+//     position: absolute;
+//     left: 50%;
+//     bottom: 10px;
+// }
+// .ant-btn.ant-btn-primary.ant-btn-sm {
+//     position: absolute;
+//     left: 33%;
+//     bottom: 10px;
+// }
 .test>.ant-tabs-bar {
     margin-bottom: 0 !important;
 }

+ 26 - 11
js/component/manageCenter/financialManage/orderDetail/orderDetail.jsx

@@ -534,16 +534,16 @@ const OrderDetail = Form.create()(
           orderNo: orderNos
         },
         success: function(data) {
-          let theArr = [];
-          let thisData = [];
-          if (!thisData) {
-            if (data.error && data.error.length) {
-              message.warning(data.error[0].message);
-            }
-            thisData = {};
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
           } else {
-            for (let i = 0; i < data.data.length; i++) {
-              thisData = data.data[i];
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
               theArr.push({
                 key: i,
                 dunSubject: thisData.dunSubject
@@ -559,11 +559,17 @@ const OrderDetail = Form.create()(
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
                 startDate: thisData.startDate,
+                dunType: thisData.dunType,
                 appropriationRatio: thisData.appropriationRatio
               });
             }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
             this.setState({
-              contactListNew: theArr
+              contactListNew: theArr,
+              totalCui
             });
           }
         }.bind(this)
@@ -951,9 +957,18 @@ const OrderDetail = Form.create()(
                 </div>
               </div>
               <div>
-                <span style={{ marginLeft: 20, fontSize: "18px", }}>
+                <span style={{ marginLeft: 20, fontSize: "18px" }}>
                   催款节点
                 </span>
+                <span
+                  style={{
+                    display: cuiDataList.length ? "none" : "inline-block",
+                    marginLeft: 10,
+                    color: "red"
+                  }}
+                >
+                  金额总计(万元): {this.state.totalCui}
+                </span>
               </div>
               <div className="clearfix">
                 <Spin spinning={this.state.loading}>

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

@@ -392,8 +392,6 @@ 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;
@@ -409,7 +407,6 @@ const NewService = Form.create()(
                         });
                       }
                     });
-                    console.log(e);
                   }}
                 >
                   {dataArr.map(item => {
@@ -471,8 +468,6 @@ const NewService = Form.create()(
               }
               if (this.state.getLoad) {
                 let arr = record.arr || [];
-                console.log("arrrr", arr);
-
                 return (
                   <Select
                     style={{ width: "150px" }}
@@ -506,7 +501,6 @@ const NewService = Form.create()(
                           boFlag: false
                         });
                       }
-                      console.log(e);
                     }}
                   >
                     {arr.map(item => {
@@ -537,7 +531,9 @@ const NewService = Form.create()(
             key: "waitDay",
             render: (text, record) => {
               if (record.dunTypeName) {
-                if (!text) {
+                if (text == 0) {
+                  var str = "当天";
+                } else if (!text) {
                   var str = "";
                 } else {
                   var str = text + "天";
@@ -554,9 +550,7 @@ const NewService = Form.create()(
                       : true
                   }
                   onChange={e => {
-                    console.log("ee", e);
                     record.waitDay = e;
-                    console.log("time", record);
                   }}
                 >
                   <Select.Option key={0}>当天</Select.Option>
@@ -607,7 +601,7 @@ const NewService = Form.create()(
                     <div style={{ float: "right" }}>
                       <Input
                         value={record.money}
-                        placeholder="请输入金额(必填项)"
+                        placeholder="请根据左侧类型填写"
                         key={record.id}
                         required="required"
                         onChange={e => {
@@ -652,9 +646,9 @@ const NewService = Form.create()(
                   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> */}
@@ -710,9 +704,6 @@ const NewService = Form.create()(
                       type="primary"
                       onClick={e => {
                         this.contactSaveNew(record);
-                        this.setState({
-                          addFlag: false
-                        });
                       }}
                     >
                       保存
@@ -822,17 +813,23 @@ const NewService = Form.create()(
       for (let i = 0; i < arr.length; i++) {
         if (
           arr[i].dunType == 1 &&
-          arr[i].waitDay &&
-          this.state.approval == 0
+          arr[i].waitDay != null &&
+          this.state.approval == 0 
         ) {
           message.warning(
             "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
           );
           return false;
-        }else if(arr[i].dunType == 1 && !arr[i].waitDay && this.state.approval == 1) {
-          message.warning("特批存在首付催款节点未填写时间的情况,请删除后重新填写保存")
-          return false
-        }
+        }else if (
+                arr[i].dunType == 1 &&
+                arr[i].waitDay == null &&
+                this.state.approval == 1
+              ) {
+                message.warning(
+                  "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
+                );
+                return false;
+              }
         if (!this.state.contactListNew[i].id && this.props.userDetaile) {
           message.warning("请保存催款节点");
           return false;
@@ -995,7 +992,8 @@ const NewService = Form.create()(
                 : thisData.approval,
             organizationSearch: thisData.orderDep,
             depName: thisData.depName,
-            status: thisData.status
+            status: thisData.status,
+            outsource: thisData.outsource
           });
           // console.log("kkkk",this.state.processStatus);
         }.bind(this)
@@ -1240,17 +1238,16 @@ const NewService = Form.create()(
           orderNo: orderNos
         },
         success: function(data) {
-          let theArr = [];
-          let thisData = [];
-          if (!thisData) {
-            if (data.error && data.error.length) {
+          if (data.error && data.error.length) {
               message.warning(data.error[0].message);
-            }
-            thisData = {};
           } else {
+            let theArr = [];
+            let thisData = [];
             let arr = data.data || []
+            let totalCui = 0
             for (let i = 0; i < arr.length; i++) {
               thisData = arr[i];
+              totalCui += +thisData.money
               theArr.push({
                 key: i,
                 dunSubject: thisData.dunSubject
@@ -1270,8 +1267,13 @@ const NewService = Form.create()(
                 appropriationRatio: thisData.appropriationRatio
               });
             }
+            if(!totalCui) {
+              totalCui = 0
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
             this.setState({
-              contactListNew: theArr
+              contactListNew: theArr,
+              totalCui
             });
           }
         }.bind(this)
@@ -1316,6 +1318,11 @@ const NewService = Form.create()(
     },
     //催款节点保存
     contactSaveNew(record) {
+      if(record.boStatus == "false") {
+        record.boStatus = false
+      }else if(record.boStatus == "true") {
+        record.boStatus = true
+      }
       if (!this.state.yearFlag) {
         if (!record.effectiveCount) {
           message.warning("请选择服务年限");
@@ -1368,7 +1375,8 @@ const NewService = Form.create()(
               message.success("保存成功!");
               this.setState({
                 cuiFlag: false,
-                boFlag: false
+                boFlag: false,
+                addFlag: false
               });
               this.jiedianNew(record.orderNo);
             } else {
@@ -1398,7 +1406,8 @@ const NewService = Form.create()(
               message.success("保存成功!");
               this.setState({
                 cuiFlag: false,
-                boFlag: false
+                boFlag: false,
+                addFlag: false
               });
               this.jiedianNew(record.orderNo);
             } else {
@@ -1739,7 +1748,7 @@ const NewService = Form.create()(
           this.setState({
             customerCuiArr: thedata
           });
-          console.log(thedata);
+          
         }.bind(this)
       }).always(
         function() {
@@ -2251,18 +2260,18 @@ const NewService = Form.create()(
         //   label: "首付金额(万元)",
         //   content: <span>{this.state.firstAmount}</span>
         // },
-        {
-          label: "特批立项",
-          content: <span>{getApprovedState(this.state.approval)}</span>
-        },
-        {
-          label: "合同签订时间",
-          content: <span>{this.state.signDate}</span>
-        },
-        {
-          label: "订单部门",
-          content: <span>{this.state.depName}</span>
-        }
+        // {
+        //   label: "特批立项",
+        //   content: <span>{getApprovedState(this.state.approval)}</span>
+        // },
+        // {
+        //   label: "合同签订时间",
+        //   content: <span>{this.state.signDate}</span>
+        // },
+        // {
+        //   label: "订单部门",
+        //   content: <span>{this.state.depName}</span>
+        // }
       ];
       const dataSources = this.state.customerArr || [];
       const cuiDataList = this.state.contactList || [];
@@ -2533,6 +2542,13 @@ const NewService = Form.create()(
                                 >
                                   <span>{this.state.depName}</span>
                                 </FormItem>
+                                <FormItem
+                                  className="half-item"
+                                  {...formItemLayout}
+                                  label="是否外包"
+                                >
+                                  <span>{this.state.outsource == 0 ? "否" : "是"}</span>
+                                </FormItem>
                               </div>
                             )}
                           </div>
@@ -3040,6 +3056,7 @@ const NewService = Form.create()(
                             >
                               新催款节点
                             </span>
+                            <span style={{ display: "inline-block", marginLeft: 10, color: "red" }}>金额总计(万元): {this.state.totalCui}</span>
                             <Button
                               type="primary"
                               disabled={this.state.addFlag ? true : false}

+ 25 - 10
js/component/manageCenter/order/orderNew/approveds.jsx

@@ -663,16 +663,16 @@ const IntentionCustomer = Form.create()(
           orderNo: orderNos
         },
         success: function(data) {
-          let theArr = [];
-          let thisData = [];
-          if (!thisData) {
-            if (data.error && data.error.length) {
-              message.warning(data.error[0].message);
-            }
-            thisData = {};
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
           } else {
-            for (let i = 0; i < data.data.length; i++) {
-              thisData = data.data[i];
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
               theArr.push({
                 key: i,
                 dunSubject: thisData.dunSubject
@@ -688,11 +688,17 @@ const IntentionCustomer = Form.create()(
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
                 startDate: thisData.startDate,
+                dunType: thisData.dunType,
                 appropriationRatio: thisData.appropriationRatio
               });
             }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
             this.setState({
-              contactListNew: theArr
+              contactListNew: theArr,
+              totalCui
             });
           }
         }.bind(this)
@@ -1178,6 +1184,15 @@ const IntentionCustomer = Form.create()(
                       <span style={{ marginLeft: 20, fontSize: "18px" }}>
                         催款节点
                       </span>
+                      <span
+                        style={{
+                          display: cuiDataList.length ? "none" : "inline-block",
+                          marginLeft: 10,
+                          color: "red"
+                        }}
+                      >
+                        金额总计(万元): {this.state.totalCui}
+                      </span>
                     </div>
                     <div className="clearfix">
                       <Spin spinning={this.state.loading}>

+ 21 - 34
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzy.js

@@ -516,7 +516,6 @@ class ChangeDetail extends Component {
     });
   }
 
-  催款节点保存;
   contactSave(index) {
     if (this.state.contactList) {
       let Data = this.state.contactList;
@@ -609,7 +608,7 @@ class ChangeDetail extends Component {
     // if (this.state.contactList[num + 1].key) {
     //   this.state.contactList[num + 1].key = index.key;
     // }
-    if (index.key) {
+    if (index.key || !index.id) {
       let num = this.state.contactList.findIndex(item => item.key == index.key);
       this.state.contactList.splice(num, 1);
       let total = 0;
@@ -620,40 +619,28 @@ class ChangeDetail extends Component {
         contactList: this.state.contactList,
         refundInvoice: total
       });
-      return;
+    }else {
+      $.ajax({
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/deleteOrderRefundInvoice",
+        method: "post",
+        data: {
+          id: index.id
+        }
+      }).done(
+        function(data) {
+          if (!data.error.length) {
+            message.success("删除成功!");
+            this.reLoad();
+          } else {
+            message.warning(data.error[0].message);
+          }
+        }.bind(this)
+      );
     }
 
-    $.ajax({
-      url:
-        globalConfig.context +
-        "/api/admin/orderChange/deleteOrderRefundInvoice",
-      method: "post",
-      data: {
-        id: index.id
-      }
-    }).done(
-      function(data) {
-        if (!data.error.length) {
-          message.success("保存成功!");
-          let num = this.state.contactList.findIndex(
-            item => item.id == index.id
-          );
-
-          this.state.contactList.splice(num, 1);
-
-          let total = 0;
-          this.state.contactList.forEach(item => {
-            total += +item.amount;
-          });
-          this.setState({
-            contactList: this.state.contactList,
-            refundInvoice: total
-          });
-        } else {
-          message.warning(data.error[0].message);
-        }
-      }.bind(this)
-    );
+    
 
     // console.log(this.state.contactList[num + 1].key);
   }

+ 24 - 8
js/component/manageCenter/order/orderNew/changeComponent/orderDetail.js

@@ -31,11 +31,11 @@ class OrderDetail extends Component {
           dataIndex: "projectType",
           key: "projectType",
           render: text => {
-            let arr = this.state.dataSourceX || [];
+            let arr = this.props.dataSourceX || [];
             let str = "";
             for (let i = 0; i < arr.length; i++) {
-              if (this.state.dataSourceX[i].sort == text) {
-                str = this.state.dataSourceX[i].cname;
+              if (this.props.dataSourceX[i].sort == text) {
+                str = this.props.dataSourceX[i].cname;
                 return <span>{str}</span>;
               }
             }
@@ -65,7 +65,17 @@ class OrderDetail extends Component {
           key: "money",
           render: (text, record) => {
             if (record.dunTypeName) {
-              return <span>{text}</span>;
+              if (record.appropriationRatio && !record.money) {
+                return <span>{record.appropriationRatio}(拨款比例)</span>;
+              } else if (record.appropriationRatio && record.money) {
+                return (
+                  <span>
+                    {text}(比例:{record.appropriationRatio})
+                  </span>
+                );
+              } else {
+                return <span>{text}</span>;
+              }
             }
           }
         },
@@ -100,10 +110,7 @@ class OrderDetail extends Component {
         {
           title: "金额(万元)",
           dataIndex: "money",
-          key: "money",
-          render: text => {
-            return this.props.processState === 2 ? "***" : text;
-          }
+          key: "money"
         },
         {
           title: "催款状态",
@@ -565,6 +572,15 @@ class OrderDetail extends Component {
         </div>
         <div>
           <span style={{ marginLeft: "50px", fontSize: "20px" }}>催款节点</span>
+          <span
+            style={{
+              display: propsList.length ? "none" : "inline-block",
+              marginLeft: 10,
+              color: "red"
+            }}
+          >
+            金额总计(万元): {this.props.totalCui}
+          </span>
         </div>
         <div className="clearfix">
           <Form layout="horizontal" id="demand-form">

+ 1 - 1
js/component/manageCenter/order/orderNew/changeComponent/table.less

@@ -1,4 +1,4 @@
 table tr span,
 table tr td {
   white-space: normal;
-}
+}

+ 25 - 10
js/component/manageCenter/order/orderNew/chargeback.jsx

@@ -718,16 +718,16 @@ const IntentionCustomer = Form.create()(
           orderNo: orderNos
         },
         success: function(data) {
-          let theArr = [];
-          let thisData = [];
-          if (!thisData) {
-            if (data.error && data.error.length) {
-              message.warning(data.error[0].message);
-            }
-            thisData = {};
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
           } else {
-            for (let i = 0; i < data.data.length; i++) {
-              thisData = data.data[i];
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
               theArr.push({
                 key: i,
                 dunSubject: thisData.dunSubject
@@ -743,11 +743,17 @@ const IntentionCustomer = Form.create()(
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
                 startDate: thisData.startDate,
+                dunType: thisData.dunType,
                 appropriationRatio: thisData.appropriationRatio
               });
             }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
             this.setState({
-              contactListNew: theArr
+              contactListNew: theArr,
+              totalCui
             });
           }
         }.bind(this)
@@ -1136,6 +1142,15 @@ const IntentionCustomer = Form.create()(
                       <span style={{ marginLeft: "50px", fontSize: "20px" }}>
                         催款节点
                       </span>
+                      <span
+                        style={{
+                          display: cuiDataList.length ? "none" : "inline-block",
+                          marginLeft: 10,
+                          color: "red"
+                        }}
+                      >
+                        金额总计(万元): {this.state.totalCui}
+                      </span>
                     </div>
                     <div className="clearfix">
                       <Spin spinning={this.state.loading}>

File diff suppressed because it is too large
+ 1569 - 1373
js/component/manageCenter/order/orderNew/checkOutsourcing.jsx


+ 68 - 0
js/component/manageCenter/order/orderNew/contractCwzj.js

@@ -339,6 +339,7 @@ const contractChange = Form.create()(
           this.xiangqing(record.orderNo);
           this.xiangmu(record.orderNo);
           this.jiedian(record.orderNo);
+          this.jiedianNew(record.orderNo);
         }
       );
     },
@@ -667,6 +668,64 @@ const contractChange = 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) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          } else {
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
+              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,
+                dunType: thisData.dunType,
+                appropriationRatio: thisData.appropriationRatio
+              });
+            }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
+            this.setState({
+              contactListNew: theArr,
+              totalCui
+            });
+          }
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
     //审核通过
     examOk() {
       $.ajax({
@@ -815,6 +874,7 @@ const contractChange = Form.create()(
       if (key === "1") {
         this.xiangmu(this.state.orderNo);
         this.jiedian(this.state.orderNo);
+        this.jiedianNew(this.state.orderNo);
       }
       if (key === "2") {
         this.ChangeDetail(this.state.id);
@@ -824,11 +884,13 @@ const contractChange = Form.create()(
         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
         });
@@ -1072,6 +1134,8 @@ const contractChange = Form.create()(
                         dataSourceX={this.state.dataSourceX}
                         contactList={this.state.contactList}
                         orderNo={this.state.orderNo}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                         isCaiWu={true}
                       />
                     </Spin>
@@ -1109,6 +1173,8 @@ const contractChange = Form.create()(
                           contactList={this.state.contactList}
                           orderNo={this.state.primaryOrderNo}
                           isCaiWu={true}
+                          totalCui={this.state.totalCui}
+                          contactListNew={this.state.contactListNew}
                         />
                       </Spin>
                     </Form>
@@ -1126,6 +1192,8 @@ const contractChange = Form.create()(
                         contactList={this.state.contactList}
                         orderNo={this.state.additionalOrder}
                         isCaiWu={true}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                       />
                     </TabPane>
                   ) : (

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

@@ -383,6 +383,7 @@ const contractChange = Form.create()(
           this.xiangqing(record.orderNo);
           this.xiangmu(record.orderNo);
           this.jiedian(record.orderNo);
+          this.jiedianNew(record.orderNo);
         }
       );
     },
@@ -746,6 +747,64 @@ const contractChange = 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) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          } else {
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
+              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,
+                dunType: thisData.dunType,
+                appropriationRatio: thisData.appropriationRatio
+              });
+            }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
+            this.setState({
+              contactListNew: theArr,
+              totalCui
+            });
+          }
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
     //审核通过
     examOk() {
       $.ajax({
@@ -893,6 +952,7 @@ const contractChange = Form.create()(
       if (key === "1") {
         this.xiangmu(this.state.orderNo);
         this.jiedian(this.state.orderNo);
+        this.jiedianNew(this.state.orderNo);
       }
       if (key === "2") {
         this.ChangeDetail(this.state.id);
@@ -903,11 +963,13 @@ const contractChange = Form.create()(
         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
         });
@@ -1095,7 +1157,7 @@ const contractChange = Form.create()(
       this.state.pagination.pageSize = 9999;
       this.setState({
         pagination: this.state.pagination
-      }); 
+      });
       this.loadData();
     },
     exportAll() {
@@ -1270,6 +1332,8 @@ const contractChange = Form.create()(
                         dataSourceX={this.state.dataSourceX}
                         contactList={this.state.contactList}
                         orderNo={this.state.orderNo}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                         pictureUrl={this.state.contractPictureUrl}
                         isCaiWu={true}
                       />
@@ -1307,6 +1371,8 @@ const contractChange = Form.create()(
                           dataSourceX={this.state.dataSourceX}
                           contactList={this.state.contactList}
                           orderNo={this.state.primaryOrderNo}
+                          totalCui={this.state.totalCui}
+                          contactListNew={this.state.contactListNew}
                           isCaiWu={true}
                         />
                       </Spin>
@@ -1323,6 +1389,8 @@ const contractChange = Form.create()(
                         getOrderLog={this.getOrderLog}
                         dataSourceX={this.state.dataSourceX}
                         contactList={this.state.contactList}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                         orderNo={this.state.additionalOrder}
                         isCaiWu={true}
                       />

+ 76 - 11
js/component/manageCenter/order/orderNew/contractJsjl.js

@@ -335,10 +335,10 @@ const contractChange = Form.create()(
           this.xiangqing(record.orderNo);
           this.xiangmu(record.orderNo);
           this.jiedian(record.orderNo);
+          this.jiedianNew(record.orderNo);
         }
       );
       // console.log("row",this.state.activeKey);
-      
     },
     //点击打卡项目详情
     tableRowClickX(record) {
@@ -408,9 +408,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;
           });
@@ -436,16 +436,15 @@ 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
           });
         }
       });
-
     },
 
     //订单详情
@@ -666,6 +665,64 @@ const contractChange = 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) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          } else {
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
+              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,
+                dunType: thisData.dunType,
+                appropriationRatio: thisData.appropriationRatio
+              });
+            }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
+            this.setState({
+              contactListNew: theArr,
+              totalCui
+            });
+          }
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
     //审核通过
     examOk() {
       $.ajax({
@@ -811,10 +868,11 @@ const contractChange = Form.create()(
         activeKey: key
       });
       // console.log("change",this.state.activeKey);
-      
+
       if (key === "1") {
         this.xiangmu(this.state.orderNo);
         this.jiedian(this.state.orderNo);
+        this.jiedianNew(this.state.orderNo);
       }
       if (key === "2") {
         this.ChangeDetail(this.state.id);
@@ -824,11 +882,13 @@ const contractChange = Form.create()(
         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
         });
@@ -991,7 +1051,6 @@ const contractChange = Form.create()(
       );
       this.loadData(this.state.page);
       // console.log("table",this.state.activeKey);
-      
     },
     visitOk() {
       this.setState({
@@ -1049,6 +1108,8 @@ const contractChange = Form.create()(
                         dataSourceX={this.state.dataSourceX}
                         contactList={this.state.contactList}
                         orderNo={this.state.orderNo}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                       />
                     </Spin>
                   </Form>
@@ -1083,6 +1144,8 @@ const contractChange = Form.create()(
                           dataSourceX={this.state.dataSourceX}
                           contactList={this.state.contactList}
                           orderNo={this.state.primaryOrderNo}
+                          totalCui={this.state.totalCui}
+                          contactListNew={this.state.contactListNew}
                         />
                       </Spin>
                     </Form>
@@ -1099,6 +1162,8 @@ const contractChange = Form.create()(
                         dataSourceX={this.state.dataSourceX}
                         contactList={this.state.contactList}
                         orderNo={this.state.additionalOrder}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                       />
                     </TabPane>
                   ) : (

+ 68 - 0
js/component/manageCenter/order/orderNew/contractJsy.js

@@ -332,6 +332,7 @@ const contractChange = Form.create()(
           this.xiangqing(record.orderNo);
           this.xiangmu(record.orderNo);
           this.jiedian(record.orderNo);
+          this.jiedianNew(record.orderNo);
         }
       );
     },
@@ -611,6 +612,64 @@ const contractChange = 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) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          } else {
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
+              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,
+                dunType: thisData.dunType,
+                appropriationRatio: thisData.appropriationRatio
+              });
+            }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
+            this.setState({
+              contactListNew: theArr,
+              totalCui
+            });
+          }
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
     //审核通过
     examOk() {
       $.ajax({
@@ -758,6 +817,7 @@ const contractChange = Form.create()(
       if (key === "1") {
         this.xiangmu(this.state.orderNo);
         this.jiedian(this.state.orderNo);
+        this.jiedianNew(this.state.orderNo);
       }
       if (key === "2") {
         this.ChangeDetail(this.state.orderNo);
@@ -767,11 +827,13 @@ const contractChange = Form.create()(
         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
         });
@@ -991,6 +1053,8 @@ const contractChange = Form.create()(
                         dataSourceX={this.state.dataSourceX}
                         contactList={this.state.contactList}
                         orderNo={this.state.orderNo}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                       />
                     </Spin>
                   </Form>
@@ -1022,6 +1086,8 @@ const contractChange = Form.create()(
                           dataSourceX={this.state.dataSourceX}
                           contactList={this.state.contactList}
                           orderNo={this.state.primaryOrderNo}
+                          totalCui={this.state.totalCui}
+                          contactListNew={this.state.contactListNew}
                         />
                       </Spin>
                     </Form>
@@ -1039,6 +1105,8 @@ const contractChange = Form.create()(
                         dataSourceX={this.state.dataSourceX}
                         contactList={this.state.contactList}
                         orderNo={this.state.additionalOrder}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                       />
                     </TabPane>
                   ) : (

+ 116 - 49
js/component/manageCenter/order/orderNew/contractJszj.js

@@ -334,6 +334,7 @@ const contractChange = Form.create()(
           this.xiangqing(record.orderNo);
           this.xiangmu(record.orderNo);
           this.jiedian(record.orderNo);
+          this.jiedianNew(record.orderNo);
         }
       );
     },
@@ -394,55 +395,54 @@ const contractChange = Form.create()(
         }.bind(this)
       });
 
-        $.ajax({
-          method: "get",
-          dataType: "json",
-          crossDomain: false,
-          url:
-            globalConfig.context +
-            "/api/admin/orderChange/listOrderInvoiceAndBill",
-          data: {
-            orderNo: this.state.orderNo
-          },
-          success: function(data) {
-            if (!data.data) return;
-            let proTotal = 0;
-            let invTotal = 0;
-            data.data.bill.forEach(item => {
-              proTotal += item.transactionAmount;
-            });
-            data.data.invoice.forEach(item => {
-              invTotal += item.amount;
-            });
-            this.setState({
-              proceedsData: data.data,
-              proTotal,
-              invTotal
-            });
-          }.bind(this)
-        });
-
-        $.ajax({
-          method: "get",
-          dataType: "json",
-          crossDomain: false,
-          url:
-            globalConfig.context +
-            "/api/admin/orderChange/listOrderRefundInvoice",
-          data: {
-            orderNo: this.state.orderNo
-          },
-          success: data => {
-            if (!data) return;
-            data.data.forEach(item => {
-              item.load = true;
-            });
-            this.setState({
-              refundInvoice: data.data
-            });
-          }
-        });
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderInvoiceAndBill",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: function(data) {
+          if (!data.data) return;
+          let proTotal = 0;
+          let invTotal = 0;
+          data.data.bill.forEach(item => {
+            proTotal += item.transactionAmount;
+          });
+          data.data.invoice.forEach(item => {
+            invTotal += item.amount;
+          });
+          this.setState({
+            proceedsData: data.data,
+            proTotal,
+            invTotal
+          });
+        }.bind(this)
+      });
 
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderRefundInvoice",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: data => {
+          if (!data) return;
+          data.data.forEach(item => {
+            item.load = true;
+          });
+          this.setState({
+            refundInvoice: data.data
+          });
+        }
+      });
     },
 
     //订单详情
@@ -663,6 +663,64 @@ const contractChange = 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) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          } else {
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
+              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,
+                dunType: thisData.dunType,
+                appropriationRatio: thisData.appropriationRatio
+              });
+            }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
+            this.setState({
+              contactListNew: theArr,
+              totalCui
+            });
+          }
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
     //审核通过
     examOk() {
       $.ajax({
@@ -810,6 +868,7 @@ const contractChange = Form.create()(
       if (key === "1") {
         this.xiangmu(this.state.orderNo);
         this.jiedian(this.state.orderNo);
+        this.jiedianNew(this.state.orderNo);
       }
       if (key === "2") {
         this.ChangeDetail(this.state.id);
@@ -819,11 +878,13 @@ const contractChange = Form.create()(
         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
         });
@@ -1008,7 +1069,7 @@ const contractChange = Form.create()(
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
-                 size="small"
+                  size="small"
                   bordered
                   columns={this.state.columns}
                   dataSource={this.state.dataSource}
@@ -1040,6 +1101,8 @@ const contractChange = Form.create()(
                         getOrderLog={this.getOrderLog}
                         dataSourceX={this.state.dataSourceX}
                         contactList={this.state.contactList}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                         orderNo={this.state.orderNo}
                       />
                     </Spin>
@@ -1075,6 +1138,8 @@ const contractChange = Form.create()(
                           dataSourceX={this.state.dataSourceX}
                           contactList={this.state.contactList}
                           orderNo={this.state.primaryOrderNo}
+                          totalCui={this.state.totalCui}
+                          contactListNew={this.state.contactListNew}
                         />
                       </Spin>
                     </Form>
@@ -1091,6 +1156,8 @@ const contractChange = Form.create()(
                         dataSourceX={this.state.dataSourceX}
                         contactList={this.state.contactList}
                         orderNo={this.state.additionalOrder}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                       />
                     </TabPane>
                   ) : (

+ 120 - 51
js/component/manageCenter/order/orderNew/contractYxgly.js

@@ -329,6 +329,7 @@ const contractChange = Form.create()(
           this.xiangqing(record.orderNo);
           this.xiangmu(record.orderNo);
           this.jiedian(record.orderNo);
+          this.jiedianNew(record.orderNo);
         }
       );
     },
@@ -360,7 +361,9 @@ const contractChange = Form.create()(
         method: "get",
         dataType: "json",
         crossDomain: false,
-        url: globalConfig.context + "/api/admin/orderChange/orderChangeDetailsById",
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/orderChangeDetailsById",
         data: {
           id: this.state.id
         },
@@ -387,55 +390,54 @@ const contractChange = Form.create()(
         }.bind(this)
       });
 
-        $.ajax({
-          method: "get",
-          dataType: "json",
-          crossDomain: false,
-          url:
-            globalConfig.context +
-            "/api/admin/orderChange/listOrderInvoiceAndBill",
-          data: {
-            orderNo: this.state.orderNo
-          },
-          success: function(data) {
-            if (!data.data) return;
-            let proTotal = 0;
-            let invTotal = 0;
-            data.data.bill.forEach(item => {
-              proTotal += item.transactionAmount;
-            });
-            data.data.invoice.forEach(item => {
-              invTotal += item.amount;
-            });
-            this.setState({
-              proceedsData: data.data,
-              proTotal,
-              invTotal
-            });
-          }.bind(this)
-        });
-
-        $.ajax({
-          method: "get",
-          dataType: "json",
-          crossDomain: false,
-          url:
-            globalConfig.context +
-            "/api/admin/orderChange/listOrderRefundInvoice",
-          data: {
-            orderNo: this.state.orderNo
-          },
-          success: data => {
-            if (!data) return;
-            data.data.forEach(item => {
-              item.load = true;
-            });
-            this.setState({
-              refundInvoice: data.data
-            });
-          }
-        });
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderInvoiceAndBill",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: function(data) {
+          if (!data.data) return;
+          let proTotal = 0;
+          let invTotal = 0;
+          data.data.bill.forEach(item => {
+            proTotal += item.transactionAmount;
+          });
+          data.data.invoice.forEach(item => {
+            invTotal += item.amount;
+          });
+          this.setState({
+            proceedsData: data.data,
+            proTotal,
+            invTotal
+          });
+        }.bind(this)
+      });
 
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderRefundInvoice",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: data => {
+          if (!data) return;
+          data.data.forEach(item => {
+            item.load = true;
+          });
+          this.setState({
+            refundInvoice: data.data
+          });
+        }
+      });
     },
 
     //订单详情
@@ -656,6 +658,64 @@ const contractChange = 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) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          } else {
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
+              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,
+                dunType: thisData.dunType,
+                appropriationRatio: thisData.appropriationRatio
+              });
+            }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
+            this.setState({
+              contactListNew: theArr,
+              totalCui
+            });
+          }
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
     //审核通过
     examOk() {
       $.ajax({
@@ -773,7 +833,7 @@ const contractChange = Form.create()(
     // componentDidMount(){
     //   window.setTimeout(() => {
     //     console.log(this.state.dataProps);
-      
+
     //   },100)
     // },
 
@@ -796,7 +856,7 @@ const contractChange = Form.create()(
             // console.log("拿到历史", data.data);
 
             this.setState({
-              dataProps: data.data,
+              dataProps: data.data
             });
           }
         }.bind(this)
@@ -810,6 +870,7 @@ const contractChange = Form.create()(
       if (key === "1") {
         this.xiangmu(this.state.orderNo);
         this.jiedian(this.state.orderNo);
+        this.jiedianNew(this.state.orderNo);
       }
       if (key === "2") {
         this.ChangeDetail(this.state.orderNo);
@@ -819,11 +880,13 @@ const contractChange = Form.create()(
         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
         });
@@ -1043,8 +1106,10 @@ const contractChange = Form.create()(
                       <OrderDetail
                         orderData={this.state.orderData}
                         getOrderLog={this.getOrderLog}
+                        totalCui={this.state.totalCui}
                         dataSourceX={this.state.dataSourceX}
                         contactList={this.state.contactList}
+                        contactListNew={this.state.contactListNew}
                         orderNo={this.state.orderNo}
                       />
                     </Spin>
@@ -1077,6 +1142,8 @@ const contractChange = Form.create()(
                           getOrderLog={this.getOrderLog}
                           dataSourceX={this.state.dataSourceX}
                           contactList={this.state.contactList}
+                          totalCui={this.state.totalCui}
+                          contactListNew={this.state.contactListNew}
                           orderNo={this.state.primaryOrderNo}
                         />
                       </Spin>
@@ -1092,6 +1159,8 @@ const contractChange = Form.create()(
                         orderData={this.state.additionalOrderData}
                         getOrderLog={this.getOrderLog}
                         dataSourceX={this.state.dataSourceX}
+                        totalCui={this.state.totalCui}
+                        contactListNew={this.state.contactListNew}
                         contactList={this.state.contactList}
                         orderNo={this.state.additionalOrder}
                       />

+ 23 - 13
js/component/manageCenter/order/orderNew/contractYxy.js

@@ -679,7 +679,6 @@ const contractChange = Form.create()(
       });
     },
     jiedianNew(orderNos) {
-      this.state.orderList = [];
       $.ajax({
         method: "get",
         dataType: "json",
@@ -690,16 +689,16 @@ const contractChange = Form.create()(
           orderNo: orderNos
         },
         success: function(data) {
-          let theArr = [];
-          let thisData = [];
-          if (!thisData) {
-            if (data.error && data.error.length) {
-              message.warning(data.error[0].message);
-            }
-            thisData = {};
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
           } else {
-            for (let i = 0; i < data.data.length; i++) {
-              thisData = data.data[i];
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
               theArr.push({
                 key: i,
                 dunSubject: thisData.dunSubject
@@ -707,18 +706,25 @@ const contractChange = Form.create()(
                   : "", //催款科目
                 id: thisData.id, //节点Id
                 money: thisData.money, //催款金额
-                orderNo: record ? record.orderNo : this.props.datauser.orderNo,
+                // 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
+                startDate: thisData.startDate,
+                dunType: thisData.dunType,
+                appropriationRatio: thisData.appropriationRatio
               });
             }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
             this.setState({
-              contactListNew: theArr
+              contactListNew: theArr,
+              totalCui
             });
           }
         }.bind(this)
@@ -1134,6 +1140,7 @@ const contractChange = Form.create()(
                       data={this.state.orderData.orderNo}
                       mark={this.state.buttonStatus}
                       getPrimaryOrder={this.getPrimaryOrder}
+                      totalCui={this.state.totalCui}
                       closeDesc={this.closeDesc}
                       getAdditionalOrder={this.getAdditionalOrder}
                       deleteSign={this.state.orderData.deleteSign}
@@ -1151,6 +1158,7 @@ const contractChange = Form.create()(
                         <OrderDetail
                           orderData={this.state.orderData}
                           getOrderLog={this.getOrderLog}
+                          totalCui={this.state.totalCui}
                           dataSourceX={this.state.dataSourceX}
                           contactList={this.state.contactList}
                           contactListNew={this.state.contactListNew}
@@ -1195,6 +1203,8 @@ const contractChange = Form.create()(
                           dataSourceX={this.state.dataSourceX}
                           contactList={this.state.contactList}
                           orderNo={this.state.primaryOrderNo}
+                          totalCui={this.state.totalCui}
+                          contactListNew={this.state.contactListNew}
                         />
                       </Spin>
                     </Form>

+ 34 - 16
js/component/manageCenter/order/orderNew/examine.jsx

@@ -11,7 +11,8 @@ import {
   Form,
   Modal,
   Tabs,
-  Col
+  Col,
+  Popconfirm
 } from "antd";
 import $ from "jquery/src/ajax";
 import moment from "moment";
@@ -699,16 +700,16 @@ const IntentionCustomer = Form.create()(
           orderNo: orderNos
         },
         success: function(data) {
-          let theArr = [];
-          let thisData = [];
-          if (!thisData) {
-            if (data.error && data.error.length) {
-              message.warning(data.error[0].message);
-            }
-            thisData = {};
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
           } else {
-            for (let i = 0; i < data.data.length; i++) {
-              thisData = data.data[i];
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
               theArr.push({
                 key: i,
                 dunSubject: thisData.dunSubject
@@ -724,11 +725,17 @@ const IntentionCustomer = Form.create()(
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
                 startDate: thisData.startDate,
+                dunType: thisData.dunType,
                 appropriationRatio: thisData.appropriationRatio
               });
             }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
             this.setState({
-              contactListNew: theArr
+              contactListNew: theArr,
+              totalCui
             });
           }
         }.bind(this)
@@ -1113,7 +1120,7 @@ const IntentionCustomer = Form.create()(
       });
       this.resets();
     },
-    showDeleteConfirm() {
+    showDeleteConfirm(fn) {
       confirm({
         title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
         content: (
@@ -1125,7 +1132,7 @@ const IntentionCustomer = Form.create()(
         okType: "danger",
         cancelText: "取消",
         onOk() {
-          this.examOk();
+          fn()
         },
         onCancel() {}
       });
@@ -1493,6 +1500,17 @@ const IntentionCustomer = Form.create()(
                           >
                             催款节点
                           </span>
+                          <span
+                            style={{
+                              display: cuiDataList.length
+                                ? "none"
+                                : "inline-block",
+                              marginLeft: 10,
+                              color: "red"
+                            }}
+                          >
+                            金额总计(万元): {this.state.totalCui}
+                          </span>
                           {this.state.processStatus == 0 ? (
                             <Button
                               type="primary"
@@ -1541,9 +1559,9 @@ const IntentionCustomer = Form.create()(
                             // onClick={this.examOk}
                             onClick={() => {
                               if (this.state.outsource == "是") {
-                                this.showDeleteConfirm()
-                              }else {
-                                this.examOk()
+                                this.showDeleteConfirm(this.examOk);
+                              } else {
+                                this.examOk();
                               }
                             }}
                             style={{ marginLeft: "200px" }}

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


+ 62 - 20
js/component/manageCenter/order/orderNew/outsourcingList.jsx

@@ -12,7 +12,8 @@ import {
   Form,
   Modal,
   Tabs,
-  Col
+  Col,
+  Popconfirm
 } from "antd";
 import $ from "jquery/src/ajax";
 import moment from "moment";
@@ -30,6 +31,7 @@ import {
 } from "@/tools.js";
 import "./customer.less";
 import ShowModalDiv from "@/showModal.jsx";
+const confirm = Modal.confirm;
 import OrderRiZi from "@/orderRiZi.jsx";
 //图片组件
 const PicturesWall = React.createClass({
@@ -445,7 +447,7 @@ const outsourcingList = Form.create()(
             render: (text, record, index) => {
               return (
                 <div>
-                  {this.state.processStatus == 0 ? (
+                  {/* {this.state.processStatus == 0 ? (
                     <Popconfirm
                       title="是否删除?"
                       onConfirm={() => {
@@ -479,7 +481,7 @@ const outsourcingList = Form.create()(
                     </Button>
                   ) : (
                     ""
-                  )}
+                  )} */}
                 </div>
               );
             }
@@ -904,16 +906,16 @@ const outsourcingList = Form.create()(
           orderNo: orderNos
         },
         success: function(data) {
-          let theArr = [];
-          let thisData = [];
-          if (!thisData) {
-            if (data.error && data.error.length) {
-              message.warning(data.error[0].message);
-            }
-            thisData = {};
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
           } else {
-            for (let i = 0; i < data.data.length; i++) {
-              thisData = data.data[i];
+            let theArr = [];
+            let thisData = [];
+            let arr = data.data || [];
+            let totalCui = 0;
+            for (let i = 0; i < arr.length; i++) {
+              thisData = arr[i];
+              totalCui += +thisData.money;
               theArr.push({
                 key: i,
                 dunSubject: thisData.dunSubject
@@ -929,11 +931,17 @@ const outsourcingList = Form.create()(
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
                 startDate: thisData.startDate,
+                dunType: thisData.dunType,
                 appropriationRatio: thisData.appropriationRatio
               });
             }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
             this.setState({
-              contactListNew: theArr
+              contactListNew: theArr,
+              totalCui
             });
           }
         }.bind(this)
@@ -1288,6 +1296,23 @@ const outsourcingList = Form.create()(
       });
       this.resets();
     },
+    showDeleteConfirm(fn) {
+      confirm({
+        title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
+        content: (
+          <p style={{ fontWeight: 900, color: "red" }}>
+            当前订单为外包单,您确定修改为普通订单?
+          </p>
+        ),
+        okText: "确定",
+        okType: "danger",
+        cancelText: "取消",
+        onOk() {
+          fn();
+        },
+        onCancel() {}
+      });
+    },
     render() {
       const formItemLayout = {
         labelCol: { span: 8 },
@@ -1632,7 +1657,7 @@ const outsourcingList = Form.create()(
                           >
                             项目业务
                           </span>
-                          {this.state.processStatus == 0 ? (
+                          {/* {this.state.processStatus == 0 ? (
                             <Button
                               type="primary"
                               onClick={this.addDetailed}
@@ -1646,7 +1671,7 @@ const outsourcingList = Form.create()(
                             </Button>
                           ) : (
                             ""
-                          )}
+                          )} */}
                         </div>
                         <div className="patent-table">
                           <Spin spinning={this.state.loading}>
@@ -1670,7 +1695,7 @@ const outsourcingList = Form.create()(
                           >
                             催款节点
                           </span>
-                          {this.state.processStatus == 0 ? (
+                          {/* {this.state.processStatus == 0 ? (
                             <Button
                               type="primary"
                               onClick={this.addcontact}
@@ -1685,7 +1710,7 @@ const outsourcingList = Form.create()(
                             </Button>
                           ) : (
                             ""
-                          )}
+                          )} */}
                         </div>
                         <div
                           className="clearfix"
@@ -1721,7 +1746,18 @@ const outsourcingList = Form.create()(
                           >
                             催款节点
                           </span>
-                          {this.state.processStatus == 0 ? (
+                          <span
+                            style={{
+                              display: cuiDataList.length
+                                ? "none"
+                                : "inline-block",
+                              marginLeft: 10,
+                              color: "red"
+                            }}
+                          >
+                            金额总计(万元): {this.state.totalCui}
+                          </span>
+                          {/* {this.state.processStatus == 0 ? (
                             <Button
                               type="primary"
                               onClick={this.addcontactNew}
@@ -1736,7 +1772,7 @@ const outsourcingList = Form.create()(
                             </Button>
                           ) : (
                             ""
-                          )}
+                          )} */}
                         </div>
                         <div
                           className="clearfix"
@@ -1769,7 +1805,13 @@ const outsourcingList = Form.create()(
                           >
                             <Button
                               type="primary"
-                              onClick={this.examOk}
+                              onClick={() => {
+                                if (this.state.outsource == "是") {
+                                  this.showDeleteConfirm(this.examOk);
+                                } else {
+                                  this.examOk();
+                                }
+                              }}
                               style={{ marginLeft: "200px" }}
                               htmlType="submit"
                             >

+ 36 - 12
js/component/manageCenter/order/orderNew/reject.jsx

@@ -485,7 +485,9 @@ const IntentionCustomer = Form.create()(
             key: "waitDay",
             render: (text, record) => {
               if (record.dunTypeName) {
-                if (!text) {
+                if (text == 0) {
+                  var str = "当天";
+                } else if (!text) {
                   var str = "";
                 } else {
                   var str = text + "天";
@@ -552,7 +554,7 @@ const IntentionCustomer = Form.create()(
                     <div style={{ float: "right" }}>
                       <Input
                         value={record.money}
-                        placeholder="请输入金额(必填项)"
+                        placeholder="请根据左侧类型填写"
                         key={record.id}
                         required="required"
                         onChange={e => {
@@ -1010,17 +1012,16 @@ const IntentionCustomer = Form.create()(
           orderNo: orderNos
         },
         success: function(data) {
-          let theArr = [];
-          let thisData = [];
-          if (!thisData) {
-            if (data.error && data.error.length) {
-              message.warning(data.error[0].message);
-            }
-            thisData = {};
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
           } else {
+            let theArr = [];
+            let thisData = [];
             let arr = data.data || [];
+            let totalCui = 0;
             for (let i = 0; i < arr.length; i++) {
               thisData = arr[i];
+              totalCui += +thisData.money;
               theArr.push({
                 key: i,
                 dunSubject: thisData.dunSubject
@@ -1040,8 +1041,13 @@ const IntentionCustomer = Form.create()(
                 appropriationRatio: thisData.appropriationRatio
               });
             }
+            if (!totalCui) {
+              totalCui = 0;
+            }
+            totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
             this.setState({
-              contactListNew: theArr
+              contactListNew: theArr,
+              totalCui
             });
           }
         }.bind(this)
@@ -1086,6 +1092,11 @@ const IntentionCustomer = Form.create()(
     },
     //催款节点保存
     contactSaveNew(record) {
+      if (record.boStatus == "false") {
+        record.boStatus = false;
+      } else if (record.boStatus == "true") {
+        record.boStatus = true;
+      }
       if (!this.state.yearFlag) {
         if (!record.effectiveCount) {
           message.warning("请选择服务年限");
@@ -1327,7 +1338,11 @@ const IntentionCustomer = Form.create()(
       }
       const arr = this.state.contactListNew || [];
       for (let i = 0; i < arr.length; i++) {
-        if (arr[i].dunType == 1 && arr[i].waitDay && this.state.approval == 0) {
+        if (
+          arr[i].dunType == 1 &&
+          arr[i].waitDay != null &&
+          this.state.approval == 0
+        ) {
           message.warning(
             "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
           );
@@ -1337,7 +1352,7 @@ const IntentionCustomer = Form.create()(
           return false;
         } else if (
           arr[i].dunType == 1 &&
-          !arr[i].waitDay &&
+          arr[i].waitDay == null &&
           this.state.approval == 1
         ) {
           message.warning(
@@ -2329,6 +2344,15 @@ const IntentionCustomer = Form.create()(
                       <span style={{ marginLeft: "50px", fontSize: "20px" }}>
                         新催款节点
                       </span>
+                      <span
+                        style={{
+                          display: cuiDataList.length ? "none" : "inline-block",
+                          marginLeft: 10,
+                          color: "red"
+                        }}
+                      >
+                        金额总计(万元): {this.state.totalCui}
+                      </span>
                       <Button
                         type="primary"
                         disabled={

+ 3 - 3
js/component/manageCenter/project/task/myTask.jsx

@@ -1197,7 +1197,7 @@ const Task = React.createClass({
       }.bind(this)
     );
   },
-  showDeleteConfirm(num) {
+  showDeleteConfirm(num,fn) {
     let text = getProjectStatus(num)
     confirm({
       title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
@@ -1206,7 +1206,7 @@ const Task = React.createClass({
       okType: 'danger',
       cancelText: '取消',
       onOk() {
-        this.tijiaoOk()
+        fn();
       },
       onCancel() {
       },
@@ -2137,7 +2137,7 @@ const Task = React.createClass({
                     onClick={() => {
                       let num = this.state.projectStatus
                       if(num != 0 && num != 10 && num != 11 && num != 12 && num != 2 && num != 5 && num != 6) {
-                       this.showDeleteConfirm(num)
+                       this.showDeleteConfirm(num, this.tijiaoOk)
                       }else {
                         this.tijiaoOk()
                       }

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.1.27",
+  "version": "1.1.28",
   "description": "",
   "main": "index.js",
   "scripts": {