fix:光芯日志mlogb扫描物料二维码弹出新增表单

This commit is contained in:
shijing 2025-03-17 10:25:15 +08:00
parent 2549abe1b3
commit 840a82b87f
1 changed files with 14 additions and 4 deletions

View File

@ -135,6 +135,7 @@ export default {
},
],
},
codeBatch:"",
options: [],
materialOptions: [],
visible: false,
@ -143,8 +144,19 @@ export default {
};
},
mounted() {
let that = this;
if(that.codeText!==''){
let id = data.split('#')[1];
this.$API.cm.labelmat.item.req(id).then((res) => {
that.codeBatch = res.batch;
this.getMaterial();
}).catch((err) => {
that.getMaterial();
})
}else{
that.getMaterial();
}
this.getMtask();
this.getMaterial();
},
methods: {
open() {
@ -174,9 +186,7 @@ export default {
}).then((res) => {
that.materialOptions = res;
res.forEach(item => {
console.log('item',item);
console.log('codeText',that.codeText);
if(item.batch==that.codeText){
if(item.batch==that.codeBatch){
that.form.wm_in = item.id;
that.form.count_use = item.count_cando;
}