Browse Source

前端gjy

gjy 3 years ago
parent
commit
bb7a9c0c0f
25 changed files with 1686 additions and 805 deletions
  1. 184 87
      src/views/contractManagement/futuresPurchaseContractAdd.vue
  2. 197 92
      src/views/contractManagement/futuresPurchaseContractEdit.vue
  3. 1 1
      src/views/contractManagement/futuresPurchaseContractExamine.vue
  4. 1 0
      src/views/contractManagement/futuresSalesContract.vue
  5. 162 67
      src/views/contractManagement/futuresSalesContractAdd.vue
  6. 171 67
      src/views/contractManagement/futuresSalesContractEdit.vue
  7. 1 1
      src/views/contractManagement/futuresSalesContractExamine.vue
  8. 188 85
      src/views/contractManagement/purchaseContractAdd.vue
  9. 190 79
      src/views/contractManagement/purchaseContractEdit.vue
  10. 2 2
      src/views/contractManagement/purchaseContractExamine.vue
  11. 181 155
      src/views/contractManagement/salesContractAdd.vue
  12. 186 113
      src/views/contractManagement/salesContractEdit.vue
  13. 1 1
      src/views/contractManagement/salesContractExamine.vue
  14. 2 2
      src/views/platformaudit/saletransactioninformationreview.vue
  15. 2 2
      src/views/platformaudit/transactioninformationreview.vue
  16. 4 4
      src/views/purchasingManagement/procurementPlanAdd.vue
  17. 14 3
      src/views/purchasingManagement/procurementPlanEdit.vue
  18. 3 3
      src/views/purchasingManagement/procurementPlanList.vue
  19. 9 4
      src/views/purchasingManagement/procurementPlanLook.vue
  20. 76 19
      src/views/purchasingManagement/purchaseOrderList.vue
  21. 9 2
      src/views/salesManagement/salesPlanAdd.vue
  22. 2 2
      src/views/salesManagement/salesPlanEdit.vue
  23. 1 2
      src/views/salesManagement/salesPlanList.vue
  24. 15 6
      src/views/salesManagement/salesPlanLook.vue
  25. 84 6
      src/views/salesManagement/salesPlanOrderList.vue

+ 184 - 87
src/views/contractManagement/futuresPurchaseContractAdd.vue

@@ -780,7 +780,7 @@ export default {
     },
     loaddata() {
       // 包装方式
-      packList({ constId: 'CON1' })
+      packList({ constId: 'PRO2' })
         .toPromise()
         .then((response) => {
           this.packtypeList = response
@@ -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) => {

+ 197 - 92
src/views/contractManagement/futuresPurchaseContractEdit.vue

@@ -780,7 +780,7 @@ export default {
         })
 
       // 包装方式
-      packList({ constId: 'CON1' })
+      packList({ constId: 'PRO2' })
         .toPromise()
         .then((response) => {
           this.packtypeList = response
@@ -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
         }
       })
+      })
     },
   },
 }

+ 1 - 1
src/views/contractManagement/futuresPurchaseContractExamine.vue

@@ -379,7 +379,7 @@ export default {
       this.dialogViewSpareMoney = false
     },
     returnsales() {
-      this.$router.push({ path: 'futuresPurchaseContract' })
+      this.$router.go(-1)
     },
     confirmationsheet() {
       this.$router.push({ path: 'priceConfirmationSheet',

+ 1 - 0
src/views/contractManagement/futuresSalesContract.vue

@@ -475,6 +475,7 @@ export default {
               arr = this.contractList.records[i].addressUrl.split(',')
               this.addressUrls[i] = arr
             }
+             this.contractList.records[i].basisPrice = '+'+this.contractList.records[i].basisPrice
           }
         })
     },

+ 162 - 67
src/views/contractManagement/futuresSalesContractAdd.vue

@@ -85,10 +85,10 @@
         
         <ws-form-item label="交货方式" span="1" prop="seller" class="readonly">
           <el-radio v-model="deptBudgetList.deliverType" label="1"
-            >我方自提</el-radio
+            >我方送货</el-radio
           >
           <el-radio v-model="deptBudgetList.deliverType" label="2"
-            >对方送货</el-radio
+            >对方自提</el-radio
           >
         </ws-form-item>
         <!--卖方-->
@@ -780,7 +780,7 @@ export default {
     },
     loaddata() {
       // 包装方式
-      packList({ constId: 'CON1' })
+      packList({ constId: 'PRO2' })
         .toPromise()
         .then((response) => {
           this.packtypeList = response
@@ -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) {

+ 171 - 67
src/views/contractManagement/futuresSalesContractEdit.vue

@@ -763,9 +763,9 @@ export default {
             TextToCode[response.contractGoodsInfo.outputPrivate][response.contractGoodsInfo.outputCity].code
           this.selectedOptions1 = tmp1
           if (this.deptBudgetList.deliverType == 1) {
-            this.deptBudgetList.deliverType1 = '我方自提'
+            this.deptBudgetList.deliverType1 = '我方送货'
           } else if (this.deptBudgetList.deliverType == 2) {
-            this.deptBudgetList.deliverType1 = '对方送货'
+            this.deptBudgetList.deliverType1 = '对方自提'
           }
           if(this.deptBudgetList.addressUrl != null){
             this.addressUrls = this.deptBudgetList.addressUrl.split(",")
@@ -774,7 +774,7 @@ export default {
         })
 
       // 包装方式
-      packList({ constId: 'CON1' })
+      packList({ constId: 'PRO2' })
         .toPromise()
         .then((response) => {
           this.packtypeList = response
@@ -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
         }
       })
+      })
     },
   },
 }

+ 1 - 1
src/views/contractManagement/futuresSalesContractExamine.vue

