|
@@ -62,9 +62,9 @@
|
|
|
:option="option2"
|
|
|
>
|
|
|
<template #processInfo="{row,index,type}">
|
|
|
- <el-select v-model="value" placeholder="请选择" @click="getFaults(row)" @change="listData(row)">
|
|
|
+ <el-select v-model="value[row.$index]" placeholder="请选择" @click="getFaults(row)" @change="listData(row)">
|
|
|
<el-option
|
|
|
- v-for="item in optionFault"
|
|
|
+ v-for="item in optionFault[row.$index]"
|
|
|
:key="item.value"
|
|
|
:label="item.operationName"
|
|
|
:value="item.id"
|
|
@@ -109,7 +109,13 @@
|
|
|
default:()=>{
|
|
|
return {};
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ workOrderCode: {
|
|
|
+ type: String,
|
|
|
+ default: () => {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ },
|
|
|
})
|
|
|
|
|
|
// 传入一个url,后面不带/
|
|
@@ -169,11 +175,10 @@
|
|
|
});
|
|
|
|
|
|
const listData=(row)=>{
|
|
|
- for(let i=0;i<postDetail.value.length;i++){
|
|
|
- if(postDetail.value[i].seqNo===row.seqNo){
|
|
|
- postDetail.value[i].reworkProcessId=value.value;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ postDetail.value[row.$index].reworkProcessId=value.value[row.$index];
|
|
|
+ postDetail.value[row.$index].workOrderCode=props.workOrderCode;
|
|
|
+
|
|
|
}
|
|
|
const faultHandle=ref({});
|
|
|
const onHandle=()=>{
|
|
@@ -186,14 +191,16 @@ const faultHandle=ref({});
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- rework(postDetail.value).then(
|
|
|
+ faultHandle.value.reworkList=Array.from(postDetail.value);
|
|
|
+ faultHandle.value.faultId=props.faultId;
|
|
|
+ rework(faultHandle.value).then(
|
|
|
(data)=> {
|
|
|
if (data.code === "200") {
|
|
|
ElMessage({
|
|
|
message: data.msg,
|
|
|
type: "success",
|
|
|
});
|
|
|
- props.dia.visible = false;
|
|
|
+ props.dial.visible = false;
|
|
|
}
|
|
|
else {
|
|
|
ElMessage({
|
|
@@ -229,16 +236,20 @@ const faultHandle=ref({});
|
|
|
],
|
|
|
});
|
|
|
const optionFault=ref([]);
|
|
|
+ const processFault=ref({});
|
|
|
const getFaults=(row)=>{
|
|
|
- console.log("row",row);
|
|
|
- getProcessInfoList(row.seqNo).then(
|
|
|
+
|
|
|
+ processFault.value.seqNo=row.seqNo;
|
|
|
+ processFault.value.workOrderCode=props.workOrderCode;
|
|
|
+ getProcessInfoList(processFault.value).then(
|
|
|
(data)=>{
|
|
|
- optionFault.value=data.data;
|
|
|
+ optionFault.value[row.$index]=data.data;
|
|
|
}
|
|
|
)
|
|
|
}
|
|
|
const option2=ref(null);
|
|
|
- const value=ref(null);
|
|
|
+ const value=ref([]);
|
|
|
+
|
|
|
// 设置表格列或者其他自定义的option
|
|
|
option2.value = {
|
|
|
addBtn: false,
|
|
@@ -265,7 +276,6 @@ const faultHandle=ref({});
|
|
|
],
|
|
|
};
|
|
|
const cancelWindow=()=>{
|
|
|
- console.info(props);
|
|
|
props.dial.visible=false;
|
|
|
}
|
|
|
|