|
|
@@ -3,82 +3,84 @@
|
|
|
<div class="purchase-performance"
|
|
|
:loading="loading">
|
|
|
<filterCustomTable @search="updateColumn">
|
|
|
- <BtnList :btnList="commonBtn" />
|
|
|
+ <BtnList :btnList="firstBtn"
|
|
|
+ @click="openComponent" />
|
|
|
</filterCustomTable>
|
|
|
- <contextMenu :contextMenuList="forDataBtn">
|
|
|
- <a-table :columns="columns"
|
|
|
- class="topTable"
|
|
|
- :pagination="false"
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
- :customRow="Rowclick"
|
|
|
- rowKey="key"
|
|
|
- :data-source="tableList">
|
|
|
- <!-- 额外的展开行 -->
|
|
|
- <template #expandedRowRender="{ }">
|
|
|
- <BtnList :btnList="forDataBtn" />
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
+ <a-table :columns="columns"
|
|
|
+ class="srcollYTable"
|
|
|
+ :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
|
|
|
+ :pagination="false"
|
|
|
+ :loading="loading"
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
+ :customRow="Rowclick"
|
|
|
+ rowKey="key"
|
|
|
+ :data-source="tableList">
|
|
|
+ <!-- 额外的展开行 -->
|
|
|
+ <template #expandedRowRender="{ record }">
|
|
|
+ <BtnList :btnList="secondBtn"
|
|
|
+ :record="record"
|
|
|
+ @click="openComponent" />
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <!-- 右键 -->
|
|
|
+ <contextMenu :contextMenu="contextMenu"
|
|
|
+ @cancel="closeContext"
|
|
|
+ :list="secondBtn">
|
|
|
</contextMenu>
|
|
|
- <!-- 详情 -->
|
|
|
- <Detail :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable" />
|
|
|
- <!-- 交收登记 -->
|
|
|
- <Settlement :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable" />
|
|
|
- <!-- 款项登记 -->
|
|
|
- <Funds :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable" />
|
|
|
- <!-- 发票登记 -->
|
|
|
- <Invoice :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable" />
|
|
|
- <!-- 入库登记 -->
|
|
|
- <Storage :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable" />
|
|
|
+ <component :is="componentId"
|
|
|
+ v-if="componentId"
|
|
|
+ :selectedRow="selectedRow"
|
|
|
+ @cancel="closeComponent"></component>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
|
|
|
-import { queryTableList, Ermcp3SellBuyContract } from '../index';
|
|
|
-import { Detail, filterCustomTable, Settlement, Funds, Invoice, Storage } from '../../components';
|
|
|
+import { defineComponent, queryTableList } from '@/common/export/table';
|
|
|
+import BtnList from '@/common/components/btnList/index.vue';
|
|
|
+import contextMenu from '@/common/components/contextMenu/temp.vue';
|
|
|
+import { defineAsyncComponent } from 'vue';
|
|
|
+import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
|
+import { ComposeTableParam, handleComposeTable } from '@/common/setup/table/compose';
|
|
|
+
|
|
|
+import { filterCustomTable } from '../../components';
|
|
|
+import { QueryPurchase } from '@/services/go/ermcp/purchase';
|
|
|
+import { Ermcp3SellBuyContract } from '@/views/business/sell/list';
|
|
|
+
|
|
|
+const Detail = defineAsyncComponent(() => import('../../components/detail/index.vue'));
|
|
|
+const Settlement = defineAsyncComponent(() => import('../../components/settlement/index.vue')); //交收登记
|
|
|
+const Funds = defineAsyncComponent(() => import('../../components/funds/index.vue')); // 款项登记
|
|
|
+const Invoice = defineAsyncComponent(() => import('../../components/invoice/index.vue')); // 发票登记
|
|
|
+const Storage = defineAsyncComponent(() => import('../../components/storage/index.vue')); // 入库登记
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'purchase-performance',
|
|
|
components: {
|
|
|
contextMenu,
|
|
|
filterCustomTable,
|
|
|
- Detail,
|
|
|
- Settlement,
|
|
|
- Funds,
|
|
|
- Invoice,
|
|
|
- Storage,
|
|
|
BtnList,
|
|
|
+ [ModalEnum.detail]: Detail,
|
|
|
+ [ModalEnum.purchase_pending_settlement]: Settlement,
|
|
|
+ [ModalEnum.purchase_pending_funds]: Funds,
|
|
|
+ [ModalEnum.purchase_pending_invoice]: Invoice,
|
|
|
+ [ModalEnum.purchase_pending_storage]: Storage,
|
|
|
},
|
|
|
setup() {
|
|
|
- // 表头数据
|
|
|
- const { columns, registerColumn, updateColumn } = getTableColumns();
|
|
|
- // 表格事件
|
|
|
- const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3SellBuyContract>({});
|
|
|
- // 表格操作按钮列表
|
|
|
- const { commonBtn, forDataBtn } = getBtnList('purchase_performance', true);
|
|
|
// 表格列表数据
|
|
|
- const { loading, tableList, queryTable } = queryTableList(3);
|
|
|
- initData(() => {
|
|
|
- // 获取列表数据
|
|
|
- queryTable();
|
|
|
- // 注册表头信息 过滤
|
|
|
- registerColumn('table_pcweb_purchase_settle', ['accountname', 'contractno', 'deliverygoodsname', 'convertfactor', 'goodsname']);
|
|
|
- });
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<Ermcp3SellBuyContract>();
|
|
|
+ // 获取列表数据
|
|
|
+ const queryTableAction = () => queryTable(QueryPurchase, { querytype: 3 });
|
|
|
+ // 表格通用逻辑
|
|
|
+ const param: ComposeTableParam = {
|
|
|
+ queryFn: queryTableAction,
|
|
|
+ menuType: 'purchase_performance',
|
|
|
+ tableName: 'table_pcweb_purchase_settle',
|
|
|
+ tableFilterKey: ['accountname', 'contractno', 'deliverygoodsname', 'convertfactor', 'goodsname'],
|
|
|
+ isDetail: true,
|
|
|
+ };
|
|
|
return {
|
|
|
- columns,
|
|
|
- expandedRowKeys,
|
|
|
- selectedRow,
|
|
|
- Rowclick,
|
|
|
- commonBtn,
|
|
|
- forDataBtn,
|
|
|
- loading,
|
|
|
+ ...handleComposeTable<Ermcp3SellBuyContract>(param),
|
|
|
tableList,
|
|
|
- updateColumn,
|
|
|
+ loading,
|
|
|
};
|
|
|
},
|
|
|
});
|