Bladeren bron

解决修改项目详情普通单出现官费选项

mentoswzq 4 jaren geleden
bovenliggende
commit
da41d5c3cd

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

@@ -321,6 +321,10 @@ const OrderDetail = Form.create()(
           costReduction: record.costReduction,
           officialCost: record.officialCost,
         });
+      }else{
+        this.setState({
+          displayFees: "none",
+        });
       }
       this.setState({
         jid: record.id, //项目ID

+ 8 - 5
js/component/manageCenter/order/orderNew/addService.jsx

@@ -1744,7 +1744,6 @@ const NewService = Form.create()(
           this.refs.signFirstPayment.focus();
           return false;
         }
-      } else {
       }
       const arr = this.state.contactListNew || [];
       for (let i = 0; i < arr.length; i++) {
@@ -2886,8 +2885,8 @@ const NewService = Form.create()(
           return false;
         }
       }
-      if (!this.state.commodityPrice) {
-        message.warning("请输入金额!");
+      if(isNaN(parseFloat(this.state.commodityPrice))){
+        message.warning("请输入正确的金额!");
         this.refs.commodityPrice.focus();
         return false;
       }
@@ -2952,6 +2951,10 @@ const NewService = Form.create()(
           costReduction: record.costReduction,
           officialCost: record.officialCost,
         });
+      }else{
+        this.setState({
+          displayFees: "none",
+        });
       }
       this.setState({
         jid: record.id, //项目ID
@@ -2968,8 +2971,8 @@ const NewService = Form.create()(
     //修改项目详情
     tabRowSave(e) {
       e.preventDefault();
-      if (!this.state.commodityPrice) {
-        message.warning("金额不能为空!");
+      if(isNaN(parseFloat(this.state.commodityPrice))){
+        message.warning("请输入正确的金额!");
         return false;
       }
       let reg = /^([0]|[1-9][0-9]*)$/;

+ 2 - 2
js/component/manageCenter/order/orderNew/addorders.js

@@ -1756,8 +1756,8 @@ const Addorders = Form.create()(
     //修改项目详情
     tabRowSave(e) {
       e.preventDefault();
-      if (!this.state.commodityPrice) {
-        message.warning("金额不能为空!");
+      if(isNaN(parseFloat(this.state.commodityPrice))){
+        message.warning("请输入正确的金额!");
         return false;
       }
       if (!this.state.commodityQuantity) {

+ 4 - 0
js/component/manageCenter/order/orderNew/examine.jsx

@@ -515,6 +515,10 @@ const IntentionCustomer = Form.create()(
           costReduction: record.costReduction,
           officialCost: record.officialCost,
         });
+      }else{
+        this.setState({
+          displayFees: "none",
+        });
       }
       this.setState({
         jid: record.id, //项目ID

+ 6 - 2
js/component/manageCenter/order/orderNew/reject.jsx

@@ -893,6 +893,10 @@ const IntentionCustomer = Form.create()(
           costReduction: record.costReduction,
           officialCost: record.officialCost,
         });
+      }else{
+        this.setState({
+          displayFees: "none",
+        });
       }
       this.setState({
         jid: record.id, //项目ID
@@ -1789,8 +1793,8 @@ const IntentionCustomer = Form.create()(
     //修改项目详情
     tabRowSave(e) {
       e.preventDefault();
-      if (!this.state.commodityPrice) {
-        message.warning("金额不能为空!");
+      if(isNaN(parseFloat(this.state.commodityPrice))){
+        message.warning("请输入正确的金额!");
         return false;
       }
       if (this.state.displayFees==='block') {

+ 4 - 0
js/component/manageCenter/project/project/outsourceTaskAssignment.jsx

@@ -495,6 +495,10 @@ const OutsourceTaskAssignment = React.createClass({
         costReduction: record.costReduction,
         officialCost: record.officialCost,
       });
+    }else{
+      this.setState({
+        displayFees: "none",
+      });
     }
     this.setState({
       jid: record.id, //项目ID

+ 6 - 2
js/component/manageCenter/project/project/projectAssignment.jsx

@@ -780,8 +780,8 @@ const PaiDan = React.createClass({
   //修改项目详情
   tabRowSave(e) {
     e.preventDefault();
-    if (!this.state.commodityPrice) {
-      message.warning("金额不能为空!");
+    if(isNaN(parseFloat(this.state.commodityPrice))){
+      message.warning("请输入正确的金额!");
       return false;
     }
     if (!this.state.commodityQuantity) {
@@ -912,6 +912,10 @@ const PaiDan = React.createClass({
         costReduction: record.costReduction,
         officialCost: record.officialCost,
       });
+    }else{
+      this.setState({
+        displayFees: "none",
+      });
     }
     this.setState({
       jid: record.id, //项目ID

+ 2 - 2
js/component/manageCenter/project/project/zxsglyOutSourcingPaiDan.jsx

@@ -978,8 +978,8 @@ const zxsglyOutSourcingPaiDan = React.createClass({
   //修改项目详情
   tabRowSave(e) {
     e.preventDefault();
-    if (!this.state.commodityPrice) {
-      message.warning("金额不能为空!");
+    if(isNaN(parseFloat(this.state.commodityPrice))){
+      message.warning("请输入正确的金额!");
       return false;
     }
     if (!this.state.commodityQuantity) {

+ 4 - 0
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -1495,6 +1495,10 @@ const MyTaskOutsource = React.createClass({
         costReduction: record.costReduction,
         officialCost: record.officialCost,
       });
+    }else{
+      this.setState({
+        displayFees: "none",
+      });
     }
     this.setState({
       jid: record.id, //项目ID

+ 4 - 0
js/component/manageCenter/project/task/taskAssignment.jsx

@@ -507,6 +507,10 @@ const Task = React.createClass({
         costReduction: record.costReduction,
         officialCost: record.officialCost,
       });
+    }else{
+      this.setState({
+        displayFees: "none",
+      });
     }
     this.setState({
       jid: record.id, //项目ID

+ 4 - 0
js/component/manageCenter/project/task/taskQuery.jsx

@@ -713,6 +713,10 @@ const Task = React.createClass({
         costReduction: record.costReduction,
         officialCost: record.officialCost,
       });
+    }else{
+      this.setState({
+        displayFees: "none",
+      });
     }
     this.setState({
       jid: record.id, //项目ID

+ 1 - 1
package.json

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