Browse Source

结算--主子表合并

master_hella_20240701
yufei0306 7 months ago
parent
commit
2226e5f345
  1. 15
      src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue
  2. 29
      src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue
  3. 1
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

15
src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="CustomersettleRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="[...CustomersettleRecordMain.allSchemas.searchSchema,...CustomersettleRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CustomersettleRecordMain.allSchemas" :allSchemas="CustomersettleRecordMain.allSchemas"
:detailAllSchemas="CustomersettleRecordDetail.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>
@ -76,7 +77,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(CustomersettleRecordMain.allSchemas.tableColumns) const tableColumns = ref([...CustomersettleRecordMain.allSchemas.tableColumns,...CustomersettleRecordDetail.allSchemas.tableMainColumns])
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -125,7 +126,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/customersettle/customersettleRequestMain/index.vue

@ -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)
} }
} }

1
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

@ -283,7 +283,6 @@ export const StockupMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isForm: false,
}, },
{ {
label: '备注', label: '备注',

Loading…
Cancel
Save