Browse Source

备货主子表合并

master_hella_20240701
yufei0306 7 months ago
parent
commit
f917f48a71
  1. 21
      src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue
  2. 15
      src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue
  3. 29
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue

21
src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="StockupMainJob.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="[...StockupMainJob.allSchemas.searchSchema,...StockupDetailJob.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="StockupMainJob.allSchemas" :allSchemas="StockupMainJob.allSchemas"
:detailAllSchemas="StockupDetailJob.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>
@ -82,7 +83,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(StockupMainJob.allSchemas.tableColumns) const tableColumns = ref([...StockupMainJob.allSchemas.tableColumns,...StockupDetailJob.allSchemas.tableMainColumns])
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -179,7 +180,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.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
@ -193,11 +198,11 @@ const buttonTableClick = async (val, row) => {
 if (val == 'mainJobExe') { //  if (val == 'mainJobExe') { //
handleHandle handleHandle
} else if (val == 'mainJobAba') { // } else if (val == 'mainJobAba') { //
StockupJobMainApi.abandonStockupMainJob(row.id) StockupJobMainApi.abandonStockupMainJob(row.masterId)
} else if (val == 'mainJobClo') { // } else if (val == 'mainJobClo') { //
StockupJobMainApi.closeStockupMainJob(row.id) StockupJobMainApi.closeStockupMainJob(row.masterId)
} else if (val == 'mainJobAcc') { // } else if (val == 'mainJobAcc') { //
StockupJobMainApi.acceptStockupMainJob(row.id) StockupJobMainApi.acceptStockupMainJob(row.masterId)
} }
} }
// //

15
src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="StockupMainRecord.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="[...StockupMainRecord.allSchemas.searchSchema,...StockupDetailRecord.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="StockupMainRecord.allSchemas" :allSchemas="StockupMainRecord.allSchemas"
:detailAllSchemas="StockupDetailRecord.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>
@ -77,7 +78,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(StockupMainRecord.allSchemas.tableColumns) const tableColumns = ref([...StockupMainRecord.allSchemas.tableColumns,...StockupDetailRecord.allSchemas.tableMainColumns])
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -126,7 +127,11 @@ const buttonBaseClick = (val, item) => {
} }
// - // -
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 []
} }

29
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="StockupMainRequest.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="[...StockupMainRequest.allSchemas.searchSchema,...StockupDetailRequest.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="StockupMainRequest.allSchemas" :allSchemas="StockupMainRequest.allSchemas"
:detailAllSchemas="StockupDetailRequest.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -33,8 +34,8 @@
</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>
@ -100,7 +101,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(StockupMainRequest.allSchemas.tableColumns) const tableColumns = ref([...StockupMainRequest.allSchemas.tableColumns,...StockupDetailRequest.allSchemas.tableMainColumns])
const isShowButton = ref(true) const isShowButton = ref(true)
@ -228,7 +229,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:stockup-main-request:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:stockup-main-request:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:stockup-main-request:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:stockup-main-request:reAdd'}), //
@ -248,7 +253,7 @@ const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
tableObject.loading = true tableObject.loading = true
StockupMainRequestApi.close(row.id).then(() => { StockupMainRequestApi.close(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 == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?') await message.confirm('确认要重新添加吗?')
tableObject.loading = true tableObject.loading = true
StockupMainRequestApi.reAdd(row.id).then(() => { StockupMainRequestApi.reAdd(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 == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
await message.confirm('确认要提交审批吗?') await message.confirm('确认要提交审批吗?')
tableObject.loading = true tableObject.loading = true
StockupMainRequestApi.submit(row.id).then(() => { StockupMainRequestApi.submit(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 == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
await message.confirm('确认要驳回吗?') await message.confirm('确认要驳回吗?')
tableObject.loading = true tableObject.loading = true
StockupMainRequestApi.refused(row.id).then(() => { StockupMainRequestApi.refused(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 == 'mainApprove') { // } else if (val == 'mainApprove') { //
await message.confirm('确认要审批通过吗?') await message.confirm('确认要审批通过吗?')
tableObject.loading = true tableObject.loading = true
StockupMainRequestApi.agree(row.id).then(() => { StockupMainRequestApi.agree(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 == 'mainHandle') { // } else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?') await message.confirm('确认要处理吗?')
tableObject.loading = true tableObject.loading = true
StockupMainRequestApi.handle(row.id).then(() => { StockupMainRequestApi.handle(row.masterId).then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -314,7 +319,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)
} }
} }

Loading…
Cancel
Save