Sfoglia il codice sorgente

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhangyuewww 3 anni fa
parent
commit
dd4f71a9d8

+ 183 - 86
src/views/contractManagement/futuresPurchaseContractAdd.vue

@@ -912,16 +912,19 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.seller) {
+      if (!this.deptBudgetList.settlementMethod) {
         this.$message({
-          message: '请输入卖方名称!',
+          message: '请输入结算方式!',
           type: 'warning',
         })
         return
       }
-      if (this.deptBudgetList.seller.length > 30) {
+      if (
+        this.deptBudgetList.settlementMethod.length < 1 ||
+        this.deptBudgetList.settlementMethod.length > 20
+      ) {
         this.$message({
-          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          message: '结算方式长度不符合要求,请输入1到20个字符之内!',
           type: 'warning',
         })
         return
@@ -950,6 +953,20 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.seller) {
+        this.$message({
+          message: '请输入卖方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.seller.length > 30) {
+        this.$message({
+          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }     
       if (!this.deptBudgetList.sellerPhone) {
         this.$message({
           message: '请输入卖方电话!',
@@ -974,6 +991,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.acceptanceMethod) {
+        this.$message({
+          message: '请选择验收方式',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.weight) {
         this.$message({
           message: '请输入交易数量!',
@@ -996,152 +1020,158 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.basisPrice) {
+      if (!this.deptBudgetList.warehousingFee) {
         this.$message({
-          message: '请输入基差!',
+          message: '请输入入库费!',
           type: 'warning',
         })
         return
       }
       if (
-        isNaN(this.deptBudgetList.basisPrice) ||
-        (String(this.deptBudgetList.basisPrice).indexOf('.') != -1 &&
-          String(this.deptBudgetList.basisPrice).length -
-            (String(this.deptBudgetList.basisPrice).indexOf('.') + 1) >
+        isNaN(this.deptBudgetList.warehousingFee) ||
+        (String(this.deptBudgetList.warehousingFee).indexOf('.') != -1 &&
+          String(this.deptBudgetList.warehousingFee).length -
+            (String(this.deptBudgetList.warehousingFee).indexOf('.') + 1) >
             3) ||
-        this.deptBudgetList.basisPrice < 0 ||
-        this.deptBudgetList.basisPrice > 10000
+        this.deptBudgetList.warehousingFee < 0 ||
+        this.deptBudgetList.warehousingFee > 1000
       ) {
         this.$message({
-          message: '基差输入错误!',
+          message: '入库费输入错误!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.transactionsPlace) {
+      if (!this.deptBudgetList.measurementStandard) {
         this.$message({
-          message: '请输入交易所!',
+          message: '请输入计量标准!',
           type: 'warning',
         })
         return
       }
       if (
-        this.deptBudgetList.transactionsPlace.length < 2 ||
-        this.deptBudgetList.transactionsPlace.length > 15
+        this.deptBudgetList.measurementStandard.length < 1 ||
+        this.deptBudgetList.measurementStandard.length > 20
       ) {
         this.$message({
-          message: '交易所长度不符合要求,请输入2到15个字符之内!',
+          message: '计量标准长度不符合要求,请输入1到20个字符之内!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.contractNumber) {
+      if (!this.deptBudgetList.basisPrice) {
         this.$message({
-          message: '请输入合约号!',
+          message: '请输入基差!',
           type: 'warning',
         })
         return
       }
       if (
-        this.deptBudgetList.contractNumber.length < 2 ||
-        this.deptBudgetList.contractNumber.length > 15
+        isNaN(this.deptBudgetList.basisPrice) ||
+        (String(this.deptBudgetList.basisPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.basisPrice).length -
+            (String(this.deptBudgetList.basisPrice).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.basisPrice < 0 ||
+        this.deptBudgetList.basisPrice > 10000
       ) {
         this.$message({
-          message: '合约号长度不符合要求,请输入2到15个字符之内!',
+          message: '基差输入错误!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.pointPrice) {
+      if (!this.deptBudgetList.receiveWarehouse) {
         this.$message({
-          message: '请输入点价!',
+          message: '请选择收货库!',
           type: 'warning',
         })
         return
       }
-      if (
-        isNaN(this.deptBudgetList.pointPrice) ||
-        (String(this.deptBudgetList.pointPrice).indexOf('.') != -1 &&
-          String(this.deptBudgetList.pointPrice).length -
-            (String(this.deptBudgetList.pointPrice).indexOf('.') + 1) >
-            3) ||
-        this.deptBudgetList.pointPrice < 0 ||
-        this.deptBudgetList.pointPrice > 100000
-      ) {
+      if (!this.deptBudgetList.transactionsPlace) {
         this.$message({
-          message: '输入点价有误!',
+          message: '请输入交易所!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.warehousingFee) {
+      if (
+        this.deptBudgetList.transactionsPlace.length < 2 ||
+        this.deptBudgetList.transactionsPlace.length > 15
+      ) {
         this.$message({
-          message: '请输入入库费!',
+          message: '交易所长度不符合要求,请输入2到15个字符之内!',
           type: 'warning',
         })
         return
       }
-      if (
-        isNaN(this.deptBudgetList.warehousingFee) ||
-        (String(this.deptBudgetList.warehousingFee).indexOf('.') != -1 &&
-          String(this.deptBudgetList.warehousingFee).length -
-            (String(this.deptBudgetList.warehousingFee).indexOf('.') + 1) >
-            3) ||
-        this.deptBudgetList.warehousingFee < 0 ||
-        this.deptBudgetList.warehousingFee > 1000
-      ) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
-          message: '入库费输入错误!',
+          message: '请选择交货所在地区!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.measurementStandard) {
+      if (!this.deptBudgetList.contractNumber) {
         this.$message({
-          message: '请输入计量标准!',
+          message: '请输入合约号!',
           type: 'warning',
         })
         return
       }
       if (
-        this.deptBudgetList.measurementStandard.length < 1 ||
-        this.deptBudgetList.measurementStandard.length > 20
+        this.deptBudgetList.contractNumber.length < 2 ||
+        this.deptBudgetList.contractNumber.length > 15
       ) {
         this.$message({
-          message: '计量标准长度不符合要求,请输入1到20个字符之内!',
+          message: '合约号长度不符合要求,请输入2到15个字符之内!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.settlementMethod) {
+      if (!this.deptBudgetList.placeDelivery) {
         this.$message({
-          message: '请输入结算方式!',
+          message: '请输入交货详细地址!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.placeDelivery) {
+      if (!this.deptBudgetList.pointPrice) {
         this.$message({
-          message: '请输入交货详细地址!',
+          message: '请输入点价!',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions.length == 0) {
+      if (
+        isNaN(this.deptBudgetList.pointPrice) ||
+        (String(this.deptBudgetList.pointPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.pointPrice).length -
+            (String(this.deptBudgetList.pointPrice).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.pointPrice < 0 ||
+        this.deptBudgetList.pointPrice > 100000
+      ) {
         this.$message({
-          message: '请选择交货所在地区!',
+          message: '输入点价有误!',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions1.length == 0) {
+      if (!this.deptBudgetList.signingDate) {
         this.$message({
-          message: '请选择产地!',
+          message: '请选择签订日期',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.pointPriceDate) {
+        this.$message({
+          message: '请选择点价日期',
           type: 'warning',
         })
         return
       }
-      
       if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
           message: '请选择交货日期(起)',
@@ -1167,9 +1197,10 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.signingDate) {
+      //货物信息
+      if (this.selectedOptions1.length == 0) {
         this.$message({
-          message: '请选择签订日期',
+          message: '请选择产地!',
           type: 'warning',
         })
         return
@@ -1188,6 +1219,19 @@ export default {
         })
         return
       }
+      if (
+        this.deptBudgetList.contractGoodsInfo.waterContent &&
+        String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') != -1 &&
+        String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
+          (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') + 1) >
+          2||this.deptBudgetList.contractGoodsInfo.waterContent>40||this.deptBudgetList.contractGoodsInfo.waterContent<1
+      ) {
+        this.$message({
+          message: '水分输入错误',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.contractGoodsInfo.grade) {
         this.$message({
           message: '请选择品级',
@@ -1202,16 +1246,19 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.impurity) {
+        this.$message({
+          message: '请输入杂质',
+          type: 'warning',
+        })
+        return
+      }
       if (
-        !this.deptBudgetList.contractGoodsInfo.impurity ||
-        (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
-          -1 &&
-          String(this.deptBudgetList.contractGoodsInfo.impurity).length -
-            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
-              '.'
-            ) +
-              1) >
-            2)
+        this.deptBudgetList.contractGoodsInfo.impurity &&
+        String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') != -1 &&
+        String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+          (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') + 1) >
+          2||this.deptBudgetList.contractGoodsInfo.impurity>40||this.deptBudgetList.contractGoodsInfo.impurity<1
       ) {
         this.$message({
           message: '杂质输入错误',
@@ -1219,17 +1266,19 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
+        this.$message({
+          message: '请输入容重',
+          type: 'warning',
+        })
+        return
+      }
       if (
-        !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
-        (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
-          '.'
-        ) != -1 &&
+        (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
+          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') != -1 &&
           String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
-            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
-              '.'
-            ) +
-              1) >
-            2)
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') + 1) >
+            2) || this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 || this.deptBudgetList.contractGoodsInfo.bulkDensity < 500
       ) {
         this.$message({
           message: '容重输入错误',
@@ -1237,6 +1286,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
+        this.$message({
+          message: '请输入霉变粒',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
         (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
@@ -1247,7 +1303,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.mildewGrain>40||this.deptBudgetList.contractGoodsInfo.mildewGrain<1)
       ) {
         this.$message({
           message: '霉变粒输入错误',
@@ -1255,6 +1311,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
+        this.$message({
+          message: '请输入热损伤',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
         (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
@@ -1264,7 +1327,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.jiaorenli>40||this.deptBudgetList.contractGoodsInfo.jiaorenli<1)
       ) {
         this.$message({
           message: '热损伤输入错误',
@@ -1272,6 +1335,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
+        this.$message({
+          message: '请输入不完善粒',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
         (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
@@ -1282,7 +1352,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.imperfectGrain
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.imperfectGrain>40||this.deptBudgetList.contractGoodsInfo.imperfectGrain<1)
       ) {
         this.$message({
           message: '不完整粒输入错误',
@@ -1290,6 +1360,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.protein) {
+        this.$message({
+          message: '请输入蛋白',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.protein ||
         (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf(
@@ -1300,7 +1377,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.protein
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.protein>70||this.deptBudgetList.contractGoodsInfo.protein<1)
       ) {
         this.$message({
           message: '蛋白输入错误',
@@ -1320,7 +1397,8 @@ export default {
             ).indexOf('.') +
               1) >
             2)
-      ) {
+      ) 
+      {
         this.$message({
           message: '合同收入金额输入错误',
           type: 'warning',
@@ -1384,6 +1462,25 @@ export default {
         })
         return
       }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) ||
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.mildewGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '未回款金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
       
       var that = this
       this.$refs.deptBudgetList.validate((valid) => {

+ 196 - 91
src/views/contractManagement/futuresPurchaseContractEdit.vue

@@ -1036,16 +1036,19 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.seller) {
+      if (!this.deptBudgetList.settlementMethod) {
         this.$message({
-          message: '请输入卖方名称!',
+          message: '请输入结算方式!',
           type: 'warning',
         })
         return
       }
-      if (this.deptBudgetList.seller.length > 30) {
+      if (
+        this.deptBudgetList.settlementMethod.length < 1 ||
+        this.deptBudgetList.settlementMethod.length > 20
+      ) {
         this.$message({
-          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          message: '结算方式长度不符合要求,请输入1到20个字符之内!',
           type: 'warning',
         })
         return
@@ -1074,6 +1077,20 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.seller) {
+        this.$message({
+          message: '请输入卖方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.seller.length > 30) {
+        this.$message({
+          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }     
       if (!this.deptBudgetList.sellerPhone) {
         this.$message({
           message: '请输入卖方电话!',
@@ -1098,6 +1115,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.acceptanceMethod) {
+        this.$message({
+          message: '请选择验收方式',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.weight) {
         this.$message({
           message: '请输入交易数量!',
@@ -1120,152 +1144,158 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.basisPrice) {
+      if (!this.deptBudgetList.warehousingFee) {
         this.$message({
-          message: '请输入基差!',
+          message: '请输入入库费!',
           type: 'warning',
         })
         return
       }
       if (
-        isNaN(this.deptBudgetList.basisPrice) ||
-        (String(this.deptBudgetList.basisPrice).indexOf('.') != -1 &&
-          String(this.deptBudgetList.basisPrice).length -
-            (String(this.deptBudgetList.basisPrice).indexOf('.') + 1) >
+        isNaN(this.deptBudgetList.warehousingFee) ||
+        (String(this.deptBudgetList.warehousingFee).indexOf('.') != -1 &&
+          String(this.deptBudgetList.warehousingFee).length -
+            (String(this.deptBudgetList.warehousingFee).indexOf('.') + 1) >
             3) ||
-        this.deptBudgetList.basisPrice < 0 ||
-        this.deptBudgetList.basisPrice > 10000
+        this.deptBudgetList.warehousingFee < 0 ||
+        this.deptBudgetList.warehousingFee > 1000
       ) {
         this.$message({
-          message: '基差输入错误!',
+          message: '入库费输入错误!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.transactionsPlace) {
+      if (!this.deptBudgetList.measurementStandard) {
         this.$message({
-          message: '请输入交易所!',
+          message: '请输入计量标准!',
           type: 'warning',
         })
         return
       }
       if (
-        this.deptBudgetList.transactionsPlace.length < 2 ||
-        this.deptBudgetList.transactionsPlace.length > 15
+        this.deptBudgetList.measurementStandard.length < 1 ||
+        this.deptBudgetList.measurementStandard.length > 20
       ) {
         this.$message({
-          message: '交易所长度不符合要求,请输入2到15个字符之内!',
+          message: '计量标准长度不符合要求,请输入1到20个字符之内!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.contractNumber) {
+      if (!this.deptBudgetList.basisPrice) {
         this.$message({
-          message: '请输入合约号!',
+          message: '请输入基差!',
           type: 'warning',
         })
         return
       }
       if (
-        this.deptBudgetList.contractNumber.length < 2 ||
-        this.deptBudgetList.contractNumber.length > 15
+        isNaN(this.deptBudgetList.basisPrice) ||
+        (String(this.deptBudgetList.basisPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.basisPrice).length -
+            (String(this.deptBudgetList.basisPrice).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.basisPrice < 0 ||
+        this.deptBudgetList.basisPrice > 10000
       ) {
         this.$message({
-          message: '合约号长度不符合要求,请输入2到15个字符之内!',
+          message: '基差输入错误!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.pointPrice) {
+      if (!this.deptBudgetList.receiveWarehouse) {
         this.$message({
-          message: '请输入点价!',
+          message: '请选择收货库!',
           type: 'warning',
         })
         return
       }
-      if (
-        isNaN(this.deptBudgetList.pointPrice) ||
-        (String(this.deptBudgetList.pointPrice).indexOf('.') != -1 &&
-          String(this.deptBudgetList.pointPrice).length -
-            (String(this.deptBudgetList.pointPrice).indexOf('.') + 1) >
-            3) ||
-        this.deptBudgetList.pointPrice < 0 ||
-        this.deptBudgetList.pointPrice > 100000
-      ) {
+      if (!this.deptBudgetList.transactionsPlace) {
         this.$message({
-          message: '输入点价有误!',
+          message: '请输入交易所!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.warehousingFee) {
+      if (
+        this.deptBudgetList.transactionsPlace.length < 2 ||
+        this.deptBudgetList.transactionsPlace.length > 15
+      ) {
         this.$message({
-          message: '请输入入库费!',
+          message: '交易所长度不符合要求,请输入2到15个字符之内!',
           type: 'warning',
         })
         return
       }
-      if (
-        isNaN(this.deptBudgetList.warehousingFee) ||
-        (String(this.deptBudgetList.warehousingFee).indexOf('.') != -1 &&
-          String(this.deptBudgetList.warehousingFee).length -
-            (String(this.deptBudgetList.warehousingFee).indexOf('.') + 1) >
-            3) ||
-        this.deptBudgetList.warehousingFee < 0 ||
-        this.deptBudgetList.warehousingFee > 1000
-      ) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
-          message: '入库费输入错误!',
+          message: '请选择交货所在地区!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.measurementStandard) {
+      if (!this.deptBudgetList.contractNumber) {
         this.$message({
-          message: '请输入计量标准!',
+          message: '请输入合约号!',
           type: 'warning',
         })
         return
       }
       if (
-        this.deptBudgetList.measurementStandard.length < 1 ||
-        this.deptBudgetList.measurementStandard.length > 20
+        this.deptBudgetList.contractNumber.length < 2 ||
+        this.deptBudgetList.contractNumber.length > 15
       ) {
         this.$message({
-          message: '计量标准长度不符合要求,请输入1到20个字符之内!',
+          message: '合约号长度不符合要求,请输入2到15个字符之内!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.settlementMethod) {
+      if (!this.deptBudgetList.placeDelivery) {
         this.$message({
-          message: '请输入结算方式!',
+          message: '请输入交货详细地址!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.placeDelivery) {
+      if (!this.deptBudgetList.pointPrice) {
         this.$message({
-          message: '请输入交货详细地址!',
+          message: '请输入点价!',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions.length == 0) {
+      if (
+        isNaN(this.deptBudgetList.pointPrice) ||
+        (String(this.deptBudgetList.pointPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.pointPrice).length -
+            (String(this.deptBudgetList.pointPrice).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.pointPrice < 0 ||
+        this.deptBudgetList.pointPrice > 100000
+      ) {
         this.$message({
-          message: '请选择交货所在地区!',
+          message: '输入点价有误!',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions1.length == 0) {
+      if (!this.deptBudgetList.signingDate) {
         this.$message({
-          message: '请选择产地!',
+          message: '请选择签订日期',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.pointPriceDate) {
+        this.$message({
+          message: '请选择点价日期',
           type: 'warning',
         })
         return
       }
-
       if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
           message: '请选择交货日期(起)',
@@ -1291,9 +1321,10 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.signingDate) {
+      //货物信息
+      if (this.selectedOptions1.length == 0) {
         this.$message({
-          message: '请选择签订日期',
+          message: '请选择产地!',
           type: 'warning',
         })
         return
@@ -1312,6 +1343,19 @@ export default {
         })
         return
       }
+      if (
+        this.deptBudgetList.contractGoodsInfo.waterContent &&
+        String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') != -1 &&
+        String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
+          (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') + 1) >
+          2||this.deptBudgetList.contractGoodsInfo.waterContent>40||this.deptBudgetList.contractGoodsInfo.waterContent<1
+      ) {
+        this.$message({
+          message: '水分输入错误',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.contractGoodsInfo.grade) {
         this.$message({
           message: '请选择品级',
@@ -1326,16 +1370,19 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.impurity) {
+        this.$message({
+          message: '请输入杂质',
+          type: 'warning',
+        })
+        return
+      }
       if (
-        !this.deptBudgetList.contractGoodsInfo.impurity ||
-        (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
-          -1 &&
-          String(this.deptBudgetList.contractGoodsInfo.impurity).length -
-            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
-              '.'
-            ) +
-              1) >
-            2)
+        this.deptBudgetList.contractGoodsInfo.impurity &&
+        String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') != -1 &&
+        String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+          (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') + 1) >
+          2||this.deptBudgetList.contractGoodsInfo.impurity>40||this.deptBudgetList.contractGoodsInfo.impurity<1
       ) {
         this.$message({
           message: '杂质输入错误',
@@ -1343,17 +1390,19 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
+        this.$message({
+          message: '请输入容重',
+          type: 'warning',
+        })
+        return
+      }
       if (
-        !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
-        (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
-          '.'
-        ) != -1 &&
+        (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
+          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') != -1 &&
           String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
-            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
-              '.'
-            ) +
-              1) >
-            2)
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') + 1) >
+            2) || this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 || this.deptBudgetList.contractGoodsInfo.bulkDensity < 500
       ) {
         this.$message({
           message: '容重输入错误',
@@ -1361,6 +1410,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
+        this.$message({
+          message: '请输入霉变粒',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
         (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
@@ -1371,7 +1427,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.mildewGrain>40||this.deptBudgetList.contractGoodsInfo.mildewGrain<1)
       ) {
         this.$message({
           message: '霉变粒输入错误',
@@ -1379,6 +1435,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
+        this.$message({
+          message: '请输入热损伤',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
         (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
@@ -1388,7 +1451,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.jiaorenli>40||this.deptBudgetList.contractGoodsInfo.jiaorenli<1)
       ) {
         this.$message({
           message: '热损伤输入错误',
@@ -1396,6 +1459,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
+        this.$message({
+          message: '请输入不完善粒',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
         (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
@@ -1406,7 +1476,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.imperfectGrain
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.imperfectGrain>40||this.deptBudgetList.contractGoodsInfo.imperfectGrain<1)
       ) {
         this.$message({
           message: '不完整粒输入错误',
@@ -1414,16 +1484,24 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.protein) {
+        this.$message({
+          message: '请输入蛋白',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.protein ||
-        (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf('.') !=
-          -1 &&
+        (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf(
+          '.'
+        ) != -1 &&
           String(this.deptBudgetList.contractGoodsInfo.protein).length -
-            (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf(
-              '.'
-            ) +
+            (String(
+              this.deptBudgetList.contractGoodsInfo.protein
+            ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.protein>70||this.deptBudgetList.contractGoodsInfo.protein<1)
       ) {
         this.$message({
           message: '蛋白输入错误',
@@ -1443,7 +1521,8 @@ export default {
             ).indexOf('.') +
               1) >
             2)
-      ) {
+      ) 
+      {
         this.$message({
           message: '合同收入金额输入错误',
           type: 'warning',
@@ -1507,6 +1586,31 @@ export default {
         })
         return
       }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) ||
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.mildewGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '未回款金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`确定提交本次修改?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+      })
+      .then(() => {
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.contractGoodsInfo.outputPrivate =
@@ -1545,6 +1649,7 @@ export default {
           return false
         }
       })
+      })
     },
   },
 }

+ 159 - 64
src/views/contractManagement/futuresSalesContractAdd.vue

@@ -912,16 +912,19 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.seller) {
+      if (!this.deptBudgetList.settlementMethod) {
         this.$message({
-          message: '请输入卖方名称!',
+          message: '请输入结算方式!',
           type: 'warning',
         })
         return
       }
-      if (this.deptBudgetList.seller.length > 30) {
+      if (
+        this.deptBudgetList.settlementMethod.length < 1 ||
+        this.deptBudgetList.settlementMethod.length > 20
+      ) {
         this.$message({
-          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          message: '结算方式长度不符合要求,请输入1到20个字符之内!',
           type: 'warning',
         })
         return
@@ -950,6 +953,20 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.seller) {
+        this.$message({
+          message: '请输入卖方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.seller.length > 30) {
+        this.$message({
+          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }     
       if (!this.deptBudgetList.sellerPhone) {
         this.$message({
           message: '请输入卖方电话!',
@@ -974,6 +991,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.acceptanceMethod) {
+        this.$message({
+          message: '请选择验收方式',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.weight) {
         this.$message({
           message: '请输入交易数量!',
@@ -996,6 +1020,23 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.measurementStandard) {
+        this.$message({
+          message: '请输入计量标准!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.measurementStandard.length < 1 ||
+        this.deptBudgetList.measurementStandard.length > 20
+      ) {
+        this.$message({
+          message: '计量标准长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.basisPrice) {
         this.$message({
           message: '请输入基差!',
@@ -1018,6 +1059,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.receiveWarehouse) {
+        this.$message({
+          message: '请选择出货库!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.transactionsPlace) {
         this.$message({
           message: '请输入交易所!',
@@ -1035,6 +1083,13 @@ export default {
         })
         return
       }
+      if (this.selectedOptions.length == 0) {
+        this.$message({
+          message: '请选择交货所在地区!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.contractNumber) {
         this.$message({
           message: '请输入合约号!',
@@ -1052,6 +1107,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货详细地址!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.pointPrice) {
         this.$message({
           message: '请输入点价!',
@@ -1074,44 +1136,46 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.measurementStandard) {
+      if (!this.deptBudgetList.signingDate) {
         this.$message({
-          message: '请输入计量标准!',
+          message: '请选择签订日期',
           type: 'warning',
         })
         return
       }
-      if (
-        this.deptBudgetList.measurementStandard.length < 1 ||
-        this.deptBudgetList.measurementStandard.length > 20
-      ) {
+      if (!this.deptBudgetList.pointPriceDate) {
         this.$message({
-          message: '计量标准长度不符合要求,请输入1到20个字符之内!',
+          message: '请选择点价日期',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.settlementMethod) {
+      if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
-          message: '请输入结算方式!',
+          message: '请选择交货日期(起)',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.placeDelivery) {
+      if (!this.deptBudgetList.deliveryDateEnd) {
         this.$message({
-          message: '请输入交货详细地址!',
+          message: '请选择交货日期(止)',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions.length == 0) {
+      //时间
+      if (
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+      ) {
         this.$message({
-          message: '请选择交货所在地区!',
+          message: '交货日期(止)选择错误',
           type: 'warning',
         })
         return
       }
+      //货物信息
       if (this.selectedOptions1.length == 0) {
         this.$message({
           message: '请选择产地!',
@@ -1119,98 +1183,90 @@ export default {
         })
         return
       }
-      
-      if (!this.deptBudgetList.deliveryDateStart) {
+      if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
         this.$message({
-          message: '请选择交货日期(起)',
+          message: '请选择货名',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.deliveryDateEnd) {
+      if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
         this.$message({
-          message: '请选择交货日期(止)',
+          message: '请输入水分',
           type: 'warning',
         })
         return
       }
-      //时间
       if (
-        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
-        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+        this.deptBudgetList.contractGoodsInfo.waterContent &&
+        String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') != -1 &&
+        String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
+          (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') + 1) >
+          2||this.deptBudgetList.contractGoodsInfo.waterContent>40||this.deptBudgetList.contractGoodsInfo.waterContent<1
       ) {
         this.$message({
-          message: '交货日期(止)选择错误',
+          message: '水分输入错误',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.signingDate) {
+      if (!this.deptBudgetList.contractGoodsInfo.grade) {
         this.$message({
-          message: '请选择签订日期',
+          message: '请选择品级',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+      if (!this.deptBudgetList.contractGoodsInfo.transgene) {
         this.$message({
-          message: '请选择货名',
+          message: '请选择转基因',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+      if (!this.deptBudgetList.contractGoodsInfo.impurity) {
         this.$message({
-          message: '请输入水分',
+          message: '请输入杂质',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.contractGoodsInfo.grade) {
+      if (
+        this.deptBudgetList.contractGoodsInfo.impurity &&
+        String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') != -1 &&
+        String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+          (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') + 1) >
+          2||this.deptBudgetList.contractGoodsInfo.impurity>40||this.deptBudgetList.contractGoodsInfo.impurity<1
+      ) {
         this.$message({
-          message: '请选择品级',
+          message: '杂质输入错误',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.contractGoodsInfo.transgene) {
+      if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
         this.$message({
-          message: '请选择转基因',
+          message: '请输入容重',
           type: 'warning',
         })
         return
       }
       if (
-        !this.deptBudgetList.contractGoodsInfo.impurity ||
-        (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
-          -1 &&
-          String(this.deptBudgetList.contractGoodsInfo.impurity).length -
-            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
-              '.'
-            ) +
-              1) >
-            2)
+        (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
+          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') + 1) >
+            2) || this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 || this.deptBudgetList.contractGoodsInfo.bulkDensity < 500
       ) {
         this.$message({
-          message: '杂质输入错误',
+          message: '容重输入错误',
           type: 'warning',
         })
         return
       }
-      if (
-        !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
-        (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
-          '.'
-        ) != -1 &&
-          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
-            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
-              '.'
-            ) +
-              1) >
-            2)
-      ) {
+      if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
         this.$message({
-          message: '容重输入错误',
+          message: '请输入霉变粒',
           type: 'warning',
         })
         return
@@ -1225,7 +1281,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.mildewGrain>40||this.deptBudgetList.contractGoodsInfo.mildewGrain<1)
       ) {
         this.$message({
           message: '霉变粒输入错误',
@@ -1233,6 +1289,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
+        this.$message({
+          message: '请输入热损伤',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
         (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
@@ -1242,7 +1305,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.jiaorenli>40||this.deptBudgetList.contractGoodsInfo.jiaorenli<1)
       ) {
         this.$message({
           message: '热损伤输入错误',
@@ -1250,6 +1313,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
+        this.$message({
+          message: '请输入不完善粒',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
         (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
@@ -1260,7 +1330,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.imperfectGrain
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.imperfectGrain>40||this.deptBudgetList.contractGoodsInfo.imperfectGrain<1)
       ) {
         this.$message({
           message: '不完整粒输入错误',
@@ -1268,6 +1338,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.protein) {
+        this.$message({
+          message: '请输入蛋白',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.protein ||
         (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf(
@@ -1278,7 +1355,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.protein
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.protein>70||this.deptBudgetList.contractGoodsInfo.protein<1)
       ) {
         this.$message({
           message: '蛋白输入错误',
@@ -1363,7 +1440,25 @@ export default {
         })
         return
       }
-      
+      if (
+        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) ||
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.mildewGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '未回款金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
       var that = this
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {

+ 168 - 64
src/views/contractManagement/futuresSalesContractEdit.vue

@@ -1030,16 +1030,19 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.seller) {
+      if (!this.deptBudgetList.settlementMethod) {
         this.$message({
-          message: '请输入卖方名称!',
+          message: '请输入结算方式!',
           type: 'warning',
         })
         return
       }
-      if (this.deptBudgetList.seller.length > 30) {
+      if (
+        this.deptBudgetList.settlementMethod.length < 1 ||
+        this.deptBudgetList.settlementMethod.length > 20
+      ) {
         this.$message({
-          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          message: '结算方式长度不符合要求,请输入1到20个字符之内!',
           type: 'warning',
         })
         return
@@ -1068,6 +1071,20 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.seller) {
+        this.$message({
+          message: '请输入卖方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.seller.length > 30) {
+        this.$message({
+          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }     
       if (!this.deptBudgetList.sellerPhone) {
         this.$message({
           message: '请输入卖方电话!',
@@ -1092,6 +1109,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.acceptanceMethod) {
+        this.$message({
+          message: '请选择验收方式',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.weight) {
         this.$message({
           message: '请输入交易数量!',
@@ -1114,6 +1138,23 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.measurementStandard) {
+        this.$message({
+          message: '请输入计量标准!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.measurementStandard.length < 1 ||
+        this.deptBudgetList.measurementStandard.length > 20
+      ) {
+        this.$message({
+          message: '计量标准长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.basisPrice) {
         this.$message({
           message: '请输入基差!',
@@ -1136,6 +1177,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.receiveWarehouse) {
+        this.$message({
+          message: '请选择出货库!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.transactionsPlace) {
         this.$message({
           message: '请输入交易所!',
@@ -1153,6 +1201,13 @@ export default {
         })
         return
       }
+      if (this.selectedOptions.length == 0) {
+        this.$message({
+          message: '请选择交货所在地区!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.contractNumber) {
         this.$message({
           message: '请输入合约号!',
@@ -1170,6 +1225,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货详细地址!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.pointPrice) {
         this.$message({
           message: '请输入点价!',
@@ -1192,44 +1254,46 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.measurementStandard) {
+      if (!this.deptBudgetList.signingDate) {
         this.$message({
-          message: '请输入计量标准!',
+          message: '请选择签订日期',
           type: 'warning',
         })
         return
       }
-      if (
-        this.deptBudgetList.measurementStandard.length < 1 ||
-        this.deptBudgetList.measurementStandard.length > 20
-      ) {
+      if (!this.deptBudgetList.pointPriceDate) {
         this.$message({
-          message: '计量标准长度不符合要求,请输入1到20个字符之内!',
+          message: '请选择点价日期',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.settlementMethod) {
+      if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
-          message: '请输入结算方式!',
+          message: '请选择交货日期(起)',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.placeDelivery) {
+      if (!this.deptBudgetList.deliveryDateEnd) {
         this.$message({
-          message: '请输入交货详细地址!',
+          message: '请选择交货日期(止)',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions.length == 0) {
+      //时间
+      if (
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+      ) {
         this.$message({
-          message: '请选择交货所在地区!',
+          message: '交货日期(止)选择错误',
           type: 'warning',
         })
         return
       }
+      //货物信息
       if (this.selectedOptions1.length == 0) {
         this.$message({
           message: '请选择产地!',
@@ -1237,98 +1301,90 @@ export default {
         })
         return
       }
-      
-      if (!this.deptBudgetList.deliveryDateStart) {
+      if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
         this.$message({
-          message: '请选择交货日期(起)',
+          message: '请选择货名',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.deliveryDateEnd) {
+      if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
         this.$message({
-          message: '请选择交货日期(止)',
+          message: '请输入水分',
           type: 'warning',
         })
         return
       }
-      //时间
       if (
-        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
-        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+        this.deptBudgetList.contractGoodsInfo.waterContent &&
+        String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') != -1 &&
+        String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
+          (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') + 1) >
+          2||this.deptBudgetList.contractGoodsInfo.waterContent>40||this.deptBudgetList.contractGoodsInfo.waterContent<1
       ) {
         this.$message({
-          message: '交货日期(止)选择错误',
+          message: '水分输入错误',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.signingDate) {
+      if (!this.deptBudgetList.contractGoodsInfo.grade) {
         this.$message({
-          message: '请选择签订日期',
+          message: '请选择品级',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+      if (!this.deptBudgetList.contractGoodsInfo.transgene) {
         this.$message({
-          message: '请选择货名',
+          message: '请选择转基因',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+      if (!this.deptBudgetList.contractGoodsInfo.impurity) {
         this.$message({
-          message: '请输入水分',
+          message: '请输入杂质',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.contractGoodsInfo.grade) {
+      if (
+        this.deptBudgetList.contractGoodsInfo.impurity &&
+        String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') != -1 &&
+        String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+          (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') + 1) >
+          2||this.deptBudgetList.contractGoodsInfo.impurity>40||this.deptBudgetList.contractGoodsInfo.impurity<1
+      ) {
         this.$message({
-          message: '请选择品级',
+          message: '杂质输入错误',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.contractGoodsInfo.transgene) {
+      if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
         this.$message({
-          message: '请选择转基因',
+          message: '请输入容重',
           type: 'warning',
         })
         return
       }
       if (
-        !this.deptBudgetList.contractGoodsInfo.impurity ||
-        (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
-          -1 &&
-          String(this.deptBudgetList.contractGoodsInfo.impurity).length -
-            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
-              '.'
-            ) +
-              1) >
-            2)
+        (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
+          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') + 1) >
+            2) || this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 || this.deptBudgetList.contractGoodsInfo.bulkDensity < 500
       ) {
         this.$message({
-          message: '杂质输入错误',
+          message: '容重输入错误',
           type: 'warning',
         })
         return
       }
-      if (
-        !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
-        (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
-          '.'
-        ) != -1 &&
-          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
-            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
-              '.'
-            ) +
-              1) >
-            2)
-      ) {
+      if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
         this.$message({
-          message: '容重输入错误',
+          message: '请输入霉变粒',
           type: 'warning',
         })
         return
@@ -1343,7 +1399,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.mildewGrain>40||this.deptBudgetList.contractGoodsInfo.mildewGrain<1)
       ) {
         this.$message({
           message: '霉变粒输入错误',
@@ -1351,6 +1407,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
+        this.$message({
+          message: '请输入热损伤',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
         (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
@@ -1360,7 +1423,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.jiaorenli>40||this.deptBudgetList.contractGoodsInfo.jiaorenli<1)
       ) {
         this.$message({
           message: '热损伤输入错误',
@@ -1368,6 +1431,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
+        this.$message({
+          message: '请输入不完善粒',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
         (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
@@ -1378,7 +1448,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.imperfectGrain
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.imperfectGrain>40||this.deptBudgetList.contractGoodsInfo.imperfectGrain<1)
       ) {
         this.$message({
           message: '不完整粒输入错误',
@@ -1386,6 +1456,13 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.contractGoodsInfo.protein) {
+        this.$message({
+          message: '请输入蛋白',
+          type: 'warning',
+        })
+        return
+      }
       if (
         !this.deptBudgetList.contractGoodsInfo.protein ||
         (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf(
@@ -1396,7 +1473,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.protein
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.protein>70||this.deptBudgetList.contractGoodsInfo.protein<1)
       ) {
         this.$message({
           message: '蛋白输入错误',
@@ -1416,7 +1493,8 @@ export default {
             ).indexOf('.') +
               1) >
             2)
-      ) {
+      ) 
+      {
         this.$message({
           message: '合同收入金额输入错误',
           type: 'warning',
@@ -1480,6 +1558,31 @@ export default {
         })
         return
       }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) ||
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.mildewGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '未回款金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`确定提交本次修改?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+      })
+      .then(() => {
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.contractGoodsInfo.outputPrivate = CodeToText[this.selectedOptions1[0]]
@@ -1508,6 +1611,7 @@ export default {
           return false
         }
       })
+      })
     },
   },
 }