From 4617951af57412dcf13c2c70ccefbd49196ff49a Mon Sep 17 00:00:00 2001 From: hyingbo <1363390067@qq.com> Date: 星期五, 01 八月 2025 14:08:12 +0800 Subject: [PATCH] 库位号添加禁用规则 --- src/views/tms/modules/GoodsShelvesMarkForm.vue | 34 ++++++++++++++++++++++------------ 1 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/views/tms/modules/GoodsShelvesMarkForm.vue b/src/views/tms/modules/GoodsShelvesMarkForm.vue index 6150ce0..51141ee 100644 --- a/src/views/tms/modules/GoodsShelvesMarkForm.vue +++ b/src/views/tms/modules/GoodsShelvesMarkForm.vue @@ -54,7 +54,11 @@ data () { return { model:{ - }, + warehouseId: '', + goodsShelves: '', + storey: '', + variety: '' + }, labelCol: { xs: { span: 24 }, sm: { span: 5 }, @@ -91,7 +95,8 @@ editDisabled: false, warehouseOptions: [], goodsShelvesOptions: [], - storeyOptions: [] + storeyOptions: [], + warehouseId: '' } }, computed: { @@ -129,6 +134,8 @@ }) }, warehouseChange(warehouseId) { + this.model.goodsShelves = '' + this.model.storey = '' this.goodsShelvesOptions = [] this.storeyOptions = [] this.warehouseId = warehouseId @@ -140,6 +147,7 @@ }, goodsShelvesChange(shelfNumber) { this.storeyOptions = [] + this.model.storey = '' getAction(this.url.queryGoodsShelvesStoreyDictList, { warehouseId: this.warehouseId, shelfNumber: shelfNumber @@ -163,16 +171,18 @@ this.warehouseOptions = res.result } }) - getAction(this.url.queryGoodsShelvesDictList, { warehouseId: record.warehouseId }).then(res => { - if (res.success) { - this.goodsShelvesOptions = res.result - } - }) - getAction(this.url.queryGoodsShelvesStoreyDictList, { warehouseId: record.warehouseId, shelfNumber: record.goodsShelves }).then(res => { - if (res.success) { - this.storeyOptions = res.result - } - }) + if (record.warehouseId) { + getAction(this.url.queryGoodsShelvesDictList, { warehouseId: record.warehouseId }).then(res => { + if (res.success) { + this.goodsShelvesOptions = res.result + } + }) + getAction(this.url.queryGoodsShelvesStoreyDictList, { warehouseId: record.warehouseId, shelfNumber: record.goodsShelves }).then(res => { + if (res.success) { + this.storeyOptions = res.result + } + }) + } if (this.title === '鏂板' || this.title === '璇︽儏') { this.editDisabled = false } -- Gitblit v1.9.3