fix:光芯日志选择物料组件更换成el-select
This commit is contained in:
parent
2aec38201a
commit
809c14c123
|
|
@ -40,25 +40,20 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item label="批次号" prop="wm_in">
|
<el-form-item label="批次号" prop="wm_in">
|
||||||
<el-select
|
<xtSelect
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
v-model="form.wm_in"
|
v-model="form.wm_in"
|
||||||
placeholder="交接物料批次号"
|
:labelField="'batch'"
|
||||||
class="width100"
|
v-model:obj="materialrow"
|
||||||
filterable
|
v-model:label="form.batch"
|
||||||
@change="changeMaterial"
|
style="width:100%"
|
||||||
|
@change="materialChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-table-column label="批次号" prop="batch"></el-table-column>
|
||||||
v-for="item in materialOptions"
|
<el-table-column label="名称" prop="material_name"></el-table-column>
|
||||||
:key="item.id"
|
<el-table-column label="数量" prop="count"></el-table-column>
|
||||||
:label="item.batch"
|
</xtSelect>
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
<div style="position:relative;width:100%">
|
|
||||||
<span style="margin-right:15px!important;">{{ item.batch }}({{ item.material_name }})</span>
|
|
||||||
<span style="position:absolute;right:0">{{ item.count }}</span>
|
|
||||||
</div>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
|
|
@ -407,6 +402,9 @@ export default {
|
||||||
show: "查看日志",
|
show: "查看日志",
|
||||||
},
|
},
|
||||||
//表单数据
|
//表单数据
|
||||||
|
apiObj:this.$API.wpm.wmaterial.list,
|
||||||
|
params:{},
|
||||||
|
materialrow:{},
|
||||||
form: Object.assign({}, defaultForm),
|
form: Object.assign({}, defaultForm),
|
||||||
//验证规则
|
//验证规则
|
||||||
rules: {
|
rules: {
|
||||||
|
|
@ -638,20 +636,19 @@ export default {
|
||||||
params.state = 10;//合格
|
params.state = 10;//合格
|
||||||
params.material = that.material_in!==''?that.material_in:'';
|
params.material = that.material_in!==''?that.material_in:'';
|
||||||
}
|
}
|
||||||
console.log('that.material_in:',that.material_in);
|
that.params = params;
|
||||||
that.$API.wpm.wmaterial.list.req(params).then((res) => {
|
},
|
||||||
that.materialOptions = res;
|
materialChange(){
|
||||||
if(that.codeText!==''){
|
let that = this;
|
||||||
res.forEach(item=>{
|
that.qct_defects.forEach((item) => {
|
||||||
if(item.batch == that.codeBatch){
|
that.defectform[item.defect_name] = 0;
|
||||||
that.form.wm_in = item.id;
|
that.defectinform[item.defect_name] = 0;
|
||||||
that.form.batch = item.batch;
|
|
||||||
that.materialCount = that.form.count_use = that.form.count_ok = item.count_cando;
|
|
||||||
that.form.count_real = item.count-that.form.count_pn_jgqbl;
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
that.materialFix = that.materialrow.material;
|
||||||
});
|
that.form.batch = that.materialrow.batch;
|
||||||
|
that.materialCount = that.form.count_use = that.form.count_real = that.form.count_ok = Number(that.materialrow.count);
|
||||||
|
that.form.count_real = Number(that.materialrow.count)-that.form.count_pn_jgqbl;
|
||||||
|
that.getdefects(that.route,that.material_in,that.material_out);
|
||||||
},
|
},
|
||||||
changeMaterial(val){
|
changeMaterial(val){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue