Browse Source

催款节点科技项目百分比填写

mentoswzq 5 years ago
parent
commit
fea8d5a255

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

@@ -614,7 +614,17 @@ const approvedOutsourcing = React.createClass({
           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>;
+              }
             }
           }
         },
@@ -2244,7 +2254,8 @@ const approvedOutsourcing = React.createClass({
                 status: thisData.status,
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
-                startDate: thisData.startDate
+                startDate: thisData.startDate,
+                appropriationRatio: thisData.appropriationRatio
               });
             }
             this.setState({

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

@@ -442,7 +442,17 @@ const approvedOutsourcing = React.createClass({
           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>;
+              }
             }
           }
         },
@@ -2198,7 +2208,8 @@ const approvedOutsourcing = React.createClass({
               status: thisData.status,
               waitDay: thisData.waitDay,
               effectiveCount: thisData.effectiveCount,
-              startDate: thisData.startDate
+              startDate: thisData.startDate,
+              appropriationRatio: thisData.appropriationRatio
             });
           }
           this.setState({

+ 13 - 2
js/component/manageCenter/financialManage/orderDetail/orderDetail.jsx

@@ -216,7 +216,17 @@ const OrderDetail = Form.create()(
             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>;
+                }
               }
             }
           },
@@ -548,7 +558,8 @@ const OrderDetail = Form.create()(
                 status: thisData.status,
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
-                startDate: thisData.startDate
+                startDate: thisData.startDate,
+                appropriationRatio: thisData.appropriationRatio
               });
             }
             this.setState({

+ 139 - 54
js/component/manageCenter/order/orderNew/addService.jsx

@@ -497,6 +497,15 @@ const NewService = Form.create()(
                           yearFlag: false
                         });
                       }
+                      if(record.sort == 3 && e == 3) {
+                        this.setState({
+                          boFlag: true
+                        }); 
+                      }else {
+                        this.setState({
+                          boFlag: false
+                        });
+                      }
                       console.log(e);
                     }}
                   >
@@ -550,6 +559,7 @@ const NewService = Form.create()(
                     console.log("time", record);
                   }}
                 >
+                  <Select.Option key={0}>当天</Select.Option>
                   <Select.Option key={3}>3天</Select.Option>
                   <Select.Option key={5}>5天</Select.Option>
                   <Select.Option key={7}>7天</Select.Option>
@@ -564,11 +574,54 @@ const NewService = Form.create()(
             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>
+                  )
+                }
+
               }
