Browse Source

迁移 现货仓单 功能

huangbin 3 năm trước cách đây
mục cha
commit
0d8def7362
65 tập tin đã thay đổi với 3708 bổ sung2953 xóa
  1. 76 72
      src/common/components/drawer/index.vue
  2. 47 44
      src/common/components/friends/index.vue
  3. 2 2
      src/services/go/Tjmd/index.ts
  4. 4 1
      src/views/market/futures/compoments/futures-trade/interface.ts
  5. 68 53
      src/views/market/futures/index.vue
  6. 355 351
      src/views/market/market-spot/components/buy-sell-market/components/financing_delisting/index.vue
  7. 107 101
      src/views/market/market-spot/components/designate-buy/index.vue
  8. 1 1
      src/views/market/market-spot/components/designate-delisting/setup.ts
  9. 4 3
      src/views/market/market-spot/components/designate-post-buying/index.vue
  10. 98 92
      src/views/market/market-spot/components/designate-sell/index.vue
  11. 5 5
      src/views/market/market-spot/components/goods-chart/chart/index.vue
  12. 182 116
      src/views/market/market-spot/goods-chart/chart/index.vue
  13. 98 3
      src/views/market/market-spot/setup.ts
  14. 1 1
      src/views/market/market-spot/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/index.vue
  15. 1 1
      src/views/market/market-spot/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/index.vue
  16. 23 21
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_blocs/components/buy/index.vue
  17. 363 360
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/index.vue
  18. 1 1
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/setup.ts
  19. 11 24
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_blocs/components/post-buying/index.vue
  20. 94 92
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_blocs/components/sell/index.vue
  21. 22 20
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_designate/components/buy/index.vue
  22. 363 360
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_designate/components/delisting/index.vue
  23. 1 1
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_designate/components/delisting/setup.ts
  24. 4 3
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_designate/components/post-buying/index.vue
  25. 22 20
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_designate/components/sell/index.vue
  26. 25 26
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_floating_price/index.vue
  27. 25 25
      src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_price/index.vue
  28. 98 92
      src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/buy/index.vue
  29. 1 1
      src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/delisting/setup.ts
  30. 20 18
      src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/post-buying/index.vue
  31. 26 20
      src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/sell/index.vue
  32. 26 20
      src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_designate/components/buy/index.vue
  33. 1 1
      src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_designate/components/delisting/setup.ts
  34. 4 3
      src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_designate/components/post-buying/index.vue
  35. 26 20
      src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_designate/components/sell/index.vue
  36. 1 1
      src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue
  37. 1 1
      src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_price/index.vue
  38. 162 29
      src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/index.vue
  39. 140 120
      src/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue
  40. 83 62
      src/views/order/spot_warran/components/spot_warrant_bargain/index.vue
  41. 1 1
      src/views/order/spot_warran/components/spot_warrant_bargain/setup.ts
  42. 71 54
      src/views/order/spot_warran/components/spot_warrant_deal/index.vue
  43. 46 30
      src/views/order/spot_warran/components/spot_warrant_designated_deal/index.vue
  44. 4 3
      src/views/order/spot_warran/components/spot_warrant_in_and_out_warehouse/components/cancel/index.vue
  45. 4 3
      src/views/order/spot_warran/components/spot_warrant_in_and_out_warehouse/components/pick_up/index.vue
  46. 61 42
      src/views/order/spot_warran/components/spot_warrant_in_and_out_warehouse/index.vue
  47. 26 6
      src/views/order/spot_warran/components/spot_warrant_inventory_summary/components/listing/index.vue
  48. 61 39
      src/views/order/spot_warran/components/spot_warrant_inventory_summary/index.vue
  49. 3 4
      src/views/order/spot_warran/components/spot_warrant_pending_order/components/cancle/index.vue
  50. 1 1
      src/views/order/spot_warran/components/spot_warrant_pending_order/components/detail/index.vue
  51. 72 55
      src/views/order/spot_warran/components/spot_warrant_pending_order/index.vue
  52. 406 351
      src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/index.vue
  53. 1 0
      src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/interface.ts
  54. 36 3
      src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/setup.ts
  55. 103 69
      src/views/order/spot_warran/components/spot_warrant_spot_details/components/pick_up/index.vue
  56. 46 29
      src/views/order/spot_warran/components/spot_warrant_spot_details/index.vue
  57. 1 1
      src/views/order/spot_warran/components/spot_warrant_spot_summary/components/index.vue
  58. 60 38
      src/views/order/spot_warran/components/spot_warrant_spot_summary/index.vue
  59. 41 25
      src/views/order/spot_warran/index.vue
  60. 12 2
      src/views/search/search_document_records/search_commodity_contract/search_document_records_commission_record/index.vue
  61. 12 2
      src/views/search/search_document_records/search_commodity_contract/search_document_records_contract_summary/index.vue
  62. 12 2
      src/views/search/search_document_records/search_commodity_contract/search_document_records_delivery_record/index.vue
  63. 12 2
      src/views/search/search_document_records/search_commodity_contract/search_document_records_transaction_record/index.vue
  64. 12 2
      src/views/search/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_protocol_specified_record/index.vue
  65. 12 2
      src/views/search/search_document_records/search_spot_warrant/search_spot_warrant_protocol_specified_record/index.vue

+ 76 - 72
src/common/components/drawer/index.vue

@@ -1,80 +1,83 @@
 <template>
-  <a-drawer placement="right" :closable="false" :visible="visible" :destroyOnClose="true" class="bottomListed" height="405px">
-    <!-- 摘牌是top  挂牌是bottom 期货交易是tradeDialog -->
-    <div class="collapse" @click="cancel">
-      <DoubleRightOutlined />
-    </div>
-    <div class="collapseCont">
-      <div class="title">{{ title }}</div>
-      <div class="content highContent">
-        <!-- <Listed></Listed> -->
-        <!-- <Delisting></Delisting> -->
-        <slot></slot>
-        <!-- <Trade></Trade> -->
-      </div>
-    </div>
-
-    <div class="gpDetail" style="display: none">
-      <div class="title">挂牌详情</div>
-      <div class="content">
-        <div class="item">
-          <div class="left">交易账户</div>
-          <div class="right">3237545143</div>
-        </div>
-        <div class="item">
-          <div class="left">挂牌方式</div>
-          <div class="right">贸易圈</div>
-        </div>
-        <div class="item">
-          <div class="left">挂牌价格</div>
-          <div class="right">
-            <span>1680.00</span>
-            <span class="grey">(可议价)</span>
-          </div>
-        </div>
-        <div class="item">
-          <div class="left">现货仓单</div>
-          <div class="right">335999666555222222</div>
-        </div>
-        <div class="item">
-          <div class="left">挂牌数量</div>
-          <div class="right">
-            <span>30吨</span>
-            <span class="grey">整单</span>
-          </div>
+    <a-drawer
+        placement="right"
+        :closable="false"
+        :visible="visible"
+        :destroyOnClose="true"
+        class="bottomListed"
+        height="405px"
+    >
+        <!-- 摘牌是top  挂牌是bottom 期货交易是tradeDialog -->
+        <div class="collapse" @click="cancel">
+            <DoubleRightOutlined />
         </div>
-        <div class="item">
-          <div class="left">起摘数量</div>
-          <div class="right">2吨</div>
+        <div class="collapseCont">
+            <div class="title">{{ title }}</div>
+            <div class="content highContent">
+                <slot></slot>
+            </div>
         </div>
-        <div class="someItems">1000 江**业、1201 *融、1123 南**业、1000 江**业、1201 *融、1123 南**业、1000 江**业、1201 *融、1123 南**业</div>
-        <div class="item">
-          <div class="left">现货仓单</div>
-          <div class="right">335999666555222222</div>
-        </div>
-        <div class="item">
-          <div class="left">指定朋友</div>
-          <div class="right">1000 江**业、1201 *融、1123 南...</div>
-        </div>
-        <div class="item">
-          <div class="left">挂牌金额</div>
-          <div class="right">50400.00</div>
-        </div>
-        <div class="item">
-          <div class="left">履约保证金</div>
-          <div class="right">5040.00</div>
+
+        <div class="gpDetail" style="display: none">
+            <div class="title">挂牌详情</div>
+            <div class="content">
+                <div class="item">
+                    <div class="left">交易账户</div>
+                    <div class="right">3237545143</div>
+                </div>
+                <div class="item">
+                    <div class="left">挂牌方式</div>
+                    <div class="right">贸易圈</div>
+                </div>
+                <div class="item">
+                    <div class="left">挂牌价格</div>
+                    <div class="right">
+                        <span>1680.00</span>
+                        <span class="grey">(可议价)</span>
+                    </div>
+                </div>
+                <div class="item">
+                    <div class="left">现货仓单</div>
+                    <div class="right">335999666555222222</div>
+                </div>
+                <div class="item">
+                    <div class="left">挂牌数量</div>
+                    <div class="right">
+                        <span>30吨</span>
+                        <span class="grey">整单</span>
+                    </div>
+                </div>
+                <div class="item">
+                    <div class="left">起摘数量</div>
+                    <div class="right">2吨</div>
+                </div>
+                <div
+                    class="someItems"
+                >1000 江**业、1201 *融、1123 南**业、1000 江**业、1201 *融、1123 南**业、1000 江**业、1201 *融、1123 南**业</div>
+                <div class="item">
+                    <div class="left">现货仓单</div>
+                    <div class="right">335999666555222222</div>
+                </div>
+                <div class="item">
+                    <div class="left">指定朋友</div>
+                    <div class="right">1000 江**业、1201 *融、1123 南...</div>
+                </div>
+                <div class="item">
+                    <div class="left">挂牌金额</div>
+                    <div class="right">50400.00</div>
+                </div>
+                <div class="item">
+                    <div class="left">履约保证金</div>
+                    <div class="right">5040.00</div>
+                </div>
+            </div>
         </div>
-      </div>
-    </div>
-  </a-drawer>
+    </a-drawer>
 </template>
 
 <script lang="ts">
 import { defineComponent, ref, PropType } from 'vue';
 import { closeModal, ModalName } from '@/common/setup/modal/index';
-import Listed from '@/views/market/warehouseTrade/components/listed/index.vue';
-import Delisting from '@/views/market/warehouseTrade/components/delisting/index.vue';
-import Trade from '@/views/market/warehouseTrade/components/trade/index.vue';
 import { _closeModal } from '@/common/setup/modal/modal';
 import { DoubleRightOutlined } from '@ant-design/icons-vue';
 
