fix:bx变更检验提交接口

This commit is contained in:
shijing 2025-08-27 15:37:48 +08:00
parent f9e8206290
commit cf6ac5dba3
1 changed files with 19 additions and 56 deletions

View File

@ -250,7 +250,7 @@
</el-row>
</el-form>
<el-footer>
<el-button type="primary" :loading="isSaveing" @click.stop="checkSetting" save>确定</el-button>
<el-button type="primary" v-loading="isSaveing" @click.stop="checkSetting" save>确定</el-button>
<el-button @click="saveCancel">取消</el-button>
</el-footer>
</el-main>
@ -824,55 +824,20 @@ export default {
that.isSaveing = true;
that.$refs.dialogForm.validate((valid) => {
if (valid) {
Object.assign(that.setForm,that.form);
that.mlogbwlist.forEach(item => {
if(item.ftest!==null){
item.ftest.ftestdefects.forEach(defect => {
if(that.setForm.defectids.indexOf(defect.defect) > -1){
defect.test_user = that.setForm.test_user;
}
})
item.ftest.ftestitems.forEach(testitem => {
if(that.setForm.testitemids.indexOf(testitem.testitem) > -1){
testitem.test_user = that.setForm.test_user;
testitem.test_equip = that.setForm.equipment;
}
})
}else{
let ftest = {};
ftest.ftestitems = [];
ftest.ftestdefects = [];
ftest.qct = that.qct;
ftest.test_date =that.handle_date!=null?that.handle_date:that.currentDate;
ftest.test_user = that.handle_user;
that.qct_defects.forEach((item0) => {
let itemObj = {};
itemObj.defect = item0.defect;
itemObj.has = false;
if(that.setForm.defectids.indexOf(item0.defect) > -1){
itemObj.test_user = that.setForm.test_user;
}else{
itemObj.test_user = that.handle_user;
}
ftest.ftestdefects.push(itemObj);
})
that.qct_testitems.forEach((item1) => {
let itemObj1 = {};
itemObj1.testitem = item1.testitem;
itemObj1.addto_wpr = item1.addto_wpr;
itemObj1.test_val_json = "";
if(that.setForm.testitemids.indexOf(item1.testitem) > -1){
itemObj1.test_user = that.setForm.test_user;
itemObj1.test_equip = that.setForm.equipment;
}else{
itemObj1.test_user = that.handle_user;
}
ftest.ftestitems.push(itemObj1);
})
item.ftest = ftest;
}
});
that.$API.wpm.mlogbw.update.req("bulk",that.mlogbwlist).then((res) => {
let obj = {};
obj.mlogbw_ids = that.mlogbwlist.map(item => item.id);
obj.test_equip = that.form.equipment;
obj.test_user = that.form.test_user;
obj.test_date = that.handle_date!=null?that.handle_date:that.currentDate;
if(that.form.defectids.length>0){
obj.defects = that.form.defectids;
}
if(that.form.testitemids.length>0){
obj.testitems = that.form.testitemids;
}
obj.qct = that.qct;
that.$API.wpm.mlogbw.start_test.req(obj).then((res) => {
that.isSaveing = false;
that.form = {};
that.checkVisible = false;
that.multipleSet = true;
@ -882,13 +847,11 @@ export default {
that.qct_testitems = [];
that.qct_testitems = that.testitemlists;
that.tableHeight = document.getElementById('mlogbwMain').clientHeight-80;
that.isSaveing = false;
that.getList();
}).catch((err) => {
that.isSaveing = false;
return err;
});
}
}).catch(() => {
that.isSaveing = false;
})
}else{ that.isSaveing = false;}
});
},
saveCancel(){