|
|
@@ -1,37 +1,35 @@
|
|
|
<template>
|
|
|
- <!-- 仓单预售 挂单 -->
|
|
|
- <section>
|
|
|
- <a-table
|
|
|
- :columns="columns"
|
|
|
- class="srcollYTable"
|
|
|
- :scroll="{ x: '100%', y: '227px' }"
|
|
|
- :pagination="false"
|
|
|
- :loading="loading"
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
- :customRow="Rowclick"
|
|
|
- rowKey="key"
|
|
|
- :data-source="tableList"
|
|
|
- >
|
|
|
- <!-- 额外的展开行 -->
|
|
|
- <template #expandedRowRender="{ record }">
|
|
|
- <BtnList :btnList="btnList" :record="record" @click="openComponent" />
|
|
|
- </template>
|
|
|
- <!-- 委托状态-->
|
|
|
- <template #wrtradeorderstatus="{ record }">
|
|
|
- <a>{{ getWrTradeOrderStatusName(record.wrtradeorderstatus) }}</a>
|
|
|
- </template>
|
|
|
- <!-- 挂牌类型 -->
|
|
|
- <template #wrtradetype="{ record }">
|
|
|
- <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- <component
|
|
|
- :is="componentId"
|
|
|
- v-if="componentId"
|
|
|
- :selectedRow="selectedRow"
|
|
|
- @cancel="closeComponent"
|
|
|
- ></component>
|
|
|
- </section>
|
|
|
+ <!-- 仓单预售 挂单 -->
|
|
|
+ <section>
|
|
|
+ <a-table :columns="columns"
|
|
|
+ class="srcollYTable"
|
|
|
+ :scroll="{ x: '100%', y: '227px' }"
|
|
|
+ :pagination="false"
|
|
|
+ :loading="loading"
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
+ :customRow="Rowclick"
|
|
|
+ rowKey="key"
|
|
|
+ :data-source="tableList">
|
|
|
+ <!-- 额外的展开行 -->
|
|
|
+ <template #expandedRowRender="{ record }">
|
|
|
+ <BtnList :btnList="filterBtnList(btnList, record)"
|
|
|
+ :record="record"
|
|
|
+ @click="openComponent" />
|
|
|
+ </template>
|
|
|
+ <!-- 委托状态-->
|
|
|
+ <template #wrtradeorderstatus="{ record }">
|
|
|
+ <a>{{ getWrTradeOrderStatusName(record.wrtradeorderstatus) }}</a>
|
|
|
+ </template>
|
|
|
+ <!-- 挂牌类型 -->
|
|
|
+ <template #wrtradetype="{ record }">
|
|
|
+ <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <component :is="componentId"
|
|
|
+ v-if="componentId"
|
|
|
+ :selectedRow="selectedRow"
|
|
|
+ @cancel="closeComponent"></component>
|
|
|
+ </section>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
@@ -43,6 +41,7 @@ import { getRecordItemTab } from '@/common/setup/order/orderData';
|
|
|
import { handleComposeOrderTable } from '@/common/setup/table/compose';
|
|
|
import { ComposeOrderTableParam } from '@/common/setup/table/interface';
|
|
|
import { getWrOrderTypeName, getWrTradeOrderStatusName } from '@/common/constants/enumsName';
|
|
|
+import { BtnList as btnType } from '@/common/components/btnList/interface';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: enumOrderComponents.pre_sale_warehouse_receipt_pending_order,
|
|
|
@@ -66,8 +65,18 @@ export default defineComponent({
|
|
|
tableName: 'table_pcweb_spot_trade_bottom_pre_sale_pending_order',
|
|
|
recordList: getRecordItemTab(),
|
|
|
};
|
|
|
+ function filterBtnList(list: btnType[], record: WrOrderDetail) {
|
|
|
+ //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
|
|
|
+ const arr = [3, 10];
|
|
|
+ if (!arr.includes(record.wrtradeorderstatus)) {
|
|
|
+ return list.filter((e) => e.code !== ModalEnum.pre_sale_warehouse_receipt_pending_order_cancel_order);
|
|
|
+ } else {
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
...handleComposeOrderTable<WrOrderDetail>(param),
|
|
|
+ filterBtnList,
|
|
|
loading,
|
|
|
tableList,
|
|
|
getWrTradeOrderStatusName,
|