@@ -101,9 +104,6 @@ export default defineComponent({
         },
     },
     components: {
-        Listed,
-        Delisting,
-        Trade,
         DoubleRightOutlined,
     },
     setup(props, context) {
@@ -430,7 +430,11 @@ export default defineComponent({
                             height: 38px;
                             line-height: 38px;
                             text-align: center;
-                            background: linear-gradient(0deg, @m-blue4, @m-blue5);
+                            background: linear-gradient(
+                                0deg,
+                                @m-blue4,
+                                @m-blue5
+                            );
                             font-size: 16px;
                             color: @m-white10;
                             // border-bottom: 2px solid @m-blue0;

+ 47 - 44
src/common/components/friends/index.vue

@@ -1,48 +1,51 @@
 <template>
-  <!--选择朋友-->
-  <Drawer :title="'选择朋友'"
-          :placement="'right'"
-          :visible="visible"
-          @cancel="cancel"
-          :class="[position === 'top' ? 'top486' : 'delistingBottom']">
-    <a-spin :spinning="loading">
-      <div class="listed">
-        <a-form class="inlineForm dialogForm">
-          <a-input-search placeholder="搜索朋友编码或名称"
-                          class="searchFriendInput noSuffixInput"
-                          enter-button
-                          v-model:value="searchValue">
-            <template #prefix>
-              <SearchOutlined />
-            </template>
-          </a-input-search>
-          <div class="formBar ant-checkbox-group commonCheckboxGroup whitebgCheckbox">
-            <!-- <a-checkbox-group class="commonCheckboxGroup"> -->
-            <div class="ant-checkbox-wrapper"
-                 style="width: 100%">
-              <div class="item"
-                   v-for="(item, index) in getViewFriends()"
-                   :key="index + '11'">
-                <a-checkbox v-model:checked="item.checked">
-                  <span class="txt">{{item.frienduserid}} {{ item.friendname }}</span>
-                </a-checkbox>
-              </div>
+    <!--选择朋友-->
+    <Drawer
+        :title="'选择朋友'"
+        :placement="'right'"
+        :visible="visible"
+        @cancel="cancel"
+        :class="[position === 'top' ? 'top486' : 'delistingBottom']"
+    >
+        <a-spin :spinning="loading">
+            <div class="listed">
+                <a-form class="inlineForm dialogForm">
+                    <a-input-search
+                        placeholder="搜索朋友编码或名称"
+                        class="searchFriendInput noSuffixInput"
+                        enter-button
+                        v-model:value="searchValue"
+                    >
+                        <template #prefix>
+                            <SearchOutlined />
+                        </template>
+                    </a-input-search>
+                    <div class="formBar ant-checkbox-group commonCheckboxGroup whitebgCheckbox">
+                        <!-- <a-checkbox-group class="commonCheckboxGroup"> -->
+                        <div class="ant-checkbox-wrapper" style="width: 100%">
+                            <div
+                                class="item"
+                                v-for="(item, index) in getViewFriends()"
+                                :key="index + '11'"
+                            >
+                                <a-checkbox v-model:checked="item.checked">
+                                    <span class="txt">{{ item.frienduserid }} {{ item.friendname }}</span>
+                                </a-checkbox>
+                            </div>
+                        </div>
+                        <!-- </a-checkbox-group> -->
+                    </div>
+                    <a-row :gutter="24">
+                        <a-col :span="24" class="fixedBtns">
+                            <a-form-item class="btnCenter">
+                                <a-button class="listedBtn" @click="submit">确定</a-button>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
+                </a-form>
             </div>
-            <!-- </a-checkbox-group> -->
-          </div>
-          <a-row :gutter="24">
-            <a-col :span="24"
-                   class="fixedBtns">
-              <a-form-item class="btnCenter">
-                <a-button class="listedBtn"
-                          @click="submit">确定</a-button>
-              </a-form-item>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
-    </a-spin>
-  </Drawer>
+        </a-spin>
+    </Drawer>
 </template>
 
 <script lang="ts">
@@ -52,7 +55,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 import Drawer from '@/common/components/drawer/index.vue';
 import { PlusOutlined, MinusOutlined, SearchOutlined } from '@ant-design/icons-vue';
 import { QueryWrFriendApplyRsp } from '@/services/go/wrtrade/interface';
-import { TempWrOrderQuoteDetail } from '@/views/market/spot_trade/components/post_buying/interface';
+import { TempWrOrderQuoteDetail } from '@/views/market/market-spot/components/post_buying/interface';
 import { queryQueryWrFriend } from '@/services/go/wrtrade';
 import { message } from 'ant-design-vue';
 

+ 2 - 2
src/services/go/Tjmd/index.ts

@@ -42,11 +42,11 @@ export function queryTjmdTransferApply(req: type.QueryTjmdTransferApplyReq): Pro
 /**
  * 查询市场板块  /Tjmd/QueryTjmdMarketSection
  */
-export function queryTjmdMarketSection(): Promise<string> {
+export function queryTjmdMarketSection(): Promise<type.TjmdMarketSection[]> {
     return commonSearch_go('/Tjmd/QueryTjmdMarketSection', {}).then(res => {
         console.log('查询市场板块:  ', res)
         APP.set('marketsSection', res);
-        return 'ok'
+        return res
     }).catch((err) => {
         throw new Error(`查询市场板块 : ${err}`);
     });

+ 4 - 1
src/views/market/futures/compoments/futures-trade/interface.ts

@@ -11,7 +11,10 @@ export interface FormParam {
     DelistMinQty: number,
 }
 
+export interface WrResultItem {
+    dgfactoryitemtypeid: number; dgfactoryitemid: number
+}
 
 export interface TempTableQuoteDetail extends TableQuote {
-    wrResult: { dgfactoryitemtypeid: number; dgfactoryitemid: number }[]
+    wrResult: WrResultItem[]
 }

+ 68 - 53
src/views/market/futures/index.vue

@@ -2,9 +2,18 @@
   <!--期货-->
   <mtp-table-scroll>
     <template #default="{ scroll }">
-      <a-table :columns="getColumnsList()" class="srcollYTable" :scroll="scroll" :pagination="false" :loading="loading" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
+      <a-table
+        :columns="getColumnsList()"
+        class="srcollYTable"
+        :scroll="scroll"
+        :pagination="false"
+        :loading="loading"
+        :customRow="Rowclick"
+        :rowKey="(record, index) => index"
+        :data-source="tableList"
+      >
         <template #index="{ index }">
-          <span>{{index + 1}}</span>
+          <span>{{ index + 1 }}</span>
         </template>
       </a-table>
     </template>
@@ -14,7 +23,12 @@
   </mtp-table-scroll>
   <!-- 右键 -->
   <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>
 </template>
 
 <script lang="ts">
@@ -38,7 +52,7 @@ export default defineComponent({
     MtpTableScroll,
     ThridMenu,
     contextMenu,
-    chart: defineAsyncComponent(() => import('../spot_trade/components/goods-chart/index.vue')),
+    chart: defineAsyncComponent(() => import('../market-spot/goods-chart/index.vue')),
     trade: defineAsyncComponent(() => import('./compoments/futures-trade/index.vue')),
   },
   setup() {
@@ -90,62 +104,63 @@ export default defineComponent({
 });
 </script>
 <style lang="less">
-@import './index.less';
+@import "./index.less";
 .noData {
-    .position(absolute, 28px, 0, 0, 0);
+  .position(absolute, 28px, 0, 0, 0);
 }
 .filter-custom-table {
-    display: inline-flex;
-    align-items: center;
-    padding: 7px 0;
-    .conditionSelect:first-child {
-        margin-right: 10px;
-    }
-    .btnDeafault.ant-btn,
-    .operBtn.ant-btn {
-        height: 26px !important;
-        line-height: 26px !important;
-    }
+  display: inline-flex;
+  align-items: center;
+  padding: 7px 0;
+  .conditionSelect:first-child {
+    margin-right: 10px;
+  }
+  .btnDeafault.ant-btn,
+  .operBtn.ant-btn {
+    height: 26px !important;
+    line-height: 26px !important;
+  }
 
-    .ant-select-single:not(.ant-select-customize-input) + .ant-select-single:not(.ant-select-customize-input),
-    .ant-select + .ant-space.ant-space-vertical {
-        margin-left: 10px;
-    }
-    .ant-select-single:not(.ant-select-customize-input) {
-        .ant-select-selector {
-            height: 26px;
-            border-color: @m-grey46 !important;
-            background: @m-grey47;
-            .rounded-corners(3px);
-            .ant-select-selection-item {
-                line-height: 26px;
-            }
-            .ant-select-selection-search {
-                height: 26px;
-                .ant-select-selection-search-input {
-                    height: 26px;
-                    line-height: 27px !important;
-                }
-            }
-            .ant-select-selection-placeholder {
-                line-height: 26px;
-            }
+  .ant-select-single:not(.ant-select-customize-input)
+    + .ant-select-single:not(.ant-select-customize-input),
+  .ant-select + .ant-space.ant-space-vertical {
+    margin-left: 10px;
+  }
+  .ant-select-single:not(.ant-select-customize-input) {
+    .ant-select-selector {
+      height: 26px;
+      border-color: @m-grey46 !important;
+      background: @m-grey47;
+      .rounded-corners(3px);
+      .ant-select-selection-item {
+        line-height: 26px;
+      }
+      .ant-select-selection-search {
+        height: 26px;
+        .ant-select-selection-search-input {
+          height: 26px;
+          line-height: 27px !important;
         }
+      }
+      .ant-select-selection-placeholder {
+        line-height: 26px;
+      }
     }
+  }
 
-    .allDatePicker.ant-calendar-picker {
-        height: 26px !important;
-        border: 1px solid @m-grey46 !important;
-        .ant-calendar-picker-input.ant-input {
-            height: 26px;
-            line-height: 26px;
-            &::placeholder {
-                color: @m-grey10 !important;
-            }
-        }
-    }
-    .conditionSelect + .conditionSelect {
-        margin-left: 10px;
+  .allDatePicker.ant-calendar-picker {
+    height: 26px !important;
+    border: 1px solid @m-grey46 !important;
+    .ant-calendar-picker-input.ant-input {
+      height: 26px;
+      line-height: 26px;
+      &::placeholder {
+        color: @m-grey10 !important;
+      }
     }
+  }
+  .conditionSelect + .conditionSelect {
+    margin-left: 10px;
+  }
 }
 </style>

+ 355 - 351
src/views/market/market-spot/components/buy-sell-market/components/financing_delisting/index.vue

@@ -1,29 +1,31 @@
 <template>
   <!-- 仓单贸易&仓单预售 买/卖 摘牌 -->
-  <Drawer :title="'摘牌'"
-          :placement="'right'"
-          :visible="visible"
-          width="486px"
-          height="580px"
-          @cancel="cancel"
-          class="top">
+  <Drawer
+    :title="'摘牌'"
+    :placement="'right'"
+    :visible="visible"
+    width="486px"
+    height="580px"
+    @cancel="cancel"
+    class="top"
+  >
     <div class="delisting">
-      <a-form class="inlineForm dialogForm"
-              ref="formRef"
-              :model="formState"
-              :rules="rules">
+      <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
         <div class="formBar">
           <a-row :gutter="24">
             <a-col :span="24">
-              <a-form-item label="交易账户"
-                           name="accountid">
-                <a-select class="inlineFormSelect"
-                          style="width: 260px"
-                          v-model:value="formState.accountid"
-                          placeholder="请选择">
-                  <a-select-option v-for="item in accountList"
-                                   :value="item.accountid"
-                                   :key="item.accountid">{{item.accountid}}</a-select-option>
+              <a-form-item label="交易账户" name="accountid">
+                <a-select
+                  class="inlineFormSelect"
+                  style="width: 260px"
+                  v-model:value="formState.accountid"
+                  placeholder="请选择"
+                >
+                  <a-select-option
+                    v-for="item in accountList"
+                    :value="item.accountid"
+                    :key="item.accountid"
+                  >{{ item.accountid }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
@@ -31,39 +33,37 @@
           <a-row :gutter="24">
             <a-col :span="24">
               <a-form-item label="挂牌方">
-                <span class="white ml8">{{selectedRow.username}}</span>
+                <span class="white ml8">{{ selectedRow.username }}</span>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
             <a-col :span="24">
-              <a-form-item label="基差"
-                           v-if="isFloat()">
-                <span class="yellow ml8">{{selectedRow.pricemove}}</span>
+              <a-form-item label="基差" v-if="isFloat()">
+                <span class="yellow ml8">{{ selectedRow.pricemove }}</span>
               </a-form-item>
-              <a-form-item label="挂牌价格"
-                           v-if="!isFloat()">
-                <span class="yellow ml8">{{selectedRow.fixedprice}}</span>
+              <a-form-item label="挂牌价格" v-if="!isFloat()">
+                <span class="yellow ml8">{{ selectedRow.fixedprice }}</span>
               </a-form-item>
               <a-row :gutter="24">
                 <a-col :span="24"></a-col>
               </a-row>
               <a-form-item label="挂牌数量">
-                <span class="white ml8">{{selectedRow.orderqty}}{{selectedRow.enumdicname}}</span>
+                <span class="white ml8">{{ selectedRow.orderqty }}{{ selectedRow.enumdicname }}</span>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
-            <a-col :span="24"
-                   class="mt-10">
-              <a-form-item label="融资方案"
-                           @click="openComponent({code: 'ChooseFinance'})"
-                           name="caseId">
+            <a-col :span="24" class="mt-10">
+              <a-form-item
+                label="融资方案"
+                @click="openComponent({ code: 'ChooseFinance' })"
+                name="caseId"
+              >
                 <div class="way">
-                  <div class="left">{{formState.case ? formState.case : '请选择'}}</div>
+                  <div class="left">{{ formState.case ? formState.case : '请选择' }}</div>
                   <div class="right">
-                    <svg class="icon svg-icon"
-                         aria-hidden="true">
+                    <svg class="icon svg-icon" aria-hidden="true">
                       <use xlink:href="#icon-fangan" />
                     </svg>
                   </div>
@@ -71,77 +71,75 @@
               </a-form-item>
             </a-col>
           </a-row>
-          <a-row :gutter="24"
-                 v-if="isBuy() && isWR()">
+          <a-row :gutter="24" v-if="isBuy() && isWR()">
             <a-col :span="24">
-              <a-form-item label="现货仓单"
-                           name="LadingBillId">
-                <a-select class="inlineFormSelect"
-                          style="width: 260px"
-                          v-model:value="formState.LadingBillId"
-                          placeholder="请选择">
-                  <a-select-option v-for="item in wrHoldList"
-                                   :value="item.id"
-                                   :key="item.id">{{item.name}}</a-select-option>
+              <a-form-item label="现货仓单" name="LadingBillId">
+                <a-select
+                  class="inlineFormSelect"
+                  style="width: 260px"
+                  v-model:value="formState.LadingBillId"
+                  placeholder="请选择"
+                >
+                  <a-select-option
+                    v-for="item in wrHoldList"
+                    :value="item.id"
+                    :key="item.id"
+                  >{{ item.name }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
             <a-col :span="24">
-              <a-form-item label="摘牌数量"
-                           class="relative"
-                           name="num">
-                <a-input-number class="dialogInput yellowInput"
-                                style="width: 260px"
-                                :min="0"
-                                :max="getMaxNum()"
-                                v-model:value="formState.num" />
-                <span class="input-enumdicname-absolute">{{selectedRow.enumdicname}}</span>
-                <div class="labelTip">({{selectedRow.delistminqty}}{{selectedRow.enumdicname}}起)
-                </div>
+              <a-form-item label="摘牌数量" class="relative" name="num">
+                <a-input-number
+                  class="dialogInput yellowInput"
+                  style="width: 260px"
+                  :min="0"
+                  :max="getMaxNum()"
+                  v-model:value="formState.num"
+                />
+                <span class="input-enumdicname-absolute">{{ selectedRow.enumdicname }}</span>
+                <div class="labelTip">({{ selectedRow.delistminqty }}{{ selectedRow.enumdicname }}起)</div>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
-            <a-col :span="24"
-                   class="mt-20">
+            <a-col :span="24" class="mt-20">
               <a-form-item>
-                <a-slider :min="0"
-                          v-model:value="formState.num"
-                          :max="selectedRow.orderqty"
-                          class="formSlider"
-                          style="width: 260px;" />
+                <a-slider
+                  :min="0"
+                  v-model:value="formState.num"
+                  :max="selectedRow.orderqty"
+                  class="formSlider"
+                  style="width: 260px;"
+                />
                 <div class="unit">
                   <span>0</span>
-                  <span>{{getMaxNum()}}{{selectedRow.enumdicname}}</span>
+                  <span>{{ getMaxNum() }}{{ selectedRow.enumdicname }}</span>
                 </div>
               </a-form-item>
             </a-col>
             <a-col :span="12">&nbsp;</a-col>
           </a-row>
-          <a-col :span="24"
-                 v-if="isFloat()">
-            <a-form-item label="估算价"
-                         name="PriceMove">
-              <span class="white">{{getPrice()}}</span>
+          <a-col :span="24" v-if="isFloat()">
+            <a-form-item label="估算价" name="PriceMove">
+              <span class="white">{{ getPrice() }}</span>
             </a-form-item>
           </a-col>
           <a-row :gutter="24">
-            <a-col :span="24"
-                   class="mt-20">
+            <a-col :span="24" class="mt-20">
               <a-form-item :label="isFloat() ? '估算金额' : '摘牌金额'">
-                <span class="white ml8">{{getMoney()}}</span>
+                <span class="white ml8">{{ getMoney() }}</span>
               </a-form-item>
             </a-col>
           </a-row>
-          <a-row :gutter="24"
-                 v-if="getMargin()">
+          <a-row :gutter="24" v-if="getMargin()">
             <a-col :span="24">
               <a-form-item :label="getMargin() ? '履约保证金' : ''">
                 <!-- <a-row>
-                                <a-col :span="8">-->
-                <span class="white ml8">{{getMargin()}}</span>
+                <a-col :span="8">-->
+                <span class="white ml8">{{ getMargin() }}</span>
                 <!-- </a-col>
                                     <a-col :span="5" class="tr">
                                         <span class="grey1">可用资金</span>
@@ -151,40 +149,42 @@
                                             class="white ml8"
                                         >{{getCanUseMoney(getSelectedAccount())}}</span>
                                     </a-col>
-                                </a-row>-->
+                </a-row>-->
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
             <a-col :span="24">
               <a-form-item label="可用资金">
-                <span class="white ml8">{{getCanUseMoney(getSelectedAccount())}}</span>
+                <span class="white ml8">{{ getCanUseMoney(getSelectedAccount()) }}</span>
               </a-form-item>
             </a-col>
           </a-row>
         </div>
         <a-row :gutter="24">
-          <a-col :span="24"
-                 class="fixedBtns">
+          <a-col :span="24" class="fixedBtns">
             <a-form-item class="btnCenter">
-              <a-button class="listedBtn"
-                        :loading="loading"
-                        :disabled="loading"
-                        @click="submit">{{isBuy() ? '卖出' : '买入'}}</a-button>
-              <a-button class="ml10 cancelBtn"
-                        @click="cancel">取消</a-button>
+              <a-button
+                class="listedBtn"
+                :loading="loading"
+                :disabled="loading"
+                @click="submit"
+              >{{ isBuy() ? '卖出' : '买入' }}</a-button>
+              <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
             </a-form-item>
           </a-col>
         </a-row>
       </a-form>
     </div>
   </Drawer>
-  <component :is="componentId"
-             v-if="componentId"
-             :selectedRow="selectedRow"
-             :isFloat="isFloat()"
-             @update="choose"
-             @cancel="closeComponent"></component>
+  <component
+    :is="componentId"
+    v-if="componentId"
+    :selectedRow="selectedRow"
+    :isFloat="isFloat()"
+    @update="choose"
+    @cancel="closeComponent"
+  ></component>
 </template>
 
 <script lang="ts">
@@ -204,7 +204,7 @@ import { handleNumAndMoney, getWrPosition, selecedFinance } from './setup';
 import { handleIs } from '../../setup';
 import { getCanUseMoney } from '@/services/bus/account';
 import Bus from '@/utils/eventBus/index';
-import { ListingForm } from '@/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/interface';
+import { ListingForm } from '@/views/market/market-spot/components/buy-sell-market/components/financing_delisting/interface';
 import { HdWRDealOrderReq } from '@/services/proto/warehousetrade/interface';
 import { v4 as uuidv4 } from 'uuid';
 import moment from 'moment';
@@ -213,308 +213,312 @@ import { HdWRDealOrder } from '@/services/proto/warehousetrade';
 import { getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
 
 export default defineComponent({
-    name: ModalEnum.spot_trade_warehouse_delisting,
-    components: { Drawer, ChooseFinance: defineAsyncComponent(() => import('./components/choose-finance/index.vue')) },
-    emits: ['cancel', 'update'],
-    props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        selectedRow: {
-            type: Object as PropType<WrOrderQuoteDetail>,
-            default: {},
-        },
-        parantSelectedRow: {
-            type: Object as PropType<WrOrderQuote>,
-            default: {},
-        },
-        buyOrSell: {
-            type: Number as PropType<BuyOrSell>,
-            default: BuyOrSell.buy,
-        },
+  name: ModalEnum.spot_trade_warehouse_delisting,
+  components: { Drawer, ChooseFinance: defineAsyncComponent(() => import('./components/choose-finance/index.vue')) },
+  emits: ['cancel', 'update'],
+  props: {
+    enumName: {
+      default: '',
+      type: String as PropType<EnumRouterName>,
+    },
+    selectedRow: {
+      type: Object as PropType<WrOrderQuoteDetail>,
+      default: {},
+    },
+    parantSelectedRow: {
+      type: Object as PropType<WrOrderQuote>,
+      default: {},
+    },
+    buyOrSell: {
+      type: Number as PropType<BuyOrSell>,
+      default: BuyOrSell.buy,
     },
+  },
 
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        // 资金账号
-        const accountList = getAccountTypeList([2]);
-        const { rules, formState, formRef } = handleForm(props.selectedRow);
-        if (accountList.length) {
-            formState.accountid = accountList[0].accountid;
-        }
-        function getSelectedAccount() {
-            return accountList.find((e) => e.accountid === formState.accountid);
-        }
-        const loading = ref<boolean>(false);
-        // 判断
-        const { isWR, isBuy, isFloat } = handleIs(props.enumName, props.buyOrSell);
-        // 现货仓单
-        const { wrHoldList } = handleSpotWarrant(props.enumName, props.buyOrSell, props.parantSelectedRow, loading);
-        getWrPosition(props.enumName, props.buyOrSell, loading);
-        const { getMaxNum, getMoney, getMargin } = handleNumAndMoney(props.enumName, props.buyOrSell, props.selectedRow, props.parantSelectedRow, formState);
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context);
+    // 资金账号
+    const accountList = getAccountTypeList([2]);
+    const { rules, formState, formRef } = handleForm(props.selectedRow);
+    if (accountList.length) {
+      formState.accountid = accountList[0].accountid;
+    }
+    function getSelectedAccount() {
+      return accountList.find((e) => e.accountid === formState.accountid);
+    }
+    const loading = ref<boolean>(false);
+    // 判断
+    const { isWR, isBuy, isFloat } = handleIs(props.enumName, props.buyOrSell);
+    // 现货仓单
+    const { wrHoldList } = handleSpotWarrant(props.enumName, props.buyOrSell, props.parantSelectedRow, loading);
+    getWrPosition(props.enumName, props.buyOrSell, loading);
+    const { getMaxNum, getMoney, getMargin } = handleNumAndMoney(props.enumName, props.buyOrSell, props.selectedRow, props.parantSelectedRow, formState);
 
-        const { componentId, closeComponent, openComponent } = handleModalComponent(() => {}, ref({}));
+    const { componentId, closeComponent, openComponent } = handleModalComponent(() => { }, ref({}));
 
-        // 估算价
-        function getPrice() {
-            let result = '--';
-            const goodsPrice = getQuoteDayInfoByCodeFindPrice(props.parantSelectedRow.goodscode);
-            if (goodsPrice && goodsPrice !== '--') {
-                // 有实时行情价格
-                result = ((goodsPrice as number) + props.selectedRow.pricemove).toFixed(2);
-            }
+    // 估算价
+    function getPrice() {
+      let result = '--';
+      const goodsPrice = getQuoteDayInfoByCodeFindPrice(props.parantSelectedRow.goodscode);
+      if (goodsPrice && goodsPrice !== '--') {
+        // 有实时行情价格
+        result = ((goodsPrice as number) + props.selectedRow.pricemove).toFixed(2);
+      }
 
-            return result;
-        }
+      return result;
+    }
 
-        const show = ref<boolean>(false);
-        function showAction() {
-            show.value = !show.value;
-        }
-        function choose(item: WrFAProductDetail) {
-            selecedFinance.value = item;
-            formState.caseId = item.productdetailid;
-            formState.case = `${item.productname}-${item.username}-${item.financingdays}天-${(item.marginratio * 100).toFixed(2)}%-${item.interestratemode === 3 ? item.interestrate : (item.interestrate * 10000).toFixed(2)}${item.interestratemode === 3 ? `/${props.selectedRow.enumdicname}` : '‱'}-${item.interestsettlemode === 1 ? '按日结息' : '按月结息'}-${item.interestminlen}天起息`;
+    const show = ref<boolean>(false);
+    function showAction() {
+      show.value = !show.value;
+    }
+    function choose(item: WrFAProductDetail) {
+      selecedFinance.value = item;
+      formState.caseId = item.productdetailid;
+      formState.case = `${item.productname}-${item.username}-${item.financingdays}天-${(item.marginratio * 100).toFixed(2)}%-${item.interestratemode === 3 ? item.interestrate : (item.interestrate * 10000).toFixed(2)}${item.interestratemode === 3 ? `/${props.selectedRow.enumdicname}` : '‱'}-${item.interestsettlemode === 1 ? '按日结息' : '按月结息'}-${item.interestminlen}天起息`;
+    }
+    function submit() {
+      validateAction<ListingForm>(formRef, formState).then((res) => {
+        // 首先确定  这是仓单贸易的有仓单挂摘牌 HasWr = 1
+        // 其次判断  摘牌 1。摘买 (需要通过自己的仓单进行摘买)  2。摘卖 (不需要通过仓单)
+        const param: HdWRDealOrderReq = {
+          UserID: getUserId(), // uint32 用户ID
+          AccountID: getSelectedAccountId(), // uint64 资金账号
+          RelatedWRTradeOrderID: props.selectedRow.wrtradeorderid, // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
+          WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
+          OrderQty: res.num as number, // uint64 委托数量
+          OrderSrc: 0, // uint32 委托来源
+          ClientSerialNo: uuidv4(), // string 客户端流水号
+          ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
+          ClientType: 4, // uint32 终端类型
+          OperatorID: getUserId(), // uint64 操作员账号ID
+          BuyOrSell: 0, // uint32 买卖方向
+          ApplyID: 0, // uint64 申请ID
+          // LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
+          SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
+          WRFactorTypeId: props.parantSelectedRow.wrfactortypeid, // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
+          TradeDate: moment().format('YYYYMMDD'), // string 交易日
+          DeliveryMonth: '', // string 交收月
+          HasWr: isWR(), // uint32 是否有仓单-0:没有仓单 1:有仓单
+          IsFinancing: 1, // uint32 是否融资购买(买摘牌时有效)-0:否 1:是
+          ProductDetailID: res.caseId, // uint64 金融机构产品组合ID(融资购买时有效)
+        };
+        // 摘买方向
+        if (isBuy()) {
+          param.BuyOrSell = 1;
+          param.LadingBillId = res.LadingBillId;
+          const item = wrHoldList.value.find((el) => el.id === res.LadingBillId);
+          if (item) {
+            param.SubNum = +item.subnum;
+          }
+        } else {
+          param.BuyOrSell = 0;
         }
-        function submit() {
-            validateAction<ListingForm>(formRef, formState).then((res) => {
-                // 首先确定  这是仓单贸易的有仓单挂摘牌 HasWr = 1
-                // 其次判断  摘牌 1。摘买 (需要通过自己的仓单进行摘买)  2。摘卖 (不需要通过仓单)
-                const param: HdWRDealOrderReq = {
-                    UserID: getUserId(), // uint32 用户ID
-                    AccountID: getSelectedAccountId(), // uint64 资金账号
-                    RelatedWRTradeOrderID: props.selectedRow.wrtradeorderid, // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
-                    WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
-                    OrderQty: res.num as number, // uint64 委托数量
-                    OrderSrc: 0, // uint32 委托来源
-                    ClientSerialNo: uuidv4(), // string 客户端流水号
-                    ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
-                    ClientType: 4, // uint32 终端类型
-                    OperatorID: getUserId(), // uint64 操作员账号ID
-                    BuyOrSell: 0, // uint32 买卖方向
-                    ApplyID: 0, // uint64 申请ID
-                    // LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
-                    SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
-                    WRFactorTypeId: props.parantSelectedRow.wrfactortypeid, // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
-                    TradeDate: moment().format('YYYYMMDD'), // string 交易日
-                    DeliveryMonth: '', // string 交收月
-                    HasWr: isWR(), // uint32 是否有仓单-0:没有仓单 1:有仓单
-                    IsFinancing: 1, // uint32 是否融资购买(买摘牌时有效)-0:否 1:是
-                    ProductDetailID: res.caseId, // uint64 金融机构产品组合ID(融资购买时有效)
-                };
-                // 摘买方向
-                if (isBuy()) {
-                    param.BuyOrSell = 1;
-                    param.LadingBillId = res.LadingBillId;
-                    const item = wrHoldList.value.find((el) => el.id === res.LadingBillId);
-                    if (item) {
-                        param.SubNum = +item.subnum;
-                    }
-                } else {
-                    param.BuyOrSell = 0;
-                }
 
-                requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['融资摘牌成功', '融资摘牌失败:']).then(() => {
-                    cancel(true);
-                });
-            });
-        }
+        requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['融资摘牌成功', '融资摘牌失败:']).then(() => {
+          cancel(true);
+        });
+      });
+    }
 
-        return {
-            visible,
-            cancel,
-            choose,
-            accountList,
-            wrHoldList,
-            submit,
-            getMaxNum,
-            getMoney,
-            getMargin,
-            isBuy,
-            isFloat,
-            isWR,
-            rules,
-            formState,
-            formRef,
-            show,
-            showAction,
-            componentId,
-            closeComponent,
-            openComponent,
-            getCanUseMoney,
-            getSelectedAccount,
-            getPrice,
-        };
-    },
+    return {
+      visible,
+      cancel,
+      choose,
+      accountList,
+      wrHoldList,
+      submit,
+      getMaxNum,
+      getMoney,
+      getMargin,
+      isBuy,
+      isFloat,
+      isWR,
+      rules,
+      formState,
+      formRef,
+      show,
+      showAction,
+      componentId,
+      closeComponent,
+      openComponent,
+      getCanUseMoney,
+      getSelectedAccount,
+      getPrice,
+    };
+  },
 });
 </script>
 
 <style lang="less">
 .delisting {
+  width: 100%;
+  height: 100%;
+  .flex;
+  flex-direction: column;
+  z-index: 10;
+  overflow: hidden;
+  .condition {
     width: 100%;
+    height: 48px;
+    margin: 0 16px;
+    padding: 10px 0;
+    border-bottom: 1px solid @m-black6;
+    .inlineflex;
+    .conditionBtn {
+      align-self: center;
+      align-items: center;
+      border: 0;
+      min-width: 80px;
+      height: 28px;
+      line-height: 28px;
+      background: @m-black7;
+      .rounded-corners(3px);
+      font-size: 14px;
+      color: @m-blue0;
+      &:hover {
+        background: @m-black7-hover;
+        color: @m-blue0-hover;
+      }
+    }
+    .conditionBtn + .conditionBtn {
+      margin-left: 10px;
+    }
+  }
+  .ant-form {
     height: 100%;
-    .flex;
-    flex-direction: column;
+  }
+  .need {
+    color: @m-grey0;
+    font-size: 12px;
+    margin-left: 10px;
+  }
+  .tip {
+    .position(absolute, 20px, auto, auto, 0);
+    font-size: 12px;
     z-index: 10;
+    color: @m-red1;
+    white-space: nowrap;
+  }
+  .way {
+    display: inline-flex;
+    width: 300px;
     overflow: hidden;
-    .condition {
-        width: 100%;
-        height: 48px;
-        margin: 0 16px;
-        padding: 10px 0;
-        border-bottom: 1px solid @m-black6;
-        .inlineflex;
-        .conditionBtn {
-            align-self: center;
-            align-items: center;
-            border: 0;
-            min-width: 80px;
-            height: 28px;
-            line-height: 28px;
-            background: @m-black7;
-            .rounded-corners(3px);
-            font-size: 14px;
-            color: @m-blue0;
-            &:hover {
-                background: @m-black7-hover;
-                color: @m-blue0-hover;
-            }
-        }
-        .conditionBtn + .conditionBtn {
-            margin-left: 10px;
-        }
-    }
-    .ant-form {
-        height: 100%;
+    background: @m-grey21;
+    border: 1px solid @m-grey14;
+    .rounded-corners(3px);
+    .left {
+      width: 260px;
+      .flex;
+      line-height: 25px;
+      padding: 5px;
+      color: @m-white6;
+      font-size: 14px;
+      text-overflow: -o-ellipsis-lastline;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      display: -webkit-box;
+      -webkit-line-clamp: 2;
+      line-clamp: 2;
+      -webkit-box-orient: vertical;
     }
-    .need {
-        color: @m-grey0;
-        font-size: 12px;
-        margin-left: 10px;
-    }
-    .tip {
-        .position(absolute, 20px, auto, auto, 0);
-        font-size: 12px;
-        z-index: 10;
-        color: @m-red1;
-        white-space: nowrap;
-    }
-    .way {
-        display: inline-flex;
-        width: 300px;
-        overflow: hidden;
-        background: @m-grey21;
-        border: 1px solid @m-grey14;
-        .rounded-corners(3px);
-        .left {
-            width: 260px;
-            .flex;
-            line-height: 25px;
-            padding: 5px;
-            color: @m-white6;
-            font-size: 14px;
-            text-overflow: -o-ellipsis-lastline;
-            overflow: hidden;
-            text-overflow: ellipsis;
-            display: -webkit-box;
-            -webkit-line-clamp: 2;
-            line-clamp: 2;
-            -webkit-box-orient: vertical;
-        }
-        .right {
-            width: 40px;
-            height: 60px;
-            background: @m-blue18;
-            border: 1px solid @m-blue0;
-            .rounded-corners(3px);
-            .flex;
-            justify-content: center;
-            .icon {
-                align-self: center;
-                align-items: center;
-                font-size: 24px;
-            }
-        }
+    .right {
+      width: 40px;
+      height: 60px;
+      background: @m-blue18;
+      border: 1px solid @m-blue0;
+      .rounded-corners(3px);
+      .flex;
+      justify-content: center;
+      .icon {
+        align-self: center;
+        align-items: center;
+        font-size: 24px;
+      }
     }
+  }
 }
 ::v-deep.ant-slider.formSlider {
-    width: 260px;
+  width: 260px;
 }
 ::v-deep.ant-input-suffix {
-    position: absolute;
-    right: -25px;
+  position: absolute;
+  right: -25px;
 }
 .unit {
-    margin-left: 70px;
-    width: 260px;
-    .flex;
-    justify-content: space-between;
-    font-size: 14px;
-    color: @m-grey41;
-    height: 14px;
-    line-height: 14px;
+  margin-left: 70px;
+  width: 260px;
+  .flex;
+  justify-content: space-between;
+  font-size: 14px;
+  color: @m-grey41;
+  height: 14px;
+  line-height: 14px;
 }
 .listedBtn {
-    width: 120px;
-    height: 30px;
-    line-height: 30px;
-    background: linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
-    border-radius: 3px;
-    color: @m-white0;
-    font-size: 14px;
-    text-align: center;
-    border: 0;
-    &:hover {
-        background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
-        color: @m-white0-hover;
-    }
+  width: 120px;
+  height: 30px;
+  line-height: 30px;
+  background: linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
+  border-radius: 3px;
+  color: @m-white0;
+  font-size: 14px;
+  text-align: center;
+  border: 0;
+  &:hover {
+    background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
+    color: @m-white0-hover;
+  }
 }
 .cancelBtn:extend(.listedBtn) {
-    background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
-    &:hover {
-        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%) !important;
-        color: @m-white0-hover;
-    }
+  background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
+  &:hover {
+    background: linear-gradient(
+      0deg,
+      @m-grey12-hover 0%,
+      @m-grey13-hover 100%
+    ) !important;
+    color: @m-white0-hover;
+  }
 }
 .ml10 {
-    margin-left: 10px;
+  margin-left: 10px;
 }
 .ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
+  margin-bottom: 14px;
 }
 .mt20 {
-    margin-top: 20px;
+  margin-top: 20px;
 }
 .mt-10 {
-    margin-top: -10px;
+  margin-top: -10px;
 }
 .minusBtn,
 .plusBtn {
-    width: 15px;
-    height: 32px;
-    line-height: 32px;
-    font-size: 15px;
-    color: @m-blue15;
-    cursor: pointer;
+  width: 15px;
+  height: 32px;
+  line-height: 32px;
+  font-size: 15px;
+  color: @m-blue15;
+  cursor: pointer;
 }
 .minusBtn {
-    position: absolute;
-    top: -6px;
-    left: 14px;
-    z-index: 1;
+  position: absolute;
+  top: -6px;
+  left: 14px;
+  z-index: 1;
 }
 .plusBtn {
-    position: absolute;
-    top: -6px;
-    right: 14px;
-    z-index: 1;
+  position: absolute;
+  top: -6px;
+  right: 14px;
+  z-index: 1;
 }
 .stepper {
-    padding-left: 30px;
-    padding-right: 30px;
-    text-align: center;
-    color: @m-yellow1;
-    font-size: 16px;
+  padding-left: 30px;
+  padding-right: 30px;
+  text-align: center;
+  color: @m-yellow1;
+  font-size: 16px;
 }
 </style>;

+ 107 - 101
src/views/market/market-spot/components/designate-buy/index.vue

@@ -1,20 +1,22 @@
 <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="key"
+      :data-source="tableList"
+    >
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
       <template #marginvalue="{ text }">
-        <span>{{ (text * 100).toFixed(2) + '%'}}</span>
+        <span>{{ (text * 100).toFixed(2) + '%' }}</span>
       </template>
       <!-- 议价 -->
       <template #canbargain="{ text }">
@@ -22,7 +24,7 @@
       </template>
       <!-- 整单 -->
       <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
+        <span>{{ text === 1 ? '否' : '是' }}</span>
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -30,15 +32,19 @@
       </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>
 
@@ -55,90 +61,90 @@ import Bus from '@/utils/eventBus/index';
 import { filterBtn, handleColumns } from './../setup';
 
 export default defineComponent({
-    name: 'warehouse_receipt_trade_blocs_buy',
-    props: {
-        isWR: {
-            type: Number,
-            default: 1, // 1 => 仓单贸易; 0 => 仓单预售
-        },
-        IsSpecified: {
-            // IsSpecified = 1 为贸易圈;IsSpecified = 2 为指定挂牌
-            type: Number,
-            default: 1,
-        },
+  name: 'warehouse_receipt_trade_blocs_buy',
+  props: {
+    isWR: {
+      type: Number,
+      default: 1, // 1 => 仓单贸易; 0 => 仓单预售
     },
-    components: {
-        contextMenu,
-        warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../designate-delisting/index.vue')),
-        warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../designate-delisting/index.vue')),
-        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
+    IsSpecified: {
+      // IsSpecified = 1 为贸易圈;IsSpecified = 2 为指定挂牌
+      type: Number,
+      default: 1,
     },
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表头
-        const { getBuyOrSellColumns } = handleColumns();
-        const columns = getBuyOrSellColumns(BuyOrSell.buy);
+  },
+  components: {
+    contextMenu,
+    warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../designate-delisting/index.vue')),
+    warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../designate-delisting/index.vue')),
+    warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('../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">

+ 1 - 1
src/views/market/market-spot/components/designate-delisting/setup.ts

@@ -3,7 +3,7 @@ import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
 import { validateCommon } from "@/common/setup/validate";
 import { queryHoldLB } from "@/services/go/wrtrade";
 import { QueryOrderQuoteMyqQsp, WrHoldLB } from "@/services/go/wrtrade/interface";
-import { Wrhold } from "@/views/market/spot_trade/spot_trade_order_transaction/components/delisting/interface";
+import { Wrhold } from "@/views/market/market-spot/spot_trade_order_transaction/components/delisting/interface";
 import { RuleObject } from "ant-design-vue/lib/form/interface";
 import { reactive, Ref, ref, UnwrapRef } from "vue";
 import { ListingForm } from "./interface";

+ 4 - 3
src/views/market/market-spot/components/designate-post-buying/index.vue

@@ -163,7 +163,7 @@ import moment, { Moment } from 'moment';
 import { getMarketRunByTradeMode, marketIsRun } from '@/services/bus/market';
 import { validateAction } from '@/common/setup/form';
 import { getCanUseMoney } from '@/services/bus/account';
-import { TempWrOrderQuoteDetail } from '@/views/market/spot_trade/components/post_buying/interface';
+import { TempWrOrderQuoteDetail } from '@/views/market/market-spot/components/post_buying/interface';
 import Friend from '@/common/components/friends/index.vue';
 import Permance from '@/common/components/permanceTemp/choosePermancePlanTmp.vue';
 import { message } from 'ant-design-vue';
@@ -172,6 +172,7 @@ import { useBlocksPrice, useBlocksNumber, useBlocksAccount, useBlocksMoney, useB
 import { BlocsListingForm } from '@/common/setup/warehouse_receipt_trade/interface';
 import { TradeMode } from '@/common/constants/enumCommon';
 import { useVerifyBeginDelistingNum } from '@/hooks/form/verify';
+import { WrResultItem } from '@/views/market/futures/compoments/futures-trade/interface'
 
 export default defineComponent({
   emits: ['cancel', 'update'],
@@ -180,7 +181,7 @@ export default defineComponent({
   props: {
     selectedRow: {
       type: Object as PropType<TempWrOrderQuoteDetail>,
-      default: {},
+      default: { wrResult: [], wrstandardid: 0, deliverygoodsid: 0, wrfactortypeid: 0, minivalue: 0 },
     },
   },
   setup(props, context) {
@@ -264,7 +265,7 @@ export default defineComponent({
             AllFriendsFlag: friendCheck.value ? 1 : 0, //是否全好友可见 0:否 1:是
             FactoryItems:
               props.selectedRow.wrResult != undefined
-                ? props.selectedRow.wrResult.map((it) => {
+                ? props.selectedRow.wrResult.map((it: WrResultItem) => {
                   return {
                     DGFactoryItemTypeID: it.dgfactoryitemtypeid, // uint64 要素项类型ID
                     DGFactoryItemID: it.dgfactoryitemid, // uint64 预约要素项类型值

+ 98 - 92
src/views/market/market-spot/components/designate-sell/index.vue

@@ -1,20 +1,22 @@
 <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="key"
+      :data-source="tableList"
+    >
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
       <template #marginvalue="{ text }">
-        <span>{{ (text * 100).toFixed(2) + '%'}}</span>
+        <span>{{ (text * 100).toFixed(2) + '%' }}</span>
       </template>
       <!-- 议价 -->
       <template #canbargain="{ text }">
@@ -22,7 +24,7 @@
       </template>
       <!-- 整单 -->
       <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
+        <span>{{ text === 1 ? '否' : '是' }}</span>
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -30,15 +32,19 @@
       </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,81 +63,81 @@ 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('../designate-delisting/index.vue')),
-        warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../designate-delisting/index.vue')),
-        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
-    },
+  name: 'warehouse_receipt_trade_blocs_sell',
+  components: {
+    contextMenu,
+    warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../designate-delisting/index.vue')),
+    warehouse_receipt_trade_blocs_bargain_delisting: defineAsyncComponent(() => import('../designate-delisting/index.vue')),
+    warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/market-spot/components/detail/index.vue')),
+  },
 
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表头
-        const { getBuyOrSellColumns } = handleColumns();
-        const columns = getBuyOrSellColumns(BuyOrSell.sell);
+  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">

+ 5 - 5
src/views/market/market-spot/components/goods-chart/chart/index.vue

@@ -159,13 +159,13 @@
           <a-col :span="8" style="color: #0d96ff">{{ changeUnit(selectedRow.totalturnover) }}</a-col>
           <a-col :span="4">量比</a-col>
           <a-col :span="8">{{ '--' }}</a-col>
-        </a-row> -->
+        </a-row>-->
         <!-- <a-row>
           <a-col :span="4">涨停</a-col>
           <a-col class="red1" :span="8">{{ handleNoneValue(selectedRow.limitup) }}</a-col>
           <a-col :span="4">跌停</a-col>
           <a-col class="green" :span="8">{{ handleNoneValue(selectedRow.limitdown) }}</a-col>
-        </a-row> -->
+        </a-row>-->
         <a-row>
           <a-col :span="4">外盘</a-col>
           <a-col :span="8">{{ handleNoneValue(selectedRow.totalbidvolume) }}</a-col>
@@ -180,7 +180,7 @@
         </a-row>
         <a-row>
           <!-- <a-col :span="4">仓差</a-col>
-          <a-col :span="8">{{ '--' }}</a-col> -->
+          <a-col :span="8">{{ '--' }}</a-col>-->
           <a-col :span="4">昨结</a-col>
           <a-col :span="8">{{ handleNoneValue(selectedRow.presettle) }}</a-col>
         </a-row>
@@ -189,7 +189,7 @@
           <a-col :span="8">{{ '--' }}</a-col>
           <a-col :span="4">开平</a-col>
           <a-col :span="8">{{ '--' }}</a-col>
-        </a-row> -->
+        </a-row>-->
       </div>
       <div @click="watchMore" class="watchMore">
         <strong>查看更多</strong>
@@ -206,7 +206,7 @@ import { QueryQuoteDayRsp, QueryHistoryTikDatasRsp, CycleType } from '@/services
 import { QueryHistoryTikDatas } from '@/services/go/quote';
 import { formatTime } from '@/common/methods';
 import { changeUnit } from '@/utils/qt/common';
-import { ComponentType } from '@/views/market/spot_trade/spot_trade_order_transaction/setup';
+import { ComponentType } from '@/views/market/market-spot/spot_trade_order_transaction/setup';
 import { EchartKline, EchartTime } from '@/common/components/echart';
 import { handleQuotePriceColor, quoteChange, handleNoneValue, quoteAmplitude } from '@/common/setup/table/tableQuote';
 import { useQueryData } from '@/common/setup/request';

+ 182 - 116
src/views/market/market-spot/goods-chart/chart/index.vue

@@ -3,18 +3,39 @@
   <div class="chart-container">
     <div class="chart-content">
       <div class="chart-content__header">
-        <a-menu class="chart-content__tabs" v-model:selectedKeys="activeCycleName" mode="horizontal" @click="changeCycleType">
+        <a-menu
+          class="chart-content__tabs"
+          v-model:selectedKeys="activeCycleName"
+          mode="horizontal"
+          @click="changeCycleType"
+        >
           <a-menu-item v-for="item in chartType" :key="item.name">{{ item.label }}</a-menu-item>
         </a-menu>
-        <a-menu class="chart-content__tabs" v-model:selectedKeys="activeSeriesType" mode="horizontal" v-if="activeCycleType !== CycleType.time">
+        <a-menu
+          class="chart-content__tabs"
+          v-model:selectedKeys="activeSeriesType"
+          mode="horizontal"
+          v-if="activeCycleType !== CycleType.time"
+        >
           <a-menu-item key="MACD">MACD</a-menu-item>
           <a-menu-item key="VOL">VOL</a-menu-item>
           <a-menu-item key="KDJ">KDJ</a-menu-item>
           <a-menu-item key="CCI">CCI</a-menu-item>
         </a-menu>
       </div>
-      <echart-time class="chart-content__main" :quote-data="selectedRow" @change="getHistoryTikDatas" v-if="activeCycleType === CycleType.time"></echart-time>
-      <echart-kline class="chart-content__main" :quote-data="selectedRow" :cycle-type="activeCycleType" :series-type="activeSeriesType[0]" v-else></echart-kline>
+      <echart-time
+        class="chart-content__main"
+        :quote-data="selectedRow"
+        @change="getHistoryTikDatas"
+        v-if="activeCycleType === CycleType.time"
+      ></echart-time>
+      <echart-kline
+        class="chart-content__main"
+        :quote-data="selectedRow"
+        :cycle-type="activeCycleType"
+        :series-type="activeSeriesType[0]"
+        v-else
+      ></echart-kline>
       <div class="chart-content__footer"></div>
     </div>
     <div class="chart-slider">
@@ -27,22 +48,40 @@
           <div class="content content--right">{{ selectedRow.goodsname }}</div>
         </div>
         <div class="chart-tips__last">
-          <div :class="['content content--left', handleQuotePriceColor(selectedRow.last, selectedRow.presettle)]">{{ handleNoneValue(selectedRow.last) }}</div>
+          <div
+            :class="['content content--left', handleQuotePriceColor(selectedRow.last, selectedRow.presettle)]"
+          >{{ handleNoneValue(selectedRow.last) }}</div>
           <div class="content content--right">
-            <span :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteChange(selectedRow) }}</span>
-            <span :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteAmplitude(selectedRow) }}</span>
+            <span
+              :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
+            >{{ quoteChange(selectedRow) }}</span>
+            <span
+              :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
+            >{{ quoteAmplitude(selectedRow) }}</span>
           </div>
         </div>
         <div class="chart-tips__volume">
           <a-row>
             <a-col :span="8">卖一</a-col>
-            <a-col :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.ask) }}</a-col>
-            <a-col :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.askvolume) }}</a-col>
+            <a-col
+              :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)"
+              :span="8"
+            >{{ handleNoneValue(selectedRow.ask) }}</a-col>
+            <a-col
+              :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)"
+              :span="8"
+            >{{ handleNoneValue(selectedRow.askvolume) }}</a-col>
           </a-row>
           <a-row>
             <a-col :span="8">买一</a-col>
-            <a-col :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.bid) }}</a-col>
-            <a-col :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.bidvolume) }}</a-col>
+            <a-col
+              :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)"
+              :span="8"
+            >{{ handleNoneValue(selectedRow.bid) }}</a-col>
+            <a-col
+              :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)"
+              :span="8"
+            >{{ handleNoneValue(selectedRow.bidvolume) }}</a-col>
           </a-row>
         </div>
       </div>
@@ -58,35 +97,62 @@
         <div class="row-content">
           <a-row v-for="(item, index) in tradedList" :key="index + '11'">
             <a-col :span="8">{{ formatTime(item.TS, 'hm') }}</a-col>
-            <a-col :class="handleQuotePriceColor(item.PE, selectedRow.presettle)" :span="8">{{ item.PE }}</a-col>
-            <a-col :class="handleQuotePriceColor(item.Vol, selectedRow.presettle)" :span="8">{{ item.Vol }}</a-col>
+            <a-col
+              :class="handleQuotePriceColor(item.PE, selectedRow.presettle)"
+              :span="8"
+            >{{ item.PE }}</a-col>
+            <a-col
+              :class="handleQuotePriceColor(item.Vol, selectedRow.presettle)"
+              :span="8"
+            >{{ item.Vol }}</a-col>
           </a-row>
         </div>
       </div>
       <div class="chart-tips__info">
         <a-row>
           <a-col :span="4">最新</a-col>
-          <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.last) }}</a-col>
+          <a-col
+            :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
+            :span="8"
+          >{{ handleNoneValue(selectedRow.last) }}</a-col>
           <a-col :span="4">均价</a-col>
-          <a-col :class="handleQuotePriceColor(selectedRow.averageprice, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.averageprice) }}</a-col>
+          <a-col
+            :class="handleQuotePriceColor(selectedRow.averageprice, selectedRow.presettle)"
+            :span="8"
+          >{{ handleNoneValue(selectedRow.averageprice) }}</a-col>
         </a-row>
         <a-row>
           <a-col :span="4">涨跌</a-col>
-          <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)" :span="8">{{ quoteChange(selectedRow) }}</a-col>
+          <a-col
+            :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
+            :span="8"
+          >{{ quoteChange(selectedRow) }}</a-col>
           <a-col :span="4">今开</a-col>
-          <a-col :class="handleQuotePriceColor(selectedRow.opened, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.opened) }}</a-col>
+          <a-col
+            :class="handleQuotePriceColor(selectedRow.opened, selectedRow.presettle)"
+            :span="8"
+          >{{ handleNoneValue(selectedRow.opened) }}</a-col>
         </a-row>
         <a-row>
           <a-col :span="4">涨幅</a-col>
-          <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)" :span="8">{{ quoteAmplitude(selectedRow) }}</a-col>
+          <a-col
+            :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
+            :span="8"
+          >{{ quoteAmplitude(selectedRow) }}</a-col>
           <a-col :span="4">最高</a-col>
-          <a-col :class="handleQuotePriceColor(selectedRow.highest, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.highest) }}</a-col>
+          <a-col
+            :class="handleQuotePriceColor(selectedRow.highest, selectedRow.presettle)"
+            :span="8"
+          >{{ handleNoneValue(selectedRow.highest) }}</a-col>
         </a-row>
         <a-row>
           <a-col :span="4">总量</a-col>
           <a-col :span="8">{{ handleNoneValue(selectedRow.totalvolume) }}</a-col>
           <a-col :span="4">最低</a-col>
-          <a-col :class="handleQuotePriceColor(selectedRow.lowest, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.lowest) }}</a-col>
+          <a-col
+            :class="handleQuotePriceColor(selectedRow.lowest, selectedRow.presettle)"
+            :span="8"
+          >{{ handleNoneValue(selectedRow.lowest) }}</a-col>
         </a-row>
         <a-row>
           <a-col :span="4">金额</a-col>
@@ -140,117 +206,117 @@ import { QueryQuoteDayRsp, QueryHistoryTikDatasRsp, CycleType } from '@/services
 import { QueryHistoryTikDatas } from '@/services/go/quote';
 import { formatTime } from '@/common/methods';
 import { changeUnit } from '@/utils/qt/common';
-import { ComponentType } from '@/views/market/spot_trade/spot_trade_order_transaction/setup';
+import { ComponentType } from '@/views/market/market-spot/spot_trade_order_transaction/setup';
 import { EchartKline, EchartTime } from '@/common/components/echart';
 import { handleQuotePriceColor, quoteChange, handleNoneValue, quoteAmplitude } from '@/common/setup/table/tableQuote';
 import moment from 'moment';
 
 export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'stock-exchange',
-    components: {
-        EchartKline,
-        EchartTime,
+  emits: ['cancel', 'update'],
+  name: 'stock-exchange',
+  components: {
+    EchartKline,
+    EchartTime,
+  },
+  props: {
+    selectedRow: {
+      type: Object as PropType<QueryQuoteDayRsp>,
+      default: {},
     },
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryQuoteDayRsp>,
-            default: {},
-        },
-        showExchange: {
-            type: Boolean,
-            default: true,
-        },
+    showExchange: {
+      type: Boolean,
+      default: true,
     },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context),
-            activeCycleName = ref<string[]>(['time']),
-            activeCycleType = ref<CycleType>(CycleType.time),
-            activeSeriesType = ref<string[]>(['MACD']),
-            tradedList = ref<QueryHistoryTikDatasRsp[]>([]);
+  },
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context),
+      activeCycleName = ref<string[]>(['time']),
+      activeCycleType = ref<CycleType>(CycleType.time),
+      activeSeriesType = ref<string[]>(['MACD']),
+      tradedList = ref<QueryHistoryTikDatasRsp[]>([]);
 
