|
|
@@ -1,39 +1,53 @@
|
|
|
<template>
|
|
|
- <!-- 单据记录 商品合约-->
|
|
|
- <div class="topTableHeight">
|
|
|
- <a-table
|
|
|
- :columns="columns"
|
|
|
- class="srcollYTable"
|
|
|
- :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
|
|
|
- :pagination="false"
|
|
|
- :loading="loading"
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
- :customRow="Rowclick"
|
|
|
- rowKey="key"
|
|
|
- :data-source="tableList"
|
|
|
- ></a-table>
|
|
|
- </div>
|
|
|
+ <!-- 单据记录 商品合约-->
|
|
|
+ <div class="topTableHeight">
|
|
|
+ <a-table :columns="columnsList"
|
|
|
+ class="srcollYTable"
|
|
|
+ :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
|
|
|
+ :pagination="false"
|
|
|
+ :loading="loading"
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
+ :customRow="Rowclick"
|
|
|
+ rowKey="key"
|
|
|
+ :data-source="tableList">
|
|
|
+ <!-- 类型 -->
|
|
|
+ <template #buyorsell="{ text }">
|
|
|
+ <a>{{ handleBuyOrSell(text) }}</a>
|
|
|
+ </template>
|
|
|
+ <!-- 类型 -->
|
|
|
+ <template #wrtradeorderstatus="{ text }">
|
|
|
+ <a>{{ getWrTradeOrderStatusName(text) }}</a>
|
|
|
+ </template>
|
|
|
+ <template #ordertime="{ text }">
|
|
|
+ <a>{{ formatTime(text) }}</a>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
import { queryTableList, defineComponent, ComposeTableParam } from '@/common/export/commonTable';
|
|
|
-import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
|
|
|
-import { queryOrderQuote } from '@/services/go/wrtrade';
|
|
|
+import { QueryOrderQuoteReq, QueryWrSpecialMatchOrderReq, WrSpecialMatchOrder } from '@/services/go/wrtrade/interface';
|
|
|
+import { queryOrderQuote, queryWrSpecialMatchOrder } from '@/services/go/wrtrade';
|
|
|
import { handleComposeTable } from '@/views/market/spot_trade/setup';
|
|
|
+import { getUserId } from '@/services/bus/account';
|
|
|
+import { useSpecifiedRecordColumns } from '../../setup';
|
|
|
+import { getWrTradeOrderStatusName } from '@/common/constants/enumsName';
|
|
|
+import { formatTime } from '@/common/methods';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: EnumRouterName.search_spot_warrant_protocol_specified_record,
|
|
|
setup() {
|
|
|
// 表格列表数据
|
|
|
- const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
|
|
|
// 获取列表数据
|
|
|
const queryTableAction = () => {
|
|
|
- const param: QueryOrderQuoteReq = {
|
|
|
- wrpricetype: 1,
|
|
|
- haswr: 0,
|
|
|
+ const param: QueryWrSpecialMatchOrderReq = {
|
|
|
+ userid: getUserId(),
|
|
|
+ haswr: 1,
|
|
|
};
|
|
|
- queryTable(queryOrderQuote, param);
|
|
|
+ queryTable(queryWrSpecialMatchOrder, param);
|
|
|
};
|
|
|
// 表格通用逻辑
|
|
|
const param: ComposeTableParam = {
|
|
|
@@ -43,12 +57,16 @@ export default defineComponent({
|
|
|
tableFilterKey: [],
|
|
|
isDetail: false,
|
|
|
};
|
|
|
-
|
|
|
+ const { columnsList, handleBuyOrSell } = useSpecifiedRecordColumns();
|
|
|
return {
|
|
|
- ...handleComposeTable<WrOrderQuote>(param),
|
|
|
+ ...handleComposeTable<WrSpecialMatchOrder>(param),
|
|
|
name: EnumRouterName.warehouse_pre_sale_price,
|
|
|
loading,
|
|
|
tableList,
|
|
|
+ columnsList,
|
|
|
+ handleBuyOrSell,
|
|
|
+ getWrTradeOrderStatusName,
|
|
|
+ formatTime,
|
|
|
};
|
|
|
},
|
|
|
});
|