-              return (
-                <div>
-                  {/* {this.state.processStatus == 0 ? (
+              if(this.state.boFlag) {
+                return (
+                  <div>
+                    <div style={{ width: 70, float: "left", marginRight: 5 }}>
+                      <Select
+                        placeholder="选择"
+                        defaultValue={"金额"}
+                        onChange={e => {
+                          record.boStatus = e;
+                        }}
+                      >
+                        <Select.Option key={true}>比例</Select.Option>
+                        <Select.Option key={false}>金额</Select.Option>
+                      </Select>
+                    </div>
+                    <div style={{ float: "right" }}>
+                      <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>
+                  </div>
+                );
+              }else {
+                return (
+                  <div>
                     <Input
                       value={record.money}
                       placeholder="请输入金额(必填项)"
@@ -580,22 +633,9 @@ const NewService = Form.create()(
                       }}
                       style={{ width: "120px" }}
                     />
-                  ) : (
-                    <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>
-              );
+                  </div>
+                );
+              }
             }
           },
           {
@@ -1226,7 +1266,8 @@ const NewService = Form.create()(
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
                 startDate: thisData.startDate,
-                dunType: thisData.dunType
+                dunType: thisData.dunType,
+                appropriationRatio: thisData.appropriationRatio
               });
             }
             this.setState({
@@ -1283,10 +1324,18 @@ const NewService = Form.create()(
       } else {
         record.effectiveCount = "";
       }
-      if (record.money == "") {
+      if (record.money == "" ) {
         message.warning("请填写金额");
         return;
       }
+      if(record.boStatus) {
+        if (typeof(+record.money) == "number" && +record.money >= 0 && +record.money <= 1) {
+          record.appropriationRatio = record.money;
+        }else {
+          message.warning("金额比例填写错误,比例范围0~1")
+          return
+        }
+      }
       if (!record.dunType) {
         message.warning("请选择对应科目");
         return;
@@ -1297,34 +1346,67 @@ const NewService = Form.create()(
       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("保存成功!");
+      if(record.boStatus) {
+        $.ajax({
+          url: globalConfig.context + "/api/admin/newOrderDun/createDun",
+          method: "post",
+          data: {
+            orderNo: record.orderNo,
+            tid: record.tid,
+            projectType: record.sort,
+            dunType: record.dunType,
+            appropriationRatio: record.appropriationRatio,
+            waitDay: record.waitDay,
+            effectiveCount: record.effectiveCount
+          }
+        }).done(
+          function(data) {
             this.setState({
-              cuiFlag: false
+              loading: false
             });
-            this.jiedianNew(record.orderNo);
-          } else {
-            message.warning(data.error[0].message);
+            if (!data.error.length) {
+              message.success("保存成功!");
+              this.setState({
+                cuiFlag: false,
+                boFlag: false
+              });
+              this.jiedianNew(record.orderNo);
+            } else {
+              message.warning(data.error[0].message);
+            }
+          }.bind(this)
+        );
+      }else {
+        $.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
           }
-        }.bind(this)
-      );
+        }).done(
+          function(data) {
+            this.setState({
+              loading: false
+            });
+            if (!data.error.length) {
+              message.success("保存成功!");
+              this.setState({
+                cuiFlag: false,
+                boFlag: false
+              });
+              this.jiedianNew(record.orderNo);
+            } else {
+              message.warning(data.error[0].message);
+            }
+          }.bind(this)
+        );
+      }
     },
     //点击新增催款节点
     addcontact() {
@@ -1368,7 +1450,8 @@ const NewService = Form.create()(
         this.setState({
           contactListNew: this.state.contactListNew,
           cuiFlag: false,
-          addFlag: false
+          addFlag: false,
+          boFlag: false
         });
         $.ajax({
           url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
@@ -1397,7 +1480,8 @@ const NewService = Form.create()(
         this.setState({
           contactListNew: this.state.contactListNew,
           cuiFlag: false,
-          addFlag: false
+          addFlag: false,
+          boFlag: false
         });
       }
     },
@@ -1428,6 +1512,7 @@ const NewService = Form.create()(
           mark: false,
           cuiFlag: false,
           addFlag: false,
+          boFlag: false
         },
         () => {
           this.setState({
@@ -2210,7 +2295,7 @@ const NewService = Form.create()(
             <Form
               layout="horizontal"
               onSubmit={this.handleSubmit}
-              id="demand-form"
+              // id="demand-form"
               style={{ paddingBottom: "40px" }}
             >
               <Spin spinning={this.state.loading}>
@@ -2925,7 +3010,7 @@ const NewService = Form.create()(
                             }}
                           >
                             <Spin spinning={this.state.loading}>
-                              <Form layout="horizontal" id="demand-form">
+                              <Form layout="horizontal">
                                 <Table
                                   pagination={false}
                                   columns={this.state.ContactsLists}
@@ -2983,7 +3068,7 @@ const NewService = Form.create()(
                             }}
                           >
                             <Spin spinning={this.state.loading}>
-                              <Form layout="horizontal" id="demand-form">
+                              <Form layout="horizontal">
                                 <Table
                                   pagination={false}
                                   columns={this.state.ContactsListsNew}
@@ -3345,7 +3430,7 @@ const NewService = Form.create()(
             <Form
               layout="horizontal"
               onSubmit={this.nextSubmit}
-              id="demand-form"
+              // id="demand-form"
             >
               <Spin spinning={this.state.loading}>
                 {this.state.addState ? (
@@ -3622,7 +3707,7 @@ const NewService = Form.create()(
             footer=""
             className="admin-desc-content"
           >
-            <Form layout="horizontal" id="demand-form">
+            <Form layout="horizontal">
               <Spin spinning={this.state.loading}>
                 <div className="clearfix">
                   <FormItem

+ 13 - 2
js/component/manageCenter/order/orderNew/approveds.jsx

@@ -352,7 +352,17 @@ const IntentionCustomer = Form.create()(
             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>;
+                }
               }
             }
           },
@@ -677,7 +687,8 @@ const IntentionCustomer = Form.create()(
                 status: thisData.status,
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
-                startDate: thisData.startDate
+                startDate: thisData.startDate,
+                appropriationRatio: thisData.appropriationRatio
               });
             }
             this.setState({

+ 107 - 112
js/component/manageCenter/order/orderNew/billing.jsx

@@ -595,7 +595,7 @@ const MyService = Form.create()(
                   ) : (
                     getInvoiceStatus(text, record)
                   )}
-                  {record.status  ? (
+                  {record.status == 3  ? (
                     <Button
                       type="primary"
                       onClick={e => {
@@ -909,31 +909,31 @@ const MyService = Form.create()(
       );
     },
     areset() {
-      // this.setState({
-      //   remarks: "",
-      //   type: undefined,
-      //   orgCodeUrl: "",
-      //   invoiceType: undefined,
-      //   unitName: "",
-      //   taxNumber: "",
-      //   unitName: "",
-      //   amount: "",
-      //   banks: "",
-      //   content: "",
-      //   unitAddress: "",
-      //   invoiceRemarks: "",
-      //   unitMobile: "",
-      //   post: undefined,
-      //   addressee: "",
-      //   addresseeMobile: "",
-      //   addresseeProvince: "",
-      //   addresseeCity: "",
-      //   addresseeArea: "",
-      //   recipientAddress: "",
-      //   ordapproval: undefined,
-      //   alreadyAmount: "",
-      //   ProvinceCity: []
-      // });
+      this.setState({
+        remarks: "",
+        type: undefined,
+        orgCodeUrl: "",
+        invoiceType: undefined,
+        unitName: "",
+        taxNumber: "",
+        unitName: "",
+        amount: "",
+        banks: "",
+        content: "",
+        unitAddress: "",
+        invoiceRemarks: "",
+        unitMobile: "",
+        post: undefined,
+        addressee: "",
+        addresseeMobile: "",
+        addresseeProvince: "",
+        addresseeCity: "",
+        addresseeArea: "",
+        recipientAddress: "",
+        ordapproval: undefined,
+        alreadyAmount: "",
+        ProvinceCity: []
+      });
     },
 
     recompose(record) {
@@ -1018,25 +1018,39 @@ const MyService = Form.create()(
           if(data.error.length) {
             message.warning(data.error[0].message)
           }else if(data.data){
-            console.log("success",data);
-            let res = data.data
+            const thisdata = data.data
             this.setState({
-              kaiData: res
-            })
-            // for (var key in res) {
-            //   // let str = "'" + key + "'"
-            //   // var obj = {
-            //   //   key: res[str]
-            //   // };
-            // //  console.log(key, res[str]);
-            //  this.setState({
-            //    key: 111
-            //  })
-            // }
-            // // Object.assign(this.state, obj);
-            // window.setTimeout(() => {
-            //   console.log(this.state);
-            // }, 100);
+              contractNo: thisdata.contractNo,
+              orderNo: thisdata.orderNo,
+              ordapproval: thisdata.approval,
+              type: thisdata.type,
+              status: thisdata.status,
+              remarks: thisdata.remarks,
+              invoiceType: thisdata.invoiceType,
+              unitName: thisdata.unitName,
+              taxNumber: thisdata.taxNumber,
+              amount: thisdata.amount,
+              banks: thisdata.banks,
+              content: thisdata.content,
+              unitAddress: thisdata.unitAddress,
+              invoiceRemarks: thisdata.invoiceRemarks,
+              unitMobile: thisdata.unitMobile,
+              post: thisdata.post,
+              addressee: thisdata.addressee,
+              addresseeMobile: thisdata.addresseeMobile,
+              addresseeProvince: thisdata.addresseeProvince,
+              addresseeCity: thisdata.addresseeCity,
+              addresseeArea: thisdata.addresseeArea,
+              alreadyAmount: thisdata.alreadyAmount,
+              recipientAddress: thisdata.recipientAddress,
+              orgCodeUrl: thisdata.voucherUrl
+                ? splitUrl(
+                    thisdata.voucherUrl,
+                    ",",
+                    globalConfig.avatarHost + "/upload"
+                  )
+                : []
+            });
           }
         }
       });
@@ -1877,7 +1891,7 @@ const MyService = Form.create()(
             >
               <Form
                 layout="horizontal"
-                id="demand-form"
+                // id="demand-form"
                 style={{ paddingBottom: "40px" }}
               >
                 <Spin spinning={this.state.loading}>
@@ -1898,10 +1912,9 @@ const MyService = Form.create()(
                         {
                           <Input
                             placeholder="填写申请发票原因"
-                            value={this.state.kaiData.remarks}
+                            value={this.state.remarks}
                             onChange={e => {
-                              this.state.kaiData.remarks = e.target.value;
-                              this.setState({ kaiData: this.state.kaiData });
+                              this.setState({ remarks: e.target.value });
                             }}
                             style={{ width: "240px" }}
                           />
@@ -1915,10 +1928,9 @@ const MyService = Form.create()(
                         label="省内/外:"
                       >
                         <RadioGroup
-                          value={this.state.kaiData.type}
+                          value={this.state.type}
                           onChange={e => {
-                            this.state.kaiData.type = e;
-                            this.setState({ kaiData: this.state.kaiData });
+                            this.setState({ type: e.target.value });
                           }}
                         >
                           <Radio value={0}>省内</Radio>
@@ -1941,10 +1953,9 @@ const MyService = Form.create()(
                         label="特批:"
                       >
                         <RadioGroup
-                          value={this.state.kaiData.approval}
+                          value={!this.state.ordapproval ? 0 : 1}
                           onChange={e => {
-                            this.state.kaiData.approval = e;
-                            this.setState({ kaiData: this.state.kaiData });
+                            this.setState({ ordapproval: e.target.value });
                           }}
                         >
                           <Radio value={0}>否</Radio>
@@ -1987,10 +1998,9 @@ const MyService = Form.create()(
                         <RadioGroup
                           style={{ width: "160%" }}
                           onChange={e => {
-                            this.state.kaiData.invoiceType = e;
-                            this.setState({ kaiData: this.state.kaiData });
+                            this.setState({ invoiceType: e.target.value });
                           }}
-                          value={this.state.kaiData.invoiceType}
+                          value={this.state.invoiceType}
                         >
                           <Radio value={0}>增值税专用发票</Radio>
                           <Radio value={1}>增值税普通发票</Radio>
@@ -2012,10 +2022,9 @@ const MyService = Form.create()(
                         {
                           <Input
                             placeholder="请输入单位名称"
-                            value={this.state.kaiData.unitName}
+                            value={this.state.unitName}
                             onChange={e => {
-                              this.state.kaiData.unitName = e.target.value;
-                              this.setState({ kaiData: this.state.kaiData });
+                              this.setState({ unitName: e.target.value });
                             }}
                             style={{ width: "240px" }}
                           />
@@ -2044,10 +2053,9 @@ const MyService = Form.create()(
                         {
                           <Input
                             placeholder="请输入税号"
-                            value={this.state.kaiData.taxNumber}
+                            value={this.state.taxNumber}
                             onChange={e => {
-                              this.state.kaiData.taxNumber = e.target.value;
-                              this.setState({ kaiData: this.state.kaiData });
+                              this.setState({ taxNumber: e.target.value });
                             }}
                             style={{ width: "240px" }}
                           />
@@ -2066,10 +2074,9 @@ const MyService = Form.create()(
                         {
                           <Input
                             placeholder="请输入开票金额"
-                            value={this.state.kaiData.amount}
+                            value={this.state.amount}
                             onChange={e => {
-                              this.state.kaiData.amount = e.target.value;
-                              this.setState({ kaiData: this.state.kaiData });
+                              this.setState({ amount: e.target.value });
                             }}
                             style={{ width: "240px" }}
                           />
@@ -2083,7 +2090,7 @@ const MyService = Form.create()(
                             width: "30%"
                           }}
                         >
-                          退票请写负数<br></br>金额
+                          填写本次开票<br></br>金额
                         </span>
                       </FormItem>
                       <FormItem
@@ -2099,10 +2106,9 @@ const MyService = Form.create()(
                         {
                           <Input
                             placeholder="请输入开户行及银行账号"
-                            value={this.state.kaiData.banks}
+                            value={this.state.banks}
                             onChange={e => {
-                              this.state.kaiData.banks = e.target.value;
-                              this.setState({ kaiData: this.state.kaiData });
+                              this.setState({ banks: e.target.value });
                             }}
                             style={{ width: "240px" }}
                           />
@@ -2121,10 +2127,9 @@ const MyService = Form.create()(
                         {
                           <Input
                             placeholder="请输入开票内容及说明"
-                            value={this.state.kaiData.content}
+                            value={this.state.content}
                             onChange={e => {
-                              this.state.kaiData.content = e.target.value;
-                              this.setState({ kaiData: this.state.kaiData });
+                              this.setState({ content: e.target.value });
                             }}
                             style={{ width: "240px" }}
                           />
@@ -2143,10 +2148,9 @@ const MyService = Form.create()(
                         {
                           <Input
                             placeholder="请输入单位地址"
-                            value={this.state.kaiData.unitAddress}
+                            value={this.state.unitAddress}
                             onChange={e => {
-                              this.state.kaiData.unitAddress = e.target.value;
-                              this.setState({ kaiData: this.state.kaiData });
+                              this.setState({ unitAddress: e.target.value });
                             }}
                             style={{ width: "240px" }}
                           />
@@ -2160,11 +2164,11 @@ const MyService = Form.create()(
                         {
                           <Input
                             placeholder="请备注开票公司名称"
-                            value={this.state.kaiData.invoiceRemarks}
+                            value={this.state.invoiceRemarks}
                             onChange={e => {
-                              this.state.kaiData.invoiceRemarks =
-                                e.target.value;
-                              this.setState({ kaiData: this.state.kaiData });
+                              this.setState({
+                                invoiceRemarks: e.target.value
+                              });
                             }}
                             style={{ width: "240px" }}
                           />
@@ -2194,10 +2198,9 @@ const MyService = Form.create()(
                         {
                           <Input
                             placeholder="请输入单位电话"
-                            value={this.state.kaiData.unitMobile}
+                            value={this.state.unitMobile}
                             onChange={e => {
-                              this.state.kaiData.unitMobile = e.target.value;
-                              this.setState({ kaiData: this.state.kaiData });
+                              this.setState({ unitMobile: e.target.value });
                             }}
                             style={{ width: "240px" }}
                           />
@@ -2217,11 +2220,7 @@ const MyService = Form.create()(
                       >
                         <PicturesWall
                           fileList={this.getOrgCodeUrl}
-                          pictureUrl={
-                            this.state.kaiData.voucherUrl
-                              ? this.state.kaiData.voucherUrl
-                              : this.state.orgCodeUrl
-                          }
+                          pictureUrl={this.state.orgCodeUrl}
                         />
                         <span
                           style={{
@@ -2250,10 +2249,9 @@ const MyService = Form.create()(
                         label="发票是否邮寄:"
                       >
                         <RadioGroup
-                          value={this.state.kaiData.post}
+                          value={this.state.post}
                           onChange={e => {
-                            this.state.kaiData.post = e.target.value;
-                            this.setState({ kaiData: this.state.kaiData });
+                            this.setState({ post: e.target.value });
                           }}
                         >
                           <Radio value={0}>是</Radio>
@@ -2271,10 +2269,9 @@ const MyService = Form.create()(
                           {
                             <Input
                               placeholder="请输入收信人姓名"
-                              value={this.state.kaiData.addressee}
+                              value={this.state.addressee}
                               onChange={e => {
-                                this.state.kaiData.addressee = e.target.value;
-                                this.setState({ kaiData: this.state.kaiData });
+                                this.setState({ addressee: e.target.value });
                               }}
                               style={{ width: "240px" }}
                             />
@@ -2288,11 +2285,11 @@ const MyService = Form.create()(
                           {
                             <Input
                               placeholder="请输入电话"
-                              value={this.state.kaiData.addresseeMobile}
+                              value={this.state.addresseeMobile}
                               onChange={e => {
-                                this.state.kaiData.addresseeMobile =
-                                  e.target.value;
-                                this.setState({ kaiData: this.state.kaiData });
+                                this.setState({
+                                  addresseeMobile: e.target.value
+                                });
                               }}
                               style={{ width: "240px" }}
                             />
@@ -2302,7 +2299,7 @@ const MyService = Form.create()(
                     ) : (
                       ""
                     )}
-                    {this.state.kaiData.post === 0 ? (
+                    {this.state.post === 0 ? (
                       <div className="clearfix">
                         <FormItem
                           className="half-item"
@@ -2311,12 +2308,11 @@ const MyService = Form.create()(
                         >
                           <Cascader
                             options={areaSelect()}
-                            value={this.state.kaiData.ProvinceCity}
+                            value={this.state.ProvinceCity}
                             placeholder="选择城市"
                             style={{ width: "95%" }}
                             onChange={e => {
-                              this.state.kaiData.ProvinceCity = e.target.value;
-                              this.setState({ kaiData: this.state.kaiData });
+                              this.setState({ ProvinceCity: e });
                             }}
                           />
                         </FormItem>
@@ -2324,7 +2320,7 @@ const MyService = Form.create()(
                     ) : (
                       ""
                     )}
-                    {this.state.kaiData.post === 0 ? (
+                    {this.state.post === 0 ? (
                       <div className="clearfix">
                         <FormItem
                           className="half-item"
@@ -2334,11 +2330,11 @@ const MyService = Form.create()(
                           {
                             <Input
                               placeholder="请输入详细地址"
-                              value={this.state.kaiData.recipientAddress}
+                              value={this.state.recipientAddress}
                               onChange={e => {
-                                this.state.kaiData.recipientAddress =
-                                  e.target.value;
-                                this.setState({ kaiData: this.state.kaiData });
+                                this.setState({
+                                  recipientAddress: e.target.value
+                                });
                               }}
                               style={{ width: "240px" }}
                             />
@@ -2360,10 +2356,9 @@ const MyService = Form.create()(
                     >
                       {
                         <Input
-                          value={this.state.kaiData.alreadyAmount}
+                          value={this.state.alreadyAmount}
                           onChange={e => {
-                            this.state.kaiData.alreadyAmount = e.target.value;
-                            this.setState({ kaiData: this.state.kaiData });
+                            this.setState({ alreadyAmount: e.target.value });
                           }}
                           style={{ width: "40px" }}
                         />
@@ -2457,7 +2452,7 @@ const MyService = Form.create()(
             >
               <Form
                 layout="horizontal"
-                id="demand-form"
+                // id="demand-form"
                 style={{ paddingBottom: "40px" }}
               >
                 <Spin spinning={this.state.loading}>
@@ -2969,7 +2964,7 @@ const MyService = Form.create()(
             >
               <Form
                 layout="horizontal"
-                id="demand-form"
+                // id="demand-form"
                 style={{ paddingBottom: "40px" }}
               >
                 <Spin spinning={this.state.loading}>

+ 13 - 2
js/component/manageCenter/order/orderNew/chargeback.jsx

@@ -299,7 +299,17 @@ const IntentionCustomer = Form.create()(
             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>;
+                }
               }
             }
           },
@@ -732,7 +742,8 @@ const IntentionCustomer = Form.create()(
                 status: thisData.status,
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
-                startDate: thisData.startDate
+                startDate: thisData.startDate,
+                appropriationRatio: thisData.appropriationRatio
               });
             }
             this.setState({

+ 39 - 3
js/component/manageCenter/order/orderNew/examine.jsx

@@ -30,6 +30,7 @@ import {
 import "./customer.less";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderRiZi from "@/orderRiZi.jsx";
+const confirm = Modal.confirm;
 //图片组件
 const PicturesWall = React.createClass({
   getInitialState() {
@@ -383,7 +384,17 @@ const IntentionCustomer = Form.create()(
             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>;
+                }
               }
             }
           },
@@ -712,7 +723,8 @@ const IntentionCustomer = Form.create()(
                 status: thisData.status,
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
-                startDate: thisData.startDate
+                startDate: thisData.startDate,
+                appropriationRatio: thisData.appropriationRatio
               });
             }
             this.setState({
@@ -1101,6 +1113,23 @@ const IntentionCustomer = Form.create()(
       });
       this.resets();
     },
+    showDeleteConfirm() {
+      confirm({
+        title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
+        content: (
+          <p style={{ fontWeight: 900, color: "red" }}>
+            当前订单为外包单,您确定修改为普通订单?
+          </p>
+        ),
+        okText: "确定",
+        okType: "danger",
+        cancelText: "取消",
+        onOk() {
+          this.examOk();
+        },
+        onCancel() {}
+      });
+    },
     render() {
       const formItemLayout = {
         labelCol: { span: 8 },
@@ -1509,7 +1538,14 @@ const IntentionCustomer = Form.create()(
                         <div className="addSave" style={{ marginTop: "15px" }}>
                           <Button
                             type="primary"
-                            onClick={this.examOk}
+                            // onClick={this.examOk}
+                            onClick={() => {
+                              if (this.state.outsource == "是") {
+                                this.showDeleteConfirm()
+                              }else {
+                                this.examOk()
+                              }
+                            }}
                             style={{ marginLeft: "200px" }}
                             htmlType="submit"
                           >

+ 13 - 2
js/component/manageCenter/order/orderNew/inquiry.jsx

@@ -292,7 +292,17 @@ const IntentionCustomer = Form.create()(
             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>;
+                }
               }
             }
           },
@@ -564,7 +574,8 @@ const IntentionCustomer = Form.create()(
                 status: thisData.status,
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
-                startDate: thisData.startDate
+                startDate: thisData.startDate,
+                appropriationRatio: thisData.appropriationRatio
               });
             }
             this.setState({

+ 13 - 2
js/component/manageCenter/order/orderNew/outsourcingList.jsx

@@ -366,7 +366,17 @@ const outsourcingList = Form.create()(
             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>;
+                }
               }
               return (
                 <div>
@@ -918,7 +928,8 @@ const outsourcingList = Form.create()(
                 status: thisData.status,
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
-                startDate: thisData.startDate
+                startDate: thisData.startDate,
+                appropriationRatio: thisData.appropriationRatio
               });
             }
             this.setState({

+ 15 - 15
js/component/manageCenter/order/orderNew/press.jsx

@@ -198,29 +198,24 @@ const IntentionCustomer = Form.create()(React.createClass({
         key: "totalAmount"
       },
       {
-        title: "结算状态",
-        dataIndex: "liquidationStatus",
-        key: "liquidationStatus",
-        render: text => {
-          return getLiquidationStatus(text);
-        }
-      },
-      {
-        title: "应收款(万)",
-        dataIndex: "accountsReceivable",
-        key: "accountsReceivable"
-      },
-      {
-        title: "已收款(万)",
+        title: "已收款(万元)",
         dataIndex: "settlementAmount",
         key: "settlementAmount"
       },
       {
-        title: "未收款(万)",
+        title: "未收款(万元)",
         dataIndex: "uncollectedAmount",
         key: "uncollectedAmount"
       },
       {
+        title: "结算状态",
+        dataIndex: "liquidationStatus",
+        key: "liquidationStatus",
+        render: text => {
+          return getLiquidationStatus(text);
+        }
+      },
+      {
         title: "催收科目",
         dataIndex: "dunSubject",
         key: "dunSubject"
@@ -229,6 +224,11 @@ const IntentionCustomer = Form.create()(React.createClass({
         //   }
       },
       {
+        title: "应收款(万元)",
+        dataIndex: "accountsReceivable",
+        key: "accountsReceivable"
+      },
+      {
         title: "催款状态",
         dataIndex: "dunStatus",
         key: "dunStatus"

+ 148 - 53
js/component/manageCenter/order/orderNew/reject.jsx

@@ -445,6 +445,15 @@ const IntentionCustomer = Form.create()(
                           yearFlag: false
                         });
                       }
+                      if (record.sort == 3 && e == 3) {
+                        this.setState({
+                          boFlag: true
+                        });
+                      } else {
+                        this.setState({
+                          boFlag: false
+                        });
+                      }
                       console.log(e);
                     }}
                   >
@@ -471,7 +480,7 @@ const IntentionCustomer = Form.create()(
             }
           },
           {
-            title: "时间",
+            title: "首付时间(特批需选择时间)",
             dataIndex: "waitDay",
             key: "waitDay",
             render: (text, record) => {
@@ -498,6 +507,7 @@ const IntentionCustomer = Form.create()(
                     console.log("time", record);
                   }}
                 >
+                  <Select.Option key={0}>当天</Select.Option>
                   <Select.Option key={3}>3天</Select.Option>
                   <Select.Option key={5}>5天</Select.Option>
                   <Select.Option key={7}>7天</Select.Option>
@@ -512,11 +522,53 @@ const IntentionCustomer = Form.create()(
             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>;
+                }
               }
-              return (
-                <div>
-                  {/* {this.state.processStatus == 0 ? (
+              if (this.state.boFlag) {
+                return (
+                  <div>
+                    <div style={{ width: 70, float: "left", marginRight: 5 }}>
+                      <Select
+                        placeholder="选择"
+                        defaultValue={"金额"}
+                        onChange={e => {
+                          record.boStatus = e;
+                        }}
+                      >
+                        <Select.Option key={true}>比例</Select.Option>
+                        <Select.Option key={false}>金额</Select.Option>
+                      </Select>
+                    </div>
+                    <div style={{ float: "right" }}>
+                      <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>
+                  </div>
+                );
+              } else {
+                return (
+                  <div>
                     <Input
                       value={record.money}
                       placeholder="请输入金额(必填项)"
@@ -528,22 +580,9 @@ const IntentionCustomer = Form.create()(
                       }}
                       style={{ width: "120px" }}
                     />
-                  ) : (
-                    <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>
-              );
+                  </div>
+                );
+              }
             }
           },
           {
@@ -556,7 +595,7 @@ const IntentionCustomer = Form.create()(
               }
               return (
                 <Select
-                  placeholder="请选择时间"
+                  placeholder="请选择年限"
                   style={{ width: "150px" }}
                   disabled={this.state.yearFlag ? true : false}
                   onChange={e => {
@@ -618,6 +657,9 @@ const IntentionCustomer = Form.create()(
                       type="primary"
                       onClick={e => {
                         this.contactSaveNew(record);
+                        this.setState({
+                          addFlag: false
+                        });
                       }}
                     >
                       保存
@@ -994,7 +1036,8 @@ const IntentionCustomer = Form.create()(
                 waitDay: thisData.waitDay,
                 effectiveCount: thisData.effectiveCount,
                 startDate: thisData.startDate,
-                dunType: thisData.dunType
+                dunType: thisData.dunType,
+                appropriationRatio: thisData.appropriationRatio
               });
             }
             this.setState({
@@ -1055,6 +1098,18 @@ const IntentionCustomer = Form.create()(
         message.warning("请填写金额");
         return;
       }
+      if (record.boStatus) {
+        if (
+          typeof +record.money == "number" &&
+          +record.money >= 0 &&
+          +record.money <= 1
+        ) {
+          record.appropriationRatio = record.money;
+        } else {
+          message.warning("金额比例填写错误,比例范围0~1");
+          return;
+        }
+      }
       if (!record.dunType) {
         message.warning("请选择对应科目");
         return;
@@ -1065,35 +1120,67 @@ const IntentionCustomer = Form.create()(
       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({ addFlag: false });
+      if (record.boStatus) {
+        $.ajax({
+          url: globalConfig.context + "/api/admin/newOrderDun/createDun",
+          method: "post",
+          data: {
+            orderNo: record.orderNo,
+            tid: record.tid,
+            projectType: record.sort,
+            dunType: record.dunType,
+            appropriationRatio: record.appropriationRatio,
+            waitDay: record.waitDay,
+            effectiveCount: record.effectiveCount
+          }
+        }).done(
+          function(data) {
             this.setState({
-              cuiFlag: false
+              loading: false
             });
-            this.jiedianNew(record.orderNo);
-          } else {
-            message.warning(data.error[0].message);
+            if (!data.error.length) {
+              message.success("保存成功!");
+              this.setState({
+                cuiFlag: false,
+                boFlag: false
+              });
+              this.jiedianNew(record.orderNo);
+            } else {
+              message.warning(data.error[0].message);
+            }
+          }.bind(this)
+        );
+      } else {
+        $.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
           }
-        }.bind(this)
-      );
+        }).done(
+          function(data) {
+            this.setState({
+              loading: false
+            });
+            if (!data.error.length) {
+              message.success("保存成功!");
+              this.setState({
+                cuiFlag: false,
+                boFlag: false
+              });
+              this.jiedianNew(record.orderNo);
+            } else {
+              message.warning(data.error[0].message);
+            }
+          }.bind(this)
+        );
+      }
     },
     //点击新增催款节点
     addcontact() {
@@ -1137,7 +1224,8 @@ const IntentionCustomer = Form.create()(
         this.setState({
           contactListNew: this.state.contactListNew,
           cuiFlag: false,
-          addFlag: false
+          addFlag: false,
+          boFlag: false
         });
         $.ajax({
           url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
@@ -1166,7 +1254,8 @@ const IntentionCustomer = Form.create()(
         this.setState({
           contactListNew: this.state.contactListNew,
           cuiFlag: false,
-          addFlag: false
+          addFlag: false,
+          boFlag: false
         });
       }
     },
@@ -1246,7 +1335,11 @@ const IntentionCustomer = Form.create()(
             flag: false
           });
           return false;
-        } else if (arr[i].dunType == 1 && !arr[i].waitDay && this.state.approval == 1) {
+        } else if (
+          arr[i].dunType == 1 &&
+          !arr[i].waitDay &&
+          this.state.approval == 1
+        ) {
           message.warning(
             "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
           );
@@ -1601,7 +1694,9 @@ const IntentionCustomer = Form.create()(
     visitCancel() {
       this.setState({
         visible: false,
-        addFlag: false
+        cuiFlag: false,
+        addFlag: false,
+        boFlag: false
       });
       this.resets();
     },

+ 26 - 2
js/component/manageCenter/project/task/myTask.jsx

@@ -32,10 +32,11 @@ import {
   getProjectStatus,
   splitUrl,
   getboutique,
-  ShowModal
+  ShowModal,
 } from "@/tools";
 import { taskStatus, projectStatus } from "@/dataDic.js";
 import ShowModalDiv from "@/showModal.jsx";
+const confirm = Modal.confirm;
 const FormItem = Form.Item;
 const { TabPane } = Tabs;
 const { MonthPicker, RangePicker } = DatePicker;
@@ -1196,6 +1197,21 @@ const Task = React.createClass({
       }.bind(this)
     );
   },
+  showDeleteConfirm(num) {
+    let text = getProjectStatus(num)
+    confirm({
+      title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
+      content: <p style={{ fontWeight: 900, color: "red" }}>当前的项目状态为{text},保存后将触发对应的催款节点!!!您确定保存?</p>,
+      okText: '确定',
+      okType: 'danger',
+      cancelText: '取消',
+      onOk() {
+        this.tijiaoOk()
+      },
+      onCancel() {
+      },
+    });
+},
   render() {
     const formItemLayout = {
       labelCol: { span: 8 },
@@ -2117,7 +2133,15 @@ const Task = React.createClass({
                   <Button
                     className="cancel"
                     type="primary"
-                    onClick={this.tijiaoOk}
+                    // onClick={this.tijiaoOk}
+                    onClick={() => {
+                      let num = this.state.projectStatus
+                      if(num != 0 && num != 10 && num != 11 && num != 12 && num != 2 && num != 5 && num != 6) {
+                       this.showDeleteConfirm(num)
+                      }else {
+                        this.tijiaoOk()
+                      }
+                    }}
                     style={{ marginLeft: "200px", marginTop: "10px" }}
                     htmlType="submit"
                   >