-        function watchMore() {
-            context.emit('update', ComponentType.marketContent);
-        }
+    function watchMore() {
+      context.emit('update', ComponentType.marketContent);
+    }
 
-        // 周期类型
-        const chartType = [
-            { label: '分时', name: 'time', value: CycleType.time },
-            { label: '1分钟', name: 'minutes', value: CycleType.minutes },
-            { label: '5分钟', name: 'minutes5', value: CycleType.minutes5 },
-            { label: '30分钟', name: 'minutes30', value: CycleType.minutes30 },
-            { label: '60分钟', name: 'minutes60', value: CycleType.minutes60 },
-            { label: '4小时', name: 'Hours4', value: CycleType.Hours4 },
-            { label: '日 K', name: 'days', value: CycleType.days },
-        ];
+    // 周期类型
+    const chartType = [
+      { label: '分时', name: 'time', value: CycleType.time },
+      { label: '1分钟', name: 'minutes', value: CycleType.minutes },
+      { label: '5分钟', name: 'minutes5', value: CycleType.minutes5 },
+      { label: '30分钟', name: 'minutes30', value: CycleType.minutes30 },
+      { label: '60分钟', name: 'minutes60', value: CycleType.minutes60 },
+      { label: '4小时', name: 'Hours4', value: CycleType.Hours4 },
+      { label: '日 K', name: 'days', value: CycleType.days },
+    ];
 
-        // 切换图表周期类型
-        const changeCycleType = (e: { key: string }) => {
-            activeCycleType.value = chartType.find((item) => item.name === e.key)!.value;
-        };
+    // 切换图表周期类型
+    const changeCycleType = (e: { key: string }) => {
+      activeCycleType.value = chartType.find((item) => item.name === e.key)!.value;
+    };
 
-        // Tik列表
-        const getHistoryTikDatas = (startTime: string, endTime: string) => {
-            const param = {
-                goodsCode: props.selectedRow.goodscode.toUpperCase(),
-                count: 20,
-                startTime: moment(startTime).format('YYYY-MM-DD HH:mm:ss'),
-                endTime: moment(endTime).format('YYYY-MM-DD HH:mm:ss'),
-            };
-            QueryHistoryTikDatas(param).then((res) => {
-                tradedList.value = res;
-            });
-        };
+    // Tik列表
+    const getHistoryTikDatas = (startTime: string, endTime: string) => {
+      const param = {
+        goodsCode: props.selectedRow.goodscode.toUpperCase(),
+        count: 20,
+        startTime: moment(startTime).format('YYYY-MM-DD HH:mm:ss'),
+        endTime: moment(endTime).format('YYYY-MM-DD HH:mm:ss'),
+      };
+      QueryHistoryTikDatas(param).then((res) => {
+        tradedList.value = res;
+      });
+    };
 
-        // 监听行情变化刷Tik列表
-        watch(
-            () => props.selectedRow.last,
-            () => {
-                if (tradedList.value.length > 19) {
-                    // 移除列表最后一条记录
-                    tradedList.value.pop();
-                }
-                // 向列表开头添加新纪录
-                tradedList.value.unshift({
-                    AV: 0,
-                    Ask: 0,
-                    BV: 0,
-                    Bid: 0,
-                    HI: 0,
-                    HV: 0,
-                    PE: props.selectedRow.last,
-                    TDR: 0,
-                    TK: 0,
-                    TS: props.selectedRow.lasttime,
-                    TT: 0,
-                    Vol: props.selectedRow.lastvolume,
-                });
-            }
-        );
+    // 监听行情变化刷Tik列表
+    watch(
+      () => props.selectedRow.last,
+      () => {
+        if (tradedList.value.length > 19) {
+          // 移除列表最后一条记录
+          tradedList.value.pop();
+        }
+        // 向列表开头添加新纪录
+        tradedList.value.unshift({
+          AV: 0,
+          Ask: 0,
+          BV: 0,
+          Bid: 0,
+          HI: 0,
+          HV: 0,
+          PE: props.selectedRow.last,
+          TDR: 0,
+          TK: 0,
+          TS: props.selectedRow.lasttime,
+          TT: 0,
+          Vol: props.selectedRow.lastvolume,
+        });
+      }
+    );
 
-        return {
-            cancel,
-            visible,
-            chartType,
-            tradedList,
-            CycleType,
-            activeCycleName,
-            activeCycleType,
-            activeSeriesType,
-            changeUnit,
-            watchMore,
-            formatTime,
-            quoteChange,
-            handleNoneValue,
-            quoteAmplitude,
-            handleQuotePriceColor,
-            changeCycleType,
-            getHistoryTikDatas,
-        };
-    },
+    return {
+      cancel,
+      visible,
+      chartType,
+      tradedList,
+      CycleType,
+      activeCycleName,
+      activeCycleType,
+      activeSeriesType,
+      changeUnit,
+      watchMore,
+      formatTime,
+      quoteChange,
+      handleNoneValue,
+      quoteAmplitude,
+      handleQuotePriceColor,
+      changeCycleType,
+      getHistoryTikDatas,
+    };
+  },
 });
 </script>
 
 <style lang="less">
-@import './index.less';
+@import "./index.less";
 </style>

+ 98 - 3
src/views/market/market-spot/setup.ts

@@ -1,9 +1,36 @@
+import { BtnListType } from '@/common/components/btnList/interface';
+import { ContextMenuTemp } from '@/common/components/contextMenu/interface';
+import { handleContextMenu } from '@/common/components/contextMenu/setup';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { ComposeTableParam } from '@/common/export/commonTable';
 import { initData } from '@/common/methods';
+import { getTableColumns, getTableEvent } from '@/common/setup/table';
+import { TableEventCB } from '@/common/setup/table/interface';
 import APP from '@/services';
 import { TjmdMarketSection, TjmdMarketSectionConfig } from '@/services/go/Tjmd/interface';
 import { queryFtDeliveryGoods } from '@/services/go/wrtrade';
-import { ref } from 'vue';
-import { TreeDataItem } from './interface';
+import TimerUtils from '@/utils/timer/timerUtil';
+import { onUnmounted, ref } from 'vue';
+import { BuyAndSellMarket, TreeDataItem } from './interface';
+
+const buyAndSellEunm = 'buyAndSell'
+
+export function handleSpotBtnList(menuType: EnumRouterName) {
+    const firstBtn: BtnListType[] = []
+    // 买大厅数据
+    const buyMarket: BuyAndSellMarket = {
+        isMarket: true,
+        btnList: []
+    }
+
+    // 卖大厅数据
+    const sellMarket: BuyAndSellMarket = {
+        isMarket: true,
+        btnList: []
+    }
+
+    return { firstBtn, buyMarket, sellMarket }
+}
 
 export const useMarketsSection = () => {
     // 市场板块
@@ -58,4 +85,72 @@ export function handleFtDeliveryGoods() {
         })
     }
     return { FtDeliveryGoods }
-}
+}
+
+// 表格 + 表头 + 右键 + 单击表格 + 按钮列表 通用处理逻辑
+export function handleComposeTable<T>({ queryFn, menuType, isDetail, tableName, tableFilterKey }: ComposeTableParam) {
+    // 右键逻辑
+    const { contextMenu, openContext, closeContext: closeContextAction } = handleContextMenu();
+    // 表头数据
+    const { columns, registerColumn, updateColumn } = getTableColumns();
+    // 控制异步组件
+    const componentId = ref<string>('');
+    // 关闭组件
+    function closeComponent(isRefresh: boolean) {
+        componentId.value = '';
+        if (isRefresh) {
+            queryFn()
+        }
+    }
+    // 右键回调函数
+    const eventsCB: TableEventCB = {
+        contextmenuCB: (record: T, value: ContextMenuTemp) => {
+            // 控制打开右键
+            contextMenu.value = value
+        },
+        clickCB: (record: T) => {
+            componentId.value = buyAndSellEunm
+        }
+    }
+    // 表格事件
+    const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<T>(eventsCB);
+    // 表格操作按钮列表
+    const firstBtn: BtnListType[] = []
+    firstBtn.push({ lable: '买卖大厅', code: buyAndSellEunm, className: 'btnPrimary' })
+
+    // 关闭右键
+    function closeContext(value: BtnListType | null) {
+        // 打开对应的弹窗组件
+        if (value) componentId.value = value.code;
+        // 关闭右键
+        closeContextAction()
+    }
+    onUnmounted(() => {
+        // 离开组件,手动关闭右键,防止出现bug
+        TimerUtils.clearInterval('spotTrade')
+        closeContextAction()
+    })
+    initData(() => {
+        // 获取列表数据
+        queryFn();
+        // 10秒刷新一次列表
+        TimerUtils.setInterval(() => {
+            queryFn()
+        }, 10 * 1000, 'spotTrade')
+        // 注册表头信息 过滤
+        if (tableName) {
+            registerColumn(tableName, tableFilterKey);
+        }
+
+    });
+
+    return {
+        contextMenu, openContext, closeContext, // 右键
+        columns, registerColumn, updateColumn,  // 表头
+        expandedRowKeys, selectedRow, Rowclick, // 表格折腾面板数据与单击、双击事件
+        componentId, closeComponent,  // 控制异步组件
+        firstBtn, // 表格按钮
+    }
+}
+
+

+ 1 - 1
src/views/market/market-spot/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/index.vue

