|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search :schema="CustomersettleRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
<Search :schema="[...CustomersettleRequestMain.allSchemas.searchSchema,...CustomersettleRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
@ -12,6 +12,7 @@ |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="CustomersettleRequestMain.allSchemas" |
|
|
|
:detailAllSchemas="CustomersettleRequestDetail.allSchemas" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
@ -32,8 +33,8 @@ |
|
|
|
<span>{{ row.number }}</span> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row }"> |
|
|
|
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
<template #action="{ row,$index }"> |
|
|
|
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
</ContentWrap> |
|
|
@ -96,7 +97,7 @@ const { t } = useI18n() // 国际化 |
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(CustomersettleRequestMain.allSchemas.tableColumns) |
|
|
|
const tableColumns = ref([...CustomersettleRequestMain.allSchemas.tableColumns,...CustomersettleRequestDetail.allSchemas.tableMainColumns]) |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
@ -205,7 +206,11 @@ const isShowMainButton = (row,val) => { |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
const butttondata = (row,$index) => { |
|
|
|
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|
|
|
if(findIndex>0&&findIndex<$index){ |
|
|
|
return [] |
|
|
|
} |
|
|
|
return [ |
|
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:customersettle-request-main:close'}), // 关闭 |
|
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:customersettle-request-main:reAdd'}), //重新添加 |
|
|
@ -224,7 +229,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'mainClose') { // 关闭 |
|
|
|
await message.confirm('确认要关闭吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CustomersettleRequestMainApi.close(row.id).then(() => { |
|
|
|
CustomersettleRequestMainApi.close(row.masterId).then(() => { |
|
|
|
tableObject.loading = false |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
@ -234,7 +239,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
}) } else if (val == 'mainReAdd') { // 重新添加 |
|
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CustomersettleRequestMainApi.reAdd(row.id).then(() => { |
|
|
|
CustomersettleRequestMainApi.reAdd(row.masterId).then(() => { |
|
|
|
tableObject.loading = false |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
@ -245,7 +250,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
|
await message.confirm('确认要提交审批吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CustomersettleRequestMainApi.submit(row.id).then(() => { |
|
|
|
CustomersettleRequestMainApi.submit(row.masterId).then(() => { |
|
|
|
tableObject.loading = false |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
@ -256,7 +261,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CustomersettleRequestMainApi.refused(row.id).then(() => { |
|
|
|
CustomersettleRequestMainApi.refused(row.masterId).then(() => { |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
@ -264,7 +269,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
}) |
|
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
|
tableObject.loading = true |
|
|
|
CustomersettleRequestMainApi.agree(row.id).then(() => { |
|
|
|
CustomersettleRequestMainApi.agree(row.masterId).then(() => { |
|
|
|
tableObject.loading = false |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
@ -274,7 +279,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
}) |
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
tableObject.loading = true |
|
|
|
CustomersettleRequestMainApi.handle(row.id).then(() => { |
|
|
|
CustomersettleRequestMainApi.handle(row.masterId).then(() => { |
|
|
|
tableObject.loading = false |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
@ -285,7 +290,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
handleDelete(row.masterId) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|