Browse Source

修复合同修改bug

dev01 2 years ago
parent
commit
5c7964dd8b

+ 1 - 0
js/component/common/projectOperation/index.jsx

@@ -1,3 +1,4 @@
+// 开单
 import React, { Component } from "react";
 import { AutoComplete, Button, Form, Input, message, Modal, Radio, Select, Spin } from "antd";
 import { boutique } from "../../dataDic";

+ 13 - 19
js/component/manageCenter/order/orderNew/addService.jsx

@@ -1,3 +1,4 @@
+// 开单=》合同变更发起
 import React from "react";
 import {
   Table,
@@ -3500,36 +3501,29 @@ const NewService = Form.create()(
         !reg.test(this.state.commodityQuantity)
       ) {
         message.warning("请输入正确商品数量!");
-        this.refs.commodityQuantity.focus();
         return
       }
-      if (this.state.patentType === "") {
-        message.warning("请选择专利类型!");
-        return
-      }
-      if (this.state.displayFees === "block") {
-        if (this.state.officialCost === "") {
+      if (this.state.displayFees === 'block') {
+        if (this.state.patentType === "" && !this.state.patentTransfer) {
+          message.warning("请选择专利类型!");
+          return 
+        }
+        if (this.state.officialCost === '') {
           message.warning("请选择官费!");
-          return
+          return 
         }
-      }
-      if (this.state.patentType === 0 || this.state.patentType === 2) {
-        if (this.state.officialCost === 1) {
-          if (this.state.costReduction === "") {
-            message.warning("请选择费减!");
-            return
-          }
+        if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2) && this.state.officialCost === 1) {
+          message.warning("请选择费减!");
+          return 
         }
       }
       if (!this.state.commodityPrice) {
         message.warning("请输入金额!");
-        this.refs.commodityPrice.focus();
-        return false;
+        return 
       }
       if (!this.state.main) {
         message.warning("请选择是否为主要项目!");
-        this.refs.commodityQuantity.focus();
-        return false;
+        return 
       }
       this.setState({
         loading: true,

+ 14 - 20
js/component/manageCenter/order/orderNew/changeComponent/changeApply.js

@@ -1,3 +1,4 @@
+// 变更--驳回
 import React, { Component } from "react";
 import {
   Form,
@@ -1043,7 +1044,7 @@ class ChangeApply extends Component {
   changeProSubmit() {
     if (this.state.gid == undefined || !this.state.gid) {
       message.warning("服务名称不匹配!");
-      return false;
+      return 
     }
     let reg = /^([0]|[1-9][0-9]*)$/;
     if (
@@ -1051,36 +1052,29 @@ class ChangeApply extends Component {
       !reg.test(this.state.commodityQuantity)
     ) {
       message.warning("请输入正确商品数量!");
-      this.refs.commodityQuantity.focus();
-      return false;
-    }
-    if (this.state.patentType === "") {
-      message.warning("请选择专利类型!");
-      return
+      return 
     }
-    if (this.state.displayFees === "block") {
-      if (this.state.officialCost === "") {
+    if (this.state.displayFees === 'block') {
+      if (this.state.patentType === "" && !this.state.patentTransfer) {
+        message.warning("请选择专利类型!");
+        return 
+      }
+      if (this.state.officialCost === '') {
         message.warning("请选择官费!");
         return
       }
-    }
-    if (this.state.patentType === 0 || this.state.patentType === 2) {
-      if (this.state.officialCost === 1) {
-        if (this.state.costReduction === "") {
-          message.warning("请选择费减!");
-          return
-        }
+      if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2) && this.state.officialCost === 1) {
+        message.warning("请选择费减!");
+        return
       }
     }
     if (!this.state.commodityPrice) {
       message.warning("请输入金额!");
-      this.refs.commodityPrice.focus();
-      return false;
+      return 
     }
     if (!this.state.main) {
       message.warning("请选择是否为主要项目!");
-      this.refs.commodityQuantity.focus();
-      return false;
+      return 
     }
     this.setState({
       loading: true

+ 1 - 1
package.json

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