This commit is contained in:
shijing 2025-07-30 15:55:33 +08:00
parent 8778dc7ebd
commit 8c071dafbc
1 changed files with 17 additions and 10 deletions

View File

@ -269,17 +269,24 @@ export default {
},
getdefects(){
let that = this;
that.$API.qm.qct.list.req({page: 0, qctmat__material: that.itemObj.material,tags:'inm'}).then((res) => {
if(res.length>0){
that.qct = res[0].id;
that.$API.qm.qct.item.req(res[0].id).then((res) => {
res.qct_defects.forEach((item) => {
that.form[item.defect_name] = 0;
})
that.qct_defects=res.qct_defects;
})
}
that.$API.qm.qct.getQct.req({ material: that.itemObj.material,type:'out',tag:'process' }).then((res) => {
console.log(res)
res.qct_defects.forEach((item) => {
that.form[item.defect_name] = 0;
})
that.qct_defects=res.qct_defects;
})
// that.$API.qm.qct.get.req({page: 0, qctmat__material: that.itemObj.material,tags:'inm'}).then((res) => {
// if(res.length>0){
// that.qct = res[0].id;
// that.$API.qm.qct.item.req(res[0].id).then((res) => {
// res.qct_defects.forEach((item) => {
// that.form[item.defect_name] = 0;
// })
// that.qct_defects=res.qct_defects;
// })
// }
// })
},
//
getInit() {