li.shaoyi 4 gadi atpakaļ
vecāks
revīzija
6c55813284
100 mainītis faili ar 5336 papildinājumiem un 6096 dzēšanām
  1. 1 1
      generate-code/template.js
  2. 2 2
      generate-code/templates/table.js
  3. 3 4
      src/common/setup/table/event.ts
  4. 156 0
      src/hooks/account/index.ts
  5. 22 0
      src/hooks/account/interface.ts
  6. 1 1
      src/services/go/TaAccount/index.ts
  7. 2 2
      src/views/business/exposure/list/futures/index.vue
  8. 2 2
      src/views/business/exposure/list/realTime/index.vue
  9. 2 2
      src/views/business/exposure/list/spot/index.vue
  10. 1 1
      src/views/business/plan/list/audit/index.vue
  11. 51 51
      src/views/business/plan/list/running/index.vue
  12. 1 1
      src/views/business/plan/list/uncommitted/index.vue
  13. 1 1
      src/views/business/purchase/list/all/index.vue
  14. 1 1
      src/views/business/search/plan/index.vue
  15. 1 1
      src/views/business/search/spot/index.vue
  16. 1 1
      src/views/business/sell/list/all/index.vue
  17. 33 33
      src/views/business/spotmarket/list/price/index.vue
  18. 70 70
      src/views/information/account_info/compoments/managers-permission/index.vue
  19. 1 1
      src/views/information/custom/index.vue
  20. 69 69
      src/views/information/spot-contract/list/audit/index.vue
  21. 1 1
      src/views/information/spot-contract/list/purchase/index.vue
  22. 58 58
      src/views/information/spot-contract/list/sell/index.vue
  23. 82 82
      src/views/information/warehouse-info/list/normal-use/index.vue
  24. 71 71
      src/views/information/warehouse-info/list/stop-use/index.vue
  25. 84 84
      src/views/manage/business-review/list/settlement/index.vue
  26. 93 93
      src/views/manage/business-review/list/someprice/index.vue
  27. 84 84
      src/views/manage/finance-review/list/funds/index.vue
  28. 1 1
      src/views/manage/finance-review/list/invoice/index.vue
  29. 87 87
      src/views/manage/inventory-review/list/audit/index.vue
  30. 96 96
      src/views/manage/inventory-review/list/checkpending/index.vue
  31. 95 95
      src/views/manage/inventory-review/list/performance/index.vue
  32. 83 108
      src/views/market/spot_trade/components/buy-sell-market/components/buy/index.vue
  33. 85 105
      src/views/market/spot_trade/components/buy-sell-market/components/sell/index.vue
  34. 57 75
      src/views/market/spot_trade/components/goods-chart/stock-exchange/index.vue
  35. 69 93
      src/views/market/spot_trade/spot_trade_order_transaction/components/buy-market/index.vue
  36. 72 91
      src/views/market/spot_trade/spot_trade_order_transaction/components/sell-market/index.vue
  37. 57 75
      src/views/market/spot_trade/spot_trade_order_transaction/components/stock-exchange/index.vue
  38. 95 95
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/buy/index.vue
  39. 106 106
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/sell/index.vue
  40. 75 90
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/buy/index.vue
  41. 75 90
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/sell/index.vue
  42. 83 99
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_floating_price/index.vue
  43. 81 97
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_price/index.vue
  44. 75 90
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/buy/index.vue
  45. 75 90
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/sell/index.vue
  46. 83 99
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue
  47. 81 97
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_price/index.vue
  48. 64 86
      src/views/order/commodity_contract/components/commodity_contract_bargain/index.vue
  49. 42 59
      src/views/order/commodity_contract/components/commodity_contract_commission/index.vue
  50. 32 49
      src/views/order/commodity_contract/components/commodity_contract_make_deal/index.vue
  51. 156 173
      src/views/order/commodity_contract/components/commodity_contract_settlement/index.vue
  52. 166 184
      src/views/order/commodity_contract/components/commodity_contract_summary/index.vue
  53. 47 64
      src/views/order/financing_manager/components/financing_manager_contract/index.vue
  54. 45 67
      src/views/order/funding_information/components/funding_information_funding_log/index.vue
  55. 7 32
      src/views/order/funding_information/components/funding_information_funding_summary/index.vue
  56. 20 5
      src/views/order/funding_information/components/funding_information_funding_summary/setup.tsx
  57. 31 31
      src/views/order/futures_information/components/futures_information_entrust/index.vue
  58. 15 73
      src/views/order/futures_information/components/futures_information_position/columns.tsx
  59. 6 18
      src/views/order/futures_information/components/futures_information_position/index.vue
  60. 20 20
      src/views/order/futures_information/components/futures_information_success/index.vue
  61. 79 102
      src/views/order/performance_information/components/performance_information_buy_performance/index.vue
  62. 58 76
      src/views/order/performance_information/components/performance_information_sell_performance/index.vue
  63. 120 140
      src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_bargain/components/bargain_detail/index.vue
  64. 91 91
      src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_bargain/index.vue
  65. 49 49
      src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_deal/index.vue
  66. 37 59
      src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_designated_deal/index.vue
  67. 39 62
      src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/index.vue
  68. 55 72
      src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_pending_order/index.vue
  69. 120 140
      src/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue
  70. 91 91
      src/views/order/spot_warran/components/spot_warrant_bargain/index.vue
  71. 68 68
      src/views/order/spot_warran/components/spot_warrant_deal/index.vue
  72. 30 46
      src/views/order/spot_warran/components/spot_warrant_designated_deal/index.vue
  73. 57 79
      src/views/order/spot_warran/components/spot_warrant_in_and_out_warehouse/index.vue
  74. 39 61
      src/views/order/spot_warran/components/spot_warrant_inventory_summary/index.vue
  75. 55 72
      src/views/order/spot_warran/components/spot_warrant_pending_order/index.vue
  76. 29 46
      src/views/order/spot_warran/components/spot_warrant_spot_details/index.vue
  77. 38 60
      src/views/order/spot_warran/components/spot_warrant_spot_summary/index.vue
  78. 59 78
      src/views/platinum/platinum_agreement/list/tab/index.vue
  79. 70 70
      src/views/platinum/platinum_customer_info/list/normal-use/index.vue
  80. 70 70
      src/views/platinum/platinum_customer_info/list/stop-use/index.vue
  81. 69 69
      src/views/platinum/platinum_customer_info/list/unsubmit/index.vue
  82. 40 47
      src/views/platinum/platinum_document_query/list/order/index.vue
  83. 36 43
      src/views/platinum/platinum_document_query/list/position/index.vue
  84. 39 46
      src/views/platinum/platinum_document_query/list/success/index.vue
  85. 42 49
      src/views/platinum/platinum_document_query/list/waiting/index.vue
  86. 3 22
      src/views/platinum/platinum_financing_information/list/tab/index.vue
  87. 23 31
      src/views/platinum/platinum_fixed_investment_price_query/list/tab/index.vue
  88. 24 31
      src/views/platinum/platinum_fixed_investment_query/list/flow/index.vue
  89. 26 33
      src/views/platinum/platinum_fixed_investment_query/list/plan/index.vue
  90. 55 71
      src/views/platinum/platinum_pick_query/list/tab/index.vue
  91. 64 86
      src/views/platinum/platinum_recharge_withdrawal_review/list/recharge/index.vue
  92. 48 64
      src/views/platinum/platinum_recharge_withdrawal_review/list/withdrawal/index.vue
  93. 2 2
      src/views/report/exposure-report/list/exposure_report/index.vue
  94. 92 108
      src/views/report/finance-report/list/finance_report_finance/index.vue
  95. 2 2
      src/views/report/future_report/list/future_report/index.vue
  96. 98 115
      src/views/report/inventory-report/list/category/index.vue
  97. 91 108
      src/views/report/inventory-report/list/warehouse/index.vue
  98. 101 120
      src/views/report/spot-report/list/spot_report/index.vue
  99. 108 108
      src/views/report/sum_pl_report/list/sum_pl_report/index.vue
  100. 43 52
      src/views/search/inventory/list/inventory_applyrecord/index.vue

+ 1 - 1
generate-code/template.js

@@ -9,7 +9,7 @@ const template = `
                 :pagination="false"
                 :expandedRowKeys="expandedRowKeys"
                 :customRow="Rowclick"
-                rowKey="key"
+                :rowKey="(record,index)=>index"
                 :data-source="tableList">
         </a-table>
         <ControlModal :selectedRow="selectedRow"

+ 2 - 2
generate-code/templates/table.js

@@ -1,5 +1,5 @@
 exports function getTableTemplete(e) {
-	return `
+    return `
 <template>
 <!-- ${e.title} -->
     <div class="${e.code}">
@@ -10,7 +10,7 @@ exports function getTableTemplete(e) {
                 :pagination="false"
                 :expandedRowKeys="expandedRowKeys"
                 :customRow="Rowclick"
-                rowKey="key"
+                :rowKey="(record,index)=>index"
                 :data-source="tableList">
         </a-table>
         <ControlModal :selectedRow="selectedRow"

+ 3 - 4
src/common/setup/table/event.ts

@@ -9,7 +9,7 @@ import { TableEventCB } from './interface';
  */
 export function getTableEvent<T>(param: TableEventCB = {}) {
     // 表格展开行
-    const expandedRowKeys = ref<string[]>([]);
+    const expandedRowKeys = ref<number[]>([]);
     // 表格选中的数据
     const selectedRow = ref<T>()
     // 右键数据
@@ -21,13 +21,12 @@ export function getTableEvent<T>(param: TableEventCB = {}) {
         return {
             onClick: () => {  // 表格点击
                 selectedRow.value = record
-                const key = (record as any).key
                 // 控制表格折腾面板
                 const value = expandedRowKeys.value;
-                if (value && value.length && value[0] === key) {
+                if (value && value.length && value[0] === index) {
                     expandedRowKeys.value = []
                 } else {
-                    expandedRowKeys.value = [key]
+                    expandedRowKeys.value = [index]
                 }
                 param.clickCB && param.clickCB(record)
             },

+ 156 - 0
src/hooks/account/index.ts

@@ -0,0 +1,156 @@
+import { reactive, ref, computed } from 'vue';
+import { queryErmcpTradePosition } from '@/services/go/ermcp/futures';
+import { QueryErmcpTradePositionRsp } from '@/services/go/ermcp/futures/interface';
+import { getQuoteDayInfoByCode } from "@/services/bus/goods";
+import { BuyOrSell } from '@/common/constants/enumCommon';
+import { getTaAccounts } from '@/services/go/TaAccount';
+import { geLoginID_number } from '@/services/bus/login';
+import { Systemparam } from '@/services/go/useInfo/interface';
+import { getSelectedAccountId } from '@/services/bus/account';
+import { TradeAccount, TradePosition } from './interface'
+import APP from '@/services';
+
+// 资金账户列表
+const tradeAccountList: TradeAccount[] = reactive([]);
+// 期货持仓列表
+const tradePositionList: TradePosition[] = reactive([]);
+
+/**
+ * 获取资金账户
+ */
+export function getTradeAccount() {
+    // 加载状态
+    const loading = ref<boolean>(false);
+
+    const initData = () => {
+        tradeAccountList.length = 0;
+        tradePositionList.length = 0;
+        loading.value = true;
+
+        // 系统参数
+        const systemParams = <Systemparam[]>APP.get('systemParams');
+        // 登录ID
+        const loginID = Number(geLoginID_number());
+
+        getTaAccounts({ loginID }).then(async (res) => {
+            for (let i = 0; i < res.length; i++) {
+                const account = res[i];
+                const positionList: TradePosition[] = [];
+
+                // 获取账户下的期货持仓列表
+                await queryErmcpTradePosition({ accountID: account.accountid }).then((res) => {
+                    res.forEach((item) => {
+                        positionList.push({
+                            ...item,
+                            ...calcPrice(item),
+                        })
+                    })
+                })
+
+                // *系统参数"113"(当日浮动盈利是否可用) 0:不可用 1:可用
+                const isAvailable = systemParams.find((e) => e.paramcode === '113')?.paramvalue === '1';
+
+                // 计算总浮动盈亏
+                const positionProfitAndLoss = computed(() => positionList.reduce((res, item) => res + item.positionProfitAndLoss.value, 0));
+
+                // 计算可用资金
+                const availableBalance = computed(() => {
+                    const { currentbalance, usedmargin, freezemargin, freezecharge, otherfreezemargin, outamountfreeze } = account;
+                    const freeze = currentbalance - usedmargin - freezemargin - otherfreezemargin - freezecharge - outamountfreeze;
+
+                    if (positionProfitAndLoss.value < 0 || (positionProfitAndLoss.value >= 0 && isAvailable)) {
+                        // 账户(总浮动盈亏为负) 或(总浮动盈亏为正 且 113 = 1)
+                        // 可用资金=总浮动盈亏+期末余额-占用-冻结-其它冻结-手续费冻结-出金冻结
+                        return positionProfitAndLoss.value + freeze;
+                    } else {
+                        // 可用资金=期末余额-占用-冻结-其它冻结-手续费冻结-出金冻结
+                        return freeze;
+                    }
+                });
+
+                tradeAccountList.push({
+                    ...account,
+                    availableBalance,
+                    positionProfitAndLoss,
+                    positionList,
+                })
+            }
+
+            getPositionList();
+            loading.value = false;
+        })
+    }
+
+    // 获取当前账户期货持仓列表
+    const getPositionList = () => {
+        const account = tradeAccountList.find((account) => account.accountid === getSelectedAccountId());
+        if (account) {
+            tradePositionList.push(...account.positionList);
+        }
+    }
+
+    return {
+        loading,
+        tradeAccountList,
+        tradePositionList,
+        initData,
+        getPositionList,
+    }
+}
+
+/**
+ * 计算价格
+ * @param record 
+ * @returns 
+ */
+function calcPrice(record: QueryErmcpTradePositionRsp) {
+    // 计算开仓均价
+    const openAveragePrice = computed(() => {
+        const { opencost, curpositionqty, agreeunit } = record
+        // 开仓成本 ÷ 期末头寸 ÷ 合约单位
+        return opencost / curpositionqty / agreeunit;
+    })
+
+    // 计算持仓均价
+    const positionAveragePrice = computed(() => {
+        const { positioncost, curpositionqty, agreeunit } = record
+        // 持仓成本 ÷ 期末头寸 ÷ 合约单位
+        return positioncost / curpositionqty / agreeunit;
+    })
+
+    // 计算浮动盈亏
+    const positionProfitAndLoss = computed(() => {
+        const { goodscode, curpositionqty, agreeunit } = record
+        // 获取对应的商品行情
+        const quote = getQuoteDayInfoByCode(goodscode);
+
+        if (quote?.last) {
+            if (record.buyorsell === BuyOrSell.buy) {
+                // 买方向 = (最新价 - 持仓均价) * 买期末头寸 * 合约单位
+                return (quote.last - openAveragePrice.value) * curpositionqty * agreeunit
+            } else {
+                // 卖方向 = (持仓均价 - 最新价) * 卖期末头寸 * 合约单位
+                return (positionAveragePrice.value - quote.last) * curpositionqty * agreeunit
+            }
+        }
+        return record.positionpl
+    })
+
+    // 计算盈亏比例
+    const positionProfitAndLossRate = computed(() => {
+        const { opencost } = record
+        // 持仓盈亏 ÷ 开仓成本
+        const result = positionProfitAndLoss.value / opencost * 100
+        if (isNaN(result)) {
+            return 0
+        }
+        return result
+    })
+
+    return {
+        openAveragePrice,
+        positionAveragePrice,
+        positionProfitAndLoss,
+        positionProfitAndLossRate,
+    }
+}

+ 22 - 0
src/hooks/account/interface.ts

@@ -0,0 +1,22 @@
+import { ComputedRef } from 'vue';
+import { Taaccount } from '@/services/go/TaAccount/interface';
+import { QueryErmcpTradePositionRsp } from '@/services/go/ermcp/futures/interface';
+
+/**
+ * 交易账户
+ */
+export interface TradeAccount extends Taaccount {
+    availableBalance: ComputedRef<number>; // 可用余额/可用资金
+    positionProfitAndLoss: ComputedRef<number>; // 总浮动盈亏/总持仓盈亏
+    positionList: TradePosition[]; // 期货持仓列表
+}
+
+/**
+ * 交易头寸
+ */
+export interface TradePosition extends QueryErmcpTradePositionRsp {
+    openAveragePrice: ComputedRef<number>; // 开仓均价
+    positionAveragePrice: ComputedRef<number>; // 持仓均价
+    positionProfitAndLoss: ComputedRef<number>; // 浮动盈亏/持仓盈亏
+    positionProfitAndLossRate: ComputedRef<number>; // 盈亏比例
+}

+ 1 - 1
src/services/go/TaAccount/index.ts

@@ -34,7 +34,7 @@ export function queryAmountLog(req: QueryAmountLogReq): Promise<QueryAmountLogRs
  * 获取资金账户信息
  * @param req
  */
-export function getTaAccounts(req: GetTaAccountsReq): Promise<Taaccount> {
+export function getTaAccounts(req: GetTaAccountsReq): Promise<Taaccount[]> {
     return commonSearch_go('/TaAccount/GetTaAccounts', req).catch((err) => {
         throw new Error(`获取资金账户信息: ${err}`);
     });

+ 2 - 2
src/views/business/exposure/list/futures/index.vue

@@ -2,7 +2,7 @@
   <!-- 敞口: 期货头寸-->
   <div class="exposure-futures table-height" :loading="loading">
     <filterCustomTable @search="updateColumn"> </filterCustomTable>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false" rowKey="key" :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <template #totalydqty="{ record }">
         <span>{{ record.totalydqty + ' 手' }}</span>
       </template>
@@ -18,7 +18,7 @@
     </a-table>
     <!-- 明细 -->
     <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
-      <a-table :columns="columnsDetail" class="topTable" :pagination="false" rowKey="key" :data-source="detailTableList" :scroll="{ x: '100%', y: '175px' }">
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :data-source="detailTableList" :scroll="{ x: '100%', y: '175px' }">
         <!-- 买卖方向 -->
         <template #buyorsell="{ record }">
           <span>{{ getBuyOrSellName(record.buyorsell) }}</span>

+ 2 - 2
src/views/business/exposure/list/realTime/index.vue

@@ -12,7 +12,7 @@
       <a-button type="button" class="operBtn ant-btn" @click="setTimerAction">{{ isStart ? '停止监控' : '开始监控' }}</a-button>
     </div>
     <filterCustomTable @search="updateColumn" v-else> </filterCustomTable>
-    <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+    <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
       <template v-if="isPingAnOem()" #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
@@ -22,7 +22,7 @@
     </a-table>
     <!-- 明细 -->
     <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
-      <a-table :columns="columnsDetail" class="topTable" :pagination="false" rowKey="key" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
         <!-- 套保品种/代码 -->
         <template #middlegoodsname="{ record }" v-if="!isPingAnOem()">
           <span>{{ record.middlegoodsname + '/' + record.middlegoodscode }}</span>

+ 2 - 2
src/views/business/exposure/list/spot/index.vue

@@ -2,10 +2,10 @@
   <!-- 敞口: 现货头寸-->
   <div class="exposure-spot table-height" :loading="loading">
     <filterCustomTable @search="updateColumn"> </filterCustomTable>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false" rowKey="key" :data-source="tableList"></a-table>
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
     <!-- 明细 -->
     <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
-      <a-table :columns="columnsDetail" class="topTable" :pagination="false" rowKey="key" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"> </a-table>
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"> </a-table>
       <!-- 类型 -->
       <template #logtype="{ record }">
         <span>{{ getLogType(record.logtype) }}</span>

+ 1 - 1
src/views/business/plan/list/audit/index.vue

@@ -2,7 +2,7 @@
   <!-- 计划: 审核中-->
   <div class="plan_uncommitted" :loading="loading">
     <Filter @search="updateColumn"></Filter>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />

+ 51 - 51
src/views/business/plan/list/running/index.vue

@@ -1,23 +1,23 @@
 <template>
-    <!-- 计划: 执行中-->
-    <div class="plan_running" :loading="loading">
-        <Filter @search="updateColumn"></Filter>
-        <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
-            </template>
-            <template #contracttype="{ text }">
-                <a>{{ getPlanContractType(text) }}</a>
-            </template>
-            <template #hedgeplanstatus="{ text }">
-                <a>{{ getPlanStatusName(text) }}</a>
-            </template>
-        </a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
-    </div>
+  <!-- 计划: 执行中-->
+  <div class="plan_running" :loading="loading">
+    <Filter @search="updateColumn"></Filter>
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
+      </template>
+      <template #contracttype="{ text }">
+        <a>{{ getPlanContractType(text) }}</a>
+      </template>
+      <template #hedgeplanstatus="{ text }">
+        <a>{{ getPlanStatusName(text) }}</a>
+      </template>
+    </a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -30,40 +30,40 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getTableButton } from '@/common/setup/table/button';
 
 export default defineComponent({
-    name: EnumRouterName.plan_running,
-    components: {
-        contextMenu,
-        MtpTableButton,
-        Filter,
-        detail: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-    },
-    setup() {
-        // 权限按钮
-        const buttons = getTableButton();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3HedgePlan>();
+  name: EnumRouterName.plan_running,
+  components: {
+    contextMenu,
+    MtpTableButton,
+    Filter,
+    detail: defineAsyncComponent(() => import('../../components/detail/index.vue')),
+  },
+  setup() {
+    // 权限按钮
+    const buttons = getTableButton();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3HedgePlan>();
 
-        // 获取列表数据
-        const queryTableAction = () => queryTable(QueryHedgePlan, '2');
+    // 获取列表数据
+    const queryTableAction = () => queryTable(QueryHedgePlan, '2');
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.plan_running,
-            tableName: 'table_pcweb_hedging_plan',
-            tableFilterKey: ['contracttype', 'hedgeplanno', 'deliverygoodsname'],
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.plan_running,
+      tableName: 'table_pcweb_hedging_plan',
+      tableFilterKey: ['contracttype', 'hedgeplanno', 'deliverygoodsname'],
+      isDetail: true,
+    };
 
-        return {
-            ...handleComposeTable<Ermcp3HedgePlan>(param),
-            loading,
-            tableList,
-            getPlanStatusName,
-            getPlanContractType,
-            queryTable,
-            buttons,
-        };
-    },
+    return {
+      ...handleComposeTable<Ermcp3HedgePlan>(param),
+      loading,
+      tableList,
+      getPlanStatusName,
+      getPlanContractType,
+      queryTable,
+      buttons,
+    };
+  },
 });
 </script>

+ 1 - 1
src/views/business/plan/list/uncommitted/index.vue

@@ -4,7 +4,7 @@
     <Filter @search="updateColumn">
       <mtp-table-button class="btn-list-sticky" :buttons="firstBtn" @click="openComponent" />
     </Filter>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="handleBtnList(record)" :record="record" @click="openComponent" />

+ 1 - 1
src/views/business/purchase/list/all/index.vue

@@ -2,7 +2,7 @@
   <!-- 采购合同: 特点价合同-待交收合同-->
   <div class="purchase-peddding" :loading="loading">
     <filterCustomTable @search="updateColumn"></filterCustomTable>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />

+ 1 - 1
src/views/business/search/plan/index.vue

@@ -2,7 +2,7 @@
   <!-- 现货查询: 购销计划-->
   <div class="search-plan" :loading="loading">
     <filterCustomTable @search="updateColumn"></filterCustomTable>
-    <a-table :columns="columns" class="srcollYTable" :pagination="false" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
+    <a-table :columns="columns" class="srcollYTable" :pagination="false" :rowKey="(record,index)=>index" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>

+ 1 - 1
src/views/business/search/spot/index.vue

@@ -2,7 +2,7 @@
   <!-- 现货查询: 采购合同-销售合同-->
   <div class="spot-contract-search" :loading="loading">
     <filterCustomTable @search="updateColumn"></filterCustomTable>
-    <a-table :columns="columns" class="srcollYTable" :pagination="false" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
+    <a-table :columns="columns" class="srcollYTable" :pagination="false" :rowKey="(record,index)=>index" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>

+ 1 - 1
src/views/business/sell/list/all/index.vue

@@ -2,7 +2,7 @@
   <!-- 销售合同: 特点价合同-待交收合同-->
   <div class="sell-peddding" :loading="loading">
     <filterCustomTable @search="updateColumn"></filterCustomTable>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />

+ 33 - 33
src/views/business/spotmarket/list/price/index.vue

@@ -2,7 +2,7 @@
   <!-- 现货参考价 -->
   <div class="spotmarket_price" :loading="loading">
     <mtp-table-filter @search="updateColumn"></mtp-table-filter>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
@@ -24,41 +24,41 @@ import { columns } from './setup';
 import MtpTableFilter from '../../components/filter/index.vue';
 
 export default defineComponent({
-    name: 'spotmarket_price',
-    components: {
-        contextMenu,
-        MtpTableFilter,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('../../components/detail/index.vue')), // 详情
-        modify: defineAsyncComponent(() => import('../../components/modify/index.vue')), // 修改
-    },
-    setup() {
-        // 权限按钮
-        const buttons = getTableButton();
+  name: 'spotmarket_price',
+  components: {
+    contextMenu,
+    MtpTableFilter,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('../../components/detail/index.vue')), // 详情
+    modify: defineAsyncComponent(() => import('../../components/modify/index.vue')), // 修改
+  },
+  setup() {
+    // 权限按钮
+    const buttons = getTableButton();
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3SpotGoodsPrice>(true, 2);
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3SpotGoodsPrice>(true, 2);
 
-        // 获取列表数据
-        const queryTableAction = () => queryTable(querySpotGoodsPrice);
+    // 获取列表数据
+    const queryTableAction = () => queryTable(querySpotGoodsPrice);
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.goods_info,
-            tableName: 'table_pcweb_hedging_plan',
-            tableFilterKey: ['deliverygoodsid', 'wrstandardid', 'brandid'],
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.goods_info,
+      tableName: 'table_pcweb_hedging_plan',
+      tableFilterKey: ['deliverygoodsid', 'wrstandardid', 'brandid'],
+      isDetail: true,
+    };
 
-        return {
-            ...handleComposeTable<Ermcp3SpotGoodsPrice>(param),
-            loading,
-            tableList,
-            queryTable,
-            buttons,
-            columns,
-        };
-    },
+    return {
+      ...handleComposeTable<Ermcp3SpotGoodsPrice>(param),
+      loading,
+      tableList,
+      queryTable,
+      buttons,
+      columns,
+    };
+  },
 });
 </script>

+ 70 - 70
src/views/information/account_info/compoments/managers-permission/index.vue

@@ -1,22 +1,22 @@
 <template>
-    <!-- 权限设置 -->
-    <a-modal class="commonModal" title="权限设置" v-model:visible="visible" @cancel="cancel" :loading="loading" centered :maskClosable="false" width="890px">
-        <template #footer>
-            <a-button key="submit" type="primary" :loading="loading" @click="cancel">完成</a-button>
-        </template>
-        <a-table :columns="columns" class="dialogTable topTable hiddenFirstCol" :data-source="tableList" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :selectedData="record" :btnList="btnList" class="btn-list-sticky" @onClick="btnClick" />
-            </template>
-            <template #rolestatus="{ text }">
-                <span>{{ text === 1 ? '正常' : '2:停用' }}</span>
-            </template>
-        </a-table>
-        <Modify :selectedData="selectedRow" @refresh="queryTable" />
-        <Delete :selectedData="selectedRow" @refresh="queryTable" />
-        <Detail :selectedData="selectedRow" @refresh="queryTable" />
-    </a-modal>
+  <!-- 权限设置 -->
+  <a-modal class="commonModal" title="权限设置" v-model:visible="visible" @cancel="cancel" :loading="loading" centered :maskClosable="false" width="890px">
+    <template #footer>
+      <a-button key="submit" type="primary" :loading="loading" @click="cancel">完成</a-button>
+    </template>
+    <a-table :columns="columns" class="dialogTable topTable hiddenFirstCol" :data-source="tableList" :rowKey="(record,index)=>index" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :selectedData="record" :btnList="btnList" class="btn-list-sticky" @onClick="btnClick" />
+      </template>
+      <template #rolestatus="{ text }">
+        <span>{{ text === 1 ? '正常' : '2:停用' }}</span>
+      </template>
+    </a-table>
+    <Modify :selectedData="selectedRow" @refresh="queryTable" />
+    <Delete :selectedData="selectedRow" @refresh="queryTable" />
+    <Detail :selectedData="selectedRow" @refresh="queryTable" />
+  </a-modal>
 </template>
 
 <script lang="ts">
@@ -33,60 +33,60 @@ import Delete from '../managers-permission-delete/index.vue';
 import Detail from '../managers-permission-detail/index.vue';
 
 export default defineComponent({
-    name: 'account_info_manager_btn_setting',
-    emits: ['cancel', 'update'],
-    components: {
-        BtnList,
-        Modify,
-        Delete,
-        Detail,
-    },
-    setup(props, context) {
-        // 控制关闭弹窗
-        const { visible, cancel } = _closeModal(context);
-        const loading = ref<boolean>(false);
-        const columns = [
-            { title: '角色名称', dataIndex: 'rolename', key: 'rolename', align: 'center' },
-            { title: '创建人', dataIndex: 'modifiername', key: 'modifiername', align: 'center' },
-            { title: '创建时间', dataIndex: 'modifytime', key: 'modifytime', align: 'center' },
-            { title: '状态', dataIndex: 'rolestatus', key: 'rolestatus', align: 'center', slots: { customRender: 'rolestatus' } },
-        ];
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpRole>({});
-        // 按钮
-        const btnList = ref<btnType[]>([
-            { lable: '修改', callback: openModal('account_info_manager_btn_setting_modify').openAction, className: 'btnPrimary' },
-            { lable: '删除', callback: openModal('account_info_manager_btn_setting_delete').openAction, className: 'btnDanger' },
-            { lable: '详情', callback: openModal('account_info_manager_btn_setting_detail').openAction, className: 'btnDeafault' },
-        ]);
-        const tableList = ref<ErmcpRole[]>([]);
+  name: 'account_info_manager_btn_setting',
+  emits: ['cancel', 'update'],
+  components: {
+    BtnList,
+    Modify,
+    Delete,
+    Detail,
+  },
+  setup(props, context) {
+    // 控制关闭弹窗
+    const { visible, cancel } = _closeModal(context);
+    const loading = ref<boolean>(false);
+    const columns = [
+      { title: '角色名称', dataIndex: 'rolename', key: 'rolename', align: 'center' },
+      { title: '创建人', dataIndex: 'modifiername', key: 'modifiername', align: 'center' },
+      { title: '创建时间', dataIndex: 'modifytime', key: 'modifytime', align: 'center' },
+      { title: '状态', dataIndex: 'rolestatus', key: 'rolestatus', align: 'center', slots: { customRender: 'rolestatus' } },
+    ];
+    // 表格事件
+    const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpRole>({});
+    // 按钮
+    const btnList = ref<btnType[]>([
+      { lable: '修改', callback: openModal('account_info_manager_btn_setting_modify').openAction, className: 'btnPrimary' },
+      { lable: '删除', callback: openModal('account_info_manager_btn_setting_delete').openAction, className: 'btnDanger' },
+      { lable: '详情', callback: openModal('account_info_manager_btn_setting_detail').openAction, className: 'btnDeafault' },
+    ]);
+    const tableList = ref<ErmcpRole[]>([]);
 
-        function queryTable() {
-            queryResultLoadingAndInfo(QueryAccMgrRole, loading).then((res) => {
-                console.log(res);
+    function queryTable() {
+      queryResultLoadingAndInfo(QueryAccMgrRole, loading).then((res) => {
+        console.log(res);
 
-                tableList.value = res.map((e: ErmcpRole, i: number) => Object.assign(e, { key: `${i}` }));
-            });
-        }
-        watchEffect(() => {
-            if (visible.value) {
-                queryTable();
-            }
-        });
-        return {
-            visible,
-            cancel,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            btnClick,
-            queryTable,
-            loading,
-            tableList,
-            columns,
-            btnList,
-        };
-    },
+        tableList.value = res.map((e: ErmcpRole, i: number) => Object.assign(e, { key: `${i}` }));
+      });
+    }
+    watchEffect(() => {
+      if (visible.value) {
+        queryTable();
+      }
+    });
+    return {
+      visible,
+      cancel,
+      expandedRowKeys,
+      selectedRow,
+      Rowclick,
+      btnClick,
+      queryTable,
+      loading,
+      tableList,
+      columns,
+      btnList,
+    };
+  },
 });
 </script>
 

+ 1 - 1
src/views/information/custom/index.vue

@@ -4,7 +4,7 @@
     <Filter @search="search">
       <mtp-table-button class="btn-list-sticky" :buttons="addButton" @click="openComponent" />
     </Filter>
-    <a-table :columns="getColumns(columns)" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="getColumns(columns)" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="handleBtnList(buttons,record)" :record="record" @click="openComponent" />

+ 69 - 69
src/views/information/spot-contract/list/audit/index.vue

@@ -2,7 +2,7 @@
   <!-- 现货合同: 待审核-已审核-->
   <div class="spot-contract-peddding" :loading="loading">
     <filterCustomTable @search="updateColumn"></filterCustomTable>
-    <a-table :columns="columns" class="topTable" :pagination="false" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
+    <a-table :columns="columns" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
       <!-- 额外的展开行 -->
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
@@ -64,78 +64,78 @@ import { useRoute } from 'vue-router';
 import moment from 'moment';
 
 export default defineComponent({
-    name: EnumRouterName.spot_contract_checkpending,
-    components: {
-        filterCustomTable,
-        contextMenu,
-        detail: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-        check: defineAsyncComponent(() => import('../../components/check/index.vue')), // 审核
-        cancel: defineAsyncComponent(() => import('../../components/cancel/index.vue')), // 撤销
-        MtpTableButton,
-    },
-    setup() {
-        const { name: routeName } = useRoute();
-        // 权限按钮
-        const buttons = getTableButton();
+  name: EnumRouterName.spot_contract_checkpending,
+  components: {
+    filterCustomTable,
+    contextMenu,
+    detail: defineAsyncComponent(() => import('../../components/detail/index.vue')),
+    check: defineAsyncComponent(() => import('../../components/check/index.vue')), // 审核
+    cancel: defineAsyncComponent(() => import('../../components/cancel/index.vue')), // 撤销
+    MtpTableButton,
+  },
+  setup() {
+    const { name: routeName } = useRoute();
+    // 权限按钮
+    const buttons = getTableButton();
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3ContractRsp>();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3ContractRsp>();
 
-        // 获取列表数据
-        const queryTableAction = () => {
-            switch (routeName) {
-                case 'contract_checkpending':
-                    queryTable(QuerySpotContract, { querytype: 2 }).then((res) => {
-                        tableList.value.sort((a, b) => {
-                            return moment(b.createtime).valueOf() - moment(a.createtime).valueOf();
-                        });
-                    });
-                    break;
-                case 'contract_performance':
-                    queryTable(QuerySpotContract, { querytype: 3 });
-                    break;
-            }
-            // 获取 业务账户
-            queryBusinessManager();
-        };
+    // 获取列表数据
+    const queryTableAction = () => {
+      switch (routeName) {
+        case 'contract_checkpending':
+          queryTable(QuerySpotContract, { querytype: 2 }).then((res) => {
+            tableList.value.sort((a, b) => {
+              return moment(b.createtime).valueOf() - moment(a.createtime).valueOf();
+            });
+          });
+          break;
+        case 'contract_performance':
+          queryTable(QuerySpotContract, { querytype: 3 });
+          break;
+      }
+      // 获取 业务账户
+      queryBusinessManager();
+    };
 
-        // 获取表头名称
-        const getTableName = () => {
-            switch (routeName) {
-                // 现货合同待审核
-                case 'contract_checkpending':
-                    return 'table_pcweb_delivery_dsh';
-                // 现货合同已审核
-                case 'contract_performance':
-                    return 'table_pcweb_delivery_ysh';
-            }
-        };
+    // 获取表头名称
+    const getTableName = () => {
+      switch (routeName) {
+        // 现货合同待审核
+        case 'contract_checkpending':
+          return 'table_pcweb_delivery_dsh';
+        // 现货合同已审核
+        case 'contract_performance':
+          return 'table_pcweb_delivery_ysh';
+      }
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.spot_contract_checkpending,
-            tableName: getTableName(),
-            tableFilterKey: ['contracttype', 'pricetype', 'contractno', 'negative'],
-            tableFilterCB,
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.spot_contract_checkpending,
+      tableName: getTableName(),
+      tableFilterKey: ['contracttype', 'pricetype', 'contractno', 'negative'],
+      tableFilterCB,
+      isDetail: true,
+    };
 
-        return {
-            ...handleComposeTable<Ermcp3ContractRsp>(param),
-            loading,
-            tableList,
-            queryTable,
-            getBizTypeName,
-            getPriceTypeName,
-            getContractStatusName,
-            getContractTypeName,
-            formatTime,
-            formatValue,
-            findManagerName,
-            handleEnumdic,
-            buttons,
-        };
-    },
+    return {
+      ...handleComposeTable<Ermcp3ContractRsp>(param),
+      loading,
+      tableList,
+      queryTable,
+      getBizTypeName,
+      getPriceTypeName,
+      getContractStatusName,
+      getContractTypeName,
+      formatTime,
+      formatValue,
+      findManagerName,
+      handleEnumdic,
+      buttons,
+    };
+  },
 });
 </script>

+ 1 - 1
src/views/information/spot-contract/list/purchase/index.vue

@@ -4,7 +4,7 @@
     <filterCustomTable @search="updateColumn">
       <mtp-table-button :buttons="firstBtn" @click="openComponent" />
     </filterCustomTable>
-    <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+    <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
       <!-- 额外的展开行 -->
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">

+ 58 - 58
src/views/information/spot-contract/list/sell/index.vue

@@ -4,7 +4,7 @@
     <filterCustomTable @search="updateColumn">
       <mtp-table-button :buttons="firstBtn" @click="openComponent" />
     </filterCustomTable>
-    <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+    <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
       <!-- 额外的展开行 -->
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
@@ -66,65 +66,65 @@ import { getTableButton } from '@/common/setup/table/button';
 import { useRoute } from 'vue-router';
 
 export default defineComponent({
-    name: EnumRouterName.spot_contract_unsubmitted,
-    components: {
-        filterCustomTable,
-        contextMenu,
-        detail: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-        add: defineAsyncComponent(() => import('../../components/add/index.vue')),
-        resubmit: defineAsyncComponent(() => import('../../components/modify/index.vue')),
-        cancel: defineAsyncComponent(() => import('../../components/delete/index.vue')),
-        MtpTableButton,
-    },
-    setup() {
-        const { name: routeName } = useRoute();
-        // 权限按钮
-        const firstBtn = getTableButton(['add']);
-        const secondBtn = getTableButton(['add'], true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3ContractRsp>();
+  name: EnumRouterName.spot_contract_unsubmitted,
+  components: {
+    filterCustomTable,
+    contextMenu,
+    detail: defineAsyncComponent(() => import('../../components/detail/index.vue')),
+    add: defineAsyncComponent(() => import('../../components/add/index.vue')),
+    resubmit: defineAsyncComponent(() => import('../../components/modify/index.vue')),
+    cancel: defineAsyncComponent(() => import('../../components/delete/index.vue')),
+    MtpTableButton,
+  },
+  setup() {
+    const { name: routeName } = useRoute();
+    // 权限按钮
+    const firstBtn = getTableButton(['add']);
+    const secondBtn = getTableButton(['add'], true);
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3ContractRsp>();
 
-        // 获取列表数据
-        const queryTableAction = () => {
-            switch (routeName) {
-                // 新增合同
-                case 'sell_contract':
-                    queryTable(QuerySpotContract, { contracttype: -1, querytype: '1,2' });
-                    break;
-                // 已完结合同
-                case 'sell_finish':
-                    queryTable(QuerySpotContract, { contracttype: -1, querytype: '4' });
-                    break;
-            }
-            // 获取 业务账户
-            queryBusinessManager();
-        };
+    // 获取列表数据
+    const queryTableAction = () => {
+      switch (routeName) {
+        // 新增合同
+        case 'sell_contract':
+          queryTable(QuerySpotContract, { contracttype: -1, querytype: '1,2' });
+          break;
+        // 已完结合同
+        case 'sell_finish':
+          queryTable(QuerySpotContract, { contracttype: -1, querytype: '4' });
+          break;
+      }
+      // 获取 业务账户
+      queryBusinessManager();
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.spot_contract_unsubmitted,
-            tableName: 'table_pcweb_delivery',
-            tableFilterKey: ['pricetype', 'contractno', 'buyusername'],
-            tableFilterCB,
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.spot_contract_unsubmitted,
+      tableName: 'table_pcweb_delivery',
+      tableFilterKey: ['pricetype', 'contractno', 'buyusername'],
+      tableFilterCB,
+      isDetail: true,
+    };
 
-        return {
-            ...handleComposeTable<Ermcp3ContractRsp>(param),
-            loading,
-            tableList,
-            getBizTypeName,
-            getPriceTypeName,
-            getContractStatusName,
-            getContractTypeName,
-            formatTime,
-            formatValue,
-            findManagerName,
-            handleEnumdic,
-            firstBtn,
-            secondBtn,
-        };
-    },
+    return {
+      ...handleComposeTable<Ermcp3ContractRsp>(param),
+      loading,
+      tableList,
+      getBizTypeName,
+      getPriceTypeName,
+      getContractStatusName,
+      getContractTypeName,
+      formatTime,
+      formatValue,
+      findManagerName,
+      handleEnumdic,
+      firstBtn,
+      secondBtn,
+    };
+  },
 });
 </script>

+ 82 - 82
src/views/information/warehouse-info/list/normal-use/index.vue

@@ -1,31 +1,31 @@
 <template>
-    <!-- 仓库信息: 正常 -->
-    <div class="warehouse-info-normal" :loading="loading">
-        <Filter @search="updateColumn">
-            <mtp-table-button class="btn-list-sticky" :buttons="addButton" @click="openComponent" />
-        </Filter>
-        <a-table :columns="isPingAnOem() ? pingan_cwarehousecolumn() : columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
-            </template>
-            <template v-if="isPingAnOem()" #index="{ index }">
-                <span>{{ index + 1 }}</span>
-            </template>
-            <template #warehousetype="{ text }">
-                <span>{{ getWareHouseTypeName(text) }}</span>
-            </template>
-            <template #warehousestatus="{ text }">
-                <span>{{ gerWareHouseStatusName(text) }}</span>
-            </template>
-            <template #address="{ record }">
-                <span>{{ getProvinceName(record.provinceid) + getCityName(record.cityid) + getDistrictName(record.districtid) + record.address }}</span>
-            </template>
-        </a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
-    </div>
+  <!-- 仓库信息: 正常 -->
+  <div class="warehouse-info-normal" :loading="loading">
+    <Filter @search="updateColumn">
+      <mtp-table-button class="btn-list-sticky" :buttons="addButton" @click="openComponent" />
+    </Filter>
+    <a-table :columns="isPingAnOem() ? pingan_cwarehousecolumn() : columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
+      </template>
+      <template v-if="isPingAnOem()" #index="{ index }">
+        <span>{{ index + 1 }}</span>
+      </template>
+      <template #warehousetype="{ text }">
+        <span>{{ getWareHouseTypeName(text) }}</span>
+      </template>
+      <template #warehousestatus="{ text }">
+        <span>{{ gerWareHouseStatusName(text) }}</span>
+      </template>
+      <template #address="{ record }">
+        <span>{{ getProvinceName(record.provinceid) + getCityName(record.cityid) + getDistrictName(record.districtid) + record.address }}</span>
+      </template>
+    </a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -42,64 +42,64 @@ import { useRoute } from 'vue-router';
 import { getAddress } from '@/services/go/adress';
 
 export default defineComponent({
-    name: 'warehouse-info-normal',
-    components: {
-        contextMenu,
-        MtpTableButton,
-        Filter,
-        detail: defineAsyncComponent(() => import('../../compoments/detail/index.vue')), // 详情
-        add: defineAsyncComponent(() => import('../../compoments/add/index.vue')), // 新增
-        modify: defineAsyncComponent(() => import('../../compoments/modify/index.vue')), // 修改
-        disable: defineAsyncComponent(() => import('../../compoments/disable/index.vue')), // 停用
-        recover: defineAsyncComponent(() => import('../../compoments/recover/index.vue')), // 恢复
-    },
-    setup() {
-        const { name: routeName } = useRoute();
-        // 新增权限按钮
-        const addButton = getTableButton(['add']);
-        // 表格权限按钮
-        const buttons = getTableButton(['add'], true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<ErmcpWareHouseInfo>();
+  name: 'warehouse-info-normal',
+  components: {
+    contextMenu,
+    MtpTableButton,
+    Filter,
+    detail: defineAsyncComponent(() => import('../../compoments/detail/index.vue')), // 详情
+    add: defineAsyncComponent(() => import('../../compoments/add/index.vue')), // 新增
+    modify: defineAsyncComponent(() => import('../../compoments/modify/index.vue')), // 修改
+    disable: defineAsyncComponent(() => import('../../compoments/disable/index.vue')), // 停用
+    recover: defineAsyncComponent(() => import('../../compoments/recover/index.vue')), // 恢复
+  },
+  setup() {
+    const { name: routeName } = useRoute();
+    // 新增权限按钮
+    const addButton = getTableButton(['add']);
+    // 表格权限按钮
+    const buttons = getTableButton(['add'], true);
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<ErmcpWareHouseInfo>();
 
-        // 获取列表数据
-        const queryTableAction = () => {
-            switch (routeName) {
-                // 正常
-                case 'warehouse_normal':
-                    queryTable(QueryWareHouse, '1');
-                    break;
-                // 停用
-                case 'warehouse_disabled':
-                    queryTable(QueryWareHouse, '2');
-                    break;
-            }
-        };
+    // 获取列表数据
+    const queryTableAction = () => {
+      switch (routeName) {
+        // 正常
+        case 'warehouse_normal':
+          queryTable(QueryWareHouse, '1');
+          break;
+        // 停用
+        case 'warehouse_disabled':
+          queryTable(QueryWareHouse, '2');
+          break;
+      }
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_info_normal,
-            tableName: 'table_pcweb_warehouse',
-            tableFilterKey: ['warehousetype', 'warehousename', 'address'],
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_info_normal,
+      tableName: 'table_pcweb_warehouse',
+      tableFilterKey: ['warehousetype', 'warehousename', 'address'],
+      isDetail: true,
+    };
 
-        return {
-            ...handleComposeTable<ErmcpWareHouseInfo>(param),
-            loading,
-            tableList,
-            updateColumn: () => {},
-            getWareHouseTypeName,
-            gerWareHouseStatusName,
-            queryTable,
-            isPingAnOem,
-            pingan_cwarehousecolumn,
-            buttons,
-            addButton,
-            ...getAddress(),
+    return {
+      ...handleComposeTable<ErmcpWareHouseInfo>(param),
+      loading,
+      tableList,
+      updateColumn: () => { },
+      getWareHouseTypeName,
+      gerWareHouseStatusName,
+      queryTable,
+      isPingAnOem,
+      pingan_cwarehousecolumn,
+      buttons,
+      addButton,
+      ...getAddress(),
 
-        };
-    },
+    };
+  },
 });
 </script>

+ 71 - 71
src/views/information/warehouse-info/list/stop-use/index.vue

@@ -1,32 +1,32 @@
 <template>
-    <div style="background: red; color: #fff; padding: 5px 0">待修改</div>
-    <!-- 仓库信息: 停用 -->
-    <div class="warehouse-info-stop">
-        <filterCustomTable @search="updateColumn">
-            <BtnList :btnList="commonBtn" />
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns" class="topTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{}">
-                    <BtnList :btnList="forDataBtn" />
-                </template>
-                <template v-if="isPingAnOem()" #index="{ index }">
-                    <span>{{ index + 1 }}</span>
-                </template>
-                <template #warehousetype="{ text }">
-                    <span>{{ getWareHouseTypeName(text) }}</span>
-                </template>
-                <template #warehousestatus="{ text }">
-                    <span>{{ gerWareHouseStatusName(text) }}</span>
-                </template>
-            </a-table>
-        </contextMenu>
-        <!-- 恢复仓库信息 -->
-        <Recover :selectedRow="selectedRow" @refresh="queryTable" />
-        <!-- 仓库信息详情 -->
-        <Detail :selectedRow="selectedRow" @refresh="queryTable" />
-    </div>
+  <div style="background: red; color: #fff; padding: 5px 0">待修改</div>
+  <!-- 仓库信息: 停用 -->
+  <div class="warehouse-info-stop">
+    <filterCustomTable @search="updateColumn">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns" class="topTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{}">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <template v-if="isPingAnOem()" #index="{ index }">
+          <span>{{ index + 1 }}</span>
+        </template>
+        <template #warehousetype="{ text }">
+          <span>{{ getWareHouseTypeName(text) }}</span>
+        </template>
+        <template #warehousestatus="{ text }">
+          <span>{{ gerWareHouseStatusName(text) }}</span>
+        </template>
+      </a-table>
+    </contextMenu>
+    <!-- 恢复仓库信息 -->
+    <Recover :selectedRow="selectedRow" @refresh="queryTable" />
+    <!-- 仓库信息详情 -->
+    <Detail :selectedRow="selectedRow" @refresh="queryTable" />
+  </div>
 </template>
 
 <script lang="ts">
@@ -37,51 +37,51 @@ import { isPingAnOem } from '@/common/config/projectName';
 import { pingan_cwarehousecolumn } from '../setup';
 
 export default defineComponent({
-    name: 'warehouse-info-stop',
-    components: {
-        contextMenu,
-        filterCustomTable,
-        Detail,
-        Recover,
-        BtnList,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<ErmcpWareHouseInfo>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('warehouse_info_disabled', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList('2');
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
-            // 平安表头
-            if (isPingAnOem()) {
-                columns.value = pingan_cwarehousecolumn();
-            }
-        });
+  name: 'warehouse-info-stop',
+  components: {
+    contextMenu,
+    filterCustomTable,
+    Detail,
+    Recover,
+    BtnList,
+  },
+  setup() {
+    // 表头数据
+    const { columns, registerColumn, updateColumn } = getTableColumns();
+    // 表格事件
+    const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<ErmcpWareHouseInfo>({});
+    // 表格操作按钮列表
+    const { commonBtn, forDataBtn } = getBtnList('warehouse_info_disabled', true);
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList('2');
+    initData(() => {
+      // 获取列表数据
+      queryTable();
+      // 注册表头信息 过滤
+      registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
+      // 平安表头
+      if (isPingAnOem()) {
+        columns.value = pingan_cwarehousecolumn();
+      }
+    });
 
-        return {
-            columns,
+    return {
+      columns,
 
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            updateColumn,
-            getWareHouseTypeName,
-            gerWareHouseStatusName,
-            queryTable,
-            isPingAnOem,
-        };
-    },
+      expandedRowKeys,
+      selectedRow,
+      Rowclick,
+      commonBtn,
+      forDataBtn,
+      loading,
+      tableList,
+      updateColumn,
+      getWareHouseTypeName,
+      gerWareHouseStatusName,
+      queryTable,
+      isPingAnOem,
+    };
+  },
 });
 </script>
 

+ 84 - 84
src/views/manage/business-review/list/settlement/index.vue

@@ -2,7 +2,7 @@
   <!-- 管理-业务审核-交收 -->
   <div class="business-review-js" :loading="loading">
     <Filter @search="updateColumn"></Filter>
-    <a-table :columns="columns" class="topTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :data-source="tableList">
+    <a-table :columns="columns" class="topTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
@@ -44,97 +44,97 @@ import { QryBussinessJsRsp } from '@/services/go/ermcp/business-review/interface
 import { useRoute } from 'vue-router';
 
 export default defineComponent({
-    name: 'business-review-js',
-    components: {
-        contextMenu,
-        Filter,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('../../components/settlementDetail/index.vue')),
-        check: defineAsyncComponent(() => import('../../components/settlementAudit/index.vue')),
-        cancel: defineAsyncComponent(() => import('../../components/settlementCancel/index.vue')),
-    },
-    setup() {
-        const { name: routeName } = useRoute();
-        // 权限按钮
-        const buttons = getTableButton();
+  name: 'business-review-js',
+  components: {
+    contextMenu,
+    Filter,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('../../components/settlementDetail/index.vue')),
+    check: defineAsyncComponent(() => import('../../components/settlementAudit/index.vue')),
+    cancel: defineAsyncComponent(() => import('../../components/settlementCancel/index.vue')),
+  },
+  setup() {
+    const { name: routeName } = useRoute();
+    // 权限按钮
+    const buttons = getTableButton();
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QryBussinessJsRsp>();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QryBussinessJsRsp>();
 
-        // 获取列表数据
-        const queryTableAction = () => {
-            switch (routeName) {
-                case 'settlement_checkpending':
-                    queryTable(QueryBusinessJs, { applystatus: '1' });
-                    break;
-                case 'settlement_performance':
-                    queryTable(QueryBusinessJs, { applystatus: '2,3' });
-                    break;
-            }
-        };
+    // 获取列表数据
+    const queryTableAction = () => {
+      switch (routeName) {
+        case 'settlement_checkpending':
+          queryTable(QueryBusinessJs, { applystatus: '1' });
+          break;
+        case 'settlement_performance':
+          queryTable(QueryBusinessJs, { applystatus: '2,3' });
+          break;
+      }
+    };
 
-        // 获取表头名称
-        const getTableName = () => {
-            switch (routeName) {
-                // 交收待审核
-                case 'settlement_checkpending':
-                    return 'table_pcweb_business_aduit_js';
-                // 交收未审核
-                case 'settlement_performance':
-                    return 'table_pcweb_business_aduit_yjs';
-            }
-        };
+    // 获取表头名称
+    const getTableName = () => {
+      switch (routeName) {
+        // 交收待审核
+        case 'settlement_checkpending':
+          return 'table_pcweb_business_aduit_js';
+        // 交收未审核
+        case 'settlement_performance':
+          return 'table_pcweb_business_aduit_yjs';
+      }
+    };
 
-        const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
-            if (e.columnfield === 'buyusernameOrsellusername') {
-                item.onFilter = (value: string, record: QryBussinessJsRsp) => {
-                    const { contracttype, buyusername, sellusername } = record;
-                    if (contracttype === 1) {
-                        // 采购
-                        return sellusername.includes(value);
-                    } else {
-                        return buyusername.includes(value);
-                    }
-                };
-                item.filteredValue = filtered.buyusernameOrsellusername || null;
-            }
+    const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
+      if (e.columnfield === 'buyusernameOrsellusername') {
+        item.onFilter = (value: string, record: QryBussinessJsRsp) => {
+          const { contracttype, buyusername, sellusername } = record;
+          if (contracttype === 1) {
+            // 采购
+            return sellusername.includes(value);
+          } else {
+            return buyusername.includes(value);
+          }
         };
+        item.filteredValue = filtered.buyusernameOrsellusername || null;
+      }
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.business_review_settlement,
-            tableName: getTableName(),
-            tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
-            tableFilterCB: filtrFn,
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.business_review_settlement,
+      tableName: getTableName(),
+      tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
+      tableFilterCB: filtrFn,
+      isDetail: true,
+    };
 
-        function handlePermissionBtn(btnList: BtnListType[], item: QryBussinessJsRsp) {
-            if (item) {
-                const { applystatus } = item;
-                if (applystatus === 1) {
-                    return btnList;
-                } else {
-                    return btnList.filter((e) => e.code === 'detail');
-                }
-            } else {
-                return [];
-            }
+    function handlePermissionBtn(btnList: BtnListType[], item: QryBussinessJsRsp) {
+      if (item) {
+        const { applystatus } = item;
+        if (applystatus === 1) {
+          return btnList;
+        } else {
+          return btnList.filter((e) => e.code === 'detail');
         }
+      } else {
+        return [];
+      }
+    }
 
-        return {
-            ...handleComposeTable<QryBussinessJsRsp>(param),
-            handlePermissionBtn,
-            getAnalogueName,
-            loading,
-            tableList,
-            getPriceTypeName,
-            getContractTypeName,
-            getApplyStatusName,
-            invoiceStatusName,
-            buttons,
-        };
-    },
+    return {
+      ...handleComposeTable<QryBussinessJsRsp>(param),
+      handlePermissionBtn,
+      getAnalogueName,
+      loading,
+      tableList,
+      getPriceTypeName,
+      getContractTypeName,
+      getApplyStatusName,
+      invoiceStatusName,
+      buttons,
+    };
+  },
 });
 </script>

+ 93 - 93
src/views/manage/business-review/list/someprice/index.vue

@@ -2,7 +2,7 @@
   <!-- 管理-业务审核-点价 -->
   <div class="business-review-dj" :loading="loading">
     <Filter @search="updateColumn"></Filter>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
@@ -44,105 +44,105 @@ import { useRoute } from 'vue-router';
 import moment from 'moment';
 
 export default defineComponent({
-    name: 'business-review-dj',
-    components: {
-        contextMenu,
-        Filter,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('../../components/somepriceDetail/index.vue')),
-        check: defineAsyncComponent(() => import('../../components/somepriceAudit/index.vue')),
-        cancel: defineAsyncComponent(() => import('../../components/somepriceCancel/index.vue')),
-    },
-    setup() {
-        const { name: routeName } = useRoute();
-        // 权限按钮
-        const buttons = getTableButton();
+  name: 'business-review-dj',
+  components: {
+    contextMenu,
+    Filter,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('../../components/somepriceDetail/index.vue')),
+    check: defineAsyncComponent(() => import('../../components/somepriceAudit/index.vue')),
+    cancel: defineAsyncComponent(() => import('../../components/somepriceCancel/index.vue')),
+  },
+  setup() {
+    const { name: routeName } = useRoute();
+    // 权限按钮
+    const buttons = getTableButton();
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QryBusinessDjRsp>();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QryBusinessDjRsp>();
 
-        // console.log(typeof tableList,11)
-        // console.log(tableList.value.applytime,11)
-        // 获取列表数据
-        const queryTableAction = () => {
-            switch (routeName) {
-                case 'someprice_checkpending':
-                    queryTable(QueryBusinessDj, { applystatus: '1' }).then((res) => {
-                        tableList.value.sort((a, b) => {
-                            return moment(b.audittime).valueOf() - moment(a.audittime).valueOf();
-                        });
-                    });
-                    break;
-                case 'someprice_performance':
-                    queryTable(QueryBusinessDj, { applystatus: '2,3' }).then((res) => {
-                        tableList.value.sort((a, b) => {
-                            return moment(b.audittime).valueOf() - moment(a.audittime).valueOf();
-                        });
-                    });
-            }
-        };
+    // console.log(typeof tableList,11)
+    // console.log(tableList.value.applytime,11)
+    // 获取列表数据
+    const queryTableAction = () => {
+      switch (routeName) {
+        case 'someprice_checkpending':
+          queryTable(QueryBusinessDj, { applystatus: '1' }).then((res) => {
+            tableList.value.sort((a, b) => {
+              return moment(b.audittime).valueOf() - moment(a.audittime).valueOf();
+            });
+          });
+          break;
+        case 'someprice_performance':
+          queryTable(QueryBusinessDj, { applystatus: '2,3' }).then((res) => {
+            tableList.value.sort((a, b) => {
+              return moment(b.audittime).valueOf() - moment(a.audittime).valueOf();
+            });
+          });
+      }
+    };
 
-        // 获取表头名称
-        const getTableName = () => {
-            switch (routeName) {
-                // 业务审核
-                case 'someprice_checkpending':
-                    return 'table_pcweb_business_aduit_dj';
-                // 业务未审核
-                case 'someprice_performance':
-                    return 'table_pcweb_business_aduit_ydj';
-            }
-        };
+    // 获取表头名称
+    const getTableName = () => {
+      switch (routeName) {
+        // 业务审核
+        case 'someprice_checkpending':
+          return 'table_pcweb_business_aduit_dj';
+        // 业务未审核
+        case 'someprice_performance':
+          return 'table_pcweb_business_aduit_ydj';
+      }
+    };
 
-        const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
-            if (e.columnfield === 'buyusernameOrsellusername') {
-                item.onFilter = (value: string, record: QryBusinessDjRsp) => {
-                    const { contracttype, buyusername, sellusername } = record;
-                    if (contracttype === 1) {
-                        // 采购
-                        return sellusername.includes(value);
-                    } else {
-                        return buyusername.includes(value);
-                    }
-                };
-                item.filteredValue = filtered.buyusernameOrsellusername || null;
-            }
+    const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
+      if (e.columnfield === 'buyusernameOrsellusername') {
+        item.onFilter = (value: string, record: QryBusinessDjRsp) => {
+          const { contracttype, buyusername, sellusername } = record;
+          if (contracttype === 1) {
+            // 采购
+            return sellusername.includes(value);
+          } else {
+            return buyusername.includes(value);
+          }
         };
+        item.filteredValue = filtered.buyusernameOrsellusername || null;
+      }
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.business_review_someprice,
-            tableName: getTableName(),
-            tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
-            tableFilterCB: filtrFn,
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.business_review_someprice,
+      tableName: getTableName(),
+      tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
+      tableFilterCB: filtrFn,
+      isDetail: true,
+    };
 
-        function handlePermissionBtn(btnList: BtnListType[], item: QryBusinessDjRsp) {
-            if (item) {
-                const { applystatus } = item;
-                if (applystatus === 1) {
-                    return btnList;
-                } else {
-                    return btnList.filter((e) => e.code === 'detail');
-                }
-            } else {
-                return [];
-            }
+    function handlePermissionBtn(btnList: BtnListType[], item: QryBusinessDjRsp) {
+      if (item) {
+        const { applystatus } = item;
+        if (applystatus === 1) {
+          return btnList;
+        } else {
+          return btnList.filter((e) => e.code === 'detail');
         }
-        return {
-            ...handleComposeTable<QryBusinessDjRsp>(param),
-            handlePermissionBtn,
-            loading,
-            tableList,
-            getPriceTypeName,
-            getApplyStatusName,
-            getContractTypeName,
-            getContractStatusName,
-            getAnalogueName,
-            buttons,
-        };
-    },
+      } else {
+        return [];
+      }
+    }
+    return {
+      ...handleComposeTable<QryBusinessDjRsp>(param),
+      handlePermissionBtn,
+      loading,
+      tableList,
+      getPriceTypeName,
+      getApplyStatusName,
+      getContractTypeName,
+      getContractStatusName,
+      getAnalogueName,
+      buttons,
+    };
+  },
 });
 </script>

+ 84 - 84
src/views/manage/finance-review/list/funds/index.vue

@@ -2,7 +2,7 @@
   <!-- 管理 - 财务审核 - 款项 -->
   <div class="business-review-js" :loading="loading">
     <Filter @search="updateColumn"></Filter>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
@@ -56,97 +56,97 @@ import { QryBussinessKxRsp } from '@/services/go/ermcp/finance-review/interface'
 import { useRoute } from 'vue-router';
 
 export default defineComponent({
-    name: 'business-review-js',
-    components: {
-        contextMenu,
-        Filter,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('../../components/fundsDetail/index.vue')),
-        check: defineAsyncComponent(() => import('../../components/fundsAudit/index.vue')),
-        cancel: defineAsyncComponent(() => import('../../components/fundsCancel/index.vue')),
-    },
-    setup() {
-        const { name: routeName } = useRoute();
-        // 权限按钮
-        const buttons = getTableButton();
+  name: 'business-review-js',
+  components: {
+    contextMenu,
+    Filter,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('../../components/fundsDetail/index.vue')),
+    check: defineAsyncComponent(() => import('../../components/fundsAudit/index.vue')),
+    cancel: defineAsyncComponent(() => import('../../components/fundsCancel/index.vue')),
+  },
+  setup() {
+    const { name: routeName } = useRoute();
+    // 权限按钮
+    const buttons = getTableButton();
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QryBussinessKxRsp>();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QryBussinessKxRsp>();
 
-        // 获取列表数据
-        const queryTableAction = () => {
-            switch (routeName) {
-                case 'funds_checkpending':
-                    queryTable(QueryBusinessKx, { applystatus: '1' });
-                    break;
-                case 'funds_performance':
-                    queryTable(QueryBusinessKx, { applystatus: '2,3' });
-                    break;
-            }
-        };
+    // 获取列表数据
+    const queryTableAction = () => {
+      switch (routeName) {
+        case 'funds_checkpending':
+          queryTable(QueryBusinessKx, { applystatus: '1' });
+          break;
+        case 'funds_performance':
+          queryTable(QueryBusinessKx, { applystatus: '2,3' });
+          break;
+      }
+    };
 
-        const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
-            if (e.columnfield === 'buyusernameOrsellusername') {
-                item.onFilter = (value: string, record: QryBussinessKxRsp) => {
-                    const { contracttype, buyusername, sellusername } = record;
-                    if (contracttype === 1) {
-                        // 采购
-                        return sellusername.includes(value);
-                    } else {
-                        return buyusername.includes(value);
-                    }
-                };
-                item.filteredValue = filtered.buyusernameOrsellusername || null;
-            }
+    const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
+      if (e.columnfield === 'buyusernameOrsellusername') {
+        item.onFilter = (value: string, record: QryBussinessKxRsp) => {
+          const { contracttype, buyusername, sellusername } = record;
+          if (contracttype === 1) {
+            // 采购
+            return sellusername.includes(value);
+          } else {
+            return buyusername.includes(value);
+          }
         };
+        item.filteredValue = filtered.buyusernameOrsellusername || null;
+      }
+    };
 
-        // 获取表头名称
-        const getTableName = () => {
-            switch (routeName) {
-                // 业务审核-发票
-                case 'funds_checkpending':
-                    return 'table_pcweb_fincial_aduit_kx';
-                // 业务审核-发票-已审核
-                case 'funds_performance':
-                    return 'table_pcweb_fincial_aduit_ykx';
-            }
-        };
+    // 获取表头名称
+    const getTableName = () => {
+      switch (routeName) {
+        // 业务审核-发票
+        case 'funds_checkpending':
+          return 'table_pcweb_fincial_aduit_kx';
+        // 业务审核-发票-已审核
+        case 'funds_performance':
+          return 'table_pcweb_fincial_aduit_ykx';
+      }
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.finance_review_funds,
-            tableName: getTableName(),
-            tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
-            tableFilterCB: filtrFn,
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.finance_review_funds,
+      tableName: getTableName(),
+      tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
+      tableFilterCB: filtrFn,
+      isDetail: true,
+    };
 
-        function handlePermissionBtn(btnList: BtnListType[], item: QryBussinessKxRsp) {
-            if (item) {
-                const { applystatus } = item;
-                if (applystatus === 1) {
-                    return btnList;
-                } else {
-                    return btnList.filter((e) => e.code === 'detail');
-                }
-            } else {
-                return [];
-            }
+    function handlePermissionBtn(btnList: BtnListType[], item: QryBussinessKxRsp) {
+      if (item) {
+        const { applystatus } = item;
+        if (applystatus === 1) {
+          return btnList;
+        } else {
+          return btnList.filter((e) => e.code === 'detail');
         }
+      } else {
+        return [];
+      }
+    }
 
-        return {
-            ...handleComposeTable<QryBussinessKxRsp>(param),
-            loading,
-            tableList,
-            invoiceStatusName,
-            getApplyStatusName,
-            operateApplyTypeName,
-            getContractTypeName,
-            stateName,
-            handlePermissionBtn,
-            buttons,
-        };
-    },
+    return {
+      ...handleComposeTable<QryBussinessKxRsp>(param),
+      loading,
+      tableList,
+      invoiceStatusName,
+      getApplyStatusName,
+      operateApplyTypeName,
+      getContractTypeName,
+      stateName,
+      handlePermissionBtn,
+      buttons,
+    };
+  },
 });
 </script>

+ 1 - 1
src/views/manage/finance-review/list/invoice/index.vue

@@ -2,7 +2,7 @@
   <!-- 管理 - 财务审核 - 发票 -->
   <div class="finance_review_invoice" :loading="loading">
     <Filter @search="updateColumn"> </Filter>
-    <a-table :columns="columns" class="topTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :data-source="tableList">
+    <a-table :columns="columns" class="topTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />

+ 87 - 87
src/views/manage/inventory-review/list/audit/index.vue

@@ -2,7 +2,7 @@
   <!-- 库存审核 入库-->
   <div class="inventory_review_checkin" :loading="loading">
     <Filter @search="updateColumn" :inOrOut="'in'"></Filter>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
         <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
@@ -49,99 +49,99 @@ import { getTableButton } from '@/common/setup/table/button';
 import { useRoute } from 'vue-router';
 
 export default defineComponent({
-    name: 'inventory_review_checkin',
-    components: {
-        contextMenu,
-        Filter,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('../../components/checkinDetail/index.vue')),
-        check: defineAsyncComponent(() => import('../../components/checkinAudit/index.vue')),
-        cancel: defineAsyncComponent(() => import('../../components/checkinCancel/index.vue')),
-    },
-    setup() {
-        const { name: routeName } = useRoute();
-        // 表格权限按钮
-        const buttons = getTableButton();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3AreaStockApply>();
+  name: 'inventory_review_checkin',
+  components: {
+    contextMenu,
+    Filter,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('../../components/checkinDetail/index.vue')),
+    check: defineAsyncComponent(() => import('../../components/checkinAudit/index.vue')),
+    cancel: defineAsyncComponent(() => import('../../components/checkinCancel/index.vue')),
+  },
+  setup() {
+    const { name: routeName } = useRoute();
+    // 表格权限按钮
+    const buttons = getTableButton();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3AreaStockApply>();
 
-        // 获取列表数据
-        const queryTableAction = () => {
-            switch (routeName) {
-                // 待审核
-                case 'stock_checkpending':
-                    queryTable(QueryAreaStockApply, { applystatus: '1' });
-                    break;
-                // 已审核
-                case 'stock_performance':
-                    queryTable(QueryAreaStockApply, { applystatus: '2,3' });
-                    break;
-            }
-        };
+    // 获取列表数据
+    const queryTableAction = () => {
+      switch (routeName) {
+        // 待审核
+        case 'stock_checkpending':
+          queryTable(QueryAreaStockApply, { applystatus: '1' });
+          break;
+        // 已审核
+        case 'stock_performance':
+          queryTable(QueryAreaStockApply, { applystatus: '2,3' });
+          break;
+      }
+    };
 
-        const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
-            if (e.columnfield === 'buyusernameOrsellusername') {
-                item.onFilter = (value: string, record: Ermcp3AreaStockApply) => {
-                    const { contracttype, buyusername, sellusername } = record;
-                    if (contracttype === 1) {
-                        // 采购
-                        return sellusername.includes(value);
-                    } else {
-                        return buyusername.includes(value);
-                    }
-                };
-                item.filteredValue = filtered.buyusernameOrsellusername || null;
-            }
+    const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
+      if (e.columnfield === 'buyusernameOrsellusername') {
+        item.onFilter = (value: string, record: Ermcp3AreaStockApply) => {
+          const { contracttype, buyusername, sellusername } = record;
+          if (contracttype === 1) {
+            // 采购
+            return sellusername.includes(value);
+          } else {
+            return buyusername.includes(value);
+          }
         };
+        item.filteredValue = filtered.buyusernameOrsellusername || null;
+      }
+    };
 
-        // 获取表头名称
-        const getTableName = () => {
-            switch (routeName) {
-                // 入库审核待审核
-                case 'stock_checkpending':
-                    return 'table_pcweb_stock_aduit_in';
-                // 入库审核已审核
-                case 'stock_performance':
-                    return 'table_pcweb_stock_aduit_yin';
-            }
-        };
+    // 获取表头名称
+    const getTableName = () => {
+      switch (routeName) {
+        // 入库审核待审核
+        case 'stock_checkpending':
+          return 'table_pcweb_stock_aduit_in';
+        // 入库审核已审核
+        case 'stock_performance':
+          return 'table_pcweb_stock_aduit_yin';
+      }
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.inventory_review_checkin,
-            tableName: getTableName(),
-            tableFilterKey: ['contracttype', 'inouttype', 'buyusernameOrsellusername', 'contractno', 'deliverygoodsname'],
-            tableFilterCB: filtrFn,
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.inventory_review_checkin,
+      tableName: getTableName(),
+      tableFilterKey: ['contracttype', 'inouttype', 'buyusernameOrsellusername', 'contractno', 'deliverygoodsname'],
+      tableFilterCB: filtrFn,
+      isDetail: true,
+    };
 
-        function handlePermissionBtn(btnList: BtnListType[], item: Ermcp3AreaStockApply) {
-            if (item) {
-                const { applystatus } = item;
-                if (applystatus === 1) {
-                    return btnList;
-                } else {
-                    return btnList.filter((e) => e.code === 'detail');
-                }
-            } else {
-                return [];
-            }
+    function handlePermissionBtn(btnList: BtnListType[], item: Ermcp3AreaStockApply) {
+      if (item) {
+        const { applystatus } = item;
+        if (applystatus === 1) {
+          return btnList;
+        } else {
+          return btnList.filter((e) => e.code === 'detail');
         }
+      } else {
+        return [];
+      }
+    }
 
-        return {
-            ...handleComposeTable<Ermcp3AreaStockApply>(param),
-            handlePermissionBtn,
-            loading,
-            tableList,
-            getApplyStatusName,
-            getContractTypeName,
-            operateApplyTypeName,
-            getPriceTypeName,
-            InOutTypeName,
-            handleName,
-            buttons,
-        };
-    },
+    return {
+      ...handleComposeTable<Ermcp3AreaStockApply>(param),
+      handlePermissionBtn,
+      loading,
+      tableList,
+      getApplyStatusName,
+      getContractTypeName,
+      operateApplyTypeName,
+      getPriceTypeName,
+      InOutTypeName,
+      handleName,
+      buttons,
+    };
+  },
 });
 </script>

+ 96 - 96
src/views/manage/inventory-review/list/checkpending/index.vue

@@ -1,37 +1,37 @@
 <template>
-    <!-- 库存审核 入库-->
-    <div class="inventory_review_checkin" :loading="loading">
-        <Filter @search="updateColumn" :inOrOut="'in'"></Filter>
-        <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
-            </template>
-            <!-- 状态 -->
-            <template #applystatus="{ text }">
-                <a>{{ getApplyStatusName(text) }}</a>
-            </template>
-            <!-- 现货合同类型 -->
-            <template #contracttype="{ text }">
-                <a>{{ getContractTypeName(text) }}</a>
-            </template>
-            <!-- 点价类型 -->
-            <template #pricetype="{ text }">
-                <a>{{ getPriceTypeName(text) }}</a>
-            </template>
-            <!-- 出入库类型 -->
-            <template #inouttype="{ text }">
-                <a>{{ InOutTypeName(text) }}</a>
-            </template>
-            <!-- 对手方 -->
-            <template #buynicknameOrsellusername="{ record }">
-                <a>{{ handleName(record) }}</a>
-            </template>
-        </a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handlePermissionBtn(buttons, selectedRow)"> </contextMenu>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </div>
+  <!-- 库存审核 入库-->
+  <div class="inventory_review_checkin" :loading="loading">
+    <Filter @search="updateColumn" :inOrOut="'in'"></Filter>
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
+      </template>
+      <!-- 状态 -->
+      <template #applystatus="{ text }">
+        <a>{{ getApplyStatusName(text) }}</a>
+      </template>
+      <!-- 现货合同类型 -->
+      <template #contracttype="{ text }">
+        <a>{{ getContractTypeName(text) }}</a>
+      </template>
+      <!-- 点价类型 -->
+      <template #pricetype="{ text }">
+        <a>{{ getPriceTypeName(text) }}</a>
+      </template>
+      <!-- 出入库类型 -->
+      <template #inouttype="{ text }">
+        <a>{{ InOutTypeName(text) }}</a>
+      </template>
+      <!-- 对手方 -->
+      <template #buynicknameOrsellusername="{ record }">
+        <a>{{ handleName(record) }}</a>
+      </template>
+    </a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handlePermissionBtn(buttons, selectedRow)"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -49,75 +49,75 @@ import { BtnListType } from '@/common/components/btnList/interface';
 import { getTableButton } from '@/common/setup/table/button';
 
 export default defineComponent({
-    name: 'inventory_review_checkin',
-    components: {
-        contextMenu,
-        Filter,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('../../components/checkinDetail/index.vue')),
-        stock_checkpending_check: defineAsyncComponent(() => import('../../components/checkinAudit/index.vue')),
-        stock_checkpending_cancel: defineAsyncComponent(() => import('../../components/checkinCancel/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList({ inouttype: '1,3' });
+  name: 'inventory_review_checkin',
+  components: {
+    contextMenu,
+    Filter,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('../../components/checkinDetail/index.vue')),
+    stock_checkpending_check: defineAsyncComponent(() => import('../../components/checkinAudit/index.vue')),
+    stock_checkpending_cancel: defineAsyncComponent(() => import('../../components/checkinCancel/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList({ inouttype: '1,3' });
 
-        // 获取列表数据
-        const queryTableAction = () => queryTable();
-        const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
-            if (e.columnfield === 'buyusernameOrsellusername') {
-                item.onFilter = (value: string, record: Ermcp3AreaStockApply) => {
-                    const { contracttype, buyusername, sellusername } = record;
-                    if (contracttype === 1) {
-                        // 采购
-                        return sellusername.includes(value);
-                    } else {
-                        return buyusername.includes(value);
-                    }
-                };
-                item.filteredValue = filtered.buyusernameOrsellusername || null;
-            }
+    // 获取列表数据
+    const queryTableAction = () => queryTable();
+    const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
+      if (e.columnfield === 'buyusernameOrsellusername') {
+        item.onFilter = (value: string, record: Ermcp3AreaStockApply) => {
+          const { contracttype, buyusername, sellusername } = record;
+          if (contracttype === 1) {
+            // 采购
+            return sellusername.includes(value);
+          } else {
+            return buyusername.includes(value);
+          }
         };
+        item.filteredValue = filtered.buyusernameOrsellusername || null;
+      }
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.inventory_review_checkin,
-            tableName: 'table_pcweb_stock_aduit_in',
-            tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
-            tableFilterCB: filtrFn,
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.inventory_review_checkin,
+      tableName: 'table_pcweb_stock_aduit_in',
+      tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
+      tableFilterCB: filtrFn,
+      isDetail: true,
+    };
 
-        function handlePermissionBtn(btnList: BtnListType[], item: Ermcp3AreaStockApply) {
-            if (item) {
-                const { applystatus } = item;
-                if (applystatus === 1) {
-                    return btnList;
-                } else {
-                    return btnList.filter((e) => e.code === 'detail');
-                }
-            } else {
-                return [];
-            }
+    function handlePermissionBtn(btnList: BtnListType[], item: Ermcp3AreaStockApply) {
+      if (item) {
+        const { applystatus } = item;
+        if (applystatus === 1) {
+          return btnList;
+        } else {
+          return btnList.filter((e) => e.code === 'detail');
         }
+      } else {
+        return [];
+      }
+    }
 
-        // 权限按钮
-        const buttons = getTableButton(['stock_checkpending_check', 'stock_checkpending_cancel', 'detail']);
+    // 权限按钮
+    const buttons = getTableButton(['stock_checkpending_check', 'stock_checkpending_cancel', 'detail']);
 
-        return {
-            ...handleComposeTable<Ermcp3AreaStockApply>(param),
-            handlePermissionBtn,
-            loading,
-            tableList,
-            getApplyStatusName,
-            getContractTypeName,
-            operateApplyTypeName,
-            getPriceTypeName,
-            InOutTypeName,
-            handleName,
-            buttons,
-        };
-    },
+    return {
+      ...handleComposeTable<Ermcp3AreaStockApply>(param),
+      handlePermissionBtn,
+      loading,
+      tableList,
+      getApplyStatusName,
+      getContractTypeName,
+      operateApplyTypeName,
+      getPriceTypeName,
+      InOutTypeName,
+      handleName,
+      buttons,
+    };
+  },
 });
 </script>

+ 95 - 95
src/views/manage/inventory-review/list/performance/index.vue

@@ -1,36 +1,36 @@
 <template>
-    <!-- 库存审核 出库-->
-    <div class="inventory_review_checkout" :loading="loading">
-        <Filter @search="updateColumn" :inOrOut="'out'"></Filter>
-        <a-table :columns="columns" class="topTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
-            </template>
-            <!-- 状态 -->
-            <template #applystatus="{ text }">
-                <a>{{ getApplyStatusName(text) }}</a>
-            </template>
-            <!-- 现货合同类型 -->
-            <template #contracttype="{ text }">
-                <a>{{ getContractTypeName(text) }}</a>
-            </template>
-            <!-- 点价类型 -->
-            <template #pricetype="{ text }">
-                <a>{{ getPriceTypeName(text) }}</a>
-            </template>
-            <!-- 出入库类型 -->
-            <template #inouttype="{ text }">
-                <a>{{ InOutTypeName(text) }}</a>
-            </template>
-            <template #buynicknameOrsellusername="{ record }">
-                <a>{{ handleName(record) }}</a>
-            </template>
-        </a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handlePermissionBtn(buttons, selectedRow)"> </contextMenu>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </div>
+  <!-- 库存审核 出库-->
+  <div class="inventory_review_checkout" :loading="loading">
+    <Filter @search="updateColumn" :inOrOut="'out'"></Filter>
+    <a-table :columns="columns" class="topTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
+      </template>
+      <!-- 状态 -->
+      <template #applystatus="{ text }">
+        <a>{{ getApplyStatusName(text) }}</a>
+      </template>
+      <!-- 现货合同类型 -->
+      <template #contracttype="{ text }">
+        <a>{{ getContractTypeName(text) }}</a>
+      </template>
+      <!-- 点价类型 -->
+      <template #pricetype="{ text }">
+        <a>{{ getPriceTypeName(text) }}</a>
+      </template>
+      <!-- 出入库类型 -->
+      <template #inouttype="{ text }">
+        <a>{{ InOutTypeName(text) }}</a>
+      </template>
+      <template #buynicknameOrsellusername="{ record }">
+        <a>{{ handleName(record) }}</a>
+      </template>
+    </a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handlePermissionBtn(buttons, selectedRow)"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -48,76 +48,76 @@ import { BtnListType } from '@/common/components/btnList/interface';
 import { getTableButton } from '@/common/setup/table/button';
 
 export default defineComponent({
-    name: 'inventory_review_checkout',
-    components: {
-        contextMenu,
-        Filter,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('../../components/checkoutDetail/index.vue')),
-        //[ModalEnum.inventory_review_checkout_audit]: defineAsyncComponent(() => import('../../components/checkoutAudit/index.vue')),
-        //[ModalEnum.inventory_review_checkout_cancel]: defineAsyncComponent(() => import('../../components/checkoutCancel/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList({ inouttype: '2,4' });
+  name: 'inventory_review_checkout',
+  components: {
+    contextMenu,
+    Filter,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('../../components/checkoutDetail/index.vue')),
+    //[ModalEnum.inventory_review_checkout_audit]: defineAsyncComponent(() => import('../../components/checkoutAudit/index.vue')),
+    //[ModalEnum.inventory_review_checkout_cancel]: defineAsyncComponent(() => import('../../components/checkoutCancel/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList({ inouttype: '2,4' });
 
-        // 获取列表数据
-        const queryTableAction = () => queryTable();
-        const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
-            if (e.columnfield === 'buyusernameOrsellusername') {
-                item.onFilter = (value: string, record: Ermcp3AreaStockApply) => {
-                    const { contracttype, buyusername, sellusername } = record;
-                    if (contracttype === 1) {
-                        // 采购
-                        return sellusername.includes(value);
-                    } else {
-                        return buyusername.includes(value);
-                    }
-                };
-                item.filteredValue = filtered.buyusernameOrsellusername || null;
-            }
+    // 获取列表数据
+    const queryTableAction = () => queryTable();
+    const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
+      if (e.columnfield === 'buyusernameOrsellusername') {
+        item.onFilter = (value: string, record: Ermcp3AreaStockApply) => {
+          const { contracttype, buyusername, sellusername } = record;
+          if (contracttype === 1) {
+            // 采购
+            return sellusername.includes(value);
+          } else {
+            return buyusername.includes(value);
+          }
         };
+        item.filteredValue = filtered.buyusernameOrsellusername || null;
+      }
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.inventory_review_checkout,
-            tableName: 'table_pcweb_stock_aduit_out',
-            tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
-            tableFilterCB: filtrFn,
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.inventory_review_checkout,
+      tableName: 'table_pcweb_stock_aduit_out',
+      tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
+      tableFilterCB: filtrFn,
+      isDetail: true,
+    };
 
-        function handlePermissionBtn(btnList: BtnListType[], item: Ermcp3AreaStockApply) {
-            if (item) {
-                const { applystatus } = item;
-                if (applystatus === 1) {
-                    return btnList;
-                } else {
-                    return btnList.filter((e) => e.code === 'detail');
-                }
-            } else {
-                return [];
-            }
+    function handlePermissionBtn(btnList: BtnListType[], item: Ermcp3AreaStockApply) {
+      if (item) {
+        const { applystatus } = item;
+        if (applystatus === 1) {
+          return btnList;
+        } else {
+          return btnList.filter((e) => e.code === 'detail');
         }
+      } else {
+        return [];
+      }
+    }
 
-        // 权限按钮
-        const buttons = getTableButton(['detail']);
+    // 权限按钮
+    const buttons = getTableButton(['detail']);
 
-        return {
-            ...handleComposeTable<Ermcp3AreaStockApply>(param),
-            handlePermissionBtn,
-            handleName,
+    return {
+      ...handleComposeTable<Ermcp3AreaStockApply>(param),
+      handlePermissionBtn,
+      handleName,
 
-            loading,
-            tableList,
-            getApplyStatusName,
-            getContractTypeName,
-            operateApplyTypeName,
-            getPriceTypeName,
-            InOutTypeName,
-            buttons,
-        };
-    },
+      loading,
+      tableList,
+      getApplyStatusName,
+      getContractTypeName,
+      operateApplyTypeName,
+      getPriceTypeName,
+      InOutTypeName,
+      buttons,
+    };
+  },
 });
 </script>

+ 83 - 108
src/views/market/spot_trade/components/buy-sell-market/components/buy/index.vue

@@ -1,41 +1,16 @@
 <template>
-    <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
-    <a-table
-        :columns="handleColumn(columns)"
-        :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']"
-        :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }"
-        :pagination="false"
-        :loading="loading"
-        :expandedRowKeys="expandedRowKeys"
-        :customRow="Rowclick"
-        :expandIcon="expandIcon"
-        :expandIconAsCell="false"
-        rowKey="key"
-        :data-source="tableList"
-    >
-        <!-- ,  -->
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{ record }">
-            <BtnList
-                :btnList="btnList"
-                :record="record"
-                class="btn-list-sticky"
-                @click="openComponent"
-            />
-        </template>
-        <template #username="{text, record }">
-            <span>{{record.userid + " "}}{{text}}</span>
-        </template>
-    </a-table>
-    <component
-        :is="componentId"
-        v-if="componentId"
-        :selectedRow="selectedRow"
-        :buyOrSell="BuyOrSell.buy"
-        :enumName="enumName"
-        :parantSelectedRow="parantSelectedRow"
-        @cancel="closeComponent"
-    ></component>
+  <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
+  <a-table :columns="handleColumn(columns)" :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+    <!-- ,  -->
+    <!-- 额外的展开行 -->
+    <template #expandedRowRender="{ record }">
+      <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+    </template>
+    <template #username="{text, record }">
+      <span>{{record.userid + " "}}{{text}}</span>
+    </template>
+  </a-table>
+  <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.buy" :enumName="enumName" :parantSelectedRow="parantSelectedRow" @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -55,80 +30,80 @@ import moment from 'moment';
 import { getShowBottomValue } from '@/common/config/constrolBottom';
 
 export default defineComponent({
-    emits: ['cancel', 'openComponent'],
-    name: 'warehouse_receipt_trade_price_delisting_buy',
-    props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        btnList: {
-            default: [],
-            type: Array as PropType<BtnListType[]>,
-        },
-        parantSelectedRow: {
-            type: Object as PropType<WrOrderQuote>,
-            default: {},
-        },
-        time: {
-            type: Object as PropType<Moment>,
-            default: moment(),
-        },
+  emits: ['cancel', 'openComponent'],
+  name: 'warehouse_receipt_trade_price_delisting_buy',
+  props: {
+    enumName: {
+      default: '',
+      type: String as PropType<EnumRouterName>,
     },
-    components: {
-        BtnList,
-        [ModalEnum.spot_trade_warehouse_delisting]: defineAsyncComponent(() => import('../delisting/index.vue')),
+    btnList: {
+      default: [],
+      type: Array as PropType<BtnListType[]>,
     },
-    setup(props, context) {
-        const isBottom = getShowBottomValue();
-        console.log(isBottom.value, 'isBottom');
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
-        const { wrpricetype, haswr, tableKey } = getBuyMarketParam(props.enumName);
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteDetailReq = {
-                buyorsell: 0,
-                wrpricetype,
-                haswr,
-                wrfactortypeid: props.parantSelectedRow.wrfactortypeid,
-                goodsid: props.parantSelectedRow.goodsid,
-            };
-            if (!haswr) {
-                // 无仓单 需要交收月过滤数据
-                param.deliverymonth = moment(props.time).format('YYYY-MM');
-            }
-            queryTable(queryOrderQuoteDetail, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: props.enumName,
-            tableName: tableKey,
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        function handleColumn(columns: ColumnType[]) {
-            columns.forEach((item) => {
-                if (item.dataIndex == 'username') {
-                    delete item.width;
-                }
-            });
-            return columns;
-        }
-        function handleBtnList() {}
-        return {
-            isBottom,
-            ...handleComposeTable<WrOrderQuoteDetail>(param),
-            queryTableAction,
-            BuyOrSell,
-            loading,
-            tableList,
-            enumName: props.enumName,
-            expandIcon,
-            handleColumn,
-        };
+    parantSelectedRow: {
+      type: Object as PropType<WrOrderQuote>,
+      default: {},
+    },
+    time: {
+      type: Object as PropType<Moment>,
+      default: moment(),
     },
+  },
+  components: {
+    BtnList,
+    [ModalEnum.spot_trade_warehouse_delisting]: defineAsyncComponent(() => import('../delisting/index.vue')),
+  },
+  setup(props, context) {
+    const isBottom = getShowBottomValue();
+    console.log(isBottom.value, 'isBottom');
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
+    const { wrpricetype, haswr, tableKey } = getBuyMarketParam(props.enumName);
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryOrderQuoteDetailReq = {
+        buyorsell: 0,
+        wrpricetype,
+        haswr,
+        wrfactortypeid: props.parantSelectedRow.wrfactortypeid,
+        goodsid: props.parantSelectedRow.goodsid,
+      };
+      if (!haswr) {
+        // 无仓单 需要交收月过滤数据
+        param.deliverymonth = moment(props.time).format('YYYY-MM');
+      }
+      queryTable(queryOrderQuoteDetail, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: props.enumName,
+      tableName: tableKey,
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    function handleColumn(columns: ColumnType[]) {
+      columns.forEach((item) => {
+        if (item.dataIndex == 'username') {
+          delete item.width;
+        }
+      });
+      return columns;
+    }
+    function handleBtnList() { }
+    return {
+      isBottom,
+      ...handleComposeTable<WrOrderQuoteDetail>(param),
+      queryTableAction,
+      BuyOrSell,
+      loading,
+      tableList,
+      enumName: props.enumName,
+      expandIcon,
+      handleColumn,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 85 - 105
src/views/market/spot_trade/components/buy-sell-market/components/sell/index.vue

@@ -1,35 +1,15 @@
 <template>
-    <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
-    <a-table
-        :columns="handleColumn(columns)"
-        :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']"
-        :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }"
-        :pagination="false"
-        :loading="loading"
-        :expandedRowKeys="expandedRowKeys"
-        :customRow="Rowclick"
-        :expandIcon="expandIcon"
-        :expandIconAsCell="false"
-        rowKey="key"
-        :data-source="tableList"
-    >
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{ record }">
-            <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-        </template>
-        <template #username="{text, record }">
-            <span>{{record.userid + " " }}{{text}}</span>
-        </template>
-    </a-table>
-    <component
-        :is="componentId"
-        v-if="componentId"
-        :selectedRow="selectedRow"
-        :enumName="enumName"
-        :buyOrSell="BuyOrSell.sell"
-        :parantSelectedRow="parantSelectedRow"
-        @cancel="closeComponent"
-    ></component>
+  <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
+  <a-table :columns="handleColumn(columns)" :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+    <!-- 额外的展开行 -->
+    <template #expandedRowRender="{ record }">
+      <BtnList :btnList="btnList" :record="record" @click="openComponent" />
+    </template>
+    <template #username="{text, record }">
+      <span>{{record.userid + " " }}{{text}}</span>
+    </template>
+  </a-table>
+  <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :enumName="enumName" :buyOrSell="BuyOrSell.sell" :parantSelectedRow="parantSelectedRow" @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -49,83 +29,83 @@ import moment from 'moment';
 import { getShowBottomValue } from '@/common/config/constrolBottom';
 
 export default defineComponent({
-    emits: ['cancel', 'openComponent'],
-    name: 'warehouse_receipt_trade_price_delisting_sell',
-    props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        btnList: {
-            default: [],
-            type: Array as PropType<BtnListType[]>,
-        },
-        parantSelectedRow: {
-            type: Object as PropType<WrOrderQuote>,
-            default: {},
-        },
-        time: {
-            type: Object as PropType<Moment>,
-            default: moment(),
-        },
+  emits: ['cancel', 'openComponent'],
+  name: 'warehouse_receipt_trade_price_delisting_sell',
+  props: {
+    enumName: {
+      default: '',
+      type: String as PropType<EnumRouterName>,
     },
-    components: {
-        BtnList,
-        [ModalEnum.spot_trade_warehouse_delisting]: defineAsyncComponent(() => import('../delisting/index.vue')),
-        [ModalEnum.spot_trade_warehouse_financing_delisting]: defineAsyncComponent(() => import('../financing_delisting/index.vue')),
+    btnList: {
+      default: [],
+      type: Array as PropType<BtnListType[]>,
     },
-    setup(props, context) {
-        const isBottom = getShowBottomValue();
-        console.log(isBottom.value, 'isBottom');
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
-
-        const { wrpricetype, haswr, tableKey } = getSellMarketParam(props.enumName);
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteDetailReq = {
-                buyorsell: 1,
-                wrpricetype,
-                haswr,
-                wrfactortypeid: props.parantSelectedRow.wrfactortypeid,
-                goodsid: props.parantSelectedRow.goodsid,
-            };
-            if (!haswr) {
-                // 无仓单 需要交收月过滤数据
-                param.deliverymonth = moment(props.time).format('YYYY-MM');
-            }
-            queryTable(queryOrderQuoteDetail, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
-            tableName: tableKey,
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        function handleColumn(columns: ColumnType[]) {
-            columns.forEach((item) => {
-                columns.forEach((item) => {
-                    if (item.dataIndex == 'username') {
-                        delete item.width;
-                    }
-                });
-            });
-            return columns;
-        }
-        return {
-            isBottom,
-            ...handleComposeTable<WrOrderQuoteDetail>(param),
-            queryTableAction,
-            loading,
-            tableList,
-            BuyOrSell,
-            enumName: props.enumName,
-            expandIcon,
-            handleColumn,
-        };
+    parantSelectedRow: {
+      type: Object as PropType<WrOrderQuote>,
+      default: {},
+    },
+    time: {
+      type: Object as PropType<Moment>,
+      default: moment(),
     },
+  },
+  components: {
+    BtnList,
+    [ModalEnum.spot_trade_warehouse_delisting]: defineAsyncComponent(() => import('../delisting/index.vue')),
+    [ModalEnum.spot_trade_warehouse_financing_delisting]: defineAsyncComponent(() => import('../financing_delisting/index.vue')),
+  },
+  setup(props, context) {
+    const isBottom = getShowBottomValue();
+    console.log(isBottom.value, 'isBottom');
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
+
+    const { wrpricetype, haswr, tableKey } = getSellMarketParam(props.enumName);
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryOrderQuoteDetailReq = {
+        buyorsell: 1,
+        wrpricetype,
+        haswr,
+        wrfactortypeid: props.parantSelectedRow.wrfactortypeid,
+        goodsid: props.parantSelectedRow.goodsid,
+      };
+      if (!haswr) {
+        // 无仓单 需要交收月过滤数据
+        param.deliverymonth = moment(props.time).format('YYYY-MM');
+      }
+      queryTable(queryOrderQuoteDetail, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
+      tableName: tableKey,
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    function handleColumn(columns: ColumnType[]) {
+      columns.forEach((item) => {
+        columns.forEach((item) => {
+          if (item.dataIndex == 'username') {
+            delete item.width;
+          }
+        });
+      });
+      return columns;
+    }
+    return {
+      isBottom,
+      ...handleComposeTable<WrOrderQuoteDetail>(param),
+      queryTableAction,
+      loading,
+      tableList,
+      BuyOrSell,
+      enumName: props.enumName,
+      expandIcon,
+      handleColumn,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 57 - 75
src/views/market/spot_trade/components/goods-chart/stock-exchange/index.vue

@@ -2,33 +2,15 @@
   <!-- 成交明细  -->
   <a-row>
     <a-col :span="8">
-      <a-table :columns="columnsList"
-               class="srcollYTable"
-               :pagination="false"
-               :loading="loading"
-               rowKey="key"
-               ref="tableRef"
-               :data-source="tableList[0]">
+      <a-table :columns="columnsList" class="srcollYTable" :pagination="false" :loading="loading" :rowKey="(record,index)=>index" ref="tableRef" :data-source="tableList[0]">
       </a-table>
     </a-col>
     <a-col :span="8">
-      <a-table :columns="columnsList"
-               class="srcollYTable"
-               :pagination="false"
-               :loading="loading"
-               rowKey="key"
-               ref="tableRef"
-               :data-source="tableList[1]">
+      <a-table :columns="columnsList" class="srcollYTable" :pagination="false" :loading="loading" :rowKey="(record,index)=>index" ref="tableRef" :data-source="tableList[1]">
       </a-table>
     </a-col>
     <a-col :span="8">
-      <a-table :columns="columnsList"
-               class="srcollYTable"
-               :pagination="false"
-               :loading="loading"
-               rowKey="key"
-               ref="tableRef"
-               :data-source="tableList[2]">
+      <a-table :columns="columnsList" class="srcollYTable" :pagination="false" :loading="loading" :rowKey="(record,index)=>index" ref="tableRef" :data-source="tableList[2]">
       </a-table>
     </a-col>
   </a-row>
@@ -45,67 +27,67 @@ import { QueryHistoryTikDatas } from '@/services/go/quote';
 import { formatTime } from '@/common/methods';
 
 const columnsList = [
-    { title: '时间', key: 'TS', dataIndex: 'TS', align: 'center' },
-    { title: '成交价', key: 'Vol', dataIndex: 'Vol', align: 'center' },
-    { title: '成交量', key: 'PE', dataIndex: 'PE', align: 'center' },
+  { title: '时间', key: 'TS', dataIndex: 'TS', align: 'center' },
+  { title: '成交价', key: 'Vol', dataIndex: 'Vol', align: 'center' },
+  { title: '成交量', key: 'PE', dataIndex: 'PE', align: 'center' },
 ];
 
 export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'stock-exchange',
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryQuoteDayRsp>,
-            default: {},
-        },
+  emits: ['cancel', 'update'],
+  name: 'stock-exchange',
+  props: {
+    selectedRow: {
+      type: Object as PropType<QueryQuoteDayRsp>,
+      default: {},
     },
+  },
 
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-        const param = {
-            goodsCode: props.selectedRow.goodscode,
-        };
-        const tableList = ref<QueryHistoryTikDatasRsp[][]>([]);
-        QueryHistoryTikDatas(param).then((res) => {
-            res.forEach((el) => (el.TS = formatTime(el.TS)));
-            tableList.value = getHisList(res);
-        });
-        function getHisList(list: QueryHistoryTikDatasRsp[]) {
-            const len = list.length;
-            const result: QueryHistoryTikDatasRsp[][] = [[], [], []];
-            if (len) {
-                if (len === 1) {
-                    result[0] = list;
-                } else if (len === 2) {
-                    result[0].push(list[0]);
-                    result[1].push(list[1]);
-                } else {
-                    const temp = Math.floor(len / 3);
-                    result[0] = list.slice(0, temp);
-                    result[1] = list.slice(temp, 2 * temp);
-                    result[2] = list.slice(temp * 2, temp * 3);
-                    const last = len - temp;
-                    if (last) {
-                        if (last === 1) {
-                            result[0].push(list[len - 1]);
-                        } else {
-                            result[0].push(list[len - 2]);
-                            result[1].push(list[len - 1]);
-                        }
-                    }
-                }
+  setup(props, context) {
+    const loading = ref<boolean>(false);
+    const { visible, cancel } = _closeModal(context);
+    const param = {
+      goodsCode: props.selectedRow.goodscode,
+    };
+    const tableList = ref<QueryHistoryTikDatasRsp[][]>([]);
+    QueryHistoryTikDatas(param).then((res) => {
+      res.forEach((el) => (el.TS = formatTime(el.TS)));
+      tableList.value = getHisList(res);
+    });
+    function getHisList(list: QueryHistoryTikDatasRsp[]) {
+      const len = list.length;
+      const result: QueryHistoryTikDatasRsp[][] = [[], [], []];
+      if (len) {
+        if (len === 1) {
+          result[0] = list;
+        } else if (len === 2) {
+          result[0].push(list[0]);
+          result[1].push(list[1]);
+        } else {
+          const temp = Math.floor(len / 3);
+          result[0] = list.slice(0, temp);
+          result[1] = list.slice(temp, 2 * temp);
+          result[2] = list.slice(temp * 2, temp * 3);
+          const last = len - temp;
+          if (last) {
+            if (last === 1) {
+              result[0].push(list[len - 1]);
+            } else {
+              result[0].push(list[len - 2]);
+              result[1].push(list[len - 1]);
             }
-            return result;
+          }
         }
-        return {
-            cancel,
-            visible,
-            tableList,
-            columnsList,
-            loading,
-        };
-    },
+      }
+      return result;
+    }
+    return {
+      cancel,
+      visible,
+      tableList,
+      columnsList,
+      loading,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 69 - 93
src/views/market/spot_trade/spot_trade_order_transaction/components/buy-market/index.vue

@@ -1,43 +1,19 @@
 <template>
-    <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
-    <a-table
-        :columns="handleColumn(columns)"
-        :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']"
-        :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }"
-        :pagination="false"
-        :loading="loading"
-        :expandedRowKeys="expandedRowKeys"
-        :customRow="Rowclick"
-        :expandIcon="expandIcon"
-        :expandIconAsCell="false"
-        rowKey="key"
-        :data-source="tableList"
-    >
-        <!-- ,  -->
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{ record }">
-            <BtnList
-                :btnList="btnListData"
-                :record="record"
-                class="btn-list-sticky"
-                @click="openComponent"
-            />
-        </template>
-        <template #fixedprice="{record }">
-            <span>{{record.useorderpricerid }}</span>
-        </template>
-        <template #username="{text, record }">
-            <span>{{record.userid + " "}}{{text}}</span>
-        </template>
-    </a-table>
-    <component
-        :is="componentId"
-        v-if="componentId"
-        :selectedRow="selectedRow"
-        :parantSelectedRow="parantSelectedRow"
-        :buyOrSell="BuyOrSell.buy"
-        @cancel="closeComponent"
-    ></component>
+  <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
+  <a-table :columns="handleColumn(columns)" :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+    <!-- ,  -->
+    <!-- 额外的展开行 -->
+    <template #expandedRowRender="{ record }">
+      <BtnList :btnList="btnListData" :record="record" class="btn-list-sticky" @click="openComponent" />
+    </template>
+    <template #fixedprice="{record }">
+      <span>{{record.useorderpricerid }}</span>
+    </template>
+    <template #username="{text, record }">
+      <span>{{record.userid + " "}}{{text}}</span>
+    </template>
+  </a-table>
+  <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :parantSelectedRow="parantSelectedRow" :buyOrSell="BuyOrSell.buy" @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -57,63 +33,63 @@ import { handleTableEventAndData } from '@/common/setup/table/compose';
 import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 
 export default defineComponent({
-    emits: ['cancel', 'openComponent'],
-    name: 'warehouse_receipt_trade_price_delisting_buy',
-    props: {
-        parantSelectedRow: {
-            type: Object as PropType<QueryDeliveryRelationRsp>,
-            default: {},
-        },
+  emits: ['cancel', 'openComponent'],
+  name: 'warehouse_receipt_trade_price_delisting_buy',
+  props: {
+    parantSelectedRow: {
+      type: Object as PropType<QueryDeliveryRelationRsp>,
+      default: {},
     },
-    components: {
-        BtnList,
-        Delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
-    },
-    setup(props, context) {
-        const isBottom = getShowBottomValue();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
-        const columnsList = [
-            { title: '序号', key: 'index', width: 60 },
-            { title: '买价', key: 'orderprice' },
-            { title: '买量', key: 'orderqty' },
-            { title: '购买方', key: 'username' },
-        ];
-        const btnListData: BtnListType[] = [{ lable: '摘牌', code: 'Delisting', className: 'operBtn' }];
+  },
+  components: {
+    BtnList,
+    Delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+  },
+  setup(props, context) {
+    const isBottom = getShowBottomValue();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
+    const columnsList = [
+      { title: '序号', key: 'index', width: 60 },
+      { title: '买价', key: 'orderprice' },
+      { title: '买量', key: 'orderqty' },
+      { title: '购买方', key: 'username' },
+    ];
+    const btnListData: BtnListType[] = [{ lable: '摘牌', code: 'Delisting', className: 'operBtn' }];
 
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: WrTradeOrderDetailReq = {
-                buyorsell: 0,
-                goodsid: props.parantSelectedRow.goodsid,
-            };
-            queryTable(queryWrTradeOrderDetail, param);
-        };
-        const param: TableParam = {
-            columnsList,
-            queryFn: queryTableAction,
-        };
-        function handleColumn(columns: ColumnType[]) {
-            columns.forEach((item) => {
-                if (item.dataIndex == 'username') {
-                    delete item.width;
-                }
-            });
-            return columns;
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: WrTradeOrderDetailReq = {
+        buyorsell: 0,
+        goodsid: props.parantSelectedRow.goodsid,
+      };
+      queryTable(queryWrTradeOrderDetail, param);
+    };
+    const param: TableParam = {
+      columnsList,
+      queryFn: queryTableAction,
+    };
+    function handleColumn(columns: ColumnType[]) {
+      columns.forEach((item) => {
+        if (item.dataIndex == 'username') {
+          delete item.width;
         }
-        return {
-            isBottom,
-            ...handleTableEventAndData(param),
-            queryTableAction,
-            BuyOrSell,
-            loading,
-            tableList,
-            expandIcon,
-            handleColumn,
-            btnListData,
-            columnsList,
-        };
-    },
+      });
+      return columns;
+    }
+    return {
+      isBottom,
+      ...handleTableEventAndData(param),
+      queryTableAction,
+      BuyOrSell,
+      loading,
+      tableList,
+      expandIcon,
+      handleColumn,
+      btnListData,
+      columnsList,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 72 - 91
src/views/market/spot_trade/spot_trade_order_transaction/components/sell-market/index.vue

@@ -1,37 +1,18 @@
 <template>
-    <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
-    <a-table
-        :columns="handleColumn(columns)"
-        :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']"
-        :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }"
-        :pagination="false"
-        :loading="loading"
-        :expandedRowKeys="expandedRowKeys"
-        :customRow="Rowclick"
-        :expandIcon="expandIcon"
-        :expandIconAsCell="false"
-        rowKey="key"
-        :data-source="tableList"
-    >
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{ record }">
-            <BtnList :btnList="btnListData" :record="record" @click="openComponent" />
-        </template>
-        <template #username="{text, record }">
-            <span>{{record.userid + " " }}{{text}}</span>
-        </template>
-        <template #fixedprice="{record }">
-            <span>{{record.useorderpricerid }}</span>
-        </template>
-    </a-table>
-    <component
-        :is="componentId"
-        v-if="componentId"
-        :selectedRow="selectedRow"
-        :parantSelectedRow="parantSelectedRow"
-        :buyOrSell="BuyOrSell.sell"
-        @cancel="closeComponent"
-    ></component>
+  <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
+  <a-table :columns="handleColumn(columns)" :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+    <!-- 额外的展开行 -->
+    <template #expandedRowRender="{ record }">
+      <BtnList :btnList="btnListData" :record="record" @click="openComponent" />
+    </template>
+    <template #username="{text, record }">
+      <span>{{record.userid + " " }}{{text}}</span>
+    </template>
+    <template #fixedprice="{record }">
+      <span>{{record.useorderpricerid }}</span>
+    </template>
+  </a-table>
+  <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :parantSelectedRow="parantSelectedRow" :buyOrSell="BuyOrSell.sell" @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -50,66 +31,66 @@ import { handleTableEventAndData } from '@/common/setup/table/compose';
 import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 
 export default defineComponent({
-    emits: ['cancel', 'openComponent'],
-    name: 'warehouse_receipt_trade_price_delisting_sell',
-    props: {
-        parantSelectedRow: {
-            type: Object as PropType<QueryDeliveryRelationRsp>,
-            default: {},
-        },
+  emits: ['cancel', 'openComponent'],
+  name: 'warehouse_receipt_trade_price_delisting_sell',
+  props: {
+    parantSelectedRow: {
+      type: Object as PropType<QueryDeliveryRelationRsp>,
+      default: {},
     },
-    components: {
-        BtnList,
-        Delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
-    },
-    setup(props, context) {
-        const isBottom = getShowBottomValue();
-        console.log(isBottom.value, 'isBottom');
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
-        const columnsList = [
-            { title: '序号', key: 'index', width: 60 },
-            { title: '销售方', key: 'username' },
-            { title: '买量', key: 'orderqty' },
+  },
+  components: {
+    BtnList,
+    Delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+  },
+  setup(props, context) {
+    const isBottom = getShowBottomValue();
+    console.log(isBottom.value, 'isBottom');
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
+    const columnsList = [
+      { title: '序号', key: 'index', width: 60 },
+      { title: '销售方', key: 'username' },
+      { title: '买量', key: 'orderqty' },
 
-            { title: '买价', key: 'orderprice' },
-        ];
-        const btnListData: BtnListType[] = [{ lable: '摘牌', code: 'Delisting', className: 'operBtn' }];
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: WrTradeOrderDetailReq = {
-                buyorsell: 1,
-                goodsid: props.parantSelectedRow.goodsid,
-            };
-            queryTable(queryWrTradeOrderDetail, param);
-        };
-        // 表格通用逻辑
-        const param: TableParam = {
-            columnsList,
-            queryFn: queryTableAction,
-        };
-        function handleColumn(columns: ColumnType[]) {
-            columns.forEach((item) => {
-                columns.forEach((item) => {
-                    if (item.dataIndex == 'username') {
-                        delete item.width;
-                    }
-                });
-            });
-            return columns;
-        }
-        return {
-            isBottom,
-            ...handleTableEventAndData(param),
-            queryTableAction,
-            loading,
-            tableList,
-            BuyOrSell,
-            expandIcon,
-            handleColumn,
-            btnListData,
-        };
-    },
+      { title: '买价', key: 'orderprice' },
+    ];
+    const btnListData: BtnListType[] = [{ lable: '摘牌', code: 'Delisting', className: 'operBtn' }];
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: WrTradeOrderDetailReq = {
+        buyorsell: 1,
+        goodsid: props.parantSelectedRow.goodsid,
+      };
+      queryTable(queryWrTradeOrderDetail, param);
+    };
+    // 表格通用逻辑
+    const param: TableParam = {
+      columnsList,
+      queryFn: queryTableAction,
+    };
+    function handleColumn(columns: ColumnType[]) {
+      columns.forEach((item) => {
+        columns.forEach((item) => {
+          if (item.dataIndex == 'username') {
+            delete item.width;
+          }
+        });
+      });
+      return columns;
+    }
+    return {
+      isBottom,
+      ...handleTableEventAndData(param),
+      queryTableAction,
+      loading,
+      tableList,
+      BuyOrSell,
+      expandIcon,
+      handleColumn,
+      btnListData,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 57 - 75
src/views/market/spot_trade/spot_trade_order_transaction/components/stock-exchange/index.vue

@@ -2,33 +2,15 @@
   <!-- 成交明细  -->
   <a-row>
     <a-col :span="8">
-      <a-table :columns="columnsList"
-               class="srcollYTable"
-               :pagination="false"
-               :loading="loading"
-               rowKey="key"
-               ref="tableRef"
-               :data-source="tableList[0]">
+      <a-table :columns="columnsList" class="srcollYTable" :pagination="false" :loading="loading" :rowKey="(record,index)=>index" ref="tableRef" :data-source="tableList[0]">
       </a-table>
     </a-col>
     <a-col :span="8">
-      <a-table :columns="columnsList"
-               class="srcollYTable"
-               :pagination="false"
-               :loading="loading"
-               rowKey="key"
-               ref="tableRef"
-               :data-source="tableList[1]">
+      <a-table :columns="columnsList" class="srcollYTable" :pagination="false" :loading="loading" :rowKey="(record,index)=>index" ref="tableRef" :data-source="tableList[1]">
       </a-table>
     </a-col>
     <a-col :span="8">
-      <a-table :columns="columnsList"
-               class="srcollYTable"
-               :pagination="false"
-               :loading="loading"
-               rowKey="key"
-               ref="tableRef"
-               :data-source="tableList[2]">
+      <a-table :columns="columnsList" class="srcollYTable" :pagination="false" :loading="loading" :rowKey="(record,index)=>index" ref="tableRef" :data-source="tableList[2]">
       </a-table>
     </a-col>
   </a-row>
@@ -45,67 +27,67 @@ import { QueryHistoryTikDatas } from '@/services/go/quote';
 import { formatTime } from '@/common/methods';
 
 const columnsList = [
-    { title: '时间', key: 'TS', dataIndex: 'TS', align: 'center' },
-    { title: '成交价', key: 'PE', dataIndex: 'PE', align: 'center' },
-    { title: '成交量', key: 'Vol', dataIndex: 'Vol', align: 'center' },
+  { title: '时间', key: 'TS', dataIndex: 'TS', align: 'center' },
+  { title: '成交价', key: 'PE', dataIndex: 'PE', align: 'center' },
+  { title: '成交量', key: 'Vol', dataIndex: 'Vol', align: 'center' },
 ];
 
 export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'stock-exchange',
-    props: {
-        deliverGoods: {
-            type: Object as PropType<QueryDeliveryRelationRsp>,
-            default: {},
-        },
+  emits: ['cancel', 'update'],
+  name: 'stock-exchange',
+  props: {
+    deliverGoods: {
+      type: Object as PropType<QueryDeliveryRelationRsp>,
+      default: {},
     },
+  },
 
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-        const param = {
-            goodsCode: props.deliverGoods.goodscode,
-        };
-        const tableList = ref<QueryHistoryTikDatasRsp[][]>([]);
-        QueryHistoryTikDatas(param).then((res) => {
-            res.forEach((el) => (el.TS = formatTime(el.TS)));
-            tableList.value = getHisList(res);
-        });
-        function getHisList(list: QueryHistoryTikDatasRsp[]) {
-            const len = list.length;
-            const result: QueryHistoryTikDatasRsp[][] = [[], [], []];
-            if (len) {
-                if (len === 1) {
-                    result[0] = list;
-                } else if (len === 2) {
-                    result[0].push(list[0]);
-                    result[1].push(list[1]);
-                } else {
-                    const temp = Math.floor(len / 3);
-                    result[0] = list.slice(0, temp);
-                    result[1] = list.slice(temp, 2 * temp);
-                    result[2] = list.slice(temp * 2, temp * 3);
-                    const last = len - temp;
-                    if (last) {
-                        if (last === 1) {
-                            result[0].push(list[len - 1]);
-                        } else {
-                            result[0].push(list[len - 2]);
-                            result[1].push(list[len - 1]);
-                        }
-                    }
-                }
+  setup(props, context) {
+    const loading = ref<boolean>(false);
+    const { visible, cancel } = _closeModal(context);
+    const param = {
+      goodsCode: props.deliverGoods.goodscode,
+    };
+    const tableList = ref<QueryHistoryTikDatasRsp[][]>([]);
+    QueryHistoryTikDatas(param).then((res) => {
+      res.forEach((el) => (el.TS = formatTime(el.TS)));
+      tableList.value = getHisList(res);
+    });
+    function getHisList(list: QueryHistoryTikDatasRsp[]) {
+      const len = list.length;
+      const result: QueryHistoryTikDatasRsp[][] = [[], [], []];
+      if (len) {
+        if (len === 1) {
+          result[0] = list;
+        } else if (len === 2) {
+          result[0].push(list[0]);
+          result[1].push(list[1]);
+        } else {
+          const temp = Math.floor(len / 3);
+          result[0] = list.slice(0, temp);
+          result[1] = list.slice(temp, 2 * temp);
+          result[2] = list.slice(temp * 2, temp * 3);
+          const last = len - temp;
+          if (last) {
+            if (last === 1) {
+              result[0].push(list[len - 1]);
+            } else {
+              result[0].push(list[len - 2]);
+              result[1].push(list[len - 1]);
             }
-            return result;
+          }
         }
-        return {
-            cancel,
-            visible,
-            tableList,
-            columnsList,
-            loading,
-        };
-    },
+      }
+      return result;
+    }
+    return {
+      cancel,
+      visible,
+      tableList,
+      columnsList,
+      loading,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 95 - 95
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/buy/index.vue

@@ -1,16 +1,16 @@
 <template>
-    <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
-    <a-table :columns="columns" :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
-        <!-- ,  -->
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{ record }">
-            <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
-        </template>
-        <template #username="{ text, record }">
-            <span>{{ record.userid + ' ' }}{{ text }}</span>
-        </template>
-    </a-table>
-    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.buy" :enumName="enumName" :parantSelectedRow="parantSelectedRow" @cancel="closeComponent"></component>
+  <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
+  <a-table :columns="columns" :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+    <!-- ,  -->
+    <!-- 额外的展开行 -->
+    <template #expandedRowRender="{ record }">
+      <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+    </template>
+    <template #username="{ text, record }">
+      <span>{{ record.userid + ' ' }}{{ text }}</span>
+    </template>
+  </a-table>
+  <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.buy" :enumName="enumName" :parantSelectedRow="parantSelectedRow" @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -35,99 +35,99 @@ import { useBuyOrSellBtnList } from '../setup';
 import { findItemGoods } from '../../setup';
 
 const columns = [
-    {
-        key: '0th',
-        dataIndex: 'index',
-        title: '序号',
-        align: 'center',
-        slots: {
-            customRender: 'index',
-        },
-        width: 60,
+  {
+    key: '0th',
+    dataIndex: 'index',
+    title: '序号',
+    align: 'center',
+    slots: {
+      customRender: 'index',
     },
-    {
-        key: '1th',
-        dataIndex: 'orderprice',
-        title: '买价',
-        align: 'center',
-        slots: {
-            customRender: 'orderprice',
-        },
-        width: 120,
+    width: 60,
+  },
+  {
+    key: '1th',
+    dataIndex: 'orderprice',
+    title: '买价',
+    align: 'center',
+    slots: {
+      customRender: 'orderprice',
     },
-    {
-        key: '2th',
-        dataIndex: 'orderqty',
-        title: '买量',
-        align: 'center',
-        slots: {
-            customRender: 'orderqty',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '2th',
+    dataIndex: 'orderqty',
+    title: '买量',
+    align: 'center',
+    slots: {
+      customRender: 'orderqty',
     },
-    {
-        key: '3th',
-        dataIndex: 'username',
-        title: '购买方',
-        align: 'center',
-        slots: {
-            customRender: 'username',
-        },
+    width: 120,
+  },
+  {
+    key: '3th',
+    dataIndex: 'username',
+    title: '购买方',
+    align: 'center',
+    slots: {
+      customRender: 'username',
     },
+  },
 ];
 
 export default defineComponent({
-    emits: ['cancel', 'openComponent'],
-    name: 'warehouse_receipt_trade_price_delisting_buy',
-    props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        parantSelectedRow: {
-            type: Object as PropType<WrOrderQuote>,
-            default: {},
-        },
+  emits: ['cancel', 'openComponent'],
+  name: 'warehouse_receipt_trade_price_delisting_buy',
+  props: {
+    enumName: {
+      default: '',
+      type: String as PropType<EnumRouterName>,
     },
-    components: {
-        BtnList,
-        Listing: defineAsyncComponent(() => import('../delisting/index.vue')),
+    parantSelectedRow: {
+      type: Object as PropType<WrOrderQuote>,
+      default: {},
     },
-    setup(props, context) {
-        const isBottom = getShowBottomValue();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTjmdTradeOrderDetailRsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryTjmdTradeOrderDetailReq = {
-                buyorsell: 0,
-                userid: getUserId(),
-                usertype: getUserAccountType(),
-                goodsid: findItemGoods(props.parantSelectedRow.goodscode)?.goodsid,
-            };
-            queryTable(queryTjmdTradeOrderDetail, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: props.enumName,
-            tableFilterKey: [],
-            isDetail: false,
-        };
+  },
+  components: {
+    BtnList,
+    Listing: defineAsyncComponent(() => import('../delisting/index.vue')),
+  },
+  setup(props, context) {
+    const isBottom = getShowBottomValue();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTjmdTradeOrderDetailRsp>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryTjmdTradeOrderDetailReq = {
+        buyorsell: 0,
+        userid: getUserId(),
+        usertype: getUserAccountType(),
+        goodsid: findItemGoods(props.parantSelectedRow.goodscode)?.goodsid,
+      };
+      queryTable(queryTjmdTradeOrderDetail, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: props.enumName,
+      tableFilterKey: [],
+      isDetail: false,
+    };
 
-        return {
-            isBottom,
-            ...handleComposeTable<WrOrderQuoteDetail>(param),
-            queryTableAction,
-            BuyOrSell,
-            loading,
-            tableList,
-            enumName: props.enumName,
-            expandIcon,
-            btnList: useBuyOrSellBtnList(),
-            columns,
-        };
-    },
+    return {
+      isBottom,
+      ...handleComposeTable<WrOrderQuoteDetail>(param),
+      queryTableAction,
+      BuyOrSell,
+      loading,
+      tableList,
+      enumName: props.enumName,
+      expandIcon,
+      btnList: useBuyOrSellBtnList(),
+      columns,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 106 - 106
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/sell/index.vue

@@ -1,15 +1,15 @@
 <template>
-    <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
-    <a-table :columns="handleColumn(columns)" :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{ record }">
-            <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-        </template>
-        <template #username="{ text, record }">
-            <span>{{ record.userid + ' ' }}{{ text }}</span>
-        </template>
-    </a-table>
-    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :enumName="enumName" :buyOrSell="BuyOrSell.sell" :parantSelectedRow="parantSelectedRow" @cancel="closeComponent"></component>
+  <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
+  <a-table :columns="handleColumn(columns)" :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+    <!-- 额外的展开行 -->
+    <template #expandedRowRender="{ record }">
+      <BtnList :btnList="btnList" :record="record" @click="openComponent" />
+    </template>
+    <template #username="{ text, record }">
+      <span>{{ record.userid + ' ' }}{{ text }}</span>
+    </template>
+  </a-table>
+  <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :enumName="enumName" :buyOrSell="BuyOrSell.sell" :parantSelectedRow="parantSelectedRow" @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -34,111 +34,111 @@ import { QueryTjmdTradeOrderDetailReq } from '@/services/go/Tjmd/interface';
 import { findItemGoods } from '../../setup';
 
 const columns = [
-    {
-        key: '0th',
-        dataIndex: 'index',
-        title: '序号',
-        align: 'center',
-        slots: {
-            customRender: 'index',
-        },
-        width: 60,
+  {
+    key: '0th',
+    dataIndex: 'index',
+    title: '序号',
+    align: 'center',
+    slots: {
+      customRender: 'index',
     },
-    {
-        key: '1th',
-        dataIndex: 'orderprice',
-        title: '卖价',
-        align: 'center',
-        slots: {
-            customRender: 'orderprice',
-        },
-        width: 120,
+    width: 60,
+  },
+  {
+    key: '1th',
+    dataIndex: 'orderprice',
+    title: '卖价',
+    align: 'center',
+    slots: {
+      customRender: 'orderprice',
     },
-    {
-        key: '2th',
-        dataIndex: 'orderqty',
-        title: '卖量',
-        align: 'center',
-        slots: {
-            customRender: 'orderqty',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '2th',
+    dataIndex: 'orderqty',
+    title: '卖量',
+    align: 'center',
+    slots: {
+      customRender: 'orderqty',
     },
-    {
-        key: '3th',
-        dataIndex: 'username',
-        title: '购买方',
-        align: 'center',
-        slots: {
-            customRender: 'username',
-        },
+    width: 120,
+  },
+  {
+    key: '3th',
+    dataIndex: 'username',
+    title: '购买方',
+    align: 'center',
+    slots: {
+      customRender: 'username',
     },
+  },
 ];
 
 export default defineComponent({
-    emits: ['cancel', 'openComponent'],
-    name: 'warehouse_receipt_trade_price_delisting_sell',
-    props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        parantSelectedRow: {
-            type: Object as PropType<WrOrderQuote>,
-            default: {},
-        },
+  emits: ['cancel', 'openComponent'],
+  name: 'warehouse_receipt_trade_price_delisting_sell',
+  props: {
+    enumName: {
+      default: '',
+      type: String as PropType<EnumRouterName>,
     },
-    components: {
-        BtnList,
-        Listing: defineAsyncComponent(() => import('../delisting/index.vue')),
+    parantSelectedRow: {
+      type: Object as PropType<WrOrderQuote>,
+      default: {},
     },
-    setup(props, context) {
-        const isBottom = getShowBottomValue();
-        console.log(isBottom.value, 'isBottom');
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
+  },
+  components: {
+    BtnList,
+    Listing: defineAsyncComponent(() => import('../delisting/index.vue')),
+  },
+  setup(props, context) {
+    const isBottom = getShowBottomValue();
+    console.log(isBottom.value, 'isBottom');
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
 
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryTjmdTradeOrderDetailReq = {
-                buyorsell: 1,
-                userid: getUserId(),
-                usertype: getUserAccountType(),
-                goodsid: findItemGoods(props.parantSelectedRow.goodscode)?.goodsid,
-            };
-            queryTable(queryTjmdTradeOrderDetail, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        function handleColumn(columns: ColumnType[]) {
-            columns.forEach((item) => {
-                columns.forEach((item) => {
-                    if (item.dataIndex == 'username') {
-                        delete item.width;
-                    }
-                });
-            });
-            return columns;
-        }
-        return {
-            isBottom,
-            ...handleComposeTable<WrOrderQuoteDetail>(param),
-            queryTableAction,
-            loading,
-            tableList,
-            BuyOrSell,
-            enumName: props.enumName,
-            expandIcon,
-            handleColumn,
-            btnList: useBuyOrSellBtnList(),
-            columns,
-        };
-    },
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryTjmdTradeOrderDetailReq = {
+        buyorsell: 1,
+        userid: getUserId(),
+        usertype: getUserAccountType(),
+        goodsid: findItemGoods(props.parantSelectedRow.goodscode)?.goodsid,
+      };
+      queryTable(queryTjmdTradeOrderDetail, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    function handleColumn(columns: ColumnType[]) {
+      columns.forEach((item) => {
+        columns.forEach((item) => {
+          if (item.dataIndex == 'username') {
+            delete item.width;
+          }
+        });
+      });
+      return columns;
+    }
+    return {
+      isBottom,
+      ...handleComposeTable<WrOrderQuoteDetail>(param),
+      queryTableAction,
+      loading,
+      tableList,
+      BuyOrSell,
+      enumName: props.enumName,
+      expandIcon,
+      handleColumn,
+      btnList: useBuyOrSellBtnList(),
+      columns,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 75 - 90
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/buy/index.vue

@@ -1,15 +1,7 @@
 <template>
   <!-- 仓单贸易 贸易圈挂牌 卖-->
   <div>
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'condSecondTabTableHalfTop' : 'condSecondTabTableHalfTopNoBottom', 'halfBottom',  tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc((100vh- 443px)/2 - 14px)' : 'calc((100vh - 196px)/2 - 16px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" :class="['srcollYTable', isBottom ? 'condSecondTabTableHalfTop' : 'condSecondTabTableHalfTopNoBottom', 'halfBottom',  tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc((100vh- 443px)/2 - 14px)' : 'calc((100vh - 196px)/2 - 16px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
@@ -30,15 +22,8 @@
       </template>
     </a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="filterBtn(firstBtn)"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :componentId="componentId"
-               :selectedRow="selectedRow"
-               :buyOrSell="BuyOrSell.Buy"
-               @cancel="closeComponent"></component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="filterBtn(firstBtn)"></contextMenu>
+    <component :is="componentId" v-if="componentId" :componentId="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.Buy" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -57,79 +42,79 @@ import { formatTime } from '@/common/methods';
 import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: 'warehouse_receipt_trade_blocs_buy',
-    components: {
-        contextMenu,
-        warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
-        warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
-        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表头
-        const { getBuyOrSellColumns } = handleColumns();
-        const columns = getBuyOrSellColumns(BuyOrSell.buy);
+  name: 'warehouse_receipt_trade_blocs_buy',
+  components: {
+    contextMenu,
+    warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+    warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+    warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
+  },
+  setup() {
+    const isBottom = getShowBottomValue();
+    // 表头
+    const { getBuyOrSellColumns } = handleColumns();
+    const columns = getBuyOrSellColumns(BuyOrSell.buy);
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteMyqReq = {
-                buyorsell: BuyOrSell.buy,
-                haswr: 0,
-            };
-            queryTable(queryQueryOrderQuoteMyq, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_receipt_trade_blocs,
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        const {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent,
-            openComponent, // 控制异步组件
-            firstBtn,
-            secondBtn, // 表格按钮
-        } = handleComposeTable<QueryOrderQuoteMyqQsp>(param);
-        function search(value: Object) {
-            // const param: QueryOrderQuoteReq = {
-            //     wrpricetype: 2,
-            //     haswr: 1,
-            // };
-            // Object.assign(param, value);
-            // queryTable(queryOrderQuote, param);
-        }
-        // 单据挂牌成功 刷新数据
-        Bus.$on('spotTrade', queryTableAction);
-        return {
-            isBottom,
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-            loading,
-            tableList,
-            search,
-            formatTime,
-            filterBtn,
-            BuyOrSell,
-        };
-    },
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryOrderQuoteMyqReq = {
+        buyorsell: BuyOrSell.buy,
+        haswr: 0,
+      };
+      queryTable(queryQueryOrderQuoteMyq, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_receipt_trade_blocs,
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    const {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent,
+      openComponent, // 控制异步组件
+      firstBtn,
+      secondBtn, // 表格按钮
+    } = handleComposeTable<QueryOrderQuoteMyqQsp>(param);
+    function search(value: Object) {
+      // const param: QueryOrderQuoteReq = {
+      //     wrpricetype: 2,
+      //     haswr: 1,
+      // };
+      // Object.assign(param, value);
+      // queryTable(queryOrderQuote, param);
+    }
+    // 单据挂牌成功 刷新数据
+    Bus.$on('spotTrade', queryTableAction);
+    return {
+      isBottom,
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+      loading,
+      tableList,
+      search,
+      formatTime,
+      filterBtn,
+      BuyOrSell,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 75 - 90
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/sell/index.vue

@@ -1,15 +1,7 @@
 <template>
   <!-- 仓单贸易 贸易圈挂牌 买-->
   <div>
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'condSecondTabTableHalfTop' : 'condSecondTabTableHalfTopNoBottom',  tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc((100vh- 443px)/2 - 14px)' : 'calc((100vh - 196px)/2 - 16px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" :class="['srcollYTable', isBottom ? 'condSecondTabTableHalfTop' : 'condSecondTabTableHalfTopNoBottom',  tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc((100vh- 443px)/2 - 14px)' : 'calc((100vh - 196px)/2 - 16px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
@@ -30,15 +22,8 @@
       </template>
     </a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="filterBtn(firstBtn)"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :componentId="componentId"
-               :selectedRow="selectedRow"
-               :buyOrSell="BuyOrSell.sell"
-               @cancel="closeComponent"></component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="filterBtn(firstBtn)"></contextMenu>
+    <component :is="componentId" v-if="componentId" :componentId="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.sell" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -57,79 +42,79 @@ import { formatTime } from '@/common/methods';
 import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: 'warehouse_receipt_trade_blocs_sell',
-    components: {
-        contextMenu,
-        warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
-        warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
-        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表头
-        const { getBuyOrSellColumns } = handleColumns();
-        const columns = getBuyOrSellColumns(BuyOrSell.sell);
+  name: 'warehouse_receipt_trade_blocs_sell',
+  components: {
+    contextMenu,
+    warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+    warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+    warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
+  },
+  setup() {
+    const isBottom = getShowBottomValue();
+    // 表头
+    const { getBuyOrSellColumns } = handleColumns();
+    const columns = getBuyOrSellColumns(BuyOrSell.sell);
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteMyqReq = {
-                buyorsell: BuyOrSell.sell,
-                haswr: 0,
-            };
-            queryTable(queryQueryOrderQuoteMyq, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_receipt_trade_blocs,
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        const {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent,
-            openComponent, // 控制异步组件
-            firstBtn,
-            secondBtn, // 表格按钮
-        } = handleComposeTable<QueryOrderQuoteMyqQsp>(param);
-        function search(value: Object) {
-            // const param: QueryOrderQuoteReq = {
-            //     wrpricetype: 2,
-            //     haswr: 1,
-            // };
-            // Object.assign(param, value);
-            // queryTable(queryOrderQuote, param);
-        }
-        // 单据挂牌成功 刷新数据
-        Bus.$on('spotTrade', queryTableAction);
-        return {
-            isBottom,
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-            loading,
-            tableList,
-            search,
-            formatTime,
-            filterBtn,
-            BuyOrSell,
-        };
-    },
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryOrderQuoteMyqReq = {
+        buyorsell: BuyOrSell.sell,
+        haswr: 0,
+      };
+      queryTable(queryQueryOrderQuoteMyq, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_receipt_trade_blocs,
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    const {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent,
+      openComponent, // 控制异步组件
+      firstBtn,
+      secondBtn, // 表格按钮
+    } = handleComposeTable<QueryOrderQuoteMyqQsp>(param);
+    function search(value: Object) {
+      // const param: QueryOrderQuoteReq = {
+      //     wrpricetype: 2,
+      //     haswr: 1,
+      // };
+      // Object.assign(param, value);
+      // queryTable(queryOrderQuote, param);
+    }
+    // 单据挂牌成功 刷新数据
+    Bus.$on('spotTrade', queryTableAction);
+    return {
+      isBottom,
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+      loading,
+      tableList,
+      search,
+      formatTime,
+      filterBtn,
+      BuyOrSell,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 83 - 99
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_floating_price/index.vue

@@ -1,27 +1,11 @@
 <template>
   <!-- 仓单预售 浮动价预售-->
   <div class="topTableHeight">
-    <Filter :enumName="name"
-            @buy="buyOpen"
-            @search="search" />
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList"></a-table>
+    <Filter :enumName="name" @buy="buyOpen" @search="search" />
+    <a-table :columns="columns" :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="firstBtn"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :enumName="name"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
+    <component :is="componentId" v-if="componentId" :enumName="name" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -38,85 +22,85 @@ import { getShowBottomValue } from '@/common/config/constrolBottom';
 import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: EnumRouterName.warehouse_pre_sale_floating_price,
-    components: {
-        contextMenu,
-        Filter,
-        [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-        [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-        buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
-        postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 2,
-                haswr: 0,
-            };
-            queryTable(queryOrderQuote, param);
-        };
-        Bus.$on('spotTrade', queryTableAction);
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_pre_sale_floating_price,
-            tableName: 'table_pcweb_spot_trade_warehouse_sale_float',
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        const {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            registerColumn,
-            updateColumn, // 表头
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-        } = handleComposeTable<WrOrderQuote>(param);
-        function search(value: Object) {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 2,
-                haswr: 0,
-            };
-            Object.assign(param, value);
-            queryTable(queryOrderQuote, param);
-        }
-        function buyOpen(value: any, goods: Goods) {
-            componentId.value = 'postBuying';
-            value.goodsid = goods.goodsid;
-            value.goodscode = goods.goodscode;
-            selectedRow.value = value;
-        }
-        return {
-            isBottom,
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            registerColumn,
-            updateColumn, // 表头
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-            name: EnumRouterName.warehouse_pre_sale_floating_price,
-            loading,
-            tableList,
-            search,
-            buyOpen,
-        };
-    },
+  name: EnumRouterName.warehouse_pre_sale_floating_price,
+  components: {
+    contextMenu,
+    Filter,
+    [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
+    [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
+    buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
+    postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
+  },
+  setup() {
+    const isBottom = getShowBottomValue();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryOrderQuoteReq = {
+        wrpricetype: 2,
+        haswr: 0,
+      };
+      queryTable(queryOrderQuote, param);
+    };
+    Bus.$on('spotTrade', queryTableAction);
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_pre_sale_floating_price,
+      tableName: 'table_pcweb_spot_trade_warehouse_sale_float',
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    const {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      registerColumn,
+      updateColumn, // 表头
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+    } = handleComposeTable<WrOrderQuote>(param);
+    function search(value: Object) {
+      const param: QueryOrderQuoteReq = {
+        wrpricetype: 2,
+        haswr: 0,
+      };
+      Object.assign(param, value);
+      queryTable(queryOrderQuote, param);
+    }
+    function buyOpen(value: any, goods: Goods) {
+      componentId.value = 'postBuying';
+      value.goodsid = goods.goodsid;
+      value.goodscode = goods.goodscode;
+      selectedRow.value = value;
+    }
+    return {
+      isBottom,
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      registerColumn,
+      updateColumn, // 表头
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+      name: EnumRouterName.warehouse_pre_sale_floating_price,
+      loading,
+      tableList,
+      search,
+      buyOpen,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 81 - 97
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_price/index.vue

@@ -1,27 +1,11 @@
 <template>
   <!-- 仓单预售 一口价预售-->
   <div class="topTableHeight">
-    <Filter :enumName="name"
-            @search="search"
-            @buy="buyOpen" />
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList"></a-table>
+    <Filter :enumName="name" @search="search" @buy="buyOpen" />
+    <a-table :columns="columns" :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="firstBtn"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :enumName="name"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
+    <component :is="componentId" v-if="componentId" :enumName="name" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -36,83 +20,83 @@ import { getShowBottomValue } from '@/common/config/constrolBottom';
 import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: EnumRouterName.warehouse_pre_sale_price,
-    components: {
-        contextMenu,
-        Filter,
-        [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-        [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-        buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
-        postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 1,
-                haswr: 0,
-            };
-            queryTable(queryOrderQuote, param);
-        };
-        Bus.$on('spotTrade', queryTableAction);
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_pre_sale_price,
-            tableName: 'table_pcweb_spot_trade_warehouse_sale_price',
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        const {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            registerColumn,
-            updateColumn, // 表头
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-        } = handleComposeTable<WrOrderQuote>(param);
-        function search(value: Object) {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 1,
-                haswr: 0,
-            };
-            Object.assign(param, value);
-            queryTable(queryOrderQuote, param);
-        }
-        function buyOpen(value: any, goods: any) {
-            componentId.value = 'postBuying';
-            selectedRow.value = value;
-        }
-        return {
-            isBottom,
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            registerColumn,
-            updateColumn, // 表头
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-            name: EnumRouterName.warehouse_pre_sale_price,
-            loading,
-            tableList,
-            search,
-            buyOpen,
-        };
-    },
+  name: EnumRouterName.warehouse_pre_sale_price,
+  components: {
+    contextMenu,
+    Filter,
+    [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
+    [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
+    buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
+    postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
+  },
+  setup() {
+    const isBottom = getShowBottomValue();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryOrderQuoteReq = {
+        wrpricetype: 1,
+        haswr: 0,
+      };
+      queryTable(queryOrderQuote, param);
+    };
+    Bus.$on('spotTrade', queryTableAction);
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_pre_sale_price,
+      tableName: 'table_pcweb_spot_trade_warehouse_sale_price',
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    const {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      registerColumn,
+      updateColumn, // 表头
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+    } = handleComposeTable<WrOrderQuote>(param);
+    function search(value: Object) {
+      const param: QueryOrderQuoteReq = {
+        wrpricetype: 1,
+        haswr: 0,
+      };
+      Object.assign(param, value);
+      queryTable(queryOrderQuote, param);
+    }
+    function buyOpen(value: any, goods: any) {
+      componentId.value = 'postBuying';
+      selectedRow.value = value;
+    }
+    return {
+      isBottom,
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      registerColumn,
+      updateColumn, // 表头
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+      name: EnumRouterName.warehouse_pre_sale_price,
+      loading,
+      tableList,
+      search,
+      buyOpen,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 75 - 90
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/buy/index.vue

@@ -1,15 +1,7 @@
 <template>
   <!-- 仓单贸易 贸易圈挂牌 卖-->
   <div>
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'condSecondTabTableHalfTop' : 'condSecondTabTableHalfTopNoBottom', 'halfBottom',  tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc((100vh- 443px)/2 - 14px)' : 'calc((100vh - 196px)/2 - 16px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" :class="['srcollYTable', isBottom ? 'condSecondTabTableHalfTop' : 'condSecondTabTableHalfTopNoBottom', 'halfBottom',  tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc((100vh- 443px)/2 - 14px)' : 'calc((100vh - 196px)/2 - 16px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
@@ -30,15 +22,8 @@
       </template>
     </a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="filterBtn(firstBtn, selectedRow)"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :componentId="componentId"
-               :selectedRow="selectedRow"
-               :buyOrSell="BuyOrSell.Buy"
-               @cancel="closeComponent"></component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="filterBtn(firstBtn, selectedRow)"></contextMenu>
+    <component :is="componentId" v-if="componentId" :componentId="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.Buy" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -57,79 +42,79 @@ import { formatTime } from '@/common/methods';
 import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: 'warehouse_receipt_trade_blocs_buy',
-    components: {
-        contextMenu,
-        warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
-        warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
-        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表头
-        const { getBuyOrSellColumns } = handleColumns();
-        const columns = getBuyOrSellColumns(BuyOrSell.buy);
+  name: 'warehouse_receipt_trade_blocs_buy',
+  components: {
+    contextMenu,
+    warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+    warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+    warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
+  },
+  setup() {
+    const isBottom = getShowBottomValue();
+    // 表头
+    const { getBuyOrSellColumns } = handleColumns();
+    const columns = getBuyOrSellColumns(BuyOrSell.buy);
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteMyqReq = {
-                buyorsell: BuyOrSell.buy,
-                haswr: 1,
-            };
-            queryTable(queryQueryOrderQuoteMyq, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_receipt_trade_blocs,
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        const {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent,
-            openComponent, // 控制异步组件
-            firstBtn,
-            secondBtn, // 表格按钮
-        } = handleComposeTable<QueryOrderQuoteMyqQsp>(param);
-        function search(value: Object) {
-            // const param: QueryOrderQuoteReq = {
-            //     wrpricetype: 2,
-            //     haswr: 1,
-            // };
-            // Object.assign(param, value);
-            // queryTable(queryOrderQuote, param);
-        }
-        // 单据挂牌成功 刷新数据
-        Bus.$on('spotTrade', queryTableAction);
-        return {
-            isBottom,
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-            loading,
-            tableList,
-            search,
-            formatTime,
-            filterBtn,
-            BuyOrSell,
-        };
-    },
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryOrderQuoteMyqReq = {
+        buyorsell: BuyOrSell.buy,
+        haswr: 1,
+      };
+      queryTable(queryQueryOrderQuoteMyq, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_receipt_trade_blocs,
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    const {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent,
+      openComponent, // 控制异步组件
+      firstBtn,
+      secondBtn, // 表格按钮
+    } = handleComposeTable<QueryOrderQuoteMyqQsp>(param);
+    function search(value: Object) {
+      // const param: QueryOrderQuoteReq = {
+      //     wrpricetype: 2,
+      //     haswr: 1,
+      // };
+      // Object.assign(param, value);
+      // queryTable(queryOrderQuote, param);
+    }
+    // 单据挂牌成功 刷新数据
+    Bus.$on('spotTrade', queryTableAction);
+    return {
+      isBottom,
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+      loading,
+      tableList,
+      search,
+      formatTime,
+      filterBtn,
+      BuyOrSell,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 75 - 90
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/sell/index.vue

@@ -1,15 +1,7 @@
 <template>
   <!-- 仓单贸易 贸易圈挂牌 买-->
   <div>
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'condSecondTabTableHalfTop' : 'condSecondTabTableHalfTopNoBottom',  tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc((100vh- 443px)/2 - 14px)' : 'calc((100vh - 196px)/2 - 16px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" :class="['srcollYTable', isBottom ? 'condSecondTabTableHalfTop' : 'condSecondTabTableHalfTopNoBottom',  tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc((100vh- 443px)/2 - 14px)' : 'calc((100vh - 196px)/2 - 16px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
@@ -30,15 +22,8 @@
       </template>
     </a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="filterBtn(firstBtn, selectedRow)"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :componentId="componentId"
-               :selectedRow="selectedRow"
-               :buyOrSell="BuyOrSell.sell"
-               @cancel="closeComponent"></component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="filterBtn(firstBtn, selectedRow)"></contextMenu>
+    <component :is="componentId" v-if="componentId" :componentId="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.sell" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -57,80 +42,80 @@ import { formatTime } from '@/common/methods';
 import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: 'warehouse_receipt_trade_blocs_sell',
-    components: {
-        contextMenu,
-        warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
-        warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
-        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表头
-        const { getBuyOrSellColumns } = handleColumns();
-        const columns = getBuyOrSellColumns(BuyOrSell.sell);
+  name: 'warehouse_receipt_trade_blocs_sell',
+  components: {
+    contextMenu,
+    warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+    warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+    warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
+  },
+  setup() {
+    const isBottom = getShowBottomValue();
+    // 表头
+    const { getBuyOrSellColumns } = handleColumns();
+    const columns = getBuyOrSellColumns(BuyOrSell.sell);
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteMyqReq = {
-                buyorsell: BuyOrSell.sell,
-                haswr: 1,
-            };
-            queryTable(queryQueryOrderQuoteMyq, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_receipt_trade_blocs,
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        const {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent,
-            openComponent, // 控制异步组件
-            firstBtn,
-            secondBtn, // 表格按钮
-        } = handleComposeTable<QueryOrderQuoteMyqQsp>(param);
-        function search(value: Object) {
-            // const param: QueryOrderQuoteReq = {
-            //     wrpricetype: 2,
-            //     haswr: 1,
-            // };
-            // Object.assign(param, value);
-            // queryTable(queryOrderQuote, param);
-        }
-        // 单据挂牌成功 刷新数据
-        Bus.$on('spotTrade', queryTableAction);
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryOrderQuoteMyqReq = {
+        buyorsell: BuyOrSell.sell,
+        haswr: 1,
+      };
+      queryTable(queryQueryOrderQuoteMyq, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_receipt_trade_blocs,
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    const {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent,
+      openComponent, // 控制异步组件
+      firstBtn,
+      secondBtn, // 表格按钮
+    } = handleComposeTable<QueryOrderQuoteMyqQsp>(param);
+    function search(value: Object) {
+      // const param: QueryOrderQuoteReq = {
+      //     wrpricetype: 2,
+      //     haswr: 1,
+      // };
+      // Object.assign(param, value);
+      // queryTable(queryOrderQuote, param);
+    }
+    // 单据挂牌成功 刷新数据
+    Bus.$on('spotTrade', queryTableAction);
 
-        return {
-            isBottom,
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-            loading,
-            tableList,
-            search,
-            formatTime,
-            filterBtn,
-            BuyOrSell,
-        };
-    },
+    return {
+      isBottom,
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+      loading,
+      tableList,
+      search,
+      formatTime,
+      filterBtn,
+      BuyOrSell,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 83 - 99
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue

@@ -1,27 +1,11 @@
 <template>
   <!-- 仓单贸易 浮动价挂牌-->
   <div class="topTableHeight">
-    <Filter :enumName="name"
-            @search="search"
-            @buy="buyOpen" />
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList"></a-table>
+    <Filter :enumName="name" @search="search" @buy="buyOpen" />
+    <a-table :columns="columns" :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="firstBtn"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :enumName="name"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
+    <component :is="componentId" v-if="componentId" :enumName="name" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -37,85 +21,85 @@ import { getShowBottomValue } from '@/common/config/constrolBottom';
 import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: EnumRouterName.warehouse_receipt_trade_floating_price,
-    components: {
-        contextMenu,
-        Filter,
-        [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-        [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-        buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
-        postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 2,
-                haswr: 1,
-            };
-            queryTable(queryOrderQuote, param);
-        };
-        Bus.$on('spotTrade', queryTableAction);
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
-            tableName: 'table_pcweb_spot_trade_warehouse_float',
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        const {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            registerColumn,
-            updateColumn, // 表头
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-        } = handleComposeTable<WrOrderQuote>(param);
-        function search(value: Object) {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 2,
-                haswr: 1,
-            };
-            Object.assign(param, value);
-            queryTable(queryOrderQuote, param);
-        }
-        function buyOpen(value: any, goods: Goods) {
-            componentId.value = 'postBuying';
-            value.goodsid = goods.goodsid;
-            value.goodscode = goods.goodscode;
-            selectedRow.value = value;
-        }
-        return {
-            isBottom,
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            registerColumn,
-            updateColumn, // 表头
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-            name: EnumRouterName.warehouse_receipt_trade_floating_price,
-            loading,
-            tableList,
-            search,
-            buyOpen,
-        };
-    },
+  name: EnumRouterName.warehouse_receipt_trade_floating_price,
+  components: {
+    contextMenu,
+    Filter,
+    [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
+    [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
+    buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
+    postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
+  },
+  setup() {
+    const isBottom = getShowBottomValue();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryOrderQuoteReq = {
+        wrpricetype: 2,
+        haswr: 1,
+      };
+      queryTable(queryOrderQuote, param);
+    };
+    Bus.$on('spotTrade', queryTableAction);
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
+      tableName: 'table_pcweb_spot_trade_warehouse_float',
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    const {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      registerColumn,
+      updateColumn, // 表头
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+    } = handleComposeTable<WrOrderQuote>(param);
+    function search(value: Object) {
+      const param: QueryOrderQuoteReq = {
+        wrpricetype: 2,
+        haswr: 1,
+      };
+      Object.assign(param, value);
+      queryTable(queryOrderQuote, param);
+    }
+    function buyOpen(value: any, goods: Goods) {
+      componentId.value = 'postBuying';
+      value.goodsid = goods.goodsid;
+      value.goodscode = goods.goodscode;
+      selectedRow.value = value;
+    }
+    return {
+      isBottom,
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      registerColumn,
+      updateColumn, // 表头
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+      name: EnumRouterName.warehouse_receipt_trade_floating_price,
+      loading,
+      tableList,
+      search,
+      buyOpen,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 81 - 97
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_price/index.vue

@@ -1,27 +1,11 @@
 <template>
   <!-- 仓单贸易 一口价挂牌-->
   <div class="topTableHeight">
-    <Filter :enumName="name"
-            @search="search"
-            @buy="buyOpen" />
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList"></a-table>
+    <Filter :enumName="name" @search="search" @buy="buyOpen" />
+    <a-table :columns="columns" :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="firstBtn"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :enumName="name"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
+    <component :is="componentId" v-if="componentId" :enumName="name" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -36,84 +20,84 @@ import Filter from '../../components/filter/index.vue';
 import { getShowBottomValue } from '@/common/config/constrolBottom';
 
 export default defineComponent({
-    name: EnumRouterName.warehouse_receipt_trade_price,
-    components: {
-        contextMenu,
-        Filter,
-        [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-        [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-        buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
-        postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 1,
-                haswr: 1,
-            };
-            queryTable(queryOrderQuote, param);
-        };
-        Bus.$on('spotTrade', queryTableAction);
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_receipt_trade_price,
-            tableName: 'table_pcweb_spot_trade_warehouse_price',
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        const {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            registerColumn,
-            updateColumn, // 表头
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-        } = handleComposeTable<WrOrderQuote>(param);
-        function search(value: Object) {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 1,
-                haswr: 1,
-            };
-            Object.assign(param, value);
-            queryTable(queryOrderQuote, param);
-        }
-        function buyOpen(value: any, goods: any) {
-            componentId.value = 'postBuying';
-            selectedRow.value = value;
-        }
+  name: EnumRouterName.warehouse_receipt_trade_price,
+  components: {
+    contextMenu,
+    Filter,
+    [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
+    [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
+    buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
+    postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
+  },
+  setup() {
+    const isBottom = getShowBottomValue();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryOrderQuoteReq = {
+        wrpricetype: 1,
+        haswr: 1,
+      };
+      queryTable(queryOrderQuote, param);
+    };
+    Bus.$on('spotTrade', queryTableAction);
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_receipt_trade_price,
+      tableName: 'table_pcweb_spot_trade_warehouse_price',
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    const {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      registerColumn,
+      updateColumn, // 表头
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+    } = handleComposeTable<WrOrderQuote>(param);
+    function search(value: Object) {
+      const param: QueryOrderQuoteReq = {
+        wrpricetype: 1,
+        haswr: 1,
+      };
+      Object.assign(param, value);
+      queryTable(queryOrderQuote, param);
+    }
+    function buyOpen(value: any, goods: any) {
+      componentId.value = 'postBuying';
+      selectedRow.value = value;
+    }
 
-        return {
-            isBottom,
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            columns,
-            registerColumn,
-            updateColumn, // 表头
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent, // 控制异步组件
-            firstBtn, // 表格按钮
-            name: EnumRouterName.warehouse_receipt_trade_price,
-            loading,
-            tableList,
-            search,
-            buyOpen,
-        };
-    },
+    return {
+      isBottom,
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      columns,
+      registerColumn,
+      updateColumn, // 表头
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent, // 控制异步组件
+      firstBtn, // 表格按钮
+      name: EnumRouterName.warehouse_receipt_trade_price,
+      loading,
+      tableList,
+      search,
+      buyOpen,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 64 - 86
src/views/order/commodity_contract/components/commodity_contract_bargain/index.vue

@@ -1,24 +1,10 @@
 <template>
   <!-- 商品订单 - 议价单 -->
   <section>
-    <a-table :columns="columns"
-             class="srcollYTable expandLeftTable"
-             :scroll="{ x: '100%', y: '190px' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
-      <template v-if="btnList.length"
-                #expandedRowRender="{ record }">
-        <BtnList :btnList="handleBtnList(record, btnList)"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent" />
+      <template v-if="btnList.length" #expandedRowRender="{ record }">
+        <BtnList :btnList="handleBtnList(record, btnList)" :record="record" class="btn-list-sticky" @click="openComponent" />
       </template>
       <template #applytime="{ text }">
         <span>{{ formatTime(text) }}</span>
@@ -26,16 +12,12 @@
       <template #transferamount="{ record , text}">
         <div>
           <!-- 审核拒绝 -->
-          <a-tooltip placement="bottom"
-                     v-if="record.applystatus === 4"
-                     overlayClassName="toolTipTableColumn">
+          <a-tooltip placement="bottom" v-if="record.applystatus === 4" overlayClassName="toolTipTableColumn">
             <template #title>
               <span>{{ getScfContractStatusName(text) }}</span>
             </template>
-            <span
-                  :class="record.applystatus === 4 ? 'red' : 'white'">{{ record.transferamount }}</span>
-            <ExclamationCircleOutlined class="ml10 red"
-                                       v-if="record.applystatus === 4" />
+            <span :class="record.applystatus === 4 ? 'red' : 'white'">{{ record.transferamount }}</span>
+            <ExclamationCircleOutlined class="ml10 red" v-if="record.applystatus === 4" />
           </a-tooltip>
           <span v-else>{{ record.transferamount }}</span>
         </div>
@@ -47,11 +29,7 @@
         <span>{{ getScfContractStatusName(text) }}</span>
       </template>
     </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               :tableList="tableList"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :tableList="tableList" @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -76,64 +54,64 @@ import { ref } from 'vue';
 import { columns } from './setup';
 
 export default defineComponent({
-    name: 'commodity_contract_bargain',
-    components: {
-        ExclamationCircleOutlined,
-        BtnList,
-        commodity_contract_bargain_submit_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_submit_order/index.vue')),
-        commodity_contract_bargain_cancel_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_cancel_order/index.vue')),
-        commodity_contract_bargain_refuse_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_refuse_order/index.vue')),
-    },
-    setup() {
-        // 类型 1-我的申请 2-对方申请
-        const margainType = ref<ApplyType>(ApplyType.my);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTjmdTransferApplyRsp>();
-        // 交割商品
-        handleDeliveryRelation();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryTjmdTransferApplyReq = {
-                applytype: margainType.value,
-                accountids: getAccoutIdList(),
-            };
-            queryTable(queryTjmdTransferApply, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: () => queryTableAction(),
-            recordList: getRecordItemTab(),
-        };
-        // 切换 我的申请和对方申请
-        Bus.$onOnly('bargain', (value: ApplyType) => {
-            margainType.value = value;
-            queryTableAction();
-        });
-        function handleBtnList(record: QueryTjmdTransferApplyRsp, btnList: BtnListType[]) {
-            if (record.applystatus === 1) {
-                if (margainType.value === ApplyType.my) {
-                    // 我的申请
-                    return btnList.filter((e) => e.code === 'commodity_contract_bargain_cancel_order');
-                } else {
-                    // 对方的申请
-                    return btnList.filter((e) => e.code !== 'commodity_contract_bargain_cancel_order');
-                }
-            } else {
-                return [];
-            }
+  name: 'commodity_contract_bargain',
+  components: {
+    ExclamationCircleOutlined,
+    BtnList,
+    commodity_contract_bargain_submit_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_submit_order/index.vue')),
+    commodity_contract_bargain_cancel_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_cancel_order/index.vue')),
+    commodity_contract_bargain_refuse_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_refuse_order/index.vue')),
+  },
+  setup() {
+    // 类型 1-我的申请 2-对方申请
+    const margainType = ref<ApplyType>(ApplyType.my);
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTjmdTransferApplyRsp>();
+    // 交割商品
+    handleDeliveryRelation();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryTjmdTransferApplyReq = {
+        applytype: margainType.value,
+        accountids: getAccoutIdList(),
+      };
+      queryTable(queryTjmdTransferApply, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: () => queryTableAction(),
+      recordList: getRecordItemTab(),
+    };
+    // 切换 我的申请和对方申请
+    Bus.$onOnly('bargain', (value: ApplyType) => {
+      margainType.value = value;
+      queryTableAction();
+    });
+    function handleBtnList(record: QueryTjmdTransferApplyRsp, btnList: BtnListType[]) {
+      if (record.applystatus === 1) {
+        if (margainType.value === ApplyType.my) {
+          // 我的申请
+          return btnList.filter((e) => e.code === 'commodity_contract_bargain_cancel_order');
+        } else {
+          // 对方的申请
+          return btnList.filter((e) => e.code !== 'commodity_contract_bargain_cancel_order');
         }
-        return {
-            ...handleComposeOrderTable<QueryTradePositionRsp>(param),
-            columns,
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-            handleBtnList,
-            getBuyOrSellName,
-            getScfContractStatusName,
-        };
-    },
+      } else {
+        return [];
+      }
+    }
+    return {
+      ...handleComposeOrderTable<QueryTradePositionRsp>(param),
+      columns,
+      loading,
+      tableList,
+      formatTime,
+      expandIcon,
+      handleBtnList,
+      getBuyOrSellName,
+      getScfContractStatusName,
+    };
+  },
 });
 </script>
 

+ 42 - 59
src/views/order/commodity_contract/components/commodity_contract_commission/index.vue

@@ -1,24 +1,10 @@
 <template>
   <!-- 商品订单 - 委托 -->
   <section>
-    <a-table :columns="columns"
-             class="srcollYTable expandLeftTable"
-             :scroll="{ x: '100%', y: '190px' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
-      <template v-if="btnList.length"
-                #expandedRowRender="{ record }">
-        <BtnList :btnList="filterBtnList(btnList, record)"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent" />
+      <template v-if="btnList.length" #expandedRowRender="{ record }">
+        <BtnList :btnList="filterBtnList(btnList, record)" :record="record" class="btn-list-sticky" @click="openComponent" />
       </template>
       <!-- 类型 -->
       <template #buildtype="{ record }">
@@ -33,10 +19,7 @@
         <a>{{ formatTime(text) }}</a>
       </template>
     </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -60,44 +43,44 @@ import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
 import { BtnListType } from '@/common/components/btnList/interface';
 
 export default defineComponent({
-    name: enumOrderComponents.commodity_contract_commission,
-    components: {
-        BtnList,
-        commodity_contract_commission_cancel_order: defineAsyncComponent(() => import('./components/cancel/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryTradeOrderDetail, {});
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            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;
-            }
-        }
-        return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-            getBuyOrSellTypeName,
-            getOrderStatusName,
-            filterBtnList,
-        };
-    },
+  name: enumOrderComponents.commodity_contract_commission,
+  components: {
+    BtnList,
+    commodity_contract_commission_cancel_order: defineAsyncComponent(() => import('./components/cancel/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      queryTable(queryTradeOrderDetail, {});
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      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;
+      }
+    }
+    return {
+      ...handleComposeOrderTable<WrPerformancePlan>(param),
+      loading,
+      tableList,
+      formatTime,
+      expandIcon,
+      getBuyOrSellTypeName,
+      getOrderStatusName,
+      filterBtnList,
+    };
+  },
 });
 </script>
 

+ 32 - 49
src/views/order/commodity_contract/components/commodity_contract_make_deal/index.vue

@@ -1,24 +1,10 @@
 <template>
   <!-- 商品订单 - 成交 -->
   <section>
-    <a-table :columns="columns"
-             class="srcollYTable expandLeftTable"
-             :scroll="{ x: '100%', y: '190px' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
-      <template v-if="btnList.length"
-                #expandedRowRender="{ record }">
-        <BtnList :btnList="btnList"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent" />
+      <template v-if="btnList.length" #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
       </template>
       <!-- 类型 -->
       <template #buyorsell="{ text }">
@@ -32,10 +18,7 @@
         <a>{{ formatTime(record.createtime) }}</a>
       </template>
     </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -52,34 +35,34 @@ import { queryTradeDetail } from '@/services/go/ermcp/order';
 import { QueryTradeDetailRsp } from '@/services/go/ermcp/order/interface';
 
 export default defineComponent({
-    name: enumOrderComponents.commodity_contract_make_deal,
-    components: {
-        BtnList,
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTradeDetailRsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryTradeDetail, {});
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_make_deal',
-            recordList: getRecordItemTab(),
-        };
-        return {
-            ...handleComposeOrderTable<QueryTradeDetailRsp>(param),
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-            getBuildTypeName,
-            getOrderStatusName,
-            getBuyOrSellTypeName,
-        };
-    },
+  name: enumOrderComponents.commodity_contract_make_deal,
+  components: {
+    BtnList,
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTradeDetailRsp>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      queryTable(queryTradeDetail, {});
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_make_deal',
+      recordList: getRecordItemTab(),
+    };
+    return {
+      ...handleComposeOrderTable<QueryTradeDetailRsp>(param),
+      loading,
+      tableList,
+      formatTime,
+      expandIcon,
+      getBuildTypeName,
+      getOrderStatusName,
+      getBuyOrSellTypeName,
+    };
+  },
 });
 </script>
 

+ 156 - 173
src/views/order/commodity_contract/components/commodity_contract_settlement/index.vue

@@ -1,24 +1,10 @@
 <template>
   <!-- 商品订单 - 交收 -->
   <section>
-    <a-table :columns="columns"
-             class="srcollYTable expandLeftTable"
-             :scroll="{ x: '100%', y: '190px' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
-      <template v-if="btnList.length"
-                #expandedRowRender="{ record }">
-        <BtnList :btnList="btnList"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent" />
+      <template v-if="btnList.length" #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
       </template>
       <template #createtime="{ record }">
         <span>{{ formatTime(record.createtime) }}</span>
@@ -40,10 +26,7 @@
         <a>{{ getDeliveryStatusName(record.deliverystatus) }}</a>
       </template>
     </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -65,162 +48,162 @@ import { expandIcon } from '@/common/setup/table/clolumn';
 import { getBuyOrSellName } from '@/common/constants/enumsName';
 
 const useColumns = () => {
-    const columns = [
-        {
-            key: '0th',
-            dataIndex: 'xgoodsname',
-            title: '订单合约',
-            align: 'center',
-            slots: {
-                customRender: 'xgoodsname',
-            },
-            width: 120,
-        },
-        {
-            key: '1th',
-            dataIndex: 'buyorsell',
-            title: '类型',
-            align: 'center',
-            slots: {
-                customRender: 'buyorsell',
-            },
-            width: 120,
-        },
-        {
-            key: '2th',
-            dataIndex: 'xdeliverycloseqty',
-            title: '合同数量',
-            align: 'center',
-            slots: {
-                customRender: 'xdeliverycloseqty',
-            },
-            width: 120,
-        },
-        {
-            key: '3th',
-            dataIndex: 'xgoodsamount',
-            title: '合约金额',
-            align: 'center',
-            slots: {
-                customRender: 'xgoodsamount',
-            },
-            width: 120,
-        },
-        {
-            key: '4th',
-            dataIndex: 'deliveryqty',
-            title: '点选数量',
-            align: 'center',
-            slots: {
-                customRender: 'deliveryqty',
-            },
-            width: 120,
-        },
-        {
-            key: '5th',
-            dataIndex: 'pdeliveryprice',
-            title: '点价价格',
-            align: 'center',
-            slots: {
-                customRender: 'pdeliveryprice',
-            },
-            width: 120,
-        },
-        {
-            key: '6th',
-            dataIndex: 'p1goodsremainamount',
-            title: '点价货款',
-            align: 'center',
-            slots: {
-                customRender: 'p1goodsremainamount',
-            },
-            width: 120,
-        },
-        {
-            key: '7th',
-            dataIndex: 'deliverypricemove',
-            title: '升贴水',
-            align: 'center',
-            slots: {
-                customRender: 'deliverypricemove',
-            },
-            width: 120,
-        },
-        {
-            key: '8th',
-            dataIndex: 'deliverytotalamount',
-            title: '交收金额',
-            align: 'center',
-            slots: {
-                customRender: 'deliverytotalamount',
-            },
-            width: 120,
-        },
-        {
-            key: '9th',
-            dataIndex: 'averageprice',
-            title: '交收均价',
-            align: 'center',
-            slots: {
-                customRender: 'averageprice',
-            },
-            width: 120,
-        },
-        {
-            key: '10th',
-            dataIndex: 'deliverytime',
-            title: '申请时间',
-            align: 'center',
-            slots: {
-                customRender: 'deliverytime',
-            },
-            width: 200,
-        },
-        {
-            key: '11th',
-            dataIndex: 'deliverystatus',
-            title: '状态',
-            align: 'center',
-            slots: {
-                customRender: 'deliverystatus',
-            },
-            width: 120,
-        },
-    ];
-    return { columns };
+  const columns = [
+    {
+      key: '0th',
+      dataIndex: 'xgoodsname',
+      title: '订单合约',
+      align: 'center',
+      slots: {
+        customRender: 'xgoodsname',
+      },
+      width: 120,
+    },
+    {
+      key: '1th',
+      dataIndex: 'buyorsell',
+      title: '类型',
+      align: 'center',
+      slots: {
+        customRender: 'buyorsell',
+      },
+      width: 120,
+    },
+    {
+      key: '2th',
+      dataIndex: 'xdeliverycloseqty',
+      title: '合同数量',
+      align: 'center',
+      slots: {
+        customRender: 'xdeliverycloseqty',
+      },
+      width: 120,
+    },
+    {
+      key: '3th',
+      dataIndex: 'xgoodsamount',
+      title: '合约金额',
+      align: 'center',
+      slots: {
+        customRender: 'xgoodsamount',
+      },
+      width: 120,
+    },
+    {
+      key: '4th',
+      dataIndex: 'deliveryqty',
+      title: '点选数量',
+      align: 'center',
+      slots: {
+        customRender: 'deliveryqty',
+      },
+      width: 120,
+    },
+    {
+      key: '5th',
+      dataIndex: 'pdeliveryprice',
+      title: '点价价格',
+      align: 'center',
+      slots: {
+        customRender: 'pdeliveryprice',
+      },
+      width: 120,
+    },
+    {
+      key: '6th',
+      dataIndex: 'p1goodsremainamount',
+      title: '点价货款',
+      align: 'center',
+      slots: {
+        customRender: 'p1goodsremainamount',
+      },
+      width: 120,
+    },
+    {
+      key: '7th',
+      dataIndex: 'deliverypricemove',
+      title: '升贴水',
+      align: 'center',
+      slots: {
+        customRender: 'deliverypricemove',
+      },
+      width: 120,
+    },
+    {
+      key: '8th',
+      dataIndex: 'deliverytotalamount',
+      title: '交收金额',
+      align: 'center',
+      slots: {
+        customRender: 'deliverytotalamount',
+      },
+      width: 120,
+    },
+    {
+      key: '9th',
+      dataIndex: 'averageprice',
+      title: '交收均价',
+      align: 'center',
+      slots: {
+        customRender: 'averageprice',
+      },
+      width: 120,
+    },
+    {
+      key: '10th',
+      dataIndex: 'deliverytime',
+      title: '申请时间',
+      align: 'center',
+      slots: {
+        customRender: 'deliverytime',
+      },
+      width: 200,
+    },
+    {
+      key: '11th',
+      dataIndex: 'deliverystatus',
+      title: '状态',
+      align: 'center',
+      slots: {
+        customRender: 'deliverystatus',
+      },
+      width: 120,
+    },
+  ];
+  return { columns };
 };
 
 export default defineComponent({
-    name: enumOrderComponents.commodity_contract_settlement,
-    components: {
-        BtnList,
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrDeliveryDetail>(true);
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryWrDeliveryDetail);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            // tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_settlement',
-            recordList: getRecordItemTab(),
-        };
+  name: enumOrderComponents.commodity_contract_settlement,
+  components: {
+    BtnList,
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrDeliveryDetail>(true);
+    // 获取列表数据
+    const queryTableAction = () => {
+      queryTable(queryWrDeliveryDetail);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      // tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_settlement',
+      recordList: getRecordItemTab(),
+    };
 
-        return {
-            ...handleComposeOrderTable<WrDeliveryDetail>(param),
-            ...useColumns(),
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-            getBuildTypeName,
-            getDeliveryStatusName,
-            getBuyOrSellName,
-        };
-    },
+    return {
+      ...handleComposeOrderTable<WrDeliveryDetail>(param),
+      ...useColumns(),
+      loading,
+      tableList,
+      formatTime,
+      expandIcon,
+      getBuildTypeName,
+      getDeliveryStatusName,
+      getBuyOrSellName,
+    };
+  },
 });
 </script>
 

+ 166 - 184
src/views/order/commodity_contract/components/commodity_contract_summary/index.vue

@@ -1,24 +1,10 @@
 <template>
   <!-- 商品订单 - 合约汇总 -->
   <section>
-    <a-table :columns="tabColumns"
-             class="srcollYTable expandLeftTable"
-             :scroll="{ x: '100%', y: '190px' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="tabColumns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
-      <template v-if="btnList.length"
-                #expandedRowRender="{ record }">
-        <BtnList :btnList="handleBtnList(record,btnList)"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent" />
+      <template v-if="btnList.length" #expandedRowRender="{ record }">
+        <BtnList :btnList="handleBtnList(record,btnList)" :record="record" class="btn-list-sticky" @click="openComponent" />
       </template>
       <template #createtime="{ record }">
         <a>{{ formatTime(record.createtime) }}</a>
@@ -43,11 +29,7 @@
         <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
       </template>
     </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               :tableList="tableList"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :tableList="tableList" @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -70,184 +52,184 @@ import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
 import { getBuyOrSellName, getChannelBuildName } from '@/common/constants/enumsName';
 
 const tabColumns = [
-    {
-        key: '10th',
-        dataIndex: 'goodsname',
-        title: '订单合约',
-        align: 'center',
-        slots: {
-            customRender: 'goodsname',
-        },
-        width: 120,
+  {
+    key: '10th',
+    dataIndex: 'goodsname',
+    title: '订单合约',
+    align: 'center',
+    slots: {
+      customRender: 'goodsname',
     },
-    {
-        key: '7th',
-        dataIndex: 'buyorsell',
-        title: '方向',
-        align: 'center',
-        slots: {
-            customRender: 'buyorsell',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '7th',
+    dataIndex: 'buyorsell',
+    title: '方向',
+    align: 'center',
+    slots: {
+      customRender: 'buyorsell',
     },
-    {
-        key: '8th',
-        dataIndex: 'curpositionqty',
-        title: '持有数量',
-        align: 'center',
-        slots: {
-            customRender: 'curpositionqty',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '8th',
+    dataIndex: 'curpositionqty',
+    title: '持有数量',
+    align: 'center',
+    slots: {
+      customRender: 'curpositionqty',
     },
-    {
-        key: '9th',
-        dataIndex: 'enableqty',
-        title: '可用数量',
-        align: 'center',
-        slots: {
-            customRender: 'enableqty',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '9th',
+    dataIndex: 'enableqty',
+    title: '可用数量',
+    align: 'center',
+    slots: {
+      customRender: 'enableqty',
     },
-    {
-        key: '0th',
-        dataIndex: 'frozenqty',
-        title: '冻结数量',
-        align: 'center',
-        slots: {
-            customRender: 'frozenqty',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '0th',
+    dataIndex: 'frozenqty',
+    title: '冻结数量',
+    align: 'center',
+    slots: {
+      customRender: 'frozenqty',
     },
-    {
-        key: '1th',
-        dataIndex: 'averageprice',
-        title: '均价',
-        align: 'center',
-        slots: {
-            customRender: 'averageprice',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '1th',
+    dataIndex: 'averageprice',
+    title: '均价',
+    align: 'center',
+    slots: {
+      customRender: 'averageprice',
     },
-    {
-        key: '2th',
-        dataIndex: 'lastprice',
-        title: '现价',
-        align: 'center',
-        slots: {
-            customRender: 'lastprice',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '2th',
+    dataIndex: 'lastprice',
+    title: '现价',
+    align: 'center',
+    slots: {
+      customRender: 'lastprice',
     },
-    {
-        key: '3th',
-        dataIndex: 'curholderamount',
-        title: '持仓金额',
-        align: 'center',
-        slots: {
-            customRender: 'curholderamount',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '3th',
+    dataIndex: 'curholderamount',
+    title: '持仓金额',
+    align: 'center',
+    slots: {
+      customRender: 'curholderamount',
     },
-    {
-        key: '4th',
-        dataIndex: 'usedmargin',
-        title: '占用保证金',
-        align: 'center',
-        slots: {
-            customRender: 'usedmargin',
-        },
-        width: 130,
+    width: 120,
+  },
+  {
+    key: '4th',
+    dataIndex: 'usedmargin',
+    title: '占用保证金',
+    align: 'center',
+    slots: {
+      customRender: 'usedmargin',
     },
-    {
-        key: '5th',
-        dataIndex: 'marketamount',
-        title: '市值',
-        align: 'center',
-        slots: {
-            customRender: 'marketamount',
-        },
-        width: 120,
+    width: 130,
+  },
+  {
+    key: '5th',
+    dataIndex: 'marketamount',
+    title: '市值',
+    align: 'center',
+    slots: {
+      customRender: 'marketamount',
     },
-    {
-        key: '6th',
-        dataIndex: 'profitloss',
-        title: '浮动盈亏',
-        align: 'center',
-        slots: {
-            customRender: 'profitloss',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '6th',
+    dataIndex: 'profitloss',
+    title: '浮动盈亏',
+    align: 'center',
+    slots: {
+      customRender: 'profitloss',
     },
+    width: 120,
+  },
 ];
 
 export default defineComponent({
-    name: enumOrderComponents.commodity_contract_summary,
-    components: {
-        BtnList,
-        [ModalEnum.commodity_contract_summary_settlement]: defineAsyncComponent(() => import('./components/commodity_contract_summary_settlement/index.vue')),
-        [ModalEnum.commodity_contract_summary_transfer]: defineAsyncComponent(() => import('./components/commodity_contract_summary_transfer/index.vue')),
-        commodity_contract_summary_deal_closed: defineAsyncComponent(() => import('./components/commodity_contract_summary_deal_closed/index.vue')),
-        commodity_contract_summary_order_closed: defineAsyncComponent(() => import('./components/commodity_contract_summary_order_closed/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
-        const { subscribeAction } = handleSubcriteQuote();
-        // 交割商品
-        handleDeliveryRelation();
+  name: enumOrderComponents.commodity_contract_summary,
+  components: {
+    BtnList,
+    [ModalEnum.commodity_contract_summary_settlement]: defineAsyncComponent(() => import('./components/commodity_contract_summary_settlement/index.vue')),
+    [ModalEnum.commodity_contract_summary_transfer]: defineAsyncComponent(() => import('./components/commodity_contract_summary_transfer/index.vue')),
+    commodity_contract_summary_deal_closed: defineAsyncComponent(() => import('./components/commodity_contract_summary_deal_closed/index.vue')),
+    commodity_contract_summary_order_closed: defineAsyncComponent(() => import('./components/commodity_contract_summary_order_closed/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
+    const { subscribeAction } = handleSubcriteQuote();
+    // 交割商品
+    handleDeliveryRelation();
 
-        // 挂牌点选商品
-        //         const { deliverGoods, getQuoteList, goodsList, } = handleDeliveryRelation([1, 3]);
-        //         // 参考行情商品
-        // const goodsList = getQutoGoodsByTradeMode(TradeMode.quote99);
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryTradePosition).then((res) => {
-                const result: string[] = [];
-                res.forEach((el) => {});
-                const goodsList = res.map((el) => {
-                    return el.goodscode;
-                });
-                //  行情订阅
-                subscribeAction(goodsList);
-            });
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_summary',
-            recordList: getRecordItemTab(),
-        };
-        // 现价
-        function getLastprice({ goodscode, decimalplace }: QueryTradePositionRsp) {
-            const lastPrice = getQuoteDayInfoByCodeFindPrice(goodscode);
-            return lastPrice === '--' ? lastPrice : Number(lastPrice).toFixed(decimalplace);
-        }
+    // 挂牌点选商品
+    //         const { deliverGoods, getQuoteList, goodsList, } = handleDeliveryRelation([1, 3]);
+    //         // 参考行情商品
+    // const goodsList = getQutoGoodsByTradeMode(TradeMode.quote99);
+    // 获取列表数据
+    const queryTableAction = () => {
+      queryTable(queryTradePosition).then((res) => {
+        const result: string[] = [];
+        res.forEach((el) => { });
+        const goodsList = res.map((el) => {
+          return el.goodscode;
+        });
+        //  行情订阅
+        subscribeAction(goodsList);
+      });
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_summary',
+      recordList: getRecordItemTab(),
+    };
+    // 现价
+    function getLastprice({ goodscode, decimalplace }: QueryTradePositionRsp) {
+      const lastPrice = getQuoteDayInfoByCodeFindPrice(goodscode);
+      return lastPrice === '--' ? lastPrice : Number(lastPrice).toFixed(decimalplace);
+    }
 
-        function handleBtnList(record: QueryTradePositionRsp, btnList: BtnListType[]) {
-            // 挂牌点选
-            const listing = ['commodity_contract_summary_transfer', 'commodity_contract_summary_settlement'];
-            // 贸易圈
-            const diaoqi = ['commodity_contract_summary_deal_closed', 'commodity_contract_summary_order_closed'];
-            const arr = findGoodsTradeModeById(record.goodsid) === TradeMode.DiaoQi ? diaoqi : listing;
-            return btnList.filter((e) => arr.includes(e.code));
-        }
-        return {
-            ...handleComposeOrderTable<QueryTradePositionRsp>(param),
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-            getLastprice,
-            useHolderprice,
-            useProfitloss,
-            handleBtnList,
-            tabColumns,
-            getBuyOrSellName,
-        };
-    },
+    function handleBtnList(record: QueryTradePositionRsp, btnList: BtnListType[]) {
+      // 挂牌点选
+      const listing = ['commodity_contract_summary_transfer', 'commodity_contract_summary_settlement'];
+      // 贸易圈
+      const diaoqi = ['commodity_contract_summary_deal_closed', 'commodity_contract_summary_order_closed'];
+      const arr = findGoodsTradeModeById(record.goodsid) === TradeMode.DiaoQi ? diaoqi : listing;
+      return btnList.filter((e) => arr.includes(e.code));
+    }
+    return {
+      ...handleComposeOrderTable<QueryTradePositionRsp>(param),
+      loading,
+      tableList,
+      formatTime,
+      expandIcon,
+      getLastprice,
+      useHolderprice,
+      useProfitloss,
+      handleBtnList,
+      tabColumns,
+      getBuyOrSellName,
+    };
+  },
 });
 </script>
 

+ 47 - 64
src/views/order/financing_manager/components/financing_manager_contract/index.vue

@@ -1,24 +1,10 @@
 <template>
   <!-- 合同 -->
   <section>
-    <a-table :columns="columns"
-             class="srcollYTable expandLeftTable"
-             :scroll="{ x: '100%', y: '190px' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
-      <template v-if="btnList.length"
-                #expandedRowRender="{ record }">
-        <BtnList :btnList="handleBtnList(btnList, record)"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent" />
+      <template v-if="btnList.length" #expandedRowRender="{ record }">
+        <BtnList :btnList="handleBtnList(btnList, record)" :record="record" class="btn-list-sticky" @click="openComponent" />
       </template>
       <!-- 类型 -->
       <template #financetype="{ record }">
@@ -35,10 +21,7 @@
         <a>{{ getScfContractTypeName(record.scfcontracttype) }}</a>
       </template>
     </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -56,49 +39,49 @@ import { getContractName, getFinanceTypeName, getScfContractTypeName } from '@/c
 import { BtnListType } from '@/common/components/btnList/interface';
 
 export default defineComponent({
-    name: enumOrderComponents.financing_manager_contract,
-    components: {
-        BtnList,
-        [ModalEnum.financing_manager_contract_repurchase_warrant]: defineAsyncComponent(() => import('./components/buyback/index.vue')),
-        [ModalEnum.financing_manager_contract_pay_arrears]: defineAsyncComponent(() => import('./components/pay/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrScfContract>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryWrScfContract);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_financing_manage_bottom_contract',
-            recordList: getRecordItemTab(),
-        };
-        function handleBtnList(btnList: BtnListType[], item: WrScfContract) {
-            const { remainwrpositionqty, interestdebt } = item;
-            let result: BtnListType[] = btnList;
-            if (interestdebt === 0) {
-                // 费用欠款”不为0时出现“支付欠款”按钮
-                result = btnList.filter((e) => e.code !== ModalEnum.financing_manager_contract_pay_arrears);
-            } else if (remainwrpositionqty === 0) {
-                // “剩余数量”不为0时出现“回购仓单”按钮
-                result = btnList.filter((e) => e.code !== ModalEnum.financing_manager_contract_repurchase_warrant);
-            }
-            return result;
-        }
-        return {
-            ...handleComposeOrderTable<WrScfContract>(param),
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-            getContractName,
-            getFinanceTypeName,
-            handleBtnList,
-            getScfContractTypeName,
-        };
-    },
+  name: enumOrderComponents.financing_manager_contract,
+  components: {
+    BtnList,
+    [ModalEnum.financing_manager_contract_repurchase_warrant]: defineAsyncComponent(() => import('./components/buyback/index.vue')),
+    [ModalEnum.financing_manager_contract_pay_arrears]: defineAsyncComponent(() => import('./components/pay/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrScfContract>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      queryTable(queryWrScfContract);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_financing_manage_bottom_contract',
+      recordList: getRecordItemTab(),
+    };
+    function handleBtnList(btnList: BtnListType[], item: WrScfContract) {
+      const { remainwrpositionqty, interestdebt } = item;
+      let result: BtnListType[] = btnList;
+      if (interestdebt === 0) {
+        // 费用欠款”不为0时出现“支付欠款”按钮
+        result = btnList.filter((e) => e.code !== ModalEnum.financing_manager_contract_pay_arrears);
+      } else if (remainwrpositionqty === 0) {
+        // “剩余数量”不为0时出现“回购仓单”按钮
+        result = btnList.filter((e) => e.code !== ModalEnum.financing_manager_contract_repurchase_warrant);
+      }
+      return result;
+    }
+    return {
+      ...handleComposeOrderTable<WrScfContract>(param),
+      loading,
+      tableList,
+      formatTime,
+      expandIcon,
+      getContractName,
+      getFinanceTypeName,
+      handleBtnList,
+      getScfContractTypeName,
+    };
+  },
 });
 </script>
 

+ 45 - 67
src/views/order/funding_information/components/funding_information_funding_log/index.vue

@@ -1,39 +1,17 @@
 <template>
-    <!-- 资金流水 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template v-if="btnList.length" #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="btnList"
-                    :record="record"
-                    class="btn-list-sticky"
-                    @click="openComponent"
-                />
-            </template>
-            <template #createtime="{ record }">
-                <a>{{ formatTime(record.createtime) }}</a>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 资金流水 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length" #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+      </template>
+      <template #createtime="{ record }">
+        <a>{{ formatTime(record.createtime) }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -53,39 +31,39 @@ import Bus from '@/utils/eventBus/index';
 import { expandIcon } from '@/common/setup/table/clolumn';
 
 export default defineComponent({
-    name: enumOrderComponents.funding_information_funding_log,
-    components: {
-        BtnList,
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryAmountLogReq = {
-                accountID: getSelectedAccountId().toString(),
-            };
+  name: enumOrderComponents.funding_information_funding_log,
+  components: {
+    BtnList,
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryAmountLogReq = {
+        accountID: getSelectedAccountId().toString(),
+      };
 
-            queryTable(queryAmountLog, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_funding_info_log',
-            recordList: getRecordItemTab(),
-        };
-        // 资金变化,重新加载数据
-        Bus.$on('moneyChangedNtf_UI', () => {
-            queryTableAction();
-        });
-        return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-        };
-    },
+      queryTable(queryAmountLog, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_funding_info_log',
+      recordList: getRecordItemTab(),
+    };
+    // 资金变化,重新加载数据
+    Bus.$on('moneyChangedNtf_UI', () => {
+      queryTableAction();
+    });
+    return {
+      ...handleComposeOrderTable<WrPerformancePlan>(param),
+      loading,
+      tableList,
+      formatTime,
+      expandIcon,
+    };
+  },
 });
 </script>
 

+ 7 - 32
src/views/order/funding_information/components/funding_information_funding_summary/index.vue

@@ -1,26 +1,21 @@
 <template>
   <!-- 资金汇总 -->
   <section>
-    <a-table :columns="getColumns()" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList"></a-table>
+    <a-table :columns="getColumns()" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tradeAccountList"></a-table>
     <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </section>
 </template>
 
 <script lang="ts">
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-import { BtnList, defineComponent, queryTableList } from '@/common/export/commonTable';
+import { BtnList, defineComponent } from '@/common/export/commonTable';
 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 { geLoginID_number } from '@/services/bus/login';
-import { queryTradePosition } from '@/services/go/ermcp/order';
-import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
-import { getTaAccounts } from '@/services/go/TaAccount';
-import { GetTaAccountsReq, Taaccount } from '@/services/go/TaAccount/interface';
-import Bus from '@/utils/eventBus/index';
-import { ref } from 'vue';
+import { Taaccount } from '@/services/go/TaAccount/interface';
 import { getColumns } from './setup';
+import { getTradeAccount } from '@/hooks/account'
 
 export default defineComponent({
   name: enumOrderComponents.funding_information_funding_summary,
@@ -28,38 +23,18 @@ export default defineComponent({
     BtnList,
   },
   setup() {
-    // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<Taaccount>(true, 2);
-    // 持仓汇总
-    const holdsList = ref<QueryTradePositionRsp[]>([]);
-    // 获取列表数据
-    const queryTableAction = () => {
-      const param: GetTaAccountsReq = {
-        loginID: Number(geLoginID_number()),
-      };
-      queryTable(getTaAccounts, param);
-      // 获取头寸
-      queryTradePosition().then((res) => {
-        holdsList.value = res;
-      });
-    };
-
-    // 资金变化,重新加载数据
-    Bus.$on('moneyChangedNtf_UI', () => {
-      queryTableAction();
-    });
+    const { loading, tradeAccountList, initData } = getTradeAccount()
 
     // 表格通用逻辑
     const param: ComposeOrderTableParam = {
-      queryFn: queryTableAction,
-      tableName: 'table_pcweb_spot_trade_bottom_funding_info_summary',
+      queryFn: initData,
       recordList: getRecordItemTab(),
     };
 
     return {
       ...handleComposeOrderTable<Taaccount>(param),
       loading,
-      tableList,
+      tradeAccountList,
       expandIcon,
       getColumns,
     };

+ 20 - 5
src/views/order/funding_information/components/funding_information_funding_summary/setup.ts → src/views/order/funding_information/components/funding_information_funding_summary/setup.tsx

@@ -27,10 +27,8 @@ export function getColumns() {
         },
         {
             title: '可用资金',
-            key: 'balance',
-            customRender: ({ record }: { record: Taaccount }) => {
-                return getCanUseMoney(record)
-            }
+            key: 'availableBalance',
+            customRender: ({ text }: { text: number }) => text.toFixed(2)
         },
         {
             title: '占用资金',
@@ -45,7 +43,11 @@ export function getColumns() {
         },
         {
             title: '持仓盈亏',
-            key: 'positionpl',
+            key: 'positionProfitAndLoss',
+            customRender: ({ text }: { text: number }) => {
+                if (text === 0) return 0;
+                return handlePriceColor(text, text.toFixed(2));
+            }
         },
         {
             title: '平仓盈亏',
@@ -79,6 +81,19 @@ export function getColumns() {
     })
 }
 
+/**
+ * 处理显示颜色
+ */
+function handlePriceColor(value: number, text: string) {
+    let className = ''
+    if (value > 0) {
+        className = 'up-quote-color'
+    } else {
+        className = 'down-quote-color'
+    }
+    return <span class={className}>{text}</span>;
+}
+
 export const useHazardRates = (positions: Ref<QueryTradePositionRsp[]>) => {
     // 获取报价小数位
     function getDecimalplace() {

+ 31 - 31
src/views/order/futures_information/components/futures_information_entrust/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 期货订单-委托 -->
   <section class="futures_information_position">
-    <a-table :columns="getColumns()" class="srcollYTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
+    <a-table :columns="getColumns()" class="srcollYTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template v-if="btnList.length" #expandedRowRender="{ record }">
         <BtnList :btnList="handleBtnList(btnList,record)" :record="record" class="btn-list-sticky" @click="openComponent" />
@@ -25,38 +25,38 @@ import { getColumns } from './columns';
 import { cancel } from './setup';
 
 export default defineComponent({
-    components: {
-        BtnList,
-        cancel,
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryErmcpOrderDetailsRsp>();
+  components: {
+    BtnList,
+    cancel,
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryErmcpOrderDetailsRsp>();
 
-        // 处理根据状态显示对应按钮
-        const handleBtnList = (btnList: BtnListType[], item: QueryErmcpOrderDetailsRsp) => {
-            switch (item.channelinnerorderstatus) {
-                case 9: // 全部成交
-                    return btnList.filter((e) => e.code !== 'cancel');
-                default:
-                    return btnList;
-            }
-        };
+    // 处理根据状态显示对应按钮
+    const handleBtnList = (btnList: BtnListType[], item: QueryErmcpOrderDetailsRsp) => {
+      switch (item.channelinnerorderstatus) {
+        case 9: // 全部成交
+          return btnList.filter((e) => e.code !== 'cancel');
+        default:
+          return btnList;
+      }
+    };
 
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: () => queryTable(queryErmcpOrderDetails),
-            recordList: getRecordItemTab(),
-        };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: () => queryTable(queryErmcpOrderDetails),
+      recordList: getRecordItemTab(),
+    };
 
-        return {
-            ...handleComposeOrderTable(param),
-            handleBtnList,
-            getColumns,
-            loading,
-            expandIcon,
-            tableList,
-        };
-    },
+    return {
+      ...handleComposeOrderTable(param),
+      handleBtnList,
+      getColumns,
+      loading,
+      expandIcon,
+      tableList,
+    };
+  },
 });
 </script>

+ 15 - 73
src/views/order/futures_information/components/futures_information_position/columns.tsx

@@ -1,7 +1,5 @@
-import { QueryErmcpTradePositionRsp } from '@/services/go/ermcp/futures/interface';
-import { BuyOrSell } from '@/common/constants/enumCommon';
 import { getBuyOrSellName } from '@/common/constants/enumsName';
-import { getQuoteDayInfoByCode } from "@/services/bus/goods";
+import { TradePosition } from "@/hooks/account/interface";
 
 export function getColumns() {
     const columns = [
@@ -9,16 +7,14 @@ export function getColumns() {
             title: '合约',
             key: 'goodscode',
             width: 150,
-            customRender: ({ record }: { record: QueryErmcpTradePositionRsp }) => {
+            customRender: ({ record }: { record: TradePosition }) => {
                 return `${record.goodsname}/${record.goodscode}`
             }
         },
         {
             title: '方向',
             key: 'buyorsell',
-            customRender: ({ record }: { record: QueryErmcpTradePositionRsp }) => {
-                return getBuyOrSellName(record.buyorsell)
-            }
+            customRender: ({ text }: { text: number }) => getBuyOrSellName(text)
         },
         {
             title: '总持仓',
@@ -30,34 +26,28 @@ export function getColumns() {
         },
         {
             title: '开仓均价',
-            key: 'openaverageprice',
-            customRender: ({ record }: { record: QueryErmcpTradePositionRsp }) => {
-                return calcOpenAveragePrice(record).toFixed(2);
-            }
+            key: 'openAveragePrice',
+            customRender: ({ text }: { text: number }) => text.toFixed(2)
         },
         {
             title: '持仓均价',
-            key: 'positionaverageprice',
-            customRender: ({ record }: { record: QueryErmcpTradePositionRsp }) => {
-                return calcPositionAveragePrice(record).toFixed(2);
-            }
+            key: 'positionAveragePrice',
+            customRender: ({ text }: { text: number }) => text.toFixed(2)
         },
         {
             title: '浮动盈亏',
-            key: 'positionpl',
-            customRender: ({ record }: { record: QueryErmcpTradePositionRsp }) => {
-                const result = calcPositionPl(record);
-                if (result === 0) return result;
-                return handlePriceColor(result, result.toFixed(2));
+            key: 'positionProfitAndLoss',
+            customRender: ({ text }: { text: number }) => {
+                if (text === 0) return 0;
+                return handlePriceColor(text, text.toFixed(2));
             }
         },
         {
             title: '盈亏比例',
-            key: 'positionplrate',
-            customRender: ({ record }: { record: QueryErmcpTradePositionRsp }) => {
-                const result = calcPositionPlRate(record);
-                if (result === 0) return result;
-                return handlePriceColor(result, result.toFixed(2) + '%');
+            key: 'positionProfitAndLossRate',
+            customRender: ({ text }: { text: number }) => {
+                if (text === 0) return 0;
+                return handlePriceColor(text, text.toFixed(2) + '%');
             }
         },
     ];
@@ -73,54 +63,6 @@ export function getColumns() {
 }
 
 /**
- * 计算开仓均价
- */
-function calcOpenAveragePrice(record: QueryErmcpTradePositionRsp) {
-    const { opencost, curpositionqty, agreeunit } = record
-    // 开仓成本 ÷ 期末头寸 ÷ 合约单位
-    return opencost / curpositionqty / agreeunit;
-}
-
-/**
- * 计算持仓均价
- */
-function calcPositionAveragePrice(record: QueryErmcpTradePositionRsp) {
-    const { positioncost, curpositionqty, agreeunit } = record
-    // 持仓成本 ÷ 期末头寸 ÷ 合约单位
-    return positioncost / curpositionqty / agreeunit;
-}
-
-/**
- * 计算浮动盈亏
- */
-function calcPositionPl(record: QueryErmcpTradePositionRsp) {
-    const { goodscode, curpositionqty, agreeunit } = record
-    // 获取对应的商品行情
-    const quote = getQuoteDayInfoByCode(goodscode);
-
-    if (quote?.last) {
-        if (record.buyorsell === BuyOrSell.buy) {
-            // 买方向 = (最新价 - 持仓均价) * 买期末头寸 * 合约单位
-            return (quote.last - calcPositionAveragePrice(record)) * curpositionqty * agreeunit
-        } else {
-            // 卖方向 = (持仓均价 - 最新价) * 卖期末头寸 * 合约单位
-            return (calcPositionAveragePrice(record) - quote.last) * curpositionqty * agreeunit
-        }
-    }
-    return record.positionpl
-}
-
-function calcPositionPlRate(record: QueryErmcpTradePositionRsp) {
-    const { opencost } = record
-    // 持仓盈亏 ÷ 开仓成本
-    const result = calcPositionPl(record) / opencost * 100
-    if (isNaN(result)) {
-        return 0
-    }
-    return result
-}
-
-/**
  * 处理显示颜色
  */
 function handlePriceColor(value: number, text: string) {

+ 6 - 18
src/views/order/futures_information/components/futures_information_position/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 期货订单-持仓 -->
   <section class="futures_information_position">
-    <a-table :columns="getColumns()" class="srcollYTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
+    <a-table :columns="getColumns()" class="srcollYTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tradePositionList">
       <!-- 额外的展开行 -->
       <template v-if="btnList.length" #expandedRowRender="{ record }">
         <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
@@ -13,15 +13,13 @@
 
 <script lang="ts">
 import { defineComponent, defineAsyncComponent } from 'vue';
-import { queryTableList, BtnList } from '@/common/export/commonTable';
+import { BtnList } from '@/common/export/commonTable';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
 import { getRecordItemTab } from '@/common/setup/order/orderData';
-import { queryErmcpTradePosition } from '@/services/go/ermcp/futures';
-import { QueryErmcpTradePositionRsp } from '@/services/go/ermcp/futures/interface';
 import { getColumns } from './columns';
-import Bus from '@/utils/eventBus/index';
+import { getTradeAccount } from '@/hooks/account'
 
 export default defineComponent({
   components: {
@@ -29,30 +27,20 @@ export default defineComponent({
     close: defineAsyncComponent(() => import('@/views/market/futures/compoments/futures-trade/index.vue')),
   },
   setup() {
-    // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<QueryErmcpTradePositionRsp>();
-
-    // 获取列表数据
-    const queryTableAction = () => queryTable(queryErmcpTradePosition);
+    const { loading, tradePositionList, initData } = getTradeAccount()
 
     // 表格通用逻辑
     const param: ComposeOrderTableParam = {
-      queryFn: queryTableAction,
+      queryFn: initData,
       recordList: getRecordItemTab(),
     };
 
-    // 注册资金变化事件,待通知调用
-    Bus.$on('moneyChangedNtf_UI', () => {
-      // 重新加载数据
-      queryTableAction();
-    });
-
     return {
       ...handleComposeOrderTable(param),
       getColumns,
       loading,
       expandIcon,
-      tableList,
+      tradePositionList,
     };
   },
 });

+ 20 - 20
src/views/order/futures_information/components/futures_information_success/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 期货订单-成交 -->
   <section class="futures_information_position">
-    <a-table :columns="getColumns()" class="srcollYTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
+    <a-table :columns="getColumns()" class="srcollYTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template v-if="btnList.length" #expandedRowRender="{ record }">
         <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
@@ -23,26 +23,26 @@ import { QueryErmcpTradeDetailsRsp } from '@/services/go/ermcp/futures/interface
 import { getColumns } from './columns';
 
 export default defineComponent({
-    components: {
-        BtnList,
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryErmcpTradeDetailsRsp>();
+  components: {
+    BtnList,
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryErmcpTradeDetailsRsp>();
 
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: () => queryTable(queryErmcpTradeDetails),
-            recordList: getRecordItemTab(),
-        };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: () => queryTable(queryErmcpTradeDetails),
+      recordList: getRecordItemTab(),
+    };
 
-        return {
-            ...handleComposeOrderTable(param),
-            getColumns,
-            loading,
-            expandIcon,
-            tableList,
-        };
-    },
+    return {
+      ...handleComposeOrderTable(param),
+      getColumns,
+      loading,
+      expandIcon,
+      tableList,
+    };
+  },
 });
 </script>

+ 79 - 102
src/views/order/performance_information/components/performance_information_buy_performance/index.vue

@@ -1,56 +1,33 @@
 <template>
-    <!-- 买履约 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="handleBtn(btnList, record)"
-                    :record="record"
-                    class="btn-list-sticky"
-                    @click="openComponent"
-                />
-            </template>
-            <!-- 履约类型 -->
-            <template #performancetype="{ record }">
-                <a>{{ getPerformanceTypeName(record.performancetype, record.haswr) }}</a>
-            </template>
+  <!-- 买履约 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="handleBtn(btnList, record)" :record="record" class="btn-list-sticky" @click="openComponent" />
+      </template>
+      <!-- 履约类型 -->
+      <template #performancetype="{ record }">
+        <a>{{ getPerformanceTypeName(record.performancetype, record.haswr) }}</a>
+      </template>
 
-            <!-- 付款方式 -->
-            <template #paymenttype="{ record }">
-                <a>{{ getPaymentTypeName(record.paymenttype) }}</a>
-            </template>
+      <!-- 付款方式 -->
+      <template #paymenttype="{ record }">
+        <a>{{ getPaymentTypeName(record.paymenttype) }}</a>
+      </template>
 
-            <!-- 履约状态 -->
-            <template #performancestatus="{ record }">
-                <a>{{ getPerformanceStatusName(record.performancestatus) }}</a>
-            </template>
+      <!-- 履约状态 -->
+      <template #performancestatus="{ record }">
+        <a>{{ getPerformanceStatusName(record.performancestatus) }}</a>
+      </template>
 
-            <!-- 当前步骤 -->
-            <template #curstepname="{ record }">
-                <a>{{ record.curstepname }}</a>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            :buyOrSell="BuyOrSell.buy"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+      <!-- 当前步骤 -->
+      <template #curstepname="{ record }">
+        <a>{{ record.curstepname }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.buy" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -66,60 +43,60 @@ import { BtnListType } from '@/common/components/btnList/interface';
 import { BuyOrSell } from '@/common/constants/enumCommon';
 import { getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName } from '@/common/constants/enumsName';
 export default defineComponent({
-    name: enumOrderComponents.performance_information_buy_performance,
-    components: {
-        BtnList,
-        [ModalEnum.performance_information_buy_performance_pay]: defineAsyncComponent(() => import('../components/pay/index.vue')),
-        [ModalEnum.performance_information_buy_performance_extension]: defineAsyncComponent(() => import('../components/extension/index.vue')),
-        [ModalEnum.performance_information_buy_performance_breach_contract]: defineAsyncComponent(() => import('../components/breach_contract/index.vue')),
-        [ModalEnum.performance_information_buy_performance_detail]: defineAsyncComponent(() => import('../components/detail/index.vue')),
-        [ModalEnum.performance_information_buy_performance_settlement]: defineAsyncComponent(() => import('../components/settlement/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryPerformancePlanReq = {
-                buyorsell: 0,
-            };
-            queryTable(QueryPerformancePlan, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_performance_info_buy',
-            recordList: getRecordItemTab(),
-        };
-        function handleBtn(btnList: BtnListType[], record: WrPerformancePlan): BtnListType[] {
-            //  performancestatus: number;//履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 1number;
-            const { curstepname, performancestatus } = record;
-            let result: ModalEnum[] = [];
-            if (performancestatus === 1) {
-                result = [ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_settlement];
-            } else if (performancestatus === 2) {
-                if (curstepname === '买方支付') {
-                    result = [ModalEnum.performance_information_buy_performance_pay, ModalEnum.performance_information_buy_performance_extension, ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_detail];
-                } else if (curstepname === '货款溢短') {
-                    result = [ModalEnum.performance_information_buy_performance_extension, ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_detail];
-                } else if (curstepname === '卖方发票') {
-                    result = [ModalEnum.performance_information_buy_performance_extension, ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_detail];
-                }
-            }
-            return btnList.filter((e) => result.includes(e.code as ModalEnum));
+  name: enumOrderComponents.performance_information_buy_performance,
+  components: {
+    BtnList,
+    [ModalEnum.performance_information_buy_performance_pay]: defineAsyncComponent(() => import('../components/pay/index.vue')),
+    [ModalEnum.performance_information_buy_performance_extension]: defineAsyncComponent(() => import('../components/extension/index.vue')),
+    [ModalEnum.performance_information_buy_performance_breach_contract]: defineAsyncComponent(() => import('../components/breach_contract/index.vue')),
+    [ModalEnum.performance_information_buy_performance_detail]: defineAsyncComponent(() => import('../components/detail/index.vue')),
+    [ModalEnum.performance_information_buy_performance_settlement]: defineAsyncComponent(() => import('../components/settlement/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryPerformancePlanReq = {
+        buyorsell: 0,
+      };
+      queryTable(QueryPerformancePlan, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_performance_info_buy',
+      recordList: getRecordItemTab(),
+    };
+    function handleBtn(btnList: BtnListType[], record: WrPerformancePlan): BtnListType[] {
+      //  performancestatus: number;//履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 1number;
+      const { curstepname, performancestatus } = record;
+      let result: ModalEnum[] = [];
+      if (performancestatus === 1) {
+        result = [ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_settlement];
+      } else if (performancestatus === 2) {
+        if (curstepname === '买方支付') {
+          result = [ModalEnum.performance_information_buy_performance_pay, ModalEnum.performance_information_buy_performance_extension, ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_detail];
+        } else if (curstepname === '货款溢短') {
+          result = [ModalEnum.performance_information_buy_performance_extension, ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_detail];
+        } else if (curstepname === '卖方发票') {
+          result = [ModalEnum.performance_information_buy_performance_extension, ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_detail];
         }
-        return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
-            loading,
-            tableList,
-            getPerformanceTypeName,
-            getPerformanceStatusName,
-            getPaymentTypeName,
-            expandIcon,
-            handleBtn,
-            BuyOrSell,
-        };
-    },
+      }
+      return btnList.filter((e) => result.includes(e.code as ModalEnum));
+    }
+    return {
+      ...handleComposeOrderTable<WrPerformancePlan>(param),
+      loading,
+      tableList,
+      getPerformanceTypeName,
+      getPerformanceStatusName,
+      getPaymentTypeName,
+      expandIcon,
+      handleBtn,
+      BuyOrSell,
+    };
+  },
 });
 </script>
 

+ 58 - 76
src/views/order/performance_information/components/performance_information_sell_performance/index.vue

@@ -1,24 +1,10 @@
 <template>
   <!-- 卖履约 -->
   <section>
-    <a-table :columns="columns"
-             class="srcollYTable expandLeftTable"
-             :scroll="{ x: '100%', y: '190px' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
-      <template v-if="btnList.length"
-                #expandedRowRender="{ record }">
-        <BtnList :btnList="handleBtn(btnList, record)"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent" />
+      <template v-if="btnList.length" #expandedRowRender="{ record }">
+        <BtnList :btnList="handleBtn(btnList, record)" :record="record" class="btn-list-sticky" @click="openComponent" />
       </template>
       <!-- 履约类型 -->
       <template #performancetype="{ record }">
@@ -40,11 +26,7 @@
         <a>{{ record.curstepname }}</a>
       </template>
     </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :buyOrSell="BuyOrSell.sell"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :buyOrSell="BuyOrSell.sell" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -62,61 +44,61 @@ import { BuyOrSell } from '@/common/constants/enumCommon';
 import { getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName } from '@/common/constants/enumsName';
 
 export default defineComponent({
-    name: enumOrderComponents.performance_information_sell_performance,
-    components: {
-        BtnList,
-        [ModalEnum.performance_information_sell_performance_pay]: defineAsyncComponent(() => import('../components/pay/index.vue')),
-        [ModalEnum.performance_information_sell_performance_extension]: defineAsyncComponent(() => import('../components/extension/index.vue')),
-        [ModalEnum.performance_information_sell_performance_breach_contract]: defineAsyncComponent(() => import('../components/breach_contract/index.vue')),
-        [ModalEnum.performance_information_sell_performance_detail]: defineAsyncComponent(() => import('../components/detail/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryPerformancePlanReq = {
-                buyorsell: 1,
-            };
-            queryTable(QueryPerformancePlan, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_performance_info_sale',
-            recordList: getRecordItemTab(),
-        };
-        function handleBtn(btnList: BtnListType[], record: WrPerformancePlan): BtnListType[] {
-            //  performancestatus: number;//履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 1number;
-            const { curstepname, performancestatus } = record;
-            let result: ModalEnum[] = [];
-            if (performancestatus === 1) {
-                result = [ModalEnum.performance_information_sell_performance_breach_contract];
-            } else if (performancestatus === 2) {
-                if (curstepname === '卖方发货') {
-                    result = [ModalEnum.performance_information_sell_performance_extension, ModalEnum.performance_information_sell_performance_breach_contract, ModalEnum.performance_information_sell_performance_detail];
-                } else if (curstepname === '买方支付') {
-                    result = [ModalEnum.performance_information_sell_performance_extension, ModalEnum.performance_information_sell_performance_breach_contract, ModalEnum.performance_information_sell_performance_detail];
-                } else if (curstepname === '卖方发票') {
-                    result = [ModalEnum.performance_information_sell_performance_extension, ModalEnum.performance_information_sell_performance_breach_contract, ModalEnum.performance_information_sell_performance_detail];
-                } else if (curstepname === '仓单转移') {
-                    result = [ModalEnum.performance_information_sell_performance_extension, ModalEnum.performance_information_sell_performance_breach_contract, ModalEnum.performance_information_sell_performance_detail];
-                }
-            }
-            return btnList.filter((e) => result.includes(e.code as ModalEnum));
+  name: enumOrderComponents.performance_information_sell_performance,
+  components: {
+    BtnList,
+    [ModalEnum.performance_information_sell_performance_pay]: defineAsyncComponent(() => import('../components/pay/index.vue')),
+    [ModalEnum.performance_information_sell_performance_extension]: defineAsyncComponent(() => import('../components/extension/index.vue')),
+    [ModalEnum.performance_information_sell_performance_breach_contract]: defineAsyncComponent(() => import('../components/breach_contract/index.vue')),
+    [ModalEnum.performance_information_sell_performance_detail]: defineAsyncComponent(() => import('../components/detail/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryPerformancePlanReq = {
+        buyorsell: 1,
+      };
+      queryTable(QueryPerformancePlan, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_performance_info_sale',
+      recordList: getRecordItemTab(),
+    };
+    function handleBtn(btnList: BtnListType[], record: WrPerformancePlan): BtnListType[] {
+      //  performancestatus: number;//履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 1number;
+      const { curstepname, performancestatus } = record;
+      let result: ModalEnum[] = [];
+      if (performancestatus === 1) {
+        result = [ModalEnum.performance_information_sell_performance_breach_contract];
+      } else if (performancestatus === 2) {
+        if (curstepname === '卖方发货') {
+          result = [ModalEnum.performance_information_sell_performance_extension, ModalEnum.performance_information_sell_performance_breach_contract, ModalEnum.performance_information_sell_performance_detail];
+        } else if (curstepname === '买方支付') {
+          result = [ModalEnum.performance_information_sell_performance_extension, ModalEnum.performance_information_sell_performance_breach_contract, ModalEnum.performance_information_sell_performance_detail];
+        } else if (curstepname === '卖方发票') {
+          result = [ModalEnum.performance_information_sell_performance_extension, ModalEnum.performance_information_sell_performance_breach_contract, ModalEnum.performance_information_sell_performance_detail];
+        } else if (curstepname === '仓单转移') {
+          result = [ModalEnum.performance_information_sell_performance_extension, ModalEnum.performance_information_sell_performance_breach_contract, ModalEnum.performance_information_sell_performance_detail];
         }
-        return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
-            loading,
-            tableList,
-            getPerformanceTypeName,
-            getPaymentTypeName,
-            getPerformanceStatusName,
-            expandIcon,
-            handleBtn,
-            BuyOrSell,
-        };
-    },
+      }
+      return btnList.filter((e) => result.includes(e.code as ModalEnum));
+    }
+    return {
+      ...handleComposeOrderTable<WrPerformancePlan>(param),
+      loading,
+      tableList,
+      getPerformanceTypeName,
+      getPaymentTypeName,
+      getPerformanceStatusName,
+      expandIcon,
+      handleBtn,
+      BuyOrSell,
+    };
+  },
 });
 </script>
 

+ 120 - 140
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_bargain/components/bargain_detail/index.vue

@@ -1,43 +1,23 @@
 <template>
   <!-- 现货仓单 议价 议价单 -->
-  <Drawer :title="'议价单'"
-          :placement="'right'"
-          class="delistingBottom"
-          :visible="visible"
-          @cancel="cancel">
+  <Drawer :title="'议价单'" :placement="'right'" class="delistingBottom" :visible="visible" @cancel="cancel">
     <div class="listed">
       <a-form class="inlineForm dialogForm">
         <div class="formBar">
-          <a-table :columns="columns"
-                   class="dialogTable dialogTable2 expandLeftTable"
-                   :pagination="false"
-                   :expandIcon="expandIcon"
-                   :expandedRowKeys="expandedRowKeys"
-                   :loading="loading"
-                   :customRow="Rowclick"
-                   :expandIconAsCell="false"
-                   rowKey="key"
-                   :data-source="tableList">
+          <a-table :columns="columns" class="dialogTable dialogTable2 expandLeftTable" :pagination="false" :expandIcon="expandIcon" :expandedRowKeys="expandedRowKeys" :loading="loading" :customRow="Rowclick" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
             <!-- 额外的展开行 -->
             <template #expandedRowRender="{ record }">
-              <BtnList :btnList="handleBtnList(record)"
-                       class="btn-list-sticky"
-                       :record="record"
-                       @click="action" />
+              <BtnList :btnList="handleBtnList(record)" class="btn-list-sticky" :record="record" @click="action" />
             </template>
             <template #applystatus="{ text }">
               <span>{{ getBarmaginApplyStatus(text) }}</span>
             </template>
           </a-table>
         </div>
-        <a-row :gutter="24"
-               type="flex"
-               justify="center">
-          <a-col :span="24"
-                 class="fixedBtns">
+        <a-row :gutter="24" type="flex" justify="center">
+          <a-col :span="24" class="fixedBtns">
             <a-form-item class="btnCenter">
-              <a-button class="cancelBtn"
-                        @click="cancel">取消</a-button>
+              <a-button class="cancelBtn" @click="cancel">取消</a-button>
             </a-form-item>
           </a-col>
         </a-row>
@@ -64,124 +44,124 @@ import { defineComponent, PropType, ref } from 'vue';
 import { getSpotWarrantBargainDetailColumns } from '../../setup';
 
 export default defineComponent({
-    name: ModalEnum.spot_warrant_bargain_detail,
-    components: { Drawer, BtnList },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryWrTradeBargainApplyQsp | WrOrderDetail>,
-            default: {},
-        },
-        isMy: {
-            type: Boolean,
-            default: true,
-        },
+  name: ModalEnum.spot_warrant_bargain_detail,
+  components: { Drawer, BtnList },
+  emits: ['cancel', 'update'],
+  props: {
+    selectedRow: {
+      type: Object as PropType<QueryWrTradeBargainApplyQsp | WrOrderDetail>,
+      default: {},
     },
-    setup(props, context) {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryWrTradeBargainApplyQsp>();
-        const { visible, cancel } = _closeModal(context);
-        const param: QueryWrTradeBargainApplyReq = {
-            haswr: 1,
-            wrtradeorderid: props.selectedRow.wrtradeorderid,
-        };
-        queryTable(queryQueryWrTradeBargainApply, param).then((res) => {
-            const arr = res.map((el) => {
-                return Object.assign(el, { key: el.wrbargainid });
-            });
-            // 时间 倒序排序
-            tableList.value = arr.sort((a, b) => {
-                const time1 = new Date(a.applytime).getTime();
-                const time2 = new Date(b.applytime).getTime();
-                return time2 - time1;
-            });
-        });
+    isMy: {
+      type: Boolean,
+      default: true,
+    },
+  },
+  setup(props, context) {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryWrTradeBargainApplyQsp>();
+    const { visible, cancel } = _closeModal(context);
+    const param: QueryWrTradeBargainApplyReq = {
+      haswr: 1,
+      wrtradeorderid: props.selectedRow.wrtradeorderid,
+    };
+    queryTable(queryQueryWrTradeBargainApply, param).then((res) => {
+      const arr = res.map((el) => {
+        return Object.assign(el, { key: el.wrbargainid });
+      });
+      // 时间 倒序排序
+      tableList.value = arr.sort((a, b) => {
+        const time1 = new Date(a.applytime).getTime();
+        const time2 = new Date(b.applytime).getTime();
+        return time2 - time1;
+      });
+    });
 
-        function isShowBtn() {
-            let result = false;
-            tableList.value.forEach((el) => {
-                if (el.applystatus === 1) {
-                    result = true;
-                }
-            });
-            return result;
-        }
-        // 我对别人的 => 撤销
-        // 别人对我的 => 确认、拒绝
-        const { getColums, isMy } = getSpotWarrantBargainDetailColumns(props.isMy);
-        function handleBtnList(record: QueryWrTradeBargainApplyQsp) {
-            const result = ref<BtnListType[]>([]);
-            if (isMy()) {
-                result.value = [{ lable: '撤销', code: 'cancel', className: 'btnDanger' }];
-            } else {
-                result.value = [
-                    { lable: '确认', code: 'submit', className: 'operBtn' },
-                    { lable: '拒绝', code: 'refuse', className: 'btnDanger' },
-                ];
-            }
-            return record.applystatus === 1 ? result.value : [];
-        }
-        function action({ code }: BtnListType, { wrbargainid }: QueryWrTradeBargainApplyQsp) {
-            switch (code) {
-                case 'cancel':
-                    cancelAction(wrbargainid);
-                    break;
-                case 'submit':
-                    submit(wrbargainid);
-                    break;
-                case 'refuse':
-                    refuse(wrbargainid);
-                    break;
-            }
+    function isShowBtn() {
+      let result = false;
+      tableList.value.forEach((el) => {
+        if (el.applystatus === 1) {
+          result = true;
         }
+      });
+      return result;
+    }
+    // 我对别人的 => 撤销
+    // 别人对我的 => 确认、拒绝
+    const { getColums, isMy } = getSpotWarrantBargainDetailColumns(props.isMy);
+    function handleBtnList(record: QueryWrTradeBargainApplyQsp) {
+      const result = ref<BtnListType[]>([]);
+      if (isMy()) {
+        result.value = [{ lable: '撤销', code: 'cancel', className: 'btnDanger' }];
+      } else {
+        result.value = [
+          { lable: '确认', code: 'submit', className: 'operBtn' },
+          { lable: '拒绝', code: 'refuse', className: 'btnDanger' },
+        ];
+      }
+      return record.applystatus === 1 ? result.value : [];
+    }
+    function action({ code }: BtnListType, { wrbargainid }: QueryWrTradeBargainApplyQsp) {
+      switch (code) {
+        case 'cancel':
+          cancelAction(wrbargainid);
+          break;
+        case 'submit':
+          submit(wrbargainid);
+          break;
+        case 'refuse':
+          refuse(wrbargainid);
+          break;
+      }
+    }
 
-        // 确认
-        function submit(wrbargainid: string) {
-            const param: WrBargainNoAgreeReq = {
-                WrBargainID: Long.fromString(wrbargainid),
-                Status: 1,
-            };
-            requestResultLoadingAndInfo(wrBargainNoAgree, param, loading, ['确认成功', '确认失败:']).then(() => {
-                cancel(true);
-            });
-        }
-        // 拒绝
-        function refuse(wrbargainid: string) {
-            const param: WrBargainNoAgreeReq = {
-                WrBargainID: Long.fromString(wrbargainid),
-                Status: 2,
-            };
-            requestResultLoadingAndInfo(wrBargainNoAgree, param, loading, ['拒绝成功', '拒绝失败:']).then(() => {
-                cancel(true);
-            });
-        }
-        // 撤销
-        function cancelAction(wrbargainid: string) {
-            const param: WrBargainBackReq = {
-                WrBargainID: Long.fromString(wrbargainid),
-            };
-            requestResultLoadingAndInfo(wrBargainBack, param, loading, ['撤销成功', '撤销失败:']).then(() => {
-                cancel(true);
-            });
-        }
-        return {
-            visible,
-            columns: getColums(),
-            loading,
-            tableList,
-            isMy,
-            submit,
-            refuse,
-            cancelAction,
-            cancel,
-            getBarmaginApplyStatus,
-            isShowBtn,
-            handleBtnList,
-            action,
-            expandIcon,
-            ...getTableEvent<QueryWrTradeBargainApplyQsp>(),
-        };
-    },
+    // 确认
+    function submit(wrbargainid: string) {
+      const param: WrBargainNoAgreeReq = {
+        WrBargainID: Long.fromString(wrbargainid),
+        Status: 1,
+      };
+      requestResultLoadingAndInfo(wrBargainNoAgree, param, loading, ['确认成功', '确认失败:']).then(() => {
+        cancel(true);
+      });
+    }
+    // 拒绝
+    function refuse(wrbargainid: string) {
+      const param: WrBargainNoAgreeReq = {
+        WrBargainID: Long.fromString(wrbargainid),
+        Status: 2,
+      };
+      requestResultLoadingAndInfo(wrBargainNoAgree, param, loading, ['拒绝成功', '拒绝失败:']).then(() => {
+        cancel(true);
+      });
+    }
+    // 撤销
+    function cancelAction(wrbargainid: string) {
+      const param: WrBargainBackReq = {
+        WrBargainID: Long.fromString(wrbargainid),
+      };
+      requestResultLoadingAndInfo(wrBargainBack, param, loading, ['撤销成功', '撤销失败:']).then(() => {
+        cancel(true);
+      });
+    }
+    return {
+      visible,
+      columns: getColums(),
+      loading,
+      tableList,
+      isMy,
+      submit,
+      refuse,
+      cancelAction,
+      cancel,
+      getBarmaginApplyStatus,
+      isShowBtn,
+      handleBtnList,
+      action,
+      expandIcon,
+      ...getTableEvent<QueryWrTradeBargainApplyQsp>(),
+    };
+  },
 });
 </script>
 

+ 91 - 91
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_bargain/index.vue

@@ -1,40 +1,40 @@
 <template>
-    <!-- 现货仓单 挂单 -->
-    <section>
-        <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
-            </template>
-            <!-- 挂牌有效期 -->
-            <template #validtime="{ text }">
-                <span>{{ formatTime(text, 'd') }}</span>
-            </template>
-            <!-- 挂牌类型 -->
-            <template #buyorsell="{ text }">
-                <span>{{ text ? '买' : '卖' }}</span>
-            </template>
-            <!--  委托状态-->
-            <!-- <template #wrtradeorderstatus="{ record }">
+  <!-- 现货仓单 挂单 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+      </template>
+      <!-- 挂牌有效期 -->
+      <template #validtime="{ text }">
+        <span>{{ formatTime(text, 'd') }}</span>
+      </template>
+      <!-- 挂牌类型 -->
+      <template #buyorsell="{ text }">
+        <span>{{ text ? '买' : '卖' }}</span>
+      </template>
+      <!--  委托状态-->
+      <!-- <template #wrtradeorderstatus="{ record }">
         <a>{{ getWrTradeOrderStatusName(record.wrtradeorderstatus) }}</a>
       </template> -->
-            <!-- 挂牌类型 -->
-            <template #wrtradetype="{ record }">
-                <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
-            </template>
-            <template #applystatus="{ text }">
-                <span>{{ getBarmaginApplyStatus(text) }}</span>
-            </template>
-            <template #applytime="{ text }">
-                <span>{{ formatTime(text) }}</span>
-            </template>
-            <template #marginvalue="{ text }">
-                <span>{{ (text * 100).toFixed(2) }}%</span>
-            </template>
-            <!-- 挂牌价格 -->
-        </a-table>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </section>
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
+      </template>
+      <template #applystatus="{ text }">
+        <span>{{ getBarmaginApplyStatus(text) }}</span>
+      </template>
+      <template #applytime="{ text }">
+        <span>{{ formatTime(text) }}</span>
+      </template>
+      <template #marginvalue="{ text }">
+        <span>{{ (text * 100).toFixed(2) }}%</span>
+      </template>
+      <!-- 挂牌价格 -->
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -54,64 +54,64 @@ import { getUserId } from '@/services/bus/user';
 import Bus from '@/utils/eventBus';
 
 export default defineComponent({
-    name: enumOrderComponents.pre_sale_warehouse_receipt_bargain,
-    components: {
-        BtnList,
-        pre_sale_warehouse_receipt_bargain_detail: defineAsyncComponent(() => import('./components/bargain_detail/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryWrTradeBargainApplyQsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrTradeBargainApplyReq = {
-                userid: getUserId(),
-                haswr: 0,
-            };
-            queryTable(queryQueryWrTradeBargainApply, param);
-        };
-        Bus.$on('blocsTrade', () => {
-            queryTableAction();
-        });
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            recordList: getRecordItemTab(),
-        };
-        const {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent,
-            openComponent, // 控制异步组件
-            btnList, // 表格按钮
-        } = handleComposeOrderTable<QueryWrTradeBargainApplyQsp>(param);
+  name: enumOrderComponents.pre_sale_warehouse_receipt_bargain,
+  components: {
+    BtnList,
+    pre_sale_warehouse_receipt_bargain_detail: defineAsyncComponent(() => import('./components/bargain_detail/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryWrTradeBargainApplyQsp>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrTradeBargainApplyReq = {
+        userid: getUserId(),
+        haswr: 0,
+      };
+      queryTable(queryQueryWrTradeBargainApply, param);
+    };
+    Bus.$on('blocsTrade', () => {
+      queryTableAction();
+    });
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      recordList: getRecordItemTab(),
+    };
+    const {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent,
+      openComponent, // 控制异步组件
+      btnList, // 表格按钮
+    } = handleComposeOrderTable<QueryWrTradeBargainApplyQsp>(param);
 
-        return {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent,
-            openComponent, // 控制异步组件
-            btnList, // 表格按钮
-            columns: getSpotWarrantBargainColumns(),
-            loading,
-            tableList,
-            getWrTradeOrderStatusName,
-            getWrOrderTypeName,
-            expandIcon,
-            formatTime,
-            getBarmaginApplyStatus,
-        };
-    },
+    return {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent,
+      openComponent, // 控制异步组件
+      btnList, // 表格按钮
+      columns: getSpotWarrantBargainColumns(),
+      loading,
+      tableList,
+      getWrTradeOrderStatusName,
+      getWrOrderTypeName,
+      expandIcon,
+      formatTime,
+      getBarmaginApplyStatus,
+    };
+  },
 });
 </script>
 

+ 49 - 49
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_deal/index.vue

@@ -1,22 +1,22 @@
 <template>
-    <!-- 成交 -->
-    <section>
-        <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" class="btn-list-sticky" :record="record" @click="openComponent" />
-            </template>
-            <!-- 成交金额 -->
-            <template #amount="{ record }">
-                <a>{{ record.tradeqty * record.tradeprice }}</a>
-            </template>
-            <!-- 挂牌类型 -->
-            <template #wrtradetype="{ record }">
-                <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
-            </template>
-        </a-table>
-        <component :is="componentId" v-if="componentId" :tableName="tableName" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </section>
+  <!-- 成交 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" class="btn-list-sticky" :record="record" @click="openComponent" />
+      </template>
+      <!-- 成交金额 -->
+      <template #amount="{ record }">
+        <a>{{ record.tradeqty * record.tradeprice }}</a>
+      </template>
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :tableName="tableName" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -32,37 +32,37 @@ import { getWrOrderTypeName } from '@/common/constants/enumsName';
 import { TableKey } from '@/common/methods/table/interface';
 
 export default defineComponent({
-    name: enumOrderComponents.pre_sale_warehouse_receipt_deal,
-    components: {
-        BtnList,
-        pre_sale_warehouse_receipt_deal_detail: defineAsyncComponent(() => import('./components/pre_sale_warehouse_receipt_deal_detail/index.vue')),
-    },
-    setup() {
-        const tableName: keyof TableKey = 'table_pcweb_spot_trade_bottom_pre_sale_make_deal';
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrSpecialMatchOrderReq = {
-                haswr: 0,
-            };
-            queryTable(queryWrTradeDetail, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            tableName,
-            queryFn: queryTableAction,
-            recordList: getRecordItemTab(),
-        };
-        return {
-            ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
-            loading,
-            tableName,
-            tableList,
-            expandIcon,
-            getWrOrderTypeName,
-        };
-    },
+  name: enumOrderComponents.pre_sale_warehouse_receipt_deal,
+  components: {
+    BtnList,
+    pre_sale_warehouse_receipt_deal_detail: defineAsyncComponent(() => import('./components/pre_sale_warehouse_receipt_deal_detail/index.vue')),
+  },
+  setup() {
+    const tableName: keyof TableKey = 'table_pcweb_spot_trade_bottom_pre_sale_make_deal';
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrSpecialMatchOrderReq = {
+        haswr: 0,
+      };
+      queryTable(queryWrTradeDetail, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      tableName,
+      queryFn: queryTableAction,
+      recordList: getRecordItemTab(),
+    };
+    return {
+      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
+      loading,
+      tableName,
+      tableList,
+      expandIcon,
+      getWrOrderTypeName,
+    };
+  },
 });
 </script>
 

+ 37 - 59
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_designated_deal/index.vue

@@ -1,36 +1,14 @@
 <template>
-    <!-- 指定成交 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="btnList"
-                    :record="record"
-                    class="btn-list-sticky"
-                    @click="openComponent"
-                />
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 指定成交 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -43,33 +21,33 @@ import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
 export default defineComponent({
-    name: enumOrderComponents.pre_sale_warehouse_receipt_designated_deal,
-    components: {
-        BtnList,
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrSpecialMatchOrderReq = {
-                haswr: 0,
-            };
-            queryTable(queryWrTradeDetail, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_pre_sale_make_deal',
-            recordList: getRecordItemTab(),
-        };
-        return {
-            ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
-            loading,
-            tableList,
-            expandIcon,
-        };
-    },
+  name: enumOrderComponents.pre_sale_warehouse_receipt_designated_deal,
+  components: {
+    BtnList,
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrSpecialMatchOrderReq = {
+        haswr: 0,
+      };
+      queryTable(queryWrTradeDetail, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_pre_sale_make_deal',
+      recordList: getRecordItemTab(),
+    };
+    return {
+      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
+      loading,
+      tableList,
+      expandIcon,
+    };
+  },
 });
 </script>
 

+ 39 - 62
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/index.vue

@@ -1,37 +1,14 @@
 <template>
-    <!-- 订单汇总 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="btnList"
-                    class="btn-list-sticky"
-                    :record="record"
-                    @click="openComponent"
-                    v-if="record.creditenableqty > 0"
-                />
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 订单汇总 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" class="btn-list-sticky" :record="record" @click="openComponent" v-if="record.creditenableqty > 0" />
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -44,35 +21,35 @@ import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
 export default defineComponent({
-    name: enumOrderComponents.pre_sale_warehouse_receipt_order_summary,
-    components: {
-        BtnList,
-        [ModalEnum.pre_sale_warehouse_receipt_order_summary_listed]: defineAsyncComponent(() => import('./components/listed/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrPosition>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrPositionReq = {
-                haswr: 0,
-                querytype: 2,
-            };
-            queryTable(queryWrPosition, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_pre_sale_order_summary',
-            recordList: getRecordItemTab(),
-        };
-        return {
-            ...handleComposeOrderTable<WrPosition>(param),
-            loading,
-            tableList,
-            expandIcon,
-        };
-    },
+  name: enumOrderComponents.pre_sale_warehouse_receipt_order_summary,
+  components: {
+    BtnList,
+    [ModalEnum.pre_sale_warehouse_receipt_order_summary_listed]: defineAsyncComponent(() => import('./components/listed/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrPosition>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrPositionReq = {
+        haswr: 0,
+        querytype: 2,
+      };
+      queryTable(queryWrPosition, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_pre_sale_order_summary',
+      recordList: getRecordItemTab(),
+    };
+    return {
+      ...handleComposeOrderTable<WrPosition>(param),
+      loading,
+      tableList,
+      expandIcon,
+    };
+  },
 });
 </script>
 

+ 55 - 72
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_pending_order/index.vue

@@ -1,22 +1,9 @@
 <template>
   <!-- 仓单预售 挂单 -->
-  <a-table :columns="tableColumns"
-           class="srcollYTable expandLeftTable"
-           :scroll="{ x: '100%', y: '190px' }"
-           :pagination="false"
-           :loading="loading"
-           :expandedRowKeys="expandedRowKeys"
-           :customRow="Rowclick"
-           :expandIcon="expandIcon"
-           :expandIconAsCell="false"
-           rowKey="key"
-           :data-source="tableList">
+  <a-table :columns="tableColumns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
     <!-- 额外的展开行 -->
     <template #expandedRowRender="{ record }">
-      <BtnList :btnList="filterBtnList(btnList, record)"
-               class="btn-list-sticky"
-               :record="record"
-               @click="openComponent" />
+      <BtnList :btnList="filterBtnList(btnList, record)" class="btn-list-sticky" :record="record" @click="openComponent" />
     </template>
     <!--  委托状态-->
     <template #wrtradeorderstatus="{ record }">
@@ -35,11 +22,7 @@
       <span>{{ showPriceOrMove(record) }}</span>
     </template>
   </a-table>
-  <component :is="componentId"
-             v-if="componentId"
-             :selectedRow="selectedRow"
-             :isMy="false"
-             @cancel="closeComponent"></component>
+  <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :isMy="false" @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -57,58 +40,58 @@ import Bus from '@/utils/eventBus';
 import { useOrderWarrant } from '@/views/order/setup';
 
 export default defineComponent({
-    name: enumOrderComponents.pre_sale_warehouse_receipt_pending_order,
-    components: {
-        BtnList,
-        [ModalEnum.pre_sale_warehouse_receipt_pending_order_cancel_order]: defineAsyncComponent(() => import('./components/cancle/index.vue')),
-        detail: defineAsyncComponent(() => import('./components/detail/index.vue')),
-        pre_sale_warehouse_receipt_pending_order_bargain_order: defineAsyncComponent(() => import('@/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderDetail>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrOrderDetailReq = {
-                haswr: 0,
-            };
-            queryTable(queryWrOrderDetail, param);
-        };
-        Bus.$on('blocsTrade', () => {
-            queryTableAction();
-        });
-        const { tableColumns, getWrPriceType, isShowBarginBtn, showPriceOrMove } = useOrderWarrant(0);
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            recordList: getRecordItemTab(),
-            isDetail: true,
-        };
-        function filterBtnList(list: BtnListType[], record: WrOrderDetail) {
-            if (!isShowBarginBtn(record)) {
-                list = list.filter((e) => e.code !== 'spot_warrant_pending_order_bargain_order');
-            }
-            //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
-            const arr = [3, 7];
-            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,
-            expandIcon,
-            getOrderStatusName,
-            getWrOrderTypeName,
-            tableColumns,
-            getWrPriceType,
-            showPriceOrMove,
-        };
-    },
+  name: enumOrderComponents.pre_sale_warehouse_receipt_pending_order,
+  components: {
+    BtnList,
+    [ModalEnum.pre_sale_warehouse_receipt_pending_order_cancel_order]: defineAsyncComponent(() => import('./components/cancle/index.vue')),
+    detail: defineAsyncComponent(() => import('./components/detail/index.vue')),
+    pre_sale_warehouse_receipt_pending_order_bargain_order: defineAsyncComponent(() => import('@/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderDetail>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrOrderDetailReq = {
+        haswr: 0,
+      };
+      queryTable(queryWrOrderDetail, param);
+    };
+    Bus.$on('blocsTrade', () => {
+      queryTableAction();
+    });
+    const { tableColumns, getWrPriceType, isShowBarginBtn, showPriceOrMove } = useOrderWarrant(0);
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      recordList: getRecordItemTab(),
+      isDetail: true,
+    };
+    function filterBtnList(list: BtnListType[], record: WrOrderDetail) {
+      if (!isShowBarginBtn(record)) {
+        list = list.filter((e) => e.code !== 'spot_warrant_pending_order_bargain_order');
+      }
+      //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
+      const arr = [3, 7];
+      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,
+      expandIcon,
+      getOrderStatusName,
+      getWrOrderTypeName,
+      tableColumns,
+      getWrPriceType,
+      showPriceOrMove,
+    };
+  },
 });
 </script>
 

+ 120 - 140
src/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue

@@ -1,43 +1,23 @@
 <template>
   <!-- 现货仓单 议价 议价单 -->
-  <Drawer :title="'议价单'"
-          :placement="'right'"
-          class="delistingBottom"
-          :visible="visible"
-          @cancel="cancel">
+  <Drawer :title="'议价单'" :placement="'right'" class="delistingBottom" :visible="visible" @cancel="cancel">
     <div class="listed">
       <a-form class="inlineForm dialogForm">
         <div class="formBar">
-          <a-table :columns="columns"
-                   class="dialogTable dialogTable2 expandLeftTable"
-                   :pagination="false"
-                   :expandIcon="expandIcon"
-                   :expandedRowKeys="expandedRowKeys"
-                   :loading="loading"
-                   :customRow="Rowclick"
-                   :expandIconAsCell="false"
-                   rowKey="key"
-                   :data-source="tableList">
+          <a-table :columns="columns" class="dialogTable dialogTable2 expandLeftTable" :pagination="false" :expandIcon="expandIcon" :expandedRowKeys="expandedRowKeys" :loading="loading" :customRow="Rowclick" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
             <!-- 额外的展开行 -->
             <template #expandedRowRender="{ record }">
-              <BtnList :btnList="handleBtnList(record)"
-                       class="btn-list-sticky"
-                       :record="record"
-                       @click="action" />
+              <BtnList :btnList="handleBtnList(record)" class="btn-list-sticky" :record="record" @click="action" />
             </template>
             <template #applystatus="{ text }">
               <span>{{ getBarmaginApplyStatus(text) }}</span>
             </template>
           </a-table>
         </div>
-        <a-row :gutter="24"
-               type="flex"
-               justify="center">
-          <a-col :span="24"
-                 class="fixedBtns">
+        <a-row :gutter="24" type="flex" justify="center">
+          <a-col :span="24" class="fixedBtns">
             <a-form-item class="btnCenter">
-              <a-button class="cancelBtn"
-                        @click="cancel">取消</a-button>
+              <a-button class="cancelBtn" @click="cancel">取消</a-button>
             </a-form-item>
           </a-col>
         </a-row>
@@ -64,124 +44,124 @@ import { defineComponent, PropType, ref } from 'vue';
 import { getSpotWarrantBargainDetailColumns } from '../../setup';
 
 export default defineComponent({
-    name: ModalEnum.spot_warrant_bargain_detail,
-    components: { Drawer, BtnList },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryWrTradeBargainApplyQsp | WrOrderDetail>,
-            default: {},
-        },
-        isMy: {
-            type: Boolean,
-            default: true,
-        },
+  name: ModalEnum.spot_warrant_bargain_detail,
+  components: { Drawer, BtnList },
+  emits: ['cancel', 'update'],
+  props: {
+    selectedRow: {
+      type: Object as PropType<QueryWrTradeBargainApplyQsp | WrOrderDetail>,
+      default: {},
     },
-    setup(props, context) {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryWrTradeBargainApplyQsp>();
-        const { visible, cancel } = _closeModal(context);
-        const param: QueryWrTradeBargainApplyReq = {
-            haswr: 1,
-            wrtradeorderid: props.selectedRow.wrtradeorderid,
-        };
-        queryTable(queryQueryWrTradeBargainApply, param).then((res) => {
-            const arr = res.map((el) => {
-                return Object.assign(el, { key: el.wrbargainid });
-            });
-            // 时间 倒序排序
-            tableList.value = arr.sort((a, b) => {
-                const time1 = new Date(a.applytime).getTime();
-                const time2 = new Date(b.applytime).getTime();
-                return time2 - time1;
-            });
-        });
+    isMy: {
+      type: Boolean,
+      default: true,
+    },
+  },
+  setup(props, context) {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryWrTradeBargainApplyQsp>();
+    const { visible, cancel } = _closeModal(context);
+    const param: QueryWrTradeBargainApplyReq = {
+      haswr: 1,
+      wrtradeorderid: props.selectedRow.wrtradeorderid,
+    };
+    queryTable(queryQueryWrTradeBargainApply, param).then((res) => {
+      const arr = res.map((el) => {
+        return Object.assign(el, { key: el.wrbargainid });
+      });
+      // 时间 倒序排序
+      tableList.value = arr.sort((a, b) => {
+        const time1 = new Date(a.applytime).getTime();
+        const time2 = new Date(b.applytime).getTime();
+        return time2 - time1;
+      });
+    });
 
-        function isShowBtn() {
-            let result = false;
-            tableList.value.forEach((el) => {
-                if (el.applystatus === 1) {
-                    result = true;
-                }
-            });
-            return result;
-        }
-        // 我对别人的 => 撤销
-        // 别人对我的 => 确认、拒绝
-        const { getColums, isMy } = getSpotWarrantBargainDetailColumns(props.isMy);
-        function handleBtnList(record: QueryWrTradeBargainApplyQsp) {
-            const result = ref<BtnListType[]>([]);
-            if (isMy()) {
-                result.value = [{ lable: '撤销', code: 'cancel', className: 'btnDanger' }];
-            } else {
-                result.value = [
-                    { lable: '确认', code: 'submit', className: 'operBtn' },
-                    { lable: '拒绝', code: 'refuse', className: 'btnDanger' },
-                ];
-            }
-            return record.applystatus === 1 ? result.value : [];
-        }
-        function action({ code }: BtnListType, { wrbargainid }: QueryWrTradeBargainApplyQsp) {
-            switch (code) {
-                case 'cancel':
-                    cancelAction(wrbargainid);
-                    break;
-                case 'submit':
-                    submit(wrbargainid);
-                    break;
-                case 'refuse':
-                    refuse(wrbargainid);
-                    break;
-            }
+    function isShowBtn() {
+      let result = false;
+      tableList.value.forEach((el) => {
+        if (el.applystatus === 1) {
+          result = true;
         }
+      });
+      return result;
+    }
+    // 我对别人的 => 撤销
+    // 别人对我的 => 确认、拒绝
+    const { getColums, isMy } = getSpotWarrantBargainDetailColumns(props.isMy);
+    function handleBtnList(record: QueryWrTradeBargainApplyQsp) {
+      const result = ref<BtnListType[]>([]);
+      if (isMy()) {
+        result.value = [{ lable: '撤销', code: 'cancel', className: 'btnDanger' }];
+      } else {
+        result.value = [
+          { lable: '确认', code: 'submit', className: 'operBtn' },
+          { lable: '拒绝', code: 'refuse', className: 'btnDanger' },
+        ];
+      }
+      return record.applystatus === 1 ? result.value : [];
+    }
+    function action({ code }: BtnListType, { wrbargainid }: QueryWrTradeBargainApplyQsp) {
+      switch (code) {
+        case 'cancel':
+          cancelAction(wrbargainid);
+          break;
+        case 'submit':
+          submit(wrbargainid);
+          break;
+        case 'refuse':
+          refuse(wrbargainid);
+          break;
+      }
+    }
 
-        // 确认
-        function submit(wrbargainid: string) {
-            const param: WrBargainNoAgreeReq = {
-                WrBargainID: Long.fromString(wrbargainid),
-                Status: 1,
-            };
-            requestResultLoadingAndInfo(wrBargainNoAgree, param, loading, ['确认成功', '确认失败:']).then(() => {
-                cancel(true);
-            });
-        }
-        // 拒绝
-        function refuse(wrbargainid: string) {
-            const param: WrBargainNoAgreeReq = {
-                WrBargainID: Long.fromString(wrbargainid),
-                Status: 2,
-            };
-            requestResultLoadingAndInfo(wrBargainNoAgree, param, loading, ['拒绝成功', '拒绝失败:']).then(() => {
-                cancel(true);
-            });
-        }
-        // 撤销
-        function cancelAction(wrbargainid: string) {
-            const param: WrBargainBackReq = {
-                WrBargainID: Long.fromString(wrbargainid),
-            };
-            requestResultLoadingAndInfo(wrBargainBack, param, loading, ['撤销成功', '撤销失败:']).then(() => {
-                cancel(true);
-            });
-        }
-        return {
-            visible,
-            columns: getColums(),
-            loading,
-            tableList,
-            isMy,
-            submit,
-            refuse,
-            cancelAction,
-            cancel,
-            getBarmaginApplyStatus,
-            isShowBtn,
-            handleBtnList,
-            action,
-            expandIcon,
-            ...getTableEvent<QueryWrTradeBargainApplyQsp>(),
-        };
-    },
+    // 确认
+    function submit(wrbargainid: string) {
+      const param: WrBargainNoAgreeReq = {
+        WrBargainID: Long.fromString(wrbargainid),
+        Status: 1,
+      };
+      requestResultLoadingAndInfo(wrBargainNoAgree, param, loading, ['确认成功', '确认失败:']).then(() => {
+        cancel(true);
+      });
+    }
+    // 拒绝
+    function refuse(wrbargainid: string) {
+      const param: WrBargainNoAgreeReq = {
+        WrBargainID: Long.fromString(wrbargainid),
+        Status: 2,
+      };
+      requestResultLoadingAndInfo(wrBargainNoAgree, param, loading, ['拒绝成功', '拒绝失败:']).then(() => {
+        cancel(true);
+      });
+    }
+    // 撤销
+    function cancelAction(wrbargainid: string) {
+      const param: WrBargainBackReq = {
+        WrBargainID: Long.fromString(wrbargainid),
+      };
+      requestResultLoadingAndInfo(wrBargainBack, param, loading, ['撤销成功', '撤销失败:']).then(() => {
+        cancel(true);
+      });
+    }
+    return {
+      visible,
+      columns: getColums(),
+      loading,
+      tableList,
+      isMy,
+      submit,
+      refuse,
+      cancelAction,
+      cancel,
+      getBarmaginApplyStatus,
+      isShowBtn,
+      handleBtnList,
+      action,
+      expandIcon,
+      ...getTableEvent<QueryWrTradeBargainApplyQsp>(),
+    };
+  },
 });
 </script>
 

+ 91 - 91
src/views/order/spot_warran/components/spot_warrant_bargain/index.vue

@@ -1,40 +1,40 @@
 <template>
-    <!-- 现货仓单 议价 -->
-    <section>
-        <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
-            </template>
-            <!-- 挂牌有效期 -->
-            <template #validtime="{ text }">
-                <span>{{ formatTime(text, 'd') }}</span>
-            </template>
-            <!-- 挂牌类型 -->
-            <template #buyorsell="{ text }">
-                <span>{{ text ? '买' : '卖' }}</span>
-            </template>
-            <template #marginvalue="{ text }">
-                <span>{{ (text * 100).toFixed(2) }}%</span>
-            </template>
-            <!--  委托状态-->
-            <!-- <template #wrtradeorderstatus="{ record }">
+  <!-- 现货仓单 议价 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+      </template>
+      <!-- 挂牌有效期 -->
+      <template #validtime="{ text }">
+        <span>{{ formatTime(text, 'd') }}</span>
+      </template>
+      <!-- 挂牌类型 -->
+      <template #buyorsell="{ text }">
+        <span>{{ text ? '买' : '卖' }}</span>
+      </template>
+      <template #marginvalue="{ text }">
+        <span>{{ (text * 100).toFixed(2) }}%</span>
+      </template>
+      <!--  委托状态-->
+      <!-- <template #wrtradeorderstatus="{ record }">
         <a>{{ getWrTradeOrderStatusName(record.wrtradeorderstatus) }}</a>
       </template> -->
-            <!-- 挂牌类型 -->
-            <template #wrtradetype="{ record }">
-                <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
-            </template>
-            <template #applystatus="{ text }">
-                <span>{{ getBarmaginApplyStatus(text) }}</span>
-            </template>
-            <template #applytime="{ text }">
-                <span>{{ formatTime(text) }}</span>
-            </template>
-            <!-- 挂牌价格 -->
-        </a-table>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </section>
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
+      </template>
+      <template #applystatus="{ text }">
+        <span>{{ getBarmaginApplyStatus(text) }}</span>
+      </template>
+      <template #applytime="{ text }">
+        <span>{{ formatTime(text) }}</span>
+      </template>
+      <!-- 挂牌价格 -->
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -54,65 +54,65 @@ import { getUserId } from '@/services/bus/user';
 import Bus from '@/utils/eventBus';
 
 export default defineComponent({
-    name: enumOrderComponents.spot_warrant_pending_order,
-    components: {
-        BtnList,
-        spot_warrant_bargain_detail: defineAsyncComponent(() => import('./components/bargain_detail/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryWrTradeBargainApplyQsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrTradeBargainApplyReq = {
-                userid: getUserId(),
-                haswr: 1,
-            };
-            queryTable(queryQueryWrTradeBargainApply, param);
-        };
-        Bus.$on('blocsTrade', () => {
-            queryTableAction();
-        });
+  name: enumOrderComponents.spot_warrant_pending_order,
+  components: {
+    BtnList,
+    spot_warrant_bargain_detail: defineAsyncComponent(() => import('./components/bargain_detail/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryWrTradeBargainApplyQsp>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrTradeBargainApplyReq = {
+        userid: getUserId(),
+        haswr: 1,
+      };
+      queryTable(queryQueryWrTradeBargainApply, param);
+    };
+    Bus.$on('blocsTrade', () => {
+      queryTableAction();
+    });
 
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            recordList: getRecordItemTab(),
-        };
-        const {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent,
-            openComponent, // 控制异步组件
-            btnList, // 表格按钮
-        } = handleComposeOrderTable<QueryWrTradeBargainApplyQsp>(param);
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      recordList: getRecordItemTab(),
+    };
+    const {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent,
+      openComponent, // 控制异步组件
+      btnList, // 表格按钮
+    } = handleComposeOrderTable<QueryWrTradeBargainApplyQsp>(param);
 
-        return {
-            contextMenu,
-            openContext,
-            closeContext, // 右键
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格折腾面板数据与单击、双击事件
-            componentId,
-            closeComponent,
-            openComponent, // 控制异步组件
-            btnList, // 表格按钮
-            columns: getSpotWarrantBargainColumns(),
-            loading,
-            tableList,
-            getWrTradeOrderStatusName,
-            getWrOrderTypeName,
-            expandIcon,
-            formatTime,
-            getBarmaginApplyStatus,
-        };
-    },
+    return {
+      contextMenu,
+      openContext,
+      closeContext, // 右键
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格折腾面板数据与单击、双击事件
+      componentId,
+      closeComponent,
+      openComponent, // 控制异步组件
+      btnList, // 表格按钮
+      columns: getSpotWarrantBargainColumns(),
+      loading,
+      tableList,
+      getWrTradeOrderStatusName,
+      getWrOrderTypeName,
+      expandIcon,
+      formatTime,
+      getBarmaginApplyStatus,
+    };
+  },
 });
 </script>
 

+ 68 - 68
src/views/order/spot_warran/components/spot_warrant_deal/index.vue

@@ -1,24 +1,24 @@
 <template>
-    <!-- 成交 -->
-    <section>
-        <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
-            </template>
+  <!-- 成交 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+      </template>
 
-            <!-- 成交金额 -->
-            <template #amount="{ record }">
-                <a>{{ record.tradeqty * record.tradeprice }}</a>
-            </template>
+      <!-- 成交金额 -->
+      <template #amount="{ record }">
+        <a>{{ record.tradeqty * record.tradeprice }}</a>
+      </template>
 
-            <!-- 挂牌类型 -->
-            <template #wrtradetype="{ record }">
-                <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
-            </template>
-        </a-table>
-        <component :is="componentId" v-if="componentId" :tableName="tableName" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </section>
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :tableName="tableName" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -34,56 +34,56 @@ import { getWrOrderTypeName } from '@/common/constants/enumsName';
 import { TableKey } from '@/common/methods/table/interface';
 
 export default defineComponent({
-    name: enumOrderComponents.spot_warrant_deal,
-    components: {
-        BtnList,
-        spot_warrant_deal_detail: defineAsyncComponent(() => import('./components/spot_warrant_deal_detail/index.vue')),
-    },
-    setup() {
-        const tableName: keyof TableKey = 'table_pcweb_spot_trade_bottom_spot_warrant_deal';
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrSpecialMatchOrderReq = {
-                haswr: 1,
-            };
-            queryTable(queryWrTradeDetail, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            tableName,
-            queryFn: queryTableAction,
-            recordList: getRecordItemTab(),
-        };
-        //仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)
-        function getType(type: number) {
-            let result = '--';
-            switch (type) {
-                case 1:
-                    result = '挂牌';
-                    break;
-                case 2:
-                    result = '摘牌';
-                    break;
-                case 3:
-                    result = '提货卖';
-                    break;
-                case 4:
-                    result = '提货买';
-                    break;
-            }
-            return result;
-        }
-        return {
-            ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
-            loading,
-            tableName,
-            tableList,
-            expandIcon,
-            getWrOrderTypeName,
-        };
-    },
+  name: enumOrderComponents.spot_warrant_deal,
+  components: {
+    BtnList,
+    spot_warrant_deal_detail: defineAsyncComponent(() => import('./components/spot_warrant_deal_detail/index.vue')),
+  },
+  setup() {
+    const tableName: keyof TableKey = 'table_pcweb_spot_trade_bottom_spot_warrant_deal';
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrSpecialMatchOrderReq = {
+        haswr: 1,
+      };
+      queryTable(queryWrTradeDetail, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      tableName,
+      queryFn: queryTableAction,
+      recordList: getRecordItemTab(),
+    };
+    //仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)
+    function getType(type: number) {
+      let result = '--';
+      switch (type) {
+        case 1:
+          result = '挂牌';
+          break;
+        case 2:
+          result = '摘牌';
+          break;
+        case 3:
+          result = '提货卖';
+          break;
+        case 4:
+          result = '提货买';
+          break;
+      }
+      return result;
+    }
+    return {
+      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
+      loading,
+      tableName,
+      tableList,
+      expandIcon,
+      getWrOrderTypeName,
+    };
+  },
 });
 </script>
 

+ 30 - 46
src/views/order/spot_warran/components/spot_warrant_designated_deal/index.vue

@@ -1,29 +1,13 @@
 <template>
   <!-- 指定成交 -->
   <section>
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
-        <BtnList :btnList="btnList"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent" />
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
       </template>
     </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -38,33 +22,33 @@ import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
 
 export default defineComponent({
-    name: enumOrderComponents.spot_warrant_designated_deal,
-    components: {
-        BtnList,
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrSpecialMatchOrderReq = {
-                haswr: 1,
-            };
-            queryTable(queryWrSpecialMatchOrder, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_designated_deal',
-            recordList: getRecordItemTab(),
-        };
-        return {
-            ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
-            loading,
-            tableList,
-            expandIcon,
-        };
-    },
+  name: enumOrderComponents.spot_warrant_designated_deal,
+  components: {
+    BtnList,
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrSpecialMatchOrderReq = {
+        haswr: 1,
+      };
+      queryTable(queryWrSpecialMatchOrder, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_designated_deal',
+      recordList: getRecordItemTab(),
+    };
+    return {
+      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
+      loading,
+      tableList,
+      expandIcon,
+    };
+  },
 });
 </script>
 

+ 57 - 79
src/views/order/spot_warran/components/spot_warrant_in_and_out_warehouse/index.vue

@@ -1,46 +1,24 @@
 <template>
-    <!-- 提货 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="handleBtnList(btnList, record)"
-                    :record="record"
-                    class="btn-list-sticky"
-                    @click="openComponent"
-                />
-            </template>
+  <!-- 提货 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="handleBtnList(btnList, record)" :record="record" class="btn-list-sticky" @click="openComponent" />
+      </template>
 
-            <!-- applytype 类型-->
-            <template #applytype="{ record }">
-                <span>{{ getPickUpStatusName(record.applytype) }}</span>
-            </template>
+      <!-- applytype 类型-->
+      <template #applytype="{ record }">
+        <span>{{ getPickUpStatusName(record.applytype) }}</span>
+      </template>
 
-            <!-- applystatus 状态 -->
-            <template #applystatus="{ record }">
-                <span>{{ getPickUpTypeName(record.applystatus) }}</span>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+      <!-- applystatus 状态 -->
+      <template #applystatus="{ record }">
+        <span>{{ getPickUpTypeName(record.applystatus) }}</span>
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -56,45 +34,45 @@ import { BtnListType } from '@/common/components/btnList/interface';
 import { getPickUpStatusName, getPickUpTypeName } from '@/common/constants/enumsName';
 
 export default defineComponent({
-    name: enumOrderComponents.spot_warrant_in_and_out_warehouse,
-    components: {
-        BtnList,
-        [ModalEnum.spot_warrant_in_and_out_warehouse_sure_pick_up]: defineAsyncComponent(() => import('./components/pick_up/index.vue')),
-        [ModalEnum.spot_warrant_in_and_out_warehouse_revoke]: defineAsyncComponent(() => import('./components/cancel/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOutInApply>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryWrOutInApply);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_pick_up',
-            recordList: getRecordItemTab(),
-        };
-        function handleBtnList(btnList: BtnListType[], item: WrOutInApply) {
-            const { applystatus, applytype } = item;
-            if (applystatus === 0 && applytype === 4) {
-                return btnList.filter((e) => e.code === ModalEnum.spot_warrant_in_and_out_warehouse_sure_pick_up);
-            } else if (applystatus === 1 && applytype === 2) {
-                return btnList.filter((e) => e.code === ModalEnum.spot_warrant_in_and_out_warehouse_revoke);
-            } else {
-                return [];
-            }
-        }
-        return {
-            ...handleComposeOrderTable<WrOutInApply>(param),
-            loading,
-            tableList,
-            expandIcon,
-            handleBtnList,
-            getPickUpStatusName,
-            getPickUpTypeName,
-        };
-    },
+  name: enumOrderComponents.spot_warrant_in_and_out_warehouse,
+  components: {
+    BtnList,
+    [ModalEnum.spot_warrant_in_and_out_warehouse_sure_pick_up]: defineAsyncComponent(() => import('./components/pick_up/index.vue')),
+    [ModalEnum.spot_warrant_in_and_out_warehouse_revoke]: defineAsyncComponent(() => import('./components/cancel/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOutInApply>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      queryTable(queryWrOutInApply);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_pick_up',
+      recordList: getRecordItemTab(),
+    };
+    function handleBtnList(btnList: BtnListType[], item: WrOutInApply) {
+      const { applystatus, applytype } = item;
+      if (applystatus === 0 && applytype === 4) {
+        return btnList.filter((e) => e.code === ModalEnum.spot_warrant_in_and_out_warehouse_sure_pick_up);
+      } else if (applystatus === 1 && applytype === 2) {
+        return btnList.filter((e) => e.code === ModalEnum.spot_warrant_in_and_out_warehouse_revoke);
+      } else {
+        return [];
+      }
+    }
+    return {
+      ...handleComposeOrderTable<WrOutInApply>(param),
+      loading,
+      tableList,
+      expandIcon,
+      handleBtnList,
+      getPickUpStatusName,
+      getPickUpTypeName,
+    };
+  },
 });
 </script>
 

+ 39 - 61
src/views/order/spot_warran/components/spot_warrant_inventory_summary/index.vue

@@ -1,36 +1,14 @@
 <template>
-    <!-- 库存汇总 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template v-if="btnList.length" #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="btnList"
-                    :record="record"
-                    class="btn-list-sticky"
-                    @click="openComponent"
-                />
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 库存汇总 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length" #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -44,35 +22,35 @@ import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
 
 export default defineComponent({
-    name: enumOrderComponents.spot_warrant_inventory_summary,
-    components: {
-        BtnList,
-        // [ModalEnum.spot_warrant_inventory_summary_listed]: defineAsyncComponent(() => import('./components/listing/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrHoldLB>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrPositionReq = {
-                haswr: 1,
-                querytype: 2,
-            };
-            queryTable(queryWrPosition, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_inventory_summary',
-            recordList: getRecordItemTab(),
-        };
-        return {
-            ...handleComposeOrderTable<WrHoldLB>(param),
-            loading,
-            tableList,
-            expandIcon,
-        };
-    },
+  name: enumOrderComponents.spot_warrant_inventory_summary,
+  components: {
+    BtnList,
+    // [ModalEnum.spot_warrant_inventory_summary_listed]: defineAsyncComponent(() => import('./components/listing/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrHoldLB>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrPositionReq = {
+        haswr: 1,
+        querytype: 2,
+      };
+      queryTable(queryWrPosition, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_inventory_summary',
+      recordList: getRecordItemTab(),
+    };
+    return {
+      ...handleComposeOrderTable<WrHoldLB>(param),
+      loading,
+      tableList,
+      expandIcon,
+    };
+  },
 });
 </script>
 

+ 55 - 72
src/views/order/spot_warran/components/spot_warrant_pending_order/index.vue

@@ -1,23 +1,10 @@
 <template>
   <!-- 现货仓单 挂单 -->
   <section>
-    <a-table :columns="tableColumns"
-             class="srcollYTable expandLeftTable"
-             :scroll="{ x: '100%', y: '190px' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="tableColumns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
-        <BtnList :btnList="filterBtnList(btnList, record)"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent" />
+        <BtnList :btnList="filterBtnList(btnList, record)" :record="record" class="btn-list-sticky" @click="openComponent" />
       </template>
       <!--  委托状态-->
       <template #wrtradeorderstatus="{ record }">
@@ -37,11 +24,7 @@
       </template>
       <!-- 挂牌价格 -->
     </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               :isMy="false"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :isMy="false" @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -60,59 +43,59 @@ import Bus from '@/utils/eventBus';
 import { useOrderWarrant } from '@/views/order/setup';
 
 export default defineComponent({
-    name: enumOrderComponents.spot_warrant_pending_order,
-    components: {
-        BtnList,
-        [ModalEnum.spot_warrant_pending_order_cancel_order]: defineAsyncComponent(() => import('./components/cancle/index.vue')),
-        detail: defineAsyncComponent(() => import('./components/detail/index.vue')),
-        spot_warrant_pending_order_bargain_order: defineAsyncComponent(() => import('@/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderDetail>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrOrderDetailReq = {
-                haswr: 1,
-            };
-            queryTable(queryWrOrderDetail, param);
-        };
-        Bus.$on('blocsTrade', () => {
-            queryTableAction();
-        });
+  name: enumOrderComponents.spot_warrant_pending_order,
+  components: {
+    BtnList,
+    [ModalEnum.spot_warrant_pending_order_cancel_order]: defineAsyncComponent(() => import('./components/cancle/index.vue')),
+    detail: defineAsyncComponent(() => import('./components/detail/index.vue')),
+    spot_warrant_pending_order_bargain_order: defineAsyncComponent(() => import('@/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrOrderDetail>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrOrderDetailReq = {
+        haswr: 1,
+      };
+      queryTable(queryWrOrderDetail, param);
+    };
+    Bus.$on('blocsTrade', () => {
+      queryTableAction();
+    });
 
-        const { tableColumns, getWrPriceType, isShowBarginBtn, showPriceOrMove } = useOrderWarrant(1);
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            recordList: getRecordItemTab(),
-            isDetail: true,
-        };
-        function filterBtnList(list: BtnListType[], record: WrOrderDetail) {
-            //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
-            const arr = [3, 7];
-            if (!isShowBarginBtn(record)) {
-                list = list.filter((e) => e.code !== 'spot_warrant_pending_order_bargain_order');
-            }
-            if (!arr.includes(record.wrtradeorderstatus)) {
-                return list.filter((e) => e.code !== ModalEnum.spot_warrant_pending_order_cancel_order);
-            } else {
-                return list;
-            }
-        }
-        return {
-            ...handleComposeOrderTable<WrOrderDetail>(param),
-            loading,
-            tableList,
-            getOrderStatusName,
-            getWrOrderTypeName,
-            filterBtnList,
-            expandIcon,
-            tableColumns,
-            getWrPriceType,
-            showPriceOrMove,
-        };
-    },
+    const { tableColumns, getWrPriceType, isShowBarginBtn, showPriceOrMove } = useOrderWarrant(1);
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      recordList: getRecordItemTab(),
+      isDetail: true,
+    };
+    function filterBtnList(list: BtnListType[], record: WrOrderDetail) {
+      //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
+      const arr = [3, 7];
+      if (!isShowBarginBtn(record)) {
+        list = list.filter((e) => e.code !== 'spot_warrant_pending_order_bargain_order');
+      }
+      if (!arr.includes(record.wrtradeorderstatus)) {
+        return list.filter((e) => e.code !== ModalEnum.spot_warrant_pending_order_cancel_order);
+      } else {
+        return list;
+      }
+    }
+    return {
+      ...handleComposeOrderTable<WrOrderDetail>(param),
+      loading,
+      tableList,
+      getOrderStatusName,
+      getWrOrderTypeName,
+      filterBtnList,
+      expandIcon,
+      tableColumns,
+      getWrPriceType,
+      showPriceOrMove,
+    };
+  },
 });
 </script>
 

+ 29 - 46
src/views/order/spot_warran/components/spot_warrant_spot_details/index.vue

@@ -1,30 +1,13 @@
 <template>
   <!-- 现货明细 -->
   <section>
-    <a-table :columns="columns"
-             class="srcollYTable expandLeftTable"
-             :scroll="{ x: '100%', y: '190px' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
-        <BtnList :btnList="btnList"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent"
-                 v-if="record.enableqty > 0" />
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" v-if="record.enableqty > 0" />
       </template>
     </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -38,32 +21,32 @@ import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { queryHoldLB } from '@/services/go/wrtrade';
 import { WrHoldLB } from '@/services/go/wrtrade/interface';
 export default defineComponent({
-    name: enumOrderComponents.spot_warrant_spot_details,
-    components: {
-        BtnList,
-        [ModalEnum.spot_warrant_spot_details_listed]: defineAsyncComponent(() => import('./components/listing/index.vue')),
-        [ModalEnum.spot_warrant_spot_details_pick_up]: defineAsyncComponent(() => import('./components/pick_up/index.vue')),
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrHoldLB>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryHoldLB);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_spot_detail',
-            recordList: getRecordItemTab(),
-        };
-        return {
-            ...handleComposeOrderTable<WrHoldLB>(param),
-            loading,
-            tableList,
-            expandIcon,
-        };
-    },
+  name: enumOrderComponents.spot_warrant_spot_details,
+  components: {
+    BtnList,
+    [ModalEnum.spot_warrant_spot_details_listed]: defineAsyncComponent(() => import('./components/listing/index.vue')),
+    [ModalEnum.spot_warrant_spot_details_pick_up]: defineAsyncComponent(() => import('./components/pick_up/index.vue')),
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrHoldLB>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      queryTable(queryHoldLB);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_spot_detail',
+      recordList: getRecordItemTab(),
+    };
+    return {
+      ...handleComposeOrderTable<WrHoldLB>(param),
+      loading,
+      tableList,
+      expandIcon,
+    };
+  },
 });
 </script>
 

+ 38 - 60
src/views/order/spot_warran/components/spot_warrant_spot_summary/index.vue

@@ -1,36 +1,14 @@
 <template>
-    <!-- 现货汇总 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template v-if="btnList.length" #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="btnList"
-                    :record="record"
-                    class="btn-list-sticky"
-                    @click="openComponent"
-                />
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 现货汇总 -->
+  <section>
+    <a-table :columns="columns" class="srcollYTable expandLeftTable" :scroll="{ x: '100%', y: '190px' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" :rowKey="(record,index)=>index" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length" #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -43,34 +21,34 @@ import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
 export default defineComponent({
-    name: enumOrderComponents.spot_warrant_spot_summary,
-    components: {
-        BtnList,
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrPosition>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrPositionReq = {
-                haswr: 1,
-                querytype: 1,
-            };
-            queryTable(queryWrPosition, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_spot_summary',
-            recordList: getRecordItemTab(),
-        };
-        return {
-            ...handleComposeOrderTable<WrPosition>(param),
-            loading,
-            tableList,
-            expandIcon,
-        };
-    },
+  name: enumOrderComponents.spot_warrant_spot_summary,
+  components: {
+    BtnList,
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrPosition>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrPositionReq = {
+        haswr: 1,
+        querytype: 1,
+      };
+      queryTable(queryWrPosition, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_spot_summary',
+      recordList: getRecordItemTab(),
+    };
+    return {
+      ...handleComposeOrderTable<WrPosition>(param),
+      loading,
+      tableList,
+      expandIcon,
+    };
+  },
 });
 </script>
 

+ 59 - 78
src/views/platinum/platinum_agreement/list/tab/index.vue

@@ -2,26 +2,12 @@
   <!-- 协议管理 -->
   <div class="platinum_agreement_tab">
     <Filter @search="updateColumn">
-      <mtp-table-button class="btn-list-sticky"
-                        :buttons="addBtn"
-                        :record="record"
-                        @click="openComponent" />
+      <mtp-table-button class="btn-list-sticky" :buttons="addBtn" :record="record" @click="openComponent" />
     </Filter>
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="filterTable()">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="filterTable()">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
-        <mtp-table-button class="btn-list-sticky"
-                          :buttons="handleBtn(record)"
-                          :record="record"
-                          @click="openComponent" />
+        <mtp-table-button class="btn-list-sticky" :buttons="handleBtn(record)" :record="record" @click="openComponent" />
       </template>
       <!-- 协议类型-->,
       <template #isvalid="{ record }">
@@ -35,14 +21,9 @@
       </template>
     </a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="handleBtn(selectedRow)">
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handleBtn(selectedRow)">
     </contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -57,63 +38,63 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getTableButton } from '@/common/setup/table/button';
 
 export default defineComponent({
-    name: EnumRouterName.platinum_agreement_tab,
-    components: {
-        Filter,
-        contextMenu,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('../../compoments/detail/index.vue')),
-        modify: defineAsyncComponent(() => import('../../compoments/modify/index.vue')),
-        add: defineAsyncComponent(() => import('../../compoments/add/index.vue')),
-        delete: defineAsyncComponent(() => import('../../compoments/delete/index.vue')),
-        resume: defineAsyncComponent(() => import('../../compoments/resume/index.vue')),
-        disable: defineAsyncComponent(() => import('../../compoments/stop/index.vue')),
-    },
-    setup() {
-        const addBtn = getTableButton(['add']);
+  name: EnumRouterName.platinum_agreement_tab,
+  components: {
+    Filter,
+    contextMenu,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('../../compoments/detail/index.vue')),
+    modify: defineAsyncComponent(() => import('../../compoments/modify/index.vue')),
+    add: defineAsyncComponent(() => import('../../compoments/add/index.vue')),
+    delete: defineAsyncComponent(() => import('../../compoments/delete/index.vue')),
+    resume: defineAsyncComponent(() => import('../../compoments/resume/index.vue')),
+    disable: defineAsyncComponent(() => import('../../compoments/stop/index.vue')),
+  },
+  setup() {
+    const addBtn = getTableButton(['add']);
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QhjAgreementConfig>();
-        // 获取列表数据
-        const queryTableAction = () => queryTable(queryAgreementConfig);
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.platinum_agreement_tab,
-            tableName: 'table_pcweb_agreement',
-            tableFilterKey: ['agreementno', 'agreementtype'],
-            isDetail: true,
-        };
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QhjAgreementConfig>();
+    // 获取列表数据
+    const queryTableAction = () => queryTable(queryAgreementConfig);
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.platinum_agreement_tab,
+      tableName: 'table_pcweb_agreement',
+      tableFilterKey: ['agreementno', 'agreementtype'],
+      isDetail: true,
+    };
 
-        const { getRateEnumName } = handleArgreementType();
-        // 过滤注销数据
-        const filterTable = () => tableList.value.filter((e) => e.isvalid !== 3);
+    const { getRateEnumName } = handleArgreementType();
+    // 过滤注销数据
+    const filterTable = () => tableList.value.filter((e) => e.isvalid !== 3);
 
-        function handleBtn(record: QhjAgreementConfig) {
-            if (!record) return [];
-            const buttons = getTableButton(['detail', 'modify', 'delete', 'resume', 'disable']);
-            const { isvalid } = record;
-            if (isvalid === 1) {
-                // 正常
-                return buttons.filter((e) => e.code !== 'resume');
-            } else if (isvalid === 2) {
-                // 停用
-                return buttons.filter((e) => e.code !== 'disable');
-            }
-            return [];
-        }
+    function handleBtn(record: QhjAgreementConfig) {
+      if (!record) return [];
+      const buttons = getTableButton(['detail', 'modify', 'delete', 'resume', 'disable']);
+      const { isvalid } = record;
+      if (isvalid === 1) {
+        // 正常
+        return buttons.filter((e) => e.code !== 'resume');
+      } else if (isvalid === 2) {
+        // 停用
+        return buttons.filter((e) => e.code !== 'disable');
+      }
+      return [];
+    }
 
-        return {
-            ...handleComposeTable<QhjAgreementConfig>(param),
-            getRateEnumName,
-            loading,
-            handlePermissionBtn,
-            filterTable,
-            getAgreementTypeName,
-            getAgreementStatus,
-            addBtn,
-            handleBtn,
-        };
-    },
+    return {
+      ...handleComposeTable<QhjAgreementConfig>(param),
+      getRateEnumName,
+      loading,
+      handlePermissionBtn,
+      filterTable,
+      getAgreementTypeName,
+      getAgreementStatus,
+      addBtn,
+      handleBtn,
+    };
+  },
 });
 </script>

+ 70 - 70
src/views/platinum/platinum_customer_info/list/normal-use/index.vue

@@ -1,33 +1,33 @@
 <template>
-    <!-- 客户信息: 正常 -->
-    <div class="custom-normal" :loading="loading">
-        <filterCustomTable @search="search">
-            <BtnList :btnList="commonBtn" />
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{}">
-                    <BtnList :btnList="forDataBtn" />
-                </template>
-                <template #userinfotype="{ text }">
-                    <a>{{ text === 2 ? '企业' : '个人' }}</a>
-                </template>
-                <!-- 这个状态比较特殊 判断查询类型querytype  如果是wskh表 则使用网上开户的枚举  如果是正式表 则使用正式表的枚举 -->
-                <template #status="{ record }">
-                    <a>{{ record.statusdesc }}</a>
-                </template>
-                <template #cardtype="{ text }">
-                    <a>{{ text === 0 ? '' : getCardTypeEnumItemName(text) }}</a>
-                </template>
-                <!-- 客户名称 -->
-                <template #customername="{ record }">
-                    <a>{{ record.username }}</a>
-                </template>
-            </a-table>
-        </contextMenu>
-        <Middle :selectedRow="selectedRow" @refresh="update" />
-    </div>
+  <!-- 客户信息: 正常 -->
+  <div class="custom-normal" :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{}">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <template #userinfotype="{ text }">
+          <a>{{ text === 2 ? '企业' : '个人' }}</a>
+        </template>
+        <!-- 这个状态比较特殊 判断查询类型querytype  如果是wskh表 则使用网上开户的枚举  如果是正式表 则使用正式表的枚举 -->
+        <template #status="{ record }">
+          <a>{{ record.statusdesc }}</a>
+        </template>
+        <template #cardtype="{ text }">
+          <a>{{ text === 0 ? '' : getCardTypeEnumItemName(text) }}</a>
+        </template>
+        <!-- 客户名称 -->
+        <template #customername="{ record }">
+          <a>{{ record.username }}</a>
+        </template>
+      </a-table>
+    </contextMenu>
+    <Middle :selectedRow="selectedRow" @refresh="update" />
+  </div>
 </template>
 
 <script lang="ts">
@@ -41,51 +41,51 @@ import { QhjCustomer } from '@/services/go/ermcp/qhj/interface';
 import { getUserId } from '@/services/bus/user';
 import { queryCustomerInfo } from '@/services/go/ermcp/qhj';
 export default defineComponent({
-    name: 'custom-normal',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        BtnList,
-        Middle,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QhjCustomer>({});
+  name: 'custom-normal',
+  components: {
+    filterCustomTable,
+    contextMenu,
+    BtnList,
+    Middle,
+  },
+  setup() {
+    // 表头数据
+    const { columns, registerColumn, updateColumn } = getTableColumns();
+    // 表格事件
+    const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QhjCustomer>({});
 
-        // 表格操作按钮列表
-        const [commonBtn, forDataBtn] = _getBtnList('platinum_custom_info_normal', true).value;
+    // 表格操作按钮列表
+    const [commonBtn, forDataBtn] = _getBtnList('platinum_custom_info_normal', true).value;
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList();
-        const { search, update } = handleSearch(3, queryTable);
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList();
+    const { search, update } = handleSearch(3, queryTable);
 
-        initData(() => {
-            // 获取列表数据
-            queryTable(queryCustomerInfo, { querytype: 3, userid: getUserId() });
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_customer_info', []);
-        });
+    initData(() => {
+      // 获取列表数据
+      queryTable(queryCustomerInfo, { querytype: 3, userid: getUserId() });
+      // 注册表头信息 过滤
+      registerColumn('table_pcweb_qhj_customer_info', []);
+    });
 
-        return {
-            search,
-            update,
-            columns,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            updateColumn,
-            getStatusName,
-            getCardTypeEnumItemName,
-            getWSKHStatusName,
-            queryTable,
-        };
-    },
+    return {
+      search,
+      update,
+      columns,
+      expandedRowKeys,
+      selectedRow,
+      Rowclick,
+      commonBtn,
+      forDataBtn,
+      loading,
+      tableList,
+      updateColumn,
+      getStatusName,
+      getCardTypeEnumItemName,
+      getWSKHStatusName,
+      queryTable,
+    };
+  },
 });
 </script>
 

+ 70 - 70
src/views/platinum/platinum_customer_info/list/stop-use/index.vue

@@ -1,33 +1,33 @@
 <template>
-    <!-- 客户信息: 停用 -->
-    <div class="custom-normal" :loading="loading">
-        <filterCustomTable @search="search">
-            <BtnList :btnList="commonBtn" />
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false" rowKey="key" :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{}">
-                    <BtnList :btnList="forDataBtn" />
-                </template>
-                <template #userinfotype="{ text }">
-                    <a>{{ text === 2 ? '企业' : '个人' }}</a>
-                </template>
-                <!-- 这个状态比较特殊 判断查询类型querytype  如果是wskh表 则使用网上开户的枚举  如果是正式表 则使用正式表的枚举 -->
-                <template #status="{ record }">
-                    <a>{{ record.statusdesc }}</a>
-                </template>
-                <template #cardtype="{ text }">
-                    <a>{{ text === 0 ? '' : getCardTypeEnumItemName(text) }}</a>
-                </template>
-                <!-- 客户名称 -->
-                <template #customername="{ record }">
-                    <a>{{ record.username }}</a>
-                </template>
-            </a-table>
-        </contextMenu>
-        <Middle :selectedRow="selectedRow" @refresh="update" />
-    </div>
+  <!-- 客户信息: 停用 -->
+  <div class="custom-normal" :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false" :rowKey="(record,index)=>index" :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{}">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <template #userinfotype="{ text }">
+          <a>{{ text === 2 ? '企业' : '个人' }}</a>
+        </template>
+        <!-- 这个状态比较特殊 判断查询类型querytype  如果是wskh表 则使用网上开户的枚举  如果是正式表 则使用正式表的枚举 -->
+        <template #status="{ record }">
+          <a>{{ record.statusdesc }}</a>
+        </template>
+        <template #cardtype="{ text }">
+          <a>{{ text === 0 ? '' : getCardTypeEnumItemName(text) }}</a>
+        </template>
+        <!-- 客户名称 -->
+        <template #customername="{ record }">
+          <a>{{ record.username }}</a>
+        </template>
+      </a-table>
+    </contextMenu>
+    <Middle :selectedRow="selectedRow" @refresh="update" />
+  </div>
 </template>
 
 <script lang="ts">
@@ -42,50 +42,50 @@ import { handleSearch } from '../setup';
 import { queryCustomerInfo } from '@/services/go/ermcp/qhj';
 
 export default defineComponent({
-    name: 'custom-normal',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        BtnList,
-        Middle,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QhjCustomer>({});
+  name: 'custom-normal',
+  components: {
+    filterCustomTable,
+    contextMenu,
+    BtnList,
+    Middle,
+  },
+  setup() {
+    // 表头数据
+    const { columns, registerColumn, updateColumn } = getTableColumns();
+    // 表格事件
+    const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QhjCustomer>({});
 
-        // 表格操作按钮列表
-        const [commonBtn, forDataBtn] = _getBtnList('platinum_customer_info_stop', true).value;
+    // 表格操作按钮列表
+    const [commonBtn, forDataBtn] = _getBtnList('platinum_customer_info_stop', true).value;
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList();
-        const { search, update } = handleSearch(4, queryTable);
-        initData(() => {
-            // 获取列表数据
-            queryTable(queryCustomerInfo, { querytype: 4, userid: getUserId() });
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_customer_info', ['userinfotype', 'nickname', 'contactname', 'mobile']);
-        });
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList();
+    const { search, update } = handleSearch(4, queryTable);
+    initData(() => {
+      // 获取列表数据
+      queryTable(queryCustomerInfo, { querytype: 4, userid: getUserId() });
+      // 注册表头信息 过滤
+      registerColumn('table_pcweb_qhj_customer_info', ['userinfotype', 'nickname', 'contactname', 'mobile']);
+    });
 
-        return {
-            columns,
-            update,
-            search,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            updateColumn,
-            getStatusName,
-            getCardTypeEnumItemName,
-            getWSKHStatusName,
-            queryTable,
-        };
-    },
+    return {
+      columns,
+      update,
+      search,
+      expandedRowKeys,
+      selectedRow,
+      Rowclick,
+      commonBtn,
+      forDataBtn,
+      loading,
+      tableList,
+      updateColumn,
+      getStatusName,
+      getCardTypeEnumItemName,
+      getWSKHStatusName,
+      queryTable,
+    };
+  },
 });
 </script>
 

+ 69 - 69
src/views/platinum/platinum_customer_info/list/unsubmit/index.vue

@@ -1,32 +1,32 @@
 <template>
-    <!-- 客户信息: 正常 -->
-    <div class="custom_info_unsubmit" :loading="loading">
-        <filterCustomTable @search="search">
-            <BtnList :btnList="firstBtn" />
-        </filterCustomTable>
-        <contextMenu :contextMenuList="secondeBtn">
-            <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{}">
-                    <BtnList :btnList="secondeBtn" />
-                </template>
-                <template #userinfotype="{ text }">
-                    <a>{{ text === 2 ? '企业' : '个人' }}</a>
-                </template>
-                <template #customername="{ record }">
-                    <a>{{ record.username }}</a>
-                </template>
-                <!-- 这个状态比较特殊 判断查询类型querytype  如果是wskh表 则使用网上开户的枚举  如果是正式表 则使用正式表的枚举 -->
-                <template #status="{ record }">
-                    <a>{{ record.statusdesc }}</a>
-                </template>
-                <template #cardtype="{ text }">
-                    <a>{{ text === 0 ? '' : getCardTypeEnumItemName(text) }}</a>
-                </template>
-            </a-table>
-        </contextMenu>
-        <Middle :selectedRow="selectedRow" @refresh="update" />
-    </div>
+  <!-- 客户信息: 正常 -->
+  <div class="custom_info_unsubmit" :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="firstBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="secondeBtn">
+      <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{}">
+          <BtnList :btnList="secondeBtn" />
+        </template>
+        <template #userinfotype="{ text }">
+          <a>{{ text === 2 ? '企业' : '个人' }}</a>
+        </template>
+        <template #customername="{ record }">
+          <a>{{ record.username }}</a>
+        </template>
+        <!-- 这个状态比较特殊 判断查询类型querytype  如果是wskh表 则使用网上开户的枚举  如果是正式表 则使用正式表的枚举 -->
+        <template #status="{ record }">
+          <a>{{ record.statusdesc }}</a>
+        </template>
+        <template #cardtype="{ text }">
+          <a>{{ text === 0 ? '' : getCardTypeEnumItemName(text) }}</a>
+        </template>
+      </a-table>
+    </contextMenu>
+    <Middle :selectedRow="selectedRow" @refresh="update" />
+  </div>
 </template>
 
 <script lang="ts">
@@ -41,48 +41,48 @@ import { getUserId } from '@/services/bus/user';
 import { handleSearch } from '../setup';
 import { queryCustomerInfo } from '@/services/go/ermcp/qhj';
 export default defineComponent({
-    name: 'custom_info_unsubmit',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        BtnList,
-        Middle,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QhjCustomer>({});
-        // 表格操作按钮列表
-        const [firstBtn, secondeBtn] = _getBtnList('platinum_customer_info_unsubmit', true).value;
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList();
-        const { search, update } = handleSearch(2, queryTable);
-        initData(() => {
-            // 获取列表数据
-            queryTable(queryCustomerInfo, { querytype: 2, userid: getUserId() });
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_customer_info', ['userinfotype', 'nickname', 'contactname', 'mobile']);
-        });
+  name: 'custom_info_unsubmit',
+  components: {
+    filterCustomTable,
+    contextMenu,
+    BtnList,
+    Middle,
+  },
+  setup() {
+    // 表头数据
+    const { columns, registerColumn, updateColumn } = getTableColumns();
+    // 表格事件
+    const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QhjCustomer>({});
+    // 表格操作按钮列表
+    const [firstBtn, secondeBtn] = _getBtnList('platinum_customer_info_unsubmit', true).value;
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList();
+    const { search, update } = handleSearch(2, queryTable);
+    initData(() => {
+      // 获取列表数据
+      queryTable(queryCustomerInfo, { querytype: 2, userid: getUserId() });
+      // 注册表头信息 过滤
+      registerColumn('table_pcweb_qhj_customer_info', ['userinfotype', 'nickname', 'contactname', 'mobile']);
+    });
 
-        return {
-            columns,
-            update,
-            search,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            firstBtn,
-            secondeBtn,
-            loading,
-            tableList,
-            updateColumn,
-            getStatusName,
-            getCardTypeEnumItemName,
-            getWSKHStatusName,
-            queryTable,
-        };
-    },
+    return {
+      columns,
+      update,
+      search,
+      expandedRowKeys,
+      selectedRow,
+      Rowclick,
+      firstBtn,
+      secondeBtn,
+      loading,
+      tableList,
+      updateColumn,
+      getStatusName,
+      getCardTypeEnumItemName,
+      getWSKHStatusName,
+      queryTable,
+    };
+  },
 });
 </script>
 

+ 40 - 47
src/views/platinum/platinum_document_query/list/order/index.vue

@@ -2,14 +2,7 @@
   <!-- 单据查询 委托单-->
   <div class="platinum_fixed_investment_price_query_tab">
     <Filter @search="search" />
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 账户类型 -->
       <template #userinfotype="{ record }">
         <a>{{ record.userinfotype === 1 ? '个人' : '企业' }}</a>
@@ -33,47 +26,47 @@ import { QueryTradeOrderDetailReq } from '@/services/go/ermcp/qhj/interface';
 import Filter from '../../compoments/filter/index.vue';
 
 export default defineComponent({
-    name: 'platinum_document_query_order',
-    components: { Filter },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
-        const queryTableAction = () => {
-            // 获取列表数据
-            queryTable(queryTradeOrderDetail, { userid: getUserId() });
-        };
+  name: 'platinum_document_query_order',
+  components: { Filter },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
+    const queryTableAction = () => {
+      // 获取列表数据
+      queryTable(queryTradeOrderDetail, { userid: getUserId() });
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.plan_audit,
-            tableName: 'table_pcweb_qhj_order',
-            tableFilterKey: [],
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.plan_audit,
+      tableName: 'table_pcweb_qhj_order',
+      tableFilterKey: [],
+      isDetail: true,
+    };
 
-        function search(value: any) {
-            const { includesub, goodsid, filtername, userid, ordertime, userinfotype } = value;
-            const len = ordertime.length;
-            const param: QueryTradeOrderDetailReq = {
-                userid: userid[0] ? userid[0] : getUserId(),
-                userinfotype: userinfotype[0] ? userinfotype[0] : 0,
-                filtername: filtername[0],
-                begindate: len > 1 ? ordertime[0] : '',
-                enddate: len > 1 ? ordertime[len - 1] : '',
-                goodsid: goodsid[0],
-                includesub,
-            };
-            queryTable(queryTradeOrderDetail, param);
-        }
+    function search(value: any) {
+      const { includesub, goodsid, filtername, userid, ordertime, userinfotype } = value;
+      const len = ordertime.length;
+      const param: QueryTradeOrderDetailReq = {
+        userid: userid[0] ? userid[0] : getUserId(),
+        userinfotype: userinfotype[0] ? userinfotype[0] : 0,
+        filtername: filtername[0],
+        begindate: len > 1 ? ordertime[0] : '',
+        enddate: len > 1 ? ordertime[len - 1] : '',
+        goodsid: goodsid[0],
+        includesub,
+      };
+      queryTable(queryTradeOrderDetail, param);
+    }
 
-        return {
-            ...handleComposeTable<QueryTradeOrderDetailRsp>(param),
-            search,
-            loading,
-            tableList,
-            getOrderStatusName,
-        };
-    },
+    return {
+      ...handleComposeTable<QueryTradeOrderDetailRsp>(param),
+      search,
+      loading,
+      tableList,
+      getOrderStatusName,
+    };
+  },
 });
 </script>

+ 36 - 43
src/views/platinum/platinum_document_query/list/position/index.vue

@@ -2,14 +2,7 @@
   <!-- 单据查询 持仓-->
   <div class="platinum_fixed_investment_price_query_tab">
     <Filter @search="search" />
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 账户类型 -->
       <template #userinfotype="{ record }">
         <a>{{ record.userinfotype === 1 ? '个人' : '企业' }}</a>
@@ -28,43 +21,43 @@ import { QueryTradePositionReq } from 'src/services/go/ermcp/qhj/interface';
 import Filter from './compoments/filter/index.vue';
 
 export default defineComponent({
-    name: 'platinum_document_query_position',
-    components: { Filter },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
-        const queryTableAction = () => {
-            // 获取列表数据
-            queryTable(queryTradePosition, { userid: getUserId() });
-        };
+  name: 'platinum_document_query_position',
+  components: { Filter },
+  setup() {
+    // 表格列表数据
+    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,
-        };
+    // 表格通用逻辑
+    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 = {
-                userid: userid[0] ? userid[0] : getUserId(),
-                userinfotype: userinfotype[0] ? userinfotype[0] : 0,
-                filtername: filtername[0],
-                goodsid: goodsid[0],
-                includesub,
-            };
-            queryTable(queryTradePosition, param);
-        }
+    function search(value: any) {
+      const { includesub, goodsid, filtername, userid, userinfotype } = value;
+      const param: QueryTradePositionReq = {
+        userid: userid[0] ? userid[0] : getUserId(),
+        userinfotype: userinfotype[0] ? userinfotype[0] : 0,
+        filtername: filtername[0],
+        goodsid: goodsid[0],
+        includesub,
+      };
+      queryTable(queryTradePosition, param);
+    }
 
-        return {
-            ...handleComposeTable<QueryTradePositionRsp>(param),
-            search,
-            loading,
-            tableList,
-        };
-    },
+    return {
+      ...handleComposeTable<QueryTradePositionRsp>(param),
+      search,
+      loading,
+      tableList,
+    };
+  },
 });
 </script>

+ 39 - 46
src/views/platinum/platinum_document_query/list/success/index.vue

@@ -2,14 +2,7 @@
   <!-- 单据查询 成交单-->
   <div class="platinum_document_query_success">
     <Filter @search="search" />
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 账户类型 -->
       <template #userinfotype="{ record }">
         <a>{{ record.userinfotype === 1 ? '个人' : '企业' }}</a>
@@ -32,46 +25,46 @@ import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
 import Filter from '../../compoments/filter/index.vue';
 
 export default defineComponent({
-    name: 'platinum_document_query_success',
-    components: { Filter },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<ErmcpWareHouseInfo>();
-        const queryTableAction = () => {
-            // 获取列表数据
-            queryTable(queryTradeDetail, { userid: getUserId() });
-        };
+  name: 'platinum_document_query_success',
+  components: { Filter },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<ErmcpWareHouseInfo>();
+    const queryTableAction = () => {
+      // 获取列表数据
+      queryTable(queryTradeDetail, { userid: getUserId() });
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.plan_audit,
-            tableName: 'table_pcweb_qhj_deal_order',
-            tableFilterKey: [],
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.plan_audit,
+      tableName: 'table_pcweb_qhj_deal_order',
+      tableFilterKey: [],
+      isDetail: true,
+    };
 
-        function search(value: any) {
-            const { includesub, goodsid, filtername, userid, ordertime, userinfotype } = value;
-            const len = ordertime.length;
-            const param: QueryTradeDetailReq = {
-                userid: userid[0] ? userid[0] : getUserId(),
-                userinfotype: userinfotype[0] ? userinfotype[0] : 0,
-                filtername: filtername[0],
-                begindate: len > 1 ? ordertime[0] : '',
-                enddate: len > 1 ? ordertime[len - 1] : '',
-                goodsid: goodsid[0],
-                includesub,
-            };
-            queryTable(queryTradeDetail, param);
-        }
+    function search(value: any) {
+      const { includesub, goodsid, filtername, userid, ordertime, userinfotype } = value;
+      const len = ordertime.length;
+      const param: QueryTradeDetailReq = {
+        userid: userid[0] ? userid[0] : getUserId(),
+        userinfotype: userinfotype[0] ? userinfotype[0] : 0,
+        filtername: filtername[0],
+        begindate: len > 1 ? ordertime[0] : '',
+        enddate: len > 1 ? ordertime[len - 1] : '',
+        goodsid: goodsid[0],
+        includesub,
+      };
+      queryTable(queryTradeDetail, param);
+    }
 
-        return {
-            ...handleComposeTable<ErmcpWareHouseInfo>(param),
-            search,
-            loading,
-            tableList,
-        };
-    },
+    return {
+      ...handleComposeTable<ErmcpWareHouseInfo>(param),
+      search,
+      loading,
+      tableList,
+    };
+  },
 });
 </script>

+ 42 - 49
src/views/platinum/platinum_document_query/list/waiting/index.vue

@@ -2,14 +2,7 @@
   <!-- 单据查询 待付单-->
   <div class="platinum_fixed_investment_price_query_tab">
     <Filter @search="search" />
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 账户类型 -->
       <template #userinfotype="{ record }">
         <a>{{ record.userinfotype === 1 ? '个人' : '企业' }}</a>
@@ -31,49 +24,49 @@ import moment from 'moment';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 
 export default defineComponent({
-    name: 'platinum_document_query_waiting',
-    components: { Filter },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QhjPayOrder>();
-        const queryTableAction = () => {
-            // 获取列表数据
-            queryTable(queryTradePayOrder, { userid: getUserId(), payflag: '1,3,5' });
-        };
+  name: 'platinum_document_query_waiting',
+  components: { Filter },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QhjPayOrder>();
+    const queryTableAction = () => {
+      // 获取列表数据
+      queryTable(queryTradePayOrder, { userid: getUserId(), payflag: '1,3,5' });
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.plan_audit,
-            tableName: 'table_pcweb_qhj_pay_bill',
-            tableFilterKey: [],
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.plan_audit,
+      tableName: 'table_pcweb_qhj_pay_bill',
+      tableFilterKey: [],
+      isDetail: true,
+    };
 
-        function search(value: any) {
-            const { includesub, goodsid, filtername, userid, ordertime, userinfotype, isOverTime } = value;
-            const len = ordertime.length;
-            const param: QueryTradePayOrderReq = {
-                userid: userid[0] ? userid[0] : getUserId(),
-                userinfotype: userinfotype[0] ? userinfotype[0] : 0,
-                filtername: filtername[0],
-                begindate: len > 1 ? ordertime[0] : '',
-                enddate: len > 1 ? ordertime[len - 1] : '',
-                goodsid: goodsid[0],
-                includesub,
-                payflag: isOverTime ? '1' : '1,3,5', // 付款标识(逗号隔开,如1,2) - 1:未支付 2:已支付 3:已过期 4:已撤销 5:结算过期 6:预售终止
-            };
-            queryTable(queryTradePayOrder, param);
-        }
-        const isOverTime = (value: string) => (moment().isAfter(moment(value)) ? '付款超时' : value);
+    function search(value: any) {
+      const { includesub, goodsid, filtername, userid, ordertime, userinfotype, isOverTime } = value;
+      const len = ordertime.length;
+      const param: QueryTradePayOrderReq = {
+        userid: userid[0] ? userid[0] : getUserId(),
+        userinfotype: userinfotype[0] ? userinfotype[0] : 0,
+        filtername: filtername[0],
+        begindate: len > 1 ? ordertime[0] : '',
+        enddate: len > 1 ? ordertime[len - 1] : '',
+        goodsid: goodsid[0],
+        includesub,
+        payflag: isOverTime ? '1' : '1,3,5', // 付款标识(逗号隔开,如1,2) - 1:未支付 2:已支付 3:已过期 4:已撤销 5:结算过期 6:预售终止
+      };
+      queryTable(queryTradePayOrder, param);
+    }
+    const isOverTime = (value: string) => (moment().isAfter(moment(value)) ? '付款超时' : value);
 
-        return {
-            ...handleComposeTable<QhjPayOrder>(param),
-            search,
-            isOverTime,
-            loading,
-            tableList,
-        };
-    },
+    return {
+      ...handleComposeTable<QhjPayOrder>(param),
+      search,
+      isOverTime,
+      loading,
+      tableList,
+    };
+  },
 });
 </script>

+ 3 - 22
src/views/platinum/platinum_financing_information/list/tab/index.vue

@@ -2,24 +2,10 @@
   <!-- 融资信息 -->
   <div class="platinum_financing_information_tab">
     <Filter @search="updateColumn" />
-    <a-table
-      :columns="columns"
-      class="srcollYTable"
-      :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-      :pagination="false"
-      :expandedRowKeys="expandedRowKeys"
-      :customRow="Rowclick"
-      rowKey="key"
-      :data-source="tableList"
-    >
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
-        <mtp-table-button
-          class="btn-list-sticky"
-          :buttons="buttons"
-          :record="record"
-          @click="openComponent"
-        />
+        <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
       </template>
       <!-- 物流信息 -->
       <template #scfcontractstatus="{ record }">
@@ -34,12 +20,7 @@
     </a-table>
     <!-- 右键 -->
     <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"></contextMenu>
-    <component
-      :is="componentId"
-      v-if="componentId"
-      :selectedRow="selectedRow"
-      @cancel="closeComponent"
-    ></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </div>
 </template>
 

+ 23 - 31
src/views/platinum/platinum_fixed_investment_price_query/list/tab/index.vue

@@ -2,15 +2,7 @@
   <!-- 定投价查询 -->
   <div class="platinum_fixed_investment_price_query_tab">
     <Filter @search="updateColumn" />
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 商品名称 - 商品代码-->
       <template #goodsid="{ record }">
         <a>{{ record.goodsname + "-" +  record.goodscode }}</a>
@@ -27,28 +19,28 @@ import { QhjReckonPriceLog } from '@/services/go/ermcp/qhj/interface';
 import Filter from '../../compoments/filter/index.vue';
 
 export default defineComponent({
-    name: 'platinum_fixed_investment_price_query_tab',
-    components: { Filter },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QhjReckonPriceLog>();
-        const queryTableAction = () => {
-            queryTable(queryReckonPriceLog);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.plan_audit,
-            tableName: 'table_pcweb_qhj_fixed_investment_price_query',
-            tableFilterKey: ['tradedate', 'goodsid'],
-            isDetail: true,
-        };
+  name: 'platinum_fixed_investment_price_query_tab',
+  components: { Filter },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QhjReckonPriceLog>();
+    const queryTableAction = () => {
+      queryTable(queryReckonPriceLog);
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.plan_audit,
+      tableName: 'table_pcweb_qhj_fixed_investment_price_query',
+      tableFilterKey: ['tradedate', 'goodsid'],
+      isDetail: true,
+    };
 
-        return {
-            ...handleComposeTable<QhjReckonPriceLog>(param),
-            loading,
-            tableList,
-        };
-    },
+    return {
+      ...handleComposeTable<QhjReckonPriceLog>(param),
+      loading,
+      tableList,
+    };
+  },
 });
 </script>

+ 24 - 31
src/views/platinum/platinum_fixed_investment_query/list/flow/index.vue

@@ -2,14 +2,7 @@
   <!-- 定投流水查询 -->
   <div class="platinum_fixed_investment_flow_query">
     <Filter @search="updateColumn" />
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <template #triggerstatus="{ record }">
         <a>{{ record.triggerstatus === 1 ? "成功" : "失败" }}</a>
       </template>
@@ -25,30 +18,30 @@ import { QhjRSTriggerLog } from '@/services/go/ermcp/qhj/interface';
 import Filter from './compoments/filter/index.vue';
 
 export default defineComponent({
-    name: 'platinum_fixed_investment_flow_query',
-    components: { Filter },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QhjRSTriggerLog>();
-        const queryTableAction = () => {
-            // 获取列表数据
-            queryTable(queryRSTriggerLog);
-        };
+  name: 'platinum_fixed_investment_flow_query',
+  components: { Filter },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QhjRSTriggerLog>();
+    const queryTableAction = () => {
+      // 获取列表数据
+      queryTable(queryRSTriggerLog);
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.plan_audit,
-            tableName: 'table_pcweb_qhj_fixed_investment_flow_query',
-            tableFilterKey: ['goodsid', 'accountid', 'triggertime'],
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.plan_audit,
+      tableName: 'table_pcweb_qhj_fixed_investment_flow_query',
+      tableFilterKey: ['goodsid', 'accountid', 'triggertime'],
+      isDetail: true,
+    };
 
-        return {
-            ...handleComposeTable<QhjRSTriggerLog>(param),
-            loading,
-            tableList,
-        };
-    },
+    return {
+      ...handleComposeTable<QhjRSTriggerLog>(param),
+      loading,
+      tableList,
+    };
+  },
 });
 </script>

+ 26 - 33
src/views/platinum/platinum_fixed_investment_query/list/plan/index.vue

@@ -2,14 +2,7 @@
   <!-- 定投计划查询 -->
   <div class="platinum_fixed_investment_plan_query">
     <Filter @search="updateColumn" />
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <template #userinfotype="{ record }">
         <a>{{ record.userinfotype === 1 ? '个人' : '企业'}}</a>
       </template>
@@ -37,32 +30,32 @@ import { QhjRStrategy } from '@/services/go/ermcp/qhj/interface';
 import Filter from './compoments/filter/index.vue';
 
 export default defineComponent({
-    name: 'platinum_fixed_investment_plan_query',
-    components: { Filter },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QhjRStrategy>();
-        const queryTableAction = () => {
-            // 获取列表数据
-            queryTable(queryRStrategy);
-        };
+  name: 'platinum_fixed_investment_plan_query',
+  components: { Filter },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QhjRStrategy>();
+    const queryTableAction = () => {
+      // 获取列表数据
+      queryTable(queryRStrategy);
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.plan_audit,
-            tableName: 'table_pcweb_qhj_fixed_investment_plan_query',
-            tableFilterKey: ['goodsid', 'regularlystrategystatus', 'accountid', 'nexttriggerdate'],
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.plan_audit,
+      tableName: 'table_pcweb_qhj_fixed_investment_plan_query',
+      tableFilterKey: ['goodsid', 'regularlystrategystatus', 'accountid', 'nexttriggerdate'],
+      isDetail: true,
+    };
 
-        return {
-            ...handleComposeTable<QhjRStrategy>(param),
-            loading,
-            getRegularStateName,
-            getWeekName,
-            tableList,
-        };
-    },
+    return {
+      ...handleComposeTable<QhjRStrategy>(param),
+      loading,
+      getRegularStateName,
+      getWeekName,
+      tableList,
+    };
+  },
 });
 </script>

+ 55 - 71
src/views/platinum/platinum_pick_query/list/tab/index.vue

@@ -2,21 +2,10 @@
   <!-- 提货查询 -->
   <div class="platinum_pick_query_tab">
     <Filter @search="updateColumn" />
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
-        <mtp-table-button class="btn-list-sticky"
-                          :buttons="handleBtn(record)"
-                          :record="record"
-                          @click="openComponent" />
+        <mtp-table-button class="btn-list-sticky" :buttons="handleBtn(record)" :record="record" @click="openComponent" />
       </template>
       <!-- 提货状态 -->
       <template #takeorderstatus="{ record }">
@@ -46,13 +35,8 @@
       </template>
     </a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="handleBtn(selectedRow)"> </contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"> </component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handleBtn(selectedRow)"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
   </div>
 </template>
 
@@ -66,61 +50,61 @@ import { QhjTradeGoodsPickup } from '@/services/go/ermcp/qhj/interface';
 import Filter from '../../compoments/filter/index.vue';
 
 export default defineComponent({
-    name: 'platinum_pick_query_tab',
-    components: {
-        Filter,
-        contextMenu,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('./compoments/detail/index.vue')), // 详情
-        complete_stocking: defineAsyncComponent(() => import('./compoments/complete_stocking/index.vue')), // 完成备货
-        upload_logistics: defineAsyncComponent(() => import('./compoments/upload_logistics/index.vue')), // 上传物流
-        confirm_pickup: defineAsyncComponent(() => import('./compoments/confirm_pickup/index.vue')), // 确认收货
-        confirm_receipt: defineAsyncComponent(() => import('./compoments/query_receipt/index.vue')), // 确认收货
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QhjTradeGoodsPickup>();
+  name: 'platinum_pick_query_tab',
+  components: {
+    Filter,
+    contextMenu,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('./compoments/detail/index.vue')), // 详情
+    complete_stocking: defineAsyncComponent(() => import('./compoments/complete_stocking/index.vue')), // 完成备货
+    upload_logistics: defineAsyncComponent(() => import('./compoments/upload_logistics/index.vue')), // 上传物流
+    confirm_pickup: defineAsyncComponent(() => import('./compoments/confirm_pickup/index.vue')), // 确认收货
+    confirm_receipt: defineAsyncComponent(() => import('./compoments/query_receipt/index.vue')), // 确认收货
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QhjTradeGoodsPickup>();
 
-        const queryTableAction = () => {
-            queryTable(queryTradeGoodsPickup);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.plan_audit,
-            tableName: 'table_pcweb_qhj_pickup_query',
-            tableFilterKey: ['reqtime', 'pickupgoodsname', 'takeorderstatus', 'goodsname'],
-            isDetail: true,
-        };
+    const queryTableAction = () => {
+      queryTable(queryTradeGoodsPickup);
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.plan_audit,
+      tableName: 'table_pcweb_qhj_pickup_query',
+      tableFilterKey: ['reqtime', 'pickupgoodsname', 'takeorderstatus', 'goodsname'],
+      isDetail: true,
+    };
+    // 1:备货中  完成备货
+    // 2:待取货(自提) 确认取货
+    // 4:待收货(邮寄) 上传物流信息、确认收货
+    function handleBtn(record: QhjTradeGoodsPickup) {
+      if (!record) return;
+      const { takeorderstatus } = record;
+      const buttons = getTableButton();
+      if (takeorderstatus === 1) {
         // 1:备货中  完成备货
+        return buttons.filter((e) => e.code === 'complete_stocking' || e.code === 'detail');
+      } else if (takeorderstatus === 2) {
         // 2:待取货(自提) 确认取货
+        return buttons.filter((e) => e.code === 'confirm_pickup' || e.code === 'detail');
+      } else if (takeorderstatus === 4) {
         // 4:待收货(邮寄) 上传物流信息、确认收货
-        function handleBtn(record: QhjTradeGoodsPickup) {
-            if (!record) return;
-            const { takeorderstatus } = record;
-            const buttons = getTableButton();
-            if (takeorderstatus === 1) {
-                // 1:备货中  完成备货
-                return buttons.filter((e) => e.code === 'complete_stocking' || e.code === 'detail');
-            } else if (takeorderstatus === 2) {
-                // 2:待取货(自提) 确认取货
-                return buttons.filter((e) => e.code === 'confirm_pickup' || e.code === 'detail');
-            } else if (takeorderstatus === 4) {
-                // 4:待收货(邮寄) 上传物流信息、确认收货
-                return buttons.filter((e) => e.code === 'complete_stocking' || e.code === 'detail' || e.code === 'confirm_receipt');
-            } else {
-                return [];
-            }
-        }
-        return {
-            ...handleComposeTable<QhjTradeGoodsPickup>(param),
-            loading,
-            tableList,
-            getPickUpStateName,
-            getTakeStateName,
-            handleBtn,
-        };
-    },
+        return buttons.filter((e) => e.code === 'complete_stocking' || e.code === 'detail' || e.code === 'confirm_receipt');
+      } else {
+        return [];
+      }
+    }
+    return {
+      ...handleComposeTable<QhjTradeGoodsPickup>(param),
+      loading,
+      tableList,
+      getPickUpStateName,
+      getTakeStateName,
+      handleBtn,
+    };
+  },
 });
 </script>
 

+ 64 - 86
src/views/platinum/platinum_recharge_withdrawal_review/list/recharge/index.vue

@@ -2,21 +2,10 @@
   <!-- 充值审核 -->
   <div class="platinum_recharge_review_tab">
     <Filter @search="search" />
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :loading="loading"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :loading="loading" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
-        <mtp-table-button class="btn-list-sticky"
-                          :buttons="handleBtn(record)"
-                          :record="record"
-                          @click="openComponent" />
+        <mtp-table-button class="btn-list-sticky" :buttons="handleBtn(record)" :record="record" @click="openComponent" />
       </template>
       <!-- 账户类型 -->
       <template #userinfotype="{ record }">
@@ -27,27 +16,16 @@
       </template>
       <template #certificatephotourl="{ record}">
         <template v-if="record.certificatephotourl">
-          <a v-for="(item, index) in getUrl(record.certificatephotourl)"
-             :key="item"
-             @click.stop="getVisibleImg(record.certificatephotourl, index)">{{item}}</a>
+          <a v-for="(item, index) in getUrl(record.certificatephotourl)" :key="item" @click.stop="getVisibleImg(record.certificatephotourl, index)">{{item}}</a>
         </template>
         <span v-else></span>
       </template>
     </a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="handleBtn(selectedRow)"> </contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"> </component>
-    <a-modal :visible="previewVisible"
-             :footer="null"
-             @cancel="cancelImg">
-      <img alt="预览附件"
-           style="width: 100%"
-           :src="previewImage" />
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handleBtn(selectedRow)"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
+    <a-modal :visible="previewVisible" :footer="null" @cancel="cancelImg">
+      <img alt="预览附件" style="width: 100%" :src="previewImage" />
     </a-modal>
   </div>
 </template>
@@ -63,66 +41,66 @@ import Filter from '../../compoments/filter/index.vue';
 import { handleTableStatus, inOrOutStatus } from '../../setup';
 
 export default defineComponent({
-    name: 'platinum_recharge_review_tab',
-    components: {
-        Filter,
-        contextMenu,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('./compoments/detail/index.vue')), // 详情
-        confirm_payment: defineAsyncComponent(() => import('./compoments/payment/index.vue')), // 确认收款
-        review_refuse: defineAsyncComponent(() => import('./compoments/refuse/index.vue')), // 审核拒绝
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QhjAccountOutInApply>();
-        // 状态
-        const { tableStatus, getTableListStatus, search } = handleTableStatus(queryTable, 2);
+  name: 'platinum_recharge_review_tab',
+  components: {
+    Filter,
+    contextMenu,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('./compoments/detail/index.vue')), // 详情
+    confirm_payment: defineAsyncComponent(() => import('./compoments/payment/index.vue')), // 确认收款
+    review_refuse: defineAsyncComponent(() => import('./compoments/refuse/index.vue')), // 审核拒绝
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QhjAccountOutInApply>();
+    // 状态
+    const { tableStatus, getTableListStatus, search } = handleTableStatus(queryTable, 2);
 
-        const queryTableAction = () => {
-            queryTable(queryAccountInOutApply, { querytype: 2, applystatus: tableStatus.value });
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.plan_audit,
-            tableName: 'table_pcweb_qhj_recharge_review',
-            tableFilterKey: [],
-            isDetail: true,
-        };
+    const queryTableAction = () => {
+      queryTable(queryAccountInOutApply, { querytype: 2, applystatus: tableStatus.value });
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.plan_audit,
+      tableName: 'table_pcweb_qhj_recharge_review',
+      tableFilterKey: [],
+      isDetail: true,
+    };
 
-        function handleBtn(record: QhjAccountOutInApply) {
-            if (!record) return;
-            const buttons = getTableButton();
-            if (tableStatus.value === inOrOutStatus.wait) {
-                return buttons;
-            } else {
-                return buttons.filter((e) => e.code === 'detail');
-            }
-        }
-        // 预览附件
-        const { previewVisible, previewImage, cancelImg, previewImg } = handlePreviewImg();
-        function getUrl(value: string): string[] {
-            return value.split(',').map((el, i) => `附件${i + 1}`);
-        }
-        function getVisibleImg(value: string, i: number) {
-            const str = value.split(',')[i];
-            previewImg(str);
-        }
+    function handleBtn(record: QhjAccountOutInApply) {
+      if (!record) return;
+      const buttons = getTableButton();
+      if (tableStatus.value === inOrOutStatus.wait) {
+        return buttons;
+      } else {
+        return buttons.filter((e) => e.code === 'detail');
+      }
+    }
+    // 预览附件
+    const { previewVisible, previewImage, cancelImg, previewImg } = handlePreviewImg();
+    function getUrl(value: string): string[] {
+      return value.split(',').map((el, i) => `附件${i + 1}`);
+    }
+    function getVisibleImg(value: string, i: number) {
+      const str = value.split(',')[i];
+      previewImg(str);
+    }
 
-        return {
-            ...handleComposeTable<QhjAccountOutInApply>(param),
-            loading,
-            handleBtn,
-            getTableListStatus,
-            previewVisible,
-            previewImage,
-            getVisibleImg,
-            cancelImg,
-            search,
-            getUrl,
-            tableList,
-        };
-    },
+    return {
+      ...handleComposeTable<QhjAccountOutInApply>(param),
+      loading,
+      handleBtn,
+      getTableListStatus,
+      previewVisible,
+      previewImage,
+      getVisibleImg,
+      cancelImg,
+      search,
+      getUrl,
+      tableList,
+    };
+  },
 });
 </script>
 

+ 48 - 64
src/views/platinum/platinum_recharge_withdrawal_review/list/withdrawal/index.vue

@@ -2,21 +2,10 @@
   <!-- 提现审核 -->
   <div class="platinum_withdrawal_review_tab">
     <Filter @search="search" />
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
-        <mtp-table-button class="btn-list-sticky"
-                          :buttons="handleBtn(record)"
-                          :record="record"
-                          @click="openComponent" />
+        <mtp-table-button class="btn-list-sticky" :buttons="handleBtn(record)" :record="record" @click="openComponent" />
       </template>
       <!-- 账户类型 -->
       <template #userinfotype="{ record }">
@@ -27,13 +16,8 @@
       </template>
     </a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="handleBtn(selectedRow)"> </contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"> </component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handleBtn(selectedRow)"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
   </div>
 </template>
 
@@ -47,52 +31,52 @@ import Filter from '../../compoments/filter/index.vue';
 import { handleTableStatus, inOrOutStatus } from '../../setup';
 
 export default defineComponent({
-    name: 'platinum_withdrawal_review_tab',
-    components: {
-        Filter,
-        contextMenu,
-        MtpTableButton,
-        detail: defineAsyncComponent(() => import('./compoments/detail/index.vue')), // 详情
-        review_confirm: defineAsyncComponent(() => import('./compoments/withdrawal/index.vue')), // 确认提现
-        review_refuse: defineAsyncComponent(() => import('./compoments/refuse/index.vue')), // 审核拒绝
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QhjAccountOutInApply>();
-        // 状态
-        const { tableStatus, getTableListStatus, search } = handleTableStatus(queryTable, 1);
+  name: 'platinum_withdrawal_review_tab',
+  components: {
+    Filter,
+    contextMenu,
+    MtpTableButton,
+    detail: defineAsyncComponent(() => import('./compoments/detail/index.vue')), // 详情
+    review_confirm: defineAsyncComponent(() => import('./compoments/withdrawal/index.vue')), // 确认提现
+    review_refuse: defineAsyncComponent(() => import('./compoments/refuse/index.vue')), // 审核拒绝
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QhjAccountOutInApply>();
+    // 状态
+    const { tableStatus, getTableListStatus, search } = handleTableStatus(queryTable, 1);
 
-        const queryTableAction = () => {
-            queryTable(queryAccountInOutApply, { querytype: 1, applystatus: tableStatus.value });
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.plan_audit,
-            tableName: 'table_pcweb_qhj_withdrawal_review',
-            tableFilterKey: [],
-            isDetail: true,
-        };
+    const queryTableAction = () => {
+      queryTable(queryAccountInOutApply, { querytype: 1, applystatus: tableStatus.value });
+    };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.plan_audit,
+      tableName: 'table_pcweb_qhj_withdrawal_review',
+      tableFilterKey: [],
+      isDetail: true,
+    };
 
-        function handleBtn(record: QhjAccountOutInApply) {
-            if (!record) return;
-            const buttons = getTableButton();
-            if (tableStatus.value === inOrOutStatus.wait) {
-                return buttons;
-            } else {
-                return buttons.filter((e) => e.code === 'detail');
-            }
-        }
+    function handleBtn(record: QhjAccountOutInApply) {
+      if (!record) return;
+      const buttons = getTableButton();
+      if (tableStatus.value === inOrOutStatus.wait) {
+        return buttons;
+      } else {
+        return buttons.filter((e) => e.code === 'detail');
+      }
+    }
 
-        return {
-            ...handleComposeTable<QhjAccountOutInApply>(param),
-            loading,
-            handleBtn,
-            getTableListStatus,
-            search,
-            tableList,
-            queryTable,
-        };
-    },
+    return {
+      ...handleComposeTable<QhjAccountOutInApply>(param),
+      loading,
+      handleBtn,
+      getTableListStatus,
+      search,
+      tableList,
+      queryTable,
+    };
+  },
 });
 </script>

+ 2 - 2
src/views/report/exposure-report/list/exposure_report/index.vue

@@ -2,10 +2,10 @@
   <!-- 敞口报表 -->
   <div class="table-detail-container table-height" :loading="loading">
     <Filter @update="search" @filter="updateColumn"></Filter>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList"> </a-table>
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"> </a-table>
     <!-- 明细 -->
     <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
-      <a-table :columns="columnsDetail" class="topTable" :pagination="false" rowKey="key" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
         <!-- 合同类型 -->
         <template #contracttype="{ text }">
           <a>{{ getContractTypeName(text) }}</a>

+ 92 - 108
src/views/report/finance-report/list/finance_report_finance/index.vue

@@ -1,27 +1,11 @@
 <template>
   <!-- 财务报表 -->
-  <div class="table-detail-container table-height"
-       :loading="loading">
+  <div class="table-detail-container table-height" :loading="loading">
     <Filter @update="search"></Filter>
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"> </a-table>
+    <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"> </a-table>
     <!-- 明细 -->
-    <Description v-if="visible"
-                 @close="closeDrawer"
-                 @changeTab="changeTab"
-                 :tabList="tabList">
-      <a-table :columns="columnsDetail"
-               class="topTable"
-               :pagination="false"
-               rowKey="key"
-               :data-source="detailTableList"
-               :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"> </a-table>
+    <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"> </a-table>
     </Description>
   </div>
 </template>
@@ -42,97 +26,97 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getTableButton } from '@/common/setup/table/button';
 
 export default defineComponent({
-    name: 'finance-report',
-    components: {
-        Filter,
-        Description,
-    },
-    setup() {
-        let cycletime = '';
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3FinanceReport>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const { getInitTime, getInitType } = handleInitTypeAndTime();
-            cycletime = getInitTime();
-            const param: FinanceReportReq = {
-                cycletype: getInitType(),
-                cycletime,
-                querytype: 1,
-            };
-            // 获取列表数据
-            queryTable(qryFinanceReport, param);
-        };
-        const param: ComposeTableDetailParam = {
-            queryFn: queryTableAction, // 查询表格数据
-            tableName: 'table_pcweb_finance_report', // 表头key
-            tableFilterKey: [], // 表格过滤字段
-            menuType: EnumRouterName.finance_report_finance, // 当前tab页对应的code
-        };
-        const {
-            visible,
-            closeDrawer, // 控制 drawer 组件是否显示
-            columns,
-            updateColumn, //  表头数据
-            columnsDetail,
-            registerColumnDetail,
-            detailTableList, // 明细表头数据
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格事件
-        } = handleComposeTable_detail<Ermcp3FinanceReport>(param);
-        const chaceSearchValue = ref<TypeAndTime>();
+  name: 'finance-report',
+  components: {
+    Filter,
+    Description,
+  },
+  setup() {
+    let cycletime = '';
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3FinanceReport>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const { getInitTime, getInitType } = handleInitTypeAndTime();
+      cycletime = getInitTime();
+      const param: FinanceReportReq = {
+        cycletype: getInitType(),
+        cycletime,
+        querytype: 1,
+      };
+      // 获取列表数据
+      queryTable(qryFinanceReport, param);
+    };
+    const param: ComposeTableDetailParam = {
+      queryFn: queryTableAction, // 查询表格数据
+      tableName: 'table_pcweb_finance_report', // 表头key
+      tableFilterKey: [], // 表格过滤字段
+      menuType: EnumRouterName.finance_report_finance, // 当前tab页对应的code
+    };
+    const {
+      visible,
+      closeDrawer, // 控制 drawer 组件是否显示
+      columns,
+      updateColumn, //  表头数据
+      columnsDetail,
+      registerColumnDetail,
+      detailTableList, // 明细表头数据
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格事件
+    } = handleComposeTable_detail<Ermcp3FinanceReport>(param);
+    const chaceSearchValue = ref<TypeAndTime>();
 
-        // 底部明细标签
-        const tabList = getTableButton();
+    // 底部明细标签
+    const tabList = getTableButton();
 
-        // 切换明细
-        function changeTab(index: number, current: TabList) {
-            const { code, lable } = current;
-            const data = selectedRow.value as Ermcp3FinanceReport;
-            const { cycletype, currencyid } = data;
-            const param: FinanceReportReq = {
-                querytype: 2,
-                cycletype,
-                cycletime,
-                currencyid,
-                sumfields: '2',
-                userid: chaceSearchValue.value?.userid,
-            };
-            if (code === 'finance_report_finance_category_breakdown') {
-                // 品类明细
-                // 注册表头
-                registerColumnDetail('table_pcweb_financial_statement_category_breakdown', []);
-                param.sumfields = '1,2';
-            } else if (code === 'finance_report_finance_brand_details') {
-                // 品牌明细
-                // 注册表头
-                registerColumnDetail('table_pcweb_financial_statement_brand_details', []);
-                param.sumfields = '1,2,3';
-            } else {
-                console.error(`${lable}没有配置对应的code: ${code},`);
-                return;
-            }
-            // 查询明细数据
-            queryResultLoadingAndInfo(qryFinanceReport, loading, param).then((res) => {
-                detailTableList.value = res;
-            });
-        }
-        watchEffect(() => {
-            if (visible.value) {
-                if (tabList.length) {
-                    changeTab(0, tabList[0]);
-                }
-            }
-        });
-        function search(value: TypeAndTime) {
-            chaceSearchValue.value = value;
-            cycletime = value.cycletime;
-            const obj = Object.assign(value, { querytype: 1 });
-            queryTable(qryFinanceReport, obj);
+    // 切换明细
+    function changeTab(index: number, current: TabList) {
+      const { code, lable } = current;
+      const data = selectedRow.value as Ermcp3FinanceReport;
+      const { cycletype, currencyid } = data;
+      const param: FinanceReportReq = {
+        querytype: 2,
+        cycletype,
+        cycletime,
+        currencyid,
+        sumfields: '2',
+        userid: chaceSearchValue.value?.userid,
+      };
+      if (code === 'finance_report_finance_category_breakdown') {
+        // 品类明细
+        // 注册表头
+        registerColumnDetail('table_pcweb_financial_statement_category_breakdown', []);
+        param.sumfields = '1,2';
+      } else if (code === 'finance_report_finance_brand_details') {
+        // 品牌明细
+        // 注册表头
+        registerColumnDetail('table_pcweb_financial_statement_brand_details', []);
+        param.sumfields = '1,2,3';
+      } else {
+        console.error(`${lable}没有配置对应的code: ${code},`);
+        return;
+      }
+      // 查询明细数据
+      queryResultLoadingAndInfo(qryFinanceReport, loading, param).then((res) => {
+        detailTableList.value = res;
+      });
+    }
+    watchEffect(() => {
+      if (visible.value) {
+        if (tabList.length) {
+          changeTab(0, tabList[0]);
         }
+      }
+    });
+    function search(value: TypeAndTime) {
+      chaceSearchValue.value = value;
+      cycletime = value.cycletime;
+      const obj = Object.assign(value, { querytype: 1 });
+      queryTable(qryFinanceReport, obj);
+    }
 
-        return { loading, tableList, visible, closeDrawer, columns, updateColumn, search, columnsDetail, detailTableList, expandedRowKeys, selectedRow, Rowclick, tabList, changeTab };
-    },
+    return { loading, tableList, visible, closeDrawer, columns, updateColumn, search, columnsDetail, detailTableList, expandedRowKeys, selectedRow, Rowclick, tabList, changeTab };
+  },
 });
 </script>

+ 2 - 2
src/views/report/future_report/list/future_report/index.vue

@@ -2,7 +2,7 @@
   <!-- 期货报表 -->
   <div class="table-detail-container table-height" :loading="loading">
     <Filter @update="search"></Filter>
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <!-- 持仓方向 -->
       <template #buyorsell="{ record }">
         <a>{{ record.buyorsell === 1 ? '卖出' : '买入' }}</a>
@@ -10,7 +10,7 @@
     </a-table>
     <!-- 明细 -->
     <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
-      <a-table :columns="columnsDetail" class="topTable" :pagination="false" rowKey="key" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
         <!-- 持仓方向 -->
         <template #buyorsell="{ record }">
           <a>{{ record.buyorsell === 1 ? '卖出' : '买入' }}</a>

+ 98 - 115
src/views/report/inventory-report/list/category/index.vue

@@ -1,28 +1,11 @@
 <template>
   <!-- 库存报表(品类) -->
-  <div class="table-detail-container table-height"
-       :loading="loading">
-    <Filter @update="search"
-            @filter="updateColumn"></Filter>
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList"> </a-table>
+  <div class="table-detail-container table-height" :loading="loading">
+    <Filter @update="search" @filter="updateColumn"></Filter>
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"> </a-table>
     <!-- 明细 -->
-    <Description v-if="visible"
-                 @close="closeDrawer"
-                 @changeTab="changeTab"
-                 :tabList="tabList">
-      <a-table :columns="columnsDetail"
-               class="topTable"
-               :pagination="false"
-               rowKey="key"
-               :data-source="detailTableList"
-               :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"> </a-table>
+    <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"> </a-table>
     </Description>
   </div>
 </template>
@@ -43,104 +26,104 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getTableButton } from '@/common/setup/table/button';
 
 export default defineComponent({
-    name: 'inventory_report_inventory_category',
-    components: {
-        Filter,
-        Description,
-    },
-    setup() {
-        let cycletime = '';
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3AreaStockReport>();
-        const chaceSearchValue = ref<TypeAndTime>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const { getInitTime, getInitType } = handleInitTypeAndTime();
-            cycletime = getInitTime();
-            const param: AreaStockReportReq = {
-                cycletype: getInitType(),
-                cycletime,
-                querytype: 1,
-                sumfields: '1,2',
-            };
-            // 获取列表数据
-            queryTable(qryAreaStockReport, param);
-        };
-        const param: ComposeTableDetailParam = {
-            queryFn: queryTableAction, // 查询表格数据
-            tableName: 'table_pcweb_warehouse_category_report', // 表头key
-            tableFilterKey: ['deliverygoodsname', 'wrstandardname'], // 表格过滤字段
-            menuType: EnumRouterName.inventory_report_inventory_category, // 当前tab页对应的code
-        };
+  name: 'inventory_report_inventory_category',
+  components: {
+    Filter,
+    Description,
+  },
+  setup() {
+    let cycletime = '';
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3AreaStockReport>();
+    const chaceSearchValue = ref<TypeAndTime>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const { getInitTime, getInitType } = handleInitTypeAndTime();
+      cycletime = getInitTime();
+      const param: AreaStockReportReq = {
+        cycletype: getInitType(),
+        cycletime,
+        querytype: 1,
+        sumfields: '1,2',
+      };
+      // 获取列表数据
+      queryTable(qryAreaStockReport, param);
+    };
+    const param: ComposeTableDetailParam = {
+      queryFn: queryTableAction, // 查询表格数据
+      tableName: 'table_pcweb_warehouse_category_report', // 表头key
+      tableFilterKey: ['deliverygoodsname', 'wrstandardname'], // 表格过滤字段
+      menuType: EnumRouterName.inventory_report_inventory_category, // 当前tab页对应的code
+    };
 
-        const {
-            visible,
-            closeDrawer, // 控制 drawer 组件是否显示
-            columns,
-            updateColumn, //  表头数据
-            columnsDetail,
-            registerColumnDetail,
-            detailTableList, // 明细表头数据
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格事件
-        } = handleComposeTable_detail<Ermcp3AreaStockReport>(param);
+    const {
+      visible,
+      closeDrawer, // 控制 drawer 组件是否显示
+      columns,
+      updateColumn, //  表头数据
+      columnsDetail,
+      registerColumnDetail,
+      detailTableList, // 明细表头数据
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格事件
+    } = handleComposeTable_detail<Ermcp3AreaStockReport>(param);
 
-        // 底部明细标签
-        const tabList = getTableButton();
+    // 底部明细标签
+    const tabList = getTableButton();
 
-        // 切换明细
-        function changeTab(index: number, current: TabList) {
-            const { code, lable } = current;
-            const data = selectedRow.value as Ermcp3AreaStockReport;
-            const { cycletype, deliverygoodsid, wrstandardid, spotgoodsbrandid, warehouseinfoid } = data;
+    // 切换明细
+    function changeTab(index: number, current: TabList) {
+      const { code, lable } = current;
+      const data = selectedRow.value as Ermcp3AreaStockReport;
+      const { cycletype, deliverygoodsid, wrstandardid, spotgoodsbrandid, warehouseinfoid } = data;
 
-            const param: AreaStockReportReq = {
-                querytype: 2,
-                cycletype,
-                cycletime,
-                sumfields: '1,2,3,4',
-                deliverygoodsid,
-                wrstandardid,
-                spotgoodsbrandid,
-                warehouseinfoid,
-                userid: chaceSearchValue.value?.userid,
-            };
-            if (code === 'inventory_report_inventory_category_brand_detail') {
-                // 品牌明细
-                // 注册表头
-                registerColumnDetail('table_pcweb_inventory_commodity_report_brand_details', []);
-            } else if (code === 'inventory_report_inventory_category_warehouse_detail') {
-                // 仓库明细
-                // 注册表头
-                registerColumnDetail('table_pcweb_inventory_commodity_report_warehouse_details', []);
-            } else {
-                console.error(`${lable}没有配置对应的code: ${code},`);
-                return;
-            }
-            if (param.warehouseinfoid === '--') {
-                param.warehouseinfoid = '';
-            }
-            // 查询明细数据
-            queryResultLoadingAndInfo(qryAreaStockReport, loading, param).then((res) => {
-                detailTableList.value = res;
-            });
-        }
-        watchEffect(() => {
-            if (visible.value) {
-                if (tabList.length) {
-                    changeTab(0, tabList[0]);
-                }
-            }
-        });
-        function search(value: TypeAndTime) {
-            chaceSearchValue.value = value;
-            cycletime = value.cycletime;
-            const obj = Object.assign(value, { querytype: 1, sumfields: '1,2' });
-            queryTable(qryAreaStockReport, obj);
+      const param: AreaStockReportReq = {
+        querytype: 2,
+        cycletype,
+        cycletime,
+        sumfields: '1,2,3,4',
+        deliverygoodsid,
+        wrstandardid,
+        spotgoodsbrandid,
+        warehouseinfoid,
+        userid: chaceSearchValue.value?.userid,
+      };
+      if (code === 'inventory_report_inventory_category_brand_detail') {
+        // 品牌明细
+        // 注册表头
+        registerColumnDetail('table_pcweb_inventory_commodity_report_brand_details', []);
+      } else if (code === 'inventory_report_inventory_category_warehouse_detail') {
+        // 仓库明细
+        // 注册表头
+        registerColumnDetail('table_pcweb_inventory_commodity_report_warehouse_details', []);
+      } else {
+        console.error(`${lable}没有配置对应的code: ${code},`);
+        return;
+      }
+      if (param.warehouseinfoid === '--') {
+        param.warehouseinfoid = '';
+      }
+      // 查询明细数据
+      queryResultLoadingAndInfo(qryAreaStockReport, loading, param).then((res) => {
+        detailTableList.value = res;
+      });
+    }
+    watchEffect(() => {
+      if (visible.value) {
+        if (tabList.length) {
+          changeTab(0, tabList[0]);
         }
+      }
+    });
+    function search(value: TypeAndTime) {
+      chaceSearchValue.value = value;
+      cycletime = value.cycletime;
+      const obj = Object.assign(value, { querytype: 1, sumfields: '1,2' });
+      queryTable(qryAreaStockReport, obj);
+    }
 
-        return { loading, tableList, visible, closeDrawer, columns, updateColumn, search, columnsDetail, detailTableList, expandedRowKeys, selectedRow, Rowclick, tabList, changeTab };
-    },
+    return { loading, tableList, visible, closeDrawer, columns, updateColumn, search, columnsDetail, detailTableList, expandedRowKeys, selectedRow, Rowclick, tabList, changeTab };
+  },
 });
 </script>

+ 91 - 108
src/views/report/inventory-report/list/warehouse/index.vue

@@ -1,28 +1,11 @@
 <template>
   <!-- 库存报表(仓库) -->
-  <div class="table-detail-container table-height"
-       :loading="loading">
-    <Filter @update="search"
-            @filter="updateColumn"></Filter>
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList"> </a-table>
+  <div class="table-detail-container table-height" :loading="loading">
+    <Filter @update="search" @filter="updateColumn"></Filter>
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"> </a-table>
     <!-- 明细 -->
-    <Description v-if="visible"
-                 @close="closeDrawer"
-                 @changeTab="changeTab"
-                 :tabList="tabList">
-      <a-table :columns="columnsDetail"
-               class="topTable"
-               :pagination="false"
-               rowKey="key"
-               :data-source="detailTableList"
-               :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"> </a-table>
+    <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"> </a-table>
     </Description>
   </div>
 </template>
@@ -43,96 +26,96 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getTableButton } from '@/common/setup/table/button';
 
 export default defineComponent({
-    name: 'inventory_report_warehouse',
-    components: {
-        Filter,
-        Description,
-    },
-    setup() {
-        let cycletime = '';
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3AreaStockReport>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const { getInitTime, getInitType } = handleInitTypeAndTime();
-            cycletime = getInitTime();
-            const param: AreaStockReportReq = {
-                cycletype: getInitType(),
-                cycletime,
-                querytype: 1,
-                sumfields: '1,2,4',
-            };
-            // 获取列表数据
-            queryTable(qryAreaStockReport, param);
-        };
-        const param: ComposeTableDetailParam = {
-            queryFn: queryTableAction, // 查询表格数据
-            tableName: 'table_pcweb_warehouse_report', // 表头key
-            tableFilterKey: ['deliverygoodsname', 'wrstandardname'], // 表格过滤字段
-            menuType: EnumRouterName.inventory_report_warehouse, // 当前tab页对应的code
-        };
-        const {
-            visible,
-            closeDrawer, // 控制 drawer 组件是否显示
-            columns,
-            updateColumn, //  表头数据
-            columnsDetail,
-            registerColumnDetail,
-            detailTableList, // 明细表头数据
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格事件
-        } = handleComposeTable_detail<Ermcp3AreaStockReport>(param);
-        const chaceSearchValue = ref<TypeAndTime>();
+  name: 'inventory_report_warehouse',
+  components: {
+    Filter,
+    Description,
+  },
+  setup() {
+    let cycletime = '';
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3AreaStockReport>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const { getInitTime, getInitType } = handleInitTypeAndTime();
+      cycletime = getInitTime();
+      const param: AreaStockReportReq = {
+        cycletype: getInitType(),
+        cycletime,
+        querytype: 1,
+        sumfields: '1,2,4',
+      };
+      // 获取列表数据
+      queryTable(qryAreaStockReport, param);
+    };
+    const param: ComposeTableDetailParam = {
+      queryFn: queryTableAction, // 查询表格数据
+      tableName: 'table_pcweb_warehouse_report', // 表头key
+      tableFilterKey: ['deliverygoodsname', 'wrstandardname'], // 表格过滤字段
+      menuType: EnumRouterName.inventory_report_warehouse, // 当前tab页对应的code
+    };
+    const {
+      visible,
+      closeDrawer, // 控制 drawer 组件是否显示
+      columns,
+      updateColumn, //  表头数据
+      columnsDetail,
+      registerColumnDetail,
+      detailTableList, // 明细表头数据
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格事件
+    } = handleComposeTable_detail<Ermcp3AreaStockReport>(param);
+    const chaceSearchValue = ref<TypeAndTime>();
 
-        // 底部明细标签
-        const tabList = getTableButton();
+    // 底部明细标签
+    const tabList = getTableButton();
 
-        // 切换明细
-        function changeTab(index: number, current: TabList) {
-            const { code, lable } = current;
-            const data = selectedRow.value as Ermcp3AreaStockReport;
-            const { cycletype, deliverygoodsid, wrstandardid, spotgoodsbrandid, warehouseinfoid } = data;
+    // 切换明细
+    function changeTab(index: number, current: TabList) {
+      const { code, lable } = current;
+      const data = selectedRow.value as Ermcp3AreaStockReport;
+      const { cycletype, deliverygoodsid, wrstandardid, spotgoodsbrandid, warehouseinfoid } = data;
 
-            const param: AreaStockReportReq = {
-                querytype: 2,
-                cycletype,
-                cycletime,
-                sumfields: '1,2,3,4',
-                deliverygoodsid,
-                wrstandardid,
-                spotgoodsbrandid,
-                warehouseinfoid,
-                userid: chaceSearchValue.value?.userid,
-            };
-            if (code === 'warehouse_report_warehouse_detail') {
-                // 库存明细
-                // 注册表头
-                registerColumnDetail('table_pcweb_inventory_warehouse_report_warehouse_details', []);
-            } else {
-                console.error(`${lable}没有配置对应的code: ${code},`);
-                return;
-            }
-            // 查询明细数据
-            queryResultLoadingAndInfo(qryAreaStockReport, loading, param).then((res) => {
-                detailTableList.value = res;
-            });
-        }
-        watchEffect(() => {
-            if (visible.value) {
-                if (tabList.length) {
-                    changeTab(0, tabList[0]);
-                }
-            }
-        });
-        function search(value: TypeAndTime) {
-            chaceSearchValue.value = value;
-            cycletime = value.cycletime;
-            const obj = Object.assign(value, { querytype: 1, sumfields: '1,2,4' });
-            queryTable(qryAreaStockReport, obj);
+      const param: AreaStockReportReq = {
+        querytype: 2,
+        cycletype,
+        cycletime,
+        sumfields: '1,2,3,4',
+        deliverygoodsid,
+        wrstandardid,
+        spotgoodsbrandid,
+        warehouseinfoid,
+        userid: chaceSearchValue.value?.userid,
+      };
+      if (code === 'warehouse_report_warehouse_detail') {
+        // 库存明细
+        // 注册表头
+        registerColumnDetail('table_pcweb_inventory_warehouse_report_warehouse_details', []);
+      } else {
+        console.error(`${lable}没有配置对应的code: ${code},`);
+        return;
+      }
+      // 查询明细数据
+      queryResultLoadingAndInfo(qryAreaStockReport, loading, param).then((res) => {
+        detailTableList.value = res;
+      });
+    }
+    watchEffect(() => {
+      if (visible.value) {
+        if (tabList.length) {
+          changeTab(0, tabList[0]);
         }
+      }
+    });
+    function search(value: TypeAndTime) {
+      chaceSearchValue.value = value;
+      cycletime = value.cycletime;
+      const obj = Object.assign(value, { querytype: 1, sumfields: '1,2,4' });
+      queryTable(qryAreaStockReport, obj);
+    }
 
-        return { loading, tableList, visible, closeDrawer, columns, updateColumn, search, columnsDetail, detailTableList, expandedRowKeys, selectedRow, Rowclick, tabList, changeTab };
-    },
+    return { loading, tableList, visible, closeDrawer, columns, updateColumn, search, columnsDetail, detailTableList, expandedRowKeys, selectedRow, Rowclick, tabList, changeTab };
+  },
 });
 </script>

+ 101 - 120
src/views/report/spot-report/list/spot_report/index.vue

@@ -1,19 +1,8 @@
 <template>
   <!-- 现货报表 -->
-  <div class="table-detail-container table-height"
-       :loading="loading">
-    <Filter @update="search"
-            @filter="updateColumn"
-            :tableList="tableList"
-            ></Filter>
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-             :pagination="false"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
+  <div class="table-detail-container table-height" :loading="loading">
+    <Filter @update="search" @filter="updateColumn" :tableList="tableList"></Filter>
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
       <template #curaverageprice="{ record }">
         <span>{{ record.curaverageprice.toFixed(2) }}</span>
       </template>
@@ -46,16 +35,8 @@
       </template>
     </a-table>
     <!-- 明细 -->
-    <Description v-if="visible"
-                 @close="closeDrawer"
-                 @changeTab="changeTab"
-                 :tabList="tabList">
-      <a-table :columns="columnsDetail"
-               class="topTable"
-               :pagination="false"
-               rowKey="key"
-               :data-source="detailTableList"
-               :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+    <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
         <template #curaverageprice="{ record }">
           <span>{{ record.curaverageprice.toFixed(2) }}</span>
         </template>
@@ -108,105 +89,105 @@ import { getTableButton } from '@/common/setup/table/button';
 import { columns } from './setup';
 
 export default defineComponent({
-    name: 'spot-report',
-    components: {
-        Filter,
-        Description,
-    },
-    setup() {
-        let cycletime = '';
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3AreaSpotPLReport>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const { getInitTime, getInitType } = handleInitTypeAndTime();
-            cycletime = getInitTime();
-            const param: AreaSpotplReportReq = {
-                cycletype: getInitType(),
-                cycletime,
-                querytype: 1,
-            };
-            // 获取列表数据
-            queryTable(QryAreaSpotplReport, param);
-        };
-        const param: ComposeTableDetailParam = {
-            queryFn: queryTableAction, // 查询表格数据
-            tableName: 'table_pcweb_spot_report', // 表头key
-            tableFilterKey: ['deliverygoodsname', 'wrstandardname', 'brandname'], // 表格过滤字段
-            menuType: EnumRouterName.spot_report_spot, // 当前tab页对应的code
-        };
-        const {
-            visible,
-            closeDrawer, // 控制 drawer 组件是否显示
-            updateColumn, //  表头数据
-            columnsDetail,
-            registerColumnDetail,
-            detailTableList, // 明细表头数据
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格事件
-        } = handleComposeTable_detail<Ermcp3AreaSpotPLReport>(param);
-        const chaceSearchValue = ref<TypeAndTime>();
+  name: 'spot-report',
+  components: {
+    Filter,
+    Description,
+  },
+  setup() {
+    let cycletime = '';
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3AreaSpotPLReport>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const { getInitTime, getInitType } = handleInitTypeAndTime();
+      cycletime = getInitTime();
+      const param: AreaSpotplReportReq = {
+        cycletype: getInitType(),
+        cycletime,
+        querytype: 1,
+      };
+      // 获取列表数据
+      queryTable(QryAreaSpotplReport, param);
+    };
+    const param: ComposeTableDetailParam = {
+      queryFn: queryTableAction, // 查询表格数据
+      tableName: 'table_pcweb_spot_report', // 表头key
+      tableFilterKey: ['deliverygoodsname', 'wrstandardname', 'brandname'], // 表格过滤字段
+      menuType: EnumRouterName.spot_report_spot, // 当前tab页对应的code
+    };
+    const {
+      visible,
+      closeDrawer, // 控制 drawer 组件是否显示
+      updateColumn, //  表头数据
+      columnsDetail,
+      registerColumnDetail,
+      detailTableList, // 明细表头数据
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格事件
+    } = handleComposeTable_detail<Ermcp3AreaSpotPLReport>(param);
+    const chaceSearchValue = ref<TypeAndTime>();
 
-        // 底部明细标签
-        const tabList = getTableButton();
+    // 底部明细标签
+    const tabList = getTableButton();
 
-        // 切换明细
-        function changeTab(index: number, current: TabList) {
-            const { code, lable } = current;
-            const data = selectedRow.value as Ermcp3AreaSpotPLReport;
-            const { cycletype, currencyid, deliverygoodsid } = data;
-            const param: AreaSpotplReportReq = {
-                querytype: 2,
-                cycletype,
-                cycletime,
-                deliverygoodsid,
-                currencyid,
-                userid: chaceSearchValue.value?.userid,
-            };
-            if (code === 'spot_report_spot_detail') {
-                // 现货明细
-                // 注册表头
-                registerColumnDetail('table_pcweb_spot_report_details', []);
-            } else {
-                console.error(`${lable}没有配置对应的code: ${code},`);
-                return;
-            }
-            // 查询明细数据
-            queryResultLoadingAndInfo(QryAreaSpotplReport, loading, param).then((res) => {
-                detailTableList.value = res;
-            });
-        }
-        watchEffect(() => {
-            if (visible.value) {
-                if (tabList.length) {
-                    changeTab(0, tabList[0]);
-                }
-            }
-        });
-        function search(value: TypeAndTime) {
-            chaceSearchValue.value = value;
-            cycletime = value.cycletime;
-            const obj = Object.assign(value, { querytype: 1 });
-            queryTable(QryAreaSpotplReport, obj);
+    // 切换明细
+    function changeTab(index: number, current: TabList) {
+      const { code, lable } = current;
+      const data = selectedRow.value as Ermcp3AreaSpotPLReport;
+      const { cycletype, currencyid, deliverygoodsid } = data;
+      const param: AreaSpotplReportReq = {
+        querytype: 2,
+        cycletype,
+        cycletime,
+        deliverygoodsid,
+        currencyid,
+        userid: chaceSearchValue.value?.userid,
+      };
+      if (code === 'spot_report_spot_detail') {
+        // 现货明细
+        // 注册表头
+        registerColumnDetail('table_pcweb_spot_report_details', []);
+      } else {
+        console.error(`${lable}没有配置对应的code: ${code},`);
+        return;
+      }
+      // 查询明细数据
+      queryResultLoadingAndInfo(QryAreaSpotplReport, loading, param).then((res) => {
+        detailTableList.value = res;
+      });
+    }
+    watchEffect(() => {
+      if (visible.value) {
+        if (tabList.length) {
+          changeTab(0, tabList[0]);
         }
+      }
+    });
+    function search(value: TypeAndTime) {
+      chaceSearchValue.value = value;
+      cycletime = value.cycletime;
+      const obj = Object.assign(value, { querytype: 1 });
+      queryTable(QryAreaSpotplReport, obj);
+    }
 
-        return {
-            loading,
-            tableList,
-            visible,
-            closeDrawer,
-            columns,
-            updateColumn,
-            search,
-            columnsDetail,
-            detailTableList,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            tabList,
-            changeTab,
-        };
-    },
+    return {
+      loading,
+      tableList,
+      visible,
+      closeDrawer,
+      columns,
+      updateColumn,
+      search,
+      columnsDetail,
+      detailTableList,
+      expandedRowKeys,
+      selectedRow,
+      Rowclick,
+      tabList,
+      changeTab,
+    };
+  },
 });
 </script>

+ 108 - 108
src/views/report/sum_pl_report/list/sum_pl_report/index.vue

@@ -2,10 +2,10 @@
   <!-- 汇总损益报表 -->
   <div class="table-detail-container table-height" :loading="loading">
     <Filter @update="search"></Filter>
-    <a-table :columns="getColumns()" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="customRow" rowKey="key" :data-source="tableList"></a-table>
+    <a-table :columns="getColumns()" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="customRow" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
     <!-- 明细 -->
     <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
-      <a-table :columns="columnsDetail" class="topTable" :pagination="false" rowKey="key" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" :rowKey="(record,index)=>index" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
         <!-- 出现浮点失真  强行处理 * 2-->
         <template #spotactualpl="{ record }">
           <span>{{ record.spotactualpl.toFixed(2) }}</span>
@@ -44,117 +44,117 @@ import Filter from '../../components/filterTable/index.vue';
 import { getColumns } from './setup';
 
 export default defineComponent({
-    name: 'sum_pl_report',
-    components: {
-        Filter,
-        Description,
-    },
-    setup() {
-        let cycletime = '';
-        // 周期类型
-        const cycletype = ref(0);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3ArealSumPL>(true, 2);
-        // 获取列表数据
-        const queryTableAction = () => {
-            const { getInitTime, getInitType } = handleInitTypeAndTime();
-            cycletime = getInitTime();
-            const param: QryAreaSumPLReq = {
-                cycletype: getInitType(),
-                cycletime,
-                querytype: 1,
-            };
-            // 获取列表数据
-            queryTable(qryAreaSumPL, param);
-        };
-        const param: ComposeTableDetailParam = {
-            queryFn: queryTableAction, // 查询表格数据
-            tableName: 'table_pcweb_aggregate_profit_and_loss', // 表头key
-            tableFilterKey: [], // 表格过滤字段
-            menuType: EnumRouterName.sum_pl_report_sum_pl, // 当前tab页对应的code
-        };
-        const {
-            visible,
-            closeDrawer, // 控制 drawer 组件是否显示
-            updateColumn, //  表头数据
-            columnsDetail,
-            registerColumnDetail,
-            detailTableList, // 明细表头数据
-            expandedRowKeys,
-            selectedRow,
-            Rowclick, // 表格事件
-        } = handleComposeTable_detail<Ermcp3ArealSumPL>(param);
-        const chaceSearchValue = ref<TypeAndTime>();
+  name: 'sum_pl_report',
+  components: {
+    Filter,
+    Description,
+  },
+  setup() {
+    let cycletime = '';
+    // 周期类型
+    const cycletype = ref(0);
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3ArealSumPL>(true, 2);
+    // 获取列表数据
+    const queryTableAction = () => {
+      const { getInitTime, getInitType } = handleInitTypeAndTime();
+      cycletime = getInitTime();
+      const param: QryAreaSumPLReq = {
+        cycletype: getInitType(),
+        cycletime,
+        querytype: 1,
+      };
+      // 获取列表数据
+      queryTable(qryAreaSumPL, param);
+    };
+    const param: ComposeTableDetailParam = {
+      queryFn: queryTableAction, // 查询表格数据
+      tableName: 'table_pcweb_aggregate_profit_and_loss', // 表头key
+      tableFilterKey: [], // 表格过滤字段
+      menuType: EnumRouterName.sum_pl_report_sum_pl, // 当前tab页对应的code
+    };
+    const {
+      visible,
+      closeDrawer, // 控制 drawer 组件是否显示
+      updateColumn, //  表头数据
+      columnsDetail,
+      registerColumnDetail,
+      detailTableList, // 明细表头数据
+      expandedRowKeys,
+      selectedRow,
+      Rowclick, // 表格事件
+    } = handleComposeTable_detail<Ermcp3ArealSumPL>(param);
+    const chaceSearchValue = ref<TypeAndTime>();
 
-        // 底部明细标签
-        const tabList = getTableButton();
+    // 底部明细标签
+    const tabList = getTableButton();
 
-        // 自定义表格事件
-        const customRow = (record: Ermcp3ArealSumPL, index: number) => {
-            // 日报表不显示“损益明细“标签页
-            if (cycletype.value === 0) {
-                return {};
-            }
-            return Rowclick(record, index);
-        };
+    // 自定义表格事件
+    const customRow = (record: Ermcp3ArealSumPL, index: number) => {
+      // 日报表不显示“损益明细“标签页
+      if (cycletype.value === 0) {
+        return {};
+      }
+      return Rowclick(record, index);
+    };
 
-        // 切换明细
-        function changeTab(index: number, current: TabList) {
-            const { code, lable } = current;
-            const data = selectedRow.value as Ermcp3ArealSumPL;
-            const { cycletype, currencyid } = data;
-            const param: QryAreaSumPLReq = {
-                querytype: 2,
-                cycletype,
-                cycletime,
-                currencyid,
-                userid: chaceSearchValue.value?.userid,
-            };
-            if (code === 'sum_pl_report_profit_and_loss_details') {
-                // 损益明细
-                // 注册表头
-                registerColumnDetail('table_pcweb_inventory_summary_profit_and_loss_details', []);
-            } else {
-                console.error(`${lable}没有配置对应的code: ${code},`);
-                return;
-            }
-            // 查询明细数据
-            queryResultLoadingAndInfo(qryAreaSumPL, loading, param).then((res) => {
-                detailTableList.value = res;
-            });
+    // 切换明细
+    function changeTab(index: number, current: TabList) {
+      const { code, lable } = current;
+      const data = selectedRow.value as Ermcp3ArealSumPL;
+      const { cycletype, currencyid } = data;
+      const param: QryAreaSumPLReq = {
+        querytype: 2,
+        cycletype,
+        cycletime,
+        currencyid,
+        userid: chaceSearchValue.value?.userid,
+      };
+      if (code === 'sum_pl_report_profit_and_loss_details') {
+        // 损益明细
+        // 注册表头
+        registerColumnDetail('table_pcweb_inventory_summary_profit_and_loss_details', []);
+      } else {
+        console.error(`${lable}没有配置对应的code: ${code},`);
+        return;
+      }
+      // 查询明细数据
+      queryResultLoadingAndInfo(qryAreaSumPL, loading, param).then((res) => {
+        detailTableList.value = res;
+      });
+    }
+    watchEffect(() => {
+      if (visible.value) {
+        if (tabList.length) {
+          changeTab(0, tabList[0]);
         }
-        watchEffect(() => {
-            if (visible.value) {
-                if (tabList.length) {
-                    changeTab(0, tabList[0]);
-                }
-            }
-        });
+      }
+    });
 
-        function search(value: TypeAndTime) {
-            cycletype.value = value.cycletype;
-            chaceSearchValue.value = value;
-            cycletime = value.cycletime;
-            const obj = Object.assign(value, { querytype: 1 });
-            queryTable(qryAreaSumPL, obj);
-        }
+    function search(value: TypeAndTime) {
+      cycletype.value = value.cycletype;
+      chaceSearchValue.value = value;
+      cycletime = value.cycletime;
+      const obj = Object.assign(value, { querytype: 1 });
+      queryTable(qryAreaSumPL, obj);
+    }
 
-        return {
-            loading,
-            tableList,
-            visible,
-            closeDrawer,
-            getColumns,
-            updateColumn,
-            search,
-            columnsDetail,
-            detailTableList,
-            expandedRowKeys,
-            selectedRow,
-            customRow,
-            tabList,
-            changeTab,
-        };
-    },
+    return {
+      loading,
+      tableList,
+      visible,
+      closeDrawer,
+      getColumns,
+      updateColumn,
+      search,
+      columnsDetail,
+      detailTableList,
+      expandedRowKeys,
+      selectedRow,
+      customRow,
+      tabList,
+      changeTab,
+    };
+  },
 });
 </script>

+ 43 - 52
src/views/search/inventory/list/inventory_applyrecord/index.vue

@@ -1,19 +1,11 @@
 <template>
   <!-- 库存查询: 申请记录-->
-  <div class="inventory_current"
-       :loading="loading">
+  <div class="inventory_current" :loading="loading">
     <Filter @search="updateColumn">
       <BtnList :btnList="firstBtn" />
     </Filter>
     <contextMenu :contextMenuList="secondBtn">
-      <a-table :columns="columns"
-               class="srcollYTable"
-               :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-               :pagination="false"
-               rowKey="key"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               :data-source="tableList">
+      <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :rowKey="(record,index)=>index" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList">
         <!-- 额外的展开行 -->
         <!-- <template #expandedRowRender="{  }">
           <BtnList :btnList="secondBtn" />
@@ -41,8 +33,7 @@
       </a-table>
     </contextMenu>
     <!-- 现货合同: 审核 -->
-    <Add :selectedRow="selectedRow"
-         @refresh="queryTable" />
+    <Add :selectedRow="selectedRow" @refresh="queryTable" />
   </div>
 </template>
 
@@ -55,49 +46,49 @@ import { getApplyStatusName, getBizTypeName, getContractStatusName, getContractT
 import { Ermcp3AreaStockApply, queryTableList } from './setup';
 
 export default defineComponent({
-    name: 'inventory_current',
-    components: {
-        Filter,
-        contextMenu,
-        Add,
-        BtnList,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3AreaStockApply>({});
-        // 表格操作按钮列表
-        const [firstBtn, secondBtn] = _getBtnList('inventory_applyrecord', false).value;
+  name: 'inventory_current',
+  components: {
+    Filter,
+    contextMenu,
+    Add,
+    BtnList,
+  },
+  setup() {
+    // 表头数据
+    const { columns, registerColumn, updateColumn } = getTableColumns();
+    // 表格事件
+    const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3AreaStockApply>({});
+    // 表格操作按钮列表
+    const [firstBtn, secondBtn] = _getBtnList('inventory_applyrecord', false).value;
 
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList();
 
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_application_record', ['deliverygoodsid', 'wrstandardid', 'spotgoodsbrandid', 'warehouseinfoid']);
-        });
-        return {
-            columns,
+    initData(() => {
+      // 获取列表数据
+      queryTable();
+      // 注册表头信息 过滤
+      registerColumn('table_pcweb_application_record', ['deliverygoodsid', 'wrstandardid', 'spotgoodsbrandid', 'warehouseinfoid']);
+    });
+    return {
+      columns,
 
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            firstBtn,
-            secondBtn,
-            loading,
-            tableList,
-            updateColumn,
-            queryTable,
-            getBizTypeName,
-            getPriceTypeName,
-            getContractStatusName,
-            getContractTypeName,
-            getApplyStatusName,
-        };
-    },
+      expandedRowKeys,
+      selectedRow,
+      Rowclick,
+      firstBtn,
+      secondBtn,
+      loading,
+      tableList,
+      updateColumn,
+      queryTable,
+      getBizTypeName,
+      getPriceTypeName,
+      getContractStatusName,
+      getContractTypeName,
+      getApplyStatusName,
+    };
+  },
 });
 </script>
 

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels