|
|
@@ -1,43 +1,58 @@
|
|
|
<template>
|
|
|
- <!-- 单据查询 持仓-->
|
|
|
- <div class="platinum_document_query_position">
|
|
|
- <Filter @search="search" />
|
|
|
- <contextMenu :contextMenuList="firstBtn">
|
|
|
- <a-table :columns="columns" class="topOrderTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
|
|
|
- <!-- 额外的展开行 -->
|
|
|
- <template #expandedRowRender="{ record }">
|
|
|
- <BtnList :btnList="firstBtn" class="btn-list-sticky" @onClick="btnClick(record)" />
|
|
|
- </template>
|
|
|
- <!-- 账户类型 -->
|
|
|
- <template #userinfotype="{ record }">
|
|
|
- <a>{{ record.userinfotype === 1 ? '个人' : '企业' }}</a>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- </contextMenu>
|
|
|
- <!-- <ControlModal :selectedRow="selectedRow" /> -->
|
|
|
- </div>
|
|
|
+ <!-- 单据查询 持仓-->
|
|
|
+ <div class="platinum_document_query_position">
|
|
|
+ <Filter @search="search" />
|
|
|
+ <a-table :columns="columns"
|
|
|
+ class="topOrderTable"
|
|
|
+ :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
|
|
|
+ :pagination="false"
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
+ :customRow="Rowclick"
|
|
|
+ rowKey="key"
|
|
|
+ :data-source="tableList">
|
|
|
+ <!-- 额外的展开行 -->
|
|
|
+ <template #expandedRowRender="{ record }">
|
|
|
+ <BtnList :btnList="firstBtn"
|
|
|
+ class="btn-list-sticky"
|
|
|
+ @onClick="btnClick(record)" />
|
|
|
+ </template>
|
|
|
+ <!-- 账户类型 -->
|
|
|
+ <template #userinfotype="{ record }">
|
|
|
+ <a>{{ record.userinfotype === 1 ? '个人' : '企业' }}</a>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, initData, getTableColumns, getTableEvent, contextMenu, BtnList, _getBtnList, queryTableList } from '@/common/export/table';
|
|
|
+import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
+import { ComposeTableParam, defineComponent, handleComposeTable, queryTableList } from '@/common/export/commonTable';
|
|
|
+import { getUserId } from '@/services/bus/user';
|
|
|
import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
|
|
|
+import { queryTradePosition } from '@/services/go/ermcp/qhj';
|
|
|
import { QueryTradePositionReq } from 'src/services/go/ermcp/qhj/interface';
|
|
|
import Filter from './compoments/filter/index.vue';
|
|
|
-import { queryTradePosition } from '@/services/go/ermcp/qhj';
|
|
|
-import { getUserId } from '@/services/bus/user';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'platinum_document_query_position',
|
|
|
- components: { Filter, contextMenu, BtnList },
|
|
|
+ components: { Filter },
|
|
|
setup() {
|
|
|
- // 表头数据
|
|
|
- const { columns, registerColumn } = getTableColumns();
|
|
|
- // 表格事件
|
|
|
- const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<QueryTradePositionRsp>({});
|
|
|
- // 表格操作按钮列表
|
|
|
- const [firstBtn] = _getBtnList('platinum_document_query_position', false).value;
|
|
|
// 表格列表数据
|
|
|
const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
|
|
|
+ const queryTableAction = () => {
|
|
|
+ // 获取列表数据
|
|
|
+ queryTable(queryTradePosition, { userid: getUserId() });
|
|
|
+ };
|
|
|
+
|
|
|
+ // 表格通用逻辑
|
|
|
+ const param: ComposeTableParam = {
|
|
|
+ queryFn: queryTableAction,
|
|
|
+ menuType: EnumRouterName.plan_audit,
|
|
|
+ tableName: 'table_pcweb_qhj_holder_order',
|
|
|
+ tableFilterKey: [],
|
|
|
+ isDetail: true,
|
|
|
+ };
|
|
|
+
|
|
|
function search(value: any) {
|
|
|
const { includesub, goodsid, filtername, userid, userinfotype } = value;
|
|
|
const param: QueryTradePositionReq = {
|
|
|
@@ -49,24 +64,12 @@ export default defineComponent({
|
|
|
};
|
|
|
queryTable(queryTradePosition, param);
|
|
|
}
|
|
|
- initData(() => {
|
|
|
- // 获取列表数据
|
|
|
- queryTable(queryTradePosition, { userid: getUserId() });
|
|
|
- // 注册表头信息 过滤
|
|
|
- registerColumn('table_pcweb_qhj_holder_order', []);
|
|
|
- });
|
|
|
|
|
|
return {
|
|
|
+ ...handleComposeTable<QueryTradePositionRsp>(param),
|
|
|
search,
|
|
|
- columns,
|
|
|
- expandedRowKeys,
|
|
|
- selectedRow,
|
|
|
- Rowclick,
|
|
|
- firstBtn,
|
|
|
loading,
|
|
|
tableList,
|
|
|
- queryTable,
|
|
|
- btnClick,
|
|
|
};
|
|
|
},
|
|
|
});
|