|
|
@ -60,6 +60,7 @@ |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import AddForm from './addForm.vue' |
|
|
|
import Detail from './detail.vue' |
|
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
|
|
|
|
|
// 采购订单 |
|
|
|
defineOptions({ name: 'InspectionRecordMain' }) |
|
|
@ -131,6 +132,11 @@ |
|
|
|
} |
|
|
|
|
|
|
|
const listTableRef = ref() |
|
|
|
const useDecisionList = getStrDictOptions(DICT_TYPE.USAGE_DECISION) |
|
|
|
console.log(11,useDecisionList) |
|
|
|
// console.log(55,InspectionRecordMain.allSchemas.formSchema) |
|
|
|
// const useDecisionList = InspectionRecordMain.allSchemas.formSchema.filter(item=>item.field == "useDecision") |
|
|
|
// console.log(11,useDecisionList) |
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'applyDecision') { // 编辑 |
|
|
@ -138,13 +144,14 @@ |
|
|
|
if(row.estimateCode == 1){ |
|
|
|
InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) =>{ |
|
|
|
if(itemColumn.field == "useDecision"){ |
|
|
|
itemColumn.componentProps.options=itemColumn.componentProps.options?.filter(item=>item.value==1) |
|
|
|
itemColumn.componentProps.options=useDecisionList?.filter(item=>item.value==1) |
|
|
|
console.log(88, useDecisionList) |
|
|
|
} |
|
|
|
}) |
|
|
|
}else if(row.estimateCode == 2){ |
|
|
|
InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) =>{ |
|
|
|
if(itemColumn.field == "useDecision"){ |
|
|
|
itemColumn.componentProps.options=itemColumn.componentProps.options?.filter(item=>item.value!=1) |
|
|
|
itemColumn.componentProps.options=useDecisionList?.filter(item=>item.value!=1) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|