From a8ba678a3fe5a39da2c732014cebbb66e408e97c Mon Sep 17 00:00:00 2001 From: WangHan <wwh_work@126,com> Date: 星期三, 02 四月 2025 18:45:12 +0800 Subject: [PATCH] 问题与漏洞修改 --- 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