fix:coding#803#842、25检测表,绑定缺陷项的时候加判断,如果列表里已绑定就加提示:缺陷项已存在
This commit is contained in:
parent
bf64596820
commit
642baa3965
|
@ -27,6 +27,7 @@
|
|||
hideDelete
|
||||
hideIndex
|
||||
:tableHeight="200"
|
||||
:pushType="pushType"
|
||||
v-model="qctmatlist"
|
||||
:addTemplate="mataddTemplate"
|
||||
placeholder="暂无数据"
|
||||
|
@ -38,9 +39,11 @@
|
|||
v-else
|
||||
:apiObj="apiObj"
|
||||
:labelField="'full_name'"
|
||||
v-model:obj="materialrow"
|
||||
v-model="scope.row.material"
|
||||
v-model:label="scope.row.full_name"
|
||||
style="width:100%"
|
||||
@change="materialrowChange"
|
||||
>
|
||||
<el-table-column label="物料名称" prop="full_name"></el-table-column>
|
||||
<!-- <el-table-column label="工序" prop="process_name"></el-table-column>
|
||||
|
@ -102,6 +105,7 @@
|
|||
<sc-form-table
|
||||
hideIndex
|
||||
:tableHeight="300"
|
||||
:pushType="pushType"
|
||||
v-model="qcttestitemlist"
|
||||
:addTemplate="defectaddTemplate"
|
||||
placeholder="暂无数据"
|
||||
|
@ -122,6 +126,7 @@
|
|||
v-model:label="scope.row.testitem_name"
|
||||
v-model:obj="testitemrow"
|
||||
style="width:100%"
|
||||
@change="testitemrowChange"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="描述" prop="description"></el-table-column>
|
||||
|
@ -177,6 +182,7 @@
|
|||
<el-card style="width: 100%" header="检测缺陷项" shadow="hover">
|
||||
<sc-form-table
|
||||
hideIndex
|
||||
:pushType="pushType"
|
||||
:tableHeight="300"
|
||||
v-model="qctdefectlist"
|
||||
:addTemplate="testitemaddTemplate"
|
||||
|
@ -198,6 +204,7 @@
|
|||
v-model:obj="defectrow"
|
||||
v-model:label="scope.row.defect_name"
|
||||
style="width:100%"
|
||||
@change="defectrowChange"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="分类" prop="cate"></el-table-column>
|
||||
|
@ -325,8 +332,9 @@ export default {
|
|||
isEdit: true,
|
||||
},
|
||||
defectrow:{},
|
||||
materialrow:{},
|
||||
testitemrow:{},
|
||||
|
||||
pushType:'unshift',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -337,7 +345,30 @@ export default {
|
|||
this.getLists();
|
||||
},
|
||||
watch:{
|
||||
defectrow:{}
|
||||
// testitemrow:{
|
||||
// handler(newVal,oldVal){
|
||||
// console.log('newVal',newVal);
|
||||
// console.log('oldVal',oldVal);
|
||||
// this.testitemrowChange()
|
||||
// },
|
||||
// deep: true,
|
||||
// },
|
||||
// defectrow:{
|
||||
// handler(newVal,oldVal){
|
||||
// console.log('newVal',newVal);
|
||||
// console.log('oldVal',oldVal);
|
||||
// this.defectrowChange()
|
||||
// },
|
||||
// deep: true,
|
||||
// },
|
||||
// materialrow:{
|
||||
// handler(newVal,oldVal){
|
||||
// console.log('newVal',newVal);
|
||||
// console.log('oldVal',oldVal);
|
||||
// this.materialrowChange()
|
||||
// },
|
||||
// deep: true,
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
|
@ -491,7 +522,32 @@ export default {
|
|||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
materialrowChange(){
|
||||
let that = this;
|
||||
that.qctmatlist.forEach((item) => {
|
||||
if (item.material&&(item.material == that.materialrow.id)) {
|
||||
that.$message.warning("该物料已存在");
|
||||
}
|
||||
});
|
||||
},
|
||||
defectrowChange(){
|
||||
let that = this;
|
||||
console.log('that.qctdefectlist',that.qctdefectlist);
|
||||
that.qctdefectlist.forEach((item) => {
|
||||
if (item.defect&&(item.defect == that.defectrow.id)) {
|
||||
that.$message.warning("该缺陷项已存在");
|
||||
}
|
||||
});
|
||||
},
|
||||
testitemrowChange(){
|
||||
let that = this;
|
||||
console.log('that.qcttestitemlist',that.qcttestitemlist);
|
||||
that.qcttestitemlist.forEach((item) => {
|
||||
if (item.testitem&&item.testitem == that.testitemrow.id) {
|
||||
that.$message.warning("该检测项已存在");
|
||||
}
|
||||
});
|
||||
},
|
||||
//编辑
|
||||
check_edit(row) {
|
||||
this.mioitemId = row.id;
|
||||
|
|
Loading…
Reference in New Issue