|
|
@ -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 // 分页接口 |
|
|
|
}) |
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
|