From 33032d320cb75854def7391026b0401f1bfb8360 Mon Sep 17 00:00:00 2001
From: 黎星凯 <13949086503@163.com>
Date: 星期六, 11 五月 2024 17:26:02 +0800
Subject: [PATCH] 20240511修改: 分发单优化, 分类,物品,分发单明细,采购单明细数据导入

---
 admin-web/src/views/stock/inventorycount/inventorytask/index.vue |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/admin-web/src/views/stock/inventorycount/inventorytask/index.vue b/admin-web/src/views/stock/inventorycount/inventorytask/index.vue
index 1d3c0ad..95a42e1 100644
--- a/admin-web/src/views/stock/inventorycount/inventorytask/index.vue
+++ b/admin-web/src/views/stock/inventorycount/inventorytask/index.vue
@@ -43,7 +43,7 @@
 import detail from './detail';
 import myImport from '@/views/components/myImport';
 import {getBaseUrl} from '@/utils/base';
-import {inventoryDel, inventoryListApi} from '@/api/stock/inventory';
+import {inventoryDel, inventoryListApi,isAddInventory} from '@/api/stock/inventory';
 import * as DateFormatter from '@/utils/DateFormatter';
 import {mapGetters} from 'vuex';
 import listPage from '@/views/mixins/listPage';
@@ -338,10 +338,22 @@
           });
     },
     showAdd() {
-      this.editSetting.id = null;
-      this.editSetting.info = null;
-      this.editSetting.title = '鏂板';
-      this.editSetting.show = true;
+      // 鍏堟煡璇㈡槸鍚﹁兘澧炲姞鏂扮殑鐩樼偣浠诲姟
+      // 缂栬緫鎺ュ彛
+      isAddInventory().then((res) => {
+        if(res == 0){
+          this.$message.warning('褰撳墠鏈夋湭瀹屾垚鐨勭洏鐐逛换鍔★紒');
+        }else if(res == -1){
+          this.$message.warning('褰撳墠浠撳簱鏃犵墿鍝侊紒');
+        }else{
+          this.editSetting.id = null;
+          this.editSetting.info = null;
+          this.editSetting.title = '鏂板';
+          this.editSetting.show = true;
+        }
+      }).catch(()=>{
+        //this.loading = false
+      });
     },
     showAudit(row) {
       this.editSetting.id = row.id;
@@ -365,7 +377,7 @@
     // 鏌ヨtable鍒楄〃
     search(pageNum) {
       if (pageNum != undefined) {
-        this.$refs.myTable.search(pageNum);
+        this.$refs.myTable.search({pageNum});
       } else {
         this.$refs.myTable.search();
       }

--
Gitblit v1.9.1