Browse Source

HL-6133 检验记录菜单调整,操作列只展示查看质检报告和查看履历表

hella_online_20240927
tengxiaofei 2 months ago
parent
commit
19a4306664
  1. 94
      src/views/qms/inspectionRecord/index.vue

94
src/views/qms/inspectionRecord/index.vue

@ -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'

Loading…
Cancel
Save