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