@@ -210,7 +210,7 @@ import { QueryQuoteGoodsListRsp, QueryTjmdTodayAccountMarginReq, QueryTjmdTradeO
 import { diaoQiOrder } from '@/services/socket/order';
 import { OrderReq } from '@/services/socket/order/interface';
 import Bus from '@/utils/eventBus/index';
-import Chart from '@/views/market/spot_trade/components/goods-chart/chart/index.vue';
+import Chart from '@/views/market/market-spot/goods-chart/index.vue';
 import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
 import Long from 'long';
 import moment from 'moment';

+ 1 - 1
src/views/market/market-spot/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/index.vue

@@ -232,7 +232,7 @@ import { QueryTjmdTodayAccountMarginReq } from '@/services/go/Tjmd/interface';
 import { diaoQiOrder } from '@/services/socket/order';
 import { OrderReq } from '@/services/socket/order/interface';
 import Bus from '@/utils/eventBus';
-import Chart from '@/views/market/spot_trade/components/goods-chart/chart/index.vue';
+import Chart from '@/views/market/market-spot/goods-chart/index.vue';
 import { DoubleRightOutlined, LineChartOutlined, MinusOutlined, PlusOutlined, SwapOutlined } from '@ant-design/icons-vue';
 import moment from 'moment';
 import { v4 as uuidv4 } from 'uuid';

+ 23 - 21
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_blocs/components/buy/index.vue

@@ -1,20 +1,22 @@
 <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="key"
+      :data-source="tableList"
+    >
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
       <template #marginvalue="{ text }">
-        <span>{{ (text * 100).toFixed(2) + '%'}}</span>
+        <span>{{ (text * 100).toFixed(2) + '%' }}</span>
       </template>
       <!-- 议价 -->
       <template #canbargain="{ text }">
@@ -22,7 +24,7 @@
       </template>
       <!-- 整单 -->
       <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
+        <span>{{ text === 1 ? '否' : '是' }}</span>
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -30,15 +32,15 @@
       </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>
 
@@ -62,7 +64,7 @@ export default defineComponent({
         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')),
+        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/market-spot/components/detail/index.vue')),
     },
     setup() {
         const isBottom = getShowBottomValue();

+ 363 - 360
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/index.vue

@@ -1,27 +1,29 @@
 <template>
   <!--仓单贸易 贸易圈挂牌 摘牌-->
-  <Drawer :title="isBargin() ? '议价摘牌' : '摘牌'"
-          :placement="'right'"
-          :visible="visible"
-          @cancel="cancel"
-          class="top">
+  <Drawer
+    :title="isBargin() ? '议价摘牌' : '摘牌'"
+    :placement="'right'"
+    :visible="visible"
+    @cancel="cancel"
+    class="top"
+  >
     <div class="post_buying">
-      <a-form class="inlineForm dialogForm"
-              ref="formRef"
-              :model="formState"
-              :rules="rules">
+      <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
         <div class="formBar">
           <a-row :gutter="24">
             <a-col :span="24">
-              <a-form-item label="交易账户"
-                           name="accountid">
-                <a-select class="inlineFormSelect"
-                          style="width: 260px"
-                          v-model:value="formState.accountid"
-                          placeholder="请选择">
-                  <a-select-option v-for="item in accountList"
-                                   :value="item.accountid"
-                                   :key="item.accountid">{{item.accountid}}</a-select-option>
+              <a-form-item label="交易账户" name="accountid">
+                <a-select
+                  class="inlineFormSelect"
+                  style="width: 260px"
+                  v-model:value="formState.accountid"
+                  placeholder="请选择"
+                >
+                  <a-select-option
+                    v-for="item in accountList"
+                    :value="item.accountid"
+                    :key="item.accountid"
+                  >{{ item.accountid }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
@@ -29,120 +31,117 @@
           <a-row :gutter="24">
             <a-col :span="24">
               <a-form-item label="挂牌方">
-                <span class="white ml8">{{selectedRow.username}}</span>
+                <span class="white ml8">{{ selectedRow.username }}</span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
               <a-form-item label="挂牌数量">
-                <span class="white ml8">{{selectedRow.orderqty}}{{selectedRow.enumdicname}}</span>
+                <span class="white ml8">{{ selectedRow.orderqty }}{{ selectedRow.enumdicname }}</span>
               </a-form-item>
             </a-col>
           </a-row>
-          <a-col :span="24"
-                 v-if="isBargin()">
-            <a-form-item label="摘牌价格"
-                         name="price">
-              <a-input-number class="commonInput"
-                              style="width: 260px"
-                              :min="0"
-                              v-model:value="formState.price" />
+          <a-col :span="24" v-if="isBargin()">
+            <a-form-item label="摘牌价格" name="price">
+              <a-input-number
+                class="commonInput"
+                style="width: 260px"
+                :min="0"
+                v-model:value="formState.price"
+              />
             </a-form-item>
           </a-col>
-          <a-col :span="24"
-                 v-else>
+          <a-col :span="24" v-else>
             <a-form-item label="摘牌价格">
-              <span class="white ml8">{{selectedRow.fixedprice}}</span>
+              <span class="white ml8">{{ selectedRow.fixedprice }}</span>
             </a-form-item>
           </a-col>
-          <a-col :span="24"
-                 v-if="isBuy()">
-            <a-form-item label="现货仓单"
-                         name="LadingBillId">
-              <a-select class="inlineFormSelect"
-                        style="width: 260px"
-                        v-model:value="formState.LadingBillId"
-                        placeholder="请选择">
-                <a-select-option v-for="item in wrHoldList"
-                                 :value="item.id"
-                                 :key="item.id">{{item.name}}</a-select-option>
+          <a-col :span="24" v-if="isBuy()">
+            <a-form-item label="现货仓单" name="LadingBillId">
+              <a-select
+                class="inlineFormSelect"
+                style="width: 260px"
+                v-model:value="formState.LadingBillId"
+                placeholder="请选择"
+              >
+                <a-select-option
+                  v-for="item in wrHoldList"
+                  :value="item.id"
+                  :key="item.id"
+                >{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
 
-          <a-row :gutter="24"
-                 v-if="isCanpart()">
+          <a-row :gutter="24" v-if="isCanpart()">
             <a-col :span="24">
-              <a-form-item label="摘牌数量"
-                           class="relative"
-                           name="num">
-                <a-input-number class="dialogInput yellowInput"
-                                style="width: 260px"
-                                :min="0"
-                                :max="getMaxNum()"
-                                v-model:value="formState.num" />
-                <span class="input-enumdicname-absolute">{{selectedRow.enumdicname}}</span>
-                <div class="labelTip">({{selectedRow.delistminqty}}{{selectedRow.enumdicname}}起)
-                </div>
+              <a-form-item label="摘牌数量" class="relative" name="num">
+                <a-input-number
+                  class="dialogInput yellowInput"
+                  style="width: 260px"
+                  :min="0"
+                  :max="getMaxNum()"
+                  v-model:value="formState.num"
+                />
+                <span class="input-enumdicname-absolute">{{ selectedRow.enumdicname }}</span>
+                <div class="labelTip">({{ selectedRow.delistminqty }}{{ selectedRow.enumdicname }}起)</div>
               </a-form-item>
             </a-col>
           </a-row>
-          <a-row :gutter="24"
-                 v-if="isCanpart()">
-            <a-col :span="24"
-                   class="mt-20">
+          <a-row :gutter="24" v-if="isCanpart()">
+            <a-col :span="24" class="mt-20">
               <a-form-item>
-                <a-slider :min="0"
-                          v-model:value="formState.num"
-                          :max="selectedRow.orderqty"
-                          class="formSlider"
-                          style="width: 260px" />
+                <a-slider
+                  :min="0"
+                  v-model:value="formState.num"
+                  :max="selectedRow.orderqty"
+                  class="formSlider"
+                  style="width: 260px"
+                />
                 <div class="unit">
                   <span>0</span>
-                  <span>{{getMaxNum()}}{{selectedRow.enumdicname}}</span>
+                  <span>{{ getMaxNum() }}{{ selectedRow.enumdicname }}</span>
                 </div>
               </a-form-item>
             </a-col>
             <a-col :span="12">&nbsp;</a-col>
           </a-row>
-          <a-col :span="24"
-                 v-if="!isCanpart()">
+          <a-col :span="24" v-if="!isCanpart()">
             <a-form-item label="摘牌数量">
-              <span class="white ml8">{{selectedRow.orderqty}}{{selectedRow.enumdicname}}</span>
+              <span class="white ml8">{{ selectedRow.orderqty }}{{ selectedRow.enumdicname }}</span>
             </a-form-item>
           </a-col>
           <a-row :gutter="24">
-            <a-col :span="24"
-                   class="mt-20">
+            <a-col :span="24" class="mt-20">
               <a-form-item label="摘牌金额">
-                <span class="white ml8">{{getMoney()}}</span>
+                <span class="white ml8">{{ getMoney() }}</span>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
             <a-col :span="24">
               <a-form-item label="履约保证金">
-                <span class="white ml8">{{getMargin()}}</span>
+                <span class="white ml8">{{ getMargin() }}</span>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
             <a-col :span="24">
               <a-form-item label="可用资金">
-                <span class="white ml8">{{getCanUseMoney(getSelectedAccount())}}</span>
+                <span class="white ml8">{{ getCanUseMoney(getSelectedAccount()) }}</span>
               </a-form-item>
             </a-col>
           </a-row>
         </div>
         <a-row :gutter="24">
-          <a-col :span="24"
-                 class="fixedBtns">
+          <a-col :span="24" class="fixedBtns">
             <a-form-item class="btnCenter">
-              <a-button class="listedBtn"
-                        :loading="loading"
-                        :disabled="loading"
-                        @click="submit">{{isBuy() ? '卖出' : '买入'}}</a-button>
-              <a-button class="ml10 cancelBtn"
-                        @click="cancel">取消</a-button>
+              <a-button
+                class="listedBtn"
+                :loading="loading"
+                :disabled="loading"
+                @click="submit"
+              >{{ isBuy() ? '卖出' : '买入' }}</a-button>
+              <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
             </a-form-item>
           </a-col>
         </a-row>
@@ -173,7 +172,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 
 import { BuyOrSell, TradeMode } from '@/common/constants/enumCommon';
 import { getCanUseMoney } from '@/services/bus/account';
-import { TempWrOrderQuoteDetail } from '@/views/market/spot_trade/components/post_buying/interface';
+import { TempWrOrderQuoteDetail } from '@/views/market/market-spot/components/post_buying/interface';
 import { handleForm, handleSpotWarrant } from './setup';
 import { getRules } from '@/services/bus/rules';
 import { ListingForm } from './interface';
@@ -182,328 +181,332 @@ import Long from 'long';
 import Bus from '@/utils/eventBus';
 
 export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'warehouse_receipt_trade_blocs_delisting_tab',
-    components: { Des, Drawer, PlusOutlined, MinusOutlined },
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryOrderQuoteMyqQsp>,
-            default: {},
-        },
-        buyOrSell: {
-            type: Number as PropType<BuyOrSell>,
-            default: BuyOrSell.buy,
-        },
-        componentId: {
-            type: String,
-            default: '',
-        },
+  emits: ['cancel', 'update'],
+  name: 'warehouse_receipt_trade_blocs_delisting_tab',
+  components: { Des, Drawer, PlusOutlined, MinusOutlined },
+  props: {
+    selectedRow: {
+      type: Object as PropType<QueryOrderQuoteMyqQsp>,
+      default: {},
     },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const { rules, formState, formRef } = handleForm();
-        const loading = ref<boolean>(false);
-        const accountList = getAccountTypeList([2]);
-        // 现货仓单
-        const { wrHoldList, allWrHoldList } = handleSpotWarrant(props.buyOrSell, props.selectedRow, loading);
-        if (accountList.length) {
-            formState.accountid = accountList[0].accountid;
-        }
+    buyOrSell: {
+      type: Number as PropType<BuyOrSell>,
+      default: BuyOrSell.buy,
+    },
+    componentId: {
+      type: String,
+      default: '',
+    },
+  },
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context);
+    const { rules, formState, formRef } = handleForm();
+    const loading = ref<boolean>(false);
+    const accountList = getAccountTypeList([2]);
+    // 现货仓单
+    const { wrHoldList, allWrHoldList } = handleSpotWarrant(props.buyOrSell, props.selectedRow, loading);
+    if (accountList.length) {
+      formState.accountid = accountList[0].accountid;
+    }
 
-        function getSelectedAccount() {
-            return accountList.find((e) => e.accountid === formState.accountid)!;
-        }
-        function getPrice() {
-            return isBargin() ? formState.price : props.selectedRow.fixedprice;
-        }
-        function getNum() {
-            return isCanpart() ? formState.num : props.selectedRow.orderqty;
-        }
-        // 摘牌金额
-        function getMoney() {
-            const price = getPrice();
-            const num = getNum();
-            if (price) {
-                return (price * num).toFixed(2);
-            } else {
-                return '--';
-            }
-        }
-        // 履约保证金
-        function getMargin() {
-            const price = getPrice();
-            const num = getNum();
-            let result = 0;
-            const { marginvalue } = props.selectedRow;
-            if (price && num && marginvalue) {
-                result = price * num * marginvalue;
-            }
-            return result ? Math.floor(2) : '--';
-        }
-        function getMaxNum() {
-            const qty = props.selectedRow.orderqty;
-            let result = 0;
-            if (!isBuy()) {
-                // 交易规则
-                const rules = getRules();
-                const { buymarginvalue } = rules.length ? rules[0] : { buymarginvalue: 0 };
-                const canUseMoney = Number(getCanUseMoney(getSelectedAccount()));
-                if (canUseMoney && !isNaN(canUseMoney)) {
-                    const num = +(canUseMoney / buymarginvalue).toFixed(0);
-                    // 买 最大可摘数量=min{挂牌数量,可用资金/(履约保证金比例)}
-                    result = Math.min(qty, num);
-                }
-            } else {
-                // 卖出 最大可摘数量=min{挂牌数量,仓单可用数量}
-                const id = formState.LadingBillId;
-                if (id) {
-                    const item = allWrHoldList.value.find((el) => el.ladingbillid === id)!;
-                    result = Math.min(qty, item.enableqty);
-                }
-            }
-            return result;
-        }
-        function isBuy() {
-            return props.buyOrSell === BuyOrSell.buy;
-        }
-        // 是否部分摘牌
-        function isCanpart() {
-            return props.selectedRow.canpart === 1;
+    function getSelectedAccount() {
+      return accountList.find((e) => e.accountid === formState.accountid)!;
+    }
+    function getPrice() {
+      return isBargin() ? formState.price : props.selectedRow.fixedprice;
+    }
+    function getNum() {
+      return isCanpart() ? formState.num : props.selectedRow.orderqty;
+    }
+    // 摘牌金额
+    function getMoney() {
+      const price = getPrice();
+      const num = getNum();
+      if (price) {
+        return (price * num).toFixed(2);
+      } else {
+        return '--';
+      }
+    }
+    // 履约保证金
+    function getMargin() {
+      const price = getPrice();
+      const num = getNum();
+      let result = 0;
+      const { marginvalue } = props.selectedRow;
+      if (price && num && marginvalue) {
+        result = price * num * marginvalue;
+      }
+      return result ? Math.floor(2) : '--';
+    }
+    function getMaxNum() {
+      const qty = props.selectedRow.orderqty;
+      let result = 0;
+      if (!isBuy()) {
+        // 交易规则
+        const rules = getRules();
+        const { buymarginvalue } = rules.length ? rules[0] : { buymarginvalue: 0 };
+        const canUseMoney = Number(getCanUseMoney(getSelectedAccount()));
+        if (canUseMoney && !isNaN(canUseMoney)) {
+          const num = +(canUseMoney / buymarginvalue).toFixed(0);
+          // 买 最大可摘数量=min{挂牌数量,可用资金/(履约保证金比例)}
+          result = Math.min(qty, num);
         }
-        // 是否议价 摘牌
-        function isBargin() {
-            return props.componentId === 'warehouse_receipt_trade_blocs_bargain_delisting';
-        }
-        if (isBargin()) {
-            formState.price = props.selectedRow.fixedprice;
+      } else {
+        // 卖出 最大可摘数量=min{挂牌数量,仓单可用数量}
+        const id = formState.LadingBillId;
+        if (id) {
+          const item = allWrHoldList.value.find((el) => el.ladingbillid === id)!;
+          result = Math.min(qty, item.enableqty);
         }
+      }
+      return result;
+    }
+    function isBuy() {
+      return props.buyOrSell === BuyOrSell.buy;
+    }
+    // 是否部分摘牌
+    function isCanpart() {
+      return props.selectedRow.canpart === 1;
+    }
+    // 是否议价 摘牌
+    function isBargin() {
+      return props.componentId === 'warehouse_receipt_trade_blocs_bargain_delisting';
+    }
+    if (isBargin()) {
+      formState.price = props.selectedRow.fixedprice;
+    }
 
-        function submit() {
-            // 判断是否开市
-            if (!marketIsRun(TradeMode.WarehouseReceiptTrade)) {
-                return;
+    function submit() {
+      // 判断是否开市
+      if (!marketIsRun(TradeMode.WarehouseReceiptTrade)) {
+        return;
+      }
+      validateAction<ListingForm>(formRef, formState).then((res) => {
+        const price = getPrice();
+        const num = getNum();
+        if (isBargin()) {
+          // 议价摘牌
+          const param: WrBargainApplyReq = {
+            WRTradeOrderID: Long.fromString(props.selectedRow.wrtradeorderid),
+            ApplyQty: num,
+            UserID: getUserId().toString(),
+            AccountID: getSelectedAccountId().toString(),
+            BuyOrSell: (isBuy() ? BuyOrSell.sell : BuyOrSell.buy).toString(),
+            ApplyPrice: price.toString(),
+            ApplyRemark: '',
+          };
+          requestResultLoadingAndInfo(wrBargainApply, param, loading, ['议价摘牌成功', '议价摘牌失败:']).then(() => {
+            cancel(true);
+            Bus.$emit('blocsTrade', true);
+          });
+        } else {
+          // 首先确定  这是仓单贸易的有仓单挂摘牌 HasWr = 1
+          // 其次判断  摘牌 1。摘买 (需要通过自己的仓单进行摘买)  2。摘卖 (不需要通过仓单)
+          const param = {
+            UserID: getUserId(), // uint32 用户ID
+            AccountID: getSelectedAccountId(), // uint64 资金账号
+            RelatedWRTradeOrderID: props.selectedRow.wrtradeorderid, // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
+            WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
+            OrderQty: num, // uint64 委托数量
+            OrderSrc: 0, // uint32 委托来源
+            ClientSerialNo: uuidv4(), // string 客户端流水号
+            ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
+            ClientType: 4, // uint32 终端类型
+            OperatorID: getUserId(), // uint64 操作员账号ID
+            BuyOrSell: 0, // uint32 买卖方向
+            ApplyID: 0, // uint64 申请ID
+            LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
+            SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
+            WRFactorTypeId: Long.fromString(props.selectedRow.wrfactortypeid), // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
+            TradeDate: moment().format('YYYYMMDD'), // string 交易日
+            DeliveryMonth: '', // string 交收月
+            HasWr: 1, // uint32 是否有仓单-0:没有仓单 1:有仓单
+            IsFinancing: 0, // uint32 是否融资购买(买摘牌时有效)-0:否 1:是
+            ProductDetailID: res.caseId, // uint64 金融机构产品组合ID(融资购买时有效)
+          };
+          // 摘买方向
+          if (isBuy()) {
+            param.BuyOrSell = BuyOrSell.sell;
+            param.LadingBillId = Long.fromString(res.LadingBillId);
+            const item = wrHoldList.value.find((el) => el.id === res.LadingBillId);
+            if (item) {
+              param.SubNum = +item.subnum;
             }
-            validateAction<ListingForm>(formRef, formState).then((res) => {
-                const price = getPrice();
-                const num = getNum();
-                if (isBargin()) {
-                    // 议价摘牌
-                    const param: WrBargainApplyReq = {
-                        WRTradeOrderID: Long.fromString(props.selectedRow.wrtradeorderid),
-                        ApplyQty: num,
-                        UserID: getUserId().toString(),
-                        AccountID: getSelectedAccountId().toString(),
-                        BuyOrSell: (isBuy() ? BuyOrSell.sell : BuyOrSell.buy).toString(),
-                        ApplyPrice: price.toString(),
-                        ApplyRemark: '',
-                    };
-                    requestResultLoadingAndInfo(wrBargainApply, param, loading, ['议价摘牌成功', '议价摘牌失败:']).then(() => {
-                        cancel(true);
-                        Bus.$emit('blocsTrade', true);
-                    });
-                } else {
-                    // 首先确定  这是仓单贸易的有仓单挂摘牌 HasWr = 1
-                    // 其次判断  摘牌 1。摘买 (需要通过自己的仓单进行摘买)  2。摘卖 (不需要通过仓单)
-                    const param = {
-                        UserID: getUserId(), // uint32 用户ID
-                        AccountID: getSelectedAccountId(), // uint64 资金账号
-                        RelatedWRTradeOrderID: props.selectedRow.wrtradeorderid, // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
-                        WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
-                        OrderQty: num, // uint64 委托数量
-                        OrderSrc: 0, // uint32 委托来源
-                        ClientSerialNo: uuidv4(), // string 客户端流水号
-                        ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
-                        ClientType: 4, // uint32 终端类型
-                        OperatorID: getUserId(), // uint64 操作员账号ID
-                        BuyOrSell: 0, // uint32 买卖方向
-                        ApplyID: 0, // uint64 申请ID
-                        LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
-                        SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
-                        WRFactorTypeId: Long.fromString(props.selectedRow.wrfactortypeid), // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
-                        TradeDate: moment().format('YYYYMMDD'), // string 交易日
-                        DeliveryMonth: '', // string 交收月
-                        HasWr: 1, // uint32 是否有仓单-0:没有仓单 1:有仓单
-                        IsFinancing: 0, // uint32 是否融资购买(买摘牌时有效)-0:否 1:是
-                        ProductDetailID: res.caseId, // uint64 金融机构产品组合ID(融资购买时有效)
-                    };
-                    // 摘买方向
-                    if (isBuy()) {
-                        param.BuyOrSell = BuyOrSell.sell;
-                        param.LadingBillId = Long.fromString(res.LadingBillId);
-                        const item = wrHoldList.value.find((el) => el.id === res.LadingBillId);
-                        if (item) {
-                            param.SubNum = +item.subnum;
-                        }
-                    } else {
-                        param.BuyOrSell = BuyOrSell.buy;
-                    }
+          } else {
+            param.BuyOrSell = BuyOrSell.buy;
+          }
 
-                    requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
-                        cancel(true);
-                        Bus.$emit('blocsTrade', true);
-                    });
-                }
-            });
+          requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
+            cancel(true);
+            Bus.$emit('blocsTrade', true);
+          });
         }
-        return {
-            submit,
-            cancel,
-            visible,
-            accountList,
-            rules,
-            formState,
-            formRef,
-            getSelectedAccount,
-            getCanUseMoney,
-            getMoney,
-            isBuy,
-            isBargin,
-            wrHoldList,
-            loading,
-            getMaxNum,
-            isCanpart,
-            getMargin,
-        };
-    },
+      });
+    }
+    return {
+      submit,
+      cancel,
+      visible,
+      accountList,
+      rules,
+      formState,
+      formRef,
+      getSelectedAccount,
+      getCanUseMoney,
+      getMoney,
+      isBuy,
+      isBargin,
+      wrHoldList,
+      loading,
+      getMaxNum,
+      isCanpart,
+      getMargin,
+    };
+  },
 });
 </script>
 
 <style lang="less">
 .post_buying {
-    width: 100%;
+  width: 100%;
+  height: 100%;
+  .flex;
+  flex-direction: column;
+  position: relative;
+  overflow: hidden;
+  .ant-form {
     height: 100%;
-    .flex;
-    flex-direction: column;
-    position: relative;
-    overflow: hidden;
-    .ant-form {
-        height: 100%;
+  }
+  .condition {
+    width: 100%;
+    height: 48px;
+    margin: 0 16px;
+    padding: 10px 0;
+    border-bottom: 1px solid @m-black6;
+    .inlineflex;
+    .conditionBtn {
+      align-self: center;
+      align-items: center;
+      border: 0;
+      min-width: 80px;
+      height: 28px;
+      line-height: 28px;
+      background: @m-black7;
+      .rounded-corners(3px);
+      font-size: 14px;
+      color: @m-blue0;
+      &:hover {
+        background: @m-black7-hover;
+        color: @m-blue0-hover;
+      }
     }
-    .condition {
-        width: 100%;
-        height: 48px;
-        margin: 0 16px;
-        padding: 10px 0;
-        border-bottom: 1px solid @m-black6;
-        .inlineflex;
-        .conditionBtn {
-            align-self: center;
-            align-items: center;
-            border: 0;
-            min-width: 80px;
-            height: 28px;
-            line-height: 28px;
-            background: @m-black7;
-            .rounded-corners(3px);
-            font-size: 14px;
-            color: @m-blue0;
-            &:hover {
-                background: @m-black7-hover;
-                color: @m-blue0-hover;
-            }
-        }
-        .conditionBtn + .conditionBtn {
-            margin-left: 10px;
-        }
+    .conditionBtn + .conditionBtn {
+      margin-left: 10px;
     }
+  }
 }
 
 .unit {
-    margin-left: 70px;
-    width: 260px;
-    .flex;
-    justify-content: space-between;
-    font-size: 14px;
-    color: @m-grey41;
-    height: 14px;
-    line-height: 14px;
+  margin-left: 70px;
+  width: 260px;
+  .flex;
+  justify-content: space-between;
+  font-size: 14px;
+  color: @m-grey41;
+  height: 14px;
+  line-height: 14px;
 }
 .listedBtn {
-    width: 120px;
-    height: 30px;
-    line-height: 30px;
-    background: linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
-    border-radius: 3px;
-    color: @m-white0;
-    font-size: 14px;
-    text-align: center;
-    border: 0;
-    &:hover {
-        background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
-        color: @m-white0-hover;
-    }
+  width: 120px;
+  height: 30px;
+  line-height: 30px;
+  background: linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
+  border-radius: 3px;
+  color: @m-white0;
+  font-size: 14px;
+  text-align: center;
+  border: 0;
+  &:hover {
+    background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
+    color: @m-white0-hover;
+  }
 }
 .cancelBtn:extend(.listedBtn) {
-    background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
-    &:hover {
-        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%) !important;
-        color: @m-white0-hover;
-    }
+  background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
+  &:hover {
+    background: linear-gradient(
+      0deg,
+      @m-grey12-hover 0%,
+      @m-grey13-hover 100%
+    ) !important;
+    color: @m-white0-hover;
+  }
 }
 .ml10 {
-    margin-left: 10px;
+  margin-left: 10px;
 }
 .ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
+  margin-bottom: 14px;
 }
 .mt20 {
-    margin-top: 20px;
+  margin-top: 20px;
 }
 .mt-10 {
-    margin-top: -10px;
+  margin-top: -10px;
 }
 .ant-input-suffix {
-    position: absolute;
-    right: -25px;
+  position: absolute;
+  right: -25px;
 }
 .minusBtn,
 .plusBtn {
-    width: 15px;
-    height: 32px;
-    line-height: 32px;
-    font-size: 15px;
-    color: @m-blue15;
-    cursor: pointer;
+  width: 15px;
+  height: 32px;
+  line-height: 32px;
+  font-size: 15px;
+  color: @m-blue15;
+  cursor: pointer;
 }
 .minusBtn {
-    position: absolute;
-    top: -6px;
-    left: 14px;
-    z-index: 1;
+  position: absolute;
+  top: -6px;
+  left: 14px;
+  z-index: 1;
 }
 .plusBtn {
-    position: absolute;
-    top: -6px;
-    right: 14px;
-    z-index: 1;
+  position: absolute;
+  top: -6px;
+  right: 14px;
+  z-index: 1;
 }
 
 .stepper {
-    padding-left: 30px;
-    padding-right: 30px;
-    text-align: center;
-    color: @m-yellow1;
-    font-size: 16px;
+  padding-left: 30px;
+  padding-right: 30px;
+  text-align: center;
+  color: @m-yellow1;
+  font-size: 16px;
 }
 .ant-slider.formSlider {
-    width: 260px !important;
-    margin-left: 70px;
-    .ant-slider-rail {
-        margin-right: 0;
-        padding-right: 0;
-        height: 3px !important;
-        border-radius: 2px !important;
-        background-color: @m-blue14;
-    }
-    .ant-slider-track {
-        height: 3px;
-        background-color: @m-blue0;
-    }
-    .ant-slider-step {
-        height: 3px;
-    }
-    .ant-progress-text {
-        display: none;
-    }
+  width: 260px !important;
+  margin-left: 70px;
+  .ant-slider-rail {
+    margin-right: 0;
+    padding-right: 0;
+    height: 3px !important;
+    border-radius: 2px !important;
+    background-color: @m-blue14;
+  }
+  .ant-slider-track {
+    height: 3px;
+    background-color: @m-blue0;
+  }
+  .ant-slider-step {
+    height: 3px;
+  }
+  .ant-progress-text {
+    display: none;
+  }
 }
 </style>

+ 1 - 1
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/setup.ts

@@ -3,7 +3,7 @@ import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
 import { validateCommon } from "@/common/setup/validate";
 import { queryHoldLB } from "@/services/go/wrtrade";
 import { QueryOrderQuoteMyqQsp, WrHoldLB } from "@/services/go/wrtrade/interface";
-import { Wrhold } from "@/views/market/spot_trade/spot_trade_order_transaction/components/delisting/interface";
+import { Wrhold } from "@/views/market/market-spot/spot_trade_order_transaction/components/delisting/interface";
 import { RuleObject } from "ant-design-vue/lib/form/interface";
 import { reactive, Ref, ref, UnwrapRef } from "vue";
 import { ListingForm } from "./interface";

+ 11 - 24
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_blocs/components/post-buying/index.vue

@@ -72,16 +72,6 @@
               </a-form-item>
             </a-col>
             <a-col :span="24">
-              <a-form-item label="交收月" name="DeliveryMonth">
-                <a-month-picker
-                  style="width: 140px"
-                  v-model:value="formState.DeliveryMonth"
-                  :allowClear="'false'"
-                  class="commonDatePicker dialogDatePicker"
-                />
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
               <a-form-item label="挂牌有效期" name="vidaliteTime" class="inputIconBox">
                 <a-date-picker
                   style="width: 260px"
@@ -173,14 +163,16 @@ import moment, { Moment } from 'moment';
 import { getMarketRunByTradeMode, marketIsRun } from '@/services/bus/market';
 import { validateAction } from '@/common/setup/form';
 import { getCanUseMoney } from '@/services/bus/account';
-import { TempWrOrderQuoteDetail } from '@/views/market/spot_trade/components/post_buying/interface';
+import { TempWrOrderQuoteDetail } from '@/views/market/market-spot/components/post_buying/interface';
 import Friend from '@/common/components/friends/index.vue';
 import Permance from '@/common/components/permanceTemp/choosePermancePlanTmp.vue';
-import { BlocsListingForm } from '@/common/setup/warehouse_receipt_trade/interface';
 import { message } from 'ant-design-vue';
 import { useBlocksPrice, useBlocksNumber, useBlocksAccount, useBlocksMoney, useBlocksFriends, useBlocksPermaceTemp, handleForm } from '@/common/setup/warehouse_receipt_trade/listing';
+
+import { BlocsListingForm } from '@/common/setup/warehouse_receipt_trade/interface';
 import { TradeMode } from '@/common/constants/enumCommon';
 import { useVerifyBeginDelistingNum } from '@/hooks/form/verify';
