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 | 53 ++++++++++++++++++++++++++++++++++------------------- 1 files changed, 34 insertions(+), 19 deletions(-) diff --git a/admin-web/src/views/stock/inventorycount/inventorytask/index.vue b/admin-web/src/views/stock/inventorycount/inventorytask/index.vue index b315b68..95a42e1 100644 --- a/admin-web/src/views/stock/inventorycount/inventorytask/index.vue +++ b/admin-web/src/views/stock/inventorycount/inventorytask/index.vue @@ -41,10 +41,9 @@ import edit from './edit'; import inventory from './inventory'; import detail from './detail'; -import {selectTenantWarehouse} from '@/api/baseSetting/finsystenant'; 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'; @@ -72,12 +71,27 @@ defaultValue: '', }, { + type: 'cascader', + dataIndex: 'agencyId', + label: '鏈烘瀯', + placeholder: '璇烽�夋嫨', + optionsConfig: {url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null}, + cascader: [{key:'warehouseId',queryKey: 'agencyId'}], + defaultValue: '', + options: [], + }, + { type: 'select', dataIndex: 'warehouseId', - label: '鐩樼偣浠撳簱', + label: '浠撳簱', placeholder: '璇烽�夋嫨', defaultValue: '', options: [], + optionsConfig: { + label: 'warehouseName', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse' + }, }, { type: 'date-picker', @@ -296,17 +310,6 @@ ...mapGetters(['userInfo']), }, created() { - selectTenantWarehouse({agencyId: this.userInfo.tenantId}).then((res) => { - this.items.forEach((v) => { - if (v.label == '鐩樼偣浠撳簱') { - v.options = res.map((item) => { - item.label = item.warehouseName; - item.value = item.id; - return item; - }); - } - }); - }); }, methods: { //瀵煎叆 @@ -335,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; @@ -362,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