fix:检验表更新
This commit is contained in:
parent
0038ca830b
commit
511740f0de
|
|
@ -46,27 +46,17 @@
|
||||||
@change="materialrowChange"
|
@change="materialrowChange"
|
||||||
>
|
>
|
||||||
<el-table-column label="物料名称" prop="full_name"></el-table-column>
|
<el-table-column label="物料名称" prop="full_name"></el-table-column>
|
||||||
<!-- <el-table-column label="工序" prop="process_name"></el-table-column>
|
|
||||||
<el-table-column label="规格" prop="specification"></el-table-column> -->
|
|
||||||
</xtSelect>
|
</xtSelect>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="time" label="追溯层级">
|
<el-table-column label="用于输入">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="!scope.row.isEdit">{{ tracing_[scope.row.tracing] }}</span>
|
<el-switch :disabled="!scope.row.isEdit" v-model="scope.row.use_for_in" active-color="#13ce66" inactive-color="#666666"></el-switch>
|
||||||
<el-select
|
</template>
|
||||||
v-else
|
</el-table-column>
|
||||||
v-model="scope.row.tracing"
|
<el-table-column label="用于输出">
|
||||||
filterable
|
<template #default="scope">
|
||||||
placeholder="请选择追溯层级"
|
<el-switch :disabled="!scope.row.isEdit" v-model="scope.row.use_for_out" active-color="#13ce66" inactive-color="#666666"></el-switch>
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in tracingOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="open" label="操作" width="125" align="center">
|
<el-table-column prop="open" label="操作" width="125" align="center">
|
||||||
|
|
@ -133,6 +123,12 @@
|
||||||
</xtSelect>
|
</xtSelect>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="addto_wpr" label="类型">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="!scope.row.isEdit" :type="scope.row.testitem_type == 20 ? 'success' : 'primary'">{{ scope.row.testitem_type == 20 ? '操作项':'检测项' }}</el-tag>
|
||||||
|
<el-tag v-else :type="testitemrow.type == 20 ? 'success' : 'primary'">{{ scope.row.type == 20 ? '操作项':'检测项' }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="addto_wpr" label="加入物料信息">
|
<el-table-column prop="addto_wpr" label="加入物料信息">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
|
|
@ -301,18 +297,11 @@ export default {
|
||||||
"process":"过程检验",
|
"process":"过程检验",
|
||||||
"performance":"性能检验"
|
"performance":"性能检验"
|
||||||
},
|
},
|
||||||
tracing_:{
|
|
||||||
"test":"检测项",
|
|
||||||
"defect":"缺陷项",
|
|
||||||
},
|
|
||||||
tracingOptions:[
|
|
||||||
{value:'test',label:'检测项'},
|
|
||||||
{value:'defect',label:'缺陷项'},
|
|
||||||
],
|
|
||||||
mataddTemplate:{
|
mataddTemplate:{
|
||||||
tracing: "",
|
|
||||||
qct: this.qctId,
|
qct: this.qctId,
|
||||||
material: "",
|
material: "",
|
||||||
|
use_for_in:false,
|
||||||
|
use_for_out:false,
|
||||||
isEdit: true,
|
isEdit: true,
|
||||||
},
|
},
|
||||||
defectaddTemplate:{
|
defectaddTemplate:{
|
||||||
|
|
@ -525,25 +514,23 @@ export default {
|
||||||
materialrowChange(){
|
materialrowChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.qctmatlist.forEach((item) => {
|
that.qctmatlist.forEach((item) => {
|
||||||
if (item.material&&(item.material == that.materialrow.id)) {
|
if (item.id&&(item.material == that.materialrow.id)) {
|
||||||
that.$message.warning("该物料已存在");
|
that.$message.warning("该物料已存在");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
defectrowChange(){
|
defectrowChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log('that.qctdefectlist',that.qctdefectlist);
|
|
||||||
that.qctdefectlist.forEach((item) => {
|
that.qctdefectlist.forEach((item) => {
|
||||||
if (item.defect&&(item.defect == that.defectrow.id)) {
|
if (item.id&&(item.defect == that.defectrow.id)) {
|
||||||
that.$message.warning("该缺陷项已存在");
|
that.$message.warning("该缺陷项已存在");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
testitemrowChange(){
|
testitemrowChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log('that.qcttestitemlist',that.qcttestitemlist);
|
|
||||||
that.qcttestitemlist.forEach((item) => {
|
that.qcttestitemlist.forEach((item) => {
|
||||||
if (item.testitem&&item.testitem == that.testitemrow.id) {
|
if (item.id&&item.testitem == that.testitemrow.id) {
|
||||||
that.$message.warning("该检测项已存在");
|
that.$message.warning("该检测项已存在");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue