Bladeren bron

Merge remote-tracking branch 'origin/dev' into dev

liyuan 2 dagen geleden
bovenliggende
commit
2ede46e25d

+ 7 - 1
src/views/storehouse/inStockManage/inStockPlan/detailsPage.vue

@@ -1049,7 +1049,7 @@ export default {
       this.form.centerShipCostList.push({
         parentId: this.form.id,
         billType: 1,
-        costType:0,
+        costType: 0,
         goodsNum: this.form.goodsTotalNum,
         $cellEdit: true
       });
@@ -1061,6 +1061,12 @@ export default {
       if (this.form.centerShipCostList.length == 0) {
         return this.$message.error("请录入费用明细");
       }
+      for (let row of this.form.centerShipCostList.filter(item => item.isDeleted != 1)) {
+        if (!row.costName || !row.goodsNum || !row.costPrice) {
+          this.$refs.outbound_records.rowCell(row, row.$index);
+          return this.$message.error("请完善费用明细信息");
+        }
+      }
       feeSubmit(this.form.centerShipCostList).then(res => {
         this.getDetail(this.form.id);
       });

+ 14 - 2
src/views/storehouse/outStockManage/outStockPlan/detailsPage.vue

@@ -1176,7 +1176,7 @@ export default {
       this.form.centerShipCostList.push({
         parentId: this.form.id,
         billType: 2,
-        costType:0,
+        costType: 0,
         $cellEdit: true
       });
     },
@@ -1187,7 +1187,7 @@ export default {
       this.form.centerShipPaymentCostList.push({
         parentId: this.form.id,
         billType: 2,
-        costType:1,
+        costType: 1,
         $cellEdit: true
       });
     },
@@ -1199,6 +1199,12 @@ export default {
         if (this.form.centerShipCostList.length == 0) {
           return this.$message.error("请录入收费明细");
         }
+        for (let row of this.form.centerShipCostList.filter(item => item.isDeleted != 1)) {
+          if (!row.costName || !row.goodsNum || !row.costPrice) {
+            this.$refs.outbound_records.rowCell(row, row.$index);
+            return this.$message.error("请完善费用明细信息");
+          }
+        }
         feeSubmit(this.form.centerShipCostList).then(res => {
           this.getDetail(this.form.id);
         });
@@ -1206,6 +1212,12 @@ export default {
         if (this.form.centerShipPaymentCostList.length == 0) {
           return this.$message.error("请录入付费明细");
         }
+        for (let row of this.form.centerShipPaymentCostList.filter(item => item.isDeleted != 1)) {
+          if (!row.costName || !row.goodsNum || !row.costPrice) {
+            this.$refs.outbound_records2.rowCell(row, row.$index);
+            return this.$message.error("请完善付费明细信息");
+          }
+        }
         feeSubmit(this.form.centerShipPaymentCostList).then(res => {
           this.getDetail(this.form.id);
         });