diff --git a/src/pages/materialsStation/toolsBack/toolsAddBack.vue b/src/pages/materialsStation/toolsBack/toolsAddBack.vue index 3dc6ae4..6bc7696 100644 --- a/src/pages/materialsStation/toolsBack/toolsAddBack.vue +++ b/src/pages/materialsStation/toolsBack/toolsAddBack.vue @@ -132,7 +132,7 @@ + + diff --git a/src/pages/materialsStation/toolsLease/toolsLeaseAdd.vue b/src/pages/materialsStation/toolsLease/toolsLeaseAdd.vue index b8aaafa..56e0124 100644 --- a/src/pages/materialsStation/toolsLease/toolsLeaseAdd.vue +++ b/src/pages/materialsStation/toolsLease/toolsLeaseAdd.vue @@ -90,10 +90,10 @@ 序号 类型名称 规格型号 + {{ opts.isOut ? '出库数' : '领用数' }} 在库数 在用数 预领数 - {{ opts.isOut ? '出库数' : '领用数' }} 操作 @@ -102,15 +102,13 @@ {{ item.typeName }} - {{ item.storageNum }} - {{ item.useNum }} - {{ item.preNum }} @@ -118,6 +116,9 @@ !item.maCodeList || item.maCodeList.length == 0 ? '选择编码' : item.maCodeList.length }} + {{ item.storageNum }} + {{ item.useNum }} + {{ item.preNum }} {{ label + ':' }} - - + + + {{ textShow }} {{ typePlaceholder @@ -15,22 +24,25 @@ + + + + + + - - - - - {{ emptyTips }} @@ -129,6 +141,7 @@ export default { data() { return { showSelector: false, + showInput: false, current: '', searchValue: '', mixinDatacomResData: [], @@ -165,7 +178,7 @@ export default { }, filteredData() { const keyword = this.searchValue.trim().toLowerCase() - if (!this.filterable || !keyword) return this.mixinDatacomResData + if (!keyword) return this.mixinDatacomResData return this.mixinDatacomResData.filter((item) => this.formatItemName(item).toLowerCase().includes(keyword), ) @@ -232,6 +245,7 @@ export default { change(item) { if (!item.disable) { this.showSelector = false + this.showInput = false this.searchValue = '' this.current = this.formatItemName(item) this.emit(item.value) @@ -245,12 +259,22 @@ export default { }, toggleSelector() { if (this.disabled) return - this.showSelector = !this.showSelector - if (!this.showSelector && this.filterable) this.searchValue = '' + this.showInput = true + this.showSelector = true + this.searchValue = '' }, onSearchInput(val) { this.searchValue = val }, + onInputBlur() { + // 延迟隐藏以防止点击选项时先触发blur + setTimeout(() => { + if (this.showSelector) { + this.showInput = false + this.showSelector = false + } + }, 200) + }, formatItemName(item) { if (this.format) { let str = this.format @@ -282,12 +306,6 @@ export default {