fix:bx变更检验提交接口
This commit is contained in:
parent
f9e8206290
commit
cf6ac5dba3
|
|
@ -250,7 +250,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer>
|
<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-button @click="saveCancel">取消</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
|
@ -824,55 +824,20 @@ export default {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
that.$refs.dialogForm.validate((valid) => {
|
that.$refs.dialogForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
Object.assign(that.setForm,that.form);
|
let obj = {};
|
||||||
that.mlogbwlist.forEach(item => {
|
obj.mlogbw_ids = that.mlogbwlist.map(item => item.id);
|
||||||
if(item.ftest!==null){
|
obj.test_equip = that.form.equipment;
|
||||||
item.ftest.ftestdefects.forEach(defect => {
|
obj.test_user = that.form.test_user;
|
||||||
if(that.setForm.defectids.indexOf(defect.defect) > -1){
|
obj.test_date = that.handle_date!=null?that.handle_date:that.currentDate;
|
||||||
defect.test_user = that.setForm.test_user;
|
if(that.form.defectids.length>0){
|
||||||
}
|
obj.defects = that.form.defectids;
|
||||||
})
|
}
|
||||||
item.ftest.ftestitems.forEach(testitem => {
|
if(that.form.testitemids.length>0){
|
||||||
if(that.setForm.testitemids.indexOf(testitem.testitem) > -1){
|
obj.testitems = that.form.testitemids;
|
||||||
testitem.test_user = that.setForm.test_user;
|
}
|
||||||
testitem.test_equip = that.setForm.equipment;
|
obj.qct = that.qct;
|
||||||
}
|
that.$API.wpm.mlogbw.start_test.req(obj).then((res) => {
|
||||||
})
|
that.isSaveing = false;
|
||||||
}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) => {
|
|
||||||
that.form = {};
|
that.form = {};
|
||||||
that.checkVisible = false;
|
that.checkVisible = false;
|
||||||
that.multipleSet = true;
|
that.multipleSet = true;
|
||||||
|
|
@ -882,13 +847,11 @@ export default {
|
||||||
that.qct_testitems = [];
|
that.qct_testitems = [];
|
||||||
that.qct_testitems = that.testitemlists;
|
that.qct_testitems = that.testitemlists;
|
||||||
that.tableHeight = document.getElementById('mlogbwMain').clientHeight-80;
|
that.tableHeight = document.getElementById('mlogbwMain').clientHeight-80;
|
||||||
that.isSaveing = false;
|
|
||||||
that.getList();
|
that.getList();
|
||||||
}).catch((err) => {
|
}).catch(() => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
return err;
|
})
|
||||||
});
|
}else{ that.isSaveing = false;}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
saveCancel(){
|
saveCancel(){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue