fix:禅道231

This commit is contained in:
shijing 2025-12-16 09:01:16 +08:00
parent 0a707478f7
commit e9c0006ccf
1 changed files with 28 additions and 13 deletions

View File

@ -21,20 +21,22 @@
v-if="mode == 'edit'"
v-model="form.batch"
></el-input>
<el-select
<xtSelect
v-else
v-model="form.batch"
style="width: 100%"
filterable
:disabled="mode == 'edit'"
v-model:label="form.batch"
:apiObj = "apiObj"
:params="params"
v-model:obj="selectBatch"
:valueField="'batch'"
:labelField="'batch'"
@change="batchChange"
style="width: 100%;"
>
<el-option
v-for="item in wmaterialOptions"
:key="item"
:label="item"
:value="item"
/>
</el-select>
<el-table-column label="批次号" prop="batch" min-width="100px"></el-table-column>
<el-table-column label="物料" prop="material_name" min-width="100px"></el-table-column>
<el-table-column label="数量" prop="count_cando"></el-table-column>
</xtSelect>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
@ -598,13 +600,19 @@ export default {
leader_name: "",
count_n_all: null,
rules: {},
selectBatch:{},
params:{
material__in: this.material_in,
belong_dept__name: "6车间"
},
apiObj:this.$API.wpm.wmaterial.list,
};
},
mounted() {
this.getBatchs();
// this.getBatchs();
this.getUserList();
this.getEquipment();
this.getWMaterial();
// this.getWMaterial();
this.getShiftOptions();
this.form.material_out = this.material_out;
this.form.handle_date = this.handle_date;
@ -653,6 +661,12 @@ export default {
}
});
},
batchChange(){
let that = this;
that.form.count_use = that.selectBatch.count_cando;
that.form.count_real = that.selectBatch.count_cando;
that.form.count_ok = that.selectBatch.count_cando;
},
//
getBatchs() {
let that = this;
@ -710,6 +724,7 @@ export default {
Number(this.form.count_n_wq) +
Number(this.form.count_n_qt) +
Number(this.form.count_n_zw);
this.form.count_real = this.form.count_use-this.form.count_notok;
},
//
submit() {