|
|
@ -141,21 +141,21 @@ const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(InspectionRecordMain.allSchemas.tableColumns) |
|
|
|
if (routeName.value == 'InspectRecordMain') { |
|
|
|
tableColumns.value = tableColumns.value.filter((item) => { |
|
|
|
return item.label != '操作' |
|
|
|
}) |
|
|
|
} |
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
if (routeName.value == 'InspectRecordMain') { |
|
|
|
tableColumns.value = val.filter((item) => { |
|
|
|
return item.label != '操作' |
|
|
|
}) |
|
|
|
} else { |
|
|
|
tableColumns.value = val |
|
|
|
} |
|
|
|
} |
|
|
|
// if (routeName.value == 'InspectRecordMain') { |
|
|
|
// tableColumns.value = tableColumns.value.filter((item) => { |
|
|
|
// return item.label != '操作' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
//// 字段设置 更新主列表字段 |
|
|
|
// const updataTableColumns = (val) => { |
|
|
|
// if (routeName.value == 'InspectRecordMain') { |
|
|
|
// tableColumns.value = val.filter((item) => { |
|
|
|
// return item.label != '操作' |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// tableColumns.value = val |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
// 子表新增的时候选择表格之后需要会显得字段 |
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
@ -169,7 +169,7 @@ const searchParams = (model) => { |
|
|
|
if (route.name == 'inspectionRecordProduction' ) { |
|
|
|
model.available = 'TRUE' |
|
|
|
model.inspectionType = '4' |
|
|
|
} else if (route.name == 'inspectionRecordPurchase') { |
|
|
|
} else if (route.name == 'inspectionRecordPurchase' || route.name == 'InspectRecordMain') { |
|
|
|
model.available = 'TRUE' |
|
|
|
model.inspectionType = '1' |
|
|
|
} else { |
|
|
@ -235,6 +235,12 @@ const isShowPackageBtn = (row, val) => { |
|
|
|
} |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
if(route.name == 'InspectRecordMain'){ |
|
|
|
return [ |
|
|
|
defaultButtons.mainListPlanCheckQualityReportBtn({}), // 查看质检报告 |
|
|
|
defaultButtons.mainListSupplierResumeBtn({}) // 查看履历表 |
|
|
|
] |
|
|
|
}else { |
|
|
|
return [ |
|
|
|
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // 完成 |
|
|
|
|
|
|
@ -262,6 +268,8 @@ const butttondata = (row) => { |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const listTableRef = ref() |
|
|
|
const list = ref([]) |
|
|
|
const useDecisionList = getStrDictOptions(DICT_TYPE.USAGE_DECISION) |
|
|
@ -471,7 +479,7 @@ const submitFormExecute = async (formType, data) => { |
|
|
|
const searchFormClick = (searchData) => { |
|
|
|
let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType') |
|
|
|
if (!isHave) { |
|
|
|
if (route.name == 'inspectionRecordPurchase') { |
|
|
|
if (route.name == 'inspectionRecordPurchase' || route.name == 'InspectRecordMain') { |
|
|
|
searchData.filters.push( |
|
|
|
{ |
|
|
|
action: '==', |
|
|
@ -514,7 +522,7 @@ const searchFormClick = (searchData) => { |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
if (route.name == 'inspectionRecordPurchase') { |
|
|
|
if (route.name == 'inspectionRecordPurchase' || route.name == 'InspectRecordMain') { |
|
|
|
tableObject.params = { |
|
|
|
available: true, |
|
|
|
inspectionType: '1' |
|
|
|