- |
+
+
+ |
+ 序号 |
物料批次 |
物料编号 |
{{ item.testitem_name }} |
@@ -38,6 +41,9 @@
|
+
+ {{ index + 1 }}
+ |
{{ row.mlogb__batch }}
@@ -66,7 +72,7 @@
{{ row.note }}
|
-
+
@@ -318,6 +324,7 @@ export default {
route_code:"",
wprInputText:"",
canMultiple:false,
+ selectedAll:false,
checkAll: false,
hideAdd: false,
visible: false,
@@ -402,17 +409,23 @@ export default {
selectChange(){
let that = this;
that.selectWprList = [];
- console.log('selectedindexes',that.selectedindexes);
that.mlogbwlist.forEach((item) => {
if(that.selectedindexes.indexOf(item.id)>-1){
that.selectWprList.push(item);
}
})
- console.log('selectWprList',that.selectWprList);
},
- selectAllChange(datas){
+ selectAllChange(){
let that = this;
- that.selectWprList = datas;
+ if(that.selectedAll){
+ that.mlogbwlist.forEach((item) => {
+ that.selectedindexes.push(item.id);
+ that.selectWprList.push(item);
+ })
+ }else{
+ that.selectedindexes=[];
+ that.selectWprList=[];
+ }
},
getEquipment4() {
let that = this;
@@ -527,7 +540,6 @@ export default {
}
that.mlogbwlist.push(obj);
})
- // console.log('that.mlogbwlist',that.mlogbwlist);
}
})
},
@@ -624,7 +636,7 @@ export default {
let getEd = false;
if(that.qct_testitems.length>0){
for(let i=0;i0){
this.selectWpr = this.selectWprList;
}
- console.log('this.selectWpr',this.selectWpr);
this.setVisible=true;
},
//扫描物料将这一行放到第一行并编辑这一行
@@ -847,12 +858,13 @@ export default {
that.wprInputText = "";
that.mlogbwlist.unshift(obj);
that.$nextTick(() => {
- that.$refs.mlogbwTable.setCurrentRows(obj); // 选中第一行
+ that.selectedindexes.push(obj.id);
+ that.selectWprList.push(item);
})
let getEd = false;
if(that.qct_testitems.length>0){
for(let i=0;i {
- console.log(err);
this.$notify.error({
title: '获取数据失败',
message: err.data
@@ -919,6 +930,9 @@ export default {
that.$refs.dialogForm.validate((valid) => {
if (valid) {
that.selectWpr.forEach(item => {
+ if(!item.ftest){
+ item.ftest = {};
+ }
item.ftest.ftestdefects = [];
if(that.defectlists.length>0){
that.defectlists.forEach((item1) => {
@@ -928,18 +942,12 @@ export default {
item.ftest.ftestdefects.push(obj);
})
}
-
- // item.ftest.ftestdefects.forEach(defect => {
- // let defectindex = that.setForm.defectids.indexOf(defect.defect);
- // if(defectindex > -1){
- // defect.has = that.defectlists[defectindex].value;
- // }
- // })
});
that.$API.wpm.mlogbw.update.req("bulk",that.selectWpr).then((res) => {
that.setVisible = false;
+ that.selectedAll = false;
that.selectWprList = [];
- that.$refs.mlogbwTable.clearSelection();
+ that.selectedindexes = [];
that.defectlists.forEach(item => {
item.value = false;
});
|