|
|
@ -272,11 +272,29 @@ const props = defineProps({ |
|
|
|
required: false, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
// 子列表 新增 编辑 删除的展示与隐藏,默认展示 |
|
|
|
detailButtonIsShow:{ |
|
|
|
// 子列表 筛选 展示与隐藏 ,默认展示 |
|
|
|
detailButtonIsShowFilter:{ |
|
|
|
type: Boolean, |
|
|
|
required: false, |
|
|
|
default: false |
|
|
|
default: true |
|
|
|
}, |
|
|
|
// 子列表 新增 展示与隐藏 ,默认展示 |
|
|
|
detailButtonIsShowAdd:{ |
|
|
|
type: Boolean, |
|
|
|
required: false, |
|
|
|
default: true |
|
|
|
}, |
|
|
|
// 子列表 编辑 展示与隐藏 ,默认展示 |
|
|
|
detailButtonIsShowEdit:{ |
|
|
|
type: Boolean, |
|
|
|
required: false, |
|
|
|
default: true |
|
|
|
}, |
|
|
|
// 子列表 删除 展示与隐藏 ,默认展示 |
|
|
|
detailButtonIsShowDelete:{ |
|
|
|
type: Boolean, |
|
|
|
required: false, |
|
|
|
default: true |
|
|
|
} |
|
|
|
}) |
|
|
|
const isShowDrawer = ref(false) |
|
|
@ -388,81 +406,52 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
|
getRemarkList() |
|
|
|
getFileList() |
|
|
|
getChangeRecordList() |
|
|
|
// 判断详情新增按钮是否显示 |
|
|
|
// 判断详情按钮是否显示 |
|
|
|
let detailButtonFilter: any = [] |
|
|
|
let detailButtonAdd: any = [] |
|
|
|
if (props.detailButtonIsShowFilter) { |
|
|
|
// 筛选 |
|
|
|
detailButtonFilter = [ |
|
|
|
defaultButtons.defaultFilterBtn(null) |
|
|
|
] |
|
|
|
} |
|
|
|
if (props.detailButtonIsShowAdd) { |
|
|
|
// 新增 |
|
|
|
detailButtonAdd = [ |
|
|
|
defaultButtons.defaultAddBtn({ |
|
|
|
hide: isShowMainButton(row, ['1']) |
|
|
|
}) |
|
|
|
] |
|
|
|
} |
|
|
|
HeadButttondata.value = [...detailButtonFilter,...detailButtonAdd] |
|
|
|
|
|
|
|
// 针对特殊处理 当业务是任务的 只显示筛选 正常情况下应在业务页面设置 后期再作优化 |
|
|
|
if (routeName.value.indexOf('Job') > -1) { |
|
|
|
HeadButttondata.value = [ |
|
|
|
defaultButtons.defaultFilterBtn(null) // 筛选 |
|
|
|
] |
|
|
|
} else { |
|
|
|
if(!props.detailButtonIsShow){ |
|
|
|
HeadButttondata.value = [ |
|
|
|
defaultButtons.defaultAddBtn({ |
|
|
|
hide: isShowMainButton(row, ['1']) |
|
|
|
}), // 新增 |
|
|
|
defaultButtons.defaultFilterBtn(null) // 筛选 |
|
|
|
] |
|
|
|
} |
|
|
|
//盘点计划详情筛选 |
|
|
|
if (props.fromeWhere == 'countPlan') { |
|
|
|
HeadButttondata.value = [ |
|
|
|
defaultButtons.defaultAddBtn({ |
|
|
|
hide: isShowMainButton(row, ['1']) |
|
|
|
}) // 新增 |
|
|
|
] |
|
|
|
} |
|
|
|
//盘点计划详情筛选 |
|
|
|
if (props.fromeWhere == 'putawayRequest') { |
|
|
|
HeadButttondata.value = [ |
|
|
|
defaultButtons.defaultFilterBtn(null) // 筛选 |
|
|
|
] |
|
|
|
} |
|
|
|
//盘点调整申请筛选 |
|
|
|
if (props.fromeWhere == 'countadjustRequest') { |
|
|
|
HeadButttondata.value = [ |
|
|
|
defaultButtons.defaultFilterBtn(null) // 筛选 |
|
|
|
] |
|
|
|
} |
|
|
|
//采购收货详情筛选 |
|
|
|
if (props.fromeWhere == 'purchasereceipt') { |
|
|
|
HeadButttondata.value = [ |
|
|
|
defaultButtons.defaultFilterBtn(null) // 筛选 |
|
|
|
] |
|
|
|
} |
|
|
|
//客户收货详情筛选 |
|
|
|
if (props.fromeWhere == 'customerreceipt') { |
|
|
|
HeadButttondata.value = [ |
|
|
|
defaultButtons.defaultFilterBtn(null) // 筛选 |
|
|
|
] |
|
|
|
} |
|
|
|
//发货申请详情筛选 |
|
|
|
if (props.fromeWhere == 'DeliverRequestMain') { |
|
|
|
HeadButttondata.value = [ |
|
|
|
defaultButtons.defaultFilterBtn(null) // 筛选 |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 动态显示操作列按钮 |
|
|
|
if(!props.detailButtonIsShow){ |
|
|
|
buttondata.value = [...[ |
|
|
|
let detailButtonEdit: any = [] |
|
|
|
let detailButtonDelete: any = [] |
|
|
|
if (props.detailButtonIsShowEdit) { |
|
|
|
// 编辑 |
|
|
|
detailButtonEdit = [ |
|
|
|
defaultButtons.mainListEditBtn({ |
|
|
|
hide: isShowMainButton(row, ['1']) |
|
|
|
}), // 编辑 |
|
|
|
}) |
|
|
|
] |
|
|
|
} |
|
|
|
if (props.detailButtonIsShowDelete) { |
|
|
|
// 删除 |
|
|
|
detailButtonDelete = [ |
|
|
|
defaultButtons.mainListDeleteBtn({ |
|
|
|
hide: isShowMainButton(row, ['1']) |
|
|
|
})], // 删除 |
|
|
|
...props.buttondataTable |
|
|
|
}) |
|
|
|
] |
|
|
|
} |
|
|
|
//发货申请详情筛选 |
|
|
|
if (props.fromeWhere == 'DeliverRequestMain') { |
|
|
|
buttondata.value = [...[ |
|
|
|
defaultButtons.mainListEditBtn({ |
|
|
|
hide: isShowMainButton(row, ["1"]) |
|
|
|
})], // 编辑 |
|
|
|
...props.buttondataTable |
|
|
|
] |
|
|
|
} |
|
|
|
buttondata.value = [...detailButtonEdit,...detailButtonDelete,...props.buttondataTable] |
|
|
|
|
|
|
|
} finally { |
|
|
|
detailLoading.value = false |
|
|
|
} |
|
|
|