瀏覽代碼

删行之后进行询价,确保主表价格数据正确

002390 2 年之前
父節點
當前提交
801e0b7d82
共有 2 個文件被更改,包括 9 次插入3 次删除
  1. 6 2
      src/views/purchase/purchase-order/add/index.vue
  2. 3 1
      src/views/purchase/purchase-order/edit/index.vue

+ 6 - 2
src/views/purchase/purchase-order/add/index.vue

@@ -200,12 +200,16 @@ export default {
       // prop.push(initParams(arr, "key", "value"));
     },
     // 删行
-    delTableRow(prop, index) {
+    async delTableRow(prop, index) {
+
       for (const key in this.params) {
-        if (Array.isArray(this.params[key])) {
+        // if (Array.isArray(this.params[key])) {
+        if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
           this.params[key].splice(index, 1);
         }
       }
+
+      await this.handleGetPrice();
       // prop.splice(index, 1);
     },
     // 同步子表物料

+ 3 - 1
src/views/purchase/purchase-order/edit/index.vue

@@ -154,7 +154,7 @@ export default {
       // prop.push(initParams(arr, "key", "value"));
     },
     // 删除行
-    delTableRow(prop, index) {
+    async delTableRow(prop, index) {
       // prop.splice(index, 1);
       for (const key in this.params) {
 
@@ -165,6 +165,8 @@ export default {
 
         }
       }
+
+      await this.handleGetPrice();
     },
     // 取消
     handleCancel() {