Browse Source

主表,子表数据合并

master_hella_20240701
yufei0306 7 months ago
parent
commit
b1a93123d7
  1. 28
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue
  2. 3
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

28
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

@ -1,16 +1,19 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="PurchaseMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...PurchaseMain.allSchemas.searchSchema,...PurchaseDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="PurchaseMain.allSchemas" />
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="PurchaseMain.allSchemas" :detailAllSchemas="PurchaseDetail.allSchemas" />
<!-- 列表 -->
<ContentWrap>
<Table ref="elTableRef" :expand="true" :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
<Table ref="elTableRef" :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" >
<!-- <Table ref="elTableRef" :expand="true" :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" >
@ -18,23 +21,14 @@
<TableDetail
:openDetailParams="{
row: row,
titleName: '单据号',
titleValue: 'row.number',
tableName: 'orderPurchaseMain'
}"
:width="expandDetailWidth"
:isBasic="false"
:allSchemas="PurchaseMain.allSchemas"
:detailAllSchemas="PurchaseDetail.allSchemas"
:detailAllSchemasRules="PurchaseDetailRules"
:apiCreate="PurchaseDetailApi.createPurchaseDetail"
:apiUpdate="PurchaseDetailApi.updatePurchaseDetail"
:apiPage="PurchaseDetailApi.getPurchaseDetailPage"
:apiDelete="PurchaseDetailApi.deletePurchaseDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
</template>
</template> -->
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
@ -109,8 +103,8 @@ import TableDetail from '@/components/TableDetail/src/TableDetail.vue'
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(PurchaseMain.allSchemas.tableColumns)
const tableColumns = ref([...PurchaseMain.allSchemas.tableColumns,...PurchaseDetail.allSchemas.tableMainColumns])
console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searchSchema)
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -201,7 +195,7 @@ import TableDetail from '@/components/TableDetail/src/TableDetail.vue'
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: PurchaseMainApi.getPurchaseMainPage //
getListApi: PurchaseDetailApi.getPurchaseDetailPage //
})
//

3
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

@ -784,6 +784,7 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '最后更新时间',
field: 'updateTime',
hiddenInMain:false,
isTableForm: false,
isTable: true,
formatter: dateFormatter,
@ -797,6 +798,7 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '备注',
hiddenInMain:true,
field: 'remark',
table: {
width: 150
@ -804,6 +806,7 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '操作',
hiddenInMain:true,
field: 'action',
isDetail: false,
isForm: false ,

Loading…
Cancel
Save