oa二期内容更新bug修复,存在问题物料品牌规格的多字段查询需要重新确立独立接口

This commit is contained in:
2024-12-17 11:33:00 +08:00
parent 5cbeeee3a1
commit d72af5d3e6
2 changed files with 110 additions and 52 deletions

View File

@@ -273,6 +273,9 @@
:key="item.id"
:label="item.name"
:value="item.id">
<span style="">{{ item.name }}</span>
<span style="color: #8492a6; font-size: 13px" v-if="item.model!==undefined">-{{ item.model }}</span>
<span style="color: #8492a6; font-size: 13px" v-if="item.brand!==undefined">-{{ item.brand }}</span>
</el-option>
</el-select>
</el-col>
@@ -280,7 +283,7 @@
<el-tag type="info" v-if="item.inventory===undefined">请选择物料</el-tag>
<el-tag type="info" v-else>{{ item.inventory }}</el-tag>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-input-number v-model="item.amount" :min="1" :max="item.inventory"></el-input-number>
</el-col>
<el-col :span="4">
@@ -574,9 +577,12 @@ export default {
}
},
// 获取对应的库存 后续添加品牌型号
handleGetInventory(e, index) {
this.form.outWareHouseList[index].inventory = this.oaWarehouseList[this.oaWarehouseList.findIndex(item => item.id === e)].inventory
console.log(this.form.outWareHouseList[index])
let obj = this.oaWarehouseList[this.oaWarehouseList.findIndex(item => item.id === e)]
this.form.outWareHouseList[index].inventory = obj.inventory
this.form.outWareHouseList[index].model = obj.model
this.form.outWareHouseList[index].brand = obj.brand
},
@@ -607,8 +613,10 @@ export default {
this.selectLoading = true;
listOaWarehouse(this.warehouseParams).then(res => {
this.oaWarehouseList = res.rows.filter(item => {
return item.name.toLowerCase()
.indexOf(query.toLowerCase()) > -1;
const queryLower = query.toLowerCase();
return item.name.toLowerCase().indexOf(queryLower) > -1 ||
item.model.toLowerCase().indexOf(queryLower) > -1 ||
item.brand.toLowerCase().indexOf(queryLower) > -1;
});
this.selectLoading = false;
})