Browse Source

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002201 2 years ago
parent
commit
4272cabfb8
1 changed files with 20 additions and 15 deletions
  1. 20 15
      src/views/purchase/purchase-order/index.vue

+ 20 - 15
src/views/purchase/purchase-order/index.vue

@@ -8,6 +8,7 @@ import {
   initColumns,
   initDicts,
 } from "@/utils/init";
+import { clearTimeout } from "timers";
 
 
 export default {
@@ -41,6 +42,8 @@ export default {
       checkedTabList: [],
       // 主表点击信息
       primaryResource:{},
+      timer:300,
+      timeOut:null,
     };
   },
   computed: {
@@ -132,6 +135,7 @@ export default {
     },
     // 查看
     async handleOpenSeeDrawer(row) {
+      window.clearInterval(this.timeOut);
       const { id } = row;
       const { setVisible, fetchItem } = this.$refs.seeDrawerFef;
       await setVisible(true);
@@ -145,22 +149,23 @@ export default {
       await fetchItem(id);
     },
     // 获取子表信息
-    async handleDetailsData(row) {
-      try {
-        this.primaryResource = row;
-        this.checkedTabList = [];
-        const { code, msg, data } = await orderApi.details(row.id);
-        if (code === 200) {
-          // 物料信息:puOrderItemList   执行结果:puOrderExecuteList
-          for (const key in this.tabTableDatas) {
-            this.tabTableDatas[key] = data[key];
+     handleDetailsData(row) {
+      window.clearTimeout(this.timeOut)
+      this.timeOut = setTimeout(async () =>{
+
+        try {
+          this.primaryResource = row;
+          this.checkedTabList = [];
+          const { code, msg, data } = await orderApi.details(row.id);
+          if (code === 200) {
+            // 物料信息:puOrderItemList   执行结果:puOrderExecuteList
+            for (const key in this.tabTableDatas) {
+              this.tabTableDatas[key] = data[key];
+            }
           }
-        }
-      } catch (err) {
-        //
-      } finally {
-        // this.loading = false;
-      }
+        } catch (err) {}
+      },this.timer)
+      
     },
 
     // 操作提示弹窗