huangbin 4 년 전
부모
커밋
f83c540808

+ 1 - 1
src/views/order/spot_warran/components/spot_warrant_pending_order/components/cancle/index.vue

@@ -20,7 +20,7 @@ import { getLongTypeLoginID } from '@/services/bus/login';
 import { Modal } from 'ant-design-vue';
 
 export default defineComponent({
-    name: ModalEnum.spot_warrant_spot_details_listed,
+    name: ModalEnum.spot_warrant_pending_order_cancel_order,
     components: { Drawer },
     emits: ['cancel'],
     props: {

+ 20 - 10
src/views/order/spot_warran/components/spot_warrant_pending_order/index.vue

@@ -12,18 +12,18 @@
              :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
-        <BtnList :btnList="btnList"
+        <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>
+      <!--  委托状态-->
+      <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"
@@ -40,7 +40,9 @@ import { QueryWrOrderDetailReq, WrOrderDetail } from '@/services/go/wrtrade/inte
 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 { getWrOrderTypeName, getWrTradeOrderStatusName } from '@/common/constants/enumsName';
+import { BtnList as btnType } from '@/common/components/btnList/interface';
+
 export default defineComponent({
     name: enumOrderComponents.spot_warrant_pending_order,
     components: {
@@ -63,12 +65,20 @@ export default defineComponent({
             tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_pending_order',
             recordList: getRecordItemTab(),
         };
+        function filterBtnList(list: btnType[], record: WrOrderDetail) {
+            if (record.wrtradeorderstatus === 6) {
+                return list.filter((e) => e.code !== ModalEnum.spot_warrant_pending_order_cancel_order);
+            } else {
+                return list;
+            }
+        }
         return {
             ...handleComposeOrderTable<WrOrderDetail>(param),
             loading,
             tableList,
             getWrTradeOrderStatusName,
             getWrOrderTypeName,
+            filterBtnList,
         };
     },
 });