From 96a226a144cfc70e6c50264ad45c67b865ea5250 Mon Sep 17 00:00:00 2001 From: "Mr.sun" <2290907227@qq.com> Date: Mon, 8 Apr 2024 15:17:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A7=E4=BD=8D=E5=95=86=E5=93=81=E7=BC=96?= =?UTF-8?q?=E5=8F=B7=E5=88=87=E6=8D=A2=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/libraryManage/inventory/config.js | 28 ++++++++--------- .../libraryManage/inventory/inventory.vue | 30 +++++++++++++++---- 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/src/views/libraryManage/inventory/config.js b/src/views/libraryManage/inventory/config.js index 0035d18..7bf5964 100644 --- a/src/views/libraryManage/inventory/config.js +++ b/src/views/libraryManage/inventory/config.js @@ -61,9 +61,9 @@ export function tableConfig() { prop: "unit", istrue: true, "min-width": 100, - filter(row, value) { - return getDictLabel(value, _that.dict.type.goods_unit); - }, + // filter(row, value) { + // return getDictLabel(value, _that.dict.type.goods_unit); + // }, }, ], configEntry: [ @@ -141,9 +141,9 @@ export function tableConfig() { label: "包装单位", prop: "unit", istrue: true, - filter(row, value) { - return getDictLabel(value, _that.dict.type.goods_unit); - }, + // filter(row, value) { + // return getDictLabel(value, _that.dict.type.goods_unit); + // }, }, { label: "包装数量", @@ -284,9 +284,9 @@ export function tableConfig() { label: "包装单位", prop: "unit", istrue: true, - filter(row, value) { - return getDictLabel(value, _that.dict.type.goods_unit); - }, + // filter(row, value) { + // return getDictLabel(value, _that.dict.type.goods_unit); + // }, }, { label: "包装数量", @@ -426,9 +426,9 @@ export function tableConfig() { label: "包装单位", prop: "unit", istrue: true, - filter(row, value) { - return getDictLabel(value, _that.dict.type.goods_unit); - }, + // filter(row, value) { + // return getDictLabel(value, _that.dict.type.goods_unit); + // }, }, { label: "包装数量", @@ -551,9 +551,7 @@ export function tableConfig() { label: "包装单位", prop: "unit", istrue: true, - filter(row, value) { - return getDictLabel(value, _that.dict.type.goods_unit); - }, + }, { label: "包装数量", diff --git a/src/views/libraryManage/inventory/inventory.vue b/src/views/libraryManage/inventory/inventory.vue index 20ef15a..bdb5335 100644 --- a/src/views/libraryManage/inventory/inventory.vue +++ b/src/views/libraryManage/inventory/inventory.vue @@ -90,10 +90,14 @@ - + @@ -151,6 +155,7 @@ export default { return { tableProps: {}, ids: [], + locationCode: '', enterForm: { consignorId: '', storageId: '', @@ -180,16 +185,31 @@ export default { this.enterForm.storageId = res.data[0].id this.listAreaByStorage(this.enterForm.storageId) }) + setTimeout(() => { + this.enterForm.invType = JSON.parse(JSON.stringify(this.dict.type.inv_type_dict))[0].label + }, 500) + this.enterForm.invType = 'QP' }, async created() { this.tableConfig = await this.getTableHeaderCom('busin_inventory', tableConfig.call(this)) }, + watch: { + //侦听 locationCode的变化 + locationCode(newVal, oldVal) { + this.enterForm.goodCode = this.locationCode + this.enterForm.locationCode = undefined + if (newVal.indexOf('-') !== -1) { + this.enterForm.locationCode = this.locationCode + this.enterForm.goodCode = undefined + } + } + }, methods: { // 货主请求 getBasicList() { consignorList().then((res) => { this.options = res.rows - console.log(this.options) + // console.log(this.options) this.enterForm.consignorId = this.options[0].id }) }, @@ -226,7 +246,7 @@ export default { queryTable() { // if (!this.enterForm.consignorId) return this.$message('业主名称必填!') if (!this.enterForm.invWay) return this.$message('盘点方式必选!') - if (!this.enterForm.invType) return this.$message('盘点类型必选!') + // if (!this.enterForm.invType) return this.$message('盘点类型必选!') this.loading = true queryGoods({ pageSize: this.paging.size,