|
|
@ -2,7 +2,7 @@ |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search |
|
|
|
:schema="CountRequestMain.allSchemas.searchSchema" |
|
|
|
:schema="[...CountRequestMain.allSchemas.searchSchema,...CountRequestDetail.allSchemas.searchSchema]" |
|
|
|
@search="setSearchParams" |
|
|
|
@reset="setSearchParams" |
|
|
|
/> |
|
|
@ -16,6 +16,7 @@ |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="CountRequestMain.allSchemas" |
|
|
|
:detailAllSchemas="CountRequestDetail.allSchemas" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
@ -36,9 +37,9 @@ |
|
|
|
<span>{{ row.number }}</span> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row }"> |
|
|
|
<template #action="{ row,$index }"> |
|
|
|
<ButtonBase |
|
|
|
:Butttondata="butttondata(row)" |
|
|
|
:Butttondata="butttondata(row,$index)" |
|
|
|
@button-base-click="buttonTableClick($event, row)" |
|
|
|
/> |
|
|
|
</template> |
|
|
@ -122,7 +123,7 @@ const { t } = useI18n() // 国际化 |
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(CountRequestMain.allSchemas.tableColumns) |
|
|
|
const tableColumns = ref([...CountRequestMain.allSchemas.tableColumns,...CountRequestDetail.allSchemas.tableMainColumns]) |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
@ -197,7 +198,7 @@ const searchTableSuccessCount = (formField, searchField, val, type,row,count) => |
|
|
|
const Echo = [] |
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: CountRequestMainApi.getCountRequestMainPage // 分页接口 |
|
|
|
getListApi: CountRequestDetailApi.getCountRequestDetailPage // 分页接口 |
|
|
|
}) |
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
@ -281,7 +282,11 @@ const isShowGenerateMainButton = (row, val) => { |
|
|
|
|
|
|
|
const searchTableRef = ref() |
|
|
|
// 列表-操作按钮 |
|
|
|
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:count-request-main:close'}), // 关闭 |
|
|
|
defaultButtons.mainListReAddBtn({hide: isShowMainButton(row, ['5']),hasPermi: 'wms:count-request-main:reAdd'}), //重新添加 |
|
|
@ -304,7 +309,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
// 关闭 |
|
|
|
await message.confirm('确认要关闭吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CountRequestMainApi.close(row.id) |
|
|
|
CountRequestMainApi.close(row.masterId) |
|
|
|
.then(() => { |
|
|
|
message.success(t('关闭成功')) |
|
|
|
tableObject.loading = false |
|
|
@ -318,7 +323,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
// 重新添加 |
|
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CountRequestMainApi.reAdd(row.id) |
|
|
|
CountRequestMainApi.reAdd(row.masterId) |
|
|
|
.then(() => { |
|
|
|
message.success(t('添加成功')) |
|
|
|
tableObject.loading = false |
|
|
@ -332,7 +337,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
// 提交审批 |
|
|
|
await message.confirm('确认要提交审批吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CountRequestMainApi.submit(row.id) |
|
|
|
CountRequestMainApi.submit(row.masterId) |
|
|
|
.then(() => { |
|
|
|
message.success(t('提交审批成功')) |
|
|
|
tableObject.loading = false |
|
|
@ -346,7 +351,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
// 驳回 |
|
|
|
await message.confirm('确认要驳回吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CountRequestMainApi.refused(row.id) |
|
|
|
CountRequestMainApi.refused(row.masterId) |
|
|
|
.then(() => { |
|
|
|
message.success(t('驳回成功')) |
|
|
|
tableObject.loading = false |
|
|
@ -360,7 +365,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
// 审批通过 |
|
|
|
await message.confirm('确认要审批通过吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CountRequestMainApi.agree(row.id) |
|
|
|
CountRequestMainApi.agree(row.masterId) |
|
|
|
.then(() => { |
|
|
|
message.success(t('审批已通过')) |
|
|
|
tableObject.loading = false |
|
|
@ -374,7 +379,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
// 处理 |
|
|
|
await message.confirm('确认要处理吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CountRequestMainApi.handle(row.id) |
|
|
|
CountRequestMainApi.handle(row.masterId) |
|
|
|
.then(() => { |
|
|
|
message.success(t('处理成功')) |
|
|
|
tableObject.loading = false |
|
|
@ -396,7 +401,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
label:3, |
|
|
|
title:'选择' |
|
|
|
}]) |
|
|
|
searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'reCount','',true,'',row,{masterId:row.id},'',radioList.value) |
|
|
|
searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'reCount','',true,'',row,{masterId:row.masterId},'',radioList.value) |
|
|
|
} else if (val == 'mainSuperviseCount') { |
|
|
|
// 监盘 |
|
|
|
const radioList = ref([{ |
|
|
@ -406,11 +411,11 @@ const buttonTableClick = async (val, row) => { |
|
|
|
label:2, |
|
|
|
title:'选择' |
|
|
|
}]) |
|
|
|
searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'superviseCount','',true,'',row,{masterId:row.id},'',radioList.value) |
|
|
|
searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'superviseCount','',true,'',row,{masterId:row.masterId},'',radioList.value) |
|
|
|
} else if (val == 'countAdjustRequest') { |
|
|
|
// 生成盘点调整申请 |
|
|
|
await message.confirm('确认要生成盘点调整申请吗?') |
|
|
|
CountRequestMainApi.generateCountadjustRequest(row.id) |
|
|
|
CountRequestMainApi.generateCountadjustRequest(row.masterId) |
|
|
|
.then(() => { |
|
|
|
message.success(t('已生成盘点调整申请')) |
|
|
|
getList() |
|
|
@ -422,7 +427,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
// 解冻 |
|
|
|
await message.confirm('确认要解冻吗?') |
|
|
|
tableObject.loading = true |
|
|
|
CountRequestMainApi.thaw(row.id) |
|
|
|
CountRequestMainApi.thaw(row.masterId) |
|
|
|
.then(() => { |
|
|
|
message.success(t('解冻成功')) |
|
|
|
tableObject.loading = false |
|
|
@ -437,7 +442,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { |
|
|
|
// 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
handleDelete(row.masterId) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|