+import { WrResultItem } from '@/views/market/futures/compoments/futures-trade/interface'
 
 export default defineComponent({
   emits: ['cancel', 'update'],
@@ -189,7 +181,7 @@ export default defineComponent({
   props: {
     selectedRow: {
       type: Object as PropType<TempWrOrderQuoteDetail>,
-      default: {},
+      default: { wrResult: [], wrstandardid: 0, deliverygoodsid: 0, wrfactortypeid: 0, minivalue: 0 },
     },
   },
   setup(props, context) {
@@ -199,11 +191,6 @@ export default defineComponent({
     // 验证 起摘数量
     const { v_beginDelistingRules } = useVerifyBeginDelistingNum(props.selectedRow.minivalue);
     rules.delistingQty = v_beginDelistingRules;
-    // 交收月
-    const momth = props.selectedRow.deliverymonth;
-    if (momth) {
-      formState.DeliveryMonth = moment(momth);
-    }
     // 选择朋友
     const { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends } = useBlocksFriends(formState);
     // 履约模板
@@ -269,16 +256,16 @@ export default defineComponent({
             WRTradeGoods: [],
             CanPart: numCheck.value ? 0 : 1, // 是否允许部份摘牌0:不允许;1:允许
             WRStandardID: props.selectedRow.wrstandardid,
-            HasWr: 0, // 无仓单挂牌  是否有无仓单
-            DeliveryMonth: moment(formState.DeliveryMonth).format('YYYY-MM-DD HH:mm:ss'),
-            DelistMinQty: formState.delistingQty, // 起摘数量
+            HasWr: 1, // 无仓单挂牌  是否有无仓单
+            DeliveryMonth: '',
+            DelistMinQty: numCheck.value ? formState.delistingQty : res.delistingQty, // 起摘数量
             MarginFlag: 1, // 挂牌是否指定保证金 0:否 1:是
             MarginAlgorithm: 1, // 指定保证金方式 1:比率 2:固定
             MarginValue: +(formState.margin / 100), // 指定保证金设置值
             AllFriendsFlag: friendCheck.value ? 1 : 0, //是否全好友可见 0:否 1:是
             FactoryItems:
               props.selectedRow.wrResult != undefined
-                ? props.selectedRow.wrResult.map((it) => {
+                ? props.selectedRow.wrResult.map((it: WrResultItem) => {
                   return {
                     DGFactoryItemTypeID: it.dgfactoryitemtypeid, // uint64 要素项类型ID
                     DGFactoryItemID: it.dgfactoryitemid, // uint64 预约要素项类型值
@@ -301,11 +288,11 @@ export default defineComponent({
       formState,
       formRef,
       getCanUseMoney,
-      ...useBlocksAccount(formState),
-      ...useBlocksMoney(formState),
       priceCheck,
       increasePrice,
       decreasePrice,
+      ...useBlocksAccount(formState),
+      ...useBlocksMoney(formState),
       showPermance,
       choosePermance,
       openPermance,

+ 94 - 92
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_blocs/components/sell/index.vue

@@ -1,20 +1,22 @@
 <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="key"
+      :data-source="tableList"
+    >
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
       <template #marginvalue="{ text }">
-        <span>{{ (text * 100).toFixed(2) + '%'}}</span>
+        <span>{{ (text * 100).toFixed(2) + '%' }}</span>
       </template>
       <!-- 议价 -->
       <template #canbargain="{ text }">
@@ -22,7 +24,7 @@
       </template>
       <!-- 整单 -->
       <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
+        <span>{{ text === 1 ? '否' : '是' }}</span>
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -30,15 +32,15 @@
       </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 +59,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/market-spot/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">

+ 22 - 20
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_designate/components/buy/index.vue

@@ -1,15 +1,17 @@
 <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="key"
+      :data-source="tableList"
+    >
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
@@ -22,7 +24,7 @@
       </template>
       <!-- 整单 -->
       <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
+        <span>{{ text === 1 ? '否' : '是' }}</span>
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -30,15 +32,15 @@
       </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>
 
@@ -62,7 +64,7 @@ export default defineComponent({
         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')),
+        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/market-spot/components/detail/index.vue')),
     },
     setup() {
         const isBottom = getShowBottomValue();

+ 363 - 360
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_designate/components/delisting/index.vue

@@ -1,27 +1,29 @@
 <template>
   <!--仓单贸易 贸易圈挂牌 摘牌-->
-  <Drawer :title="isBargin() ? '议价摘牌' : '摘牌'"
-          :placement="'right'"
-          :visible="visible"
-          @cancel="cancel"
-          class="top">
+  <Drawer
+    :title="isBargin() ? '议价摘牌' : '摘牌'"
+    :placement="'right'"
+    :visible="visible"
+    @cancel="cancel"
+    class="top"
+  >
     <div class="post_buying">
-      <a-form class="inlineForm dialogForm"
-              ref="formRef"
-              :model="formState"
-              :rules="rules">
+      <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
         <div class="formBar">
           <a-row :gutter="24">
             <a-col :span="24">
-              <a-form-item label="交易账户"
-                           name="accountid">
-                <a-select class="inlineFormSelect"
-                          style="width: 260px"
-                          v-model:value="formState.accountid"
-                          placeholder="请选择">
-                  <a-select-option v-for="item in accountList"
-                                   :value="item.accountid"
-                                   :key="item.accountid">{{item.accountid}}</a-select-option>
+              <a-form-item label="交易账户" name="accountid">
+                <a-select
+                  class="inlineFormSelect"
+                  style="width: 260px"
+                  v-model:value="formState.accountid"
+                  placeholder="请选择"
+                >
+                  <a-select-option
+                    v-for="item in accountList"
+                    :value="item.accountid"
+                    :key="item.accountid"
+                  >{{ item.accountid }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
@@ -29,120 +31,117 @@
           <a-row :gutter="24">
             <a-col :span="24">
               <a-form-item label="挂牌方">
-                <span class="white ml8">{{selectedRow.username}}</span>
+                <span class="white ml8">{{ selectedRow.username }}</span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
               <a-form-item label="挂牌数量">
-                <span class="white ml8">{{selectedRow.orderqty}}{{selectedRow.enumdicname}}</span>
+                <span class="white ml8">{{ selectedRow.orderqty }}{{ selectedRow.enumdicname }}</span>
               </a-form-item>
             </a-col>
           </a-row>
-          <a-col :span="24"
-                 v-if="isBargin()">
-            <a-form-item label="摘牌价格"
-                         name="price">
-              <a-input-number class="commonInput"
-                              style="width: 260px"
-                              :min="0"
-                              v-model:value="formState.price" />
+          <a-col :span="24" v-if="isBargin()">
+            <a-form-item label="摘牌价格" name="price">
+              <a-input-number
+                class="commonInput"
+                style="width: 260px"
+                :min="0"
+                v-model:value="formState.price"
+              />
             </a-form-item>
           </a-col>
-          <a-col :span="24"
-                 v-else>
+          <a-col :span="24" v-else>
             <a-form-item label="摘牌价格">
-              <span class="white ml8">{{selectedRow.fixedprice}}</span>
+              <span class="white ml8">{{ selectedRow.fixedprice }}</span>
             </a-form-item>
           </a-col>
-          <a-col :span="24"
-                 v-if="isBuy()">
-            <a-form-item label="现货仓单"
-                         name="LadingBillId">
-              <a-select class="inlineFormSelect"
-                        style="width: 260px"
-                        v-model:value="formState.LadingBillId"
-                        placeholder="请选择">
-                <a-select-option v-for="item in wrHoldList"
-                                 :value="item.id"
-                                 :key="item.id">{{item.name}}</a-select-option>
+          <a-col :span="24" v-if="isBuy()">
+            <a-form-item label="现货仓单" name="LadingBillId">
+              <a-select
+                class="inlineFormSelect"
+                style="width: 260px"
+                v-model:value="formState.LadingBillId"
+                placeholder="请选择"
+              >
+                <a-select-option
+                  v-for="item in wrHoldList"
+                  :value="item.id"
+                  :key="item.id"
+                >{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
 
-          <a-row :gutter="24"
-                 v-if="isCanpart()">
+          <a-row :gutter="24" v-if="isCanpart()">
             <a-col :span="24">
-              <a-form-item label="摘牌数量"
-                           class="relative"
-                           name="num">
-                <a-input-number class="dialogInput yellowInput"
-                                style="width: 260px"
-                                :min="0"
-                                :max="getMaxNum()"
-                                v-model:value="formState.num" />
-                <span class="input-enumdicname-absolute">{{selectedRow.enumdicname}}</span>
-                <div class="labelTip">({{selectedRow.delistminqty}}{{selectedRow.enumdicname}}起)
-                </div>
+              <a-form-item label="摘牌数量" class="relative" name="num">
+                <a-input-number
+                  class="dialogInput yellowInput"
+                  style="width: 260px"
+                  :min="0"
+                  :max="getMaxNum()"
+                  v-model:value="formState.num"
+                />
+                <span class="input-enumdicname-absolute">{{ selectedRow.enumdicname }}</span>
+                <div class="labelTip">({{ selectedRow.delistminqty }}{{ selectedRow.enumdicname }}起)</div>
               </a-form-item>
             </a-col>
           </a-row>
-          <a-row :gutter="24"
-                 v-if="isCanpart()">
-            <a-col :span="24"
-                   class="mt-20">
+          <a-row :gutter="24" v-if="isCanpart()">
+            <a-col :span="24" class="mt-20">
               <a-form-item>
-                <a-slider :min="0"
-                          v-model:value="formState.num"
-                          :max="selectedRow.orderqty"
-                          class="formSlider"
-                          style="width: 260px" />
+                <a-slider
+                  :min="0"
+                  v-model:value="formState.num"
+                  :max="selectedRow.orderqty"
+                  class="formSlider"
+                  style="width: 260px"
+                />
                 <div class="unit">
                   <span>0</span>
-                  <span>{{getMaxNum()}}{{selectedRow.enumdicname}}</span>
+                  <span>{{ getMaxNum() }}{{ selectedRow.enumdicname }}</span>
                 </div>
               </a-form-item>
             </a-col>
             <a-col :span="12">&nbsp;</a-col>
           </a-row>
-          <a-col :span="24"
-                 v-if="!isCanpart()">
+          <a-col :span="24" v-if="!isCanpart()">
             <a-form-item label="摘牌数量">
-              <span class="white ml8">{{selectedRow.orderqty}}{{selectedRow.enumdicname}}</span>
+              <span class="white ml8">{{ selectedRow.orderqty }}{{ selectedRow.enumdicname }}</span>
             </a-form-item>
           </a-col>
           <a-row :gutter="24">
-            <a-col :span="24"
-                   class="mt-20">
+            <a-col :span="24" class="mt-20">
               <a-form-item label="摘牌金额">
-                <span class="white ml8">{{getMoney()}}</span>
+                <span class="white ml8">{{ getMoney() }}</span>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
             <a-col :span="24">
               <a-form-item label="履约保证金">
-                <span class="white ml8">{{getMargin()}}</span>
+                <span class="white ml8">{{ getMargin() }}</span>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
             <a-col :span="24">
               <a-form-item label="可用资金">
-                <span class="white ml8">{{getCanUseMoney(getSelectedAccount())}}</span>
+                <span class="white ml8">{{ getCanUseMoney(getSelectedAccount()) }}</span>
               </a-form-item>
             </a-col>
           </a-row>
         </div>
         <a-row :gutter="24">
-          <a-col :span="24"
-                 class="fixedBtns">
+          <a-col :span="24" class="fixedBtns">
             <a-form-item class="btnCenter">
-              <a-button class="listedBtn"
-                        :loading="loading"
-                        :disabled="loading"
-                        @click="submit">{{isBuy() ? '卖出' : '买入'}}</a-button>
-              <a-button class="ml10 cancelBtn"
-                        @click="cancel">取消</a-button>
+              <a-button
+                class="listedBtn"
+                :loading="loading"
+                :disabled="loading"
+                @click="submit"
+              >{{ isBuy() ? '卖出' : '买入' }}</a-button>
+              <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
             </a-form-item>
           </a-col>
         </a-row>
@@ -173,7 +172,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 
 import { BuyOrSell, TradeMode } from '@/common/constants/enumCommon';
 import { getCanUseMoney } from '@/services/bus/account';
-import { TempWrOrderQuoteDetail } from '@/views/market/spot_trade/components/post_buying/interface';
+import { TempWrOrderQuoteDetail } from '@/views/market/market-spot/components/post_buying/interface';
 import { handleForm, handleSpotWarrant } from './setup';
 import { getRules } from '@/services/bus/rules';
 import { ListingForm } from './interface';
@@ -182,328 +181,332 @@ import Long from 'long';
 import Bus from '@/utils/eventBus';
 
 export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'warehouse_receipt_trade_blocs_delisting_tab',
-    components: { Des, Drawer, PlusOutlined, MinusOutlined },
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryOrderQuoteMyqQsp>,
-            default: {},
-        },
-        buyOrSell: {
-            type: Number as PropType<BuyOrSell>,
-            default: BuyOrSell.buy,
-        },
-        componentId: {
-            type: String,
-            default: '',
-        },
+  emits: ['cancel', 'update'],
+  name: 'warehouse_receipt_trade_blocs_delisting_tab',
+  components: { Des, Drawer, PlusOutlined, MinusOutlined },
+  props: {
+    selectedRow: {
+      type: Object as PropType<QueryOrderQuoteMyqQsp>,
+      default: {},
     },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const { rules, formState, formRef } = handleForm();
-        const loading = ref<boolean>(false);
-        const accountList = getAccountTypeList([2]);
-        // 现货仓单
-        const { wrHoldList, allWrHoldList } = handleSpotWarrant(props.buyOrSell, props.selectedRow, loading);
-        if (accountList.length) {
-            formState.accountid = accountList[0].accountid;
-        }
+    buyOrSell: {
+      type: Number as PropType<BuyOrSell>,
+      default: BuyOrSell.buy,
+    },
+    componentId: {
+      type: String,
+      default: '',
+    },
+  },
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context);
+    const { rules, formState, formRef } = handleForm();
+    const loading = ref<boolean>(false);
+    const accountList = getAccountTypeList([2]);
+    // 现货仓单
+    const { wrHoldList, allWrHoldList } = handleSpotWarrant(props.buyOrSell, props.selectedRow, loading);
+    if (accountList.length) {
+      formState.accountid = accountList[0].accountid;
+    }
 
-        function getSelectedAccount() {
-            return accountList.find((e) => e.accountid === formState.accountid)!;
-        }
-        function getPrice() {
-            return isBargin() ? formState.price : props.selectedRow.fixedprice;
-        }
-        function getNum() {
-            return isCanpart() ? formState.num : props.selectedRow.orderqty;
-        }
-        // 摘牌金额
-        function getMoney() {
-            const price = getPrice();
-            const num = getNum();
-            if (price) {
-                return (price * num).toFixed(2);
-            } else {
-                return '--';
-            }
-        }
-        // 履约保证金
-        function getMargin() {
-            const price = getPrice();
-            const num = getNum();
-            let result = 0;
-            const { marginvalue } = props.selectedRow;
-            if (price && num && marginvalue) {
-                result = price * num * marginvalue;
-            }
-            return result ? Math.floor(2) : '--';
-        }
-        function getMaxNum() {
-            const qty = props.selectedRow.orderqty;
-            let result = 0;
-            if (!isBuy()) {
-                // 交易规则
-                const rules = getRules();
-                const { buymarginvalue } = rules.length ? rules[0] : { buymarginvalue: 0 };
-                const canUseMoney = Number(getCanUseMoney(getSelectedAccount()));
-                if (canUseMoney && !isNaN(canUseMoney)) {
-                    const num = +(canUseMoney / buymarginvalue).toFixed(0);
-                    // 买 最大可摘数量=min{挂牌数量,可用资金/(履约保证金比例)}
-                    result = Math.min(qty, num);
-                }
-            } else {
-                // 卖出 最大可摘数量=min{挂牌数量,仓单可用数量}
-                const id = formState.LadingBillId;
-                if (id) {
-                    const item = allWrHoldList.value.find((el) => el.ladingbillid === id)!;
-                    result = Math.min(qty, item.enableqty);
-                }
-            }
-            return result;
-        }
-        function isBuy() {
-            return props.buyOrSell === BuyOrSell.buy;
-        }
-        // 是否部分摘牌
-        function isCanpart() {
-            return props.selectedRow.canpart === 1;
+    function getSelectedAccount() {
+      return accountList.find((e) => e.accountid === formState.accountid)!;
+    }
+    function getPrice() {
+      return isBargin() ? formState.price : props.selectedRow.fixedprice;
+    }
+    function getNum() {
+      return isCanpart() ? formState.num : props.selectedRow.orderqty;
+    }
+    // 摘牌金额
+    function getMoney() {
+      const price = getPrice();
+      const num = getNum();
+      if (price) {
+        return (price * num).toFixed(2);
+      } else {
+        return '--';
+      }
+    }
+    // 履约保证金
+    function getMargin() {
+      const price = getPrice();
+      const num = getNum();
+      let result = 0;
+      const { marginvalue } = props.selectedRow;
+      if (price && num && marginvalue) {
+        result = price * num * marginvalue;
+      }
+      return result ? Math.floor(2) : '--';
+    }
+    function getMaxNum() {
+      const qty = props.selectedRow.orderqty;
+      let result = 0;
+      if (!isBuy()) {
+        // 交易规则
+        const rules = getRules();
+        const { buymarginvalue } = rules.length ? rules[0] : { buymarginvalue: 0 };
+        const canUseMoney = Number(getCanUseMoney(getSelectedAccount()));
+        if (canUseMoney && !isNaN(canUseMoney)) {
+          const num = +(canUseMoney / buymarginvalue).toFixed(0);
+          // 买 最大可摘数量=min{挂牌数量,可用资金/(履约保证金比例)}
+          result = Math.min(qty, num);
         }
-        // 是否议价 摘牌
-        function isBargin() {
-            return props.componentId === 'warehouse_receipt_trade_blocs_bargain_delisting';
-        }
-        if (isBargin()) {
-            formState.price = props.selectedRow.fixedprice;
+      } else {
+        // 卖出 最大可摘数量=min{挂牌数量,仓单可用数量}
+        const id = formState.LadingBillId;
+        if (id) {
+          const item = allWrHoldList.value.find((el) => el.ladingbillid === id)!;
+          result = Math.min(qty, item.enableqty);
         }
+      }
+      return result;
+    }
+    function isBuy() {
+      return props.buyOrSell === BuyOrSell.buy;
+    }
+    // 是否部分摘牌
+    function isCanpart() {
+      return props.selectedRow.canpart === 1;
+    }
+    // 是否议价 摘牌
+    function isBargin() {
+      return props.componentId === 'warehouse_receipt_trade_blocs_bargain_delisting';
+    }
+    if (isBargin()) {
+      formState.price = props.selectedRow.fixedprice;
+    }
 
-        function submit() {
-            // 判断是否开市
-            if (!marketIsRun(TradeMode.WarehouseReceiptTrade)) {
-                return;
+    function submit() {
+      // 判断是否开市
+      if (!marketIsRun(TradeMode.WarehouseReceiptTrade)) {
+        return;
+      }
+      validateAction<ListingForm>(formRef, formState).then((res) => {
+        const price = getPrice();
+        const num = getNum();
+        if (isBargin()) {
+          // 议价摘牌
+          const param: WrBargainApplyReq = {
+            WRTradeOrderID: Long.fromString(props.selectedRow.wrtradeorderid),
+            ApplyQty: num,
+            UserID: getUserId().toString(),
+            AccountID: getSelectedAccountId().toString(),
+            BuyOrSell: (isBuy() ? BuyOrSell.sell : BuyOrSell.buy).toString(),
+            ApplyPrice: price.toString(),
+            ApplyRemark: '',
+          };
+          requestResultLoadingAndInfo(wrBargainApply, param, loading, ['议价摘牌成功', '议价摘牌失败:']).then(() => {
+            cancel(true);
+            Bus.$emit('blocsTrade', true);
+          });
+        } else {
+          // 首先确定  这是仓单贸易的有仓单挂摘牌 HasWr = 1
+          // 其次判断  摘牌 1。摘买 (需要通过自己的仓单进行摘买)  2。摘卖 (不需要通过仓单)
+          const param = {
+            UserID: getUserId(), // uint32 用户ID
+            AccountID: getSelectedAccountId(), // uint64 资金账号
+            RelatedWRTradeOrderID: props.selectedRow.wrtradeorderid, // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
+            WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
+            OrderQty: num, // uint64 委托数量
+            OrderSrc: 0, // uint32 委托来源
+            ClientSerialNo: uuidv4(), // string 客户端流水号
+            ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
+            ClientType: 4, // uint32 终端类型
+            OperatorID: getUserId(), // uint64 操作员账号ID
+            BuyOrSell: 0, // uint32 买卖方向
+            ApplyID: 0, // uint64 申请ID
+            LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
+            SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
+            WRFactorTypeId: Long.fromString(props.selectedRow.wrfactortypeid), // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
+            TradeDate: moment().format('YYYYMMDD'), // string 交易日
+            DeliveryMonth: '', // string 交收月
+            HasWr: 1, // uint32 是否有仓单-0:没有仓单 1:有仓单
+            IsFinancing: 0, // uint32 是否融资购买(买摘牌时有效)-0:否 1:是
+            ProductDetailID: res.caseId, // uint64 金融机构产品组合ID(融资购买时有效)
+          };
+          // 摘买方向
+          if (isBuy()) {
+            param.BuyOrSell = BuyOrSell.sell;
+            param.LadingBillId = Long.fromString(res.LadingBillId);
+            const item = wrHoldList.value.find((el) => el.id === res.LadingBillId);
+            if (item) {
+              param.SubNum = +item.subnum;
             }
-            validateAction<ListingForm>(formRef, formState).then((res) => {
-                const price = getPrice();
-                const num = getNum();
-                if (isBargin()) {
-                    // 议价摘牌
-                    const param: WrBargainApplyReq = {
-                        WRTradeOrderID: Long.fromString(props.selectedRow.wrtradeorderid),
-                        ApplyQty: num,
-                        UserID: getUserId().toString(),
-                        AccountID: getSelectedAccountId().toString(),
-                        BuyOrSell: (isBuy() ? BuyOrSell.sell : BuyOrSell.buy).toString(),
-                        ApplyPrice: price.toString(),
-                        ApplyRemark: '',
-                    };
-                    requestResultLoadingAndInfo(wrBargainApply, param, loading, ['议价摘牌成功', '议价摘牌失败:']).then(() => {
-                        cancel(true);
-                        Bus.$emit('blocsTrade', true);
-                    });
-                } else {
-                    // 首先确定  这是仓单贸易的有仓单挂摘牌 HasWr = 1
-                    // 其次判断  摘牌 1。摘买 (需要通过自己的仓单进行摘买)  2。摘卖 (不需要通过仓单)
-                    const param = {
-                        UserID: getUserId(), // uint32 用户ID
-                        AccountID: getSelectedAccountId(), // uint64 资金账号
-                        RelatedWRTradeOrderID: props.selectedRow.wrtradeorderid, // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
-                        WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
-                        OrderQty: num, // uint64 委托数量
-                        OrderSrc: 0, // uint32 委托来源
-                        ClientSerialNo: uuidv4(), // string 客户端流水号
-                        ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
-                        ClientType: 4, // uint32 终端类型
-                        OperatorID: getUserId(), // uint64 操作员账号ID
-                        BuyOrSell: 0, // uint32 买卖方向
-                        ApplyID: 0, // uint64 申请ID
-                        LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
-                        SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
-                        WRFactorTypeId: Long.fromString(props.selectedRow.wrfactortypeid), // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
-                        TradeDate: moment().format('YYYYMMDD'), // string 交易日
-                        DeliveryMonth: '', // string 交收月
-                        HasWr: 1, // uint32 是否有仓单-0:没有仓单 1:有仓单
-                        IsFinancing: 0, // uint32 是否融资购买(买摘牌时有效)-0:否 1:是
-                        ProductDetailID: res.caseId, // uint64 金融机构产品组合ID(融资购买时有效)
-                    };
-                    // 摘买方向
-                    if (isBuy()) {
-                        param.BuyOrSell = BuyOrSell.sell;
-                        param.LadingBillId = Long.fromString(res.LadingBillId);
-                        const item = wrHoldList.value.find((el) => el.id === res.LadingBillId);
-                        if (item) {
-                            param.SubNum = +item.subnum;
-                        }
-                    } else {
-                        param.BuyOrSell = BuyOrSell.buy;
-                    }
+          } else {
+            param.BuyOrSell = BuyOrSell.buy;
+          }
 
-                    requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
-                        cancel(true);
-                        Bus.$emit('blocsTrade', true);
-                    });
-                }
-            });
+          requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
+            cancel(true);
+            Bus.$emit('blocsTrade', true);
+          });
         }
-        return {
-            submit,
-            cancel,
-            visible,
-            accountList,
-            rules,
-            formState,
-            formRef,
-            getSelectedAccount,
-            getCanUseMoney,
-            getMoney,
-            isBuy,
-            isBargin,
-            wrHoldList,
-            loading,
-            getMaxNum,
-            isCanpart,
-            getMargin,
-        };
-    },
+      });
+    }
+    return {
+      submit,
+      cancel,
+      visible,
+      accountList,
+      rules,
+      formState,
+      formRef,
+      getSelectedAccount,
+      getCanUseMoney,
+      getMoney,
+      isBuy,
+      isBargin,
+      wrHoldList,
+      loading,
+      getMaxNum,
+      isCanpart,
+      getMargin,
+    };
+  },
 });
 </script>
 
 <style lang="less">
 .post_buying {
-    width: 100%;
+  width: 100%;
+  height: 100%;
+  .flex;
+  flex-direction: column;
+  position: relative;
+  overflow: hidden;
+  .ant-form {
     height: 100%;
-    .flex;
-    flex-direction: column;
-    position: relative;
-    overflow: hidden;
-    .ant-form {
-        height: 100%;
+  }
+  .condition {
+    width: 100%;
+    height: 48px;
+    margin: 0 16px;
+    padding: 10px 0;
+    border-bottom: 1px solid @m-black6;
+    .inlineflex;
+    .conditionBtn {
+      align-self: center;
+      align-items: center;
+      border: 0;
+      min-width: 80px;
+      height: 28px;
+      line-height: 28px;
+      background: @m-black7;
+      .rounded-corners(3px);
+      font-size: 14px;
+      color: @m-blue0;
+      &:hover {
+        background: @m-black7-hover;
+        color: @m-blue0-hover;
+      }
     }
-    .condition {
-        width: 100%;
-        height: 48px;
-        margin: 0 16px;
-        padding: 10px 0;
-        border-bottom: 1px solid @m-black6;
-        .inlineflex;
-        .conditionBtn {
-            align-self: center;
-            align-items: center;
-            border: 0;
-            min-width: 80px;
-            height: 28px;
-            line-height: 28px;
-            background: @m-black7;
-            .rounded-corners(3px);
-            font-size: 14px;
-            color: @m-blue0;
-            &:hover {
-                background: @m-black7-hover;
-                color: @m-blue0-hover;
-            }
-        }
-        .conditionBtn + .conditionBtn {
-            margin-left: 10px;
-        }
+    .conditionBtn + .conditionBtn {
+      margin-left: 10px;
     }
+  }
 }
 
 .unit {
-    margin-left: 70px;
-    width: 260px;
-    .flex;
-    justify-content: space-between;
-    font-size: 14px;
-    color: @m-grey41;
-    height: 14px;
-    line-height: 14px;
+  margin-left: 70px;
+  width: 260px;
+  .flex;
+  justify-content: space-between;
+  font-size: 14px;
+  color: @m-grey41;
+  height: 14px;
+  line-height: 14px;
 }
 .listedBtn {
-    width: 120px;
-    height: 30px;
-    line-height: 30px;
-    background: linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
-    border-radius: 3px;
-    color: @m-white0;
-    font-size: 14px;
-    text-align: center;
-    border: 0;
-    &:hover {
-        background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
-        color: @m-white0-hover;
-    }
+  width: 120px;
+  height: 30px;
+  line-height: 30px;
+  background: linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
+  border-radius: 3px;
+  color: @m-white0;
+  font-size: 14px;
+  text-align: center;
+  border: 0;
+  &:hover {
+    background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
+    color: @m-white0-hover;
+  }
 }
 .cancelBtn:extend(.listedBtn) {
-    background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
-    &:hover {
-        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%) !important;
-        color: @m-white0-hover;
-    }
+  background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
+  &:hover {
+    background: linear-gradient(
+      0deg,
+      @m-grey12-hover 0%,
+      @m-grey13-hover 100%
+    ) !important;
+    color: @m-white0-hover;
+  }
 }
 .ml10 {
-    margin-left: 10px;
+  margin-left: 10px;
 }
 .ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
+  margin-bottom: 14px;
 }
 .mt20 {
-    margin-top: 20px;
+  margin-top: 20px;
 }
 .mt-10 {
-    margin-top: -10px;
+  margin-top: -10px;
 }
 .ant-input-suffix {
-    position: absolute;
-    right: -25px;
+  position: absolute;
+  right: -25px;
 }
 .minusBtn,
 .plusBtn {
-    width: 15px;
-    height: 32px;
-    line-height: 32px;
-    font-size: 15px;
-    color: @m-blue15;
-    cursor: pointer;
+  width: 15px;
+  height: 32px;
+  line-height: 32px;
+  font-size: 15px;
+  color: @m-blue15;
+  cursor: pointer;
 }
 .minusBtn {
-    position: absolute;
-    top: -6px;
-    left: 14px;
-    z-index: 1;
+  position: absolute;
+  top: -6px;
+  left: 14px;
+  z-index: 1;
 }
 .plusBtn {
-    position: absolute;
-    top: -6px;
-    right: 14px;
-    z-index: 1;
+  position: absolute;
+  top: -6px;
+  right: 14px;
+  z-index: 1;
 }
 
 .stepper {
-    padding-left: 30px;
-    padding-right: 30px;
-    text-align: center;
-    color: @m-yellow1;
-    font-size: 16px;
+  padding-left: 30px;
+  padding-right: 30px;
+  text-align: center;
+  color: @m-yellow1;
+  font-size: 16px;
 }
 .ant-slider.formSlider {
-    width: 260px !important;
-    margin-left: 70px;
-    .ant-slider-rail {
-        margin-right: 0;
-        padding-right: 0;
-        height: 3px !important;
-        border-radius: 2px !important;
-        background-color: @m-blue14;
-    }
-    .ant-slider-track {
-        height: 3px;
-        background-color: @m-blue0;
-    }
-    .ant-slider-step {
-        height: 3px;
-    }
-    .ant-progress-text {
-        display: none;
-    }
+  width: 260px !important;
+  margin-left: 70px;
+  .ant-slider-rail {
+    margin-right: 0;
+    padding-right: 0;
+    height: 3px !important;
+    border-radius: 2px !important;
+    background-color: @m-blue14;
+  }
+  .ant-slider-track {
+    height: 3px;
+    background-color: @m-blue0;
+  }
+  .ant-slider-step {
+    height: 3px;
+  }
+  .ant-progress-text {
+    display: none;
+  }
 }
 </style>

+ 1 - 1
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_designate/components/delisting/setup.ts

@@ -3,7 +3,7 @@ import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
 import { validateCommon } from "@/common/setup/validate";
 import { queryHoldLB } from "@/services/go/wrtrade";
 import { QueryOrderQuoteMyqQsp, WrHoldLB } from "@/services/go/wrtrade/interface";
-import { Wrhold } from "@/views/market/spot_trade/spot_trade_order_transaction/components/delisting/interface";
+import { Wrhold } from "@/views/market/market-spot/spot_trade_order_transaction/components/delisting/interface";
 import { RuleObject } from "ant-design-vue/lib/form/interface";
 import { reactive, Ref, ref, UnwrapRef } from "vue";
 import { ListingForm } from "./interface";

+ 4 - 3
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_designate/components/post-buying/index.vue

@@ -173,7 +173,7 @@ import moment, { Moment } from 'moment';
 import { getMarketRunByTradeMode, marketIsRun } from '@/services/bus/market';
 import { validateAction } from '@/common/setup/form';
 import { getCanUseMoney } from '@/services/bus/account';
-import { TempWrOrderQuoteDetail } from '@/views/market/spot_trade/components/post_buying/interface';
+import { TempWrOrderQuoteDetail } from '@/views/market/market-spot/components/post_buying/interface';
 import Friend from '@/common/components/friends/index.vue';
 import Permance from '@/common/components/permanceTemp/choosePermancePlanTmp.vue';
 import { BlocsListingForm } from '@/common/setup/warehouse_receipt_trade/interface';
@@ -181,6 +181,7 @@ import { message } from 'ant-design-vue';
 import { useBlocksPrice, useBlocksNumber, useBlocksAccount, useBlocksMoney, useBlocksFriends, useBlocksPermaceTemp, handleForm } from '@/common/setup/warehouse_receipt_trade/listing';
 import { TradeMode } from '@/common/constants/enumCommon';
 import { useVerifyBeginDelistingNum } from '@/hooks/form/verify';
+import { WrResultItem } from '@/views/market/futures/compoments/futures-trade/interface'
 
 export default defineComponent({
   emits: ['cancel', 'update'],
@@ -189,7 +190,7 @@ export default defineComponent({
   props: {
     selectedRow: {
       type: Object as PropType<TempWrOrderQuoteDetail>,
-      default: {},
+      default: { wrResult: [], wrstandardid: 0, deliverygoodsid: 0, wrfactortypeid: 0, minivalue: 0, deliverymonth: '' },
     },
   },
   setup(props, context) {
@@ -278,7 +279,7 @@ export default defineComponent({
             AllFriendsFlag: friendCheck.value ? 1 : 0, //是否全好友可见 0:否 1:是
             FactoryItems:
               props.selectedRow.wrResult != undefined
-                ? props.selectedRow.wrResult.map((it) => {
+                ? props.selectedRow.wrResult.map((it: WrResultItem) => {
                   return {
                     DGFactoryItemTypeID: it.dgfactoryitemtypeid, // uint64 要素项类型ID
                     DGFactoryItemID: it.dgfactoryitemid, // uint64 预约要素项类型值

+ 22 - 20
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_designate/components/sell/index.vue

@@ -1,15 +1,17 @@
 <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="key"
+      :data-source="tableList"
+    >
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
@@ -22,7 +24,7 @@
       </template>
       <!-- 整单 -->
       <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
+        <span>{{ text === 1 ? '否' : '是' }}</span>
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -30,15 +32,15 @@
       </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>
 
@@ -62,7 +64,7 @@ export default defineComponent({
         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')),
+        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/market-spot/components/detail/index.vue')),
     },
     setup() {
         const isBottom = getShowBottomValue();

+ 25 - 26
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_floating_price/index.vue

@@ -1,29 +1,28 @@
 <template>
-  <!-- 仓单预售 浮动价预售-->
-  <div class="topTableHeight">
-    <Filter :enumName="name"
-            @buy="buyOpen"
-            @filterGoods="filterGoods"
-            @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>
-    <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="firstBtn"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :enumName="name"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
-  </div>
+    <!-- 仓单预售 浮动价预售-->
+    <div class="topTableHeight">
+        <Filter :enumName="name" @buy="buyOpen" @filterGoods="filterGoods" @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>
+        <!-- 右键 -->
+        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
+        <component
+            :is="componentId"
+            v-if="componentId"
+            :enumName="name"
+            :selectedRow="selectedRow"
+            @cancel="closeComponent"
+        ></component>
+    </div>
 </template>
 
 <script lang="ts">
@@ -31,7 +30,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { handleComposeTable } from '@/views/market/market-spot/setup';
 import Filter from '../../components/filter/index.vue';
 import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
 import { ref } from 'vue';

+ 25 - 25
src/views/market/market-spot/warehouse_pre_sale/warehouse_pre_sale_price/index.vue

@@ -1,28 +1,28 @@
 <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>
-    <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="firstBtn"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :enumName="name"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
-  </div>
+    <!-- 仓单预售 一口价预售-->
+    <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>
+        <!-- 右键 -->
+        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
+        <component
+            :is="componentId"
+            v-if="componentId"
+            :enumName="name"
+            :selectedRow="selectedRow"
+            @cancel="closeComponent"
+        ></component>
+    </div>
 </template>
 
 <script lang="ts">
@@ -30,7 +30,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { handleComposeTable } from '@/views/market/market-spot/setup';
 import Filter from '../../components/filter/index.vue';
 import { getShowBottomValue } from '@/common/config/constrolBottom';
 import Bus from '@/utils/eventBus/index';

+ 98 - 92
src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/buy/index.vue

@@ -1,20 +1,22 @@
 <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="key"
+      :data-source="tableList"
+    >
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
       <template #marginvalue="{ text }">
-        <span>{{ (text * 100).toFixed(2) + '%'}}</span>
+        <span>{{ (text * 100).toFixed(2) + '%' }}</span>
       </template>
       <!-- 议价 -->
       <template #canbargain="{ text }">
@@ -22,7 +24,7 @@
       </template>
       <!-- 整单 -->
       <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
+        <span>{{ text === 1 ? '否' : '是' }}</span>
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -30,15 +32,19 @@
       </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 +63,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/market-spot/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">

+ 1 - 1
src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/delisting/setup.ts

@@ -3,7 +3,7 @@ import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
 import { validateCommon } from "@/common/setup/validate";
 import { queryHoldLB } from "@/services/go/wrtrade";
 import { QueryOrderQuoteMyqQsp, WrHoldLB } from "@/services/go/wrtrade/interface";
-import { Wrhold } from "@/views/market/spot_trade/spot_trade_order_transaction/components/delisting/interface";
+import { Wrhold } from "@/views/market/market-spot/spot_trade_order_transaction/components/delisting/interface";
 import { RuleObject } from "ant-design-vue/lib/form/interface";
 import { reactive, Ref, ref, UnwrapRef } from "vue";
 import { ListingForm } from "./interface";

+ 20 - 18
src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/post-buying/index.vue

@@ -149,28 +149,30 @@
 </template>
 
 <script lang="ts">
+import { defineComponent, PropType, ref, UnwrapRef } from 'vue';
 import { Des } from '@/common/components/commonDes';
-import Drawer from '@/common/components/drawer/index.vue';
-import Friend from '@/common/components/friends/index.vue';
-import Permance from '@/common/components/permanceTemp/choosePermancePlanTmp.vue';
-import { TradeMode } from '@/common/constants/enumCommon';
+import { _closeModal } from '@/common/setup/modal/modal';
 import { ModalEnum } from '@/common/constants/modalNameEnum';
+import Drawer from '@/common/components/drawer/index.vue';
+import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
+import { hdWROrder } from '@/services/proto/warehousetrade';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { validateAction } from '@/common/setup/form';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { BlocsListingForm } from '@/common/setup/warehouse_receipt_trade/interface';
-import { handleForm, useBlocksAccount, useBlocksFriends, useBlocksMoney, useBlocksNumber, useBlocksPermaceTemp, useBlocksPrice } from '@/common/setup/warehouse_receipt_trade/listing';
-import { useVerifyBeginDelistingNum } from '@/hooks/form/verify';
-import { getCanUseMoney, getUserId } from '@/services/bus/account';
+import { getUserId } from '@/services/bus/account';
+import { v3, v4 as uuidv4 } from 'uuid';
+import moment, { Moment } from 'moment';
 import { getMarketRunByTradeMode, marketIsRun } from '@/services/bus/market';
-import { hdWROrder } from '@/services/proto/warehousetrade';
-import { TempWrOrderQuoteDetail } from '@/views/market/spot_trade/components/post_buying/interface';
-import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
+import { validateAction } from '@/common/setup/form';
+import { getCanUseMoney } from '@/services/bus/account';
+import { TempWrOrderQuoteDetail } from '@/views/market/market-spot/components/post_buying/interface';
+import Friend from '@/common/components/friends/index.vue';
+import Permance from '@/common/components/permanceTemp/choosePermancePlanTmp.vue';
 import { message } from 'ant-design-vue';
-import moment from 'moment';
-import { v4 as uuidv4 } from 'uuid';
-import { defineComponent, PropType, ref } from 'vue';
+import { useBlocksPrice, useBlocksNumber, useBlocksAccount, useBlocksMoney, useBlocksFriends, useBlocksPermaceTemp, handleForm } from '@/common/setup/warehouse_receipt_trade/listing';
 
+import { BlocsListingForm } from '@/common/setup/warehouse_receipt_trade/interface';
+import { TradeMode } from '@/common/constants/enumCommon';
+import { useVerifyBeginDelistingNum } from '@/hooks/form/verify';
+import { WrResultItem } from '@/views/market/futures/compoments/futures-trade/interface'
 
 export default defineComponent({
   emits: ['cancel', 'update'],
@@ -179,7 +181,7 @@ export default defineComponent({
   props: {
     selectedRow: {
       type: Object as PropType<TempWrOrderQuoteDetail>,
-      default: {},
+      default: { wrResult: [], wrstandardid: 0, deliverygoodsid: 0, wrfactortypeid: 0, minivalue: 0 },
     },
   },
   setup(props, context) {
@@ -263,7 +265,7 @@ export default defineComponent({
             AllFriendsFlag: friendCheck.value ? 1 : 0, //是否全好友可见 0:否 1:是
             FactoryItems:
               props.selectedRow.wrResult != undefined
-                ? props.selectedRow.wrResult.map((it) => {
+                ? props.selectedRow.wrResult.map((it: WrResultItem) => {
                   return {
                     DGFactoryItemTypeID: it.dgfactoryitemtypeid, // uint64 要素项类型ID
                     DGFactoryItemID: it.dgfactoryitemid, // uint64 预约要素项类型值

+ 26 - 20
src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/sell/index.vue

@@ -1,15 +1,17 @@
 <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="key"
+      :data-source="tableList"
+    >
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
@@ -22,7 +24,7 @@
       </template>
       <!-- 整单 -->
       <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
+        <span>{{ text === 1 ? '否' : '是' }}</span>
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -30,15 +32,19 @@
       </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>
 
@@ -62,7 +68,7 @@ export default defineComponent({
         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')),
+        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/market-spot/components/detail/index.vue')),
     },
     setup() {
         const isBottom = getShowBottomValue();

+ 26 - 20
src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_designate/components/buy/index.vue

@@ -1,15 +1,17 @@
 <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="key"
+      :data-source="tableList"
+    >
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
@@ -22,7 +24,7 @@
       </template>
       <!-- 整单 -->
       <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
+        <span>{{ text === 1 ? '否' : '是' }}</span>
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -30,15 +32,19 @@
       </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>
 
@@ -62,7 +68,7 @@ export default defineComponent({
         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')),
+        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/market-spot/components/detail/index.vue')),
     },
     setup() {
         const isBottom = getShowBottomValue();

+ 1 - 1
src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_designate/components/delisting/setup.ts

@@ -3,7 +3,7 @@ import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
 import { validateCommon } from "@/common/setup/validate";
 import { queryHoldLB } from "@/services/go/wrtrade";
 import { QueryOrderQuoteMyqQsp, WrHoldLB } from "@/services/go/wrtrade/interface";
-import { Wrhold } from "@/views/market/spot_trade/spot_trade_order_transaction/components/delisting/interface";
+import { Wrhold } from "@/views/market/market-spot/spot_trade_order_transaction/components/delisting/interface";
 import { RuleObject } from "ant-design-vue/lib/form/interface";
 import { reactive, Ref, ref, UnwrapRef } from "vue";
 import { ListingForm } from "./interface";

+ 4 - 3
src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_designate/components/post-buying/index.vue

@@ -163,7 +163,7 @@ import moment, { Moment } from 'moment';
 import { getMarketRunByTradeMode, marketIsRun } from '@/services/bus/market';
 import { validateAction } from '@/common/setup/form';
 import { getCanUseMoney } from '@/services/bus/account';
-import { TempWrOrderQuoteDetail } from '@/views/market/spot_trade/components/post_buying/interface';
+import { TempWrOrderQuoteDetail } from '@/views/market/market-spot/components/post_buying/interface';
 import Friend from '@/common/components/friends/index.vue';
 import Permance from '@/common/components/permanceTemp/choosePermancePlanTmp.vue';
 import { message } from 'ant-design-vue';
@@ -172,6 +172,7 @@ import { useBlocksPrice, useBlocksNumber, useBlocksAccount, useBlocksMoney, useB
 import { BlocsListingForm } from '@/common/setup/warehouse_receipt_trade/interface';
 import { TradeMode } from '@/common/constants/enumCommon';
 import { useVerifyBeginDelistingNum } from '@/hooks/form/verify';
+import { WrResultItem } from '@/views/market/futures/compoments/futures-trade/interface'
 
 export default defineComponent({
   emits: ['cancel', 'update'],
@@ -180,7 +181,7 @@ export default defineComponent({
   props: {
     selectedRow: {
       type: Object as PropType<TempWrOrderQuoteDetail>,
-      default: {},
+      default: { wrResult: [], wrstandardid: 0, deliverygoodsid: 0, wrfactortypeid: 0, minivalue: 0 },
     },
   },
   setup(props, context) {
@@ -264,7 +265,7 @@ export default defineComponent({
             AllFriendsFlag: friendCheck.value ? 1 : 0, //是否全好友可见 0:否 1:是
             FactoryItems:
               props.selectedRow.wrResult != undefined
-                ? props.selectedRow.wrResult.map((it) => {
+                ? props.selectedRow.wrResult.map((it: WrResultItem) => {
                   return {
                     DGFactoryItemTypeID: it.dgfactoryitemtypeid, // uint64 要素项类型ID
                     DGFactoryItemID: it.dgfactoryitemid, // uint64 预约要素项类型值

+ 26 - 20
src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_designate/components/sell/index.vue

@@ -1,15 +1,17 @@
 <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="key"
+      :data-source="tableList"
+    >
       <template #index="{ index }">
         <span>{{ index + 1 }}</span>
       </template>
@@ -22,7 +24,7 @@
       </template>
       <!-- 整单 -->
       <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
+        <span>{{ text === 1 ? '否' : '是' }}</span>
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -30,15 +32,19 @@
       </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>
 
@@ -62,7 +68,7 @@ export default defineComponent({
         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')),
+        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/market-spot/components/detail/index.vue')),
     },
     setup() {
         const isBottom = getShowBottomValue();

+ 1 - 1
src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue

@@ -33,7 +33,7 @@ import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import Bus from '@/utils/eventBus/index';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { handleComposeTable } from '@/views/market/market-spot/setup';
 import { ref } from 'vue';
 import Filter from '../../components/filter/index.vue';
 

+ 1 - 1
src/views/market/market-spot/warehouse_receipt_trade/warehouse_receipt_trade_price/index.vue

@@ -32,7 +32,7 @@ import { ComposeTableParam, contextMenu, defineAsyncComponent, defineComponent,
 import { queryOrderQuote } from '@/services/go/wrtrade';
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import Bus from '@/utils/eventBus/index';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { handleComposeTable } from '@/views/market/market-spot/setup';
 import Filter from '../../components/filter/index.vue';
 
 export default defineComponent({

+ 162 - 29
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/index.vue

@@ -1,6 +1,12 @@
 <template>
     <!-- 预售仓单 现货明细 挂牌 -->
-    <Drawer :title="'挂牌'" :placement="'right'" class="delistingBottom650" :visible="visible" @cancel="cancel">
+    <Drawer
+        :title="'挂牌'"
+        :placement="'right'"
+        class="delistingBottom650"
+        :visible="visible"
+        @cancel="cancel"
+    >
         <div class="listed">
             <div class="condition">
                 <a-button class="conditionBtn">{{ selectedRow.deliverygoodsname }}</a-button>
@@ -13,7 +19,12 @@
                     <a-row :gutter="24">
                         <a-col :span="12">
                             <a-form-item label="挂牌方式" name="WRPriceType">
-                                <a-select class="inlineFormSelect" default-value="1" v-model:value="formState.WRPriceType" style="width: 140px">
+                                <a-select
+                                    class="inlineFormSelect"
+                                    default-value="1"
+                                    v-model:value="formState.WRPriceType"
+                                    style="width: 140px"
+                                >
                                     <a-select-option :value="1">一口价</a-select-option>
                                     <a-select-option :value="2">浮动价</a-select-option>
                                     <a-select-option :value="3">贸易圈</a-select-option>
@@ -22,32 +33,62 @@
                         </a-col>
                         <a-col :span="12" v-if="isFixed()">
                             <a-form-item label="挂牌价" name="FixedPrice">
-                                <a-input-number class="dialogInput" :min="0" style="width: 140px" v-model:value="formState.FixedPrice" placeholder="请输入挂牌价" />
+                                <a-input-number
+                                    class="dialogInput"
+                                    :min="0"
+                                    style="width: 140px"
+                                    v-model:value="formState.FixedPrice"
+                                    placeholder="请输入挂牌价"
+                                />
                             </a-form-item>
                         </a-col>
                         <a-col :span="12" v-if="isBlocs()">
                             <a-form-item label="挂牌价格" name="FixedPrice" class="inputIconBox">
-                                <a-input-number class="commonInput" style="width: 140px" :min="0" v-model:value="formState.FixedPrice" />
+                                <a-input-number
+                                    class="commonInput"
+                                    style="width: 140px"
+                                    :min="0"
+                                    v-model:value="formState.FixedPrice"
+                                />
                                 <a-checkbox class="commonCheckbox" v-model:checked="priceCheck">可议价</a-checkbox>
                             </a-form-item>
                         </a-col>
                         <a-col :span="12" v-if="isFloat()">
                             <a-form-item label="基差" name="PriceMove">
-                                <a-input-number class="commonInput" v-model:value="formState.PriceMove" style="width: 140px" />
+                                <a-input-number
+                                    class="commonInput"
+                                    v-model:value="formState.PriceMove"
+                                    style="width: 140px"
+                                />
                             </a-form-item>
                         </a-col>
                     </a-row>
                     <a-row :gutter="24">
                         <a-col :span="12">
                             <a-form-item label="挂牌数量" name="OrderQty">
-                                <a-input-number class="dialogInput" style="width: 140px !important" :min="0" v-model:value="formState.OrderQty" placeholder="请输入挂牌数量" />
+                                <a-input-number
+                                    class="dialogInput"
+                                    style="width: 140px !important"
+                                    :min="0"
+                                    v-model:value="formState.OrderQty"
+                                    placeholder="请输入挂牌数量"
+                                />
                                 <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                                <a-checkbox class="commonCheckbox" v-if="isBlocs()" v-model:checked="numCheck">整单</a-checkbox>
+                                <a-checkbox
+                                    class="commonCheckbox"
+                                    v-if="isBlocs()"
+                                    v-model:checked="numCheck"
+                                >整单</a-checkbox>
                             </a-form-item>
                         </a-col>
                         <a-col :span="12" v-if="!numCheck">
                             <a-form-item label="起摘数量" class="relative" name="DelistMinQty">
-                                <a-input-number class="commonInput" :min="0" v-model:value="formState.DelistMinQty" style="width: 140px !important" />
+                                <a-input-number
+                                    class="commonInput"
+                                    :min="0"
+                                    v-model:value="formState.DelistMinQty"
+                                    style="width: 140px !important"
+                                />
                                 <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
                                 <div class="tip">
                                     <span>最小单位:</span>
@@ -59,7 +100,13 @@
                     <a-row :gutter="24">
                         <a-col :span="12" class="mt-20">
                             <a-form-item>
-                                <a-slider v-model:value="formState.OrderQty" :min="0" :max="selectedRow.enableqty" class="formSlider" style="width: 140px" />
+                                <a-slider
+                                    v-model:value="formState.OrderQty"
+                                    :min="0"
+                                    :max="selectedRow.enableqty"
+                                    class="formSlider"
+                                    style="width: 140px"
+                                />
                                 <div class="unit">
                                     <span>0</span>
                                     <span>{{ selectedRow.enableqty }}{{ selectedRow.enumdicname }}</span>
@@ -71,7 +118,12 @@
                     <a-row :gutter="24">
                         <a-col :span="12">
                             <a-form-item label="交收月" name="DeliveryMonth">
-                                <a-month-picker style="width: 140px" v-model:value="formState.DeliveryMonth" :allowClear="false" class="commonDatePicker dialogDatePicker" />
+                                <a-month-picker
+                                    style="width: 140px"
+                                    v-model:value="formState.DeliveryMonth"
+                                    :allowClear="false"
+                                    class="commonDatePicker dialogDatePicker"
+                                />
                             </a-form-item>
                         </a-col>
                         <a-col :span="12">
@@ -82,32 +134,62 @@
                         <a-row :gutter="24">
                             <a-col :span="12">
                                 <a-form-item label="履约保证金" name="margin">
-                                    <a-input-number class="commonInput" v-model:value="formState.margin" :min="0" style="width: 140px" />
+                                    <a-input-number
+                                        class="commonInput"
+                                        v-model:value="formState.margin"
+                                        :min="0"
+                                        style="width: 140px"
+                                    />
                                     <span class="input-enumdicname">%</span>
                                 </a-form-item>
                             </a-col>
                             <a-col :span="12">
                                 <a-form-item label="挂牌有效期" name="vidaliteTime" class="inputIconBox">
-                                    <a-date-picker style="width: 140px" v-model:value="formState.vidaliteTime" :allowClear="false" class="commonDatePicker dialogDatePicker" />
+                                    <a-date-picker
+                                        style="width: 140px"
+                                        v-model:value="formState.vidaliteTime"
+                                        :allowClear="false"
+                                        class="commonDatePicker dialogDatePicker"
+                                    />
                                 </a-form-item>
                             </a-col>
                         </a-row>
                         <a-row :gutter="24">
                             <a-col :span="12">
                                 <a-form-item label="履约方式" class="inputIconBox">
-                                    <span :class="['clickBox', formState.permanceTempName ? 'white' : '']" style="width: 140px" @click="openPermance">{{ formState.permanceTempName ? formState.permanceTempName : '选择履约模板' }}</span>
-                                    <svg class="icon svg-icon" aria-hidden="true" @click="openPermance">
+                                    <span
+                                        :class="['clickBox', formState.permanceTempName ? 'white' : '']"
+                                        style="width: 140px"
+                                        @click="openPermance"
+                                    >{{ formState.permanceTempName ? formState.permanceTempName : '选择履约模板' }}</span>
+                                    <svg
+                                        class="icon svg-icon"
+                                        aria-hidden="true"
+                                        @click="openPermance"
+                                    >
                                         <use xlink:href="#icon-moban" />
                                     </svg>
                                 </a-form-item>
                             </a-col>
                             <a-col :span="12">
                                 <a-form-item label="指定朋友" class="inputIconBox">
-                                    <span :class="['clickBox', getFriendLength() ? 'white' : '']" style="width: 140px" @click="openFriend">{{ getFriendLength() ? `已选${getFriendLength()}人` : '选择朋友' }}</span>
-                                    <svg class="icon svg-icon" aria-hidden="true" @click="openFriend">
+                                    <span
+                                        :class="['clickBox', getFriendLength() ? 'white' : '']"
+                                        style="width: 140px"
+                                        @click="openFriend"
+                                    >{{ getFriendLength() ? `已选${getFriendLength()}人` : '选择朋友' }}</span>
+                                    <svg
+                                        class="icon svg-icon"
+                                        aria-hidden="true"
+                                        @click="openFriend"
+                                    >
                                         <use xlink:href="#icon-pengyou1" />
                                     </svg>
-                                    <a-checkbox class="commonCheckbox" v-model:checked="friendCheck" @change="limiteFriends">不限</a-checkbox>
+                                    <a-checkbox
+                                        class="commonCheckbox"
+                                        v-model:checked="friendCheck"
+                                        @change="limiteFriends"
+                                    >不限</a-checkbox>
                                 </a-form-item>
                             </a-col>
                         </a-row>
@@ -119,11 +201,31 @@
                           style="width: 135px"
                           placeholder="请择交易所">
                                 </a-select>-->
-                                <a-select class="inlineFormSelect ml5" @change="handleGoodsGroups" style="width: 135px" v-model:value="formState.goodsgroupid" placeholder="请选择商品">
-                                    <a-select-option v-for="item in goodsGroup" :value="item.goodsgroupid" :key="item.goodsgroupid">{{ item.goodsgroupname }} </a-select-option>
+                                <a-select
+                                    class="inlineFormSelect ml5"
+                                    @change="handleGoodsGroups"
+                                    style="width: 135px"
+                                    v-model:value="formState.goodsgroupid"
+                                    placeholder="请选择商品"
+                                >
+                                    <a-select-option
+                                        v-for="item in goodsGroup"
+                                        :value="item.goodsgroupid"
+                                        :key="item.goodsgroupid"
+                                    >{{ item.goodsgroupname }}</a-select-option>
                                 </a-select>
-                                <a-select class="inlineFormSelect ml5" style="width: 135px" @change="handleGoodsChange" v-model:value="formState.goodsid" placeholder="请选择合约">
-                                    <a-select-option v-for="item in goodsList" :value="item.goodsid" :key="item.goodsid">{{ item.goodsname }}</a-select-option>
+                                <a-select
+                                    class="inlineFormSelect ml5"
+                                    style="width: 135px"
+                                    @change="handleGoodsChange"
+                                    v-model:value="formState.goodsid"
+                                    placeholder="请选择合约"
+                                >
+                                    <a-select-option
+                                        v-for="item in goodsList"
+                                        :value="item.goodsid"
+                                        :key="item.goodsid"
+                                    >{{ item.goodsname }}</a-select-option>
                                 </a-select>
                             </a-form-item>
                         </a-col>
@@ -163,7 +265,9 @@
                         </a-col>
                         <a-col :span="24">
                             <a-form-item label="可用资金">
-                                <span class="white ml8">{{ getCanUseMoney(handleSelectedAccount()) }}</span>
+                                <span
+                                    class="white ml8"
+                                >{{ getCanUseMoney(handleSelectedAccount()) }}</span>
                             </a-form-item>
                         </a-col>
                     </a-row>
@@ -171,8 +275,18 @@
                 <a-row :gutter="24">
                     <a-col :span="24" class="fixedBtns">
                         <a-form-item class="btnCenter">
-                            <a-button class="listedBtn" :loading="loading" :disabled="loading" @click="submit">卖出</a-button>
-                            <a-button class="ml10 cancelBtn" :loading="loading" :disabled="loading" @click="cancel">取消</a-button>
+                            <a-button
+                                class="listedBtn"
+                                :loading="loading"
+                                :disabled="loading"
+                                @click="submit"
+                            >卖出</a-button>
+                            <a-button
+                                class="ml10 cancelBtn"
+                                :loading="loading"
+                                :disabled="loading"
+                                @click="cancel"
+                            >取消</a-button>
                         </a-form-item>
                     </a-col>
                 </a-row>
@@ -180,9 +294,20 @@
         </div>
     </Drawer>
     <!-- 选择朋友 -->
-    <Friend v-if="showFriend" :friends="formState.friends" :position="'bottom'" @cancel="chooseFriend" @update="chooseFriend" />
+    <Friend
+        v-if="showFriend"
+        :friends="formState.friends"
+        :position="'bottom'"
+        @cancel="chooseFriend"
+        @update="chooseFriend"
+    />
     <!-- 选择履约模板 -->
-    <Permance v-if="showPermance" :position="'bottom'" @cancel="choosePermance" @update="choosePermance" />
+    <Permance
+        v-if="showPermance"
+        :position="'bottom'"
+        @cancel="choosePermance"
+        @update="choosePermance"
+    />
 </template>
 
 <script lang="ts">
@@ -204,7 +329,7 @@ import { hdWROrder } from '@/services/proto/warehousetrade';
 import { WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
 import { addSubscribeQuotation, removeSubscribeQuotation } from '@/services/socket/quota';
 import Bus from '@/utils/eventBus';
-import { getGoodsPrice } from '@/views/market/spot_trade/components/buy-sell-market/setup';
+import { getGoodsPrice } from '@/views/market/market-spot/components/buy-sell-market/setup';
 import { message } from 'ant-design-vue';
 import moment from 'moment';
 import { v4 as uuidv4, v4 } from 'uuid';
@@ -530,14 +655,22 @@ export default defineComponent({
     text-align: center;
     border: 0;
     &:hover {
-        background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
+        background: linear-gradient(
+            0deg,
+            @m-blue0-hover 0%,
+            @m-blue2-hover 100%
+        );
         color: @m-white0-hover;
     }
 }
 .cancelBtn:extend(.listedBtn) {
     background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%);
     &:hover {
-        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%);
+        background: linear-gradient(
+            0deg,
+            @m-grey12-hover 0%,
+            @m-grey13-hover 100%
+        );
         color: @m-white0-hover;
     }
 }

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

@@ -1,23 +1,43 @@
 <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="(record,index)=>index" :data-source="tableList">
+          <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">
             <!-- 额外的展开行 -->
             <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>
@@ -44,124 +64,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: {},
+    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,
+        },
     },
-    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;
-      });
-    });
+    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;
+        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;
+            }
         }
-      });
-      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>
 

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

@@ -1,10 +1,23 @@
 <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">
+    <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" />
+        <BtnList :btnList="handleBtnLsit(record)"
+                 :record="record"
+                 class="btn-list-sticky"
+                 @click="openComponent" />
       </template>
       <!-- 挂牌有效期 -->
       <template #validtime="{ text }">
@@ -33,7 +46,10 @@
       </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>
 
@@ -50,69 +66,74 @@ import { BtnListType } from '@/common/components/btnList/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
 import { getSpotWarrantBargainColumns } from './setup';
 import { formatTime } from '@/common/methods';
-import { getUserId } from '@/services/bus/user';
+import { getUserId } from '@/services/bus/account';
 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);
-
-    return {
-      contextMenu,
-      openContext,
-      closeContext, // 右键
-      expandedRowKeys,
-      selectedRow,
-      Rowclick, // 表格折腾面板数据与单击、双击事件
-      componentId,
-      closeComponent,
-      openComponent, // 控制异步组件
-      btnList, // 表格按钮
-      columns: getSpotWarrantBargainColumns(),
-      loading,
-      tableList,
-      getWrTradeOrderStatusName,
-      getWrOrderTypeName,
-      expandIcon,
-      formatTime,
-      getBarmaginApplyStatus,
-    };
-  },
+        // 表格通用逻辑
+        const param: ComposeOrderTableParam = {
+            queryFn: queryTableAction,
+            recordList: getRecordItemTab(),
+        };
+        const {
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent,
+            openComponent, // 控制异步组件
+            btnList, // 表格按钮
+        } = handleComposeOrderTable<QueryWrTradeBargainApplyQsp>(param);
+        function handleBtnLsit(record: QueryWrTradeBargainApplyQsp) {
+            // applystatus: number;//申请状态(议价状态) - 1:待确认 2:已确认 3:已拒绝 4:已撤销 5:系统撤销 6:处理失败 7:确认中
+            const arr = [2, 3];
+            return arr.includes(record.applystatus) ? btnList : [];
+        }
+        return {
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent,
+            openComponent, // 控制异步组件
+            btnList, // 表格按钮
+            columns: getSpotWarrantBargainColumns(),
+            loading,
+            tableList,
+            getWrTradeOrderStatusName,
+            getWrOrderTypeName,
+            expandIcon,
+            formatTime,
+            getBarmaginApplyStatus,
+            handleBtnLsit,
+        };
+    },
 });
 </script>
 

+ 1 - 1
src/views/order/spot_warran/components/spot_warrant_bargain/setup.ts

@@ -11,7 +11,7 @@ export function getSpotWarrantBargainColumns() {
         // { title: '整单', key: 'canpart', align: 'center', width: 80 },
         { title: '挂牌有效期', key: 'validtime', align: 'center', width: 120 },
         { title: '履约保证金', key: 'marginvalue', align: 'center', width: 120 },
-        { title: '履约方式', key: 'templatename', align: 'center', width: 160 },
+        { title: '履约模板', key: 'templatename', align: 'center', width: 160 },
         { title: '最新议价价格', key: 'applyprice', align: 'center', width: 120 },
         { title: '最新议价数量', key: 'applyqty', align: 'center', width: 120 },
         { title: '最新议价时间', key: 'applytime', align: 'center', width: 160 },

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

@@ -1,15 +1,28 @@
 <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">
+    <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" />
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 class="btn-list-sticky"
+                 @click="openComponent" />
       </template>
 
       <!-- 成交金额 -->
       <template #amount="{ record }">
-        <a>{{ record.tradeqty * record.tradeprice }}</a>
+        <a>{{ (record.tradeqty * record.tradeprice).toFixed(2) }}</a>
       </template>
 
       <!-- 挂牌类型 -->
@@ -17,7 +30,11 @@
         <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
       </template>
     </a-table>
-    <component :is="componentId" v-if="componentId" :tableName="tableName" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+    <component :is="componentId"
+               v-if="componentId"
+               :tableName="tableName"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -34,56 +51,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>
 

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

@@ -1,13 +1,29 @@
 <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="(record,index)=>index" :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="key"
+             :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>
 
@@ -22,33 +38,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>
 

+ 4 - 3
src/views/order/spot_warran/components/spot_warrant_in_and_out_warehouse/components/cancel/index.vue

@@ -1,6 +1,7 @@
 <template>
-    <!-- 撤销-->
-    <div> </div>
+  <!-- 撤销-->
+  <div>
+  </div>
 </template>
 
 <script lang="ts">
@@ -13,7 +14,7 @@ import { Modal } from 'ant-design-vue';
 import { WROutCancel } from '@/services/proto/warehousetrade';
 import { WROutCancelReq } from '@/services/proto/warehousetrade/interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { getUserId } from '@/services/bus/user';
+import { getSelectedAccountId, getUserId } from '@/services/bus/account';
 import { v4 as uuidv4 } from 'uuid';
 import Long from 'long';
 

+ 4 - 3
src/views/order/spot_warran/components/spot_warrant_in_and_out_warehouse/components/pick_up/index.vue

@@ -1,6 +1,7 @@
 <template>
-    <!-- 确认提货-->
-    <div> </div>
+  <!-- 确认提货-->
+  <div>
+  </div>
 </template>
 
 <script lang="ts">
@@ -12,7 +13,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 import { Modal } from 'ant-design-vue';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { WROutConfirmReq, WRTradeFinanceBuyCancelReq } from '@/services/proto/warehousetrade/interface';
-import { getUserId } from '@/services/bus/user';
+import { getUserId } from '@/services/bus/account';
 import { v4 as uuidv4 } from 'uuid';
 import Long from 'long';
 import { WROutConfirm } from '@/services/proto/warehousetrade';

+ 61 - 42
src/views/order/spot_warran/components/spot_warrant_in_and_out_warehouse/index.vue

@@ -1,23 +1,42 @@
 <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">
+    <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" />
+        <BtnList :btnList="handleBtnList(btnList, record)"
+                 :record="record"
+                 class="btn-list-sticky"
+                 @click="openComponent" />
       </template>
 
       <!-- applytype 类型-->
       <template #applytype="{ record }">
         <span>{{ getPickUpStatusName(record.applytype) }}</span>
       </template>
+      <template #expresscompany="{ record, text }">
+        <span>{{ (text && text !== '--') ? text +  record.expressnum : '--' }}</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>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
   </section>
 </template>
 
@@ -34,45 +53,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>
 

+ 26 - 6
src/views/order/spot_warran/components/spot_warrant_inventory_summary/components/listing/index.vue

@@ -13,7 +13,11 @@
                     <a-row :gutter="24">
                         <a-col :span="12">
                             <a-form-item label="挂牌方式">
-                                <a-select class="inlineFormSelect" default-value="1" style="width: 140px">
+                                <a-select
+                                    class="inlineFormSelect"
+                                    default-value="1"
+                                    style="width: 140px"
+                                >
                                     <a-select-option value="1">一口价</a-select-option>
                                     <a-select-option value="2">一口价2</a-select-option>
                                 </a-select>
@@ -33,7 +37,11 @@
                         </a-col>
                         <a-col :span="12">
                             <a-form-item label="起摘数量" class="relative">
-                                <a-input class="commonInput" suffix="吨" style="width: 140px !important" />
+                                <a-input
+                                    class="commonInput"
+                                    suffix="吨"
+                                    style="width: 140px !important"
+                                />
                                 <div class="tip">最小单位:1吨</div>
                             </a-form-item>
                         </a-col>
@@ -53,12 +61,24 @@
                     <a-row :gutter="24">
                         <a-col :span="24">
                             <a-form-item label="行情商品">
-                                <a-select class="inlineFormSelect" style="width: 135px" placeholder="请选择交易所">
+                                <a-select
+                                    class="inlineFormSelect"
+                                    style="width: 135px"
+                                    placeholder="请选择交易所"
+                                >
                                     <!-- <a-select-option value="1">一口价</a-select-option>
                                     <a-select-option value="2">一口价2</a-select-option>-->
                                 </a-select>
-                                <a-select class="inlineFormSelect ml5" style="width: 135px" placeholder="请选择商品"></a-select>
-                                <a-select class="inlineFormSelect ml5" style="width: 135px" placeholder="请选择合约"></a-select>
+                                <a-select
+                                    class="inlineFormSelect ml5"
+                                    style="width: 135px"
+                                    placeholder="请选择商品"
+                                ></a-select>
+                                <a-select
+                                    class="inlineFormSelect ml5"
+                                    style="width: 135px"
+                                    placeholder="请选择合约"
+                                ></a-select>
                             </a-form-item>
                         </a-col>
                     </a-row>
@@ -81,7 +101,7 @@ import { defineComponent, PropType, ref } from 'vue';
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import Drawer from '@/common/components/drawer/index.vue';
 import { QueryWrPositionReq, WrHoldLB, WrPosition } from '@/services/go/wrtrade/interface';
-import { getUserId } from '@/services/bus/user';
+import { getUserId } from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { hdWROrder } from '@/services/proto/warehousetrade';
 import { v4 as uuidv4 } from 'uuid';

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

@@ -1,14 +1,36 @@
 <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 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="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>
 </template>
 
 <script lang="ts">
@@ -22,35 +44,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>
 

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

@@ -1,14 +1,13 @@
 <template>
-    <!-- 现货仓单 现货明细 撤单 -->
-    <div></div>
+  <!-- 现货仓单 现货明细 撤单 -->
+  <div></div>
 </template>
 
 <script lang="ts">
 import { defineComponent, PropType, ref } from 'vue';
 import Drawer from '@/common/components/drawer/index.vue';
 import { WrOrderDetail } from '@/services/go/wrtrade/interface';
-import { getInTaAccount } from '@/services/bus/account';
-import { getUserId } from '@/services/bus/user';
+import { getInTaAccount, getUserId } from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { wRListingCancelOrder } from '@/services/proto/warehousetrade';
 import { v4 as uuidv4 } from 'uuid';

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

@@ -23,7 +23,7 @@
                  v-for="item in lststep"
                  :key="item.autoid">
               <!-- <div class="no">{{index + 1}}</div> -->
-              <div class="name">{{item.steptypename}}</div>
+              <div class="name">{{item.stepinfo}}</div>
               <div class="time">{{item.stepdate}}</div>
             </div>
           </a-col>

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

@@ -1,10 +1,23 @@
 <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="(record,index)=>index" :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="key"
+             :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 }">
@@ -24,7 +37,11 @@
       </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>
 
@@ -43,59 +60,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>
 

+ 406 - 351
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/index.vue

@@ -1,178 +1,183 @@
 <template>
-    <!-- 现货仓单 现货明细 挂牌 -->
-    <Drawer :title="'挂牌'" :placement="'right'" class="delistingBottom650" :visible="visible" @cancel="cancel">
-        <div class="listing">
-            <div class="condition">
-                <a-button class="conditionBtn">{{ selectedRow.deliverygoodsname }}</a-button>
-                <a-button class="conditionBtn">{{ selectedRow.wrtypename }}</a-button>
-                <a-button class="conditionBtn">{{ selectedRow.warehousename }}</a-button>
-            </div>
+  <!-- 现货仓单 现货明细 挂牌 -->
+  <Drawer :title="'挂牌'" :placement="'right'" class="delistingBottom650" :visible="visible" @cancel="cancel">
+    <div class="listing">
+      <div class="condition">
+        <a-button class="conditionBtn">{{ selectedRow.deliverygoodsname }}</a-button>
+        <a-button class="conditionBtn">{{ selectedRow.wrtypename }}</a-button>
+        <a-button class="conditionBtn">{{ selectedRow.warehousename }}</a-button>
+      </div>
 
-            <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
-                <div class="formBar">
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="挂牌方式" name="WRPriceType">
-                                <a-select class="inlineFormSelect" default-value="1" v-model:value="formState.WRPriceType" style="width: 140px">
-                                    <a-select-option :value="1">一口价</a-select-option>
-                                    <a-select-option :value="2">浮动价</a-select-option>
-                                    <a-select-option :value="3">贸易圈</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="isFixed()">
-                            <a-form-item label="挂牌价" name="FixedPrice">
-                                <a-input-number class="dialogInput" :min="0" style="width: 140px" v-model:value="formState.FixedPrice" placeholder="请输入挂牌价" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="isBlocs()">
-                            <a-form-item label="挂牌价格" name="FixedPrice" class="inputIconBox">
-                                <a-input-number class="commonInput" style="width: 140px" :min="0" v-model:value="formState.FixedPrice" />
-                                <a-checkbox class="commonCheckbox" v-model:checked="priceCheck">可议价</a-checkbox>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="isFloat()">
-                            <a-form-item label="基差" name="PriceMove">
-                                <a-input-number class="commonInput" v-model:value="formState.PriceMove" style="width: 140px" />
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="挂牌数量" class="inputIconBox" name="OrderQty">
-                                <a-input-number class="dialogInput" style="width: 140px !important" :min="0" v-model:value="formState.OrderQty" placeholder="请输入挂牌数量" />
-                                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                                <a-checkbox class="commonCheckbox" v-if="isBlocs()" v-model:checked="numCheck">整单</a-checkbox>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="!numCheck">
-                            <a-form-item label="起摘数量" class="relative" name="DelistMinQty">
-                                <a-input-number class="commonInput" :min="0" v-model:value="formState.DelistMinQty" style="width: 140px !important" />
-                                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                                <div class="tip">
-                                    <span>最小单位:</span>
-                                    <span>{{ selectedRow.minivalue }}{{ selectedRow.enumdicname }}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12" class="mt-20">
-                            <a-form-item>
-                                <a-slider v-model:value="formState.OrderQty" :min="0" :max="selectedRow.enableqty" class="formSlider" style="width: 140px" />
-                                <div class="unit">
-                                    <span>0</span>
-                                    <span>{{ selectedRow.enableqty }}{{ selectedRow.enumdicname }}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">&nbsp;</a-col>
-                    </a-row>
-                    <template v-if="isBlocs()">
-                        <a-row :gutter="24">
-                            <a-col :span="12">
-                                <a-form-item label="履约保证金" name="margin">
-                                    <a-input-number class="commonInput" v-model:value="formState.margin" :min="0" style="width: 140px" />
-                                    <span class="input-enumdicname">%</span>
-                                </a-form-item>
-                            </a-col>
-                            <a-col :span="12">
-                                <a-form-item label="挂牌有效期" name="vidaliteTime" class="inputIconBox">
-                                    <a-date-picker style="width: 140px" v-model:value="formState.vidaliteTime" :allowClear="false" class="commonDatePicker dialogDatePicker" />
-                                </a-form-item>
-                            </a-col>
-                        </a-row>
-                        <a-row :gutter="24">
-                            <a-col :span="12">
-                                <a-form-item label="履约方式" class="inputIconBox">
-                                    <span :class="['clickBox', formState.permanceTempName ? 'white' : '']" style="width: 140px" @click="openPermance">{{ formState.permanceTempName ? formState.permanceTempName : '选择履约模板' }}</span>
-                                    <svg class="icon svg-icon" aria-hidden="true" @click="openPermance">
-                                        <use xlink:href="#icon-moban" />
-                                    </svg>
-                                </a-form-item>
-                            </a-col>
-                            <a-col :span="12">
-                                <a-form-item label="指定朋友" class="inputIconBox">
-                                    <span :class="['clickBox', getFriendLength() ? 'white' : '']" style="width: 140px" @click="openFriend">{{ getFriendLength() ? `已选${getFriendLength()}人` : '选择朋友' }}</span>
-                                    <svg class="icon svg-icon" aria-hidden="true" @click="openFriend">
-                                        <use xlink:href="#icon-pengyou1" />
-                                    </svg>
-                                    <a-checkbox class="commonCheckbox" v-model:checked="friendCheck" @change="limiteFriends">不限</a-checkbox>
-                                </a-form-item>
-                            </a-col>
-                        </a-row>
-                    </template>
-                    <a-row :gutter="24" v-if="isFloat()">
-                        <a-col :span="24">
-                            <a-form-item label="行情商品" name="goodsid">
-                                <!-- <a-select class="inlineFormSelect"
+      <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
+        <div class="formBar">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="交易市场" name="marketid">
+                <a-select class="inlineFormSelect" v-model:value="formState.marketid" @change="handleMarket" style="width: 140px" placeholder="请选择交易市场">
+                  <!-- <a-select-option :value="1">一口价</a-select-option>
+                  <a-select-option :value="2">浮动价</a-select-option>
+                  <a-select-option :value="3">贸易圈</a-select-option>-->
+                  <a-select-option v-for="item in spotMarkets" :key="item.marketid" :value="item.marketid">{{ item.marketname }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12" v-if="isFixed()">
+              <a-form-item label="挂牌价" name="FixedPrice">
+                <a-input-number class="dialogInput" :min="0" style="width: 140px" v-model:value="formState.FixedPrice" placeholder="请输入挂牌价" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12" v-if="isBlocs()">
+              <a-form-item label="挂牌价格" name="FixedPrice" class="inputIconBox">
+                <a-input-number class="commonInput" style="width: 140px" :min="0" v-model:value="formState.FixedPrice" />
+                <a-checkbox class="commonCheckbox" v-model:checked="priceCheck">可议价</a-checkbox>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24" v-if="isFloat()">
+            <a-col :span="24">
+              <a-form-item label="行情商品" name="goodsid">
+                <!-- <a-select class="inlineFormSelect"
                           style="width: 135px"
                           placeholder="请择交易所">
-                                </a-select>-->
-                                <a-select class="inlineFormSelect ml5" @change="handleGoodsGroups" style="width: 135px" v-model:value="formState.goodsgroupid" placeholder="请选择商品">
-                                    <a-select-option v-for="item in goodsGroup" :value="item.goodsgroupid" :key="item.goodsgroupid">{{ item.goodsgroupname }} </a-select-option>
-                                </a-select>
-                                <a-select class="inlineFormSelect ml5" style="width: 135px" @change="handleGoodsChange" v-model:value="formState.goodsid" placeholder="请选择合约">
-                                    <a-select-option v-for="item in goodsList" :value="item.goodsid" :key="item.goodsid">{{ item.goodsname }}</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24" v-if="isFloat()" class="relative">
-                            <a-form-item :label="'估算价'">
-                                <span class="white ml8">{{ getPrice() }}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24" v-if="isFloat()" class="relative">
-                            <a-form-item :label="'估算金额'">
-                                <span class="white ml8">{{ getWrMoney() }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isFixed()" class="relative">
-                            <a-form-item :label="'挂牌金额'">
-                                <span class="white ml8">{{ getWrMoney() }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isBlocs()" class="relative">
-                            <a-form-item :label="'挂牌金额'">
-                                <span class="white ml8">{{ getMoney() }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="getWrMargin() && !isBlocs()">
-                            <a-form-item :label="getWrMargin() ? '履约保证金' : ''">
-                                <span class="white ml8">{{ getWrMargin() }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isBlocs()">
-                            <a-form-item label="履约保证金">
-                                <span class="white ml8">{{ getMargin() }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="可用资金">
-                                <span class="white ml8">{{ getCanUseMoney(handleSelectedAccount()) }}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
+                </a-select>-->
+                <a-select class="inlineFormSelect ml5" @change="handleGoodsGroups" style="width: 180px" v-model:value="formState.goodsgroupid" placeholder="请选择商品">
+                  <a-select-option v-for="item in goodsGroup" :value="item.goodsgroupid" :key="item.goodsgroupid">{{ item.goodsgroupname }}</a-select-option>
+                </a-select>
+                <a-select class="inlineFormSelect ml5" style="width: 180px" @change="handleGoodsChange" v-model:value="formState.goodsid" placeholder="请选择合约">
+                  <a-select-option v-for="item in goodsList" :value="item.goodsid" :key="item.goodsid">{{ item.goodsname }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="挂牌数量" class="inputIconBox" name="OrderQty">
+                <a-input-number class="dialogInput" style="width: 140px !important" :min="0" v-model:value="formState.OrderQty" placeholder="请输入挂牌数量" />
+                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
+                <a-checkbox class="commonCheckbox" v-if="isBlocs()" v-model:checked="numCheck">整单</a-checkbox>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12" v-if="!numCheck">
+              <a-form-item label="起摘数量" class="relative" name="DelistMinQty">
+                <a-input-number class="commonInput" :min="0" v-model:value="formState.DelistMinQty" style="width: 140px !important" />
+                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
+                <div class="tip-listing">
+                  <span>最小单位:</span>
+                  <span>{{ selectedRow.minivalue }}{{ selectedRow.enumdicname }}</span>
                 </div>
-                <a-row :gutter="24">
-                    <a-col :span="24" class="fixedBtns">
-                        <a-form-item class="btnCenter">
-                            <a-button class="listedBtn" :loading="loading" :disabled="loading" @click="submit">卖出</a-button>
-                            <a-button class="ml10 cancelBtn" :loading="loading" :disabled="loading" @click="cancel">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12" class="mt-20">
+              <a-form-item>
+                <a-slider v-model:value="formState.OrderQty" :min="0" :max="selectedRow.enableqty" class="formSlider" style="width: 140px" />
+                <div class="unit">
+                  <span>0</span>
+                  <span>{{ selectedRow.enableqty }}{{ selectedRow.enumdicname }}</span>
+                </div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">&nbsp;</a-col>
+          </a-row>
+          <template v-if="isBlocs()">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="履约保证金" name="margin">
+                <a-input-number class="commonInput" v-model:value="formState.margin" :min="0" style="width: 140px" />
+                <span class="input-enumdicname">%</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="挂牌有效期" name="vidaliteTime" class="inputIconBox">
+                <a-date-picker style="width: 140px" v-model:value="formState.vidaliteTime" :allowClear="false" class="commonDatePicker dialogDatePicker" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          </template>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="履约模板" class="inputIconBox">
+                <span :class="['clickBox', formState.permanceTempName ? 'white' : '']" style="width: 140px" @click="handlePermance">{{ formState.permanceTempName ? formState.permanceTempName : '选择履约模板' }}</span>
+                <svg class="icon svg-icon" aria-hidden="true" @click="handlePermance">
+                  <use xlink:href="#icon-moban" />
+                </svg>
+              </a-form-item>
+            </a-col>
+            <template v-if="isBlocs()">
+              <a-col :span="12">
+                <a-form-item label="指定朋友" class="inputIconBox">
+                  <span :class="['clickBox', getFriendLength() ? 'white' : '']" style="width: 140px" @click="openFriend">{{ getFriendLength() ? `已选${getFriendLength()}人` : '选择朋友' }}</span>
+                  <svg class="icon svg-icon" aria-hidden="true" @click="openFriend">
+                    <use xlink:href="#icon-pengyou1" />
+                  </svg>
+                  <a-checkbox class="commonCheckbox" v-model:checked="friendCheck" @change="limiteFriends">不限</a-checkbox>
+                </a-form-item>
+              </a-col>
+            </template>
+          </a-row>
+          <a-row :gutter="24" v-if="isFloat()">
+            <a-col :span="12">
+              <a-form-item label="基差" name="PriceMove">
+                <a-input-number class="commonInput" v-model:value="formState.PriceMove" style="width: 140px" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24" v-if="isFloat()" class="relative">
+              <a-form-item :label="'估算价'">
+                <span class="white ml8">{{ getPrice() }}</span>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24" v-if="isFloat()" class="relative">
+              <a-form-item :label="'估算金额'">
+                <span class="white ml8">{{ getWrMoney() }}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" v-if="isFixed()" class="relative">
+              <a-form-item :label="'挂牌金额'">
+                <span class="white ml8">{{ getWrMoney() }}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" v-if="isBlocs()" class="relative">
+              <a-form-item :label="'挂牌金额'">
+                <span class="white ml8">{{ getMoney() }}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" v-if="getWrMargin() && !isBlocs()">
+              <a-form-item :label="getWrMargin() ? '履约保证金' : ''">
+                <span class="white ml8">{{ getWrMargin() }}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" v-if="isBlocs()">
+              <a-form-item label="履约保证金">
+                <span class="white ml8">{{ getMargin() }}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="可用资金">
+                <span class="white ml8">{{ getCanUseMoney(handleSelectedAccount()) }}</span>
+              </a-form-item>
+            </a-col>
+          </a-row>
         </div>
-    </Drawer>
-    <!-- 选择朋友 -->
-    <Friend v-if="showFriend" :friends="formState.friends" :position="'bottom'" @cancel="chooseFriend" @update="chooseFriend" />
-    <!-- 选择履约模板 -->
-    <Permance v-if="showPermance" :position="'bottom'" @cancel="choosePermance" @update="choosePermance" />
+        <a-row :gutter="24">
+          <a-col :span="24" class="fixedBtns">
+            <a-form-item class="btnCenter">
+              <a-button class="listedBtn" :loading="loading" :disabled="loading" @click="submit">卖出</a-button>
+              <a-button class="ml10 cancelBtn" :loading="loading" :disabled="loading" @click="cancel">取消</a-button>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+  </Drawer>
+  <!-- 选择朋友 -->
+  <Friend v-if="showFriend" :friends="formState.friends" :position="'bottom'" @cancel="chooseFriend" @update="chooseFriend" />
+  <!-- 选择履约模板 -->
+  <Permance v-if="showPermance" :position="'bottom'" :marketid="formState.marketid" @cancel="choosePermance" @update="choosePermance" />
 </template>
 
 <script lang="ts">
@@ -185,10 +190,9 @@ import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo
 import { validateAction } from '@/common/setup/form';
 import { _closeModal } from '@/common/setup/modal/modal';
 import { useBlocksAccount, useBlocksFriends, useBlocksMoney, useBlocksNumber, useBlocksPermaceTemp, useBlocksPrice } from '@/common/setup/warehouse_receipt_trade/listing';
-import { getCanUseMoney, getInTaAccount } from '@/services/bus/account';
-import { getUserId } from '@/services/bus/user';
+import { getCanUseMoney, getInTaAccount, getUserId } from '@/services/bus/account';
 import { getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
-import { getMarketRunByTradeMode } from '@/services/bus/market';
+import { getAllMarkets, getMarketRunByTradeMode } from '@/services/bus/market';
 import { WrHoldLB } from '@/services/go/wrtrade/interface';
 import { hdWROrder } from '@/services/proto/warehousetrade';
 import { WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
@@ -199,196 +203,247 @@ import moment from 'moment';
 import { v4 } from 'uuid';
 import { defineComponent, onMounted, PropType, ref } from 'vue';
 import { ListingForm } from './interface';
-import { handleForm, handleGoods, handleNumAndPrice } from './setup';
+import { handleForm, handleGoods, handleNumAndPrice, queryMarketSection } from './setup';
 
 export default defineComponent({
-    name: ModalEnum.spot_warrant_spot_details_listed,
-    components: { Drawer, Friend, Permance },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<WrHoldLB>,
-            default: {},
-        },
+  name: ModalEnum.spot_warrant_spot_details_listed,
+  components: { Drawer, Friend, Permance },
+  emits: ['cancel', 'update'],
+  props: {
+    selectedRow: {
+      type: Object as PropType<WrHoldLB>,
+      default: {},
     },
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-        const { rules, formState, formRef } = handleForm(props.selectedRow);
+  },
+  setup(props, context) {
+    const loading = ref<boolean>(false);
+    const { visible, cancel } = _closeModal(context);
+    const { rules, formState, formRef } = handleForm(props.selectedRow);
 
-        // 选择朋友
-        const { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends } = useBlocksFriends(formState);
-        // 履约模板
-        const { showPermance, choosePermance, openPermance } = useBlocksPermaceTemp(formState);
-        // 价格
-        const { priceCheck, increasePrice, decreasePrice } = useBlocksPrice(formState);
-        // 摘牌数量
-        const { numCheck, increaseNumber, decreaseNumber } = useBlocksNumber(formState);
+    // 选择朋友
+    const { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends } = useBlocksFriends(formState);
+    // 履约模板
+    const { showPermance, choosePermance, openPermance } = useBlocksPermaceTemp(formState);
+    // 价格
+    const { priceCheck, increasePrice, decreasePrice } = useBlocksPrice(formState);
+    // 摘牌数量
+    const { numCheck, increaseNumber, decreaseNumber } = useBlocksNumber(formState);
 
-        const { goodsGroup, goodsList, groupsChange, findGoodsCode } = handleGoods();
-        // 切换商品组
-        function handleGoodsGroups(value: number) {
-            groupsChange(value);
-            formRef.value.validate();
-        }
-        const uuid = v4();
-        const goodsCode = ref<string>('');
-        // 切换商品
-        function handleGoodsChange(id: number) {
-            //行情订阅
-            removeSubscribeQuotation(uuid);
-            goodsCode.value = goodsList.value.find((e) => e.goodsid === id)?.goodscode as string;
-            const arr = [{ exchangeCode: 250, goodsCode: goodsCode.value, subState: 0 }];
-            addSubscribeQuotation(uuid, arr);
-            formRef.value.validate();
-        }
-        // 估算价
-        function getPrice() {
-            let result = '--';
-            if (goodsCode.value) {
-                const goodsPrice = getQuoteDayInfoByCodeFindPrice(goodsCode.value);
-                if (goodsPrice && goodsPrice !== '--') {
-                    // 有实时行情价格
-                    result = ((goodsPrice as number) + formState.PriceMove).toFixed(2);
-                }
-            }
+    const { goodsGroup, goodsList, groupsChange, findGoodsCode } = handleGoods();
+
+    // 获取仓单贸易市场
+    const { spotMarkets } = queryMarketSection(false)
+
+    // 切换市场
+    function handleMarket(value: number) {
+      const market = spotMarkets.value.find(item => item.marketid === value)
+      if (!market) return
 
-            return result;
+      // 判断所选择市场挂牌方式 1:一口价 2:浮动价 3:贸易圈 4:协议指定
+      if (market.listingmode === 1) {
+        formState.WRPriceType = 1
+      } else if (market.listingmode === 2) {
+        formState.WRPriceType = 2
+      } else {
+        formState.WRPriceType = 3
+      }
+    }
+
+    // 点选履约模板
+    function handlePermance() {
+      // 必须先选择市场再选择对应的履约模板
+      if (!formState.marketid) {
+        message.info('请先选择市场')
+        return
+      }
+
+      openPermance()
+    }
+
+    // 切换商品组
+    function handleGoodsGroups(value: number) {
+      groupsChange(value);
+      formState.goodsid = undefined;
+      // formRef.value.validate();
+    }
+    const uuid = v4();
+    const goodsCode = ref<string>('');
+    // 切换商品
+    function handleGoodsChange(id: number) {
+      //行情订阅
+      removeSubscribeQuotation(uuid);
+      goodsCode.value = goodsList.value.find((e) => e.goodsid === id)?.goodscode as string;
+      const arr = [{ exchangeCode: 250, goodsCode: goodsCode.value, subState: 0 }];
+      addSubscribeQuotation(uuid, arr);
+      formRef.value.validate();
+    }
+    // 估算价
+    function getPrice() {
+      let result = '--';
+      if (goodsCode.value) {
+        const goodsPrice = getQuoteDayInfoByCodeFindPrice(goodsCode.value);
+        if (goodsPrice && goodsPrice !== '--') {
+          // 有实时行情价格
+          result = ((goodsPrice as number) + formState.PriceMove).toFixed(2);
         }
-        onMounted(() => {
-            removeSubscribeQuotation(uuid);
-        });
-        const { getWrMoney, getWrMargin, isFloat, isFixed, isBlocs } = handleNumAndPrice();
-        function submit() {
-            const marketInfo = getMarketRunByTradeMode(17);
-            if (marketInfo) {
-                validateAction<ListingForm>(formRef, formState).then((res) => {
-                    const wrGoodsInfo: WRGoodsInfo = {
-                        GoodsID: res.goodsid as number, // uint32 配置商品ID
-                        GoodsCode: findGoodsCode(res.goodsid as number) as string, // string 配置商品代码
-                        PriceFactor: 1, // double 商品价格系数
-                        PriceMove: 0, // double 商品升贴水值
-                        WeightRatio: 1, // double 商品重量系数
-                    };
+      }
 
-                    // 仓单贸易挂牌  (仓单贸易 = HasWr = 1)
+      return result;
+    }
+    onMounted(() => {
+      removeSubscribeQuotation(uuid);
+    });
+    const { getWrMoney, getWrMargin, isFloat, isFixed, isBlocs } = handleNumAndPrice();
+    function submit() {
+      // 市场信息
+      if (!formState.marketid) {
+        message.info("请选择市场")
+        return
+      }
+      // const marketInfo = getMarketRunByTradeMode(17);
+      const market = spotMarkets.value.find(item => item.marketid === formState.marketid)
+      if (!market) {
+        message.info("市场信息异常,请稍后重试")
+        return
+      }
 
-                    const param = {
-                        AccountID: getInTaAccount(), // 默认内部资金账号第一个
-                        ClientSerialNo: v4(), // 客户端流水号
-                        // OperateSrc: 2,
-                        ClientType: 4,
-                        // MarketID: marketInfo.marketid,
-                        LadingBillId: props.selectedRow.ladingbillid.toString(), // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-                        // LadingBillId: 'uint642081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-                        TradeDate: moment(marketInfo.tradedate).format('YYYYMMDD'), // 交易日 string
-                        // SubNum: '0', // 提单子单号
-                        SubNum: props.selectedRow.subnum,
-                        // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        WRFactorTypeId: props.selectedRow.wrfactortypeid, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
-                        MatchAccIDs: [], // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
-                        OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
-                        DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID
-                        WRPriceType: res.WRPriceType, // 价格方式 1:固定价 2:浮动价
-                        FixedPrice: res.FixedPrice, // 固定价格
-                        PriceFactor: 1, // 价格系数(浮动价时填写)
-                        PriceMove: res.PriceMove, // 升贴水(浮动价时填写)
-                        TimevalidType: 4, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
-                        // ValidTime: isBlocs() ? moment(res.vidaliteTime).format('YYYY-MM-DD HH:mm:ss') : '', // 有效期限
-                        ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'),
-                        FirstRatio: 0, // 首付比例
-                        PerformanceTemplateID: res.permaceTempId, // 履约计划模板ID
-                        UserID: getUserId(),
-                        OperatorID: getUserId(), // 操作员账号ID
-                        BuyOrSell: BuyOrSell.sell, // 买卖方向 0买1卖
-                        PriceDisplayMode: 1, // 浮动价显示方式 1:合并显示 2:分开显示
-                        CanBargain: priceCheck.value ? 1 : 0, // 挂牌是否可议价0:不可1:可-摘牌是否议价
-                        Attachment1: '', // 附件1
-                        Attachment2: '', // 附件2
-                        Remark: '', // 备注
-                        ApplyID: 0, // 申请ID
-                        CanPart: numCheck.value ? 0 : 1, // 是否允许部份摘牌0:不允许;1:允许
-                        WRTradeGoods: [wrGoodsInfo],
-                        wrstandardid: props.selectedRow.wrstandardid,
-                        HasWr: 1,
-                        DeliveryMonth: '',
-                        MarginFlag: 0,
-                        DelistMinQty: res.DelistMinQty, // 起摘数量
-                    };
-                    if (isBlocs()) {
-                        // 贸易圈 是后加的, 处理贸易圈
-                        if (!formState.permanceTempName) {
-                            message.error('请选择履约模板');
-                            return;
-                        }
-                        if (!friendCheck.value) {
-                            if (formState.friends.length === 0) {
-                                message.error('请选择朋友');
-                                return;
-                            }
-                        }
-                        const obj = {
-                            IsSpecified: 1,
-                            MatchAccIDs: res.friends,
-                            WRPriceType: 1,
-                            TimevalidType: 3, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
-                            MarginFlag: 1, // 挂牌是否指定保证金 0:否 1:是
-                            MarginAlgorithm: 1, // 指定保证金方式 1:比率 2:固定
-                            ValidTime: moment(res.vidaliteTime).format('YYYY-MM-DD HH:mm:ss'), // 有效期限
-                            MarginValue: +(formState.margin / 100).toFixed(2), // 指定保证金设置值
-                            AllFriendsFlag: friendCheck.value ? 1 : 0, //是否全好友可见 0:否 1:是
-                        };
-                        Object.assign(param, obj);
-                    }
-                    requestResultLoadingAndInfo(hdWROrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
-                        Bus.$emit('spotTrade', true);
-                        cancel(true);
-                    });
-                });
-            } else {
-                message.error('市场信息未获取到,请联系管理员!');
+      // 履约模板
+      if (!formState.permanceTempName) {
+        message.info('请选择履约模板')
+        return
+      }
+
+      const marketInfo = getMarketRunByTradeMode(market!.trademode)
+      if (marketInfo) {
+        validateAction<ListingForm>(formRef, formState).then((res) => {
+          const wrGoodsInfo: WRGoodsInfo = {
+            GoodsID: res.goodsid as number, // uint32 配置商品ID
+            GoodsCode: findGoodsCode(res.goodsid as number) as string, // string 配置商品代码
+            PriceFactor: 1, // double 商品价格系数
+            PriceMove: 0, // double 商品升贴水值
+            WeightRatio: 1, // double 商品重量系数
+          };
+
+          // 仓单贸易挂牌  (仓单贸易 = HasWr = 1)
+          const param = {
+            AccountID: getInTaAccount(), // 默认内部资金账号第一个
+            ClientSerialNo: v4(), // 客户端流水号
+            // OperateSrc: 2,
+            ClientType: 4,
+            MarketID: formState.marketid,
+            LadingBillId: props.selectedRow.ladingbillid.toString(), // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
+            // LadingBillId: 'uint642081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
+            TradeDate: moment(marketInfo.tradedate).format('YYYYMMDD'), // 交易日 string
+            // SubNum: '0', // 提单子单号
+            SubNum: props.selectedRow.subnum,
+            // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+            WRFactorTypeId: props.selectedRow.wrfactortypeid, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+            IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
+            MatchAccIDs: [], // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
+            OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
+            DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID
+            WRPriceType: res.WRPriceType, // 价格方式 1:固定价 2:浮动价
+            FixedPrice: res.FixedPrice, // 固定价格
+            PriceFactor: 1, // 价格系数(浮动价时填写)
+            PriceMove: res.PriceMove, // 升贴水(浮动价时填写)
+            TimevalidType: 4, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
+            // ValidTime: isBlocs() ? moment(res.vidaliteTime).format('YYYY-MM-DD HH:mm:ss') : '', // 有效期限
+            ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'),
+            FirstRatio: 0, // 首付比例
+            PerformanceTemplateID: res.permaceTempId, // 履约计划模板ID
+            UserID: getUserId(),
+            OperatorID: getUserId(), // 操作员账号ID
+            BuyOrSell: BuyOrSell.sell, // 买卖方向 0买1卖
+            PriceDisplayMode: 1, // 浮动价显示方式 1:合并显示 2:分开显示
+            CanBargain: priceCheck.value ? 1 : 0, // 挂牌是否可议价0:不可1:可-摘牌是否议价
+            Attachment1: '', // 附件1
+            Attachment2: '', // 附件2
+            Remark: '', // 备注
+            ApplyID: 0, // 申请ID
+            CanPart: numCheck.value ? 0 : 1, // 是否允许部份摘牌0:不允许;1:允许
+            WRTradeGoods: [wrGoodsInfo],
+            wrstandardid: props.selectedRow.wrstandardid,
+            HasWr: 1,
+            DeliveryMonth: '',
+            MarginFlag: 0,
+            DelistMinQty: res.DelistMinQty, // 起摘数量
+          };
+          if (isBlocs()) {
+            // 贸易圈 是后加的, 处理贸易圈
+            // if (!formState.permanceTempName) {
+            //     message.error('请选择履约模板');
+            //     return;
+            // }
+            if (!friendCheck.value) {
+              if (formState.friends.length === 0) {
+                message.error('请选择朋友');
+                return;
+              }
             }
-        }
+            const obj = {
+              IsSpecified: 1,
+              MatchAccIDs: res.friends,
+              WRPriceType: 1,
+              TimevalidType: 3, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
+              MarginFlag: 1, // 挂牌是否指定保证金 0:否 1:是
+              MarginAlgorithm: 1, // 指定保证金方式 1:比率 2:固定
+              ValidTime: moment(res.vidaliteTime).format('YYYY-MM-DD HH:mm:ss'), // 有效期限
+              MarginValue: +(formState.margin / 100).toFixed(2), // 指定保证金设置值
+              AllFriendsFlag: friendCheck.value ? 1 : 0, //是否全好友可见 0:否 1:是
+            };
+            Object.assign(param, obj);
+          }
+          requestResultLoadingAndInfo(hdWROrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
+            Bus.$emit('spotTrade', true);
+            cancel(true);
+          });
+        });
+      } else {
+        message.error('市场信息未获取到,请联系管理员!');
+      }
+    }
 
-        return {
-            submit,
-            visible,
-            cancel,
-            loading,
-            rules,
-            formState,
-            formRef,
-            goodsGroup,
-            goodsList,
-            handleGoodsGroups,
-            handleGoodsChange,
-            getWrMoney,
-            getWrMargin,
-            isFloat,
-            isFixed,
-            isBlocs,
-            getCanUseMoney,
-            priceCheck,
-            increasePrice,
-            decreasePrice,
-            ...useBlocksAccount(formState),
-            ...useBlocksMoney(formState),
-            showPermance,
-            choosePermance,
-            openPermance,
-            numCheck,
-            increaseNumber,
-            decreaseNumber,
-            friendCheck,
-            showFriend,
-            chooseFriend,
-            openFriend,
-            getFriendLength,
-            limiteFriends,
-            getPrice,
-        };
-    },
+    return {
+      submit,
+      visible,
+      cancel,
+      loading,
+      rules,
+      formState,
+      formRef,
+      goodsGroup,
+      goodsList,
+      handleGoodsGroups,
+      handleGoodsChange,
+      getWrMoney,
+      getWrMargin,
+      isFloat,
+      isFixed,
+      isBlocs,
+      getCanUseMoney,
+      priceCheck,
+      increasePrice,
+      decreasePrice,
+      ...useBlocksAccount(formState),
+      ...useBlocksMoney(formState),
+      showPermance,
+      choosePermance,
+      openPermance,
+      numCheck,
+      increaseNumber,
+      decreaseNumber,
+      friendCheck,
+      showFriend,
+      chooseFriend,
+      openFriend,
+      getFriendLength,
+      limiteFriends,
+      getPrice,
+      spotMarkets,
+      handleMarket,
+      handlePermance,
+    };
+  },
 });
 </script>
 

+ 1 - 0
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/interface.ts

@@ -7,4 +7,5 @@ export interface ListingForm extends BlocsListingForm {
     PriceMove: number,// 升贴水(浮动价时填写)
     goodsgroupid: number | undefined,
     goodsid: number | undefined,
+    marketid: number | undefined,   // 当前选择挂牌市场ID
 }

+ 36 - 3
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/setup.ts

@@ -1,10 +1,13 @@
 import { TradeMode } from '@/common/constants/enumCommon';
 import { validateCommon } from '@/common/setup/validate';
 import { handleForm as useForm } from '@/common/setup/warehouse_receipt_trade/listing';
-import { useVerifyListingNum, useVerifyListingBasis } from '@/hooks/form/verify';
-import { getGoodsGroupsByTradeMode, getIPOGoodsList, getGoodsById, getQuoteDayInfoByCodeFindPrice, getQuoteDayInfoByCode } from '@/services/bus/goods';
+import { useVerifyBeginDelistingNum, useVerifyListingBasis, useVerifyListingNum } from '@/hooks/form/verify';
+import { getGoodsGroupsByTradeMode, getIPOGoodsList, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
+import { getAllMarkets } from '@/services/bus/market';
 import { getRules } from '@/services/bus/rules';
 import { Goods } from "@/services/go/ermcp/goodsInfo/interface";
+import { queryTjmdMarketSection } from "@/services/go/Tjmd";
+import { TjmdMarketSectionConfig } from '@/services/go/Tjmd/interface';
 import { WrHoldLB } from "@/services/go/wrtrade/interface";
 import { RuleObject } from 'ant-design-vue/lib/form/interface';
 import moment from 'moment';
@@ -28,6 +31,7 @@ function initFormData(): ListingForm {
         friends: [],
         permanceTempName: '',
         permaceTempId: 0,
+        marketid: undefined,
     }
 }
 
@@ -49,12 +53,16 @@ export function handleForm(data: WrHoldLB) {
     const { v_num } = useVerifyListingNum<ListingForm, 'DelistMinQty'>(formState, 'DelistMinQty', minivalue, enableqty);
     const { v_basis } = useVerifyListingBasis(formState, 'goodsid');
 
+    // 验证 起摘数量
+    const { v_beginDelistingRules, v_beginDelistingNum } = useVerifyBeginDelistingNum(data.minivalue);
+
     const rule = {
         FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', min: 1, }],
-        DelistMinQty: [{ required: true, message: '请输入起摘数量', trigger: 'blur', type: 'number', min: 1, }],
+        DelistMinQty: [{ required: true, validator: v_beginDelistingNum, trigger: 'blur', type: 'number', }],
         OrderQty: [{ required: true, validator: v_num, trigger: 'blur', type: 'number' }],
         PriceMove: [{ required: true, validator: v_basis, trigger: 'blur', type: 'number', }],
         goodsid: [{ required: true, validator: v_group, }],
+        marketid: [{ required: true, message: '请选择交易市场', type: 'number', }]
     }
     Object.assign(rules, rule)
     onBeforeUnmount(() => {
@@ -122,3 +130,28 @@ export function handleNumAndPrice() {
     }
     return { getWrMoney, getWrMargin, isFloat, isFixed, isBlocs }
 }
+
+/**
+ * 查询市场板块,用于挂牌时挂牌方式选择,替代之前的“一口价、浮动价和贸易圈”
+ */
+export function queryMarketSection(isPre: boolean) {
+    const spotMarkets = ref<TjmdMarketSectionConfig[]>([]);
+    queryTjmdMarketSection().then(res => {
+        let resMarkets: TjmdMarketSectionConfig[] = []
+        res.forEach(item => { resMarkets.push(...item.mlist) })
+        // 根据有无仓单过滤出仓单市场
+        // 过滤掉没有权限的市场
+        const markets = getAllMarkets()
+        resMarkets = resMarkets.filter(item =>
+            item.auctionwrtype === (isPre ? 1 : 2) && (item.trademode === TradeMode.WarehouseReceiptTrade)
+        ).filter(item =>
+            markets.findIndex(m => m.marketid === item.marketid) !== -1
+        )
+        spotMarkets.value = resMarkets
+        if (resMarkets.length === 1) {
+            formState.marketid = resMarkets[0].marketid;
+        }
+    })
+
+    return { spotMarkets };
+}

+ 103 - 69
src/views/order/spot_warran/components/spot_warrant_spot_details/components/pick_up/index.vue

@@ -1,81 +1,115 @@
 <template>
-    <!-- 现货仓单 现货明细 提货 true -->
-    <Drawer :title="'提货'" :placement="'right'" class="bottom" :visible="visible" @cancel="cancel">
-        <!-- 挂牌 -->
-        <div class="listed">
-            <div class="condition">
-                <a-button class="conditionBtn">{{ selectedRow.deliverygoodsname }}</a-button>
-                <a-button class="conditionBtn">{{ selectedRow.wrtypename }}</a-button>
-                <a-button class="conditionBtn">{{ selectedRow.warehousename }}</a-button>
-            </div>
-            <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
-                <div class="formBar">
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="提货数量" name="OutQty">
-                                <a-input-number class="commonInput" v-model:value="formState.OutQty" :min="0" :max="selectedRow.enableqty" style="width: 140px" />
-                                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">
-                            <a-form-item label="提货人" name="ContactName">
-                                <a-input class="commonInput" v-model:value="formState.ContactName" style="width: 140px" />
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12" class="mt-20">
-                            <a-form-item>
-                                <!-- <a-progress class="formProgress" :percent="30" /> -->
-                                <a-slider v-model:value="formState.OutQty" :min="0" :max="selectedRow.enableqty" class="formSlider" style="width: 140px !important" />
-                                <div class="unit">
-                                    <span>0</span>
-                                    <span>{{ selectedRow.enableqty }}{{ selectedRow.enumdicname }}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">&nbsp;</a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="联系方式" name="ContactNum">
-                                <a-input class="commonInput" v-model:value="formState.ContactNum" style="width: 140px" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">
-                            <a-form-item label="预约日期" name="AppointmentDate">
-                                <a-date-picker class="commonDatePicker dialogDatePicker" allowClear="false" v-model:value="formState.AppointmentDate" style="width: 140px" />
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="备注" name="AppointmentRemark">
-                                <a-input class="commonInput" v-model:value="formState.AppointmentRemark" style="width: 140px" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">&nbsp;</a-col>
-                    </a-row>
+  <!-- 现货仓单 现货明细 提货 true -->
+  <Drawer :title="'提货'"
+          :placement="'right'"
+          class="bottom"
+          :visible="visible"
+          @cancel="cancel">
+    <!-- 挂牌 -->
+    <div class="listed">
+      <div class="condition">
+        <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
+        <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
+        <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
+      </div>
+      <a-form class="inlineForm dialogForm"
+              ref="formRef"
+              :model="formState"
+              :rules="rules">
+        <div class="formBar">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="提货数量"
+                           name="OutQty">
+                <a-input-number class="commonInput"
+                                v-model:value="formState.OutQty"
+                                :min="0"
+                                :max="selectedRow.enableqty"
+                                style="width: 140px" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="提货人"
+                           name="ContactName">
+                <a-input class="commonInput"
+                         v-model:value="formState.ContactName"
+                         style="width: 140px" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12"
+                   class="mt-20">
+              <a-form-item>
+                <!-- <a-progress class="formProgress" :percent="30" /> -->
+                <a-slider v-model:value="formState.OutQty"
+                          :min="0"
+                          :max="selectedRow.enableqty"
+                          class="formSlider"
+                          style="width: 140px !important;" />
+                <div class="unit">
+                  <span>0</span>
+                  <span>{{selectedRow.enableqty}}{{selectedRow.enumdicname}}</span>
                 </div>
-                <a-row :gutter="24">
-                    <a-col :span="24" class="fixedBtns">
-                        <a-form-item class="btnCenter">
-                            <a-button class="listedBtn" :loading="loading" :disabled="loading" @click="submit">提货</a-button>
-                            <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">&nbsp;</a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="联系方式"
+                           name="ContactNum">
+                <a-input class="commonInput"
+                         v-model:value="formState.ContactNum"
+                         style="width: 140px" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="预约日期"
+                           name="AppointmentDate">
+                <a-date-picker class="commonDatePicker dialogDatePicker"
+                               allowClear="false"
+                               v-model:value="formState.AppointmentDate"
+                               style="width: 140px" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="备注"
+                           name="AppointmentRemark">
+                <a-input class="commonInput"
+                         v-model:value="formState.AppointmentRemark"
+                         style="width: 140px" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">&nbsp;</a-col>
+          </a-row>
         </div>
-    </Drawer>
+        <a-row :gutter="24">
+          <a-col :span="24"
+                 class="fixedBtns">
+            <a-form-item class="btnCenter">
+              <a-button class="listedBtn"
+                        :loading="loading"
+                        :disabled="loading"
+                        @click="submit">提货</a-button>
+              <a-button class="ml10 cancelBtn"
+                        @click="cancel">取消</a-button>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+  </Drawer>
 </template>
 
 <script lang="ts">
 import { defineComponent, PropType, ref } from 'vue';
 import Drawer from '@/common/components/drawer/index.vue';
 import { WrHoldLB } from '@/services/go/wrtrade/interface';
-import { getSelectedAccountId } from '@/services/bus/account';
-import { getUserId } from '@/services/bus/user';
+import { getSelectedAccountId, getUserId } from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { wROutApply } from '@/services/proto/warehousetrade';
 import { v4 as uuidv4 } from 'uuid';

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

@@ -1,13 +1,30 @@
 <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">
+    <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" 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>
 
@@ -21,32 +38,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>
 

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

@@ -17,7 +17,7 @@ import { defineComponent, PropType, ref } from 'vue';
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import Drawer from '@/common/components/drawer/index.vue';
 import { QueryWrPositionReq, WrPosition } from '@/services/go/wrtrade/interface';
-import { getUserId } from '@/services/bus/user';
+import { getUserId } from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { hdWROrder } from '@/services/proto/warehousetrade';
 import { v4 as uuidv4 } from 'uuid';

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

@@ -1,14 +1,36 @@
 <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 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="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>
 </template>
 
 <script lang="ts">
@@ -21,34 +43,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>
 

+ 41 - 25
src/views/order/spot_warran/index.vue

@@ -1,39 +1,55 @@
 <template>
   <!-- 现货仓单 -->
   <section class="spot_warran">
-    <component :is="componentId"
-               v-if="componentId">
+    <component :is="componentId" v-if="componentId">
     </component>
-    <thirdMenu :list="tabList"
-               @selectMenu="changeTab"
-               :value="'title'"></thirdMenu>
+    <thirdMenu :list="tabList" @selectMenu="changeTab" :value="'title'"></thirdMenu>
   </section>
 </template>
 
 <script lang="ts">
-import { defineAsyncComponent, defineComponent } from 'vue';
+import { defineAsyncComponent, defineComponent, nextTick } from 'vue';
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import thirdMenu from '@/common/components/thirdMenu/index.vue';
 import { handleOrderDetailList } from '@/common/setup/order/orderData';
+import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: enumOrderComponents.spot_warrant,
-    components: {
-        thirdMenu,
-        [enumOrderComponents.spot_warrant_deal]: defineAsyncComponent(() => import('./components/spot_warrant_deal/index.vue')),
-        [enumOrderComponents.spot_warrant_designated_deal]: defineAsyncComponent(() => import('./components/spot_warrant_designated_deal/index.vue')),
-        [enumOrderComponents.spot_warrant_in_and_out_warehouse]: defineAsyncComponent(() => import('./components/spot_warrant_in_and_out_warehouse/index.vue')),
-        [enumOrderComponents.spot_warrant_inventory_summary]: defineAsyncComponent(() => import('./components/spot_warrant_inventory_summary/index.vue')),
-        [enumOrderComponents.spot_warrant_pending_order]: defineAsyncComponent(() => import('./components/spot_warrant_pending_order/index.vue')),
-        [enumOrderComponents.spot_warrant_spot_summary]: defineAsyncComponent(() => import('./components/spot_warrant_spot_summary/index.vue')),
-        [enumOrderComponents.spot_warrant_spot_details]: defineAsyncComponent(() => import('./components/spot_warrant_spot_details/index.vue')),
-        [enumOrderComponents.spot_warrant_bargain]: defineAsyncComponent(() => import('./components/spot_warrant_bargain/index.vue')),
-    },
-    setup() {
-        return { ...handleOrderDetailList(enumOrderComponents.spot_warrant) };
-    },
-});
-</script>
+  name: enumOrderComponents.spot_warrant,
+  components: {
+    thirdMenu,
+    [enumOrderComponents.spot_warrant_deal]: defineAsyncComponent(() => import('./components/spot_warrant_deal/index.vue')),
+    [enumOrderComponents.spot_warrant_designated_deal]: defineAsyncComponent(() => import('./components/spot_warrant_designated_deal/index.vue')),
+    [enumOrderComponents.spot_warrant_in_and_out_warehouse]: defineAsyncComponent(() => import('./components/spot_warrant_in_and_out_warehouse/index.vue')),
+    [enumOrderComponents.spot_warrant_inventory_summary]: defineAsyncComponent(() => import('./components/spot_warrant_inventory_summary/index.vue')),
+    [enumOrderComponents.spot_warrant_pending_order]: defineAsyncComponent(() => import('./components/spot_warrant_pending_order/index.vue')),
+    [enumOrderComponents.spot_warrant_spot_summary]: defineAsyncComponent(() => import('./components/spot_warrant_spot_summary/index.vue')),
+    [enumOrderComponents.spot_warrant_spot_details]: defineAsyncComponent(() => import('./components/spot_warrant_spot_details/index.vue')), // 现货明细
+    [enumOrderComponents.spot_warrant_bargain]: defineAsyncComponent(() => import('./components/spot_warrant_bargain/index.vue')),
+  },
+  setup() {
+    const { componentId, tabList, changeTab } = handleOrderDetailList(enumOrderComponents.spot_warrant);
+
+    // 组件重新加载
+    function componentReload() {
+      const code = componentId.value;
+      componentId.value = undefined;
+      nextTick(() => {
+        componentId.value = code;
+      });
+    }
 
-<style lang="less">
-</style>;
+    // 资金变化,重新加载数据
+    Bus.$on('moneyChangedNtf_UI', () => {
+      // 重新加载组件
+      componentReload();
+    });
+
+    return {
+      componentId,
+      tabList,
+      changeTab,
+    };
+  },
+});
+</script>

+ 12 - 2
src/views/search/search_document_records/search_commodity_contract/search_document_records_commission_record/index.vue

@@ -1,7 +1,17 @@
 <template>
   <!-- 单据记录 商品合约-->
   <div class="topTableHeight">
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
+    <a-table
+      :columns="columns"
+      class="srcollYTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      :pagination="false"
+      :loading="loading"
+      :expandedRowKeys="expandedRowKeys"
+      :customRow="Rowclick"
+      :rowKey="(record,index)=>index"
+      :data-source="tableList"
+    ></a-table>
   </div>
 </template>
 
@@ -10,7 +20,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, defineComponent, ComposeTableParam } from '@/common/export/commonTable';
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { handleComposeTable } from '@/views/market/market-spot/setup';
 
 export default defineComponent({
   name: EnumRouterName.search_document_records_commission_record,

+ 12 - 2
src/views/search/search_document_records/search_commodity_contract/search_document_records_contract_summary/index.vue

@@ -1,7 +1,17 @@
 <template>
   <!-- 单据记录 商品合约-->
   <div class="topTableHeight">
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
+    <a-table
+      :columns="columns"
+      class="srcollYTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      :pagination="false"
+      :loading="loading"
+      :expandedRowKeys="expandedRowKeys"
+      :customRow="Rowclick"
+      :rowKey="(record,index)=>index"
+      :data-source="tableList"
+    ></a-table>
   </div>
 </template>
 
@@ -10,7 +20,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, defineComponent, ComposeTableParam } from '@/common/export/commonTable';
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { handleComposeTable } from '@/views/market/market-spot/setup';
 
 export default defineComponent({
   name: EnumRouterName.search_document_records_contract_summary,

+ 12 - 2
src/views/search/search_document_records/search_commodity_contract/search_document_records_delivery_record/index.vue

@@ -1,7 +1,17 @@
 <template>
   <!-- 单据记录 商品合约-->
   <div class="topTableHeight">
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
+    <a-table
+      :columns="columns"
+      class="srcollYTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      :pagination="false"
+      :loading="loading"
+      :expandedRowKeys="expandedRowKeys"
+      :customRow="Rowclick"
+      :rowKey="(record,index)=>index"
+      :data-source="tableList"
+    ></a-table>
   </div>
 </template>
 
@@ -10,7 +20,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, defineComponent, ComposeTableParam } from '@/common/export/commonTable';
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { handleComposeTable } from '@/views/market/market-spot/setup';
 
 export default defineComponent({
   name: EnumRouterName.search_document_records_delivery_record,

+ 12 - 2
src/views/search/search_document_records/search_commodity_contract/search_document_records_transaction_record/index.vue

@@ -1,7 +1,17 @@
 <template>
   <!-- 单据记录 商品合约-->
   <div class="topTableHeight">
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
+    <a-table
+      :columns="columns"
+      class="srcollYTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      :pagination="false"
+      :loading="loading"
+      :expandedRowKeys="expandedRowKeys"
+      :customRow="Rowclick"
+      :rowKey="(record,index)=>index"
+      :data-source="tableList"
+    ></a-table>
   </div>
 </template>
 
@@ -10,7 +20,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, defineComponent, ComposeTableParam } from '@/common/export/commonTable';
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { handleComposeTable } from '@/views/market/market-spot/setup';
 
 export default defineComponent({
   name: EnumRouterName.search_document_records_transaction_record,

+ 12 - 2
src/views/search/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_protocol_specified_record/index.vue

@@ -1,7 +1,17 @@
 <template>
   <!-- 单据记录 商品合约-->
   <div class="topTableHeight">
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
+    <a-table
+      :columns="columns"
+      class="srcollYTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      :pagination="false"
+      :loading="loading"
+      :expandedRowKeys="expandedRowKeys"
+      :customRow="Rowclick"
+      :rowKey="(record, index) => index"
+      :data-source="tableList"
+    ></a-table>
   </div>
 </template>
 
@@ -10,7 +20,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, defineComponent, ComposeTableParam } from '@/common/export/commonTable';
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { handleComposeTable } from '@/views/market/market-spot/setup';
 
 export default defineComponent({
   name: EnumRouterName.search_pre_sale_warehouse_receipt_protocol_specified_record,

+ 12 - 2
src/views/search/search_document_records/search_spot_warrant/search_spot_warrant_protocol_specified_record/index.vue

@@ -1,7 +1,17 @@
 <template>
   <!-- 单据记录 商品合约-->
   <div class="topTableHeight">
-    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
+    <a-table
+      :columns="columns"
+      class="srcollYTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      :pagination="false"
+      :loading="loading"
+      :expandedRowKeys="expandedRowKeys"
+      :customRow="Rowclick"
+      :rowKey="(record, index) => index"
+      :data-source="tableList"
+    ></a-table>
   </div>
 </template>
 
@@ -10,7 +20,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, defineComponent, ComposeTableParam } from '@/common/export/commonTable';
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { handleComposeTable } from '@/views/market/market-spot/setup';
 
 export default defineComponent({
   name: EnumRouterName.search_spot_warrant_protocol_specified_record,