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

🐞 fix(【drp-采购需求单】): 采购需求处理明细修改没更新到采购需求单

采购需求处理界面选择数据查看明细修改数据保存没更新到采购需求单 具体操作:在采购需求处理界面选择数据查看明细,点编辑,修改补单标识,批号锁定标识,紧急标识保存后没更新到采购需求单。单号:CGXQ2024071500005,103-04-01-000005
解决:业务类型全局监听,由于查看详情会进行逻辑校验

20240715240
002390 10 hónapja
szülő
commit
b7b022a54a
1 módosított fájl, 10 hozzáadás és 15 törlés
  1. 10 15
      src/views/purchase/PurchaseDemandList/add.vue

+ 10 - 15
src/views/purchase/PurchaseDemandList/add.vue

@@ -20,13 +20,13 @@
                 trigger: 'blur',
               }"
             >
-              <!-- @change="changeBillType(basicForm.billType)" -->
               <el-select
                 clearable
                 v-model="basicForm.billType"
                 :disabled="sonDisable"
                 :size="size"
                 style="width: 200px"
+                @change="changeBillType(basicForm.billType)"
               >
                 <el-option
                   v-for="dict in dict.type.sys_business"
@@ -1635,11 +1635,6 @@ export default {
     };
   },
   watch: {
-    "basicForm.billType": {
-      handler(nVal, oVal) {
-        this.changeBillType(nVal);
-      },
-    },
     // "basicForm.demandDate": {
     //   handler(nVal, oVal) {
     //     if (nVal && nVal !== "") {
@@ -1690,7 +1685,6 @@ export default {
     async dafaultDate() {
       try {
         let { planType, demandDate } = this.basicForm;
-        console.log();
         let { code, data } = await SetdemandDate({ planType });
         if (code == 200) {
           this.basicForm.demandDate = new Date(data).Format("yyyy-MM-dd");
@@ -1701,12 +1695,13 @@ export default {
     // 改变需求计划改变需求日期
     changeplanType(val) {
       this.dafaultDate();
-      console.log(val);
       if (val == "JJXQ") {
         this.basicForm.billType = "JJXQ";
+        this.changeBillType(this.basicForm.billType);
       } else {
         if (this.basicForm.billType == "JJXQ") {
           this.basicForm.billType = "";
+          this.changeBillType(this.basicForm.billType);
         }
       }
 
@@ -2170,7 +2165,7 @@ export default {
             .then((res) => {
               if (res.code === 200) {
                 reciveForm.puDemandItemList = res.data;
-                console.log("reciveForm", reciveForm);
+                // console.log("reciveForm", reciveForm);
                 this.basicForm = reciveForm;
                 if (this.basicForm.org) {
                   this.reBackRefer("ORG_PARAM", this.basicForm.org);
@@ -2233,7 +2228,7 @@ export default {
       this.ids = selection.map((item) => {
         return item.id;
       });
-      console.log("选中数组", this.ids);
+      // console.log("选中数组", this.ids);
     },
     rowSelect(row) {
       this.$refs.table.toggleRowSelection(row);
@@ -2448,7 +2443,7 @@ export default {
       this.$modal.loading("正在处理数据...");
       e.preventDefault(); //阻止默认粘贴事件
       let source = e.clipboardData.getData("Text");
-      console.log("scope", scope.column.property);
+      // console.log("scope", scope.column.property);
       // 首先对源头进行解析
       let rows = source.split("\r\n"); // 拆成一个数组
       // 数组去除空字符串
@@ -2503,7 +2498,7 @@ export default {
                   line.storageCondition = rowList[i].storageCondition;
                   line.materialRemark = rowList[i].remark;
                   newLine.push(line);
-                  console.log("临时数组", newLine);
+                  // console.log("临时数组", newLine);
                 }
                 // 删除指定下标
                 this.basicForm.puDemandItemList.splice(
@@ -2688,13 +2683,13 @@ export default {
     },
     // 明细行选择物料编码带出数据
     chooseMaterial(index) {
-      console.log("🚀 ~ file: add.vue:790 ~ chooseMaterial ~ index:", index);
+      // console.log("🚀 ~ file: add.vue:790 ~ chooseMaterial ~ index:", index);
       this.tableIndex = index;
       // 传0只展示同步NC了的物料
       this.$refs.materialRefer.init(0);
     },
     selectMaterial(selection) {
-      console.log("选中的物料", selection);
+      // console.log("选中的物料", selection);
       if (selection.length <= 1) {
         // 选择新物料时先清空行内其他信息
         this.basicForm.puDemandItemList[this.tableIndex].reservedProportion =
@@ -3011,7 +3006,7 @@ export default {
     },
     // 批量调整确认
     confirmAdjust() {
-      console.log("data", this.adjust);
+      // console.log("data", this.adjust);
       if (
         this.adjust.csFlag == "N" ||
         this.adjust.csFlag == "" ||