dev01 2 years ago
parent
commit
cb59aba1b5

+ 6 - 6
js/component/manageCenter/order/orderNew/addService.jsx

@@ -3506,24 +3506,24 @@ const NewService = Form.create()(
       if (this.state.displayFees === 'block') {
         if (this.state.patentType === "" && !this.state.patentTransfer) {
           message.warning("请选择专利类型!");
-          return 
+          return
         }
         if (this.state.officialCost === '') {
           message.warning("请选择官费!");
-          return 
+          return
         }
         if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2) && this.state.officialCost === 1) {
           message.warning("请选择费减!");
-          return 
+          return
         }
       }
       if (!this.state.commodityPrice) {
         message.warning("请输入金额!");
-        return 
+        return
       }
       if (!this.state.main) {
         message.warning("请选择是否为主要项目!");
-        return 
+        return
       }
       this.setState({
         loading: true,
@@ -5008,7 +5008,7 @@ const NewService = Form.create()(
                               {...formItemLayout}
                               label="销售类型"
                             >
-                              <span>{(["私有客户", "签单客户"][this.state.userType] || " ") + "-" +
+                              <span>{(["私有客户-", "签单客户-"][this.state.userType] || " ") +
                                 (salesList[this.state.salesType] || "")}</span>
                               {
                                 this.state.processStatus === 0 &&

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

@@ -457,7 +457,8 @@ class OrderDetail extends Component {
             enterpriseId={this.props.orderUid} />
         </FormItem>
         <FormItem className="half-item" {...formItemLayout} label="销售类型">
-          <span>{salesList[data.salesType]}</span>
+          <span>{(["私有客户-", "签单客户-"][data.userType] || " ") +
+            (salesList[data.salesType] || "")}</span>
         </FormItem>
         <FormItem
           className="half-item"

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

@@ -595,6 +595,7 @@ const IntentionCustomer = Form.create()(
             let thisdata = data.data;
             this.setState({
               orderUid: thisdata.uid,
+              userType: thisdata.userType,//
               salesType: thisdata.salesType, //销售类型
               orderNo: thisdata.orderNo, //订单编号
               contractNo: thisdata.contractNo, //合同编号
@@ -1551,7 +1552,8 @@ const IntentionCustomer = Form.create()(
                             enterpriseId={this.state.orderUid} />
                         </FormItem>
                         <FormItem className="half-item" {...formItemLayout} label="销售类型">
-                          <span>{salesList[this.state.salesType]}</span>
+                          <span>{(["私有客户-", "签单客户-"][this.state.userType] || " ") +
+                            (salesList[this.state.salesType] || "")}</span>
                         </FormItem>
                         <FormItem
                           className="half-item"

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

@@ -1651,7 +1651,8 @@ const IntentionCustomer = Form.create()(
             let thisdata = data.data;
             this.setState({
               orderUid: thisdata.uid,
-              salesType: thisdata.salesType, //订单详情
+              userType: thisdata.userType,
+              salesType: thisdata.salesType, //销售类型
               orderNo: thisdata.orderNo, //订单编号
               contractNo: thisdata.contractNo, //合同编号
               userName: thisdata.userName, //客户名称
@@ -4082,7 +4083,8 @@ const IntentionCustomer = Form.create()(
                       {...formItemLayout}
                       label="销售类型"
                     >
-                      <span>{salesList[this.state.salesType]}</span>
+                      <span>{(["私有客户-", "签单客户-"][this.state.userType] || " ") +
+                        (salesList[this.state.salesType] || "")}</span>
                     </FormItem>
                     <FormItem
                       className="half-item"

+ 14 - 35
js/component/manageCenter/order/orderNew/reject.jsx

@@ -20,7 +20,7 @@ import {
 } from 'antd';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
-import { boutique, tepi, jiedian, salesList,cuiJieDian } from '@/dataDic.js';
+import { boutique, tepi, jiedian, salesList, cuiJieDian } from '@/dataDic.js';
 import {
   getLiquidationStatus,
   getProcessStatus,
@@ -1407,10 +1407,7 @@ const IntentionCustomer = Form.create()(
     },
     //重新提交
     examOk() {
-      if (this.state.flag) return;
-      this.setState({
-        flag: true,
-      });
+      // if (this.state.flag) return;
       let theorgCodeUrl = [];
       if (this.state.orgCodeUrl.length) {
         let picArr = [];
@@ -1458,39 +1455,24 @@ const IntentionCustomer = Form.create()(
         return
       }
       if (moneyVerify(this.state.totalAmount)) {
-        this.setState({
-          flag: false,
-        });
         return;
       }
       if (moneyVerify(this.state.firstAmount)) {
-        this.setState({
-          flag: false,
-        });
         return;
       }
       if (!this.state.totalAmount) {
         message.warning("签单金额不能为空");
         this.refs.signFirstPayment.focus();
-        this.setState({
-          flag: false,
-        });
         return false;
       }
       if (!this.state.firstAmount) {
         message.warning("首付金额不能为空");
         this.refs.signFirstPayment.focus();
-        this.setState({
-          flag: false,
-        });
         return false;
       }
       if (!theorgCodeUrl) {
         message.warning("企业负责人不能为空");
         this.refs.signFirstPayment.focus();
-        this.setState({
-          flag: false,
-        });
         return false;
       }
       if (
@@ -1498,9 +1480,6 @@ const IntentionCustomer = Form.create()(
         this.state.approval == "特批驳回"
       ) {
         message.warning("特批状态不正确,请重新填写");
-        this.setState({
-          flag: false,
-        });
         return false;
       }
       const arr = this.state.contactListNew || [];
@@ -1513,9 +1492,6 @@ const IntentionCustomer = Form.create()(
           message.warning(
             "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
           );
-          this.setState({
-            flag: false,
-          });
           return false;
         } else if (
           arr[i].dunType == 1 &&
@@ -1525,19 +1501,20 @@ const IntentionCustomer = Form.create()(
           message.warning(
             "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
           );
-          this.setState({
-            flag: false,
-          });
           return false;
         }
         if (!this.state.contactListNew[i].id) {
           message.warning("请保存催款节点");
-          this.setState({
-            flag: false,
-          });
           return false;
         }
       }
+      if (!this.state.salesType) {
+        message.warning("请选择销售类型!");
+        return
+      }
+      this.setState({
+        flag: true,
+      });
       $.ajax({
         method: "post",
         dataType: "json",
@@ -1586,9 +1563,8 @@ const IntentionCustomer = Form.create()(
         }.bind(this)
       );
     },
-    //重新提交
+    //订单作废
     examOks() {
-      if (this.state.flag) return;
       this.setState({
         flag: true,
       });
@@ -1618,6 +1594,7 @@ const IntentionCustomer = Form.create()(
         function () {
           this.setState({
             loading: false,
+            flag: false,
           });
         }.bind(this)
       );
@@ -2083,7 +2060,7 @@ const IntentionCustomer = Form.create()(
                       {...formItemLayout}
                       label="销售类型"
                     >
-                      <span>{(["私有客户", "签单客户"][this.state.userType] || " ") + "-" +
+                      <span>{(["私有客户-", "签单客户-"][this.state.userType] || " ") +
                         (salesList[this.state.salesType] || "")}</span>
                       <UpdateSales
                         orderNo={this.state.orderNo}
@@ -2595,6 +2572,7 @@ const IntentionCustomer = Form.create()(
                         onClick={this.examOk}
                         style={{ marginLeft: "200px" }}
                         htmlType="submit"
+                        loading={this.state.flag}
                       >
                         重新提交
                       </Button>
@@ -2604,6 +2582,7 @@ const IntentionCustomer = Form.create()(
                         onClick={this.examOks}
                         style={{ marginLeft: "50px" }}
                         htmlType="submit"
+                        loading={this.state.flag}
                       >
                         订单作废
                       </Button>

+ 1 - 1
package.json

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