|
|
@ -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({ |
|
|
@ -166,10 +166,10 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
const searchParams = (model) => { |
|
|
|
if (route.name == 'inspectionRecordProduction') { |
|
|
|
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,31 +235,39 @@ const isShowPackageBtn = (row, val) => { |
|
|
|
} |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // 完成 |
|
|
|
if(route.name == 'InspectRecordMain'){ |
|
|
|
return [ |
|
|
|
defaultButtons.mainListPlanCheckQualityReportBtn({}), // 查看质检报告 |
|
|
|
defaultButtons.mainListSupplierResumeBtn({}) // 查看履历表 |
|
|
|
] |
|
|
|
}else { |
|
|
|
return [ |
|
|
|
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // 完成 |
|
|
|
|
|
|
|
defaultButtons.mainApplyDecisionBtn({ |
|
|
|
// hide: isShowMainButton(row, null), |
|
|
|
hasPermi: 'qms:inspection-recode-main:edit' |
|
|
|
}), // 使用决策 |
|
|
|
// defaultButtons.mainListDeleteBtn(null), // 删除 |
|
|
|
defaultButtons.mainListOrderPubBtn({ |
|
|
|
hide: isShowMainButton(row, 'publish'), |
|
|
|
hasPermi: 'qms:inspection-recode-main:pub' |
|
|
|
}), // 发布 |
|
|
|
defaultButtons.mainListCloseBtn({ |
|
|
|
hide: isShowMainButton(row, 'publish'), |
|
|
|
hasPermi: 'qms:inspection-recode-main:close' |
|
|
|
}), // 关闭 |
|
|
|
defaultButtons.mainListPackageBtn({ hide: isShowPackageBtn(row, ['11']) }), // 包装 |
|
|
|
// defaultButtons.mainListJobExeBtn({ |
|
|
|
// hide:row.useDecision, |
|
|
|
// hasPermi: 'qms:inspection-recode-main:execute', |
|
|
|
// }), // 执行 |
|
|
|
defaultButtons.mainListEditBtn({ hide: isShowEditBtn(row, ['11']) }), // 编辑 |
|
|
|
defaultButtons.mainListPlanCheckQualityReportBtn({}), // 查看质检报告 |
|
|
|
defaultButtons.mainListSupplierResumeBtn({}) // 查看履历表 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
defaultButtons.mainApplyDecisionBtn({ |
|
|
|
// hide: isShowMainButton(row, null), |
|
|
|
hasPermi: 'qms:inspection-recode-main:edit' |
|
|
|
}), // 使用决策 |
|
|
|
// defaultButtons.mainListDeleteBtn(null), // 删除 |
|
|
|
defaultButtons.mainListOrderPubBtn({ |
|
|
|
hide: isShowMainButton(row, 'publish'), |
|
|
|
hasPermi: 'qms:inspection-recode-main:pub' |
|
|
|
}), // 发布 |
|
|
|
defaultButtons.mainListCloseBtn({ |
|
|
|
hide: isShowMainButton(row, 'publish'), |
|
|
|
hasPermi: 'qms:inspection-recode-main:close' |
|
|
|
}), // 关闭 |
|
|
|
defaultButtons.mainListPackageBtn({ hide: isShowPackageBtn(row, ['11']) }), // 包装 |
|
|
|
// defaultButtons.mainListJobExeBtn({ |
|
|
|
// hide:row.useDecision, |
|
|
|
// hasPermi: 'qms:inspection-recode-main:execute', |
|
|
|
// }), // 执行 |
|
|
|
defaultButtons.mainListEditBtn({ hide: isShowEditBtn(row, ['11']) }), // 编辑 |
|
|
|
defaultButtons.mainListPlanCheckQualityReportBtn({}), // 查看质检报告 |
|
|
|
defaultButtons.mainListSupplierResumeBtn({}) // 查看履历表 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
const listTableRef = ref() |
|
|
@ -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' |
|
|
|