@@ -376,7 +376,7 @@ export default {
       this.dialogViewSpareMoney = false
     },
     returnsales() {
-      this.$router.push({ path: 'futuresSalesContract' })
+      this.$router.go(-1)
     },
     confirmationsheet() {
       this.$router.push({ path: 'priceConfirmationSheet',

+ 188 - 85
src/views/contractManagement/purchaseContractAdd.vue

@@ -821,7 +821,7 @@ export default {
     submit() {
       if (!this.deptBudgetList.contractNo) {
         this.$message({
-          message: '请输入合同编号',
+          message: '合同编号不能为空',
           type: 'warning',
         })
         return
@@ -838,7 +838,7 @@ export default {
       }
       if (!this.deptBudgetList.shippingType) {
         this.$message({
-          message: '请输入运输方式!',
+          message: '运输方式不能为空',
           type: 'warning',
         })
         return
@@ -855,7 +855,7 @@ export default {
       }
       if (!this.deptBudgetList.buyer) {
         this.$message({
-          message: '请输入买方名称!',
+          message: '买方名称不能为空',
           type: 'warning',
         })
         return
@@ -867,6 +867,23 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.settlementMethod) {
+        this.$message({
+          message: '结算方式不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.settlementMethod.length < 1 ||
+        this.deptBudgetList.settlementMethod.length > 20
+      ) {
+        this.$message({
+          message: '结算方式长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.seller) {
         this.$message({
           message: '请输入卖方名称!',
@@ -920,8 +937,8 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.buyerPhone.length < 7 ||
-        this.deptBudgetList.buyerPhone.length > 20
+        this.deptBudgetList.sellerPhone.length < 7 ||
+        this.deptBudgetList.sellerPhone.length > 20
       ) {
         this.$message({
           message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
@@ -929,78 +946,97 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.settlementMethod) {
+      if (!this.deptBudgetList.acceptanceMethod) {
         this.$message({
-          message: '请输入结算方式!',
+          message: '请选择验收方式',
           type: 'warning',
         })
         return
       }
-
-      if (!this.deptBudgetList.sourceGoods) {
+      if (!this.deptBudgetList.weight) {
         this.$message({
-          message: '请输入货源详细地址!',
+          message: '请输入重量!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.placeDelivery) {
+      if (
+        isNaN(this.deptBudgetList.weight) ||
+        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.weight < 0 ||
+        this.deptBudgetList.weight > 200000
+      ) {
         this.$message({
-          message: '请输入交货详细地址!',
+          message: '输入重量有误!',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions.length == 0) {
+      if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
-          message: '请选择货源所在地区!',
+          message: '请选择交货日期(起)',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions1.length == 0) {
+      if (!this.deptBudgetList.overShort){
         this.$message({
-          message: '请选择交货所在地区!',
+          message: '请输入溢短装!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.weight) {
+      if (
+        isNaN(this.deptBudgetList.overShort) ||
+        (String(this.deptBudgetList.overShort).indexOf('.') != -1 &&
+          String(this.deptBudgetList.overShort).length -
+            (String(this.deptBudgetList.overShort).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.overShort < 0 ||
+        this.deptBudgetList.overShort > 50
+      ) {
         this.$message({
-          message: '请输入重量!',
+          message: '溢短装输入有误!',
           type: 'warning',
         })
         return
       }
-
-      if (
-        isNaN(this.deptBudgetList.weight) ||
-        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
-          String(this.deptBudgetList.weight).length -
-            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
-            3) ||
-        this.deptBudgetList.weight < 0 ||
-        this.deptBudgetList.weight > 200000
-      ) {
+      if (!this.deptBudgetList.deliveryDateEnd) {
         this.$message({
-          message: '输入重量有误!',
+          message: '请选择交货日期(止)',
           type: 'warning',
         })
         return
       }
+       //时间
       if (
-        !this.deptBudgetList.overShort &&
-        isNaN(this.deptBudgetList.overShort)
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
       ) {
         this.$message({
-          message: '溢短装输入有误!',
+          message: '交货日期(止)选择错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.unitContractPrice) {
+        this.$message({
+          message: '请输入合同单价!',
           type: 'warning',
         })
         return
       }
       if (
-        !this.deptBudgetList.unitContractPrice &&
-        isNaN(this.deptBudgetList.unitContractPrice)
+        isNaN(this.deptBudgetList.unitContractPrice) ||
+        (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.unitContractPrice).length -
+            (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.unitContractPrice <= 0 ||
+        this.deptBudgetList.unitContractPrice > 10000
       ) {
         this.$message({
           message: '合同单价输入有误!',
@@ -1008,9 +1044,21 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.totalContractPrice) {
+        this.$message({
+          message: '请输入合同总价!',
+          type: 'warning',
+        })
+        return
+      }
       if (
-        !this.deptBudgetList.totalContractPrice &&
-        isNaN(this.deptBudgetList.totalContractPrice)
+        isNaN(this.deptBudgetList.totalContractPrice) ||
+        (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.totalContractPrice).length -
+            (String(this.deptBudgetList.totalContractPrice).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.totalContractPrice <= 0 ||
+        this.deptBudgetList.totalContractPrice > 1000000000
       ) {
         this.$message({
           message: '合同总价输入有误!',
@@ -1018,27 +1066,30 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.deliveryDateStart) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
-          message: '请选择交货日期(起)',
+          message: '请选择货源所在地区!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.deliveryDateEnd) {
+      if (!this.deptBudgetList.sourceGoods) {
         this.$message({
-          message: '请选择交货日期(止)',
+          message: '请输入货源详细地址!',
           type: 'warning',
         })
         return
       }
-      //时间
-      if (
-        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
-        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
-      ) {
+      if (this.selectedOptions1.length == 0) {
         this.$message({
-          message: '交货日期(止)选择错误',
+          message: '请选择交货所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货详细地址!',
           type: 'warning',
         })
         return
@@ -1050,6 +1101,22 @@ export default {
         })
         return
       }
+      if (
+        isNaN(this.deptBudgetList.finalTradingVolume) ||
+        (String(this.deptBudgetList.finalTradingVolume).indexOf('.') != -1 &&
+          String(this.deptBudgetList.finalTradingVolume).length -
+            (String(this.deptBudgetList.finalTradingVolume).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.finalTradingVolume < 0 ||
+        this.deptBudgetList.finalTradingVolume > 200000
+      ) {
+        this.$message({
+          message: '最终实际成交量有误!',
+          type: 'warning',
+        })
+        return
+      }
+      //货物信息
       if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
         this.$message({
           message: '请选择货名',
@@ -1064,6 +1131,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: '请选择品级',
@@ -1071,16 +1151,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: '杂质输入错误',
@@ -1088,17 +1171,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: '容重输入错误',
@@ -1106,6 +1191,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(
@@ -1116,7 +1208,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.mildewGrain>40||this.deptBudgetList.contractGoodsInfo.mildewGrain<1)
       ) {
         this.$message({
           message: '霉变粒输入错误',
@@ -1124,6 +1216,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('.') !=
@@ -1133,7 +1232,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.jiaorenli>40||this.deptBudgetList.contractGoodsInfo.jiaorenli<1)
       ) {
         this.$message({
           message: '热损伤输入错误',
@@ -1141,6 +1240,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(
@@ -1151,7 +1257,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.imperfectGrain
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.imperfectGrain>40||this.deptBudgetList.contractGoodsInfo.imperfectGrain<1)
       ) {
         this.$message({
           message: '不完整粒输入错误',
@@ -1160,8 +1266,8 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000 ||
-        this.deptBudgetList.contractProcessInfo.goodsNameKey < 0 ||
+        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) ||
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 100) ||
         (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
           '.'
         ) != -1 &&
@@ -1179,8 +1285,8 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.contractProcessInfo.waterContent > 10000000 ||
-        this.deptBudgetList.contractProcessInfo.waterContent < 0 ||
+        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) ||
+          (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
         (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
           '.'
         ) != -1 &&
@@ -1192,14 +1298,14 @@ export default {
             2)
       ) {
         this.$message({
-          message: '费用金额输入错误',
+          message: '费用支出输入错误',
           type: 'warning',
         })
         return
       }
       if (
-        this.deptBudgetList.contractProcessInfo.goodsName > 1000000000 ||
-        this.deptBudgetList.contractProcessInfo.goodsName < 0 ||
+        (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
         (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
           '.'
         ) != -1 &&
@@ -1217,8 +1323,8 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.contractProcessInfo.impurity > 1000000000 ||
-        this.deptBudgetList.contractProcessInfo.impurity < 0 ||
+        (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
         (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
           '.'
         ) != -1 &&
@@ -1236,27 +1342,24 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000 ||
-        this.deptBudgetList.contractProcessInfo.imperfectGrain < 0 ||
-        (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
           '.'
         ) != -1 &&
-          String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
-            .length -
+          String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
             (String(
-              this.deptBudgetList.contractProcessInfo.imperfectGrain
+              this.deptBudgetList.contractProcessInfo.mildewGrain
             ).indexOf('.') +
               1) >
             2)
       ) {
         this.$message({
-          message: '已完成发运量输入错误',
+          message: '未回款金额输入错误',
           type: 'warning',
         })
         return
       }
-
-      var that = this
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.sourceProvince =

+ 190 - 79
src/views/contractManagement/purchaseContractEdit.vue

@@ -853,12 +853,11 @@ export default {
     submit() {
       if (!this.deptBudgetList.contractNo) {
         this.$message({
-          message: '请输入合同编号',
+          message: '合同编号不能为空',
           type: 'warning',
         })
         return
       }
-      console.log(this.deptBudgetList.contractNo.length)
       if (
         this.deptBudgetList.contractNo.length < 6 ||
         this.deptBudgetList.contractNo.length > 20
@@ -871,7 +870,7 @@ export default {
       }
       if (!this.deptBudgetList.shippingType) {
         this.$message({
-          message: '请输入运输方式!',
+          message: '运输方式不能为空',
           type: 'warning',
         })
         return
@@ -888,7 +887,7 @@ export default {
       }
       if (!this.deptBudgetList.buyer) {
         this.$message({
-          message: '请输入买方名称!',
+          message: '买方名称不能为空',
           type: 'warning',
         })
         return
@@ -900,6 +899,23 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.settlementMethod) {
+        this.$message({
+          message: '结算方式不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.settlementMethod.length < 1 ||
+        this.deptBudgetList.settlementMethod.length > 20
+      ) {
+        this.$message({
+          message: '结算方式长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.seller) {
         this.$message({
           message: '请输入卖方名称!',
@@ -953,8 +969,8 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.buyerPhone.length < 7 ||
-        this.deptBudgetList.buyerPhone.length > 20
+        this.deptBudgetList.sellerPhone.length < 7 ||
+        this.deptBudgetList.sellerPhone.length > 20
       ) {
         this.$message({
           message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
@@ -962,78 +978,97 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.settlementMethod) {
+      if (!this.deptBudgetList.acceptanceMethod) {
         this.$message({
-          message: '请输入结算方式!',
+          message: '请选择验收方式',
           type: 'warning',
         })
         return
       }
-
-      if (!this.deptBudgetList.sourceGoods) {
+      if (!this.deptBudgetList.weight) {
         this.$message({
-          message: '请输入货源详细地址!',
+          message: '请输入重量!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.placeDelivery) {
+      if (
+        isNaN(this.deptBudgetList.weight) ||
+        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.weight < 0 ||
+        this.deptBudgetList.weight > 200000
+      ) {
         this.$message({
-          message: '请输入交货详细地址!',
+          message: '输入重量有误!',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions.length == 0) {
+      if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
-          message: '请选择货源所在地区!',
+          message: '请选择交货日期(起)',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions1.length == 0) {
+      if (!this.deptBudgetList.overShort){
         this.$message({
-          message: '请选择交货所在地区!',
+          message: '请输入溢短装!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.weight) {
+      if (
+        isNaN(this.deptBudgetList.overShort) ||
+        (String(this.deptBudgetList.overShort).indexOf('.') != -1 &&
+          String(this.deptBudgetList.overShort).length -
+            (String(this.deptBudgetList.overShort).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.overShort < 0 ||
+        this.deptBudgetList.overShort > 50
+      ) {
         this.$message({
-          message: '请输入重量!',
+          message: '溢短装输入有误!',
           type: 'warning',
         })
         return
       }
-
-      if (
-        isNaN(this.deptBudgetList.weight) ||
-        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
-          String(this.deptBudgetList.weight).length -
-            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
-            3) ||
-        this.deptBudgetList.weight < 0 ||
-        this.deptBudgetList.weight > 200000
-      ) {
+      if (!this.deptBudgetList.deliveryDateEnd) {
         this.$message({
-          message: '输入重量有误!',
+          message: '请选择交货日期(止)',
           type: 'warning',
         })
         return
       }
+       //时间
       if (
-        !this.deptBudgetList.overShort &&
-        isNaN(this.deptBudgetList.overShort)
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
       ) {
         this.$message({
-          message: '溢短装输入有误!',
+          message: '交货日期(止)选择错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.unitContractPrice) {
+        this.$message({
+          message: '请输入合同单价!',
           type: 'warning',
         })
         return
       }
       if (
-        !this.deptBudgetList.unitContractPrice &&
-        isNaN(this.deptBudgetList.unitContractPrice)
+        isNaN(this.deptBudgetList.unitContractPrice) ||
+        (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.unitContractPrice).length -
+            (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.unitContractPrice <= 0 ||
+        this.deptBudgetList.unitContractPrice > 10000
       ) {
         this.$message({
           message: '合同单价输入有误!',
@@ -1041,9 +1076,21 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.totalContractPrice) {
+        this.$message({
+          message: '请输入合同总价!',
+          type: 'warning',
+        })
+        return
+      }
       if (
-        !this.deptBudgetList.totalContractPrice &&
-        isNaN(this.deptBudgetList.totalContractPrice)
+        isNaN(this.deptBudgetList.totalContractPrice) ||
+        (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.totalContractPrice).length -
+            (String(this.deptBudgetList.totalContractPrice).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.totalContractPrice <= 0 ||
+        this.deptBudgetList.totalContractPrice > 1000000000
       ) {
         this.$message({
           message: '合同总价输入有误!',
@@ -1051,27 +1098,30 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.deliveryDateStart) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
-          message: '请选择交货日期(起)',
+          message: '请选择货源所在地区!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.deliveryDateEnd) {
+      if (!this.deptBudgetList.sourceGoods) {
         this.$message({
-          message: '请选择交货日期(止)',
+          message: '请输入货源详细地址!',
           type: 'warning',
         })
         return
       }
-      //时间
-      if (
-        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
-        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
-      ) {
+      if (this.selectedOptions1.length == 0) {
         this.$message({
-          message: '交货日期(止)选择错误',
+          message: '请选择交货所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货详细地址!',
           type: 'warning',
         })
         return
@@ -1083,6 +1133,22 @@ export default {
         })
         return
       }
+      if (
+        isNaN(this.deptBudgetList.finalTradingVolume) ||
+        (String(this.deptBudgetList.finalTradingVolume).indexOf('.') != -1 &&
+          String(this.deptBudgetList.finalTradingVolume).length -
+            (String(this.deptBudgetList.finalTradingVolume).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.finalTradingVolume < 0 ||
+        this.deptBudgetList.finalTradingVolume > 200000
+      ) {
+        this.$message({
+          message: '最终实际成交量有误!',
+          type: 'warning',
+        })
+        return
+      }
+      //货物信息
       if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
         this.$message({
           message: '请选择货名',
@@ -1097,6 +1163,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: '请选择品级',
@@ -1104,16 +1183,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: '杂质输入错误',
@@ -1121,17 +1203,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: '容重输入错误',
@@ -1139,6 +1223,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(
@@ -1149,7 +1240,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.mildewGrain>40||this.deptBudgetList.contractGoodsInfo.mildewGrain<1)
       ) {
         this.$message({
           message: '霉变粒输入错误',
@@ -1157,6 +1248,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('.') !=
@@ -1166,7 +1264,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.jiaorenli>40||this.deptBudgetList.contractGoodsInfo.jiaorenli<1)
       ) {
         this.$message({
           message: '热损伤输入错误',
@@ -1174,6 +1272,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(
@@ -1184,7 +1289,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.imperfectGrain
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.imperfectGrain>40||this.deptBudgetList.contractGoodsInfo.imperfectGrain<1)
       ) {
         this.$message({
           message: '不完整粒输入错误',
@@ -1193,8 +1298,8 @@ export default {
         return
       }
       if (
-        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
-          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) ||
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 100) ||
         (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
           '.'
         ) != -1 &&
@@ -1212,7 +1317,7 @@ export default {
         return
       }
       if (
-        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) ||
           (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
         (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
           '.'
@@ -1225,7 +1330,7 @@ export default {
             2)
       ) {
         this.$message({
-          message: '费用金额输入错误',
+          message: '费用支出输入错误',
           type: 'warning',
         })
         return
@@ -1269,25 +1374,30 @@ export default {
         return
       }
       if (
-        (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
-          (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
-        (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
           '.'
         ) != -1 &&
-          String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
-            .length -
+          String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
             (String(
-              this.deptBudgetList.contractProcessInfo.imperfectGrain
+              this.deptBudgetList.contractProcessInfo.mildewGrain
             ).indexOf('.') +
               1) >
             2)
       ) {
         this.$message({
-          message: '已完成发运量输入错误',
+          message: '未回款金额输入错误',
           type: 'warning',
         })
         return
       }
+      this.$confirm(`确定提交本次修改?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+      })
+      .then(() => {
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.sourceProvince = CodeToText[this.selectedOptions[0]]
@@ -1320,6 +1430,7 @@ export default {
           return false
         }
       })
+      })
     },
   },
 }

+ 2 - 2
src/views/contractManagement/purchaseContractExamine.vue

@@ -1,4 +1,4 @@
-<!--销售合同-->
+<!--采购合同查看-->
 <!--2019年5月30日 20:25:16 by jlx-->
 <template>
   <div class="container">
@@ -354,7 +354,7 @@ export default {
       this.dialogViewSpareMoney = false
     },
     returnsales() {
-      this.$router.push({ path: 'buyContract' })
+      this.$router.go(-1)
     },
   },
 }

+ 181 - 155
src/views/contractManagement/salesContractAdd.vue

@@ -211,6 +211,7 @@
           <!--重量(吨)-->
           <ws-form-item label="重量(吨)" span="1" prop="weight">
             <ws-input
+              @input="weightchange"
               v-model="deptBudgetList.weight"
               placeholder="请输入重量(吨)"
               maxlength="100"
@@ -504,20 +505,6 @@
               size="small"
             />
           </ws-form-item>
-
-          <!--已完成发货量(吨)-->
-          <!-- <ws-form-item
-            label="已完成发运量(吨)"
-            span="1"
-            prop="imperfectGrain"
-          >
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
-              placeholder="请输入已完成发运量(吨)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item> -->
           <!--双章原件回收情况-->
           <ws-form-item label="双章原件回收情况" span="1" prop="grade">
             <ws-select
@@ -555,37 +542,6 @@
           placeholder="请输入备注信息,不超过200字"
           maxlength="200"
         />
-        <!-- <el-upload
-          action="https://www.zthymaoyi.com/upload/admin"
-          :show-file-list="false"
-          :on-success="
-            (res, file) => {
-              uploadSuccessHandle(res)
-            }
-          "
-          class="avatar-uploader"
-          accept=".jpg, .jpeg, .png,.gif, .pdf, .doc, .zip, .rar"
-        >
-          <el-button style="margin-top: 10px">上传附件</el-button>
-        </el-upload>
-        <div class="addressUrls" v-if="addressUrls != null">
-          <div class="addressUrls-item">
-            <div
-              v-for="(item, index) in addressUrls"
-              class="addressUrl"
-              :key="index"
-            >
-              <div @click="close(index)" class="iconfont icon-guanbi"></div>
-              <img
-                v-if="addressUrls != null"
-                width="100"
-                height="100"
-                :src="item"
-                alt=""
-              />
-            </div>
-          </div>
-        </div> -->
         <el-upload
         class="upload-demo"
         action="https://www.zthymaoyi.com/upload/admin"
@@ -617,8 +573,6 @@
   </div>
 </template>
 <script>
-//  import { getVesselOne } from '@/model/procurement/basic'
-//  import { dayjs } from 'base-core-lib'
 import {
   packList,
   addList,
@@ -802,7 +756,7 @@ export default {
     submit() {
       if (!this.deptBudgetList.contractNo) {
         this.$message({
-          message: '请输入合同编号',
+          message: '合同编号不能为空',
           type: 'warning',
         })
         return
@@ -819,7 +773,7 @@ export default {
       }
       if (!this.deptBudgetList.shippingType) {
         this.$message({
-          message: '请输入运输方式!',
+          message: '运输方式不能为空',
           type: 'warning',
         })
         return
@@ -836,7 +790,7 @@ export default {
       }
       if (!this.deptBudgetList.buyer) {
         this.$message({
-          message: '请输入买方名称!',
+          message: '买方名称不能为空',
           type: 'warning',
         })
         return
@@ -848,6 +802,23 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.settlementMethod) {
+        this.$message({
+          message: '结算方式不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.settlementMethod.length < 1 ||
+        this.deptBudgetList.settlementMethod.length > 20
+      ) {
+        this.$message({
+          message: '结算方式长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.seller) {
         this.$message({
           message: '请输入卖方名称!',
@@ -901,8 +872,8 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.buyerPhone.length < 7 ||
-        this.deptBudgetList.buyerPhone.length > 20
+        this.deptBudgetList.sellerPhone.length < 7 ||
+        this.deptBudgetList.sellerPhone.length > 20
       ) {
         this.$message({
           message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
@@ -910,78 +881,97 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.settlementMethod) {
+      if (!this.deptBudgetList.acceptanceMethod) {
         this.$message({
-          message: '请输入结算方式!',
+          message: '请选择验收方式',
           type: 'warning',
         })
         return
       }
-
-      if (!this.deptBudgetList.sourceGoods) {
+      if (!this.deptBudgetList.weight) {
         this.$message({
-          message: '请输入货源详细地址!',
+          message: '请输入重量!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.placeDelivery) {
+      if (
+        isNaN(this.deptBudgetList.weight) ||
+        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.weight < 0 ||
+        this.deptBudgetList.weight > 200000
+      ) {
         this.$message({
-          message: '请输入交货详细地址!',
+          message: '输入重量有误!',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions.length == 0) {
+      if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
-          message: '请选择货源所在地区!',
+          message: '请选择交货日期(起)',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions1.length == 0) {
+      if (!this.deptBudgetList.overShort){
         this.$message({
-          message: '请选择交货所在地区!',
+          message: '请输入溢短装!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.weight) {
+      if (
+        isNaN(this.deptBudgetList.overShort) ||
+        (String(this.deptBudgetList.overShort).indexOf('.') != -1 &&
+          String(this.deptBudgetList.overShort).length -
+            (String(this.deptBudgetList.overShort).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.overShort < 0 ||
+        this.deptBudgetList.overShort > 50
+      ) {
         this.$message({
-          message: '请输入重量!',
+          message: '溢短装输入有误!',
           type: 'warning',
         })
         return
       }
-
-      if (
-        isNaN(this.deptBudgetList.weight) ||
-        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
-          String(this.deptBudgetList.weight).length -
-            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
-            3) ||
-        this.deptBudgetList.weight < 0 ||
-        this.deptBudgetList.weight > 200000
-      ) {
+      if (!this.deptBudgetList.deliveryDateEnd) {
         this.$message({
-          message: '输入重量有误!',
+          message: '请选择交货日期(止)',
           type: 'warning',
         })
         return
       }
+       //时间
       if (
-        !this.deptBudgetList.overShort &&
-        isNaN(this.deptBudgetList.overShort)
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
       ) {
         this.$message({
-          message: '溢短装输入有误!',
+          message: '交货日期(止)选择错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.unitContractPrice) {
+        this.$message({
+          message: '请输入合同单价!',
           type: 'warning',
         })
         return
       }
       if (
-        !this.deptBudgetList.unitContractPrice &&
-        isNaN(this.deptBudgetList.unitContractPrice)
+        isNaN(this.deptBudgetList.unitContractPrice) ||
+        (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.unitContractPrice).length -
+            (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.unitContractPrice <= 0 ||
+        this.deptBudgetList.unitContractPrice > 10000
       ) {
         this.$message({
           message: '合同单价输入有误!',
@@ -989,9 +979,21 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.totalContractPrice) {
+        this.$message({
+          message: '请输入合同总价!',
+          type: 'warning',
+        })
+        return
+      }
       if (
-        !this.deptBudgetList.totalContractPrice &&
-        isNaN(this.deptBudgetList.totalContractPrice)
+        isNaN(this.deptBudgetList.totalContractPrice) ||
+        (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.totalContractPrice).length -
+            (String(this.deptBudgetList.totalContractPrice).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.totalContractPrice <= 0 ||
+        this.deptBudgetList.totalContractPrice > 1000000000
       ) {
         this.$message({
           message: '合同总价输入有误!',
@@ -999,27 +1001,30 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.deliveryDateStart) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
-          message: '请选择交货日期(起)',
+          message: '请选择货源所在地区!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.deliveryDateEnd) {
+      if (!this.deptBudgetList.sourceGoods) {
         this.$message({
-          message: '请选择交货日期(止)',
+          message: '请输入货源详细地址!',
           type: 'warning',
         })
         return
       }
-      //时间
-      if (
-        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
-        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
-      ) {
+      if (this.selectedOptions1.length == 0) {
         this.$message({
-          message: '交货日期(止)选择错误',
+          message: '请选择交货所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货详细地址!',
           type: 'warning',
         })
         return
@@ -1031,6 +1036,22 @@ export default {
         })
         return
       }
+      if (
+        isNaN(this.deptBudgetList.finalTradingVolume) ||
+        (String(this.deptBudgetList.finalTradingVolume).indexOf('.') != -1 &&
+          String(this.deptBudgetList.finalTradingVolume).length -
+            (String(this.deptBudgetList.finalTradingVolume).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.finalTradingVolume < 0 ||
+        this.deptBudgetList.finalTradingVolume > 200000
+      ) {
+        this.$message({
+          message: '最终实际成交量有误!',
+          type: 'warning',
+        })
+        return
+      }
+      //货物信息
       if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
         this.$message({
           message: '请选择货名',
@@ -1045,6 +1066,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: '请选择品级',
@@ -1052,16 +1086,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: '杂质输入错误',
@@ -1069,17 +1106,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: '容重输入错误',
@@ -1087,6 +1126,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(
@@ -1097,7 +1143,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.mildewGrain>40||this.deptBudgetList.contractGoodsInfo.mildewGrain<1)
       ) {
         this.$message({
           message: '霉变粒输入错误',
@@ -1105,6 +1151,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('.') !=
@@ -1114,7 +1167,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.jiaorenli>40||this.deptBudgetList.contractGoodsInfo.jiaorenli<1)
       ) {
         this.$message({
           message: '热损伤输入错误',
@@ -1122,6 +1175,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(
@@ -1132,7 +1192,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.imperfectGrain
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.imperfectGrain>40||this.deptBudgetList.contractGoodsInfo.imperfectGrain<1)
       ) {
         this.$message({
           message: '不完整粒输入错误',
@@ -1141,8 +1201,8 @@ export default {
         return
       }
       if (
-        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
-          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) ||
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 100) ||
         (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
           '.'
         ) != -1 &&
@@ -1160,7 +1220,7 @@ export default {
         return
       }
       if (
-        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) ||
           (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
         (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
           '.'
@@ -1173,7 +1233,7 @@ export default {
             2)
       ) {
         this.$message({
-          message: '费用金额输入错误',
+          message: '费用支出输入错误',
           type: 'warning',
         })
         return
@@ -1216,26 +1276,6 @@ export default {
         })
         return
       }
-      // if (
-      //   (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
-      //     (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
-      //   (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
-      //     '.'
-      //   ) != -1 &&
-      //     String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
-      //       .length -
-      //       (String(
-      //         this.deptBudgetList.contractProcessInfo.imperfectGrain
-      //       ).indexOf('.') +
-      //         1) >
-      //       2)
-      // ) {
-      //   this.$message({
-      //     message: '已完成发运量输入错误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
       if (
         (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
           (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
@@ -1352,26 +1392,9 @@ export default {
           })
       }
     },
-    // selectContract(val) {
-    //   let key = this.unitList.find((item) => item.constValue === val).constKey
-    //   this.pleaseChoose = val
-    // },
-
     handleExamine() {},
     approve() {},
-    // returnsales() {
-    //   this.$router.push({ path: 'purchaseContract' })
-    // },
     addClick() {
-      // let [flag, constValue, constKey] = ['check', '', '']
-      // let obj = { flag, constValue, constKey }
-      // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
-      // let result = this.unitList.filter((item, val, arr) => {
-      //   return item.id != '1'
-      // })
-      // result.push(obj)
-      // result.push(objAdd)
-      // this.unitList = result
       this.unitList.push({
         flag: 'add',
         constValue: '',
@@ -1414,6 +1437,9 @@ export default {
         }
       }
     },
+    weightchange(e) {
+      this.deptBudgetList.finalTradingVolume = e
+    },
     // 编辑
     editClick(item, index) {
       const map = JSON.parse(JSON.stringify(item))

+ 186 - 113
src/views/contractManagement/salesContractEdit.vue

@@ -472,16 +472,6 @@
               size="small"
             />
           </ws-form-item>
-
-          <!--已完成发货量(吨)-->
-          <!-- <ws-form-item label="已完成发货量(吨)" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
-              placeholder="请输入已完成发货量(吨)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item> -->
           <!--双章原件回收情况-->
           <ws-form-item label="双章原件回收情况" span="1" prop="grade">
             <ws-select
@@ -698,9 +688,9 @@ export default {
           this.selectedOptions1 = tmp1
           this.deptBudgetList = response
           if (this.deptBudgetList.deliverType == 1) {
-            this.deptBudgetList.deliverType1 = '我方自提'
+            this.deptBudgetList.deliverType1 = '我方送货'
           } else if (this.deptBudgetList.deliverType == 2) {
-            this.deptBudgetList.deliverType1 = '对方送货'
+            this.deptBudgetList.deliverType1 = '对方自提'
           }
           if(this.deptBudgetList.addressUrl != null){
             this.addressUrls = this.deptBudgetList.addressUrl.split(",")
@@ -825,15 +815,6 @@ export default {
       }
     },
     addClick() {
-      // let [flag, constValue, constKey] = ['check', '', '']
-      // let obj = { flag, constValue, constKey }
-      // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
-      // let result = this.unitList.filter((item, val, arr) => {
-      //   return item.id != '1'
-      // })
-      // result.push(obj)
-      // result.push(objAdd)
-      // this.unitList = result
       this.unitList.push({
         flag: 'add',
         constValue: '',
@@ -843,12 +824,11 @@ export default {
     submit() {
       if (!this.deptBudgetList.contractNo) {
         this.$message({
-          message: '请输入合同编号',
+          message: '合同编号不能为空',
           type: 'warning',
         })
         return
       }
-      console.log(this.deptBudgetList.contractNo.length)
       if (
         this.deptBudgetList.contractNo.length < 6 ||
         this.deptBudgetList.contractNo.length > 20
@@ -861,7 +841,7 @@ export default {
       }
       if (!this.deptBudgetList.shippingType) {
         this.$message({
-          message: '请输入运输方式!',
+          message: '运输方式不能为空',
           type: 'warning',
         })
         return
@@ -878,7 +858,7 @@ export default {
       }
       if (!this.deptBudgetList.buyer) {
         this.$message({
-          message: '请输入买方名称!',
+          message: '买方名称不能为空',
           type: 'warning',
         })
         return
@@ -890,6 +870,23 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.settlementMethod) {
+        this.$message({
+          message: '结算方式不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.settlementMethod.length < 1 ||
+        this.deptBudgetList.settlementMethod.length > 20
+      ) {
+        this.$message({
+          message: '结算方式长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.deptBudgetList.seller) {
         this.$message({
           message: '请输入卖方名称!',
@@ -943,8 +940,8 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.buyerPhone.length < 7 ||
-        this.deptBudgetList.buyerPhone.length > 20
+        this.deptBudgetList.sellerPhone.length < 7 ||
+        this.deptBudgetList.sellerPhone.length > 20
       ) {
         this.$message({
           message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
@@ -952,78 +949,97 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.settlementMethod) {
+      if (!this.deptBudgetList.acceptanceMethod) {
         this.$message({
-          message: '请输入结算方式!',
+          message: '请选择验收方式',
           type: 'warning',
         })
         return
       }
-
-      if (!this.deptBudgetList.sourceGoods) {
+      if (!this.deptBudgetList.weight) {
         this.$message({
-          message: '请输入货源详细地址!',
+          message: '请输入重量!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.placeDelivery) {
+      if (
+        isNaN(this.deptBudgetList.weight) ||
+        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.weight < 0 ||
+        this.deptBudgetList.weight > 200000
+      ) {
         this.$message({
-          message: '请输入交货详细地址!',
+          message: '输入重量有误!',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions.length == 0) {
+      if (!this.deptBudgetList.deliveryDateStart) {
         this.$message({
-          message: '请选择货源所在地区!',
+          message: '请选择交货日期(起)',
           type: 'warning',
         })
         return
       }
-      if (this.selectedOptions1.length == 0) {
+      if (!this.deptBudgetList.overShort){
         this.$message({
-          message: '请选择交货所在地区!',
+          message: '请输入溢短装!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.weight) {
+      if (
+        isNaN(this.deptBudgetList.overShort) ||
+        (String(this.deptBudgetList.overShort).indexOf('.') != -1 &&
+          String(this.deptBudgetList.overShort).length -
+            (String(this.deptBudgetList.overShort).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.overShort < 0 ||
+        this.deptBudgetList.overShort > 50
+      ) {
         this.$message({
-          message: '请输入重量!',
+          message: '溢短装输入有误!',
           type: 'warning',
         })
         return
       }
-
-      if (
-        isNaN(this.deptBudgetList.weight) ||
-        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
-          String(this.deptBudgetList.weight).length -
-            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
-            3) ||
-        this.deptBudgetList.weight < 0 ||
-        this.deptBudgetList.weight > 200000
-      ) {
+      if (!this.deptBudgetList.deliveryDateEnd) {
         this.$message({
-          message: '输入重量有误!',
+          message: '请选择交货日期(止)',
           type: 'warning',
         })
         return
       }
+       //时间
       if (
-        !this.deptBudgetList.overShort &&
-        isNaN(this.deptBudgetList.overShort)
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
       ) {
         this.$message({
-          message: '溢短装输入有误!',
+          message: '交货日期(止)选择错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.unitContractPrice) {
+        this.$message({
+          message: '请输入合同单价!',
           type: 'warning',
         })
         return
       }
       if (
-        !this.deptBudgetList.unitContractPrice &&
-        isNaN(this.deptBudgetList.unitContractPrice)
+        isNaN(this.deptBudgetList.unitContractPrice) ||
+        (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.unitContractPrice).length -
+            (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.unitContractPrice <= 0 ||
+        this.deptBudgetList.unitContractPrice > 10000
       ) {
         this.$message({
           message: '合同单价输入有误!',
@@ -1031,9 +1047,21 @@ export default {
         })
         return
       }
+      if (!this.deptBudgetList.totalContractPrice) {
+        this.$message({
+          message: '请输入合同总价!',
+          type: 'warning',
+        })
+        return
+      }
       if (
-        !this.deptBudgetList.totalContractPrice &&
-        isNaN(this.deptBudgetList.totalContractPrice)
+        isNaN(this.deptBudgetList.totalContractPrice) ||
+        (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
+          String(this.deptBudgetList.totalContractPrice).length -
+            (String(this.deptBudgetList.totalContractPrice).indexOf('.') + 1) >
+            2) ||
+        this.deptBudgetList.totalContractPrice <= 0 ||
+        this.deptBudgetList.totalContractPrice > 1000000000
       ) {
         this.$message({
           message: '合同总价输入有误!',
@@ -1041,27 +1069,30 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.deliveryDateStart) {
+      if (this.selectedOptions.length == 0) {
         this.$message({
-          message: '请选择交货日期(起)',
+          message: '请选择货源所在地区!',
           type: 'warning',
         })
         return
       }
-      if (!this.deptBudgetList.deliveryDateEnd) {
+      if (!this.deptBudgetList.sourceGoods) {
         this.$message({
-          message: '请选择交货日期(止)',
+          message: '请输入货源详细地址!',
           type: 'warning',
         })
         return
       }
-      //时间
-      if (
-        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
-        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
-      ) {
+      if (this.selectedOptions1.length == 0) {
         this.$message({
-          message: '交货日期(止)选择错误',
+          message: '请选择交货所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货详细地址!',
           type: 'warning',
         })
         return
@@ -1073,6 +1104,22 @@ export default {
         })
         return
       }
+      if (
+        isNaN(this.deptBudgetList.finalTradingVolume) ||
+        (String(this.deptBudgetList.finalTradingVolume).indexOf('.') != -1 &&
+          String(this.deptBudgetList.finalTradingVolume).length -
+            (String(this.deptBudgetList.finalTradingVolume).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.finalTradingVolume < 0 ||
+        this.deptBudgetList.finalTradingVolume > 200000
+      ) {
+        this.$message({
+          message: '最终实际成交量有误!',
+          type: 'warning',
+        })
+        return
+      }
+      //货物信息
       if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
         this.$message({
           message: '请选择货名',
@@ -1087,6 +1134,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: '请选择品级',
@@ -1094,16 +1154,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: '杂质输入错误',
@@ -1111,17 +1174,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: '容重输入错误',
@@ -1129,6 +1194,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(
@@ -1139,7 +1211,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.mildewGrain>40||this.deptBudgetList.contractGoodsInfo.mildewGrain<1)
       ) {
         this.$message({
           message: '霉变粒输入错误',
@@ -1147,6 +1219,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('.') !=
@@ -1156,7 +1235,7 @@ export default {
               '.'
             ) +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.jiaorenli>40||this.deptBudgetList.contractGoodsInfo.jiaorenli<1)
       ) {
         this.$message({
           message: '热损伤输入错误',
@@ -1164,6 +1243,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(
@@ -1174,7 +1260,7 @@ export default {
               this.deptBudgetList.contractGoodsInfo.imperfectGrain
             ).indexOf('.') +
               1) >
-            2)
+            2||this.deptBudgetList.contractGoodsInfo.imperfectGrain>40||this.deptBudgetList.contractGoodsInfo.imperfectGrain<1)
       ) {
         this.$message({
           message: '不完整粒输入错误',
@@ -1183,8 +1269,8 @@ export default {
         return
       }
       if (
-        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
-          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) ||
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 100) ||
         (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
           '.'
         ) != -1 &&
@@ -1202,7 +1288,7 @@ export default {
         return
       }
       if (
-        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) ||
           (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
         (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
           '.'
@@ -1215,7 +1301,7 @@ export default {
             2)
       ) {
         this.$message({
-          message: '费用金额输入错误',
+          message: '费用支出输入错误',
           type: 'warning',
         })
         return
@@ -1258,26 +1344,6 @@ export default {
         })
         return
       }
-      // if (
-      //   (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
-      //     (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
-      //   (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
-      //     '.'
-      //   ) != -1 &&
-      //     String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
-      //       .length -
-      //       (String(
-      //         this.deptBudgetList.contractProcessInfo.imperfectGrain
-      //       ).indexOf('.') +
-      //         1) >
-      //       2)
-      // ) {
-      //   this.$message({
-      //     message: '已完成发运量输入错误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
       if (
         (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
           (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
@@ -1297,6 +1363,12 @@ export default {
         })
         return
       }
+      this.$confirm(`确定提交本次修改?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+      })
+      .then(() => {
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.sourceProvince =
@@ -1341,6 +1413,7 @@ export default {
           return false
         }
       })
+      })
     },
     editInfo() {
       editInfo({})

+ 1 - 1
src/views/contractManagement/salesContractExamine.vue

@@ -460,7 +460,7 @@ export default {
     },
 
     returnsales() {
-      this.$router.push({ path: 'salesContract' })
+      this.$router.go(-1)
     },
   },
 }

+ 2 - 2
src/views/platformaudit/saletransactioninformationreview.vue

@@ -299,7 +299,7 @@ export default {
     adopt(row) {
       this.salePlanInfo.id = row.id
       this.salePlanInfo.flag = 1
-      this.$confirm(`确定通过该认证信息?`, '提示', {
+      this.$confirm(`确定通过该交易信息?`, '提示', {
         confirmButtonText: '通过',
         cancelButtonText: '取消',
         type: 'warning',
@@ -328,7 +328,7 @@ export default {
     reject(row) {
        this.salePlanInfo.id = row.id
        this.salePlanInfo.flag = 2
-      this.$confirm(`确定驳回该认证信息?`, '提示', {
+      this.$confirm(`确定驳回该交易信息?`, '提示', {
         confirmButtonText: '驳回',
         cancelButtonText: '取消',
         type: 'warning',

+ 2 - 2
src/views/platformaudit/transactioninformationreview.vue

@@ -299,7 +299,7 @@ export default {
     adopt(row) {
       this.procurementPlanInfo.id = row.id
       this.procurementPlanInfo.flag = 1
-      this.$confirm(`确定通过该认证信息?`, '提示', {
+      this.$confirm(`确定通过该交易信息?`, '提示', {
         confirmButtonText: '通过',
         cancelButtonText: '取消',
         type: 'warning',
@@ -328,7 +328,7 @@ export default {
     reject(row) {
        this.procurementPlanInfo.id = row.id
        this.procurementPlanInfo.flag = 2
-      this.$confirm(`确定驳回该认证信息?`, '提示', {
+      this.$confirm(`确定驳回该交易信息?`, '提示', {
         confirmButtonText: '驳回',
         cancelButtonText: '取消',
         type: 'warning',

+ 4 - 4
src/views/purchasingManagement/procurementPlanAdd.vue

@@ -258,7 +258,7 @@
               unlink-panels
               value-format='yyyy'
               range-separator="至"
-              placeholder="开始日期"
+              placeholder="产出年份"
             ></el-date-picker>
           </el-form-item>
         </el-form>
@@ -680,7 +680,7 @@ export default {
         this.dataList.basisPrice&&String(this.dataList.basisPrice).indexOf('.') != -1 &&
           String(dataList.basisPrice).length -
             (String(this.dataList.basisPrice).indexOf('.') + 1) >
-            2||this.dataList.basisPrice>10000||this.dataList.basisPrice<1){
+            2||this.dataList.basisPrice>10000||this.dataList.basisPrice<-10000){
         this.$message({
           message: '基差输入错误',
           type: 'warning'
@@ -833,7 +833,7 @@ export default {
             (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
             2||this.dataList.imperfectGrain>40||this.dataList.imperfectGrain<1) {
         this.$message({
-          message: '不完粒输入错误',
+          message: '不完粒输入错误',
           type: 'warning'
         })
         return
@@ -857,7 +857,7 @@ export default {
               this.dataList.outputPrivate =
                 CodeToText[this.selectedOptions1[0]]
               this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
-
+              this.dataList.basisPrice='-'+Math.abs(this.dataList.basisPrice)
               this.dataList.compId = this.compId
               this.dataList.unitPrice=this.dataList.procurementPrice
               

+ 14 - 3
src/views/purchasingManagement/procurementPlanEdit.vue

@@ -322,7 +322,7 @@
               align="right"
               unlink-panels
               range-separator="至"
-              placeholder="开始日期"
+              placeholder="产出年份"
             ></el-date-picker>
           </el-form-item>
         </el-form>
@@ -736,6 +736,17 @@ export default {
           type: 'warning',
         })
         return
+      }
+        if (
+        this.dataList.basisPrice&&String(this.dataList.basisPrice).indexOf('.') != -1 &&
+          String(dataList.basisPrice).length -
+            (String(this.dataList.basisPrice).indexOf('.') + 1) >
+            2||this.dataList.basisPrice>10000||this.dataList.basisPrice<-10000){
+        this.$message({
+          message: '基差输入错误',
+          type: 'warning'
+        })
+        return
       }
       if (!this.dataList.buyer) {
         this.$message({
@@ -857,7 +868,7 @@ export default {
             (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
             2||this.dataList.imperfectGrain>40||this.dataList.imperfectGrain<1) {
         this.$message({
-          message: '不完粒输入错误',
+          message: '不完粒输入错误',
           type: 'warning'
         })
         return
@@ -876,7 +887,7 @@ export default {
               this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
               this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
               this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
-
+              this.dataList.basisPrice='-'+Math.abs(this.dataList.basisPrice)
               this.dataList.compId = this.compId
               // this.dataList.pcFlag = 1
               this.dataList.compId = sessionStorage.getItem('ws-pf_compId')

+ 3 - 3
src/views/purchasingManagement/procurementPlanList.vue

@@ -44,7 +44,8 @@
         class="table_td"
         prop="procurementPlanNo"
         label="采购计划编号"
-      ></el-table-column>
+      >
+      </el-table-column>
       <el-table-column
         class="table_td"
         prop="title"
@@ -254,7 +255,6 @@ export default {
       year: '',
       pickerOptions: {},
       value2: '',
-      handleSizeChange: '',
       deptBudgetTotal: 0,
       currentPage: 1,
       // tranTypeKey: 1,
@@ -561,7 +561,7 @@ export default {
           .then(() => {
             procurementEditOther({
               flag: 1,
-              basisPrice: row.basisPrice,
+              basisPrice: '-'+Math.abs(row.basisPrice),
               id: row.id,
             })
               .toPromise()

+ 9 - 4
src/views/purchasingManagement/procurementPlanLook.vue

@@ -141,7 +141,15 @@
           </el-form-item>
           <!--产出年份-->
           <el-form-item label="产出年份" span="1">
-            <el-input v-model="dataList.outputYear" size="small" disabled />
+             <el-date-picker
+              disabled
+              v-model="dataList.outputYear"
+              type="year"
+              align="right"
+              unlink-panels
+              range-separator="至"
+              placeholder="产出年份"
+            ></el-date-picker>
           </el-form-item>
         </el-form>
       </div>
@@ -266,9 +274,6 @@ export default {
   },
   methods: {
     //返回按钮
-    revert() {
-      this.$router.go(-1)
-    },
     returnsales() {
       this.$router.go(-1)
     },

+ 76 - 19
src/views/purchasingManagement/purchaseOrderList.vue

@@ -60,13 +60,21 @@
         prop="contractNo"
         label="合同编号"
         width="100"
-      ></el-table-column>
+      >
+        <template slot-scope="scope">
+       <div class="record"
+              @click="lookContract(scope.row)">{{ scope.row.contractNo}}</div>
+      </template></el-table-column>
       <el-table-column
         class="table_td"
         prop="procurementPlan"
         label="采购计划"
         width="125"
-      ></el-table-column>
+      >
+      <template slot-scope="scope">
+       <div class="record"
+              @click="lookPlan(scope.row)">{{ scope.row.procurementPlan}}</div>
+      </template></el-table-column>
       <el-table-column class="table_td" prop="customer" label="客户">
         <template slot-scope="scope">
           <div class="record" @click="customer(scope.row)">
@@ -266,23 +274,33 @@
         prop="updateDate"
         width="130"
       >
-        <template slot-scope="scope"
-          ><span v-if="scope.row.procurementPlanType != '现货'"
-            >--</span
-          ></template
-        ></el-table-column
-      >
+        <template slot-scope="scope" >
+                 <div
+              class="record"
+              @click="nocomplete1(scope.row)"
+              v-if="scope.row.procurementPlanType != '现货'&&scope.row.receiptUnpaid != null&&scope.row.receiptUnpaid >0">去结算</div>
+                <div
+              class="record"
+              @click="nocomplete1(scope.row)"
+              v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.receiptUnpaid != null&&scope.row.receiptUnpaid==0">已结算</div>
+          </template>
+          </el-table-column >
       <el-table-column
         class="table_td"
         label="平仓结算"
         prop="updateDate"
-        width="130"
-        ><template slot-scope="scope"
-          ><span v-if="scope.row.procurementPlanType != '现货'"
-            >--</span
-          ></template
-        ></el-table-column
-      >
+        width="130">
+        <template slot-scope="scope">
+             <div
+              class="record"
+              @click="nocomplete(scope.row)"
+              v-if="scope.row.procurementPlanType != '现货'&&scope.row.closedUnpaid != null&&scope.row.closedUnpaid >0">去结算</div>
+            <div
+              class="record"
+              @click="nocomplete(scope.row)"
+              v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.closedUnpaid != null&&scope.row.closedUnpaid ==0">已结算</div>
+          </template>
+          </el-table-column >
       <el-table-column prop="seller" label="操作" width="310">
         <template slot-scope="scope">
           <!-- <div v-if="scope.row.procurementPlanType != '现货'"> -->
@@ -1020,6 +1038,26 @@ export default {
     whether(row) {
       row.identification = 'true'
     },
+    nocomplete1(row) {
+      this.$router.push({
+        name: 'purchaseReceiptStatisticsList',
+        query: {
+       compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize
+        },
+      })
+    },
+    nocomplete(row) {
+      this.$router.push({
+        name: 'purchaseClosingCashierList',
+        query: {
+       compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize
+        },
+      })
+    },
     handle(item) {
       this.$confirm(`状态修改为已完成后不可再进行交易操作,是否确定修改?`, {
         confirmButtonText: '确定',
@@ -1607,15 +1645,34 @@ export default {
         }
       })
     },
-    //查看
-    handleLook(row) {
+    //查看计划
+    lookPlan(row) {
       this.$router.push({
-        path: 'warehouseManagementPutOutLook',
+        path: 'procurementPlanLook',
         query: {
-          relevanceId: row.relevanceId,
+          id: row.planId,
         },
       })
     },
+    //查看合同
+    lookContract(row) {
+      if(row.goodsType==1){
+       this.$router.push({
+        name: 'purchaseContractExamine',
+        query: {
+          id: row.contractId,
+        },
+      })
+      }
+      else{
+      this.$router.push({
+        name: 'futuresPurchaseContractExamine',
+        query: {
+          id: row.contractId,
+        },
+      })
+      }
+    },
     //返回
     revert() {
       this.$router.push({ path: 'warehouseManagementList' })

+ 9 - 2
src/views/salesManagement/salesPlanAdd.vue

@@ -321,7 +321,7 @@
               align="right"
               unlink-panels
               range-separator="至"
-              placeholder="开始日期"
+              placeholder="产出年份"
             ></el-date-picker>
           </el-form-item>
         </el-form>
@@ -805,6 +805,13 @@ export default {
         })
         return
       }
+      if (this.selectedOptions.length == 0) {
+        this.$message({
+          message: '请选择出货库所在地区!',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.dataList.seller) {
         this.$message({
           message: '卖方不能为空!',
@@ -941,7 +948,7 @@ export default {
           2||this.dataList.imperfectGrain>40||this.dataList.imperfectGrain<1
       ) {
         this.$message({
-          message: '不完粒输入错误',
+          message: '不完粒输入错误',
           type: 'warning',
         })
         return

+ 2 - 2
src/views/salesManagement/salesPlanEdit.vue

@@ -271,7 +271,7 @@
               align="right"
               unlink-panels
               range-separator="至"
-              placeholder="开始日期"
+              placeholder="产出年份"
             ></el-date-picker>
           </el-form-item>
         </el-form>
@@ -850,7 +850,7 @@ export default {
           2||this.dataList.imperfectGrain>40||this.dataList.imperfectGrain<1
       ) {
         this.$message({
-          message: '不完粒输入错误',
+          message: '不完粒输入错误',
           type: 'warning',
         })
         return

+ 1 - 2
src/views/salesManagement/salesPlanList.vue

@@ -66,7 +66,7 @@
                 v-if="scope.row.identification == 'true'"
               ></el-input>
               <div v-if="scope.row.identification == 'false'" class="inputs">
-                {{ scope.row.basisPrice }}
+                {{ '+'+scope.row.basisPrice }}
               </div>
             </div>
             <img
@@ -251,7 +251,6 @@ export default {
       year: '',
       pickerOptions: {},
       value2: '',
-      handleSizeChange: '',
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,

+ 15 - 6
src/views/salesManagement/salesPlanLook.vue

@@ -140,8 +140,16 @@
             </div>
           </el-form-item>
           <!--产出年份-->
-          <el-form-item label="产出年份" span="1">
-            <el-input v-model="dataList.outputYear" size="small" disabled />
+           <el-form-item label="产出年份" span="1" prop="outputYear">
+           <el-date-picker
+              disabled
+              v-model="dataList.outputYear"
+              type="year"
+              align="right"
+              unlink-panels
+              range-separator="至"
+              placeholder="产出年份"
+            ></el-date-picker>
           </el-form-item>
         </el-form>
       </div>
@@ -259,14 +267,15 @@ export default {
       accessoryTFs: false
     }
   },
-  mounted() {
+  activated() {
     this.getList()
+    this.showType = this.isShow
+  },
+  mounted() {
+    this.dataList.id = this.$route.query.id
   },
   methods: {
     //返回按钮
-    revert() {
-      this.$router.go(-1)
-    },
     returnsales() {
       this.$router.go(-1)
     },

+ 84 - 6
src/views/salesManagement/salesPlanOrderList.vue

@@ -55,20 +55,26 @@
       height="700"
     >
       <el-table-column type="index" label="序号" width="50"></el-table-column>
-      <el-table-column
+       <el-table-column
         class="table_td"
         prop="contractNo"
         label="合同编号"
         width="100"
       >
-      </el-table-column>
+        <template slot-scope="scope">
+       <div class="record"
+              @click="lookContract(scope.row)">{{ scope.row.contractNo}}</div>
+      </template></el-table-column>
       <el-table-column
         class="table_td"
         prop="salePlan"
         label="销售计划"
         width="130"
       >
-      </el-table-column>
+      <template slot-scope="scope">
+       <div class="record"
+              @click="lookPlan(scope.row)">{{ scope.row.salePlan}}</div>
+      </template></el-table-column>
       <el-table-column class="table_td" prop="customer" label="客户">
         <template slot-scope="scope">
           <div class="record" @click="customer(scope.row)">
@@ -271,7 +277,11 @@
               </span>
             </template>
             <div>
-              <span v-if="scope.row.packingType != '散装'" style="margin-left: 6px">{{ scope.row.baggingNotes }}</span>
+              <span
+                v-if="scope.row.packingType != '散装'"
+                style="margin-left: 6px"
+                >{{ scope.row.baggingNotes }}</span
+              >
             </div>
           </el-popover>
         </template>
@@ -313,13 +323,33 @@
         label="出库结算"
         prop=""
         width="130"
-      ></el-table-column>
+      >
+        <template slot-scope="scope" >
+                 <div
+              class="record"
+              @click="nocomplete1(scope.row)"
+              v-if="scope.row.procurementPlanType != '现货'&&scope.row.deliveryUnpaid != null&&scope.row.deliveryUnpaid >0">去结算</div>
+                <div
+              class="record"
+              @click="nocomplete1(scope.row)"
+              v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.deliveryUnpaid != null&&scope.row.deliveryUnpaid==0">已结算</div>
+          </template></el-table-column>
       <el-table-column
         class="table_td"
         label="平仓结算"
         prop=""
         width="130"
-      ></el-table-column>
+      >
+      <template slot-scope="scope">
+             <div
+              class="record"
+              @click="nocomplete(scope.row)"
+              v-if="scope.row.procurementPlanType != '现货'&&scope.row.closedUnpaid != null&&scope.row.closedUnpaid >0">去结算</div>
+            <div
+              class="record"
+              @click="nocomplete(scope.row)"
+              v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.closedUnpaid != null&&scope.row.closedUnpaid ==0">已结算</div>
+          </template></el-table-column>
       <el-table-column prop="seller" label="操作" width="360">
         <template slot-scope="scope">
           <!---成交-->
@@ -1033,6 +1063,54 @@ export default {
         }
       }
     },
+    nocomplete1(row) {
+      this.$router.push({
+        name: 'salesDeliveryReportList',
+        query: {
+       compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize
+        },
+      })
+    },
+    nocomplete(row) {
+      this.$router.push({
+        name: 'salesClosingCashierList',
+        query: {
+       compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize
+        },
+      })
+    },
+    //查看计划
+    lookPlan(row) {
+      this.$router.push({
+        path: 'salesPlanLook',
+        query: {
+          id: row.planId,
+        },
+      })
+    },
+    //查看合同
+    lookContract(row) {
+      if(row.goodsType==1){
+       this.$router.push({
+        name: 'salesContractExamine',
+        query: {
+          id: row.contractId,
+        },
+      })
+      }
+      else{
+      this.$router.push({
+        name: 'futuresSalesContractExamine',
+        query: {
+          id: row.contractId,
+        },
+      })
+      }
+    },
     //完成
     handle(item) {
       this.$confirm(`状态修改为已完成后不可再进行交易操作,是否确定修改?`, {