fix:检验时设备改成非必填;搜索框左移;只有检测项时关联缺陷项不判断
This commit is contained in:
parent
2f645882d5
commit
a3f2e2c0b7
|
@ -25,9 +25,9 @@
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main id="mlogbwMain">
|
<el-main id="mlogbwMain">
|
||||||
<el-button type="primary" v-if="!isSubmit&&process_type=='20'" @click="check_start" style="position: absolute;top: 20px;left: 150px;">检验</el-button>
|
<el-button type="primary" v-if="!isSubmit&&process_type=='20'&&mode=='outs'" @click="check_start" style="position: absolute;top: 20px;left: 150px;">检验</el-button>
|
||||||
<el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;top: 20px;left: 210px;">批量操作</el-button>
|
<el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;top: 20px;left: 210px;">批量操作</el-button>
|
||||||
<el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;top: 20px;right: 50px;">批量操作</el-input>
|
<el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;top: 20px;left: 308px;">批量操作</el-input>
|
||||||
<sc-form-table
|
<sc-form-table
|
||||||
hideDelete
|
hideDelete
|
||||||
id="mlogbwlist"
|
id="mlogbwlist"
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
|
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="item.testitem_field_type=='input-number'"
|
v-if="item.testitem_field_type=='input-number'"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="12" :xs="24">
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
<el-form-item label="设备" prop="equipment">
|
<el-form-item label="设备">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.equipment"
|
v-model="form.equipment"
|
||||||
placeholder="设备"
|
placeholder="设备"
|
||||||
|
@ -429,6 +429,7 @@ export default {
|
||||||
},
|
},
|
||||||
defectlists:[],
|
defectlists:[],
|
||||||
testitemlists:[],
|
testitemlists:[],
|
||||||
|
qct_defects_origin:[],
|
||||||
selectWpr:[],
|
selectWpr:[],
|
||||||
tableHeight:500,
|
tableHeight:500,
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
|
@ -455,8 +456,9 @@ export default {
|
||||||
}
|
}
|
||||||
that.$API.mtm.mgroup.item.req(that.mgroup).then((res) => {
|
that.$API.mtm.mgroup.item.req(that.mgroup).then((res) => {
|
||||||
that.process_type=res.process_type;
|
that.process_type=res.process_type;
|
||||||
// console.log('res',res);
|
if(that.mode == 'outs'){//输入
|
||||||
that.getdefects();
|
that.getdefects();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -480,6 +482,7 @@ export default {
|
||||||
obj.canEdit = that.process_type=='20'?false:true;
|
obj.canEdit = that.process_type=='20'?false:true;
|
||||||
that.qct_defects.push(obj);
|
that.qct_defects.push(obj);
|
||||||
})
|
})
|
||||||
|
that.qct_defects_origin = that.qct_defects;
|
||||||
that.qct_testitems = [];
|
that.qct_testitems = [];
|
||||||
res.qct_testitems.forEach((item2) => {
|
res.qct_testitems.forEach((item2) => {
|
||||||
let obj2 = Object.assign({}, item2);
|
let obj2 = Object.assign({}, item2);
|
||||||
|
@ -499,6 +502,7 @@ export default {
|
||||||
}
|
}
|
||||||
that.qct_testitems.push(obj2);
|
that.qct_testitems.push(obj2);
|
||||||
})
|
})
|
||||||
|
that.qct_testitems_origin = that.qct_testitems;
|
||||||
that.getList();
|
that.getList();
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
@ -515,7 +519,6 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.options.forEach((item) => {
|
that.options.forEach((item) => {
|
||||||
if(item.id == row.wpr){
|
if(item.id == row.wpr){
|
||||||
// console.log('item',item);
|
|
||||||
let index = that.mlogbwlist.indexOf(row);
|
let index = that.mlogbwlist.indexOf(row);
|
||||||
that.mlogbwlist[index].number = item.number;
|
that.mlogbwlist[index].number = item.number;
|
||||||
}
|
}
|
||||||
|
@ -566,9 +569,20 @@ export default {
|
||||||
obj.mlogb = row.mlogb;
|
obj.mlogb = row.mlogb;
|
||||||
obj.wpr = row.wpr;
|
obj.wpr = row.wpr;
|
||||||
obj.note = row.note;
|
obj.note = row.note;
|
||||||
|
that.qct_defects_origin.forEach(item => {
|
||||||
|
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
||||||
|
let str = item.rule_expression.replace(/`/g, '');
|
||||||
|
str = str.replace(/\${(.*?)}/g, 'row.\$1')
|
||||||
|
let judge = eval(str);
|
||||||
|
row[item.defect_name] = judge;
|
||||||
|
}else{
|
||||||
|
row[item.defect_name] = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
//qct不为空,有检验表
|
//qct不为空,有检验表
|
||||||
if(that.qct!==null&&that.qct!==''){
|
if(that.qct!==null&&that.qct!==''){
|
||||||
//检验表已经填过
|
//检验表已经填过
|
||||||
|
console.log('row',row);
|
||||||
if(row.ftest!==null&&row.ftest!==undefined&&row.ftest!==''){
|
if(row.ftest!==null&&row.ftest!==undefined&&row.ftest!==''){
|
||||||
console.log('已填过');
|
console.log('已填过');
|
||||||
obj.ftest =row.ftest;
|
obj.ftest =row.ftest;
|
||||||
|
@ -578,7 +592,6 @@ export default {
|
||||||
row.ftest.ftestitems.forEach((item1) => {
|
row.ftest.ftestitems.forEach((item1) => {
|
||||||
item1.test_val_json = row[item1.testitem_name];
|
item1.test_val_json = row[item1.testitem_name];
|
||||||
})
|
})
|
||||||
// console.log('obj',obj);
|
|
||||||
}else{//检验表未填过
|
}else{//检验表未填过
|
||||||
console.log('未填过');
|
console.log('未填过');
|
||||||
obj.ftest = {};
|
obj.ftest = {};
|
||||||
|
@ -587,7 +600,7 @@ export default {
|
||||||
obj.ftest.qct = that.qct;
|
obj.ftest.qct = that.qct;
|
||||||
obj.ftest.test_date = that.handle_date!=null?that.handle_date:that.currentDate;
|
obj.ftest.test_date = that.handle_date!=null?that.handle_date:that.currentDate;
|
||||||
obj.ftest.test_user = that.handle_user;
|
obj.ftest.test_user = that.handle_user;
|
||||||
that.qct_defects.forEach((item) => {
|
that.qct_defects_origin.forEach((item) => {
|
||||||
let itemObj = {};
|
let itemObj = {};
|
||||||
itemObj.defect = item.defect;
|
itemObj.defect = item.defect;
|
||||||
itemObj.test_user = that.handle_user;
|
itemObj.test_user = that.handle_user;
|
||||||
|
@ -604,6 +617,7 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log('obj',obj);
|
||||||
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
||||||
obj.id = row.id;
|
obj.id = row.id;
|
||||||
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
|
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
|
||||||
|
@ -677,7 +691,7 @@ export default {
|
||||||
defectCountSun(row){
|
defectCountSun(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
let index = that.mlogbwlist.indexOf(row);
|
let index = that.mlogbwlist.indexOf(row);
|
||||||
that.qct_defects.forEach(item => {
|
that.qct_defects_origin.forEach(item => {
|
||||||
// console.log('item.rule_expression',item.rule_expression);
|
// console.log('item.rule_expression',item.rule_expression);
|
||||||
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
||||||
let str = item.rule_expression.replace(/`/g, '');
|
let str = item.rule_expression.replace(/`/g, '');
|
||||||
|
|
Loading…
Reference in New Issue