Forráskód Böngészése

费用明细不能为空校验

Qukatie 2 napja
szülő
commit
af13aace82

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

@@ -437,7 +437,7 @@ import check from "@/components/checkL/check";
 import { getCorpType, getList } from "@/api/tirePartsMall/basicData/commodityInformation";
 import { isProcurement } from "@/api/basicData/configuration";
 import commodity from "../../configuration/commodity.json";
-import { getDetails, submit, itemRemove, auditPlan, revokePlanIn,feeSubmit } from "@/api/storehouse/plan.js";
+import { getDetails, submit, itemRemove, auditPlan, revokePlanIn, feeSubmit } from "@/api/storehouse/plan.js";
 import dicSelect from "@/components/dicSelect/main";
 import _ from "lodash";
 export default {
@@ -1048,7 +1048,7 @@ export default {
       // }
       this.form.centerShipCostList.push({
         parentId: this.form.id,
-        billType:1,
+        billType: 1,
         goodsNum: this.form.goodsTotalNum,
         $cellEdit: true
       });
@@ -1057,9 +1057,12 @@ export default {
       if (!this.form.id) {
         return this.$message.error("请保存数据");
       }
-      feeSubmit(this.form.centerShipCostList).then(res=>{
+      if (this.form.centerShipCostList.length == 0) {
+        return this.$message.error("请录入费用明细");
+      }
+      feeSubmit(this.form.centerShipCostList).then(res => {
         this.getDetail(this.form.id);
-      })
+      });
     },
     inEdit() {
       if (this.form.status != 1) {

+ 6 - 0
src/views/storehouse/outStockManage/outStockPlan/detailsPage.vue

@@ -1173,10 +1173,16 @@ export default {
         return this.$message.error("请保存数据");
       }
       if (type == "D") {
+        if (this.form.centerShipCostList.length == 0) {
+          return this.$message.error("请录入收费明细");
+        }
         feeSubmit(this.form.centerShipCostList).then(res => {
           this.getDetail(this.form.id);
         });
       } else {
+        if (this.form.centerShipPaymentCostList.length == 0) {
+          return this.$message.error("请录入付费明细");
+        }
         feeSubmit(this.form.centerShipPaymentCostList).then(res => {
           this.getDetail(this.form.id);
         });