|
@ -1,7 +1,7 @@ |
|
|
<template> |
|
|
<template> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<!-- 搜索工作栏 --> |
|
|
<!-- 搜索工作栏 --> |
|
|
<Search :schema="DeliverPlanMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
<Search :schema="[...DeliverPlanMain.allSchemas.searchSchema,...DeliverPlanDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
@ -12,6 +12,7 @@ |
|
|
@updataTableColumns="updataTableColumns" |
|
|
@updataTableColumns="updataTableColumns" |
|
|
@searchFormClick="searchFormClick" |
|
|
@searchFormClick="searchFormClick" |
|
|
:allSchemas="DeliverPlanMain.allSchemas" |
|
|
:allSchemas="DeliverPlanMain.allSchemas" |
|
|
|
|
|
:detailAllSchemas="DeliverPlanDetail.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> |
|
@ -92,7 +93,7 @@ const route = useRoute() // 路由信息 |
|
|
const routeName = ref() |
|
|
const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const customerCode = ref() |
|
|
const customerCode = ref() |
|
|
const tableColumns = ref(DeliverPlanMain.allSchemas.tableColumns) |
|
|
const tableColumns = ref([...DeliverPlanMain.allSchemas.tableColumns,...DeliverPlanDetail.allSchemas.tableMainColumns]) |
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
@ -209,7 +210,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.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:deliver-plan-main:open'}), // 打开 |
|
|
defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:deliver-plan-main:open'}), // 打开 |
|
|
defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:deliver-plan-main:close'}), // 关闭 |
|
|
defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:deliver-plan-main:close'}), // 关闭 |
|
@ -226,7 +231,7 @@ const butttondata = (row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainPlanOpe') { // 打开 |
|
|
if (val == 'mainPlanOpe') { // 打开 |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
DeliverPlanMainApi.open(row.id).then(() => { |
|
|
DeliverPlanMainApi.open(row.masterId).then(() => { |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
@ -237,7 +242,7 @@ const buttonTableClick = async (val, row) => { |
|
|
} else if (val == 'mainPlanClo') { // 关闭 |
|
|
} else if (val == 'mainPlanClo') { // 关闭 |
|
|
await message.confirm('确认要关闭吗?') |
|
|
await message.confirm('确认要关闭吗?') |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
DeliverPlanMainApi.close(row.id).then(() => { |
|
|
DeliverPlanMainApi.close(row.masterId).then(() => { |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
@ -248,7 +253,7 @@ const buttonTableClick = async (val, row) => { |
|
|
} else if (val == 'mainPlanSub') { // 提交审批 |
|
|
} else if (val == 'mainPlanSub') { // 提交审批 |
|
|
await message.confirm('确认要提交审批吗?') |
|
|
await message.confirm('确认要提交审批吗?') |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
DeliverPlanMainApi.submit(row.id).then(() => { |
|
|
DeliverPlanMainApi.submit(row.masterId).then(() => { |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
@ -259,7 +264,7 @@ const buttonTableClick = async (val, row) => { |
|
|
} else if (val == 'mainPlanTur') { // 驳回 |
|
|
} else if (val == 'mainPlanTur') { // 驳回 |
|
|
await message.confirm('确认要驳回吗?') |
|
|
await message.confirm('确认要驳回吗?') |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
DeliverPlanMainApi.reject(row.id).then(() => { |
|
|
DeliverPlanMainApi.reject(row.masterId).then(() => { |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
@ -270,7 +275,7 @@ const buttonTableClick = async (val, row) => { |
|
|
} else if (val == 'mainPlanApp') { // 审批通过 |
|
|
} else if (val == 'mainPlanApp') { // 审批通过 |
|
|
await message.confirm('确认要审批通过吗?') |
|
|
await message.confirm('确认要审批通过吗?') |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
DeliverPlanMainApi.agree(row.id).then(() => { |
|
|
DeliverPlanMainApi.agree(row.masterId).then(() => { |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
@ -281,7 +286,7 @@ const buttonTableClick = async (val, row) => { |
|
|
} else if (val == 'mainPlanPub') { // 发布 |
|
|
} else if (val == 'mainPlanPub') { // 发布 |
|
|
await message.confirm('确认要发布吗?') |
|
|
await message.confirm('确认要发布吗?') |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
DeliverPlanMainApi.publish(row.id).then(() => { |
|
|
DeliverPlanMainApi.publish(row.masterId).then(() => { |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
@ -292,7 +297,7 @@ const buttonTableClick = async (val, row) => { |
|
|
} else if (val == 'mainPlanRes') { // 重置 |
|
|
} else if (val == 'mainPlanRes') { // 重置 |
|
|
await message.confirm('确认要重置吗?') |
|
|
await message.confirm('确认要重置吗?') |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
DeliverPlanMainApi.resetting(row.id).then(() => { |
|
|
DeliverPlanMainApi.resetting(row.masterId).then(() => { |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
@ -303,7 +308,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) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|