|
@@ -61,6 +61,17 @@
|
|
|
:data="data2"
|
|
|
:option="option2"
|
|
|
>
|
|
|
+ <template #processInfo="{row,index,type}">
|
|
|
+ <el-select v-model="value" placeholder="请选择" @click="getFaults(row)" @change="listData(row)">
|
|
|
+ <el-option
|
|
|
+ v-for="item in optionFault"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.operationName"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
</div>
|
|
|
<div style="overflow: hidden">
|
|
@@ -77,7 +88,7 @@
|
|
|
import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
|
import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
|
|
|
const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
|
- import {getFault,getFaultDetails,getSeqNoList} from "@/api/fault"
|
|
|
+ import {getFault,getFaultDetails,getSeqNoList,getProcessInfoList,rework} from "@/api/fault"
|
|
|
import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
|
// 数据字典相关
|
|
|
const { dicts } = useDictionaryStoreHook();
|
|
@@ -125,6 +136,7 @@
|
|
|
const formData=ref({});
|
|
|
const formFault=ref({});
|
|
|
const faultDetails=ref(null);
|
|
|
+ const postDetail=ref([]);
|
|
|
onMounted(() => {
|
|
|
// console.log("crudRef", crudRef)
|
|
|
search.value.escalationFaultId=props.faultId;
|
|
@@ -149,32 +161,49 @@
|
|
|
data2.value=data.data;
|
|
|
for(let i=0;i<data2.value.length;i++){
|
|
|
data2.value[i].$cellEdit=true;
|
|
|
- console.info(data2);
|
|
|
+ postDetail.value[i].seqNo=data2.value[i].seqNo;
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
+const listData=(row)=>{
|
|
|
+ for(let i=0;i<postDetail.value.length;i++){
|
|
|
+ if(postDetail.value[i].seqNo===row.seqNo){
|
|
|
+ postDetail.value[i].processId=value.value.id;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
const faultHandle=ref({});
|
|
|
const onHandle=()=>{
|
|
|
- faultHandle.value.id=faultDetails.value.id;
|
|
|
- faultHandle.value.disposalMeasures=radio1.value;
|
|
|
- faultHandle.value.trackingNumber=form.value.trackingNumber;
|
|
|
- /*handleEscalationFault(faultHandle.value).then((data)=>{
|
|
|
- if(data.code==="200") {
|
|
|
+ for(let i=0;i<postDetail.value.length;i++){
|
|
|
+ if(null===postDetail.value[i].processId){
|
|
|
ElMessage({
|
|
|
- message: data.msg,
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- props.dia.visible=false;
|
|
|
- }
|
|
|
- else {
|
|
|
- ElMessage({
|
|
|
- message: data.msg,
|
|
|
+ message:postDetail.value[i].seqNo+"没选择返工工序",
|
|
|
type: "error",
|
|
|
});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ rework(postDetail.value).then(
|
|
|
+ (data)=> {
|
|
|
+ if (data.code === "200") {
|
|
|
+ ElMessage({
|
|
|
+ message: data.msg,
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ props.dia.visible = false;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ ElMessage({
|
|
|
+ message: data.msg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- });*/
|
|
|
+ )
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -185,6 +214,7 @@ const faultHandle=ref({});
|
|
|
delBtn:false,
|
|
|
viewBtn:false,
|
|
|
menu:false,
|
|
|
+
|
|
|
column: [
|
|
|
{
|
|
|
label: "缺陷大类",
|
|
@@ -198,7 +228,17 @@ const faultHandle=ref({});
|
|
|
},
|
|
|
],
|
|
|
});
|
|
|
+ const optionFault=ref([]);
|
|
|
+ const getFaults=(row)=>{
|
|
|
+ console.log("row",row);
|
|
|
+ getProcessInfoList(row.seqNo).then(
|
|
|
+ (data)=>{
|
|
|
+ optionFault.value=data.data;
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
const option2=ref(null);
|
|
|
+ const value=ref(null);
|
|
|
// 设置表格列或者其他自定义的option
|
|
|
option2.value = {
|
|
|
addBtn: false,
|
|
@@ -208,29 +248,25 @@ const faultHandle=ref({});
|
|
|
submitBtn:false,
|
|
|
emptyBtn:false,
|
|
|
menu:false,
|
|
|
+ slot:true,
|
|
|
column: [
|
|
|
{
|
|
|
label: "跟踪卡号",
|
|
|
prop: "seqNo",
|
|
|
labelWidth:130,
|
|
|
-
|
|
|
},
|
|
|
{
|
|
|
label: "返工工序",
|
|
|
- prop: "optionId",
|
|
|
+ prop: "processInfo",
|
|
|
labelWidth:130,
|
|
|
type:"select",
|
|
|
- dicUrl: import.meta.env.VITE_APP_BASE_API+`/api/v1/process/info/list?seqNo={{seqNo}}`,
|
|
|
- slot:true,
|
|
|
- cell: true,
|
|
|
-
|
|
|
},
|
|
|
|
|
|
],
|
|
|
};
|
|
|
const cancelWindow=()=>{
|
|
|
console.info(props);
|
|
|
- props.dia.visible=false;
|
|
|
+ props.dial.visible=false;
|
|
|
}
|
|
|
|
|
|
</script>
|