fix: mioitem batch选择时可显示数量

This commit is contained in:
caoqianming 2024-01-25 10:13:18 +08:00
parent 0a12e323f9
commit f855f65d25
1 changed files with 9 additions and 9 deletions

View File

@ -11,9 +11,15 @@
</el-form-item>
<el-form-item label="批次号">
<!-- <el-input v-model="form.batch" placeholder="手动输入批次号" :disabled="inputBatchDisable" /> -->
<el-select v-model="form.batch" value-key="id" filterable allow-create clearable style="width: 100%"
<el-select v-model="form.batch" filterable allow-create clearable style="width: 100%"
:disabled="inputBatchDisable">
<el-option v-for="item in wbatchOptions" :key="item" :label="item" :value="item">
<el-option v-for="item in wbatchOptions" :key="item.id" :value="item.batch">
<span style="float: left">{{ item.batch }}</span>
<span style="
float: right;
color: var(--el-text-color-secondary);
font-size: 13px;
">{{ item.count }}</span>
</el-option>
</el-select>
</el-form-item>
@ -125,19 +131,13 @@ export default {
},
//
getWBatchs() { //
let wbatchs = []
if (this.belongDeptId != null && this.belongDeptId != undefined && this.belongDeptId != '') {
this.$API.wpm.wmaterial.list.req({
"belong_dept": this.belongDeptId,
"material": this.form.material,
"page": 0
}).then(res => {
res.forEach(item => {
if (!wbatchs.includes(item.batch)) {
wbatchs.push(item.batch);
}
});
this.wbatchOptions = wbatchs
this.wbatchOptions = res
})
}
},