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