From 62b6a7fac3f2acde70b578431147c4a01f19c182 Mon Sep 17 00:00:00 2001 From: 黎星凯 <13949086503@163.com> Date: 星期一, 15 四月 2024 09:07:05 +0800 Subject: [PATCH] bug修改 --- admin-web/src/views/stock/inventorycount/inventorytask/index.vue | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/admin-web/src/views/stock/inventorycount/inventorytask/index.vue b/admin-web/src/views/stock/inventorycount/inventorytask/index.vue index 5359ad8..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; -- Gitblit v1.9.1