|
@@ -63,6 +63,9 @@
|
|
|
:data="data2"
|
|
|
:option="option2"
|
|
|
>
|
|
|
+ <template #isScrap="{row,index,type}">
|
|
|
+ <el-checkbox v-model="row.isScrap" label="报废" size="small" value=true border @click="checkScrap(row)"/>
|
|
|
+ </template>
|
|
|
<template #processInfo="{row,index,type}">
|
|
|
<el-select v-model="value[row.$index]" placeholder="请选择" @click="getFaults(row)" @change="listData(row)">
|
|
|
<el-option
|
|
@@ -191,12 +194,14 @@ const listData=(row)=>{
|
|
|
const faultHandle=ref({});
|
|
|
const onHandle=()=>{
|
|
|
for(let i=0;i<postDetail.value.length;i++){
|
|
|
- if(undefined===postDetail.value[i].reworkProcessId){
|
|
|
- ElMessage({
|
|
|
- message:postDetail.value[i].seqNo+"没选择返工工序",
|
|
|
- type: "error",
|
|
|
- });
|
|
|
- return;
|
|
|
+ if(!postDetail.value[i].isScrap){
|
|
|
+ if(undefined===postDetail.value[i].reworkProcessId){
|
|
|
+ ElMessage({
|
|
|
+ message:postDetail.value[i].seqNo+"没选择返工工序",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
faultHandle.value.reworkList=Array.from(postDetail.value);
|
|
@@ -246,7 +251,6 @@ const faultHandle=ref({});
|
|
|
const optionFault=ref([]);
|
|
|
const processFault=ref({});
|
|
|
const getFaults=(row)=>{
|
|
|
-
|
|
|
processFault.value.seqNo=row.seqNo;
|
|
|
processFault.value.workOrderCode=props.workOrderCode;
|
|
|
getProcessInfoList(processFault.value).then(
|
|
@@ -255,6 +259,14 @@ const faultHandle=ref({});
|
|
|
}
|
|
|
)
|
|
|
}
|
|
|
+ const checkScrap= (row)=>{
|
|
|
+ if(row.isScrap){
|
|
|
+ row.enabled = false
|
|
|
+ }else{
|
|
|
+ row.enabled = true
|
|
|
+ }
|
|
|
+ row.reworkProcessId = undefined
|
|
|
+ }
|
|
|
const option2=ref(null);
|
|
|
const value=ref([]);
|
|
|
|
|
@@ -272,15 +284,16 @@ const faultHandle=ref({});
|
|
|
{
|
|
|
label: "跟踪卡号",
|
|
|
prop: "seqNo",
|
|
|
- labelWidth:130,
|
|
|
},
|
|
|
{
|
|
|
label: "返工工序",
|
|
|
prop: "processInfo",
|
|
|
- labelWidth:130,
|
|
|
type:"select",
|
|
|
},
|
|
|
-
|
|
|
+ {
|
|
|
+ label: "是否报废",
|
|
|
+ prop: "isScrap",
|
|
|
+ },
|
|
|
],
|
|
|
};
|
|
|
const cancelWindow=()=>{
|