|
@@ -1,56 +1,87 @@
|
|
|
<template>
|
|
<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="columns"
|
|
|
|
|
+ class="srcollYTable"
|
|
|
|
|
+ :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
|
|
|
|
|
+ :pagination="false"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
|
|
+ :customRow="Rowclick"
|
|
|
|
|
+ rowKey="key"
|
|
|
|
|
+ :data-source="tableList">
|
|
|
|
|
+ <!-- 类型 -->
|
|
|
|
|
+ <template #buildtype="{ record }">
|
|
|
|
|
+ <a>{{ getBuyOrSellTypeName(record.buyorsell) }}</a>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 状态 -->
|
|
|
|
|
+ <template #orderstatus="{ record }">
|
|
|
|
|
+ <a>{{ getOrderStatusName(record.orderstatus) }}</a>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template #ordertime="{ text }">
|
|
|
|
|
+ <a>{{ formatTime(text) }}</a>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-table>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<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 { handleComposeTable } from '@/views/market/spot_trade/setup';
|
|
|
|
|
|
|
+import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
|
|
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
|
|
|
|
|
+import { getBuyOrSellTypeName, getOrderStatusName } from '@/common/constants/enumsName';
|
|
|
|
|
+import { BtnList, defineAsyncComponent, defineComponent, queryTableList } from '@/common/export/commonTable';
|
|
|
|
|
+import { formatTime } from '@/common/methods';
|
|
|
|
|
+import { getRecordItemTab } from '@/common/setup/order/orderData';
|
|
|
|
|
+import { expandIcon } from '@/common/setup/table/clolumn';
|
|
|
|
|
+import { handleComposeOrderTable } from '@/common/setup/table/compose';
|
|
|
|
|
+import { ComposeOrderTableParam } from '@/common/setup/table/interface';
|
|
|
|
|
+import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
|
|
|
|
|
+import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
|
|
|
|
|
+import { WrPerformancePlan } from '@/services/go/wrtrade/interface';
|
|
|
|
|
+import Bus from '@/utils/eventBus/index';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
- name: EnumRouterName.search_document_records_commission_record,
|
|
|
|
|
|
|
+ name: enumOrderComponents.commodity_contract_commission,
|
|
|
setup() {
|
|
setup() {
|
|
|
// 表格列表数据
|
|
// 表格列表数据
|
|
|
- const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
|
|
|
|
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
|
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
|
const queryTableAction = () => {
|
|
const queryTableAction = () => {
|
|
|
- const param: QueryOrderQuoteReq = {
|
|
|
|
|
- wrpricetype: 1,
|
|
|
|
|
- haswr: 0,
|
|
|
|
|
- };
|
|
|
|
|
- queryTable(queryOrderQuote, param);
|
|
|
|
|
|
|
+ queryTable(queryTradeOrderDetail, {});
|
|
|
};
|
|
};
|
|
|
// 表格通用逻辑
|
|
// 表格通用逻辑
|
|
|
- const param: ComposeTableParam = {
|
|
|
|
|
|
|
+ const param: ComposeOrderTableParam = {
|
|
|
queryFn: queryTableAction,
|
|
queryFn: queryTableAction,
|
|
|
- menuType: EnumRouterName.warehouse_pre_sale_price,
|
|
|
|
|
- tableName: 'table_pcweb_spot_trade_warehouse_sale_price',
|
|
|
|
|
- tableFilterKey: [],
|
|
|
|
|
- isDetail: false,
|
|
|
|
|
|
|
+ tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_commission',
|
|
|
|
|
+ recordList: getRecordItemTab(),
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+ function filterBtnList(list: BtnListType[], record: QueryTradeOrderDetailRsp) {
|
|
|
|
|
+ //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
|
|
|
|
|
+ const arr = [3, 7];
|
|
|
|
|
+ if (!arr.includes(record.orderstatus)) {
|
|
|
|
|
+ return list.filter((e) => e.code !== 'commodity_contract_commission_cancel_order');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return list;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 挂牌
|
|
|
|
|
+ Bus.$on('spotTrade', () => {
|
|
|
|
|
+ queryTableAction();
|
|
|
|
|
+ });
|
|
|
return {
|
|
return {
|
|
|
- ...handleComposeTable<WrOrderQuote>(param),
|
|
|
|
|
|
|
+ ...handleComposeOrderTable<WrPerformancePlan>(param),
|
|
|
loading,
|
|
loading,
|
|
|
tableList,
|
|
tableList,
|
|
|
|
|
+ formatTime,
|
|
|
|
|
+ expandIcon,
|
|
|
|
|
+ getBuyOrSellTypeName,
|
|
|
|
|
+ getOrderStatusName,
|
|
|
|
|
+ filterBtnList,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>;
|