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> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="PurchaseMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="[...PurchaseMain.allSchemas.searchSchema,...PurchaseDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" <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> <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 total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" > v-model:sort="tableObject.sort" >
@ -18,23 +21,14 @@
<TableDetail <TableDetail
:openDetailParams="{ :openDetailParams="{
row: row, row: row,
titleName: '单据号',
titleValue: 'row.number',
tableName: 'orderPurchaseMain'
}" }"
:width="expandDetailWidth" :width="expandDetailWidth"
:isBasic="false"
:allSchemas="PurchaseMain.allSchemas" :allSchemas="PurchaseMain.allSchemas"
:detailAllSchemas="PurchaseDetail.allSchemas" :detailAllSchemas="PurchaseDetail.allSchemas"
:detailAllSchemasRules="PurchaseDetailRules"
:apiCreate="PurchaseDetailApi.createPurchaseDetail"
:apiUpdate="PurchaseDetailApi.updatePurchaseDetail"
:apiPage="PurchaseDetailApi.getPurchaseDetailPage" :apiPage="PurchaseDetailApi.getPurchaseDetailPage"
:apiDelete="PurchaseDetailApi.deletePurchaseDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
/> />
</template> </template> -->
<template #number="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
@ -109,8 +103,8 @@ import TableDetail from '@/components/TableDetail/src/TableDetail.vue'
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name 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) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
@ -201,7 +195,7 @@ import TableDetail from '@/components/TableDetail/src/TableDetail.vue'
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ 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: '最后更新时间', label: '最后更新时间',
field: 'updateTime', field: 'updateTime',
hiddenInMain:false,
isTableForm: false, isTableForm: false,
isTable: true, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
@ -797,6 +798,7 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '备注', label: '备注',
hiddenInMain:true,
field: 'remark', field: 'remark',
table: { table: {
width: 150 width: 150
@ -804,6 +806,7 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '操作', label: '操作',
hiddenInMain:true,
field: 'action', field: 'action',
isDetail: false, isDetail: false,
isForm: false , isForm: false ,

Loading…
Cancel
Save