huangfuli 3 лет назад
Родитель
Сommit
e3b0588881

+ 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
         }
       })
+      })
     },
   },
 }

+ 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))

+ 184 - 111
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
@@ -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({})

+ 19 - 13
src/views/salesManagement/salesPlanOrderList.vue

@@ -271,7 +271,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>
@@ -308,18 +312,20 @@
         prop="updateDate"
         width="130"
       ></el-table-column>
-      <el-table-column
-        class="table_td"
-        label="出库结算"
-        prop=""
-        width="130"
-      ></el-table-column>
-      <el-table-column
-        class="table_td"
-        label="平仓结算"
-        prop=""
-        width="130"
-      ></el-table-column>
+      <el-table-column class="table_td" label="出库结算" prop="" width="130">
+        <template slot-scope="scope"
+          ><span v-if="scope.row.salePlanType != '现货'"
+            >--</span
+          ></template
+        ></el-table-column
+      >
+      <el-table-column class="table_td" label="平仓结算" prop="" width="130"
+        ><template slot-scope="scope"
+          ><span v-if="scope.row.salePlanType != '现货'"
+            >--</span
+          ></template
+        >
+      </el-table-column>
       <el-table-column prop="seller" label="操作" width="360">
         <template slot-scope="scope">
           <!---成交-->