fix:bwcheck优化

This commit is contained in:
shijing 2025-02-07 10:12:13 +08:00
parent 8eeb78199c
commit e8449383c8
2 changed files with 33 additions and 36 deletions

View File

@ -356,7 +356,6 @@
ref="checkDialogSingle" ref="checkDialogSingle"
:mlogb="mlogb" :mlogb="mlogb"
:wm = "wm" :wm = "wm"
:qct="qct"
:handle_user="handle_user" :handle_user="handle_user"
:handle_date="handle_date" :handle_date="handle_date"
@success="handlesCheckSuccess" @success="handlesCheckSuccess"
@ -479,6 +478,7 @@ export default {
mlogb: "", mlogb: "",
isEdit: true, isEdit: true,
}, },
qct:null,
defectlist:[], defectlist:[],
}; };
}, },
@ -545,25 +545,7 @@ export default {
table_in_edit(row) { table_in_edit(row) {
this.saveInForm = row; this.saveInForm = row;
this.saveInDialog = true; this.saveInDialog = true;
// this.getdefects(row.qct);
}, },
// getdefects(qct){
// let that = this;
// that.$API.qm.qct.item.req(qct).then((res) => {
// that.defectOptions = [];
// that.defectOptions = res.qct_defects;
// })
// },
// formTableSave(row){
// let that = this;
// let obj = new Object();
// obj.count = row.count;
// obj.defect = row.defect;
// obj.mlogb = that.saveInForm.id;
// that.$API.wpm.mlogbdefect.create.req(obj).then((res) => {
// })
// },
// //
saveInSubmit() { saveInSubmit() {
let that = this; let that = this;
@ -610,15 +592,32 @@ export default {
}); });
}, },
table_out_check_single(row,type){ table_out_check_single(row,type){
this.mlogb = row.id; let that = this;
this.wm = row.wm_in; that.mlogb = row.id;
this.qct = row.qct; that.wm = row.wm_in;
this.handle_date=this.mlogItem.handle_date; that.handle_date=that.mlogItem.handle_date;
this.handle_user = this.mlogItem.handle_user; that.handle_user = that.mlogItem.handle_user;
this.dialog.check_single = true; that.dialog.check_single = true;
this.$nextTick(() => { if(row.qct==null){
this.$refs.checkDialogSingle.open(type); that.$API.qm.qct.list.req({qctmat__material:row.material_out,page:0}).then((res)=>{
}); if(res.length>0){
that.qct = res[0].id;
console.log('that.qct',that.qct);
that.$nextTick(() => {
that.$refs.checkDialogSingle.open(type,that.qct);
});
}else{
that.$nextTick(() => {
that.$refs.checkDialogSingle.open(type);
});
}
})
}else{
that.qct = row.qct;
that.$nextTick(() => {
that.$refs.checkDialogSingle.open(type,that.qct);
});
}
}, },
// //
mlogSubmit() { mlogSubmit() {

View File

@ -173,10 +173,6 @@ export default {
type: String, type: String,
default: "", default: "",
}, },
qct: {
type: String,
default: "",
},
handle_user:{ handle_user:{
type: String, type: String,
default: "", default: "",
@ -197,6 +193,7 @@ export default {
mode:'ins', mode:'ins',
// //
form: {}, form: {},
qct:"",
mgroup: "", mgroup: "",
params: {mlogb:'',page:0}, params: {mlogb:'',page:0},
visible: false, visible: false,
@ -218,13 +215,14 @@ export default {
mounted() { mounted() {
let that = this; let that = this;
that.params.mlogb = that.addTemplate.mlogb = that.mlogb; that.params.mlogb = that.addTemplate.mlogb = that.mlogb;
that.getOptions();
that.getdefects();
}, },
methods: { methods: {
open(mode = "ins") { open(mode = "ins",qct = '') {
let that = this;
this.mode = mode; this.mode = mode;
console.log(this.mode); this.qct = qct;
that.getOptions();
that.getdefects();
this.visible = true; this.visible = true;
setTimeout(() => { setTimeout(() => {
this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20; this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;