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,