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>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="CustomersettleRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...CustomersettleRecordMain.allSchemas.searchSchema,...CustomersettleRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="CustomersettleRecordMain.allSchemas"
:detailAllSchemas="CustomersettleRecordDetail.allSchemas"
/>
<!-- 列表 -->
@ -32,8 +33,8 @@
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -76,7 +77,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(CustomersettleRecordMain.allSchemas.tableColumns)
const tableColumns = ref([...CustomersettleRecordMain.allSchemas.tableColumns,...CustomersettleRecordDetail.allSchemas.tableMainColumns])
//
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 []
}

29
src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="CustomersettleRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...CustomersettleRequestMain.allSchemas.searchSchema,...CustomersettleRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="CustomersettleRequestMain.allSchemas"
:detailAllSchemas="CustomersettleRequestDetail.allSchemas"
/>
<!-- 列表 -->
@ -32,8 +33,8 @@
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -96,7 +97,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(CustomersettleRequestMain.allSchemas.tableColumns)
const tableColumns = ref([...CustomersettleRequestMain.allSchemas.tableColumns,...CustomersettleRequestDetail.allSchemas.tableMainColumns])
//
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 [
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'}), //
@ -224,7 +229,7 @@ const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?')
tableObject.loading = true
CustomersettleRequestMainApi.close(row.id).then(() => {
CustomersettleRequestMainApi.close(row.masterId).then(() => {
tableObject.loading = false
message.success(t('common.updateSuccess'))
getList()
@ -234,7 +239,7 @@ const buttonTableClick = async (val, row) => {
}) } else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?')
tableObject.loading = true
CustomersettleRequestMainApi.reAdd(row.id).then(() => {
CustomersettleRequestMainApi.reAdd(row.masterId).then(() => {
tableObject.loading = false
message.success(t('common.updateSuccess'))
getList()
@ -245,7 +250,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainSubmit') { //
await message.confirm('确认要提交审批吗?')
tableObject.loading = true
CustomersettleRequestMainApi.submit(row.id).then(() => {
CustomersettleRequestMainApi.submit(row.masterId).then(() => {
tableObject.loading = false
message.success(t('common.updateSuccess'))
getList()
@ -256,7 +261,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainTurnDown') { //
await message.confirm('确认要重新添加吗?')
tableObject.loading = true
CustomersettleRequestMainApi.refused(row.id).then(() => {
CustomersettleRequestMainApi.refused(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
@ -264,7 +269,7 @@ const buttonTableClick = async (val, row) => {
})
} else if (val == 'mainApprove') { //
tableObject.loading = true
CustomersettleRequestMainApi.agree(row.id).then(() => {
CustomersettleRequestMainApi.agree(row.masterId).then(() => {
tableObject.loading = false
message.success(t('common.updateSuccess'))
getList()
@ -274,7 +279,7 @@ const buttonTableClick = async (val, row) => {
})
} else if (val == 'mainHandle') { //
tableObject.loading = true
CustomersettleRequestMainApi.handle(row.id).then(() => {
CustomersettleRequestMainApi.handle(row.masterId).then(() => {
tableObject.loading = false
message.success(t('common.updateSuccess'))
getList()
@ -285,7 +290,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'edit') { //
openForm('update', row)
} 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: {
width: 150
},
isForm: false,
},
{
label: '备注',

Loading…
Cancel
Save