huangbin 3 роки тому
батько
коміт
c4931130f1
89 змінених файлів з 238 додано та 12578 видалено
  1. 238 232
      src/views/market/market-spot/spot_trade_order_transaction/components/delisting/index.vue
  2. 0 116
      src/views/market/spot_trade/components/buy-sell-market/components/buy/index.vue
  3. 0 376
      src/views/market/spot_trade/components/buy-sell-market/components/delisting/index.vue
  4. 0 17
      src/views/market/spot_trade/components/buy-sell-market/components/delisting/interface.ts
  5. 0 161
      src/views/market/spot_trade/components/buy-sell-market/components/delisting/setup.ts
  6. 0 196
      src/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/components/choose-finance/index.vue
  7. 0 467
      src/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/index.vue
  8. 0 13
      src/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/interface.ts
  9. 0 182
      src/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/setup.ts
  10. 0 118
      src/views/market/spot_trade/components/buy-sell-market/components/sell/index.vue
  11. 0 238
      src/views/market/spot_trade/components/buy-sell-market/index.vue
  12. 0 135
      src/views/market/spot_trade/components/buy-sell-market/setup.ts
  13. 0 129
      src/views/market/spot_trade/components/detail/index.vue
  14. 0 231
      src/views/market/spot_trade/components/filter/index.vue
  15. 0 231
      src/views/market/spot_trade/components/goods-chart/chart/index.less
  16. 0 256
      src/views/market/spot_trade/components/goods-chart/chart/index.vue
  17. 0 163
      src/views/market/spot_trade/components/goods-chart/index.vue
  18. 0 4
      src/views/market/spot_trade/components/goods-chart/setup.ts
  19. 0 94
      src/views/market/spot_trade/components/goods-chart/stock-exchange/index.vue
  20. 0 115
      src/views/market/spot_trade/components/history-chart/index.vue
  21. 0 387
      src/views/market/spot_trade/components/post_buying/index.vue
  22. 0 16
      src/views/market/spot_trade/components/post_buying/interface.ts
  23. 0 107
      src/views/market/spot_trade/components/post_buying/setup.ts
  24. 0 15
      src/views/market/spot_trade/interface.ts
  25. 0 173
      src/views/market/spot_trade/setup.ts
  26. 0 101
      src/views/market/spot_trade/spot_trade_order_transaction/components/buy-market/index.vue
  27. 0 219
      src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/index.vue
  28. 0 135
      src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/setup.ts
  29. 0 121
      src/views/market/spot_trade/spot_trade_order_transaction/components/chart/index.vue
  30. 0 328
      src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/index.vue
  31. 0 17
      src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/interface.ts
  32. 0 19
      src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/setup.ts
  33. 0 174
      src/views/market/spot_trade/spot_trade_order_transaction/components/detail/index.vue
  34. 0 343
      src/views/market/spot_trade/spot_trade_order_transaction/components/listing/index.vue
  35. 0 5
      src/views/market/spot_trade/spot_trade_order_transaction/components/listing/interface.ts
  36. 0 26
      src/views/market/spot_trade/spot_trade_order_transaction/components/listing/setup.ts
  37. 0 103
      src/views/market/spot_trade/spot_trade_order_transaction/components/sell-market/index.vue
  38. 0 94
      src/views/market/spot_trade/spot_trade_order_transaction/components/stock-exchange/index.vue
  39. 0 28
      src/views/market/spot_trade/spot_trade_order_transaction/index.vue
  40. 0 92
      src/views/market/spot_trade/spot_trade_order_transaction/setup.ts
  41. 0 124
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_basis_difference/index.vue
  42. 0 129
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_listing_transfer/index.vue
  43. 0 164
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/buy-sell-market/index.vue
  44. 0 140
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/buy/index.vue
  45. 0 447
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/index.vue
  46. 0 13
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/interface.ts
  47. 0 58
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/setup.ts
  48. 0 129
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/detail/index.vue
  49. 0 119
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/history-chart/index.vue
  50. 0 504
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/index.vue
  51. 0 14
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/interface.ts
  52. 0 83
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/setup.ts
  53. 0 151
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/sell/index.vue
  54. 0 43
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/setup.ts
  55. 0 176
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/index.vue
  56. 0 9
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/interface.ts
  57. 0 118
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/setup.ts
  58. 0 199
      src/views/market/spot_trade/spot_trade_reference_market/index.vue
  59. 0 28
      src/views/market/spot_trade/warehouse_pre_sale/index.vue
  60. 0 121
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/buy/index.vue
  61. 0 463
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/index.vue
  62. 0 12
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/interface.ts
  63. 0 54
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/setup.ts
  64. 0 354
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/post-buying/index.vue
  65. 0 121
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/sell/index.vue
  66. 0 63
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/index.vue
  67. 0 40
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/setup.ts
  68. 0 107
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_floating_price/index.vue
  69. 0 103
      src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_price/index.vue
  70. 0 28
      src/views/market/spot_trade/warehouse_receipt_trade/index.vue
  71. 0 121
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/buy/index.vue
  72. 0 454
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/delisting/index.vue
  73. 0 12
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/delisting/interface.ts
  74. 0 56
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/delisting/setup.ts
  75. 0 345
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/post-buying/index.vue
  76. 0 122
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/sell/index.vue
  77. 0 63
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/index.vue
  78. 0 40
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/setup.ts
  79. 0 106
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue
  80. 0 104
      src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_price/index.vue
  81. 0 21
      src/views/market/warehouseTrade/chart/index.vue
  82. 0 212
      src/views/market/warehouseTrade/components/delisting/index.vue
  83. 0 21
      src/views/market/warehouseTrade/components/filterOption/index.vue
  84. 0 21
      src/views/market/warehouseTrade/components/fixedPrice/index.vue
  85. 0 21
      src/views/market/warehouseTrade/components/floatPrice/index.vue
  86. 0 212
      src/views/market/warehouseTrade/components/listed/index.vue
  87. 0 392
      src/views/market/warehouseTrade/components/trade/index.vue
  88. 0 143
      src/views/market/warehouseTrade/index.vue
  89. 0 21
      src/views/market/warehouseTrade/order/index.vue

+ 238 - 232
src/views/market/market-spot/spot_trade_order_transaction/components/delisting/index.vue

@@ -1,29 +1,31 @@
 <template>
   <!-- 仓单贸易&仓单预售 买/卖 摘牌 -->
-  <Drawer :title="'摘牌'"
-          :placement="'right'"
-          :visible="visible"
-          width="486px"
-          height="479px"
-          @cancel="cancel"
-          class="top">
+  <Drawer
+    :title="'摘牌'"
+    :placement="'right'"
+    :visible="visible"
+    width="486px"
+    height="479px"
+    @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,80 +33,80 @@
           <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.orderprice.toFixed(2)}}</span>
+                <span class="white ml8">{{ selectedRow.orderprice.toFixed(2) }}</span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
               <a-form-item label="挂牌数量">
-                <span class="white ml8">{{selectedRow.orderqty}}</span>
+                <span class="white ml8">{{ selectedRow.orderqty }}</span>
               </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="99999"
-                                v-model:value="formState.num" />
-                <span class="input-enumdicname-absolute">{{selectedRow.enumdicname}}</span>
+              <a-form-item label="摘牌数量" class="relative" name="num">
+                <a-input-number
+                  class="dialogInput yellowInput"
+                  style="width: 260px"
+                  :min="0"
+                  :max="99999"
+                  v-model:value="formState.num"
+                />
+                <span class="input-enumdicname-absolute">{{ selectedRow.enumdicname }}</span>
                 <!-- <div
                                     class="labelTip"
-                                >({{selectedRow.minivalue}}{{selectedRow.enumdicname}}起)</div> -->
+                >({{selectedRow.minivalue}}{{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>{{selectedRow.orderqty}}{{selectedRow.enumdicname}}</span>
+                  <span>{{ selectedRow.orderqty }}{{ 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="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">{{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>
@@ -139,222 +141,226 @@ import { geLoginID_number } from '@/services/bus/login';
 import { LongType } from '@/services/socket/login/interface';
 import * as Long from 'long';
 export default defineComponent({
-    name: ModalEnum.spot_trade_warehouse_financing_delisting,
-    components: { Drawer, PlusOutlined, MinusOutlined },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<WrTradeOrderDetailRsp>,
-            default: {},
-        },
-        parantSelectedRow: {
-            type: Object as PropType<QueryDeliveryRelationRsp>,
-            default: {},
-        },
-        buyOrSell: {
-            type: Number as PropType<BuyOrSell>,
-            default: BuyOrSell.buy,
-        },
+  name: ModalEnum.spot_trade_warehouse_financing_delisting,
+  components: { Drawer, PlusOutlined, MinusOutlined },
+  emits: ['cancel', 'update'],
+  props: {
+    selectedRow: {
+      type: Object as PropType<WrTradeOrderDetailRsp>,
+      default: {},
     },
+    parantSelectedRow: {
+      type: Object as PropType<QueryDeliveryRelationRsp>,
+      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);
-        function isBuy() {
-            return props.buyOrSell === BuyOrSell.buy;
-        }
-        function getMoney() {
-            // return (formState.price * formState.num).toFixed(2);
-        }
-        // const { getMaxNum, getMoney, getMargin } = handleNumAndMoney(props.enumName, props.buyOrSell, props.selectedRow, props.parantSelectedRow, formState);
-        function submit() {
-            validateAction<ListingForm>(formRef, formState).then((res) => {
-                // 摘牌请求
-                const param: OrderReq = {
-                    ClientSerialNo: uuidv4(), // 客户端流水号
-                    ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // 客户端委托时间
-                    ClientType: 4, // 终端类型
-                    LoginID: geLoginID_number()!, // 登陆账号
-                    AccountID: getSelectedAccountId(), // 交易账号
-                    GoodsID: props.parantSelectedRow.goodsid, // 商品ID
-                    MarketID: props.parantSelectedRow.marketid, // 市场ID
-                    ValidType: 1, // 校验类型 当日有效
-                    OperateType: 1, // 操作类型: 申请
-                    OrderSrc: 1, // 单据来源: 客户端下单
-                    RelatedID: Long.fromString(props.selectedRow.orderid), // 操作员账号ID
-                    OrderPrice: props.selectedRow.orderprice, // 委托价格
-                    OperatorID: Number(geLoginID_number()),
-                    // MarketMaxSub: number // 市价允许最大偏差(做市)
-                    OrderQty: res.num, // 委托数量
-                    BuyOrSell: props.selectedRow.buyorsell === 1 ? 0 : 1, // 买卖方向  0 买 1 卖
-                    BuildType: props.selectedRow.buyorsell === 1 ? 1 : 2, // 下单类型  1 建 2 平
-                    // CurtQuotePrice: 0, // 保留,计算冻结金额使用
-                    // SpPrice: 0 ,// 止盈价格
-                    // SlPrice: 0 , // 止损价格
-                    PriceMode: PriceType.limit, // 取价方式
-                    TimevalidType: 1, // 时间有效类型 单日有效
-                    TriggerType: 1, // 预埋单触发类型
-                    // TriggerPrice: number // 预埋单触发价格
-                    ListingSelectType: 2, // 挂牌点选类型 1:挂牌 2:摘牌 3:先摘后挂
-                    DelistingType: DelistingType.selected, // 摘牌类型 2:点选成交
-                    // RelatedID: number // 关联单号
-                    OptionType: 1, // 期权类型(1:认购(看涨)2:认沽(看跌))
-                    // Premium: number // 权利金
-                    // TriggerOperator: number // 触发条件(1:大于等于2:小于等于)
-                    // ServiceTime: string // 服务端时间
-                    // CouponTypeID: number // 优惠券类型ID(买方)
-                    // UsedQty: number // 使用数量
-                    // ValidTime: string // 指定有效日期
-                    // ReceiveInfoID: number // 收货地址ID
-                };
-                requestResultLoadingAndInfo(Order, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
-                    cancel(true);
-                });
-            });
-        }
-
-        return {
-            visible,
-            cancel,
-            accountList,
-            loading,
-            submit,
-            isBuy,
-            rules,
-            formState,
-            formRef,
-            getCanUseMoney,
-            getSelectedAccount,
-            getMoney,
+  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);
+    function isBuy() {
+      return props.buyOrSell === BuyOrSell.buy;
+    }
+    function getMoney() {
+      // return (formState.price * formState.num).toFixed(2);
+    }
+    // const { getMaxNum, getMoney, getMargin } = handleNumAndMoney(props.enumName, props.buyOrSell, props.selectedRow, props.parantSelectedRow, formState);
+    function submit() {
+      validateAction<ListingForm>(formRef, formState).then((res) => {
+        // 摘牌请求
+        const param: OrderReq = {
+          ClientSerialNo: uuidv4(), // 客户端流水号
+          ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // 客户端委托时间
+          ClientType: 4, // 终端类型
+          LoginID: geLoginID_number()!, // 登陆账号
+          AccountID: getSelectedAccountId(), // 交易账号
+          GoodsID: props.parantSelectedRow.goodsid, // 商品ID
+          MarketID: props.parantSelectedRow.marketid, // 市场ID
+          ValidType: 1, // 校验类型 当日有效
+          OperateType: 1, // 操作类型: 申请
+          OrderSrc: 1, // 单据来源: 客户端下单
+          RelatedID: Long.fromString(props.selectedRow.orderid), // 操作员账号ID
+          OrderPrice: props.selectedRow.orderprice, // 委托价格
+          OperatorID: Number(geLoginID_number()),
+          // MarketMaxSub: number // 市价允许最大偏差(做市)
+          OrderQty: res.num, // 委托数量
+          BuyOrSell: props.selectedRow.buyorsell === 1 ? 0 : 1, // 买卖方向  0 买 1 卖
+          BuildType: props.selectedRow.buyorsell === 1 ? 1 : 2, // 下单类型  1 建 2 平
+          // CurtQuotePrice: 0, // 保留,计算冻结金额使用
+          // SpPrice: 0 ,// 止盈价格
+          // SlPrice: 0 , // 止损价格
+          PriceMode: PriceType.limit, // 取价方式
+          TimevalidType: 1, // 时间有效类型 单日有效
+          TriggerType: 1, // 预埋单触发类型
+          // TriggerPrice: number // 预埋单触发价格
+          ListingSelectType: 2, // 挂牌点选类型 1:挂牌 2:摘牌 3:先摘后挂
+          DelistingType: DelistingType.selected, // 摘牌类型 2:点选成交
+          // RelatedID: number // 关联单号
+          OptionType: 1, // 期权类型(1:认购(看涨)2:认沽(看跌))
+          // Premium: number // 权利金
+          // TriggerOperator: number // 触发条件(1:大于等于2:小于等于)
+          // ServiceTime: string // 服务端时间
+          // CouponTypeID: number // 优惠券类型ID(买方)
+          // UsedQty: number // 使用数量
+          // ValidTime: string // 指定有效日期
+          // ReceiveInfoID: number // 收货地址ID
         };
-    },
+        requestResultLoadingAndInfo(Order, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
+          cancel(true);
+        });
+      });
+    }
+
+    return {
+      visible,
+      cancel,
+      accountList,
+      loading,
+      submit,
+      isBuy,
+      rules,
+      formState,
+      formRef,
+      getCanUseMoney,
+      getSelectedAccount,
+      getMoney,
+    };
+  },
 });
 </script>
 
 <style lang="less">
 .delisting {
+  width: 100%;
+  height: 100%;
+  .flex;
+  flex-direction: column;
+  overflow: hidden;
+  .condition {
     width: 100%;
-    height: 100%;
-    .flex;
-    flex-direction: column;
-    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;
-        }
+    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;
+      }
     }
-    .ant-form {
-        height: 100%;
+    .conditionBtn + .conditionBtn {
+      margin-left: 10px;
     }
+  }
+  .ant-form {
+    height: 100%;
+  }
 }
 ::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-20 {
-    margin-top: -20px;
+  margin-top: -20px;
 }
 .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>;

+ 0 - 116
src/views/market/spot_trade/components/buy-sell-market/components/buy/index.vue

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

+ 0 - 376
src/views/market/spot_trade/components/buy-sell-market/components/delisting/index.vue

@@ -1,376 +0,0 @@
-<template>
-    <!-- 仓单贸易&仓单预售 买/卖 摘牌 -->
-    <Drawer :title="'摘牌'" :placement="'right'" :visible="visible" width="486px" height="479px" @cancel="cancel" class="top">
-        <div class="delisting">
-            <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-select>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="挂牌方">
-                                <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>
-                            <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>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <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-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>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <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" />
-                                <div class="unit">
-                                    <span>0</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-form-item>
-                    </a-col>
-                    <a-row :gutter="24">
-                        <a-col :span="24" class="mt-20">
-                            <a-form-item :label="isFloat() ? '估算金额' : '摘牌金额'">
-                                <span class="white ml8">{{ getMoney() }}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24" v-if="getMargin()">
-                        <a-col :span="24">
-                            <a-form-item :label="getMargin() ? '履约保证金' : ''">
-                                <a-row>
-                                    <a-col :span="24">
-                                        <span class="white ml8">{{ getMargin() }}</span>
-                                    </a-col>
-                                </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>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </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">{{ isBuy() ? '卖出' : '买入' }}</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 { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
-import { defineComponent, PropType, ref } from 'vue';
-import Drawer from '@/common/components/drawer/index.vue';
-import { WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
-import { getAccountTypeList, getSelectedAccountId } from '@/services/bus/account';
-import { getUserId } from '@/services/bus/user';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { HdWRDealOrder } from '@/services/proto/warehousetrade';
-import { v4 as uuidv4 } from 'uuid';
-import moment from 'moment';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
-import { HdWRDealOrderReq } from '@/services/proto/warehousetrade/interface';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { handleForm, handleNumAndMoney, handleSpotWarrant, getWrPosition } from './setup';
-import { handleIs } from '../../setup';
-import { validateAction } from '@/common/setup/form';
-import { ListingForm, TempWrOrderQuoteDetail } from './interface';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { getCanUseMoney } from '@/services/bus/account';
-import { getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
-export default defineComponent({
-    name: ModalEnum.spot_trade_warehouse_financing_delisting,
-    components: { Drawer, PlusOutlined, MinusOutlined },
-    emits: ['cancel', 'update'],
-    props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        selectedRow: {
-            type: Object as PropType<TempWrOrderQuoteDetail>,
-            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);
-        // 估算价
-        function getPrice() {
-            let result = '--';
-            const goodsPrice = getQuoteDayInfoByCodeFindPrice(props.parantSelectedRow.goodscode);
-            if (goodsPrice && goodsPrice !== '--') {
-                // 有实时行情价格
-                result = ((goodsPrice as number) + props.selectedRow.pricemove).toFixed(2);
-            }
-
-            return result;
-        }
-        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: 0, // uint32 是否融资购买(买摘牌时有效)-0:否 1:是
-                    ProductDetailID: 0, // 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);
-                });
-            });
-        }
-
-        return {
-            visible,
-            cancel,
-            accountList,
-            wrHoldList,
-            loading,
-            submit,
-            isWR,
-            isBuy,
-            isFloat,
-            rules,
-            formState,
-            formRef,
-            getCanUseMoney,
-            getSelectedAccount,
-            getMaxNum,
-            getMoney,
-            getMargin,
-            getPrice,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.delisting {
-    width: 100%;
-    height: 100%;
-    .flex;
-    flex-direction: column;
-    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%;
-    }
-}
-::v-deep.ant-slider.formSlider {
-    width: 260px;
-}
-::v-deep.ant-input-suffix {
-    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;
-}
-.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;
-    }
-}
-.cancelBtn:extend(.listedBtn) {
-    background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%);
-    &:hover,
-    &:active,
-    &:focus,
-    &::after {
-        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%) !important;
-        color: @m-white0-hover !important;
-        border: 0 !important;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.mt20 {
-    margin-top: 20px;
-}
-.mt-20 {
-    margin-top: -20px;
-}
-.minusBtn,
-.plusBtn {
-    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;
-}
-.plusBtn {
-    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;
-}
-</style>;

+ 0 - 17
src/views/market/spot_trade/components/buy-sell-market/components/delisting/interface.ts

@@ -1,17 +0,0 @@
-import { WrOrderQuoteDetail } from "@/services/go/wrtrade/interface";
-
-export interface ListingForm {
-    accountid: undefined | number,
-    num: number,
-    LadingBillId: string,
-}
-
-export interface Wrhold {
-    id: string,
-    name: string,
-    subnum: string,
-}
-
-export interface TempWrOrderQuoteDetail extends WrOrderQuoteDetail {
-    wrResult: { dgfactoryitemtypeid: number; dgfactoryitemid: number }[]
-}

+ 0 - 161
src/views/market/spot_trade/components/buy-sell-market/components/delisting/setup.ts

@@ -1,161 +0,0 @@
-import { BuyOrSell } from "@/common/constants/enumCommon";
-import { EnumRouterName } from "@/common/constants/enumRouterName";
-import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
-import { getAccountTypeList, getCanUseMoney } from "@/services/bus/account";
-import { getGoodsAgreeunitByGoodsCode, getQuoteDayInfoByCodeFindPrice } from "@/services/bus/goods";
-import { getRules } from '@/services/bus/rules';
-import { AccountListItem } from "@/services/dataCenter/interafce/account";
-import { queryHoldLB, queryWrPosition } from '@/services/go/wrtrade';
-import { QueryWrPositionReq, WrHoldLB, WrOrderQuote, WrOrderQuoteDetail, WrPosition } from "@/services/go/wrtrade/interface";
-import { reactive, Ref, ref, UnwrapRef } from "vue";
-import { handleIs } from "../../setup";
-import { ListingForm, Wrhold } from "./interface";
-
-export function handleForm(data: WrOrderQuoteDetail) {
-    const formRef = ref();
-    const formState: UnwrapRef<ListingForm> = reactive({
-        accountid: undefined,
-        num: 0,
-        LadingBillId: '',
-    })
-    const rules = {
-        accountid: [{ required: true, message: '请选择交易账户' }],
-        LadingBillId: [{ required: true, message: '请选择现货仓单' }],
-        num: [{ required: true, message: '请输入摘牌数量', trigger: 'blur', type: 'number', min: 1, ma: data.orderqty }],
-
-    }
-    return { rules, formState, formRef }
-}
-
-// 预售仓单汇总
-const wrPostion = ref<WrPosition[]>([])
-export function getWrPosition(enumName: EnumRouterName, buyOrSell: BuyOrSell, loading: Ref<boolean>) {
-    const { isWR, isBuy } = handleIs(enumName, buyOrSell)
-    if (isBuy() && !isWR()) {
-        const param: QueryWrPositionReq = {
-            haswr: 0,
-            querytype: 2,
-        };
-        queryResultLoadingAndInfo(queryWrPosition, loading, param).then(res => {
-            wrPostion.value = res;
-        })
-    }
-}
-
-const allWR = ref<WrHoldLB[]>([])
-// 处理现货仓单
-export function handleSpotWarrant(enumName: EnumRouterName, buyOrSell: BuyOrSell, selectedRow: WrOrderQuote, loading: Ref<boolean>) {
-    const { isWR, isBuy } = handleIs(enumName, buyOrSell)
-    const wrHoldList = ref<Wrhold[]>([])
-    if (isBuy()) {
-        if (isWR()) {
-            queryResultLoadingAndInfo(queryHoldLB, loading).then(res => {
-                allWR.value = res;
-                wrHoldList.value = []
-                wrHoldList.value.length = 0
-                res.forEach(e => {
-                    if (e.wrfactortypeid === String(selectedRow.wrfactortypeid)) {
-                        const { wrholdeno, enableqty, ladingbillid, enumdicname, subnum } = e
-                        const result = { id: ladingbillid, name: `${wrholdeno}(${enableqty}${enumdicname})`, subnum }
-                        wrHoldList.value.push(result)
-                    }
-                })
-            })
-        }
-    }
-    return { wrHoldList }
-}
-
-export function handleNumAndMoney(enumName: EnumRouterName, buyOrSell: BuyOrSell, selectedRow: WrOrderQuoteDetail, parantSelectedRow: WrOrderQuote, formState: UnwrapRef<ListingForm>) {
-    const { isWR, isBuy, isFloat } = handleIs(enumName, buyOrSell)
-    // 资金账号
-    const accountList = getAccountTypeList([2]);
-    // 获取选中的资金账号
-    const getSelectedAccount = () => accountList.find((e) => e.accountid === formState.accountid);
-    // 交易规则
-    const rules = getRules()
-    // 是否有规则
-    const hasRule = () => rules.length > 0;
-    const { buymarginvalue, buymarginalgorithm } = rules.length ? rules[0] : { buymarginvalue: 0, buymarginalgorithm: 1 }
-    //保证金模式 1: 比率 2: 固定
-    const marginMethod = () => buymarginalgorithm === 1
-    const { fixedprice, orderqty, pricemove } = selectedRow;
-    // 获取摘牌最大可摘量
-    function getMaxNum() {
-        let result = 0;
-        if (hasRule()) {
-            // 可用资金
-            const canUseMoney = Number(getCanUseMoney(getSelectedAccount() as AccountListItem))
-            if (!isBuy()) {
-                if (isFloat()) {
-                    const goodsPrice = getQuoteDayInfoByCodeFindPrice(parantSelectedRow.goodscode);
-                    // 估算总价=挂牌基差+期货合约价;
-                    if (goodsPrice && goodsPrice !== '--') {   // 有实时行情价格
-                        // 估算总价
-                        const predictTotal = pricemove + (goodsPrice as number);
-                        // 买方履约保证金比例*估算总价
-                        const marginMoney = marginMethod() ? (buymarginvalue * predictTotal) : (buymarginvalue + predictTotal)
-                        // 浮动价 摘买 最大数量=min{可用资金/(买方履约保证金比例*估算总价),挂牌数量}
-                        result = Math.min(orderqty, canUseMoney / marginMoney)
-                    }
-                } else {
-                    // 买方履约保证金比例*挂牌价格
-                    const marginMoney = marginMethod() ? (buymarginvalue * fixedprice) : (buymarginvalue + fixedprice)
-                    //  一口价 摘买 最大数量=min{挂牌数量,可用资金/(买方履约保证金比例*挂牌价格)
-                    result = Math.min(orderqty, canUseMoney / marginMoney)
-                }
-            } else {
-                if (isWR()) {
-                    if (formState.LadingBillId) {
-                        // 现货库存数量
-                        const warehouseNum = allWR.value.find((e) => e.ladingbillid === formState.LadingBillId)?.enableqty;
-                        // 仓单贸易 一口价/浮动价 摘卖 最大数量=min(现货库存可用数量,挂牌数量),现货库存数量为所选仓单数量
-                        if (warehouseNum) {
-                            result = Math.min(orderqty, warehouseNum)
-                        }
-                    }
-                } else {
-                    // 获取头寸
-                    const item = wrPostion.value.find(e => String(e.wrfactortypeid) === String(parantSelectedRow.wrfactortypeid))
-                    if (item) {
-                        result = item.enalbeqty
-                    }
-                }
-            }
-        }
-        return Math.round(result)
-    }
-    //  摘牌金额
-    function getMoney() {
-        let result = 0
-        if (isFloat()) {
-            const goodsPrice = getQuoteDayInfoByCodeFindPrice(parantSelectedRow.goodscode);
-            const agreeunit = getGoodsAgreeunitByGoodsCode(parantSelectedRow.goodscode);
-            if (goodsPrice && goodsPrice !== '--') {   // 有实时行情价格
-                // 估算总价=挂牌基差+期货合约价;
-                const predictTotal = pricemove + (goodsPrice as number);
-                // 估算总额=估算总价*摘牌数量;
-                result = predictTotal * formState.num * agreeunit
-            }
-        } else {
-            // 摘牌金额=挂牌价格*摘牌数量
-            result = formState.num * fixedprice
-        }
-        return Number(result.toFixed(2))
-    }
-    // 履约保证金
-    function getMargin() {
-        // fixed sell  履约保证金=卖方履约保证金比例*摘牌金额
-        // fixed bull  履约保证金=买方履约保证金比例*摘牌金额
-        // floor sell  履约保证金=卖方履约保证金比例*估算总额,履约保证金为0则括号内容不显示
-        //  floor  buy 履约保证金=买方履约保证金比例*估算总额
-        let result = 0
-        if (hasRule()) {
-            const { buymarginvalue, sellmarginvalue } = rules[0]
-            const margin = isBuy() ? sellmarginvalue : buymarginvalue
-            result = marginMethod() ? margin * getMoney() : margin + getMoney()
-        }
-        return Number(result.toFixed(2))
-    }
-    return { getMaxNum, getMoney, getMargin }
-}

+ 0 - 196
src/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/components/choose-finance/index.vue

@@ -1,196 +0,0 @@
-<template>
-    <!-- 仓单贸易&仓单预售 融资-->
-
-    <Drawer
-        :title="'选择融资方案'"
-        :placement="'right'"
-        :visible="visible"
-        width="486px"
-        height="580px"
-        @cancel="update"
-        class="topHigh financing"
-    >
-        <div class="financingCont">
-            <a-row class="f-t">
-                <a-col :span="7">融出方/名称</a-col>
-                <a-col :span="10">天数/保证金/利息</a-col>
-                <a-col :span="7">结息/起息天数</a-col>
-            </a-row>
-            <div
-                class="contBar"
-                v-for="(item, index) in list"
-                :key="index + 11"
-                @click="choose(item)"
-            >
-                <a-row class="firstRow">
-                    <a-col :span="17">{{item.username}}</a-col>
-                    <a-col :span="7" v-if="item.isautoloan">放款快</a-col>
-                </a-row>
-                <a-row class="secondRow">
-                    <a-col :span="7">{{item.productname}}</a-col>
-                    <a-col :span="10">
-                        <a-row class="middle">
-                            <a-col :span="7">{{item.financingdays}}天</a-col>
-                            <a-col :span="10">{{(item.marginratio * 100).toFixed(2)}}%</a-col>
-                            <a-col :span="7">
-                                <!-- <div class="two">{{item.interestrate * 100}}%</div>
-                                <div class="two">{{item.interestrate * 100}}%</div>-->
-                                {{item.interestratemode === 3 ? item.interestrate : (item.interestrate * 10000).toFixed(2)}}{{item.interestratemode === 3 ? '' : '‱'}}
-                            </a-col>
-                        </a-row>
-                    </a-col>
-                    <a-col :span="7">
-                        <div class="settle">
-                            <div>{{item.interestsettlemode === 1 ? '日' : '月'}}结</div>
-                            <div>{{item.interestminlen}}天起息</div>
-                        </div>
-                    </a-col>
-                </a-row>
-            </div>
-            <div class="noDataContBar" v-if="!list.length">
-                <div class="noData"></div>
-            </div>
-        </div>
-    </Drawer>
-</template>
-
-<script lang="ts">
-import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
-import { defineComponent, PropType } from 'vue';
-import Drawer from '@/common/components/drawer/index.vue';
-import { WrFAProductDetail, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { getFinacingList } from '../../../../setup';
-export default defineComponent({
-    name: ModalEnum.spot_trade_warehouse_delisting,
-    components: { Drawer, PlusOutlined, MinusOutlined },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<WrOrderQuoteDetail>,
-            default: {},
-        },
-        isFloat: {
-            type: Boolean,
-            default: true,
-        },
-    },
-
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        // ,浮动价只支持自动融资产品
-        const list = props.isFloat ? getFinacingList().filter((e) => e.isautoloan === 1) : getFinacingList();
-        function update() {
-            cancel();
-            context.emit('cancel');
-        }
-        function choose(item: WrFAProductDetail) {
-            cancel();
-            context.emit('update', item);
-        }
-        return {
-            visible,
-            update,
-            choose,
-            list,
-        };
-    },
-});
-</script>
-
-<style lang="less" scoped>
-.financing {
-    z-index: 99;
-    .financingCont {
-        padding: 10px 20px 50px;
-        .ant-row.f-t {
-            .ant-col {
-                font-size: 14px;
-                color: @m-grey1;
-                height: 35px;
-                line-height: 35px;
-            }
-            .ant-col:nth-child(2) {
-                text-align: center;
-            }
-            .ant-col:nth-child(3) {
-                text-align: right;
-            }
-        }
-        .contBar {
-            margin-top: 10px;
-            width: 100%;
-            padding: 0 13px;
-            cursor: pointer;
-            .flex;
-            flex-direction: column;
-            background: @m-blue19;
-            border-radius: 5px;
-            .ant-row.firstRow {
-                border-bottom: 1px solid @m-blue20;
-                .ant-col {
-                    height: 40px;
-                    line-height: 40px;
-                    font-size: 16px;
-                    color: @m-white6;
-                }
-                .ant-col:nth-child(2) {
-                    text-align: right;
-                    color: @m-green0;
-                    font-size: 14px;
-                }
-            }
-            .ant-row.secondRow {
-                padding: 10px 0;
-                .ant-col {
-                    height: 40px;
-                    font-size: 14px;
-                }
-                .ant-col:first-child {
-                    color: @m-yellow1;
-                    line-height: 40px;
-                    white-space: nowrap;
-                    overflow: hidden;
-                    text-overflow: ellipsis;
-                }
-                .ant-col:last-child {
-                    text-align: right;
-                    .settle {
-                        padding: 4px 0;
-                        height: 16px;
-                        line-height: 16px;
-                        color: @m-white6;
-                    }
-                }
-                .middle.ant-row {
-                    .ant-col {
-                        height: 40px;
-                        line-height: 40px;
-                        color: @m-white6;
-                        white-space: nowrap;
-                    }
-                    .ant-col:nth-child(2) {
-                        text-align: center;
-                    }
-                    .ant-col:nth-child(3) {
-                        text-align: right;
-                        .two {
-                            height: 20px;
-                            line-height: 20px;
-                        }
-                    }
-                }
-            }
-        }
-        .noDataContBar {
-            width: 100%;
-            text-align: center;
-            margin-top: 175px;
-            .noData {
-                margin: 0 auto;
-            }
-        }
-    }
-}
-</style>;

+ 0 - 467
src/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/index.vue

@@ -1,467 +0,0 @@
-<template>
-    <!-- 仓单贸易&仓单预售 买/卖 摘牌 -->
-    <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">
-                <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-select>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="挂牌方">
-                                <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>
-                            <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>
-                            </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">
-                                <div class="way">
-                                    <div class="left">{{ formState.case ? formState.case : '请选择' }}</div>
-                                    <div class="right">
-                                        <svg class="icon svg-icon" aria-hidden="true">
-                                            <use xlink:href="#icon-fangan" />
-                                        </svg>
-                                    </div>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <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-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>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <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" />
-                                <div class="unit">
-                                    <span>0</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-form-item>
-                    </a-col>
-                    <a-row :gutter="24">
-                        <a-col :span="24" class="mt-20">
-                            <a-form-item :label="isFloat() ? '估算金额' : '摘牌金额'">
-                                <span class="white ml8">{{ getMoney() }}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <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>
-                                    <a-col :span="5" class="tr">
-                                        <span class="grey1">可用资金</span>
-                                    </a-col>
-                                    <a-col :span="11">
-                                        <span
-                                            class="white ml8"
-                                        >{{getCanUseMoney(getSelectedAccount())}}</span>
-                                    </a-col>
-                                </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>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </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">{{ 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>
-</template>
-
-<script lang="ts">
-import { defineAsyncComponent, defineComponent, onMounted, PropType, ref } from 'vue';
-import Drawer from '@/common/components/drawer/index.vue';
-import { WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
-import { getAccountTypeList, getSelectedAccountId } from '@/services/bus/account';
-import { getUserId } from '@/services/bus/user';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { handleForm, handleSpotWarrant } from './setup';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { handleModalComponent } from '@/common/setup/asyncComponent';
-import { WrFAProductDetail } from '@/services/go/wrtrade/interface';
-import { validateAction } from '@/common/setup/form';
-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 { HdWRDealOrderReq } from '@/services/proto/warehousetrade/interface';
-import { v4 as uuidv4 } from 'uuid';
-import moment from 'moment';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-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,
-        },
-    },
-
-    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({}));
-
-        // 估算价
-        function getPrice() {
-            let result = '--';
-            const goodsPrice = getQuoteDayInfoByCodeFindPrice(props.parantSelectedRow.goodscode);
-            if (goodsPrice && goodsPrice !== '--') {
-                // 有实时行情价格
-                result = ((goodsPrice as number) + props.selectedRow.pricemove).toFixed(2);
-            }
-
-            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 ? '' : '‱'}-${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;
-                }
-
-                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,
-        };
-    },
-});
-</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%;
-    }
-    .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;
-            }
-        }
-    }
-}
-::v-deep.ant-slider.formSlider {
-    width: 260px;
-}
-::v-deep.ant-input-suffix {
-    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;
-}
-.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;
-    }
-}
-.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;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.mt20 {
-    margin-top: 20px;
-}
-.mt-10 {
-    margin-top: -10px;
-}
-.minusBtn,
-.plusBtn {
-    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;
-}
-.plusBtn {
-    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;
-}
-</style>;

+ 0 - 13
src/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/interface.ts

@@ -1,13 +0,0 @@
-export interface ListingForm {
-    accountid: undefined | number,
-    num: number,
-    LadingBillId: string,
-    case: string,
-    caseId: number,
-}
-
-export interface Wrhold {
-    id: string,
-    name: string,
-    subnum: string,
-}

+ 0 - 182
src/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/setup.ts

@@ -1,182 +0,0 @@
-import { BuyOrSell } from "@/common/constants/enumCommon";
-import { EnumRouterName } from "@/common/constants/enumRouterName";
-import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
-import { getAccountTypeList, getCanUseMoney } from "@/services/bus/account";
-import { getGoodsAgreeunitByGoodsCode, getQuoteDayInfoByCodeFindPrice } from "@/services/bus/goods";
-import { getRules } from '@/services/bus/rules';
-import { AccountListItem } from "@/services/dataCenter/interafce/account";
-import { queryHoldLB, queryWrPosition } from '@/services/go/wrtrade';
-import { QueryWrPositionReq, WrFAProductDetail, WrHoldLB, WrOrderQuote, WrOrderQuoteDetail, WrPosition } from "@/services/go/wrtrade/interface";
-import { reactive, Ref, ref, UnwrapRef } from "vue";
-import { handleIs } from "../../setup";
-import { ListingForm, Wrhold } from "./interface";
-
-export const selecedFinance = ref<WrFAProductDetail>()
-
-export function handleForm(data: WrOrderQuoteDetail) {
-    const formRef = ref();
-    const formState: UnwrapRef<ListingForm> = reactive({
-        accountid: undefined,
-        num: 0,
-        LadingBillId: '',
-        case: '',
-        caseId: 0
-    })
-    const rules = {
-        accountid: [{ required: true, message: '请选择交易账户' }],
-        LadingBillId: [{ required: true, message: '请选择现货仓单' }],
-        caseId: [{ required: true, message: '请选择融资方案' }],
-        num: [{ required: true, message: '请输入摘牌数量', trigger: 'blur', type: 'number', min: 1, ma: data.orderqty }],
-
-    }
-    return { rules, formState, formRef }
-}
-
-// 预售仓单汇总
-const wrPostion = ref<WrPosition[]>([])
-export function getWrPosition(enumName: EnumRouterName, buyOrSell: BuyOrSell, loading: Ref<boolean>) {
-    const { isWR, isBuy } = handleIs(enumName, buyOrSell)
-    if (isBuy() && !isWR()) {
-        const param: QueryWrPositionReq = {
-            haswr: 0,
-            querytype: 2,
-        };
-        queryResultLoadingAndInfo(queryWrPosition, loading, param).then(res => {
-            wrPostion.value = res;
-        })
-    }
-}
-
-const allWR = ref<WrHoldLB[]>([])
-// 处理现货仓单
-export function handleSpotWarrant(enumName: EnumRouterName, buyOrSell: BuyOrSell, selectedRow: WrOrderQuote, loading: Ref<boolean>) {
-    const { isWR, isBuy } = handleIs(enumName, buyOrSell)
-    const wrHoldList = ref<Wrhold[]>([])
-    if (isBuy()) {
-        if (isWR()) {
-            queryResultLoadingAndInfo(queryHoldLB, loading).then(res => {
-                allWR.value = res;
-                wrHoldList.value.length = 0
-                res.forEach(e => {
-                    if (e.wrfactortypeid === String(selectedRow.wrfactortypeid)) {
-                        const { wrholdeno, enableqty, ladingbillid, enumdicname, subnum } = e
-                        const result = { id: ladingbillid, name: `${wrholdeno}(${enableqty}${enumdicname})`, subnum }
-                        wrHoldList.value.push(result)
-                    }
-                })
-            })
-        }
-    }
-    return { wrHoldList }
-}
-
-// // 处理现货仓单
-// export function handleSpotWarrant(enumName: EnumRouterName, buyOrSell: BuyOrSell, selectedRow: WrOrderQuote, loading: Ref<boolean>) {
-//     const { isWR, isBuy } = handleIs(enumName, buyOrSell)
-//     const wrHoldList = ref<Wrhold[]>([])
-//     if (isBuy()) {
-//         if (isWR()) {
-//             queryResultLoadingAndInfo(queryHoldLB, loading).then(res => {
-//                 wrHoldList.value = res.filter((e: WrHoldLB) => e.wrfactortypeid === String(selectedRow.wrfactortypeid)).map((e: WrHoldLB) => {
-//                     const { wrholdeno, enableqty, ladingbillid } = e
-//                     return { id: ladingbillid, name: `${wrholdeno}(${enableqty})` }
-//                 })
-//             })
-//         }
-//     }
-//     return { wrHoldList }
-// }
-
-export function handleNumAndMoney(enumName: EnumRouterName, buyOrSell: BuyOrSell, selectedRow: WrOrderQuoteDetail, parantSelectedRow: WrOrderQuote, formState: UnwrapRef<ListingForm>) {
-    const { isWR, isBuy, isFloat } = handleIs(enumName, buyOrSell)
-    // 资金账号
-    const accountList = getAccountTypeList([2]);
-    // 获取选中的资金账号
-    const getSelectedAccount = () => accountList.find((e) => e.accountid === formState.accountid);
-    // 交易规则
-    const rules = getRules()
-    // 是否有规则
-    const hasRule = () => rules.length > 0;
-    //保证金模式 1: 比率 2: 固定
-    const { buymarginvalue, buymarginalgorithm } = rules.length ? rules[0] : { buymarginvalue: 0, buymarginalgorithm: 1 }
-    const marginMethod = () => buymarginalgorithm === 1
-    const { fixedprice, orderqty, pricemove } = selectedRow;
-    // 获取摘牌最大可摘量
-    function getMaxNum() {
-        let result = 0;
-        if (hasRule()) {
-            // 可用资金
-            const canUseMoney = Number(getCanUseMoney(getSelectedAccount() as AccountListItem))
-            if (!isBuy()) {
-                if (isFloat()) {
-                    const goodsPrice = getQuoteDayInfoByCodeFindPrice(parantSelectedRow.goodscode);
-                    // 估算总价=挂牌基差+期货合约价;
-                    if (goodsPrice && goodsPrice !== '--') {   // 有实时行情价格
-                        // 估算总价
-                        const predictTotal = pricemove + (goodsPrice as number);
-                        // 买方履约保证金比例*估算总价
-                        const marginMoney = marginMethod() ? (buymarginvalue * predictTotal) : (buymarginvalue + predictTotal)
-                        // 浮动价 摘买 最大数量=min{可用资金/(买方履约保证金比例*估算总价),挂牌数量}
-                        result = Math.min(orderqty, canUseMoney / marginMoney)
-                    }
-                } else {
-                    // 买方履约保证金比例*挂牌价格
-                    const marginMoney = marginMethod() ? (buymarginvalue * fixedprice) : (buymarginvalue + fixedprice)
-                    //  一口价 摘买 最大数量=min{挂牌数量,可用资金/(买方履约保证金比例*挂牌价格)
-                    result = Math.min(orderqty, canUseMoney / marginMoney)
-                }
-            } else {
-                if (isWR()) {
-                    if (formState.LadingBillId) {
-                        // 现货库存数量
-                        const warehouseNum = allWR.value.find((e) => e.ladingbillid === formState.LadingBillId)?.enableqty;
-                        // 仓单贸易 一口价/浮动价 摘卖 最大数量=min(现货库存可用数量,挂牌数量),现货库存数量为所选仓单数量
-                        if (warehouseNum) {
-                            result = Math.min(orderqty, warehouseNum)
-                        }
-                    }
-                } else {
-                    // 获取头寸
-                    const item = wrPostion.value.find(e => String(e.wrfactortypeid) === String(parantSelectedRow.wrfactortypeid))
-                    if (item) {
-                        result = item.enalbeqty
-                    }
-                }
-            }
-        }
-        return Math.round(result)
-    }
-    //  摘牌金额
-    function getMoney() {
-        let result = 0
-        if (isFloat()) {
-            const goodsPrice = getQuoteDayInfoByCodeFindPrice(parantSelectedRow.goodscode);
-            const agreeunit = getGoodsAgreeunitByGoodsCode(parantSelectedRow.goodscode);
-            if (goodsPrice && goodsPrice !== '--') {   // 有实时行情价格
-                // 估算总价=挂牌基差+期货合约价;
-                const predictTotal = pricemove + (goodsPrice as number);
-                // 估算总额=估算总价*摘牌数量;
-                result = predictTotal * formState.num * agreeunit
-            }
-        } else {
-            // 摘牌金额=挂牌价格*摘牌数量
-            result = formState.num * fixedprice
-        }
-        return Number(result.toFixed(2))
-    }
-    // 履约保证金
-    function getMargin() {
-        // fixed sell  履约保证金=卖方履约保证金比例*摘牌金额
-        // fixed bull  履约保证金=买方履约保证金比例*摘牌金额
-        // floor sell  履约保证金=卖方履约保证金比例*估算总额,履约保证金为0则括号内容不显示
-        //  floor  buy 履约保证金=买方履约保证金比例*估算总额
-        let result = 0
-        if (hasRule()) {
-            if (selecedFinance.value) {
-                result = marginMethod() ? selecedFinance.value.marginratio * getMoney() : selecedFinance.value.marginratio * getMoney()
-            }
-        }
-        return Number(result.toFixed(2))
-    }
-    return { getMaxNum, getMoney, getMargin }
-}

+ 0 - 118
src/views/market/spot_trade/components/buy-sell-market/components/sell/index.vue

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

+ 0 - 238
src/views/market/spot_trade/components/buy-sell-market/index.vue

@@ -1,238 +0,0 @@
-<template>
-    <!-- 买卖大厅 -->
-    <div class="buy-sell-market">
-        <div class="buy-sell-market-title">
-            <a class="backIcon" @click="cancel">
-                <LeftOutlined />
-            </a>
-            <div class="titleBtn">
-                <div class="name">{{ selectedRow.deliverygoodsname }}</div>
-                <div class="arrowRightIcon"></div>
-            </div>
-            <div class="titleBtn titleBtn2">
-                <div class="arrowLeftIcon"></div>
-                <div class="name">{{ selectedRow.wrgoodsname }}</div>
-                <div class="arrowRightIcon"></div>
-            </div>
-            <div class="titleBtn titleBtn2">
-                <div class="arrowLeftIcon"></div>
-                <div class="name">{{ selectedRow.warehousename }}</div>
-                <div class="arrowRightIcon"></div>
-            </div>
-            <div class="titleBtn titleBtn3" v-if="!isWR(enumName)">
-                <div class="arrowLeftIcon"></div>
-                <div class="name">
-                    <a-month-picker :allowClear="false" v-model:value="time" @change="timeChange" class="commonDatePicker conditionPicker" />
-                </div>
-                <DownOutlined />
-            </div>
-
-            <div class="priceBar bdf1 ml20">
-                <div class="greenBar green">
-                    <div class="numBlock" v-if="isFloat()">
-                        <div class="first">卖基差</div>
-                        <div class="last">{{ selectedRow.sellpricemove }}</div>
-                    </div>
-                    <div class="numBlock" v-else>
-                        <div class="first">卖价</div>
-                        <div class="last">{{ selectedRow.sellprice }}</div>
-                    </div>
-                    <div class="numBlock">
-                        <div class="first">卖量</div>
-                        <div class="last">{{ selectedRow.sellqty }}</div>
-                    </div>
-                </div>
-                <div class="redBar red">
-                    <div class="numBlock" v-if="isFloat()">
-                        <div class="first">买基差</div>
-                        <div class="last">{{ selectedRow.buypricemove }}</div>
-                    </div>
-                    <div class="numBlock ml15" v-else>
-                        <div class="first">买价</div>
-                        <div class="last">{{ selectedRow.buyprice }}</div>
-                    </div>
-                    <div class="numBlock">
-                        <div class="first">买量</div>
-                        <div class="last">{{ selectedRow.buyqty }}</div>
-                    </div>
-                </div>
-            </div>
-            <a-button class="market" v-if="isFloat()" @click="openComponent({ code: 'GoodsChart' })">
-                <div class="first">{{ selectedRow.goodscode }}</div>
-                <div class="last red">{{ getGoodsPrice() }}</div>
-                <LineChartOutlined />
-            </a-button>
-            <!-- 历史走势按钮 -->
-            <a-button class="historyBtn" @click="openComponent({ code: 'HisChart' })">
-                历史走势
-                <LineChartOutlined />
-            </a-button>
-            <BtnList :btnList="firstBtn" :record="selectedRow" @click="openComponent" />
-        </div>
-        <a-row class="buySellHall">
-            <a-col :span="12" v-if="sellMarket.isMarket">
-                <Sell :enumName="enumName" ref="sellRef" :parantSelectedRow="selectedRow" :time="time" :btnList="handleBtnList(sellMarket.btnList)" />
-            </a-col>
-            <a-col :span="12" v-if="buyMarket.isMarket">
-                <Buy :enumName="enumName" ref="buyRef" :time="time" :parantSelectedRow="selectedRow" :btnList="handleBtnList(buyMarket.btnList)" />
-            </a-col>
-        </a-row>
-        <component :is="componentId" v-if="componentId" :selectedRow="getSelectedRow()" :goodsPrice="getGoodsPrice()" :enumName="enumName" :time="time" @cancel="closeComponent"> </component>
-    </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { defineAsyncComponent, defineComponent, BtnList, ModalEnum } from '@/common/export/commonTable';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { WrOrderQuote } from '@/services/go/wrtrade/interface';
-import { LeftOutlined } from '@ant-design/icons-vue';
-import { handleFinacing, handleIs, setGoodsPrice } from './setup';
-import Buy from './components/buy/index.vue';
-import Sell from './components/sell/index.vue';
-import { LineChartOutlined, DownOutlined } from '@ant-design/icons-vue';
-import { handleModalComponent } from '@/common/setup/asyncComponent';
-import { onBeforeUnmount, onMounted, PropType, ref } from 'vue';
-import { handleSpotBtnList } from '../../setup';
-import { v4 } from 'uuid';
-import { addSubscribeQuotation, removeSubscribeQuotation } from '@/services/socket/quota';
-import Bus from '@/utils/eventBus/index';
-import { getQuoteDayInfoByCodeFindPrice, getQuoteDayInfoByCode } from '@/services/bus/goods';
-import TimerUtils from '@/utils/timer/timerUtil';
-import { BtnListType } from '@/common/components/btnList/interface';
-import moment, { Moment } from 'moment';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-
-export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'buy-sell-market',
-    props: {
-        selectedRow: {
-            type: Object as PropType<WrOrderQuote>,
-            default: {},
-        },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-    },
-    components: {
-        Buy,
-        Sell,
-        BtnList,
-        LeftOutlined,
-        DownOutlined,
-        LineChartOutlined,
-        [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../detail/index.vue')),
-        [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../post_buying/index.vue')),
-        HisChart: defineAsyncComponent(() => import('../history-chart/index.vue')),
-        GoodsChart: defineAsyncComponent(() => import('../goods-chart/index.vue')), // 待优化
-    },
-    setup(props, context) {
-        const time = ref<Moment>(moment(props.selectedRow.deliverymonth)); // string 交收月
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-
-        const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
-        // 买卖大厅 配置数据
-        // 表格操作按钮列表
-        const { firstBtn, buyMarket, sellMarket } = handleSpotBtnList(props.enumName);
-        // 获取浮动价商品实时价格
-
-        function getGoodsPrice() {
-            const result = getQuoteDayInfoByCodeFindPrice(props.selectedRow.goodscode);
-            setGoodsPrice(result);
-            return result;
-        }
-        const uuid = v4();
-        if (isFloat()) {
-            // 如果是浮动价需要行情订阅
-            const arr = [{ exchangeCode: 250, goodsCode: props.selectedRow.goodscode, subState: 0 }];
-            addSubscribeQuotation(uuid, arr);
-        }
-        onBeforeUnmount(() => {
-            removeSubscribeQuotation(uuid);
-            TimerUtils.clearInterval('buyAndSellMartet');
-            TimerUtils.clearTimeout('debounce');
-        });
-        const buyRef = ref<null | { queryTableAction: Function }>(null);
-        const sellRef = ref<null | { queryTableAction: Function }>(null);
-        const queryFn = () => {
-            buyRef.value?.queryTableAction();
-            sellRef.value?.queryTableAction();
-        };
-        const { componentId, closeComponent, openComponent } = handleModalComponent(queryFn, ref({}));
-        const { hasFinacing } = handleFinacing(loading, props.selectedRow.wrfactortypeid);
-        function handleBtnList(list: BtnListType[]) {
-            if (!hasFinacing()) {
-                return list.filter((e) => e.code !== 'spot_trade_warehouse_financing_delisting');
-            } else {
-                return list;
-            }
-        }
-        function timeChange() {
-            TimerUtils.setTimeout(
-                () => {
-                    queryFn();
-                },
-                200,
-                'debounce'
-            );
-        }
-        TimerUtils.setInterval(
-            () => {
-                queryFn();
-            },
-            10 * 1000,
-            'buyAndSellMartet'
-        );
-        // 单据挂牌成功 通知买大厅刷新数据
-        Bus.$on('spotTrade', queryFn);
-
-        const quote = getQuoteDayInfoByCode(props.selectedRow.goodscode);
-        // 切换组件数据
-        const getSelectedRow = () => {
-            if (componentId.value === 'GoodsChart') {
-                return quote;
-            }
-            if (componentId.value === 'HisChart') {
-                return props.selectedRow;
-            }
-        };
-
-        return {
-            time,
-            buyRef,
-            sellRef,
-            cancel,
-            isFloat,
-            getGoodsPrice,
-            visible,
-            firstBtn,
-            buyMarket,
-            sellMarket,
-            componentId,
-            closeComponent,
-            openComponent,
-            enumName: props.enumName,
-            handleBtnList,
-            isWR,
-            timeChange,
-            getSelectedRow,
-        };
-    },
-});
-</script>
-<style lang="less">
-.priceBar {
-    .flex;
-    flex-direction: column;
-    height: 32px;
-    .greenBar,
-    .redBar {
-        height: 16px;
-        line-height: 16px;
-    }
-}
-</style>

+ 0 - 135
src/views/market/spot_trade/components/buy-sell-market/setup.ts

@@ -1,135 +0,0 @@
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { TableKey } from '@/common/methods/table/interface';
-import { getTableColumns, getTableEvent, queryTableList } from "@/common/setup/table";
-import { queryFaProductDetail } from '@/services/go/wrtrade';
-import { WrFAProductDetail } from "@/services/go/wrtrade/interface";
-import { Ref, ref } from 'vue';
-
-
-export function handleBuyAndSellList<T>(menuType: EnumRouterName, isDetail: boolean, tableName: keyof TableKey) {
-    // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<T>();
-    // 表头数据
-    const { columns, registerColumn } = getTableColumns();
-    // 表格事件
-    const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<T>({});
-    // 注册表头信息 过滤
-    registerColumn(tableName, []);
-    return {
-        loading, tableList, columns, expandedRowKeys, selectedRow, Rowclick, queryTable
-    }
-}
-
-// 根据 当前tab 的枚举,获取买大厅对应的 wrpricetype haswr tableKey
-export function getBuyMarketParam(enumName: EnumRouterName) {
-    let wrpricetype = 1, haswr = 0, tableKey: keyof TableKey = 'table_pcweb_spot_trade_warehouse_price_trading_hall_buy'
-    switch (enumName) {
-        case EnumRouterName.warehouse_receipt_trade_price:
-            wrpricetype = 1;
-            haswr = 1
-            tableKey = 'table_pcweb_spot_trade_warehouse_price_trading_hall_buy'
-            break
-        case EnumRouterName.warehouse_receipt_trade_floating_price:
-            wrpricetype = 2;
-            haswr = 1
-            tableKey = 'table_pcweb_spot_trade_warehouse_float_trading_hall_buy'
-            break
-        case EnumRouterName.warehouse_pre_sale_price:
-            wrpricetype = 1;
-            haswr = 0
-            tableKey = 'table_pcweb_spot_trade_warehouse_presale_price_trading_hall_buy'
-            break
-        case EnumRouterName.warehouse_pre_sale_floating_price:
-            wrpricetype = 2;
-            haswr = 0
-            tableKey = 'table_pcweb_spot_trade_warehouse_presale_float_trading_hall_buy'
-            break
-    }
-    return { wrpricetype, haswr, tableKey }
-}
-
-// 根据 当前tab 的枚举,获取卖大厅对应的 wrpricetype haswr tableKey
-export function getSellMarketParam(enumName: EnumRouterName) {
-    let wrpricetype = 1, haswr = 0, tableKey: keyof TableKey = 'table_pcweb_spot_trade_warehouse_price_trading_hall_sale'
-    switch (enumName) {
-        case EnumRouterName.warehouse_receipt_trade_price:
-            wrpricetype = 1;
-            haswr = 1
-            tableKey = 'table_pcweb_spot_trade_warehouse_price_trading_hall_sale'
-            break
-        case EnumRouterName.warehouse_receipt_trade_floating_price:
-            wrpricetype = 2;
-            haswr = 1
-            tableKey = 'table_pcweb_spot_trade_warehouse_float_trading_hall_sale'
-            break
-        case EnumRouterName.warehouse_pre_sale_price:
-            wrpricetype = 1;
-            haswr = 0
-            tableKey = 'table_pcweb_spot_trade_warehouse_presale_price_trading_hall_sale'
-            break
-        case EnumRouterName.warehouse_pre_sale_floating_price:
-            wrpricetype = 2;
-            haswr = 0
-            tableKey = 'table_pcweb_spot_trade_warehouse_presale_float_trading_hall_sale'
-            break
-    }
-    return { wrpricetype, haswr, tableKey }
-}
-
-export function handleIs(enumName: EnumRouterName, buyOrSell: BuyOrSell) {
-    /**
-     *
-     * @returns 1 => 仓单贸易; 0 => 仓单预售
-     */
-    function isWR(): 0 | 1 {
-        if (enumName === EnumRouterName.warehouse_receipt_trade_price || enumName === EnumRouterName.warehouse_receipt_trade_floating_price || enumName === EnumRouterName.warehouse_receipt_trade_blocs) {
-            return 1
-        } else {
-            return 0
-        }
-    }
-    /**
-     *
-     * @returns true => 买; false =>卖
-     */
-    function isBuy() {
-        return buyOrSell === BuyOrSell.buy
-    }
-    /**
-     *
-     * @returns  true => 浮动价; false =>一口价
-     */
-    function isFloat() {
-        return enumName === EnumRouterName.warehouse_receipt_trade_floating_price ||
-            enumName === EnumRouterName.warehouse_pre_sale_floating_price
-    }
-    return { isWR, isBuy, isFloat }
-}
-
-const list = ref<WrFAProductDetail[]>([]);
-// 获取融资摘牌
-export function handleFinacing(loading: Ref<boolean>, id: number) {
-    queryResultLoadingAndInfo(queryFaProductDetail, loading, { wrfactortypeid: id }).then((res) => {
-        list.value = res;
-        return res
-    });
-    function hasFinacing(): boolean {
-        return list.value.length > 0
-    }
-    return { hasFinacing }
-}
-
-export function getFinacingList(): WrFAProductDetail[] {
-    return list.value
-}
-
-// 商品实时价格
-const goodsPrice = ref<string | number>('--')
-export function setGoodsPrice(value: string | number) {
-    goodsPrice.value = value
-}
-export function getGoodsPrice(): Ref<string | number> {
-    return goodsPrice
-}

+ 0 - 129
src/views/market/spot_trade/components/detail/index.vue

@@ -1,129 +0,0 @@
-<template>
-  <!-- 买卖大厅详情 -->
-  <Drawer :title="'详情'"
-          :placement="'right'"
-          :visible="visible"
-          class="top top486"
-          @cancel="cancel">
-    <div class="detailCont">
-      <div class="rows">
-        <div class="row"
-             v-for="item in lstitem"
-             :key="item.name">
-          <div class="left">{{item.name}}</div>
-          <div class="right">{{item.value}}</div>
-        </div>
-      </div>
-      <div class="ruleTitle">履约规则:</div>
-      <div class="rulesCont">
-        <a-row>
-          <a-col :span="24"
-                 class="ruleCol">
-            <div class="line"
-                 v-for="item in lststep"
-                 :key="item.autoid">
-              <!-- <div class="no">{{index + 1}}</div> -->
-              <div class="name">{{item.steptypename}}</div>
-              <div class="time">{{item.stepdate}}</div>
-            </div>
-          </a-col>
-        </a-row>
-      </div>
-    </div>
-  </Drawer>
-</template>
-
-<script lang="ts">
-import { defineComponent, PropType, ref } from 'vue';
-import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrGoodsInfoReq, WrGoodsPerformanceStep, WrOrderQuote, WrTypeItem } from '@/services/go/wrtrade/interface';
-import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { queryWrGoodsInfo } from '@/services/go/wrtrade';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-
-export default defineComponent({
-    name: ModalEnum.spot_trade_warehouse_delisting,
-    components: { Drawer },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<WrOrderQuote>,
-            default: {},
-        },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-    },
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-        const lstitem = ref<WrTypeItem[]>();
-        const lststep = ref<WrGoodsPerformanceStep[]>();
-        function isSale(): boolean {
-            return props.enumName === EnumRouterName.warehouse_pre_sale_price || props.enumName === EnumRouterName.warehouse_pre_sale_floating_price;
-        }
-        const param: QueryWrGoodsInfoReq = {
-            haswr: isSale() ? 0 : 1,
-            wrfactortypeid: props.selectedRow.wrfactortypeid,
-            // tmplateid: props.selectedRow.performancetemplateid ? props.selectedRow.performancetemplateid : 0,
-        };
-        queryResultLoadingAndInfo(queryWrGoodsInfo, loading, param).then((res) => {
-            if (res.length) {
-                lstitem.value = res[0].lstitem;
-                lststep.value = res[0].lststep;
-            }
-        });
-
-        return {
-            lstitem,
-            lststep,
-            visible,
-            cancel,
-        };
-    },
-});
-</script>
-
-<style lang="less" scoped>
-.detailCont {
-    padding: 10px;
-    .rows {
-        .flex;
-        flex-direction: column;
-        width: 100%;
-        border: 1px solid @m-black6;
-        background: @m-black13;
-        .row {
-            display: inline-flex;
-            width: 100%;
-            height: 38px;
-            line-height: 38px;
-            border-bottom: 1px solid @m-black6;
-            > div {
-                text-align: center;
-                font-size: 16px;
-            }
-            .left {
-                width: 126px;
-                color: @m-grey1;
-                border-right: 1px solid @m-black6;
-            }
-            .right {
-                flex: 1;
-                color: @m-white11;
-            }
-        }
-    }
-    .ruleTitle {
-        width: 100%;
-        height: 30px;
-        line-height: 30px;
-        margin-top: 10px;
-        font-size: 16px;
-        color: @m-grey1;
-    }
-}
-</style>

+ 0 - 231
src/views/market/spot_trade/components/filter/index.vue

@@ -1,231 +0,0 @@
-<template>
-    <!-- 报表通用过滤 -->
-    <div class="filterTable">
-        <div class="filter-custom-table">
-            <a-tree-select v-model:value="selectedFT" @select="changeFT" style="width: 200px" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="FtDeliveryGoods" placeholder="全部商品" :showCheckedStrategy="ALL" tree-default-expand-all></a-tree-select>
-            <a-select label-in-value class="conditionSelect" v-for="(item, index) in wrLsit" :key="index + '11'" style="width: 120px" v-model:value="item.selected" :placeholder="`全部${item.itemtypename}`">
-                <a-select-option v-for="sub in item.itemlst" :key="sub.dgfactoryitemid">{{ sub.dgfactoryitemvalue }}</a-select-option>
-            </a-select>
-            <a-space direction="vertical" v-if="!isWR()">
-                <a-month-picker :allowClear="false" :style="{ marginRight: '10px' }" placeholder="全部交收月" v-model:value="time" class="commonDatePicker conditionPicker allDatePicker" />
-            </a-space>
-            <a-select class="conditionSelect" v-if="isFloat()" :style="{ width: '180px', maxHeight: '400px', overflow: 'auto' }" @change="goodsChange" placeholder="全部期货合约">
-                <a-select-option v-for="item in goodsList" :value="item.goodsid" :key="item.goodsid">{{ item.goodscode }}({{ item.goodsname }}) </a-select-option>
-            </a-select>
-            <a-button class="btnDeafault" @click="search(true)" style="width: 80px">筛选</a-button>
-            <a-button class="operBtn" @click="listingAction">挂牌求购</a-button>
-        </div>
-    </div>
-</template>
-
-<script lang="ts">
-import FilterOption from '@/common/components/filter/index.vue';
-import { defineComponent, onMounted, PropType } from 'vue';
-import { ref } from 'vue';
-import { initData } from '@/common/methods';
-import { handleFtDeliveryGoods } from '../../setup';
-import { queryWrStandardFactoryItem } from '@/services/go/wrtrade';
-import { WrStandardFactoryItemEx } from '@/services/go/wrtrade/interface';
-import { message, TreeSelect } from 'ant-design-vue';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { Moment } from 'moment';
-import moment from 'moment';
-import { addSubscribeQuotation, removeSubscribeQuotation } from '@/services/socket/quota';
-import { v4 } from 'uuid';
-import { getGoodsList, getGoodsListByTrade, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
-import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
-import { handleIs, setGoodsPrice } from '../buy-sell-market/setup';
-import { BuyOrSell, TradeMode } from '@/common/constants/enumCommon';
-import { getMarketByTradeMode } from '@/services/bus/market';
-import TimerUtils from '@/utils/timer/timerUtil';
-
-const ALL = TreeSelect.SHOW_ALL;
-
-interface SelectList extends WrStandardFactoryItemEx {
-    selected: { key: number; label: Object; value: number } | undefined;
-}
-
-export default defineComponent({
-    name: 'exposure-filter-table',
-    emits: ['search', 'buy'],
-    components: { FilterOption },
-    props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-    },
-    setup(props, context) {
-        const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
-        const loading = ref<boolean>(false);
-        // 商品
-        const { FtDeliveryGoods } = handleFtDeliveryGoods();
-        const selectedFT = ref<number>();
-
-        // 仓单要素
-        const wrLsit = ref<SelectList[]>([]);
-        function changeFT(value: number, label: any, extra: any) {
-            const children = label?.children;
-            if (Array.isArray(children) && children.length) {
-                TimerUtils.setTimeout(
-                    () => {
-                        selectedFT.value = undefined;
-                        wrLsit.value = [];
-                    },
-                    100,
-                    'filterTimer'
-                );
-            } else {
-                queryWrStandardFactoryItem({ wrstandardid: value }).then((res) => {
-                    const result: SelectList[] = [];
-                    res.forEach((el) => {
-                        result.push({ selected: undefined, ...el });
-                    });
-                    wrLsit.value = result;
-                });
-            }
-        }
-
-        // 全部期货合约
-        const goodsList = getGoodsListByTrade(TradeMode.quote99);
-        const selectedGoods = ref<Goods>();
-
-        const uuid = v4();
-        // 切换商品
-        function goodsChange(id: number) {
-            //行情订阅
-            removeSubscribeQuotation(uuid);
-            const goods = goodsList.value.find((e) => e.goodsid === id);
-            selectedGoods.value = goods;
-            const arr = [{ exchangeCode: 250, goodsCode: goods!.goodscode, subState: 0 }];
-            addSubscribeQuotation(uuid, arr);
-        }
-        onMounted(() => {
-            removeSubscribeQuotation(uuid);
-        });
-        // 交收月
-        const time = ref<Moment>(); // string 交收月
-        function search(isQuery: boolean) {
-            const result: any = {};
-            if (selectedFT.value) {
-                //  商品名称(筛选条件)
-                const id = selectedFT.value;
-                result.wrstandardid = id;
-                FtDeliveryGoods.value.forEach((item) => {
-                    item.children?.forEach((el) => {
-                        if (el.key === id) {
-                            //  品种id
-                            result.deliverygoodsid = +(item.key as string).replace('--', '');
-                            result.enumdicname = el.enumdicname;
-                            result.minivalue = el.minivalue;
-                        }
-                    });
-                });
-            }
-            const wrResult: { dgfactoryitemtypeid: number; dgfactoryitemid: number }[] = [];
-            wrLsit.value.forEach((el) => {
-                const { selected, itemtypename, dgfactoryitemtypeid } = el;
-                if (selected) {
-                    const { key } = selected;
-                    if (itemtypename === '仓库') {
-                        result.warehouseid = el.itemlst.find((e) => e.dgfactoryitemid === key)!.warehouseid;
-                    } else {
-                        // 商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm
-                        const name = el.itemlst.find((e) => e.dgfactoryitemid === key)!.dgfactoryitemvalue;
-                        result.dgitemname = result.dgitemname ? `${result.dgitemname},${name}` : name;
-                    }
-                    wrResult.push({ dgfactoryitemtypeid, dgfactoryitemid: key });
-                }
-            });
-            if (!isWR()) {
-                // 预售
-                if (time.value) {
-                    //   交收月(yyyy-mm) 仓单预售填写
-                    result.deliverymonth = moment(time.value).format('YYYY-MM');
-                }
-            }
-            if (isQuery) {
-                context.emit('search', result);
-            }
-            result.wrResult = wrResult;
-            return result;
-        }
-        function listingAction() {
-            if (!selectedFT.value) {
-                message.warn('请选中商品!');
-                return;
-            }
-            let flag = true;
-            for (const item of wrLsit.value) {
-                if (!item.selected) {
-                    message.warn(`请选择${item.itemtypename}`);
-                    flag = false;
-                    return;
-                }
-            }
-
-            if (flag) {
-                if (!isWR()) {
-                    if (!time.value) {
-                        message.warn('请选中交收月!');
-                        return;
-                    }
-                }
-                if (isFloat()) {
-                    if (!selectedGoods.value) {
-                        message.warn('请选中期货合约!');
-                        return;
-                    }
-                    const result = getQuoteDayInfoByCodeFindPrice(selectedGoods.value.goodscode);
-                    setGoodsPrice(result);
-                }
-                const result = search(false);
-
-                context.emit('buy', result, selectedGoods.value);
-            }
-        }
-        return {
-            FtDeliveryGoods,
-            selectedFT,
-            wrLsit,
-            changeFT,
-            search,
-            listingAction,
-            ALL,
-            time,
-            goodsList,
-            goodsChange,
-            isWR,
-            isFloat,
-        };
-    },
-});
-</script>
-
-<style lang="less" scoped>
-.allDatePicker.ant-calendar-picker {
-    cursor: pointer;
-    min-width: 120px;
-    height: 30px;
-    padding: 0 8px;
-    background: @m-grey9;
-    border: none;
-    border-radius: 3px 3px 3px 3px;
-    color: @m-grey45;
-    .ant-input {
-        width: 104px;
-        &::placeholder {
-            color: @m-grey45;
-            font-size: 14px;
-        }
-    }
-}
-.operBtn.ant-btn {
-    margin-top: 0;
-}
-.btnDeafault.ant-btn {
-    height: 28px;
-    line-height: 28px;
-}
-</style>;
-

+ 0 - 231
src/views/market/spot_trade/components/goods-chart/chart/index.less

@@ -1,231 +0,0 @@
-.chart-container {
-    [theme='light'] & {
-        --bgcolor            : #fff;
-        --tab-border-color   : #dae5ec;
-        --tab-checked-color  : #0866b8;
-        --tab-checked-bgcolor: #d4e0ff;
-        --slider-border-color: #b2c4dd;
-        --slider-bgcolor     : #edf2f7;
-        --slider-button-color: #b2c4dd;
-        --row-border-color   : #dae5ec;
-        --row-title-color    : #acb8c0;
-        --row-content-color  : #3c454b;
-        --tik-title-bgcolor  : #ECF2F5;
-        --tik-title-color    : #7A8A94;
-    }
-
-    display         : flex;
-    width           : 100%;
-    height          : calc(100% - 41px);
-    background-color: var(--bgcolor, #0e0e0f);
-
-    .chart-content {
-        display       : flex;
-        flex-direction: column;
-        flex          : 1;
-        height        : 100%;
-
-        &__main {
-            flex: 1;
-        }
-
-        &__header {
-            padding: 4px 0;
-        }
-
-        &__tabs {
-            &:last-child:not(:first-child) {
-                margin-left: 20px;
-            }
-
-            display         : inline-block;
-            background-color: transparent;
-            line-height     : normal;
-            border-bottom   : 0;
-            border          : 1px solid var(--tab-border-color, #22292c);
-            border-radius   : 1.02px;
-            border-right    : 0;
-            overflow        : hidden;
-            margin-top      : 0;
-
-            .ant-menu-item {
-                height       : 22px;
-                line-height  : 22px;
-                color        : #7a8a94;
-                border-bottom: 0;
-                border-right : 1px solid var(--tab-border-color, #22292c);
-                margin-top   : 0;
-                top          : 0;
-                padding      : 0 16px;
-
-                &::after {
-                    border: 0 !important;
-                }
-
-                &-active,
-                &-selected {
-                    color           : var(--tab-checked-color, #0866b8);
-                    background-color: var(--tab-checked-bgcolor, #0e2f4c);
-                }
-            }
-        }
-    }
-
-    .chart-slider {
-        display         : flex;
-        justify-content : center;
-        align-items     : center;
-        width           : 6px;
-        border-left     : 1px solid var(--slider-border-color, #33393d);
-        border-right    : 1px solid var(--slider-border-color, #33393d);
-        background-color: var(--slider-bgcolor, #0e0e0f);
-
-        &__button {
-            width           : 2px;
-            height          : 30px;
-            font-size       : 0;
-            background-color: var(--slider-button-color, #3c454b);
-            border-radius   : 1px;
-        }
-    }
-
-    .chart-tips {
-        display       : flex;
-        flex-direction: column;
-        width         : 300px;
-        height        : 100%;
-
-        &__nav {
-            display        : flex;
-            justify-content: center;
-            align-items    : center;
-
-            .content {
-                &:first-child:not(:last-child) {
-                    margin-right: 16px;
-                }
-
-                &--left {
-                    font-size: 16px;
-                    color    : var(--row-content-color, #ACB8C0);
-                }
-
-                &--right {
-                    font-size: 24px;
-                    color    : #fc9618;
-                }
-            }
-        }
-
-        &__last {
-            display        : flex;
-            justify-content: center;
-            align-items    : center;
-            padding        : 16px 0;
-
-            .content {
-                &--left {
-                    font-size   : 24px;
-                    margin-right: 16px;
-                }
-
-                &--right {
-                    display       : flex;
-                    flex-direction: column;
-                    align-items   : flex-start;
-                }
-            }
-        }
-
-        &__volume {
-            .ant-row {
-                border-top: 1px solid var(--row-border-color, #171B1D);
-                padding   : 8px;
-
-                .ant-col {
-                    text-align: left;
-
-                    &:first-child {
-                        color: var(--row-title-color, #3c454b);
-                    }
-
-                    &:last-child {
-                        color     : var(--row-title-color, #acb8c0);
-                        text-align: right;
-                    }
-                }
-            }
-        }
-
-        &__tik {
-            flex          : 1;
-            display       : flex;
-            flex-direction: column;
-            overflow-y    : auto;
-
-            .ant-row {
-                padding: 0 8px;
-
-                .ant-col {
-                    text-align: right;
-
-                    &:first-child {
-                        text-align: left;
-                    }
-                }
-            }
-
-            .row-header {
-                h4 {
-                    text-align      : left;
-                    line-height     : 30px;
-                    color           : var(--tik-title-color, #7A8A94);
-                    background-color: var(--tik-title-bgcolor, #171B1D);
-                    padding         : 0 8px;
-                }
-
-                .ant-row {
-                    .ant-col {
-                        color: var(--row-title-color, #3c454b);
-                    }
-                }
-            }
-
-            .row-content {
-                flex      : 1;
-                overflow-y: auto;
-
-                .ant-row {
-                    margin-top: 4px;
-
-                    .ant-col {
-                        color: var(--row-content-color, #ACB8C0);
-                    }
-                }
-            }
-        }
-
-        &__info {
-            border-top: 1px solid var(--row-border-color, #171B1D);
-            padding   : 8px 8px 8px 0;
-
-            .ant-row {
-                margin-top: 4px;
-
-                .ant-col {
-                    text-align: left;
-
-                    &:nth-child(odd) {
-                        color       : var(--row-title-color, #3c454b);
-                        padding-left: 8px;
-                    }
-
-                    &:nth-child(even) {
-                        color     : var(--row-content-color, #ACB8C0);
-                        text-align: right;
-                    }
-                }
-            }
-        }
-    }
-}

+ 0 - 256
src/views/market/spot_trade/components/goods-chart/chart/index.vue

@@ -1,256 +0,0 @@
-<template>
-  <!-- 交易图表  -->
-  <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-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-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>
-      <div class="chart-content__footer"></div>
-    </div>
-    <div class="chart-slider">
-      <div class="chart-slider__button"></div>
-    </div>
-    <div class="chart-tips" v-if="showExchange">
-      <div>
-        <div class="chart-tips__nav">
-          <div class="content content--left">{{ selectedRow.goodscode }}</div>
-          <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--right">
-            <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-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-row>
-        </div>
-      </div>
-      <div class="chart-tips__tik">
-        <div class="row-header">
-          <h4>分时成交</h4>
-          <a-row>
-            <a-col :span="8">时间</a-col>
-            <a-col :span="8">价格</a-col>
-            <a-col :span="8">现量</a-col>
-          </a-row>
-        </div>
-        <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-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 :span="4">均价</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 :span="4">今开</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 :span="4">最高</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-row>
-        <a-row>
-          <a-col :span="4">金额</a-col>
-          <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-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-col :span="4">外盘</a-col>
-          <a-col :span="8">{{ handleNoneValue(selectedRow.totalbidvolume) }}</a-col>
-          <a-col :span="4">内盘</a-col>
-          <a-col :span="8">{{ handleNoneValue(selectedRow.totalaskvolume) }}</a-col>
-        </a-row>
-        <a-row>
-          <a-col :span="4">持仓</a-col>
-          <a-col :span="8">{{ handleNoneValue(selectedRow.holdvolume) }}</a-col>
-          <a-col :span="4">结算</a-col>
-          <a-col :span="8">{{ handleNoneValue(selectedRow.settle) }}</a-col>
-        </a-row>
-        <a-row>
-          <a-col :span="4">仓差</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>
-        <a-row>
-          <a-col :span="4">日增</a-col>
-          <a-col :span="8">{{ '--' }}</a-col>
-          <a-col :span="4">开平</a-col>
-          <a-col :span="8">{{ '--' }}</a-col>
-        </a-row>
-      </div>
-      <div @click="watchMore" class="watchMore">
-        <strong>查看更多</strong>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent } from '@/common/export/commonTable';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { PropType, ref, watch } from 'vue';
-import { QueryQuoteDayRsp, QueryHistoryTikDatasRsp, CycleType } from '@/services/go/quote/interface';
-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 { 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,
-    },
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryQuoteDayRsp>,
-            default: {},
-        },
-        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[]>([]);
-
-        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 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列表
-        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,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-@import './index.less';
-</style>

+ 0 - 163
src/views/market/spot_trade/components/goods-chart/index.vue

@@ -1,163 +0,0 @@
-<template>
-  <!-- 买卖大厅 -->
-  <div class="buy-sell-market">
-    <div class="buy-sell-market-title">
-      <a class="backIcon" @click="cancelAction">
-        <LeftOutlined />
-      </a>
-      <div class="titleBtn">
-        <div class="name">{{ selectedRow.goodscode }} {{ selectedRow.goodsname }}</div>
-        <div class="arrowRightIcon"></div>
-      </div>
-      <div class="inlineBar">
-        <div class="valNums bdf1 ml10">
-          <!-- 最新价 -->
-          <div class="firstNum start" :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ selectedRow.last }}</div>
-          <div class="lastNum start">
-            <!-- 涨跌值 -->
-            <div :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteChange(selectedRow, selectedRow.decimalplace) }}</div>
-            <!-- 涨跌幅 -->
-            <div class="ml20" :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteAmplitude(selectedRow, selectedRow.decimalplace) }}</div>
-          </div>
-        </div>
-        <div class="priceBar ml20">
-          <div class="inlineBar start">
-            <div class="greenBar">
-              <div class="numBlock ml15">
-                <div class="first grey">卖价</div>
-                <div class="last" :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)">{{ selectedRow.ask }}</div>
-              </div>
-              <div class="numBlock">
-                <div class="first grey">卖量</div>
-                <div class="last" :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)">{{ selectedRow.askvolume }}</div>
-              </div>
-            </div>
-          </div>
-          <div class="inlineBar start">
-            <div class="redBar">
-              <div class="numBlock">
-                <div class="first grey">买价</div>
-                <div class="last" :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)">{{ selectedRow.bid }}</div>
-              </div>
-              <div class="numBlock">
-                <div class="first grey">买量</div>
-                <div class="last" :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)">{{ selectedRow.bidvolume }}</div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-      <div class="btn-list">
-        <a-button class="operBtn" @click="openComponent({ code: 'trade' })">交易</a-button>
-      </div>
-    </div>
-    <!-- 交易图表 -->
-    <Chart v-if="showComponentsId === ComponentType.chart" @update="changeComponent" :selectedRow="selectedRow" />
-    <!-- 成交明细 -->
-    <StockExchange :selectedRow="selectedRow" v-if="showComponentsId === ComponentType.tradeDetail" />
-    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent, defineAsyncComponent } from '@/common/export/commonTable';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { handleQuotePriceColor, handleSubcriteOnDemandQuote, quoteAmplitude, quoteAmplituOfVibration, quoteChange } from '@/common/setup/table/tableQuote';
-import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { LeftOutlined } from '@ant-design/icons-vue';
-import { PropType, ref } from 'vue';
-import Chart from './chart/index.vue';
-import { ComponentType } from './setup';
-import StockExchange from './stock-exchange/index.vue';
-import { handleModalComponent } from '@/common/setup/asyncComponent';
-
-export default defineComponent({
-  emits: ['cancel', 'update'],
-  name: 'buy-sell-market',
-  props: {
-    selectedRow: {
-      type: Object as PropType<QueryQuoteDayRsp>,
-      default: () => ({}),
-    },
-  },
-  components: {
-    Chart,
-    LeftOutlined,
-    StockExchange,
-    trade: defineAsyncComponent(() => import('@/views/market/futures/compoments/futures-trade/index.vue')), // 期货交易
-  },
-  setup(props, context) {
-    const loading = ref<boolean>(false);
-    const { visible, cancel } = _closeModal(context);
-
-    const showComponentsId = ref<ComponentType>(ComponentType.chart);
-
-    const { componentId, closeComponent, openComponent } = handleModalComponent(() => { }, ref({}));
-
-    // 切换组件
-    function changeComponent(type: ComponentType) {
-      showComponentsId.value = type;
-    }
-    // 返回上层组件
-    function cancelAction() {
-      if (showComponentsId.value === ComponentType.chart) {
-        cancel();
-      } else {
-        showComponentsId.value = ComponentType.chart;
-      }
-    }
-    return {
-      cancel,
-      visible,
-      changeComponent,
-      ComponentType,
-      showComponentsId,
-      cancelAction,
-      handleSubcriteOnDemandQuote,
-      handleQuotePriceColor,
-      quoteChange,
-      quoteAmplitude,
-      quoteAmplituOfVibration,
-      componentId,
-      closeComponent,
-      openComponent,
-    };
-  },
-});
-</script>
-<style lang="less">
-.valNums {
-    .flex;
-    flex-direction: column;
-    padding-left: 20px;
-    .firstNum {
-        font-size: 18px;
-        line-height: 18px;
-        font-weight: 400;
-    }
-    .lastNum {
-        margin-top: 2px;
-        display: inline-flex;
-        font-size: 12px;
-        line-height: 12px;
-        font-weight: 300;
-    }
-}
-.inlineBar {
-    display: inline-flex;
-}
-.priceBar {
-    .flex;
-    flex-direction: column;
-    height: 32px;
-    .greenBar,
-    .redBar {
-        height: 16px;
-        line-height: 16px;
-    }
-}
-.start {
-    align-self: flex-start !important;
-    align-items: flex-start !important;
-}
-</style>

+ 0 - 4
src/views/market/spot_trade/components/goods-chart/setup.ts

@@ -1,4 +0,0 @@
-export enum ComponentType {
-    chart,
-    tradeDetail,
-}

+ 0 - 94
src/views/market/spot_trade/components/goods-chart/stock-exchange/index.vue

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

+ 0 - 115
src/views/market/spot_trade/components/history-chart/index.vue

@@ -1,115 +0,0 @@
-<template>
-    <!-- 历史走势-->
-    <Drawer :title="'历史走势'" :placement="'right'" :visible="visible" @cancel="cancel" class="top500">
-        <div class="chart-main" ref="chartRef" id="history-chart"></div>
-    </Drawer>
-</template>
-
-<script lang="ts">
-import { defineComponent, PropType, ref, watchEffect } from 'vue';
-import { initData } from '@/common/methods';
-``;
-import * as echarts from 'echarts/core';
-import {
-    BarChart,
-    // 系列类型的定义后缀都为 SeriesOption
-    BarSeriesOption,
-    LineChart,
-    LineSeriesOption,
-} from 'echarts/charts';
-import {
-    TitleComponent,
-    // 组件类型的定义后缀都为 ComponentOption
-    TitleComponentOption,
-    GridComponent,
-    GridComponentOption,
-} from 'echarts/components';
-import { CanvasRenderer } from 'echarts/renderers';
-import { queryWrAverageTradePrice } from '@/services/go/wrtrade';
-import { TempWrOrderQuoteDetail } from '../post_buying/interface';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { WrAverageTradePriceQsq } from '@/services/go/wrtrade/interface';
-import { handleIs } from '../buy-sell-market/setup';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { _closeModal } from '@/common/setup/modal/modal';
-import Drawer from '@/common/components/drawer/index.vue';
-
-// 通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型
-type ECOption = echarts.ComposeOption<BarSeriesOption | LineSeriesOption | TitleComponentOption | GridComponentOption>;
-
-// 注册必须的组件
-echarts.use([TitleComponent, GridComponent, LineChart, BarChart, CanvasRenderer]);
-export default defineComponent({
-    name: 'purchase-history',
-    emits: ['cancel', 'update'],
-    components: { Drawer },
-    props: {
-        selectedRow: {
-            type: Object as PropType<TempWrOrderQuoteDetail>,
-            default: {},
-        },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-    },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const option = {
-            xAxis: {
-                type: 'category',
-                data: [''],
-            },
-            yAxis: {
-                type: 'value',
-            },
-            series: [
-                {
-                    data: [1],
-                    type: 'line',
-                    smooth: true,
-                },
-            ],
-        };
-        const { isWR } = handleIs(props.enumName, BuyOrSell.buy);
-        const chartRef = ref();
-        const chartInstance = ref<echarts.ECharts>();
-        function queryHistoryData() {
-            const param: WrAverageTradePriceQsq = {
-                haswr: isWR(),
-                wrfactortypeid: props.selectedRow.wrfactortypeid,
-            };
-            queryWrAverageTradePrice(param).then((res) => {
-                option.xAxis.data.length = 0;
-                option.series[0].data.length = 0;
-                res.forEach((el) => {
-                    option.xAxis.data.push(el.tradedate);
-                    option.series[0].data.push(el.averageprice);
-                });
-                if (chartInstance.value) {
-                    chartInstance.value.setOption(option);
-                }
-            });
-        }
-
-        watchEffect(() => {
-            if (chartRef.value) {
-                chartInstance.value = echarts.init(chartRef.value as HTMLElement);
-                chartInstance.value.setOption(option);
-            }
-        });
-
-        initData(() => {
-            queryHistoryData();
-        });
-        return { option, visible, cancel, chartRef };
-    },
-});
-</script>
-
-<style lang="less">
-// .chart-main {
-//     height: 441px;
-//     width: 100%;
-// }
-</style>;

+ 0 - 387
src/views/market/spot_trade/components/post_buying/index.vue

@@ -1,387 +0,0 @@
-<template>
-    <!-- 挂牌求购 -->
-    <Drawer :title="'挂牌求购'" :placement="'right'" :visible="visible" @cancel="cancel" class="top">
-        <div class="post_buying">
-            <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-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="!isFloat()">
-                            <a-form-item label="挂牌价格" name="FixedPrice">
-                                <a-input-number class="commonInput" style="width: 260px" :min="0" v-model:value="formState.FixedPrice" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-else>
-                            <a-form-item label="基差" name="PriceMove">
-                                <a-input-number class="commonInput" style="width: 260px" v-model:value="formState.PriceMove" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isFloat()">
-                            <a-form-item label="估算价" name="PriceMove">
-                                <span class="white">{{ getPrice() }}</span>
-                            </a-form-item>
-                        </a-col>
-
-                        <a-col :span="24">
-                            <a-form-item label="挂牌数量" name="OrderQty">
-                                <a-input-number class="commonInput" style="width: 260px" :min="0" :max="getMaxNum()" v-model:value="formState.OrderQty" />
-                                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="!isWR()">
-                            <a-form-item label="交收月" name="DeliveryMonth">
-                                <a-month-picker style="width: 260px" v-model:value="formState.DeliveryMonth" :allowClear="false" class="commonDatePicker dialogDatePicker" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="mt-10">
-                            <a-form-item>
-                                <a-slider :min="0" v-model:value="formState.OrderQty" :max="getMaxNum()" class="formSlider" />
-                                <div class="unit">
-                                    <span>{{ getMaxNum() ? selectedRow.minivalue : 0 }}</span>
-                                    <span>{{ getMaxNum() }}{{ selectedRow.enumdicname }}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="起摘数量" name="DelistMinQty" class="relative">
-                                <a-input-number class="commonInput" :suffix="selectedRow.enumdicname" v-model:value="formState.DelistMinQty" :min="0" style="width: 260px !important" />
-                                <div class="tip">最小单位:{{ selectedRow.minivalue }}{{ selectedRow.enumdicname }}</div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="relative mt20">
-                            <a-form-item :label="isFloat() ? '估算金额' : '挂牌金额'">
-                                <span class="white ml8">{{ getMoney() }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="getMargin()">
-                            <a-form-item :label="getMargin() ? '履约保证金' : ''">
-                                <!-- <a-row>
-                                <a-col :span="8">-->
-                                <span class="white ml8">{{ getMargin() }}</span>
-                                <!-- </a-col>
-                                    <a-col :span="4" class="tr">
-                                        <span class="grey1">可用资金</span>
-                                    </a-col>
-                                    <a-col :span="12">
-                                        <span
-                                            class="white ml8"
-                                        >{{getCanUseMoney(getSelectedAccount())}}</span>
-                                    </a-col>
-                                </a-row>-->
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="可用资金">
-                                <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-form-item class="btnCenter">
-                            <a-button class="listedBtn" @click="submit" :loading="loading">买入</a-button>
-                            <a-button class="ml10 cancelBtn" @click="cancel" :disabled="loading">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
-        </div>
-    </Drawer>
-</template>
-
-<script lang="ts">
-import { defineComponent, PropType, ref } from 'vue';
-import { Des } from '@/common/components/commonDes';
-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 { DGFactoryItems, WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
-import { getAccountTypeList } from '@/services/bus/account';
-import { getUserId } from '@/services/bus/user';
-import { v4 as uuidv4 } from 'uuid';
-import moment, { Moment } from 'moment';
-import { getMarketRunByTradeMode } from '@/services/bus/market';
-import { WrOrderQuote } from '@/services/go/wrtrade/interface';
-import { handleForm, handleNumAndPrice } from './setup';
-import { validateAction } from '@/common/setup/form';
-import { FormParam, TempWrOrderQuoteDetail } from './interface';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { handleIs } from '../buy-sell-market/setup';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { getCanUseMoney } from '@/services/bus/account';
-
-export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: ModalEnum.spot_trade_warehouse_post_buying,
-    components: { Des, Drawer, PlusOutlined, MinusOutlined },
-    props: {
-        selectedRow: {
-            type: Object as PropType<TempWrOrderQuoteDetail>,
-            default: {},
-        },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        time: {
-            type: Object as PropType<Moment>,
-            default: moment(),
-        },
-    },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
-        const { rules, formState, formRef } = handleForm(props.selectedRow);
-        const loading = ref<boolean>(false);
-        const accountList = getAccountTypeList([2]);
-        if (accountList.length) {
-            formState.accountid = accountList[0].accountid;
-        }
-        function getSelectedAccount() {
-            return accountList.find((e) => e.accountid === formState.accountid);
-        }
-        formState.DeliveryMonth = props.selectedRow.deliverymonth ? moment(props.selectedRow.deliverymonth) : props.time;
-
-        const { getMaxNum, getMoney, getMargin, getPrice } = handleNumAndPrice(props.enumName, props.selectedRow);
-        function submit() {
-            const marketInfo = getMarketRunByTradeMode(17);
-            if (marketInfo) {
-                validateAction<FormParam>(formRef, formState).then((res) => {
-                    // 现在增加一种挂牌求购的情况
-                    // 这种求购模式会生成一种仓单贸易商品
-
-                    const wrGoodsInfo: WRGoodsInfo = {
-                        GoodsID: props.selectedRow.goodsid, // uint32 配置商品ID
-                        GoodsCode: props.selectedRow.goodscode, // string 配置商品代码
-                        PriceFactor: 1, // double 商品价格系数
-                        PriceMove: 0, // double 商品升贴水值
-                        WeightRatio: 1, // double 商品重量系数
-                    };
-                    const param = {
-                        AccountID: res.accountid, // 默认内部资金账号第一个
-                        ClientSerialNo: uuidv4(), // 客户端流水号
-                        // OperateSrc: 2,
-                        ClientType: 4,
-                        // MarketID: marketInfo.marketid,
-                        LadingBillId: 0, // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-                        // LadingBillId: 'uint642081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-                        TradeDate: moment(marketInfo.tradedate).format('YYYYMMDD'), // 交易日 string
-                        // SubNum: '0', // 提单子单号
-                        SubNum: 0,
-                        // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        WRFactorTypeId: props.selectedRow.wrfactortypeid ? props.selectedRow.wrfactortypeid : 0, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
-                        // MatchUserIDs: 0, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
-                        OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
-                        DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID  // 有仓单求购
-                        WRPriceType: isFloat() ? 2 : 1, // 价格方式 1:固定价 2:浮动价
-                        FixedPrice: res.FixedPrice, // 固定价格
-                        PriceFactor: 1, // 价格系数(浮动价时填写)
-                        PriceMove: res.PriceMove, // 升贴水(浮动价时填写)
-                        TimevalidType: 4, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
-                        // ValidTime: moment('2021-08-25 00:00:00').format('YYYY-MM-DD HH:mm:ss'), // 有效期限
-                        ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'),
-                        FirstRatio: 0, // 首付比例
-                        PerformanceTemplateID: 0, // 履约计划模板ID
-                        UserID: getUserId(),
-                        OperatorID: getUserId(), // 操作员账号ID
-                        BuyOrSell: 0, // 买卖方向 0买1卖
-                        PriceDisplayMode: 1, // 浮动价显示方式 1:合并显示 2:分开显示
-                        CanBargain: 0, // 挂牌是否可议价0:不可1:可-摘牌是否议价
-                        Attachment1: '', // 附件1
-                        Attachment2: '', // 附件2
-                        Remark: '', // 备注
-                        ApplyID: 0, // 申请ID
-                        WRTradeGoods: isFloat() ? [wrGoodsInfo] : [],
-                        CanPart: 1, // 是否允许部份摘牌0:不允许;1:允许
-                        WRStandardID: props.selectedRow.wrstandardid,
-                        HasWr: isWR(), // 无仓单挂牌  是否有无仓单
-                        DelistMinQty: res.DelistMinQty, // 起摘数量
-                        DeliveryMonth: isWR() ? '' : moment(res.DeliveryMonth).format('YYYY-MM'),
-                        FactoryItems:
-                            props.selectedRow.wrResult != undefined
-                                ? props.selectedRow.wrResult.flatMap((it) => {
-                                      return {
-                                          DGFactoryItemTypeID: it.dgfactoryitemtypeid, // uint64 要素项类型ID
-                                          DGFactoryItemID: it.dgfactoryitemid, // uint64 预约要素项类型值
-                                          ItemTypeMode: 1, // uint32 要素项类型模式
-                                      };
-                                  })
-                                : [], // DGFactoryItems 要素类型明细集合(没有仓单要素ID填写)
-                    };
-                    requestResultLoadingAndInfo(hdWROrder, param, loading, ['求购成功', '求购失败:']).then(() => {
-                        cancel(true);
-                    });
-                });
-            }
-        }
-        return {
-            submit,
-            cancel,
-            loading,
-            visible,
-            accountList,
-            rules,
-            formState,
-            formRef,
-            isFloat,
-            isWR,
-            getMaxNum,
-            getMoney,
-            getMargin,
-            getSelectedAccount,
-            getCanUseMoney,
-            getPrice,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.post_buying {
-    width: 100%;
-    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;
-            }
-        }
-        .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;
-}
-.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;
-    }
-}
-.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;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.mt20 {
-    margin-top: 20px;
-}
-.mt-10 {
-    margin-top: -10px;
-}
-.ant-input-suffix {
-    position: absolute;
-    right: -25px;
-}
-.minusBtn,
-.plusBtn {
-    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;
-}
-.plusBtn {
-    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;
-}
-.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;
-    }
-}
-</style>

+ 0 - 16
src/views/market/spot_trade/components/post_buying/interface.ts

@@ -1,16 +0,0 @@
-import { WrOrderQuote } from "@/services/go/wrtrade/interface";
-import { Moment } from "moment";
-
-export interface FormParam {
-    accountid: undefined | number,
-    FixedPrice: number,
-    OrderQty: number,
-    PriceMove: number,
-    DeliveryMonth: Moment,
-    DelistMinQty: number,
-}
-
-
-export interface TempWrOrderQuoteDetail extends WrOrderQuote {
-    wrResult: { dgfactoryitemtypeid: number; dgfactoryitemid: number }[]
-}

+ 0 - 107
src/views/market/spot_trade/components/post_buying/setup.ts

@@ -1,107 +0,0 @@
-import { BuyOrSell } from "@/common/constants/enumCommon";
-import { EnumRouterName } from "@/common/constants/enumRouterName";
-import { useVerifyListingNum, useVerifyListingBasis } from '@/hooks/form/verify';
-import { getAccountTypeList, getCanUseMoney } from "@/services/bus/account";
-import { getRules } from '@/services/bus/rules';
-import { AccountListItem } from "@/services/dataCenter/interafce/account";
-import { WrOrderQuote } from "@/services/go/wrtrade/interface";
-import moment from "moment";
-import { onBeforeUnmount, reactive, ref, UnwrapRef } from "vue";
-import { getGoodsPrice, handleIs } from "../buy-sell-market/setup";
-import { FormParam, TempWrOrderQuoteDetail } from "./interface";
-
-function initFormData(): FormParam {
-    return {
-        accountid: undefined,
-        FixedPrice: 0,
-        OrderQty: 0,
-        PriceMove: 0,
-        DelistMinQty: 0,
-        DeliveryMonth: moment()
-    }
-}
-const formState: UnwrapRef<FormParam> = reactive(initFormData())
-export function handleForm(selectedRow: TempWrOrderQuoteDetail) {
-    const formRef = ref();
-    formState.OrderQty = selectedRow.minivalue
-
-    const { v_num } = useVerifyListingNum<FormParam, 'DelistMinQty'>(formState, 'DelistMinQty', selectedRow.minivalue);
-    const { v_basis } = useVerifyListingBasis(selectedRow, 'goodsid');
-
-    const rules = {
-        FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', }],
-        OrderQty: [{ required: true, validator: v_num, trigger: 'change', type: 'number' }],
-        PriceMove: [{ required: true, validator: v_basis, trigger: 'blur', type: 'number', }],
-        accountid: [{ required: true, message: '请输入交易账号' }],
-    }
-    onBeforeUnmount(() => {
-        Object.assign(formState, initFormData(), { OrderQty: selectedRow.minivalue })
-    })
-    return { rules, formState, formRef }
-}
-
-
-export function handleNumAndPrice(enumName: EnumRouterName, selectedRow: WrOrderQuote) {
-    const { isFloat } = handleIs(enumName, BuyOrSell.buy)
-    // 资金账号
-    const accountList = getAccountTypeList([2]);
-    // 获取选中的资金账号
-    const getSelectedAccount = () => accountList.find((e) => e.accountid === formState.accountid);
-    // 交易规则
-    const rules = getRules()
-    const { buymarginvalue, buymarginalgorithm } = rules.length ? rules[0] : { buymarginvalue: 0, buymarginalgorithm: 1 }
-    //保证金模式 1: 比率 2: 固定
-    const marginMethod = () => buymarginalgorithm === 1
-    // 挂牌最大数量
-    function getMaxNum() {
-        // 可用资金
-        const canUseMoney = Number(getCanUseMoney(getSelectedAccount() as AccountListItem))
-        // 挂牌最大数量=可用资金/(买方履约保证金比例*挂牌价格)
-        let result = 0
-        if (isFloat()) {
-            const price = getPrice()
-            if (price !== '--') {
-                result = canUseMoney / (Number(price) * buymarginvalue)
-            }
-        } else {
-            const margin = marginMethod() ? (buymarginvalue * formState.FixedPrice) : (buymarginvalue + formState.FixedPrice)
-            if (margin) {
-                result = Math.round(canUseMoney / margin)
-            }
-        }
-        return +result.toFixed(0)
-    }
-    //  摘牌金额
-    function getMoney() {
-        let result = 0
-        if (isFloat()) {
-            const goodsPrice = getGoodsPrice()
-            if (goodsPrice.value && goodsPrice.value !== '--') {   // 有实时行情价格
-                // 估算总价=挂牌基差+期货合约价;
-                const predictTotal = formState.PriceMove + (goodsPrice.value as number);
-                // 估算总额=估算总价*摘牌数量;
-                result = predictTotal * formState.OrderQty
-            }
-        } else {
-            // 摘牌金额=挂牌价格*摘牌数量
-            result = formState.OrderQty * formState.FixedPrice
-        }
-        return Number(result.toFixed(2))
-    }
-    // 履约保证金
-    function getMargin() {
-        // 浮动价 履约保证金=估算总额*买方履约保证金比例
-        // 一口价 履约保证金=挂牌金额*买方履约保证金比例
-        const margin = marginMethod() ? (buymarginvalue * getMoney()) : (buymarginvalue + getMoney())
-        return Number((margin).toFixed(2))
-    }
-    function getPrice() {
-        let result = '--'
-        const goodsPrice = getGoodsPrice()
-        if (goodsPrice.value && goodsPrice.value !== '--') {   // 有实时行情价格
-            result = ((goodsPrice.value as number) + formState.PriceMove).toFixed(2)
-        }
-        return result
-    }
-    return { getMaxNum, getMoney, getMargin, getPrice }
-}

+ 0 - 15
src/views/market/spot_trade/interface.ts

@@ -1,15 +0,0 @@
-import { BtnList } from '@/common/components/btnList/interface';
-export interface BuyAndSellMarket {
-    isMarket: boolean,
-    btnList: BtnList[],
-}
-
-export interface TreeDataItem {
-    value: number | string;
-    key: number | string;
-    enumdicname: string;
-    minivalue: number;
-    title?: string;
-    slots?: Record<string, string>;
-    children?: TreeDataItem[];
-}

+ 0 - 173
src/views/market/spot_trade/setup.ts

@@ -1,173 +0,0 @@
-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 { getTableColumns, getTableEvent, initData } from "@/common/export/table";
-import { findChildList, getClassName } from "@/common/setup/table/button";
-import { ComposeTableParam, TableEventCB } from "@/common/setup/table/interface";
-import { OperationTabMenu } from '@/services/go/commonService/interface';
-import { queryFilterItem, queryFtDeliveryGoods } from '@/services/go/wrtrade';
-import { WrFilterItem } from '@/services/go/wrtrade/interface';
-import TimerUtils from '@/utils/timer/timerUtil';
-import { onMounted, onUnmounted, ref } from "vue";
-import { BuyAndSellMarket, TreeDataItem } from './interface';
-
-const buyAndSellEunm = 'buyAndSell'
-
-export function handleSpotBtnList(menuType: EnumRouterName) {
-    let firstBtn: BtnListType[] = []
-    // 买大厅数据
-    const buyMarket: BuyAndSellMarket = {
-        isMarket: true,
-        btnList: []
-    }
-
-    // 卖大厅数据
-    const sellMarket: BuyAndSellMarket = {
-        isMarket: true,
-        btnList: []
-    }
-    // 表格操作按钮列表
-    const list = findChildList(menuType);
-    if (list) {
-        const fnMap = (arr: OperationTabMenu[]) => {
-            return arr.map(e => {
-                const { code, title } = e;
-                return { lable: title, code, className: getClassName(code) }
-            })
-        }
-        // 过滤报价大厅按钮列表
-        // const temp = list.children.filter(e => e.type === 2)
-        // firstBtn = fnMap(temp)
-
-        // const fn = (code: EnumRouterName) => {
-        //     const findResult = list.children.find(e => e.code === code)
-        //     const result: BuyAndSellMarket = { isMarket: false, btnList: [] }
-        //     if (findResult) {
-        //         result.isMarket = true
-        //         const arr = findResult.children.filter(e => e.type === 2)
-        //         result.btnList = fnMap(arr)
-        //     }
-        //     return result
-        // }
-
-        // 处理买大厅
-        //Object.assign(buyMarket, fn(EnumRouterName.spot_trade_warehouse_buy_hall))
-        // 处理卖大厅
-        //Object.assign(sellMarket, fn(EnumRouterName.spot_trade_warehouse_sell_hall))
-    }
-    return { firstBtn, buyMarket, sellMarket }
-}
-
-// 表格 + 表头 + 右键 + 单击表格 + 按钮列表 通用处理逻辑
-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 } = handleSpotBtnList(menuType)
-    firstBtn.push({ lable: '买卖大厅', code: buyAndSellEunm, className: 'btnPrimary' })
-
-    // 关闭右键
-    function closeContext(value: BtnListType | null) {
-        // 打开对应的弹窗组件
-        if (value) componentId.value = value.code;
-        // 关闭右键
-        closeContextAction()
-    }
-    onUnmounted(() => {
-        // 离开组件,手动关闭右键,防止出现bug
-        closeContextAction()
-    })
-    initData(() => {
-        // 获取列表数据
-        queryFn();
-        // 10秒刷新一次列表
-        TimerUtils.setInterval(() => {
-            queryFn()
-        }, 10 * 1000, 'spotTrade')
-        // 注册表头信息 过滤
-        if (tableName) {
-            registerColumn(tableName, tableFilterKey);
-        }
-
-    });
-    onMounted(() => {
-        TimerUtils.clearInterval('spotTrade')
-    });
-    return {
-        contextMenu, openContext, closeContext, // 右键
-        columns, registerColumn, updateColumn,  // 表头
-        expandedRowKeys, selectedRow, Rowclick, // 表格折腾面板数据与单击、双击事件
-        componentId, closeComponent,  // 控制异步组件
-        firstBtn, // 表格按钮
-    }
-}
-
-
-const FtDeliveryGoods = ref<TreeDataItem[]>([])
-// 获取报价大厅商品过滤项数据
-export function handleFtDeliveryGoods() {
-    if (FtDeliveryGoods.value.length === 0) {
-        initData(() => {
-            queryFtDeliveryGoods().then(res => {
-                console.log('dddddddddd', res)
-                const result: TreeDataItem[] = []
-                res.forEach(el => {
-                    const { deliverygoodsid, deliverygoodsname, wdlst } = el
-                    const item: TreeDataItem = {
-                        title: deliverygoodsname,
-                        key: deliverygoodsid + '--',
-                        value: deliverygoodsid + '--',
-                        enumdicname: '',
-                        minivalue: 0,
-                        children: []
-                    }
-                    wdlst.forEach(e => {
-                        const { wrstandardid, wrstandardname, enumdicname, minivalue } = e
-                        item.children?.push({ value: wrstandardid, key: wrstandardid, title: wrstandardname, enumdicname, minivalue })
-                    })
-                    result.push(item)
-                })
-                FtDeliveryGoods.value = result;
-            })
-        })
-    }
-    return { FtDeliveryGoods }
-}
-
-// 处理仓库
-const warehouseList = ref<WrFilterItem[]>([])
-export function handleWarehouse() {
-    initData(() => {
-        if (warehouseList.value.length === 0) {
-            queryFilterItem({ itype: '3' }).then(res => {
-                warehouseList.value = res
-            })
-        }
-    })
-    return { warehouseList }
-}
-

+ 0 - 101
src/views/market/spot_trade/spot_trade_order_transaction/components/buy-market/index.vue

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

+ 0 - 219
src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/index.vue

@@ -1,219 +0,0 @@
-<template>
-    <!-- 买卖大厅 -->
-    <div class="buy-sell-market">
-        <div class="buy-sell-market-title">
-            <a class="backIcon" @click="cancelAction">
-                <LeftOutlined />
-            </a>
-            <div class="titleBtn">
-                <div class="name">{{ selectedRow.goodscode }} {{ selectedRow.goodsname }}</div>
-                <div class="arrowRightIcon"></div>
-            </div>
-            <div class="inlineBar">
-                <div class="valNums bdf1 ml10">
-                    <!-- 最新价 -->
-                    <div :class="['firstNum', 'start', handleQuotePriceColor(selectedRow.last, selectedRow.presettle)]"> {{ selectedRow.last }}</div>
-                    <div class="lastNum start">
-                        <!-- 涨跌值 -->
-                        <div :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"> {{ quoteChange(selectedRow, selectedRow.decimalplace) }}</div>
-                        <!-- 涨跌幅 -->
-                        <div class="ml20" :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"> {{ quoteAmplitude(selectedRow, selectedRow.decimalplace) }}</div>
-                    </div>
-                </div>
-                <div class="priceBar ml20">
-                    <div class="inlineBar start">
-                        <div class="greenBar green">
-                            <div class="numBlock ml15">
-                                <div class="first">卖价</div>
-                                <div class="last" :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)"> {{ selectedRow.ask }}</div>
-                            </div>
-                            <div class="numBlock">
-                                <div class="first">卖量</div>
-                                <div class="last">{{ selectedRow.askvolume }}</div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="inlineBar start">
-                        <div class="redBar red1">
-                            <div class="numBlock">
-                                <div class="first">买价</div>
-                                <div class="last" :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)"> {{ selectedRow.bid }}</div>
-                            </div>
-                            <div class="numBlock">
-                                <div class="first">买量</div>
-                                <div class="last">{{ selectedRow.bidvolume }}</div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <BtnList :btnList="btnListData" :record="selectedRow" @click="openComponent" />
-            </div>
-        </div>
-        <!-- 交易图表 -->
-        <!-- <Chart v-if="showComponentsId === ComponentType.chart" @update="changeComponent" :deliverGoods="deliverGoods" /> -->
-        <Chart v-if="showComponentsId === ComponentType.chart" @update="changeComponent" :selectedRow="selectedRow" />
-        <!-- 买卖大厅内容 -->
-        <a-row class="buySellHall" v-if="showComponentsId === ComponentType.marketContent">
-            <a-col :span="12">
-                <Sell ref="sellRef" :parantSelectedRow="deliverGoods" />
-            </a-col>
-            <a-col :span="12">
-                <Buy ref="buyRef" :parantSelectedRow="deliverGoods" />
-            </a-col>
-        </a-row>
-        <!-- 成交明细 -->
-        <StockExchange :deliverGoods="deliverGoods" v-if="showComponentsId === ComponentType.tradeDetail" />
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :deliverGoods="deliverGoods" @cancel="closeComponent"></component>
-    </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { defineAsyncComponent, defineComponent, BtnList } from '@/common/export/commonTable';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { WrOrderQuote } from '@/services/go/wrtrade/interface';
-import { LeftOutlined } from '@ant-design/icons-vue';
-import Buy from '../buy-market/index.vue';
-import Sell from '../sell-market/index.vue';
-import { handleModalComponent } from '@/common/setup/asyncComponent';
-import { onBeforeUnmount, onMounted, PropType, ref } from 'vue';
-
-import Bus from '@/utils/eventBus/index';
-import TimerUtils from '@/utils/timer/timerUtil';
-import { BtnListType } from '@/common/components/btnList/interface';
-import moment, { Moment } from 'moment';
-import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
-import StockExchange from '../stock-exchange/index.vue';
-//import Chart from '../chart/index.vue';
-import Chart from '../../../components/goods-chart/chart/index.vue'; // 暂用组件,待优化
-import { ComponentType } from '../../setup';
-import { handleSubcriteOnDemandQuote, handleQuotePriceColor, quoteChange, quoteAmplitude, quoteAmplituOfVibration } from '@/common/setup/table/tableQuote';
-
-export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'buy-sell-market',
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryQuoteDayRsp>,
-            default: {},
-        },
-        deliverGoods: {
-            type: Object as PropType<QueryDeliveryRelationRsp>,
-            default: {},
-        },
-    },
-    components: {
-        Buy,
-        Sell,
-        BtnList,
-        Chart,
-        LeftOutlined,
-        Listing: defineAsyncComponent(() => import('../listing/index.vue')),
-        Detail: defineAsyncComponent(() => import('../detail/index.vue')),
-        StockExchange,
-    },
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-
-        const btnListData: BtnListType[] = [
-            { lable: '挂牌求购', code: 'Listing', className: 'operBtn' },
-            { lable: '详情', code: 'Detail', className: 'btnDeafault' },
-        ];
-
-        onBeforeUnmount(() => {
-            TimerUtils.clearInterval('buyAndSellMartet');
-            TimerUtils.clearTimeout('debounce');
-        });
-        const buyRef = ref<null | { queryTableAction: Function }>(null);
-        const sellRef = ref<null | { queryTableAction: Function }>(null);
-        const queryFn = () => {
-            buyRef.value?.queryTableAction();
-            sellRef.value?.queryTableAction();
-        };
-        const { componentId, closeComponent, openComponent } = handleModalComponent(queryFn, ref({}));
-
-        const showComponentsId = ref<ComponentType>(ComponentType.chart);
-
-        // 切换组件
-        function changeComponent(type: ComponentType) {
-            showComponentsId.value = type;
-        }
-        // 返回上层组件
-        function cancelAction() {
-            if (showComponentsId.value === ComponentType.chart) {
-                cancel();
-            } else {
-                showComponentsId.value = ComponentType.chart;
-            }
-        }
-
-        TimerUtils.setInterval(
-            () => {
-                queryFn();
-            },
-            10 * 1000,
-            'buyAndSellMartet'
-        );
-        // 单据挂牌成功 通知买大厅刷新数据
-        Bus.$on('spotTrade', queryFn);
-
-        return {
-            buyRef,
-            sellRef,
-            cancel,
-            visible,
-            componentId,
-            closeComponent,
-            openComponent,
-            btnListData,
-            changeComponent,
-            ComponentType,
-            showComponentsId,
-            cancelAction,
-            handleSubcriteOnDemandQuote,
-            handleQuotePriceColor,
-            quoteChange,
-            quoteAmplitude,
-            quoteAmplituOfVibration,
-        };
-    },
-});
-</script>
-<style lang="less">
-.valNums {
-    .flex;
-    flex-direction: column;
-    padding-left: 20px;
-    .firstNum {
-        font-size: 18px;
-        line-height: 18px;
-        font-weight: 400;
-    }
-    .lastNum {
-        margin-top: 2px;
-        display: inline-flex;
-        font-size: 12px;
-        line-height: 12px;
-        font-weight: 300;
-    }
-}
-.inlineBar {
-    display: inline-flex;
-}
-.priceBar {
-    .flex;
-    flex-direction: column;
-    height: 32px;
-    .greenBar,
-    .redBar {
-        height: 16px;
-        line-height: 16px;
-    }
-}
-.start {
-    align-self: flex-start !important;
-    align-items: flex-start !important;
-}
-</style>

+ 0 - 135
src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/setup.ts

@@ -1,135 +0,0 @@
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { TableKey } from '@/common/methods/table/interface';
-import { getTableColumns, getTableEvent, queryTableList } from "@/common/setup/table";
-import { queryFaProductDetail } from '@/services/go/wrtrade';
-import { WrFAProductDetail } from "@/services/go/wrtrade/interface";
-import { Ref, ref } from 'vue';
-
-
-export function handleBuyAndSellList<T>(menuType: EnumRouterName, isDetail: boolean, tableName: keyof TableKey) {
-    // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<T>();
-    // 表头数据
-    const { columns, registerColumn } = getTableColumns();
-    // 表格事件
-    const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<T>({});
-    // 注册表头信息 过滤
-    registerColumn(tableName, []);
-    return {
-        loading, tableList, columns, expandedRowKeys, selectedRow, Rowclick, queryTable
-    }
-}
-
-// 根据 当前tab 的枚举,获取买大厅对应的 wrpricetype haswr tableKey
-export function getBuyMarketParam(enumName: EnumRouterName) {
-    let wrpricetype = 1, haswr = 0, tableKey: keyof TableKey = 'table_pcweb_spot_trade_warehouse_price_trading_hall_buy'
-    switch (enumName) {
-        case EnumRouterName.warehouse_receipt_trade_price:
-            wrpricetype = 1;
-            haswr = 1
-            tableKey = 'table_pcweb_spot_trade_warehouse_price_trading_hall_buy'
-            break
-        case EnumRouterName.warehouse_receipt_trade_floating_price:
-            wrpricetype = 2;
-            haswr = 1
-            tableKey = 'table_pcweb_spot_trade_warehouse_float_trading_hall_buy'
-            break
-        case EnumRouterName.warehouse_pre_sale_price:
-            wrpricetype = 1;
-            haswr = 0
-            tableKey = 'table_pcweb_spot_trade_warehouse_presale_price_trading_hall_buy'
-            break
-        case EnumRouterName.warehouse_pre_sale_floating_price:
-            wrpricetype = 2;
-            haswr = 0
-            tableKey = 'table_pcweb_spot_trade_warehouse_presale_float_trading_hall_buy'
-            break
-    }
-    return { wrpricetype, haswr, tableKey }
-}
-
-// 根据 当前tab 的枚举,获取卖大厅对应的 wrpricetype haswr tableKey
-export function getSellMarketParam(enumName: EnumRouterName) {
-    let wrpricetype = 1, haswr = 0, tableKey: keyof TableKey = 'table_pcweb_spot_trade_warehouse_price_trading_hall_sale'
-    switch (enumName) {
-        case EnumRouterName.warehouse_receipt_trade_price:
-            wrpricetype = 1;
-            haswr = 1
-            tableKey = 'table_pcweb_spot_trade_warehouse_price_trading_hall_sale'
-            break
-        case EnumRouterName.warehouse_receipt_trade_floating_price:
-            wrpricetype = 2;
-            haswr = 1
-            tableKey = 'table_pcweb_spot_trade_warehouse_float_trading_hall_sale'
-            break
-        case EnumRouterName.warehouse_pre_sale_price:
-            wrpricetype = 1;
-            haswr = 0
-            tableKey = 'table_pcweb_spot_trade_warehouse_presale_price_trading_hall_sale'
-            break
-        case EnumRouterName.warehouse_pre_sale_floating_price:
-            wrpricetype = 2;
-            haswr = 0
-            tableKey = 'table_pcweb_spot_trade_warehouse_presale_float_trading_hall_sale'
-            break
-    }
-    return { wrpricetype, haswr, tableKey }
-}
-
-export function handleIs(enumName: EnumRouterName, buyOrSell: BuyOrSell) {
-    /**
-     *
-     * @returns 1 => 仓单贸易; 0 => 仓单预售
-     */
-    function isWR(): 0 | 1 {
-        if (enumName === EnumRouterName.warehouse_receipt_trade_price || enumName === EnumRouterName.warehouse_receipt_trade_floating_price) {
-            return 1
-        } else {
-            return 0
-        }
-    }
-    /**
-     *
-     * @returns true => 买; false =>卖
-     */
-    function isBuy() {
-        return buyOrSell === BuyOrSell.buy
-    }
-    /**
-     *
-     * @returns  true => 浮动价; false =>一口价
-     */
-    function isFloat() {
-        return enumName === EnumRouterName.warehouse_receipt_trade_floating_price ||
-            enumName === EnumRouterName.warehouse_pre_sale_floating_price
-    }
-    return { isWR, isBuy, isFloat }
-}
-
-const list = ref<WrFAProductDetail[]>([]);
-// 获取融资摘牌
-export function handleFinacing(loading: Ref<boolean>, id: number) {
-    queryResultLoadingAndInfo(queryFaProductDetail, loading, { wrfactortypeid: id }).then((res) => {
-        list.value = res;
-        return res
-    });
-    function hasFinacing(): boolean {
-        return list.value.length > 0
-    }
-    return { hasFinacing }
-}
-
-export function getFinacingList(): WrFAProductDetail[] {
-    return list.value
-}
-
-// 商品实时价格
-const goodsPrice = ref<string | number>('--')
-export function setGoodsPrice(value: string | number) {
-    goodsPrice.value = value
-}
-export function getGoodsPrice(): Ref<string | number> {
-    return goodsPrice
-}

+ 0 - 121
src/views/market/spot_trade/spot_trade_order_transaction/components/chart/index.vue

@@ -1,121 +0,0 @@
-<template>
-    <!-- 交易图表  -->
-    <div class="chart-container">
-        <div class="chart-content"></div>
-        <div class="chart-tips">
-            <a-tabs class="chartTabs" v-model:activeKey="activeKey" @change="change">
-                <a-tab-pane key="1" ref="tabRef1" tab="卖挂">
-                    <div class="chartRow" v-for="(item, index) in sellList" :key="index + '11'">
-                        <div class="left">{{item.username}}</div>
-                        <div class="middle">{{item.orderqty}}</div>
-                        <div class="right">{{item.orderprice}}</div>
-                    </div>
-                </a-tab-pane>
-                <a-tab-pane key="2" tab="买挂">
-                    <div class="chartRow" v-for="(item, index) in buyList" :key="index + '11'">
-                        <div class="left">{{item.username}}</div>
-                        <div class="middle">{{item.orderqty}}</div>
-                        <div class="right">{{item.orderprice}}</div>
-                    </div>
-                </a-tab-pane>
-                <a-tab-pane key="3" tab="成交">
-                    <div class="chartRow" v-for="(item, index) in tradedList" :key="index + '11'">
-                        <div class="left">{{formatTime(item.TS, 'hm')}}</div>
-                        <div class="middle">{{item.PE}}</div>
-                        <div class="right">{{item.Vol}}</div>
-                    </div>
-                </a-tab-pane>
-            </a-tabs>
-            <div @click="watchMore" class="watchMore">查看更多</div>
-        </div>
-    </div>
-</template>
-
-<script lang="ts">
-import { defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { PropType, ref } from 'vue';
-
-import { QueryHistoryTikDatasRsp, QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
-import { QueryHistoryTikDatas } from '@/services/go/quote';
-import { ComponentType } from '../../setup';
-import { WrTradeOrderDetailReq } from '@/services/go/wrtrade/interface';
-import { useQueryData } from '@/common/setup/request';
-import { queryWrTradeOrderDetail } from '@/services/go/wrtrade';
-import { formatTime } from '@/common/methods';
-
-export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'stock-exchange',
-    props: {
-        deliverGoods: {
-            type: Object as PropType<QueryDeliveryRelationRsp>,
-            default: {},
-        },
-    },
-
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-        const activeKey = ref('1');
-        function watchMore() {
-            const type: ComponentType = activeKey.value === '3' ? ComponentType.tradeDetail : ComponentType.marketContent;
-            context.emit('update', type);
-        }
-        const { goodsid, goodscode } = props.deliverGoods;
-        // 买挂
-        const param: WrTradeOrderDetailReq = {
-            buyorsell: 0,
-            goodsid,
-        };
-        const { list: buyList, update: buyUpdate } = useQueryData(queryWrTradeOrderDetail, param);
-
-        // 卖挂
-        const sellParam: WrTradeOrderDetailReq = {
-            buyorsell: 1,
-            goodsid,
-        };
-        const { list: sellList, update: sellUpdate } = useQueryData(queryWrTradeOrderDetail, sellParam);
-
-        // 成交
-        const { list: tradedList, update: tradedUpdate } = useQueryData(QueryHistoryTikDatas, { goodsCode: goodscode });
-        function change(activeKey: string) {
-            if (activeKey === '1') {
-                sellUpdate();
-            } else if (activeKey === '2') {
-                buyUpdate();
-            } else {
-                tradedUpdate();
-            }
-        }
-        return {
-            cancel,
-            visible,
-            buyList,
-            sellList,
-            tradedList,
-            change,
-            loading,
-            activeKey,
-            watchMore,
-            formatTime,
-        };
-    },
-});
-</script>
-<style lang="less">
-.chart-container {
-    display: flex;
-    width: 100%;
-    height: calc(100% - 41px);
-    .chart-content {
-        flex: 1;
-        height: 100%;
-    }
-    .chart-tips {
-        width: 300px;
-        height: 100%;
-    }
-}
-</style>

+ 0 - 328
src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/index.vue

@@ -1,328 +0,0 @@
-<template>
-    <!-- 仓单贸易&仓单预售 买/卖 摘牌 -->
-    <Drawer :title="'摘牌'" :placement="'right'" :visible="visible" width="486px" height="479px" @cancel="cancel" class="top">
-        <div class="delisting">
-            <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-select>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="挂牌方">
-                                <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.orderprice.toFixed(2) }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌数量">
-                                <span class="white ml8">{{ selectedRow.orderqty }}</span>
-                            </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="99999" v-model:value="formState.num" />
-                                <span class="input-enumdicname-absolute">{{ selectedRow.enumdicname }}</span>
-                                <!-- <div
-                                    class="labelTip"
-                                >({{selectedRow.minivalue}}{{selectedRow.enumdicname}}起)</div> -->
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <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" />
-                                <div class="unit">
-                                    <span>0</span>
-                                    <span>99999{{ 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="24" class="mt-20">
-                            <a-form-item label="摘牌金额">
-                                <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">{{ getCanUseMoney(getSelectedAccount()) }}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </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">{{ isBuy() ? '卖出' : '买入' }}</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 { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
-import { defineComponent, PropType, ref } from 'vue';
-import Drawer from '@/common/components/drawer/index.vue';
-import { WrOrderQuote, WrOrderQuoteDetail, WrTradeOrderDetailReq, WrTradeOrderDetailRsp } from '@/services/go/wrtrade/interface';
-import { getAccount_longType, getAccountTypeList, getSelectedAccountId } from '@/services/bus/account';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { HdWRDealOrder } from '@/services/proto/warehousetrade';
-import { v4 as uuidv4 } from 'uuid';
-import moment from 'moment';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
-import { HdWRDealOrderReq } from '@/services/proto/warehousetrade/interface';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { handleForm } from './setup';
-import { validateAction } from '@/common/setup/form';
-import { ListingForm, TempWrOrderQuoteDetail } from './interface';
-import { BuyOrSell, DelistingType, PriceType } from '@/common/constants/enumCommon';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { getCanUseMoney } from '@/services/bus/account';
-import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
-import { Order } from '@/services/socket/order';
-import { OrderReq } from '@/services/socket/order/interface';
-import { geLoginID_number } from '@/services/bus/login';
-import { LongType } from '@/services/socket/login/interface';
-import * as Long from 'long';
-export default defineComponent({
-    name: ModalEnum.spot_trade_warehouse_financing_delisting,
-    components: { Drawer, PlusOutlined, MinusOutlined },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<WrTradeOrderDetailRsp>,
-            default: {},
-        },
-        parantSelectedRow: {
-            type: Object as PropType<QueryDeliveryRelationRsp>,
-            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);
-        function isBuy() {
-            return props.buyOrSell === BuyOrSell.buy;
-        }
-        function getMoney() {
-            // return (formState.price * formState.num).toFixed(2);
-        }
-        // const { getMaxNum, getMoney, getMargin } = handleNumAndMoney(props.enumName, props.buyOrSell, props.selectedRow, props.parantSelectedRow, formState);
-        function submit() {
-            validateAction<ListingForm>(formRef, formState).then((res) => {
-                // 摘牌请求
-                const param: OrderReq = {
-                    ClientSerialNo: uuidv4(), // 客户端流水号
-                    ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // 客户端委托时间
-                    ClientType: 4, // 终端类型
-                    LoginID: geLoginID_number()!, // 登陆账号
-                    AccountID: getSelectedAccountId(), // 交易账号
-                    GoodsID: props.parantSelectedRow.goodsid, // 商品ID
-                    MarketID: props.parantSelectedRow.marketid, // 市场ID
-                    ValidType: 1, // 校验类型 当日有效
-                    OperateType: 1, // 操作类型: 申请
-                    OrderSrc: 1, // 单据来源: 客户端下单
-                    RelatedID: Long.fromString(props.selectedRow.orderid), // 操作员账号ID
-                    OrderPrice: props.selectedRow.orderprice, // 委托价格
-                    OperatorID: Number(geLoginID_number()),
-                    // MarketMaxSub: number // 市价允许最大偏差(做市)
-                    OrderQty: res.num, // 委托数量
-                    BuyOrSell: props.selectedRow.buyorsell === 1 ? 0 : 1, // 买卖方向  0 买 1 卖
-                    BuildType: props.selectedRow.buyorsell === 1 ? 1 : 2, // 下单类型  1 建 2 平
-                    // CurtQuotePrice: 0, // 保留,计算冻结金额使用
-                    // SpPrice: 0 ,// 止盈价格
-                    // SlPrice: 0 , // 止损价格
-                    PriceMode: PriceType.limit, // 取价方式
-                    TimevalidType: 1, // 时间有效类型 单日有效
-                    TriggerType: 1, // 预埋单触发类型
-                    // TriggerPrice: number // 预埋单触发价格
-                    ListingSelectType: 2, // 挂牌点选类型 1:挂牌 2:摘牌 3:先摘后挂
-                    DelistingType: DelistingType.selected, // 摘牌类型 2:点选成交
-                    // RelatedID: number // 关联单号
-                    OptionType: 1, // 期权类型(1:认购(看涨)2:认沽(看跌))
-                    // Premium: number // 权利金
-                    // TriggerOperator: number // 触发条件(1:大于等于2:小于等于)
-                    // ServiceTime: string // 服务端时间
-                    // CouponTypeID: number // 优惠券类型ID(买方)
-                    // UsedQty: number // 使用数量
-                    // ValidTime: string // 指定有效日期
-                    // ReceiveInfoID: number // 收货地址ID
-                };
-                requestResultLoadingAndInfo(Order, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
-                    cancel(true);
-                });
-            });
-        }
-
-        return {
-            visible,
-            cancel,
-            accountList,
-            loading,
-            submit,
-            isBuy,
-            rules,
-            formState,
-            formRef,
-            getCanUseMoney,
-            getSelectedAccount,
-            getMoney,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.delisting {
-    width: 100%;
-    height: 100%;
-    .flex;
-    flex-direction: column;
-    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%;
-    }
-}
-::v-deep.ant-slider.formSlider {
-    width: 260px;
-}
-::v-deep.ant-input-suffix {
-    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;
-}
-.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;
-    }
-}
-.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;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.mt20 {
-    margin-top: 20px;
-}
-.mt-20 {
-    margin-top: -20px;
-}
-.minusBtn,
-.plusBtn {
-    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;
-}
-.plusBtn {
-    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;
-}
-</style>;

+ 0 - 17
src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/interface.ts

@@ -1,17 +0,0 @@
-import { WrOrderQuoteDetail } from "@/services/go/wrtrade/interface";
-
-export interface ListingForm {
-    accountid: undefined | number,
-    num: number,
-    LadingBillId: string,
-}
-
-export interface Wrhold {
-    id: string,
-    name: string,
-    subnum: string,
-}
-
-export interface TempWrOrderQuoteDetail extends WrOrderQuoteDetail {
-    wrResult: { dgfactoryitemtypeid: number; dgfactoryitemid: number }[]
-}

+ 0 - 19
src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/setup.ts

@@ -1,19 +0,0 @@
-import {WrOrderQuoteDetail, WrTradeOrderDetailReq, WrTradeOrderDetailRsp} from "@/services/go/wrtrade/interface";
-import { reactive, ref, UnwrapRef } from "vue";
-import { ListingForm } from "./interface";
-
-export function handleForm(data: WrTradeOrderDetailRsp) {
-    const formRef = ref();
-    const formState: UnwrapRef<ListingForm> = reactive({
-        accountid: undefined,
-        num: 0,
-        LadingBillId: '',
-    })
-    const rules = {
-        accountid: [{ required: true, message: '请选择交易账户' }],
-        LadingBillId: [{ required: true, message: '请选择现货仓单' }],
-        num: [{ required: true, message: '请输入摘牌数量', trigger: 'blur', type: 'number', min: 1, ma: data.orderqty }],
-
-    }
-    return { rules, formState, formRef }
-}

+ 0 - 174
src/views/market/spot_trade/spot_trade_order_transaction/components/detail/index.vue

@@ -1,174 +0,0 @@
-<template>
-  <!-- 买卖大厅详情 -->
-  <Drawer :title="'详情'"
-          :placement="'right'"
-          :visible="visible"
-          class="top top486"
-          @cancel="cancel">
-    <div class="detailCont">
-      <div class="rows">
-        <div class="row"
-             v-for="item in lstitem"
-             :key="item.name">
-          <div class="left">{{item.name}}</div>
-          <div class="right">{{item.value}}</div>
-        </div>
-      </div>
-      <div class="ruleTitle">履约规则:</div>
-      <div class="rulesCont">
-        <a-row>
-          <a-col :span="24"
-                 class="ruleCol">
-            <div class="line"
-                 v-for="item in lststep"
-                 :key="item.autoid">
-              <!-- <div class="no">{{index + 1}}</div> -->
-              <div class="name">{{item.steptypename}}</div>
-              <div class="time">{{item.stepdate}}</div>
-            </div>
-          </a-col>
-        </a-row>
-      </div>
-    </div>
-  </Drawer>
-</template>
-
-<script lang="ts">
-import { defineComponent, PropType, ref } from 'vue';
-import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrGoodsInfoReq, WrGoodsPerformanceStep, WrTypeItem } from '@/services/go/wrtrade/interface';
-import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { queryWrBsGoodsInfo, queryWrGoodsInfo } from '@/services/go/wrtrade';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
-
-export default defineComponent({
-    name: 'detail',
-    components: { Drawer },
-    emits: ['cancel', 'update'],
-    props: {
-        deliverGoods: {
-            type: Object as PropType<QueryDeliveryRelationRsp>,
-            default: {},
-        },
-    },
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-        const lstitem = ref<WrTypeItem[]>();
-        const lststep = ref<WrGoodsPerformanceStep[]>();
-        queryResultLoadingAndInfo(queryWrBsGoodsInfo, loading, props.deliverGoods.goodsid).then((res) => {
-            if (res.length) {
-                lstitem.value = res[0].lstitem;
-                lststep.value = res[0].lststep;
-            }
-        });
-
-        return {
-            lstitem,
-            lststep,
-            visible,
-            cancel,
-        };
-    },
-});
-</script>
-
-<style lang="less" scoped>
-.detailCont {
-    padding: 10px;
-    .rows {
-        .flex;
-        flex-direction: column;
-        width: 100%;
-        border: 1px solid @m-black6;
-        background: @m-black13;
-        .row {
-            display: inline-flex;
-            width: 100%;
-            height: 38px;
-            line-height: 38px;
-            border-bottom: 1px solid @m-black6;
-            > div {
-                text-align: center;
-                font-size: 16px;
-            }
-            .left {
-                width: 126px;
-                color: @m-grey1;
-                border-right: 1px solid @m-black6;
-            }
-            .right {
-                flex: 1;
-                color: @m-white11;
-            }
-        }
-    }
-    .ruleTitle {
-        width: 100%;
-        height: 30px;
-        line-height: 30px;
-        margin-top: 10px;
-        font-size: 16px;
-        color: @m-grey1;
-    }
-    .rulesCont {
-        margin-top: 10px;
-        .flex;
-        overflow-x: auto;
-        overflow-y: hidden;
-        max-width: 450px;
-        .ruleCol.ant-col {
-            margin-bottom: 10px;
-        }
-    }
-}
-.ant-row {
-    margin-left: 0 !important;
-    margin-right: 0 !important;
-    .ant-col {
-        padding-left: 0 !important;
-        padding-right: 0 !important;
-        margin-bottom: 20px;
-        .rounded-corners(3px);
-        display: inline-flex;
-        .line {
-            width: 100%;
-            .flex;
-            flex-direction: column;
-            .name {
-                min-width: 120px;
-                height: 30px;
-                background: @m-blue28;
-                border: 1px solid @m-black37;
-                .rounded-corners(3px);
-                text-align: center;
-                font-size: 16px;
-                color: @m-white6;
-            }
-
-            .time {
-                margin: 6px auto 0;
-                width: 50px;
-                height: 28px;
-                background: @m-black38;
-                .rounded-corners(5px);
-                color: @m-blue26;
-                font-size: 14px;
-                text-align: center;
-            }
-        }
-        .line:nth-child(2n) {
-            .name {
-                background: @m-yellow4;
-                border-color: @m-yellow5;
-            }
-        }
-
-        .line + .line {
-            margin-left: 5px;
-        }
-    }
-}
-</style>

+ 0 - 343
src/views/market/spot_trade/spot_trade_order_transaction/components/listing/index.vue

@@ -1,343 +0,0 @@
-<template>
-  <!-- 贸易圈挂牌 -->
-  <Drawer :title="'挂牌'"
-          :placement="'right'"
-          :visible="visible"
-          width="486px"
-          height="479px"
-          @cancel="cancel"
-          class="top">
-    <div class="delisting">
-      <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-select>
-              </a-form-item>
-            </a-col>
-          </a-row>
-          <a-row :gutter="24">
-            <a-col :span="24">
-              <a-form-item label="挂牌价格"
-                           class="relative"
-                           name="FixedPrice">
-                <a-input-number class="dialogInput yellowInput"
-                                style="width: 260px"
-                                :min="0"
-                                :max="99999"
-                                v-model:value="formState.FixedPrice" />
-              </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="getListingBuyMaxNum()"
-                                v-model:value="formState.OrderQty" />
-                <span class="input-enumdicname-absolute">{{deliverGoods.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-form-item>
-                <a-slider :min="0"
-                          v-model:value="formState.OrderQty"
-                          :max="deliverGoods.orderqty"
-                          class="formSlider"
-                          style="width: 260px" />
-                <div class="unit">
-                  <span>0</span>
-                  <span>{{getListingBuyMaxNum()}}{{deliverGoods.enumdicname}}</span>
-                </div>
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">&nbsp;</a-col>
-          </a-row>
-          <a-row :gutter="24">
-            <a-col :span="24"
-                   class="mt-20">
-              <a-form-item label="挂牌金额">
-                <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">{{getCanUseMoney(getSelectedAccount())}}</span>
-              </a-form-item>
-            </a-col>
-          </a-row>
-        </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>
-    </div>
-  </Drawer>
-</template>
-
-<script lang="ts">
-import Drawer from '@/common/components/drawer/index.vue';
-import { DelistingType, PriceType } from '@/common/constants/enumCommon';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { validateAction } from '@/common/setup/form';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { useListingTradeNumAndPrice } from '@/common/setup/trade';
-import { ListingTradeNumAndPrice } from '@/common/setup/trade/interface';
-import { getCanUseMoney, getSelectedAccountId } from '@/services/bus/account';
-import { geLoginID_number } from '@/services/bus/login';
-import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
-import { Order } from '@/services/socket/order';
-import { OrderReq } from '@/services/socket/order/interface';
-import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
-import moment from 'moment';
-import { v4 as uuidv4 } from 'uuid';
-import { defineComponent, PropType, ref } from 'vue';
-import { useBlocksAccount } from '../../spot_trade_order_transaction_swap/components/setup';
-import { FormState } from './interface';
-import { handleForm } from './setup';
-
-export default defineComponent({
-    name: ModalEnum.spot_trade_warehouse_financing_delisting,
-    components: { Drawer, PlusOutlined, MinusOutlined },
-    emits: ['cancel', 'update'],
-    props: {
-        deliverGoods: {
-            type: Object as PropType<QueryDeliveryRelationRsp>,
-            default: {},
-        },
-    },
-
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        // 资金账号
-        const { rules, formState, formRef } = handleForm();
-
-        const loading = ref<boolean>(false);
-        const { canUseMoney, getSelectedAccount, accountList } = useBlocksAccount(formState);
-
-        // 金额 数量 保证金
-        const param: ListingTradeNumAndPrice<FormState> = {
-            formState,
-            goodscode: props.deliverGoods.goodscode,
-            isFloat: () => {
-                return false;
-            },
-            canUseMoney,
-        };
-        const { getMoney, getListingBuyMaxNum } = useListingTradeNumAndPrice<FormState>(param);
-
-        function submit() {
-            validateAction<FormState>(formRef, formState).then((res) => {
-                // 挂牌请求 通过挂牌求购进行挂牌
-                const param: OrderReq = {
-                    ClientSerialNo: uuidv4(), // 客户端流水号
-                    ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // 客户端委托时间
-                    ClientType: 4, // 终端类型
-                    LoginID: geLoginID_number()!, // 登陆账号
-                    AccountID: getSelectedAccountId(), // 交易账号
-                    GoodsID: props.deliverGoods.goodsid, // 商品ID
-                    MarketID: props.deliverGoods.marketid, // 市场ID
-                    ValidType: 1, // 校验类型 当日有效
-                    OperateType: 1, // 操作类型: 申请
-                    OrderSrc: 1, // 单据来源: 客户端下单
-                    OrderPrice: res.FixedPrice, // 委托价格
-                    OperatorID: Number(geLoginID_number()),
-                    // MarketMaxSub: number // 市价允许最大偏差(做市)
-                    OrderQty: res.OrderQty, // 委托数量
-                    BuyOrSell: 0, // 买卖方向  0 买 1 卖
-                    BuildType: 1, // 下单类型  1 建 2 平
-                    // CurtQuotePrice: 0, // 保留,计算冻结金额使用
-                    // SpPrice: 0 ,// 止盈价格
-                    // SlPrice: 0 , // 止损价格
-                    PriceMode: PriceType.limit, // 取价方式
-                    TimevalidType: 1, // 时间有效类型 单日有效
-                    TriggerType: 1, // 预埋单触发类型
-                    // TriggerPrice: number // 预埋单触发价格
-                    ListingSelectType: 1, // 挂牌点选类型 1:挂牌 2:摘牌 3:先摘后挂
-                    DelistingType: DelistingType.selected, // 摘牌类型 2:点选成交
-                    // RelatedID: number // 关联单号
-                    OptionType: 1, // 期权类型(1:认购(看涨)2:认沽(看跌))
-                    // Premium: number // 权利金
-                    // TriggerOperator: number // 触发条件(1:大于等于2:小于等于)
-                    // ServiceTime: string // 服务端时间
-                    // CouponTypeID: number // 优惠券类型ID(买方)
-                    // UsedQty: number // 使用数量
-                    // ValidTime: string // 指定有效日期
-                    // ReceiveInfoID: number // 收货地址ID
-                    OrderFlag: 1,
-                };
-                requestResultLoadingAndInfo(Order, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
-                    cancel(true);
-                });
-            });
-        }
-
-        return {
-            visible,
-            cancel,
-            accountList,
-            loading,
-            submit,
-            rules,
-            formState,
-            formRef,
-            getCanUseMoney,
-            getSelectedAccount,
-            getMoney,
-            getListingBuyMaxNum,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.delisting {
-    width: 100%;
-    height: 100%;
-    .flex;
-    flex-direction: column;
-    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%;
-    }
-}
-::v-deep.ant-slider.formSlider {
-    width: 260px;
-}
-::v-deep.ant-input-suffix {
-    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;
-}
-.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;
-    }
-}
-.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;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.mt20 {
-    margin-top: 20px;
-}
-.mt-20 {
-    margin-top: -20px;
-}
-.minusBtn,
-.plusBtn {
-    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;
-}
-.plusBtn {
-    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;
-}
-</style>;

+ 0 - 5
src/views/market/spot_trade/spot_trade_order_transaction/components/listing/interface.ts

@@ -1,5 +0,0 @@
-import { CommomTradeForm } from "@/common/setup/trade/interface";
-
-export interface FormState extends CommomTradeForm {
-    accountid: undefined | number,
-}

+ 0 - 26
src/views/market/spot_trade/spot_trade_order_transaction/components/listing/setup.ts

@@ -1,26 +0,0 @@
-import { reactive, ref, UnwrapRef } from "vue";
-import { FormState } from "./interface";
-
-export function handleForm() {
-    const formRef = ref();
-    const formState: UnwrapRef<FormState> = reactive({
-        accountid: undefined,
-        OrderQty: 0,
-        FixedPrice: 0,
-        PriceMove: 0
-    })
-    const rules = {
-        accountid: [{ required: true, message: '请选择交易账户' }],
-        OrderQty: [
-            { required: true, message: '请输入挂牌数量', trigger: 'blur', type: 'number' },
-            { message: '挂牌数量不能小于0', min: 1, type: 'number' }
-        ],
-        FixedPrice: [
-            { required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number' },
-            { message: '挂牌价格不能小于0', min: 1, type: 'number' }
-        ],
-
-    }
-    return { rules, formState, formRef }
-
-}

+ 0 - 103
src/views/market/spot_trade/spot_trade_order_transaction/components/sell-market/index.vue

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

+ 0 - 94
src/views/market/spot_trade/spot_trade_order_transaction/components/stock-exchange/index.vue

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

+ 0 - 28
src/views/market/spot_trade/spot_trade_order_transaction/index.vue

@@ -1,28 +0,0 @@
-<template>
-  <!-- 订单交易 -->
-  <div class="topTableHeight40">
-    <router-view></router-view>
-    <ThridMenu :list="tabList"
-               :selectedKey="index"
-               @selectMenu="changeTab" />
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent } from 'vue';
-import ThridMenu from '@/common/components/thirdMenu/index.vue';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { handleMartketThirdRouter } from '@/common/setup/matket/router';
-
-export default defineComponent({
-    name: EnumRouterName.spot_trade_order_transaction,
-    components: {
-        ThridMenu,
-    },
-    setup() {
-        return { ...handleMartketThirdRouter(EnumRouterName.spot_trade_order_transaction) };
-    },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 92
src/views/market/spot_trade/spot_trade_order_transaction/setup.ts

@@ -1,92 +0,0 @@
-import { TradeMode } from "@/common/constants/enumCommon"
-import { initData } from "@/common/methods"
-import { getQuoteDayInfoByCode } from "@/services/bus/goods"
-import { getMarketByTradeMode } from "@/services/bus/market"
-import { queryDeliveryRelation } from "@/services/go/delivery"
-import { QueryDeliveryRelationRsp } from "@/services/go/delivery/interface"
-import { QueryQuoteDayRsp } from "@/services/go/quote/interface"
-import { ref } from "vue"
-
-// 获取交个商品
-const allDeliverGoods = ref<QueryDeliveryRelationRsp[]>([])
-// 行情商品
-const goodsList = ref<QueryQuoteDayRsp[]>([])
-type deliverytype = 1 | 2 | 3 | 4
-// 1和3是订单交易 挂牌转让
-// 2和4是基差点价
-export function handleDeliveryRelation(param: deliverytype[]) {
-    // 查询交割商品
-    const deliverGoods = ref<any[]>([])
-    function queryAction() {
-        const marketid = getMarketByTradeMode(TradeMode.ListingAndSelection)!.marketid
-        queryDeliveryRelation({ marketid }).then(res => {
-            goodsList.value.length = 0
-            allDeliverGoods.value = res
-            deliverGoods.value = getDeliverGoods()
-            res.forEach(el => {
-                // 找到盘面数据
-                const quote = getQuoteDayInfoByCode(el.goodscode);
-                if (quote) {
-                    Object.assign(quote, { goodsname: el.goodsname, deliverytype: el.deliverytype })
-                    goodsList.value.push(quote)
-                }
-            })
-        })
-    }
-
-    function getDeliverGoods() {
-        return allDeliverGoods.value.filter(e => param.includes(e.deliverytype as deliverytype))
-    }
-    initData(() => {
-        if (allDeliverGoods.value.length === 0) {
-            // 从服务交割商品
-            queryAction()
-        } else {
-            // 从缓存中获取交割商品
-            deliverGoods.value = getDeliverGoods()
-        }
-    })
-    // 更新交割商品
-    function updateGeliverGoods() {
-        queryAction()
-    }
-    // 获取对应的行情
-    function getQuoteList() {
-        return goodsList.value.filter(e => param.includes((e as unknown as any).deliverytype))
-    }
-    // 通过goodscode 查找交割商品
-    function findDeilverGoodsByGoodsCode(goodscode: string) {
-        return allDeliverGoods.value.find(e => e.goodscode === goodscode)!
-    }
-    return { deliverGoods, allDeliverGoods, updateGeliverGoods, getQuoteList, goodsList: allDeliverGoods, findDeilverGoodsByGoodsCode }
-}
-
-export const columnsList = [
-    { title: '序号', key: 'index', width: 80 },
-    { title: '代码', key: 'goodscode' },
-    { title: '名称', key: 'goodsname' },
-    { title: '买价', key: 'bid' },
-    { title: '买量', key: 'bidvolume' },
-    { title: '卖价', key: 'ask' },
-    { title: '卖量', key: 'askvolume' },
-    { title: '最新价', key: 'last' },
-    { title: '涨跌', key: 'change' }, // 最新价 - 昨结价
-    { title: '幅度', key: 'amplitude' }, // (最新价 - 昨结价) / 100 %
-    { title: '开盘价', key: 'opened' },
-    { title: '昨收价', key: 'preclose' },
-    { title: '昨结价', key: 'presettle' },
-    { title: '最低价', key: 'lowest' },
-    { title: '最高价', key: 'highest' },
-    // { title: '振幅', key: 'vibration' }, // (最高价 - 最低价 ) / 最新价  * 100 %
-    // { title: '总量', key: 'totalvolume' },
-    // { title: '现量', key: 'lastvolume' },
-    // { title: '持仓量', key: 'holdvolume' },
-    // { title: '日增', key: 'holdincrement' },
-    // { title: '金额', key: 'totalturnover' },
-];
-
-export enum ComponentType {
-    chart,
-    marketContent,
-    tradeDetail,
-}

+ 0 - 124
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_basis_difference/index.vue

@@ -1,124 +0,0 @@
-<template>
-  <!--订单交易 基差点价-->
-  <div class="topTableHeight">
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'secondTabTable' : 'secondTabTableNoBottom', getQuoteList().length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 407px)' : 'calc(100vh - 167px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="goodscode"
-             ref="tableRef"
-             :data-source="getQuoteList()">
-      <template #totalturnover="{ text }">
-        <span>{{changeUnit(text)}}</span>
-      </template>
-      <!-- 涨跌 -->
-      <template #change="{ record }">
-        <span>{{quoteChange(record, record.decimalplace)}}</span>
-      </template>
-      <!-- 幅度 -->
-      <template #amplitude="{ record }">
-        <span>{{quoteAmplitude(record, record.decimalplace)}}</span>
-      </template>
-      <!-- 振幅 -->
-      <template #vibration="{ record }">
-        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
-      </template>
-      <template #index="{ index }">
-        <span>{{index + 1}}</span>
-      </template>
-      <!-- 买价 -->
-      <template #bid="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 卖价 -->
-      <template #ask="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 最新价 -->
-      <template #last="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 最低价 -->
-      <template #lowest="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 最高价 -->
-      <template #highest="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-    </a-table>
-    <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="btnList"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               :deliverGoods="findDeilverGoodsByGoodsCode(selectedRow.goodscode)"
-               @cancel="closeComponent"></component>
-  </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { contextMenu, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
-
-import { handleDeliveryRelation } from '../setup';
-
-import { handleSubcriteOnDemandQuote, handleQuotePriceColor, quoteChange, quoteAmplitude, quoteAmplituOfVibration } from '@/common/setup/table/tableQuote';
-import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
-import { columnsList } from '../setup';
-
-import { handleTableEventAndData } from '@/common/setup/table/compose';
-import { TableParam } from '@/common/setup/table/interface';
-import { BtnListType } from '@/common/components/btnList/interface';
-import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import { ref } from 'vue';
-
-export default defineComponent({
-    name: EnumRouterName.spot_trade_order_transaction_basis_difference,
-    components: {
-        contextMenu,
-        BuyAndSell: defineAsyncComponent(() => import('../components/buy-sell-market/index.vue')),
-        Listing: defineAsyncComponent(() => import('../components/listing/index.vue')),
-        Detail: defineAsyncComponent(() => import('../components/detail/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        const loading = ref<boolean>(false);
-        const param: TableParam = {
-            columnsList,
-            queryFn: () => {},
-            clickName: 'BuyAndSell',
-        };
-        const btnList: BtnListType[] = [
-            { lable: '挂牌求购', code: 'Listing', className: 'btnDeafault' },
-            { lable: '图表', code: 'BuyAndSell', className: 'btnDeafault' },
-            { lable: '详情', code: 'Detail', className: 'btnDeafault' },
-        ];
-        const { deliverGoods, getQuoteList, findDeilverGoodsByGoodsCode } = handleDeliveryRelation([2, 4]);
-        // 行情按需订阅
-        handleSubcriteOnDemandQuote<QueryDeliveryRelationRsp>(deliverGoods);
-
-        return {
-            isBottom,
-            ...handleTableEventAndData<QueryQuoteDayRsp>(param),
-            deliverGoods,
-            btnList,
-            handleQuotePriceColor,
-            quoteChange,
-            quoteAmplitude,
-            quoteAmplituOfVibration,
-            getQuoteList,
-            findDeilverGoodsByGoodsCode,
-            loading,
-        };
-    },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 129
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_listing_transfer/index.vue

@@ -1,129 +0,0 @@
-<template>
-  <!--订单交易 挂牌转让-->
-  <div class="topTableHeight">
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'secondTabTable' : 'secondTabTableNoBottom', getQuoteList().length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 407px)' : 'calc(100vh - 167px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="goodscode"
-             ref="tableRef"
-             :data-source="getQuoteList()">
-      <template #totalturnover="{ text }">
-        <span>{{ changeUnit(text) }}</span>
-      </template>
-      <!-- 涨跌 -->
-      <template #change="{ record }">
-        <span>{{ quoteChange(record, record.decimalplace) }}</span>
-      </template>
-      <!-- 幅度 -->
-      <template #amplitude="{ record }">
-        <span>{{ quoteAmplitude(record, record.decimalplace) }}</span>
-      </template>
-      <!-- 振幅 -->
-      <template #vibration="{ record }">
-        <span>{{ quoteAmplituOfVibration(record, record.decimalplace) }}</span>
-      </template>
-      <template #index="{ index }">
-        <span>{{ index + 1 }}</span>
-      </template>
-      <!-- 买价 -->
-      <template #bid="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{ text }}</span>
-      </template>
-      <!-- 卖价 -->
-      <template #ask="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{ text }}</span>
-      </template>
-      <!-- 最新价 -->
-      <template #last="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{ text }}</span>
-      </template>
-      <!-- 最低价 -->
-      <template #lowest="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{ text }}</span>
-      </template>
-      <!-- 最高价 -->
-      <template #highest="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{ text }}</span>
-      </template>
-    </a-table>
-    <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="btnList"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               :deliverGoods="findDeilverGoodsByGoodsCode(selectedRow.goodscode)"
-               @cancel="closeComponent"></component>
-  </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { contextMenu, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
-
-import { handleDeliveryRelation } from '../setup';
-
-import { handleSubcriteOnDemandQuote, handleQuotePriceColor, quoteChange, quoteAmplitude, quoteAmplituOfVibration } from '@/common/setup/table/tableQuote';
-import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
-import { columnsList } from '../setup';
-
-import { handleTableEventAndData } from '@/common/setup/table/compose';
-import { TableParam } from '@/common/setup/table/interface';
-import { BtnListType } from '@/common/components/btnList/interface';
-import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import { ref } from 'vue';
-
-export default defineComponent({
-    name: EnumRouterName.spot_trade_order_transaction_listing_transfer,
-    components: {
-        contextMenu,
-        BuyAndSell: defineAsyncComponent(() => import('../components/buy-sell-market/index.vue')),
-        Listing: defineAsyncComponent(() => import('../components/listing/index.vue')),
-        Detail: defineAsyncComponent(() => import('../components/detail/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        const loading = ref<boolean>(false);
-        const param: TableParam = {
-            columnsList,
-            queryFn: () => {},
-            clickName: 'BuyAndSell',
-        };
-        const btnList: BtnListType[] = [
-            { lable: '挂牌求购', code: 'Listing', className: 'btnDeafault' },
-            { lable: '图表', code: 'BuyAndSell', className: 'btnDeafault' },
-            { lable: '详情', code: 'Detail', className: 'btnDeafault' },
-            // { lable: '买卖大厅', code: 'BuyAndSell', className: 'btnDeafault' },
-        ];
-        const { deliverGoods, getQuoteList, goodsList, findDeilverGoodsByGoodsCode } = handleDeliveryRelation([1, 3]);
-        // 行情按需订阅
-        handleSubcriteOnDemandQuote<QueryDeliveryRelationRsp>(deliverGoods);
-
-        return {
-            isBottom,
-            ...handleTableEventAndData<QueryQuoteDayRsp>(param),
-            deliverGoods,
-            btnList,
-            handleQuotePriceColor,
-            quoteChange,
-            quoteAmplitude,
-            quoteAmplituOfVibration,
-            getQuoteList,
-            findDeilverGoodsByGoodsCode,
-            goodsList,
-            loading,
-        };
-    },
-});
-</script>
-<style lang="less">
-.noData {
-    .position(absolute, 28px, 0, 0, 0);
-}
-</style>

+ 0 - 164
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/buy-sell-market/index.vue

@@ -1,164 +0,0 @@
-<template>
-  <!-- 买卖大厅 -->
-  <div class="buy-sell-market">
-    <div class="buy-sell-market-title">
-      <a class="backIcon"
-         @click="cancel">
-        <LeftOutlined />
-      </a>
-      <div class="titleBtn">
-        <div class="name">{{selectedRow.goodsname}}</div>
-        <div class="arrowRightIcon"></div>
-      </div>
-      <div class="priceBar bdf1 ml20">
-        <div class="greenBar">
-          <div class="numBlock">
-            <div class="first">卖量</div>
-            <div class="last green">{{selectedRow.sellqty}}</div>
-          </div>
-          <div class="numBlock">
-            <div class="first">买量</div>
-            <div class="last white">{{selectedRow.buyqty}}</div>
-          </div>
-        </div>
-      </div>
-      <!-- 历史走势按钮 -->
-      <a-button class="historyBtn"
-                @click="openComponent({code: 'HisChart'})">
-        历史走势
-        <LineChartOutlined />
-      </a-button>
-      <BtnList :btnList="firstBtn"
-               :record="selectedRow"
-               @click="openComponent" />
-    </div>
-    <a-row class="buySellHall">
-      <a-col :span="12">
-        <Sell :enumName="enumName"
-              ref="sellRef"
-              :parantSelectedRow="selectedRow" />
-      </a-col>
-      <a-col :span="12">
-        <Buy :enumName="enumName"
-             ref="buyRef"
-             :parantSelectedRow="selectedRow" />
-      </a-col>
-    </a-row>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               :goodsPrice="getGoodsPrice()"
-               :enumName="enumName"
-               @cancel="closeComponent"></component>
-  </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { defineAsyncComponent, defineComponent, BtnList, ModalEnum } from '@/common/export/commonTable';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { WrOrderQuote } from '@/services/go/wrtrade/interface';
-import { LeftOutlined } from '@ant-design/icons-vue';
-import Buy from '../buy/index.vue';
-import Sell from '../sell/index.vue';
-import { LineChartOutlined, DownOutlined } from '@ant-design/icons-vue';
-import { handleModalComponent } from '@/common/setup/asyncComponent';
-import { onBeforeUnmount, onMounted, PropType, ref } from 'vue';
-import { v4 } from 'uuid';
-import { addSubscribeQuotation, removeSubscribeQuotation } from '@/services/socket/quota';
-import Bus from '@/utils/eventBus/index';
-import { getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
-import TimerUtils from '@/utils/timer/timerUtil';
-import { BtnListType } from '@/common/components/btnList/interface';
-import moment, { Moment } from 'moment';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { getBtnList } from '../../setup';
-import { RefGoodsList } from '../../interface';
-
-export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'buy-sell-market',
-    props: {
-        selectedRow: {
-            type: Object as PropType<RefGoodsList>,
-            default: {},
-        },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-    },
-    components: {
-        Buy,
-        Sell,
-        BtnList,
-        LeftOutlined,
-        DownOutlined,
-        LineChartOutlined,
-        Detail: defineAsyncComponent(() => import('../detail/index.vue')),
-        PostBuying: defineAsyncComponent(() => import('../post_buying/index.vue')),
-        HisChart: defineAsyncComponent(() => import('../history-chart/index.vue')),
-    },
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-
-        // const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
-        // 买卖大厅 配置数据
-        // 表格操作按钮列表
-        // 获取浮动价商品实时价格
-
-        function getGoodsPrice() {
-            const result = getQuoteDayInfoByCodeFindPrice(props.selectedRow.goodscode);
-            // setGoodsPrice(result);
-            return result;
-        }
-        const buyRef = ref<null | { queryTableAction: Function }>(null);
-        const sellRef = ref<null | { queryTableAction: Function }>(null);
-        const queryFn = () => {
-            buyRef.value?.queryTableAction();
-            sellRef.value?.queryTableAction();
-        };
-        const { componentId, closeComponent, openComponent } = handleModalComponent(queryFn, ref({}));
-        // const { hasFinacing } = handleFinacing(loading, props.selectedRow.wrfactortypeid);
-        function handleBtnList(list: BtnListType[]) {
-            // if (!hasFinacing()) {
-            //     return list.filter((e) => e.code !== 'spot_trade_warehouse_financing_delisting');
-            // } else {
-            //     return list;
-            // }
-        }
-        // 单据挂牌成功 通知买大厅刷新数据
-        Bus.$on('spotTrade', queryFn);
-
-        return {
-            buyRef,
-            sellRef,
-            cancel,
-            getGoodsPrice,
-            visible,
-            firstBtn: getBtnList(false),
-            buyMarket: [],
-            sellMarket: [],
-            componentId,
-            closeComponent,
-            openComponent,
-            enumName: props.enumName,
-            handleBtnList,
-        };
-    },
-});
-</script>
-<style lang="less">
-.priceBar {
-    .flex;
-    flex-direction: column;
-    height: 32px;
-    .greenBar,
-    .redBar {
-        height: 16px;
-        line-height: 16px;
-        color: var(--m-grey17);
-    }
-}
-</style>

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

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

+ 0 - 447
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/index.vue

@@ -1,447 +0,0 @@
-<template>
-  <!-- 挂牌求购 -->
-  <Drawer :title="!isBuy() ? '摘牌买入' : '摘牌卖出' "
-          :placement="'right'"
-          :visible="visible"
-          @cancel="cancel"
-          class="top">
-    <div class="post_buying">
-      <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-select>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-item label="挂牌方">
-                <span class="white">{{selectedRow.username}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="!isFloat()">
-              <a-form-item label="价格类型">
-                <span class="white">固定价</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="isFloat()">
-              <a-form-item label="挂牌估算价">
-                <span class="white">3444</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="isFloat()">
-              <a-form-item label="卖出价格"
-                           name="priceType">
-                <a-radio-group class="commonRadioGroup"
-                               v-model:value="formState.priceType">
-                  <a-radio :value="1">市价</a-radio>
-                  <a-radio :value="2">限价</a-radio>
-                </a-radio-group>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="isFloat() && isLimit()">
-              <a-form-item label="摘牌价格"
-                           name="price"
-                           class="inputIconBox">
-                <a-input-number class="commonInput"
-                                style="width: 260px"
-                                :min="0"
-                                v-model:value="formState.price" />
-                <MinusOutlined @click="decreasePrice" />
-                <PlusOutlined @click="increasePrice" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-item label="挂牌数量">
-                <span class="white">{{selectedRow.orderqty}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="!useUserType()">
-              <a-form-item label="摘牌数量">
-                <span class="white">{{formState.num}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="useUserType()">
-              <a-form-item label="摘牌数量"
-                           name="num"
-                           class="inputIconBox">
-                <a-input-number class="commonInput"
-                                style="width: 260px"
-                                :min="0"
-                                :max="99"
-                                v-model:value="formState.num" />
-                <MinusOutlined @click="decreaseNumber" />
-                <PlusOutlined @click="increaseNumber" />
-                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="useUserType()"
-                   class="mt-10">
-              <a-form-item>
-                <a-slider :min="0"
-                          v-model:value="formState.num"
-                          :max="selectedRow.orderqty"
-                          class="formSlider" />
-                <div class="unit">
-                  <span>0</span>
-                  <span>{{selectedRow.orderqty}}{{selectedRow.enumdicname}}</span>
-                </div>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   class="relative mt20"
-                   v-if="!isFloat()">
-              <a-form-item :label="'摘牌金额'">
-                <span class="white ml8">{{getMoney()}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   class="relative mt20"
-                   v-if="isFloat()">
-              <a-form-item :label="'估算金额'">
-                <span class="white ml8">{{getMoney()}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="getMargin()">
-              <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">{{canUseMoney()}}</span>
-              </a-form-item>
-            </a-col>
-          </a-row>
-        </div>
-        <a-row :gutter="24">
-          <a-col :span="24"
-                 class="fixedBtns">
-            <a-form-item class="btnCenter">
-              <a-button class="listedBtn"
-                        @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>
-</template>
-
-<script lang="ts">
-import { Des } from '@/common/components/commonDes';
-import Drawer from '@/common/components/drawer/index.vue';
-import { BuyOrSell, TradeMode } from '@/common/constants/enumCommon';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { useTaAccount } from '@/common/setup/account';
-import { validateAction } from '@/common/setup/form';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { useTradeRule } from '@/common/setup/trade';
-import { getGoodsAgreeunitByGoodsId } from '@/services/bus/goods';
-import { geLoginID_number } from '@/services/bus/login';
-import { getMarketByTradeMode, getMarketIdsByTradeMode } from '@/services/bus/market';
-import { QueryQuoteGoodsListRsp, QueryTjmdTodayAccountMarginReq, QueryTjmdTradeOrderDetailRsp } from '@/services/go/Tjmd/interface';
-import { diaoQiOrder } from '@/services/socket/order';
-import { OrderReq } from '@/services/socket/order/interface';
-import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
-import Long from 'long';
-import moment from 'moment';
-import { v4 as uuidv4 } from 'uuid';
-import { defineComponent, PropType, ref } from 'vue';
-import { useUserType } from '../setup';
-import { FormParam } from './interface';
-import { handleForm, useBlocksPrice, useBlocksNumber } from './setup';
-import { useTodayMargin } from '@/hooks/margin';
-import { getSelectedAccountId } from '@/services/bus/account';
-
-export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: ModalEnum.spot_trade_warehouse_post_buying,
-    components: { Des, Drawer, PlusOutlined, MinusOutlined },
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryTjmdTradeOrderDetailRsp>,
-            default: {},
-        },
-        refGoods: {
-            type: Object as PropType<QueryQuoteGoodsListRsp[]>,
-            default: [],
-        },
-        buyOrSell: {
-            type: Number as PropType<BuyOrSell>,
-            defualt: BuyOrSell.buy,
-        },
-    },
-    setup(props, context) {
-        const marginParam: QueryTjmdTodayAccountMarginReq = {
-            accountid: getSelectedAccountId()!.toString(),
-            goodsid: props.selectedRow.goodsid,
-            marketids: getMarketIdsByTradeMode(TradeMode.DiaoQi),
-        };
-        // 获取保证金比例
-        const { getReckonMarginValueByTradeMode } = useTodayMargin(marginParam);
-        // 控制弹窗
-        const { visible, cancel } = _closeModal(context);
-        // 表单
-        const { rules, formState, formRef } = handleForm();
-        const loading = ref<boolean>(false);
-        // 资金账号
-        const { canUseMoney, accountList } = useTaAccount<FormParam>(formState);
-
-        const isBuy = () => props.buyOrSell === BuyOrSell.buy;
-        const isFloat = () => props.selectedRow.pricemode === 3;
-        // 投资者摘牌时可以选择数量,机构摘牌时不能改数量只能整单摘(全部挂牌数量
-        if (!useUserType() || !isFloat()) {
-            formState.num = props.selectedRow.orderqty;
-        }
-        // 是否是 限价
-        const isLimit = () => formState.priceType === 2;
-        const getPrice = () => (isFloat() && isLimit() ? formState.price : props.selectedRow.orderprice);
-        // 金额
-        const getMoney = () => {
-            const temp = getGoodsAgreeunitByGoodsId(props.selectedRow.goodsid);
-            const argeeunit = temp ? temp : 1;
-            const price = getPrice();
-            return Math.round(formState.num * argeeunit * price * 100) / 100;
-        };
-        // 保证金
-        const getMargin = () => {
-            const marginvalue = getReckonMarginValueByTradeMode(TradeMode.DiaoQi);
-            let result = 0;
-            if (formState.num && marginvalue) {
-                result = (getMoney() + props.selectedRow.marketmaxsub) * formState.num * (marginvalue / 100);
-            }
-            return result ? result.toFixed(2) : '--';
-        };
-        // const { getMaxNum, getMoney, getMargin, getPrice } = handleNumAndPrice(props.selectedRow);
-        function submit() {
-            validateAction<FormParam>(formRef, formState).then((res) => {
-                const param: OrderReq = {
-                    ClientSerialNo: uuidv4(), // 客户端流水号
-                    ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // 客户端委托时间
-                    ClientType: 4, // 终端类型
-                    LoginID: geLoginID_number()!, // 登陆账号
-                    AccountID: res.accountid, // 交易账号
-                    GoodsID: props.selectedRow.goodsid, // 商品ID
-                    MarketID: getMarketByTradeMode(TradeMode.DiaoQi)?.marketid, // 市场ID
-                    ValidType: 1, // 校验类型 当日有效
-                    OperateType: 1, // 操作类型: 申请
-                    OrderSrc: 1, // 单据来源: 客户端下单
-                    RelatedID: Long.fromString(props.selectedRow.orderid), // 操作员账号ID
-                    OrderPrice: getPrice(), // 委托价格
-                    OperatorID: Number(geLoginID_number()),
-                    // MarketMaxSub: number // 市价允许最大偏差(做市)
-                    OrderQty: formState.num, // 委托数量
-                    BuyOrSell: isBuy() ? BuyOrSell.sell : BuyOrSell.buy, // 买卖方向  0 买 1 卖
-                    BuildType: 1, // 下单类型  1 建 2 平
-                    // CurtQuotePrice: 0, // 保留,计算冻结金额使用
-                    // SpPrice: 0 ,// 止盈价格
-                    // SlPrice: 0 , // 止损价格
-                    PriceMode: res.priceType, // 取价方式
-                    TimevalidType: 1, // 时间有效类型 单日有效
-                    TriggerType: 1, // 预埋单触发类型
-                    // TriggerPrice: number // 预埋单触发价格
-                    ListingSelectType: 2, // 挂牌点选类型 1:挂牌 2:摘牌 3:先摘后挂
-                    DelistingType: 2, // 摘牌类型 2:点选成交
-                    // RelatedID: number // 关联单号
-                    OptionType: 1, // 期权类型(1:认购(看涨)2:认沽(看跌))
-                    // Premium: number // 权利金
-                    // TriggerOperator: number // 触发条件(1:大于等于2:小于等于)
-                    // ServiceTime: string // 服务端时间
-                    // CouponTypeID: number // 优惠券类型ID(买方)
-                    // UsedQty: number // 使用数量
-                    // ValidTime: string // 指定有效日期
-                    // ReceiveInfoID: number // 收货地址ID
-                };
-                // if (isFloat()) {
-                //     // 浮动价
-                //     param.MarketMaxSub = res.PriceMove; // 基差
-                //     param.OrderPrice = +getQuoteDayInfoByCodeFindPrice(goodscode)!;
-                // }
-                requestResultLoadingAndInfo(diaoQiOrder, param, loading, ['摘牌求购成功', '摘牌求购失败:']).then(() => {
-                    cancel(true);
-                });
-            });
-        }
-        return {
-            submit,
-            cancel,
-            visible,
-            accountList,
-            rules,
-            formState,
-            formRef,
-            isFloat,
-            getMoney,
-            getMargin,
-            canUseMoney,
-            isBuy,
-            useUserType,
-            isLimit,
-            ...useBlocksPrice(),
-            ...useBlocksNumber(),
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.post_buying {
-    width: 100%;
-    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;
-            }
-        }
-        .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;
-}
-.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;
-    }
-}
-.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;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.mt20 {
-    margin-top: 20px;
-}
-.mt-10 {
-    margin-top: -10px;
-}
-.ant-input-suffix {
-    position: absolute;
-    right: -25px;
-}
-.minusBtn,
-.plusBtn {
-    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;
-}
-.plusBtn {
-    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;
-}
-.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;
-    }
-}
-</style>

+ 0 - 13
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/interface.ts

@@ -1,13 +0,0 @@
-import { WrOrderQuote } from "@/services/go/wrtrade/interface";
-
-export interface FormParam {
-    accountid: undefined | number,
-    num: number,
-    priceType: 1 | 2,
-    price: number,
-}
-
-
-export interface TempWrOrderQuoteDetail extends WrOrderQuote {
-    wrResult: { dgfactoryitemtypeid: number; dgfactoryitemid: number }[]
-}

+ 0 - 58
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/setup.ts

@@ -1,58 +0,0 @@
-import { validateCommon } from "@/common/setup/validate";
-import { RuleObject } from "ant-design-vue/lib/form/interface";
-import { onBeforeUnmount, reactive, ref, UnwrapRef } from "vue";
-import { FormParam } from "./interface";
-
-
-const formState: UnwrapRef<FormParam> = reactive({
-    accountid: undefined,
-    num: 0,
-    priceType: 1,
-    price: 0,
-})
-
-function initForm() {
-    formState.num = 0
-}
-export function handleForm() {
-    const v_price = async (rule: RuleObject, value: number) => {
-        return validateCommon(value, '请输入限价');
-    };
-    const formRef = ref();
-    const rules = {
-        num: [{ required: true, message: '请输入挂牌数量', trigger: 'blur', type: 'number', min: 1 }],
-        price: [{ required: true, trigger: 'blur', type: 'number', validator: v_price }],
-    }
-    onBeforeUnmount(() => {
-        initForm()
-        formRef.value.resetFields()
-    })
-    return { rules, formState, formRef }
-}
-
-// 价格
-export const useBlocksPrice = () => {
-    const priceCheck = ref<boolean>(false); // 是否可议价
-    function increasePrice() {
-        formState.price++;
-    }
-    function decreasePrice() {
-        if (formState.price) {
-            formState.price--;
-        }
-    }
-    return { priceCheck, increasePrice, decreasePrice };
-};
-
-// 数量
-export const useBlocksNumber = () => {
-    function increaseNumber() {
-        formState.num++;
-    }
-    function decreaseNumber() {
-        if (formState.num) {
-            formState.num--;
-        }
-    }
-    return { increaseNumber, decreaseNumber };
-};

+ 0 - 129
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/detail/index.vue

@@ -1,129 +0,0 @@
-<template>
-  <!-- 买卖大厅详情 -->
-  <Drawer :title="'详情'"
-          :placement="'right'"
-          :visible="visible"
-          class="top top486"
-          @cancel="cancel">
-    <div class="detailCont">
-      <div class="rows">
-        <div class="row"
-             v-for="item in lstitem"
-             :key="item.name">
-          <div class="left">{{item.name}}</div>
-          <div class="right">{{item.value}}</div>
-        </div>
-      </div>
-      <div class="ruleTitle">履约规则:</div>
-      <div class="rulesCont">
-        <a-row>
-          <a-col :span="24"
-                 class="ruleCol">
-            <div class="line"
-                 v-for="item in lststep"
-                 :key="item.autoid">
-              <!-- <div class="no">{{index + 1}}</div> -->
-              <div class="name">{{item.steptypename}}</div>
-              <div class="time">{{item.stepdate}}</div>
-            </div>
-          </a-col>
-        </a-row>
-      </div>
-    </div>
-  </Drawer>
-</template>
-
-<script lang="ts">
-import { defineComponent, PropType, ref } from 'vue';
-import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrGoodsInfoReq, WrGoodsPerformanceStep, WrOrderQuote, WrTypeItem } from '@/services/go/wrtrade/interface';
-import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { queryWrGoodsInfo } from '@/services/go/wrtrade';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-
-export default defineComponent({
-    name: ModalEnum.spot_trade_warehouse_delisting,
-    components: { Drawer },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<WrOrderQuote>,
-            default: {},
-        },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-    },
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-        const lstitem = ref<WrTypeItem[]>();
-        const lststep = ref<WrGoodsPerformanceStep[]>();
-        function isSale(): boolean {
-            return props.enumName === EnumRouterName.warehouse_pre_sale_price || props.enumName === EnumRouterName.warehouse_pre_sale_floating_price;
-        }
-        const param: QueryWrGoodsInfoReq = {
-            haswr: isSale() ? 0 : 1,
-            wrfactortypeid: props.selectedRow.wrfactortypeid,
-            // tmplateid: props.selectedRow.performancetemplateid,
-        };
-        queryResultLoadingAndInfo(queryWrGoodsInfo, loading, param).then((res) => {
-            if (res.length) {
-                lstitem.value = res[0].lstitem;
-                lststep.value = res[0].lststep;
-            }
-        });
-
-        return {
-            lstitem,
-            lststep,
-            visible,
-            cancel,
-        };
-    },
-});
-</script>
-
-<style lang="less" scoped>
-.detailCont {
-    padding: 10px;
-    .rows {
-        .flex;
-        flex-direction: column;
-        width: 100%;
-        border: 1px solid @m-black6;
-        background: @m-black13;
-        .row {
-            display: inline-flex;
-            width: 100%;
-            height: 38px;
-            line-height: 38px;
-            border-bottom: 1px solid @m-black6;
-            > div {
-                text-align: center;
-                font-size: 16px;
-            }
-            .left {
-                width: 126px;
-                color: @m-grey1;
-                border-right: 1px solid @m-black6;
-            }
-            .right {
-                flex: 1;
-                color: @m-white11;
-            }
-        }
-    }
-    .ruleTitle {
-        width: 100%;
-        height: 30px;
-        line-height: 30px;
-        margin-top: 10px;
-        font-size: 16px;
-        color: @m-grey1;
-    }
-}
-</style>

+ 0 - 119
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/history-chart/index.vue

@@ -1,119 +0,0 @@
-<template>
-  <!-- 历史走势-->
-  <Drawer :title="'历史走势'"
-          :placement="'right'"
-          :visible="visible"
-          @cancel="cancel"
-          class="top500">
-    <div class="chart-main"
-         ref="chartRef"
-         id="history-chart"></div>
-  </Drawer>
-</template>
-
-<script lang="ts">
-import { defineComponent, PropType, ref, watchEffect } from 'vue';
-import { initData } from '@/common/methods';
-``;
-import * as echarts from 'echarts/core';
-import {
-    BarChart,
-    // 系列类型的定义后缀都为 SeriesOption
-    BarSeriesOption,
-    LineChart,
-    LineSeriesOption,
-} from 'echarts/charts';
-import {
-    TitleComponent,
-    // 组件类型的定义后缀都为 ComponentOption
-    TitleComponentOption,
-    GridComponent,
-    GridComponentOption,
-} from 'echarts/components';
-import { CanvasRenderer } from 'echarts/renderers';
-import { queryWrAverageTradePrice } from '@/services/go/wrtrade';
-import { TempWrOrderQuoteDetail } from '../post_buying/interface';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { WrAverageTradePriceQsq } from '@/services/go/wrtrade/interface';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { _closeModal } from '@/common/setup/modal/modal';
-import Drawer from '@/common/components/drawer/index.vue';
-
-// 通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型
-type ECOption = echarts.ComposeOption<BarSeriesOption | LineSeriesOption | TitleComponentOption | GridComponentOption>;
-
-// 注册必须的组件
-echarts.use([TitleComponent, GridComponent, LineChart, BarChart, CanvasRenderer]);
-export default defineComponent({
-    name: 'purchase-history',
-    emits: ['cancel', 'update'],
-    components: { Drawer },
-    props: {
-        selectedRow: {
-            type: Object as PropType<TempWrOrderQuoteDetail>,
-            default: {},
-        },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-    },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const option = {
-            xAxis: {
-                type: 'category',
-                data: [''],
-            },
-            yAxis: {
-                type: 'value',
-            },
-            series: [
-                {
-                    data: [1],
-                    type: 'line',
-                    smooth: true,
-                },
-            ],
-        };
-        const chartRef = ref();
-        const chartInstance = ref<echarts.ECharts>();
-        function queryHistoryData() {
-            const param: WrAverageTradePriceQsq = {
-                haswr: 1,
-                wrfactortypeid: props.selectedRow.wrfactortypeid,
-            };
-            queryWrAverageTradePrice(param).then((res) => {
-                option.xAxis.data.length = 0;
-                option.series[0].data.length = 0;
-                res.forEach((el) => {
-                    option.xAxis.data.push(el.tradedate);
-                    option.series[0].data.push(el.averageprice);
-                });
-                if (chartInstance.value) {
-                    chartInstance.value.setOption(option);
-                }
-            });
-        }
-
-        watchEffect(() => {
-            if (chartRef.value) {
-                chartInstance.value = echarts.init(chartRef.value as HTMLElement);
-                chartInstance.value.setOption(option);
-            }
-        });
-
-        initData(() => {
-            queryHistoryData();
-        });
-        return { option, visible, cancel, chartRef };
-    },
-});
-</script>
-
-<style lang="less">
-// .chart-main {
-//     height: 441px;
-//     width: 100%;
-// }
-</style>;

+ 0 - 504
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/index.vue

@@ -1,504 +0,0 @@
-<template>
-  <!-- 挂牌求购 -->
-  <Drawer :title="isBuy() ? '挂牌求购' : '挂牌卖出' "
-          :placement="'right'"
-          :visible="visible"
-          @cancel="cancel"
-          class="top">
-    <div class="title_right">
-      <span class="tline"></span>
-      <svg class="icon svg-icon"
-           aria-hidden="true">
-        <use xlink:href="#icon-B" />
-      </svg>
-      <span @click="changeDirection">{{isBuy() ? '卖出' : '求购'}}</span>
-    </div>
-    <div class="post_buying">
-      <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-select>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-item label="价格类型"
-                           name>
-                <a-radio-group class="commonRadioGroup"
-                               v-model:value="formState.priceType">
-                  <a-radio :value="2">固定价</a-radio>
-                  <!-- 掉期交易商有固定价和浮动价选择 -->
-                  <!-- 普通交易商只有固定价 -->
-                  <a-radio :value="3"
-                           v-if="!useUserType()">浮动价</a-radio>
-                </a-radio-group>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="!isFloat()">
-              <a-form-item label="挂牌价格"
-                           name="FixedPrice"
-                           class="inputIconBox">
-                <a-input-number class="commonInput"
-                                style="width: 260px"
-                                :min="0"
-                                v-model:value="formState.FixedPrice" />
-                <MinusOutlined @click="decreasePrice" />
-                <PlusOutlined @click="increasePrice" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-else>
-              <a-form-item label="基差"
-                           name="PriceMove">
-                <a-input-number class="commonInput"
-                                style="width: 260px"
-                                v-model:value="formState.PriceMove" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="isFloat()">
-              <a-form-item label="估算价"
-                           name="PriceMove">
-                <span class="white">{{getPrice()}}</span>
-              </a-form-item>
-            </a-col>
-
-            <a-col :span="24">
-              <a-form-item label="挂牌数量"
-                           name="OrderQty"
-                           class="inputIconBox">
-                <a-input-number class="commonInput"
-                                style="width: 260px"
-                                :min="0"
-                                :max="getMaxNum()"
-                                v-model:value="formState.OrderQty" />
-                <MinusOutlined @click="decreaseNum" />
-                <PlusOutlined @click="increaseNum" />
-                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   class="mt-10">
-              <a-form-item>
-                <a-slider :min="0"
-                          v-model:value="formState.OrderQty"
-                          :max="getMaxNum()"
-                          class="formSlider" />
-                <div class="unit">
-                  <span>{{getMaxNum() ? selectedRow.minivalue : 0}}</span>
-                  <span>{{getMaxNum()}}{{selectedRow.enumdicname}}</span>
-                </div>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   class="relative mt20">
-              <a-form-item :label="'挂牌金额'">
-                <span class="white ml8">{{getMoney()}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="getMargin()">
-              <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">{{canUseMoney()}}</span>
-              </a-form-item>
-            </a-col>
-          </a-row>
-        </div>
-        <a-row :gutter="24">
-          <a-col :span="24"
-                 class="fixedBtns">
-            <a-form-item class="btnCenter">
-              <a-button class="listedBtn"
-                        @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>
-</template>
-
-<script lang="ts">
-import { Des } from '@/common/components/commonDes';
-import Drawer from '@/common/components/drawer/index.vue';
-import { TradeMode } from '@/common/constants/enumCommon';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { useTaAccount } from '@/common/setup/account';
-import { validateAction } from '@/common/setup/form';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { queryTableList } from '@/common/setup/table';
-import { useListingTradeNumAndPrice } from '@/common/setup/trade';
-import { ListingTradeNumAndPrice } from '@/common/setup/trade/interface';
-import { useTodayMargin } from '@/hooks/margin';
-import { getSelectedAccountId } from '@/services/bus/account';
-import { getGoodsAgreeunitByGoodsCode, getGoodsByCode, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
-import { geLoginID_number } from '@/services/bus/login';
-import { getMarketByTradeMode, getMarketIdsByTradeMode } from '@/services/bus/market';
-import { queryTradePosition } from '@/services/go/ermcp/order';
-import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
-import { QueryTjmdTodayAccountMarginReq } from '@/services/go/Tjmd/interface';
-import { diaoQiOrder } from '@/services/socket/order';
-import { OrderReq } from '@/services/socket/order/interface';
-import { MinusOutlined, PlusOutlined, SwapOutlined } from '@ant-design/icons-vue';
-import moment from 'moment';
-import { v4 as uuidv4 } from 'uuid';
-import { defineComponent, PropType, ref } from 'vue';
-import { RefGoodsList } from '../../interface';
-import { useUserType } from '../setup';
-import { FormParam } from './interface';
-import { handleForm, isFloat, useBuySellDirection, useNum, usePrice } from './setup';
-
-export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: ModalEnum.spot_trade_warehouse_post_buying,
-    components: { Des, Drawer, PlusOutlined, MinusOutlined, SwapOutlined },
-    props: {
-        selectedRow: {
-            type: Object as PropType<RefGoodsList>,
-            default: {},
-        },
-    },
-    setup(props, context) {
-        // 查询 我的 持仓
-        const { tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
-        queryTable(queryTradePosition);
-
-        const marginParam: QueryTjmdTodayAccountMarginReq = {
-            accountid: getSelectedAccountId()!.toString(),
-            goodsid: props.selectedRow.goodsid,
-            marketids: getMarketIdsByTradeMode(TradeMode.DiaoQi),
-        };
-        // 获取保证金比例
-        const { getReckonMarginTypeAndValueByTradeMode } = useTodayMargin(marginParam);
-        // 控制弹窗
-        const { visible, cancel } = _closeModal(context);
-        // 表单
-        const { rules, formState, formRef } = handleForm();
-        const loading = ref<boolean>(false);
-        // 买卖方向
-        const { direction, changeDirection, isBuy } = useBuySellDirection();
-        // 资金账号
-        const { canUseMoney, accountList } = useTaAccount<FormParam>(formState);
-        // 金额 数量 保证金
-        const param: ListingTradeNumAndPrice<FormParam> = {
-            formState,
-            goodscode: props.selectedRow.goodscode,
-            isFloat,
-            canUseMoney,
-        };
-        const { getFloatPrice, getMoney } = useListingTradeNumAndPrice<FormParam>(param);
-        // 保证金
-        const getMargin = () => {
-            let result = '--';
-            const [marginType, marginValue] = getReckonMarginTypeAndValueByTradeMode(TradeMode.DiaoQi);
-            if (marginType) {
-                // 保证金方式 1:比率 2:固定
-                if (marginType === 1) {
-                    if (getMoney()) {
-                        // 履约保证金=挂牌金额*保证金比例
-                        result = (getMoney() * marginValue).toFixed(2);
-                    }
-                } else {
-                    if (formState.OrderQty) {
-                        // 履约保证金=挂牌数量*保证金固定值
-                        result = (formState.OrderQty * marginValue).toFixed(2);
-                    }
-                }
-            }
-            return result;
-        };
-        // 最大数量
-        const getMaxNum = () => {
-            let result = 0;
-            const goodscode = props.selectedRow.goodscode;
-            const [marginType, marginValue] = getReckonMarginTypeAndValueByTradeMode(TradeMode.DiaoQi);
-            // 可用资金
-            const temp = +canUseMoney();
-            const money = temp > 0 ? temp : 0;
-            const price = isFloat() ? getQuoteDayInfoByCodeFindPrice(goodscode) : formState.FixedPrice;
-            if (marginType && money && price && price !== '--') {
-                // 保证金方式 1:比率 2:固定
-                if (marginType === 1) {
-                    // 合约单位
-                    const agreeunit = getGoodsAgreeunitByGoodsCode(goodscode);
-                    // 最大可挂牌数量=可用/(价格*合约单位*保证金比例
-                    result = money / (+price * marginValue * agreeunit);
-                } else {
-                    // 最大可挂牌数量=可用/保证金固定值
-                    result = money / marginValue;
-                }
-            }
-            return +result.toFixed(0);
-        };
-        // 估算价
-        function getPrice() {
-            let result = '--';
-            const goodsPrice = getQuoteDayInfoByCodeFindPrice(props.selectedRow.goodscode);
-            if (goodsPrice && goodsPrice !== '--') {
-                // 有实时行情价格
-                result = ((goodsPrice as number) + formState.PriceMove).toFixed(2);
-            }
-            return result;
-        }
-        function submit() {
-            validateAction<FormParam>(formRef, formState).then((res) => {
-                const { goodscode, orderid } = props.selectedRow;
-                const param: OrderReq = {
-                    ClientSerialNo: uuidv4(), // 客户端流水号
-                    ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // 客户端委托时间
-                    ClientType: 4, // 终端类型
-                    LoginID: geLoginID_number()!, // 登陆账号
-                    AccountID: res.accountid, // 交易账号
-                    GoodsID: getGoodsByCode(goodscode)?.goodsid, // 商品ID
-                    MarketID: getMarketByTradeMode(TradeMode.DiaoQi)?.marketid, // 市场ID
-                    ValidType: 1, // 校验类型 当日有效
-                    OperateType: 1, // 操作类型: 申请
-                    OrderSrc: 1, // 单据来源: 客户端下单
-                    RelatedID: orderid, // 操作员账号ID
-                    OrderPrice: res.FixedPrice, // 委托价格
-                    OperatorID: Number(geLoginID_number()),
-                    // MarketMaxSub: number // 市价允许最大偏差(做市)
-                    OrderQty: res.OrderQty, // 委托数量
-                    BuyOrSell: direction.value, // 买卖方向  0 买 1 卖
-                    BuildType: 1, // 下单类型  1 建 2 平
-                    // CurtQuotePrice: 0, // 保留,计算冻结金额使用
-                    // SpPrice: 0 ,// 止盈价格
-                    // SlPrice: 0 , // 止损价格
-                    PriceMode: res.priceType, // 取价方式
-                    TimevalidType: 1, // 时间有效类型 单日有效
-                    TriggerType: 1, // 预埋单触发类型
-                    // TriggerPrice: number // 预埋单触发价格
-                    ListingSelectType: 1, // 挂牌点选类型 1:挂牌 2:摘牌 3:先摘后挂
-                    DelistingType: 2, // 摘牌类型 2:点选成交
-                    // RelatedID: number // 关联单号
-                    OptionType: 1, // 期权类型(1:认购(看涨)2:认沽(看跌))
-                    // Premium: number // 权利金
-                    // TriggerOperator: number // 触发条件(1:大于等于2:小于等于)
-                    // ServiceTime: string // 服务端时间
-                    // CouponTypeID: number // 优惠券类型ID(买方)
-                    // UsedQty: number // 使用数量
-                    // ValidTime: string // 指定有效日期
-                    // ReceiveInfoID: number // 收货地址ID
-                };
-                if (isFloat()) {
-                    // 浮动价
-                    param.MarketMaxSub = res.PriceMove; // 基差
-                    param.OrderPrice = +getQuoteDayInfoByCodeFindPrice(goodscode)!;
-                }
-                requestResultLoadingAndInfo(diaoQiOrder, param, loading, ['挂牌求购成功', '挂牌求购失败:']).then(() => {
-                    cancel(true);
-                });
-            });
-        }
-        return {
-            submit,
-            cancel,
-            visible,
-            rules,
-            formState,
-            formRef,
-            isFloat,
-            getMaxNum,
-            getMoney,
-            getMargin,
-            getFloatPrice,
-            direction,
-            changeDirection,
-            isBuy,
-            useUserType,
-            canUseMoney,
-            accountList,
-            ...usePrice(),
-            ...useNum(getMaxNum),
-            getPrice,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.post_buying {
-    width: 100%;
-    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;
-            }
-        }
-        .conditionBtn + .conditionBtn {
-            margin-left: 10px;
-        }
-    }
-}
-.title_right {
-    color: @m-blue25;
-    position: absolute;
-    top: 8px;
-    right: 19px;
-    cursor: pointer;
-    display: flex;
-    .tline {
-        width: 1px;
-        height: 18px;
-        background: @m-black47;
-        margin-top: 2px;
-        box-shadow: 1px 0px 0px 0px @m-black48;
-    }
-    .icon {
-        font-size: 16px;
-        height: 16px;
-        line-height: 16px;
-        margin: 3px 7px 3px 17px;
-        fill: @m-blue25;
-    }
-    span {
-        font-size: 14px;
-        font-family: Adobe Heiti Std;
-        font-weight: normal;
-    }
-}
-.unit {
-    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;
-    }
-}
-.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;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.mt20 {
-    margin-top: 20px;
-}
-.mt-10 {
-    margin-top: -10px;
-}
-.ant-input-suffix {
-    position: absolute;
-    right: -25px;
-}
-.minusBtn,
-.plusBtn {
-    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;
-}
-.plusBtn {
-    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;
-}
-.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;
-    }
-}
-</style>

+ 0 - 14
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/interface.ts

@@ -1,14 +0,0 @@
-import { WrOrderQuote } from "@/services/go/wrtrade/interface";
-
-export interface FormParam {
-    accountid: undefined | number,
-    FixedPrice: number,
-    priceType: 2 | 3,
-    OrderQty: number,
-    PriceMove: number,
-}
-
-
-export interface TempWrOrderQuoteDetail extends WrOrderQuote {
-    wrResult: { dgfactoryitemtypeid: number; dgfactoryitemid: number }[]
-}

+ 0 - 83
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/setup.ts

@@ -1,83 +0,0 @@
-import { BuyOrSell } from "@/common/constants/enumCommon";
-import { validateCommon } from "@/common/setup/validate";
-import { RuleObject } from "ant-design-vue/lib/form/interface";
-import { onBeforeUnmount, reactive, ref, UnwrapRef } from "vue";
-import { FormParam } from "./interface";
-
-
-const formState: UnwrapRef<FormParam> = reactive({
-    accountid: undefined,
-    FixedPrice: 0,
-    OrderQty: 0,
-    PriceMove: 0,
-    priceType: 2,
-})
-
-function initForm() {
-    formState.FixedPrice = 0
-    formState.OrderQty = 0
-    formState.PriceMove = 0
-    formState.priceType = 2
-}
-export function handleForm() {
-    const v_price = async (rule: RuleObject, value: number) => {
-        return validateCommon(value, '请输入挂牌价格');
-    };
-    const formRef = ref();
-    const rules = {
-        FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', validator: v_price }],
-        OrderQty: [{ required: true, message: '请输入挂牌数量', trigger: 'blur', type: 'number', min: 1 }],
-        PriceMove: [{ required: true, message: '请输入基差', trigger: 'blur', type: 'number' }],
-        accountid: [{ required: true, message: '请输入交易账号' }],
-    }
-    onBeforeUnmount(() => {
-        initForm()
-        formRef.value.resetFields()
-    })
-    return { rules, formState, formRef }
-}
-
-// 是否是浮动价
-export function isFloat() { return formState.priceType === 3 }
-
-
-// 挂牌买卖方向
-export function useBuySellDirection() {
-    const direction = ref<BuyOrSell>(BuyOrSell.buy)
-    function changeDirection() {
-        initForm()
-        direction.value = direction.value === BuyOrSell.buy ? BuyOrSell.sell : BuyOrSell.buy
-    }
-    function isBuy() {
-        return direction.value === BuyOrSell.buy
-    }
-    return { direction, changeDirection, isBuy }
-}
-
-// 价格
-export const usePrice = () => {
-    function increasePrice() {
-        formState.FixedPrice++;
-    }
-    function decreasePrice() {
-        if (formState.FixedPrice) {
-            formState.FixedPrice--;
-        }
-    }
-    return { increasePrice, decreasePrice };
-};
-
-export const useNum = (getMaxNum: Function) => {
-    function increaseNum() {
-        const max = getMaxNum()
-        if (max && formState.OrderQty < max) {
-            formState.OrderQty++;
-        }
-    }
-    function decreaseNum() {
-        if (formState.OrderQty) {
-            formState.OrderQty--;
-        }
-    }
-    return { increaseNum, decreaseNum };
-}

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

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

+ 0 - 43
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/setup.ts

@@ -1,43 +0,0 @@
-import { BtnListType } from "@/common/components/btnList/interface";
-import { UserType } from "@/common/constants/enumCommon";
-import { getAccountTypeList, getCanUseMoney } from "@/services/bus/account";
-import { getUserAccountType } from "@/services/bus/user";
-import { UnwrapRef } from "vue";
-
-// 获取按钮列表
-export function useBuyOrSellBtnList() {
-    const btnList: BtnListType[] = [
-        { lable: '摘牌', code: 'Listing', className: 'operBtn' },
-    ];
-    return btnList
-}
-
-// true: 普通交易商;false: 机构
-export const useUserType = () => {
-    return getUserAccountType() === UserType.investment
-}
-
-// 交易账号
-export function useBlocksAccount<T extends { accountid: number | undefined }>(formState: UnwrapRef<T>) {
-    // 资金账号
-    const accountList = getAccountTypeList([2]);
-    if (accountList.length) {
-        formState.accountid = accountList[0].accountid;
-    }
-    // 资金账号
-    function getSelectedAccount() {
-        return accountList.find((e) => e.accountid === formState.accountid);
-    }
-    // 可以资金
-    function canUseMoney() {
-        return getCanUseMoney(getSelectedAccount()!)
-    }
-    // 处理内部资金账号
-    function handleSelectedAccount() {
-        const item = getSelectedAccount()!;
-        const list = getAccountTypeList([2]);
-        return item.taaccounttype === 2 ? item : list[0];
-    }
-    return { handleSelectedAccount, canUseMoney, getSelectedAccount, accountList };
-}
-

+ 0 - 176
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/index.vue

@@ -1,176 +0,0 @@
-<template>
-  <!--订单交易 商品掉期-->
-  <div class="topTableHeight">
-    <div class="filterTable">
-      <div class="filter-custom-table">
-        <a-select class="conditionSelect" :style="{width: '180px', maxHeight: '400px', overflow: 'auto' }" @change="goodsChange" placeholder="全部标的合约">
-          <a-select-option v-for="item in getRefGoodsList()" :value="item" :key="item">{{item}}</a-select-option>
-        </a-select>
-        <!-- <a-button class="btnDeafault"
-                @click="search(true)"
-                style="width: 80px">筛选</a-button>-->
-      </div>
-    </div>
-    <a-table :columns="columns" :class="['srcollYTable', isBottom ? 'secondTabTable' : 'secondTabTableNoBottom', goodsList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 407px)' : 'calc(100vh - 167px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="goodscode" ref="tableRef" :data-source="goodsList">
-      <template #totalturnover="{ text }">
-        <span>{{changeUnit(text)}}</span>
-      </template>
-      <!-- 涨跌 -->
-      <template #change="{ record }">
-        <span>{{quoteChange(record, record.decimalplace)}}</span>
-      </template>
-      <!-- 幅度 -->
-      <template #amplitude="{ record }">
-        <span>{{quoteAmplitude(record, record.decimalplace)}}</span>
-      </template>
-      <!-- 振幅 -->
-      <template #vibration="{ record }">
-        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
-      </template>
-      <template #index="{ index }">
-        <span>{{index + 1}}</span>
-      </template>
-      <!-- 买价 -->
-      <template #bid="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 卖价 -->
-      <template #ask="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 最新价 -->
-      <template #last="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 最低价 -->
-      <template #lowest="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 最高价 -->
-      <template #highest="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-    </a-table>
-    <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="btnList"></contextMenu>
-    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-  </div>
-</template>
-
-<script lang="ts">
-import { contextMenu, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
-
-import { handleSubcriteOnDemandQuote, handleQuotePriceColor, quoteChange, quoteAmplitude, quoteAmplituOfVibration } from '@/common/setup/table/tableQuote';
-import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
-
-import { handleTableEventAndData } from '@/common/setup/table/compose';
-import { TableParam } from '@/common/setup/table/interface';
-import { BtnListType } from '@/common/components/btnList/interface';
-import { RefGoodsList } from './interface';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import { ref } from 'vue';
-import { useQueryData } from '@/common/setup/request';
-import { QueryQuoteGoodsListReq } from '@/services/go/Tjmd/interface';
-import { queryQuoteGoodsList } from '@/services/go/Tjmd';
-import { useSwapList, columnsList, getBtnList } from './setup';
-
-export default defineComponent({
-    name: 'spot_trade_order_transaction_swap',
-    components: {
-        contextMenu,
-        BuyAndSell: defineAsyncComponent(() => import('./components/buy-sell-market/index.vue')),
-        PostBuying: defineAsyncComponent(() => import('./components/post_buying/index.vue')),
-        Detail: defineAsyncComponent(() => import('./components/detail/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        const { loading, goodsList, getRefGoodsList, filterGoodsList } = useSwapList();
-
-        const param: TableParam = {
-            columnsList,
-            queryFn: () => {},
-            clickName: 'BuyAndSell',
-        };
-
-        // 行情按需订阅
-        let stopSubcribe = handleSubcriteOnDemandQuote<RefGoodsList>(goodsList);
-        // 过滤标的合约
-        function goodsChange(value: string) {
-            filterGoodsList(value);
-            // 停止上次订阅
-            stopSubcribe();
-            // 重新发起订阅
-            stopSubcribe = handleSubcriteOnDemandQuote<RefGoodsList>(goodsList);
-        }
-        return {
-            isBottom,
-            ...handleTableEventAndData<RefGoodsList>(param),
-            btnList: getBtnList(true),
-            handleQuotePriceColor,
-            quoteChange,
-            quoteAmplitude,
-            quoteAmplituOfVibration,
-            getRefGoodsList,
-            goodsList,
-            loading,
-            goodsChange,
-        };
-    },
-});
-</script>
-<style lang="less">
-.noData {
-    .position(absolute, 28px, 0, 0, 0);
-}
-.filter-custom-table {
-    display: inline-flex;
-    align-items: center;
-    padding: 7px 0;
-    .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;
-            }
-        }
-    }
-
-    .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>

+ 0 - 9
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/interface.ts

@@ -1,9 +0,0 @@
-import { QueryQuoteDayRsp } from "@/services/go/quote/interface";
-
-export interface RefGoodsList extends QueryQuoteDayRsp {
-    refgoodsname: string
-    goodsname: string
-    refgoodscode: string
-    orderid: number
-    goodsid: number
-}

+ 0 - 118
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/setup.ts

@@ -1,118 +0,0 @@
-import { BtnListType } from "@/common/components/btnList/interface"
-import { TradeMode } from "@/common/constants/enumCommon"
-import { initData } from "@/common/methods"
-import { queryTableList } from "@/common/setup/table"
-import { getQuoteDayInfoByCode } from "@/services/bus/goods"
-import { getMarketIdsByTradeMode } from "@/services/bus/market"
-import { getUserAccountType } from "@/services/bus/user"
-import { queryQuoteGoodsList } from "@/services/go/Tjmd"
-import { QueryQuoteGoodsListReq, QueryQuoteGoodsListRsp } from "@/services/go/Tjmd/interface"
-import { ref } from "vue"
-import { RefGoodsList } from './interface'
-
-const refGoods = ref<QueryQuoteGoodsListRsp[]>([])
-const allGoodsList = ref<RefGoodsList[]>([])
-
-export function findItemGoods(goodscode: string) {
-    return refGoods.value.find(el => el.goodscode === goodscode)!
-}
-// 获取 商品掉期 商品列表
-export const useSwapList = () => {
-    const { loading, queryTable } = queryTableList<QueryQuoteGoodsListRsp>();
-    // 行情商品
-    const goodsList = ref<RefGoodsList[]>([])
-    initData(() => {
-        // 组装 参数
-        const marketids = getMarketIdsByTradeMode(TradeMode.DiaoQi)
-        const param: QueryQuoteGoodsListReq = {
-            usertype: getUserAccountType(),
-        }
-        if (marketids) {
-            param.marketids = marketids
-        }
-        // 开始查询 商品掉期
-        queryTable(queryQuoteGoodsList, param).then(res => {
-            refGoods.value = res
-            goodsList.value.length = 0
-            allGoodsList.value.length = 0
-            res.forEach(el => {
-                // 找到盘面数据
-                const quote = getQuoteDayInfoByCode(el.refgoodscode);
-                if (quote) {
-                    const result: RefGoodsList = {
-                        ...quote,
-                        goodsname: el.goodsname,
-                        goodsid: el.goodsid,
-                        goodscode: el.goodscode,
-                        refgoodsname: el.refgoodsname,
-                        refgoodscode: el.refgoodscode
-                    }
-                    goodsList.value.push(result)
-                    allGoodsList.value.push(result)
-                }
-            })
-            console.log('商品掉期', res)
-        })
-    })
-    // 获取标记商品列表
-    function getRefGoodsList(): string[] {
-        const result = new Set<string>(['全部标的合约'])
-        refGoods.value.forEach(el => {
-            result.add(el.refgoodsname)
-        })
-        return [...result]
-    }
-    // 过滤标的合约
-    function filterGoodsList(value: string) {
-        if (value === '全部标的合约') {
-            goodsList.value = allGoodsList.value
-        } else {
-            goodsList.value = allGoodsList.value.filter(goods => goods.refgoodsname === value)
-        }
-    }
-
-    return { loading, goodsList, getRefGoodsList, filterGoodsList }
-}
-
-export const columnsList = [
-    { title: '序号', key: 'index', width: 80 },
-    { title: '代码', key: 'goodscode' },
-    { title: '名称', key: 'goodsname' },
-
-    { title: '标的合约', key: 'refgoodsname' },
-
-    // { title: '买价', key: 'bid' },
-    // { title: '买量', key: 'bidvolume' },
-    // { title: '卖价', key: 'ask' },
-    // { title: '卖量', key: 'askvolume' },
-
-    { title: '当前价', key: 'last' },
-    { title: '涨跌', key: 'change' }, // 最新价 - 昨结价
-    { title: '幅度', key: 'amplitude' }, // (最新价 - 昨结价) / 100 %
-    { title: '开盘', key: 'opened' },
-    { title: '最高', key: 'highest' },
-    { title: '最低', key: 'lowest' },
-
-    { title: '结算', key: 'settle' },
-
-    { title: '昨结算', key: 'presettle' },
-
-    // { title: '振幅', key: 'vibration' }, // (最高价 - 最低价 ) / 最新价  * 100 %
-    // { title: '总量', key: 'totalvolume' },
-    // { title: '现量', key: 'lastvolume' },
-    // { title: '持仓量', key: 'holdvolume' },
-    // { title: '日增', key: 'holdincrement' },
-    // { title: '金额', key: 'totalturnover' },
-];
-
-// 获取按钮列表
-export function getBtnList(isBuyAndSell: boolean) {
-    const btnList: BtnListType[] = [
-        { lable: '挂牌求购', code: 'PostBuying', className: 'operBtn' },
-        { lable: '详情', code: 'Detail', className: 'btnDeafault' },
-    ];
-    if (isBuyAndSell) {
-        btnList.push({ lable: '买卖大厅', code: 'BuyAndSell', className: 'btnDeafault' })
-    }
-    return btnList
-}

+ 0 - 199
src/views/market/spot_trade/spot_trade_reference_market/index.vue

@@ -1,199 +0,0 @@
-<template>
-    <!--参考行情-->
-    <div class="topTableHeight topTableHeight_379">
-        <a-table
-            :columns="columns"
-            :class="['srcollYTable', isBottom ? '' : 'srcollYTableNoBottom', goodsList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-            :scroll="{ x: '100%', y: isBottom ? 'calc(100vh - 378px)' : 'calc(100vh - 138px)' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="goodscode"
-            ref="tableRef"
-            :data-source="goodsList"
-        >
-            <template #totalturnover="{ text }">
-                <span>{{ changeUnit(text) }}</span>
-            </template>
-            <!-- 买量 -->
-            <template #bidvolume="{ text }">
-                <span>{{ handleNoneValue(text) }}</span>
-            </template>
-            <!-- 卖量 -->
-            <template #askvolume="{ text }">
-                <span>{{ handleNoneValue(text) }}</span>
-            </template>
-            <!-- 开盘价 -->
-            <template #opened="{ record, text }">
-                <span
-                    :class="handleQuotePriceColor(text, record.presettle)"
-                >{{ handleNoneValue(text) }}</span>
-            </template>
-            <!-- 涨跌 -->
-            <template #change="{ record }">
-                <span
-                    :class="handleQuotePriceColor(record.last, record.presettle)"
-                >{{ quoteChange(record, record.decimalplace) }}</span>
-            </template>
-            <!-- 幅度 -->
-            <template #amplitude="{ record }">
-                <span
-                    :class="handleQuotePriceColor(record.last, record.presettle)"
-                >{{ quoteAmplitude(record, record.decimalplace) }}</span>
-            </template>
-            <!-- 振幅 -->
-            <template #vibration="{ record, text }">
-                <span
-                    :class="handleQuotePriceColor(text, record.presettle)"
-                >{{ quoteAmplituOfVibration(record, record.decimalplace) }}</span>
-            </template>
-            <template #index="{ index }">
-                <span>{{ index + 1 }}</span>
-            </template>
-            <!-- 买价 -->
-            <template #bid="{ text, record }">
-                <span
-                    :class="handleQuotePriceColor(text, record.presettle)"
-                >{{ handleNoneValue(text) }}</span>
-            </template>
-            <!-- 卖价 -->
-            <template #ask="{ text, record }">
-                <span
-                    :class="handleQuotePriceColor(text, record.presettle)"
-                >{{ handleNoneValue(text) }}</span>
-            </template>
-            <!-- 最新价 -->
-            <template #last="{ text, record }">
-                <span
-                    :class="handleQuotePriceColor(text, record.presettle)"
-                >{{ handleNoneValue(text) }}</span>
-            </template>
-            <!-- 最低价 -->
-            <template #lowest="{ text, record }">
-                <span
-                    :class="handleQuotePriceColor(text, record.presettle)"
-                >{{ handleNoneValue(text) }}</span>
-            </template>
-            <!-- 最高价 -->
-            <template #highest="{ text, record }">
-                <span
-                    :class="handleQuotePriceColor(text, record.presettle)"
-                >{{ handleNoneValue(text) }}</span>
-            </template>
-            <!-- 昨结价 -->
-            <template #preclose="{ text, record }">
-                <span
-                    :class="handleQuotePriceColor(text, record.presettle)"
-                >{{ handleNoneValue(text) }}</span>
-            </template>
-        </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">
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import { TradeMode } from '@/common/constants/enumCommon';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { ComposeTableParam, contextMenu, defineAsyncComponent, defineComponent, queryTableList } from '@/common/export/commonTable';
-import { handleTableColums } from '@/common/setup/table/clolumn';
-import { handleNoneValue, handleQuotePriceColor, handleSubcriteOnDemandQuote, quoteAmplitude, quoteAmplituOfVibration, quoteChange } from '@/common/setup/table/tableQuote';
-import { getQutoGoodsByTradeMode } from '@/services/bus/goods';
-import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
-import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { queryOrderQuote } from '@/services/go/wrtrade';
-import { QueryOrderQuoteReq } from '@/services/go/wrtrade/interface';
-import { changeUnit } from '@/utils/qt/common';
-import { handleComposeTable } from '@/views/market/spot_trade/setup';
-import { ref } from 'vue';
-
-const columnsList = [
-    { title: '序号', key: 'index', width: 80 },
-    { title: '代码', key: 'goodscode' },
-    { title: '名称', key: 'goodsname' },
-    { title: '买价', key: 'bid' },
-    { title: '买量', key: 'bidvolume' },
-    { title: '卖价', key: 'ask' },
-    { title: '卖量', key: 'askvolume' },
-    { title: '最新价', key: 'last' },
-    { title: '涨跌', key: 'change' }, // 最新价 - 昨结价
-    { title: '幅度', key: 'amplitude' }, // (最新价 - 昨结价) / 100 %
-    { title: '开盘价', key: 'opened' },
-    { title: '昨收价', key: 'preclose' },
-    { title: '昨结价', key: 'presettle' },
-    { title: '最低价', key: 'lowest' },
-    { title: '最高价', key: 'highest' },
-    { title: '振幅', key: 'vibration' }, // (最高价 - 最低价 ) / 最新价  * 100 %
-    { title: '总量', key: 'totalvolume' },
-    { title: '现量', key: 'lastvolume' },
-    { title: '持仓量', key: 'holdvolume' },
-    // { title: '日增', key: 'holdincrement' },
-    // { title: '金额', key: 'totalturnover' },
-];
-
-export default defineComponent({
-    name: EnumRouterName.spot_trade_reference_market,
-    components: {
-        contextMenu,
-        // [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-        // [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-        buyAndSell: defineAsyncComponent(() => import('../components/goods-chart/index.vue')),
-        // postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        // 表头
-        const { columns } = handleTableColums(columnsList);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryDeliveryRelationRsp>();
-        const tableRef = ref<any>(null);
-        // 行情商品
-        const goodsList = getQutoGoodsByTradeMode(TradeMode.quote99);
-        // 行情按需订阅
-        handleSubcriteOnDemandQuote<QueryQuoteDayRsp>(goodsList);
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 1,
-                haswr: 1,
-            };
-            queryTable(queryOrderQuote, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_receipt_trade_price,
-            tableName: 'table_pcweb_spot_trade_warehouse_price',
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        return {
-            isBottom,
-            ...handleComposeTable<QueryDeliveryRelationRsp>(param),
-            loading,
-            tableList,
-            goodsList,
-            tableRef,
-            columns,
-            changeUnit,
-            handleQuotePriceColor,
-            quoteChange,
-            quoteAmplitude,
-            quoteAmplituOfVibration,
-            handleNoneValue,
-        };
-    },
-});
-
-</script>
-<style lang="less">
-</style>

+ 0 - 28
src/views/market/spot_trade/warehouse_pre_sale/index.vue

@@ -1,28 +0,0 @@
-<template>
-  <!-- 仓单预售 -->
-  <div class="topTableHeight40">
-    <router-view></router-view>
-    <ThridMenu :list="tabList"
-               :selectedKey="index"
-               @selectMenu="changeTab" />
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent } from 'vue';
-import ThridMenu from '@/common/components/thirdMenu/index.vue';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { handleMartketThirdRouter } from '@/common/setup/matket/router';
-
-export default defineComponent({
-    name: EnumRouterName.warehouse_pre_sale,
-    components: {
-        ThridMenu,
-    },
-    setup() {
-        return { ...handleMartketThirdRouter(EnumRouterName.warehouse_pre_sale) };
-    },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 121
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/buy/index.vue

@@ -1,121 +0,0 @@
-<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="(record,index)=>index" :data-source="tableList">
-      <template #index="{ index }">
-        <span>{{ index + 1 }}</span>
-      </template>
-      <template #marginvalue="{ text }">
-        <span>{{ (text * 100).toFixed(2) + '%'}}</span>
-      </template>
-      <!-- 议价 -->
-      <template #canbargain="{ text }">
-        <span>{{ text ? '是' : '否' }}</span>
-      </template>
-      <!-- 整单 -->
-      <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
-      </template>
-      <!-- 挂牌有效期 -->
-      <template #validtime="{ text }">
-        <span>{{ formatTime(text, 'd') }}</span>
-      </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>
-  </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
-import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqReq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
-import { queryOrderQuote, queryQueryOrderQuoteMyq } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/common/setup/table/compose';
-import Filter from '../../components/filter/index.vue';
-import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import { handleColumns, filterBtn } from '../../setup';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-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);
-
-    // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
-    // 获取列表数据
-    const queryTableAction = () => {
-      const param: QueryOrderQuoteMyqReq = {
-        buyorsell: BuyOrSell.buy,
-        haswr: 0,
-      };
-      queryTable(queryQueryOrderQuoteMyq, param);
-    };
-    // 表格通用逻辑
-    const param: ComposeTableParam = {
-      queryFn: queryTableAction,
-      menuType: EnumRouterName.warehouse_receipt_trade_blocs,
-      tableFilterKey: [],
-      isDetail: false,
-    };
-    const {
-      contextMenu,
-      openContext,
-      closeContext, // 右键
-      expandedRowKeys,
-      selectedRow,
-      Rowclick, // 表格折腾面板数据与单击、双击事件
-      componentId,
-      closeComponent,
-      openComponent, // 控制异步组件
-      firstBtn,
-      secondBtn, // 表格按钮
-    } = handleComposeTable<QueryOrderQuoteMyqQsp>(param);
-    function search(value: Object) {
-      // const param: QueryOrderQuoteReq = {
-      //     wrpricetype: 2,
-      //     haswr: 1,
-      // };
-      // Object.assign(param, value);
-      // queryTable(queryOrderQuote, param);
-    }
-    // 单据挂牌成功 刷新数据
-    Bus.$on('spotTrade', queryTableAction);
-    return {
-      isBottom,
-      contextMenu,
-      openContext,
-      closeContext, // 右键
-      columns,
-      expandedRowKeys,
-      selectedRow,
-      Rowclick, // 表格折腾面板数据与单击、双击事件
-      componentId,
-      closeComponent, // 控制异步组件
-      firstBtn, // 表格按钮
-      loading,
-      tableList,
-      search,
-      formatTime,
-      filterBtn,
-      BuyOrSell,
-    };
-  },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 463
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/index.vue

@@ -1,463 +0,0 @@
-<template>
-    <!--仓单贸易 贸易圈挂牌 摘牌-->
-    <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">
-                <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-select>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="挂牌方">
-                                <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>
-                            </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-form-item>
-                    </a-col>
-                    <a-col :span="24" v-else>
-                        <a-form-item label="摘牌价格">
-                            <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-select>
-                        </a-form-item>
-                    </a-col>
-
-                    <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>
-                        </a-col>
-                    </a-row>
-                    <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" />
-                                <div class="unit">
-                                    <span>0</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-form-item label="摘牌数量">
-                            <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-form-item label="摘牌金额">
-                                <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>
-                            </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>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </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">{{ isBuy() ? '卖出' : '买入' }}</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 { Des } from '@/common/components/commonDes';
-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 { DGFactoryItems, HdWRDealOrderReq, WrBargainApplyReq, WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
-import { getAccountTypeList, getSelectedAccountId } from '@/services/bus/account';
-import { getUserId } from '@/services/bus/user';
-import { v4 as uuidv4 } from 'uuid';
-import moment, { Moment } from 'moment';
-import { getMarketRunByTradeMode, marketIsRun } from '@/services/bus/market';
-import { QueryOrderQuoteMyqQsp, WrOrderQuote } from '@/services/go/wrtrade/interface';
-
-import { validateAction } from '@/common/setup/form';
-
-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 { handleForm, handleSpotWarrant } from './setup';
-import { getRules } from '@/services/bus/rules';
-import { ListingForm } from './interface';
-import { HdWRDealOrder, wrBargainApply } from '@/services/proto/warehousetrade';
-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: '',
-        },
-    },
-    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 isBargin() {
-            return props.componentId === 'warehouse_receipt_trade_blocs_bargain_delisting';
-        }
-        if (isBargin()) {
-            formState.price = props.selectedRow.fixedprice;
-        }
-
-        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;
-                        }
-                    } else {
-                        param.BuyOrSell = BuyOrSell.buy;
-                    }
-
-                    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,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.post_buying {
-    width: 100%;
-    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;
-            }
-        }
-        .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;
-}
-.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;
-    }
-}
-.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;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.mt20 {
-    margin-top: 20px;
-}
-.mt-10 {
-    margin-top: -10px;
-}
-.ant-input-suffix {
-    position: absolute;
-    right: -25px;
-}
-.minusBtn,
-.plusBtn {
-    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;
-}
-.plusBtn {
-    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;
-}
-.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;
-    }
-}
-</style>

+ 0 - 12
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/interface.ts

@@ -1,12 +0,0 @@
-export interface ListingForm {
-    accountid: undefined | number,
-    price: number,
-    num: number,
-    LadingBillId: string,
-    case: string,
-    caseId: number,
-}
-export interface Wrhold {
-    id: string,
-    name: string,
-}

+ 0 - 54
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/setup.ts

@@ -1,54 +0,0 @@
-import { BuyOrSell } from "@/common/constants/enumCommon";
-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 { RuleObject } from "ant-design-vue/lib/form/interface";
-import { reactive, Ref, ref, UnwrapRef } from "vue";
-import { ListingForm } from "./interface";
-
-export function handleForm() {
-    const formRef = ref();
-    const formState: UnwrapRef<ListingForm> = reactive({
-        accountid: undefined,
-        price: 0,
-        num: 0,
-        LadingBillId: '',
-        case: '',
-        caseId: 0
-    })
-    const v_ContractType = async (rule: RuleObject, value: number) => {
-        return validateCommon(value, '请输入摘牌数量');
-    };
-    const rules = {
-        accountid: [{ required: true, message: '请选择交易账户' }],
-        LadingBillId: [{ required: true, message: '请选择现货仓单' }],
-        caseId: [{ required: true, message: '请选择融资方案' }],
-        num: [{ required: true, message: '请输入摘牌数量', trigger: 'blur', type: 'number', },
-        { required: true, validator: v_ContractType }],
-
-    }
-    return { rules, formState, formRef }
-}
-
-
-export function handleSpotWarrant(buyOrSell: BuyOrSell, selectedRow: QueryOrderQuoteMyqQsp, loading: Ref<boolean>) {
-    const wrHoldList = ref<Wrhold[]>([])
-    const allWrHoldList = ref<WrHoldLB[]>([])
-    if (buyOrSell === BuyOrSell.buy) {
-        queryResultLoadingAndInfo(queryHoldLB, loading).then(res => {
-            allWrHoldList.value = res
-            wrHoldList.value.length = 0
-            res.forEach(e => {
-                if (e.wrfactortypeid === String(selectedRow.wrfactortypeid)) {
-                    const { wrholdeno, enableqty, ladingbillid, enumdicname, subnum } = e
-                    const result = { id: ladingbillid, name: `${wrholdeno}(${enableqty}${enumdicname})`, subnum }
-                    wrHoldList.value.push(result)
-                }
-            })
-        })
-    }
-
-    return { wrHoldList, allWrHoldList }
-}

+ 0 - 354
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/post-buying/index.vue

@@ -1,354 +0,0 @@
-<template>
-    <!--仓单贸易 贸易圈挂牌 挂牌求购 -->
-    <Drawer :title="'挂牌求购'" :placement="'right'" :visible="visible" @cancel="cancel" class="top486">
-        <div class="post_buying">
-            <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-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌价格" name="FixedPrice" class="inputIconBox">
-                                <a-input-number class="commonInput" style="width: 260px" :min="0" v-model:value="formState.FixedPrice" />
-                                <MinusOutlined @click="decreasePrice" />
-                                <PlusOutlined @click="increasePrice" />
-                                <a-checkbox class="commonCheckbox" v-model:checked="priceCheck">可议价</a-checkbox>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌数量" name="OrderQty" class="inputIconBox">
-                                <a-input-number class="commonInput" style="width: 260px" :min="0" v-model:value="formState.OrderQty" />
-                                <MinusOutlined @click="decreaseNumber" />
-                                <PlusOutlined @click="increaseNumber" />
-                                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                                <a-checkbox v-model:checked="numCheck" class="commonCheckbox">整单</a-checkbox>
-                            </a-form-item>
-                        </a-col>
-
-                        <a-col :span="24" v-if="!numCheck">
-                            <a-form-item label="起摘数量" name="delistingQty">
-                                <a-input-number class="commonInput" v-model:value="formState.delistingQty" :min="0" style="width: 260px !important" />
-                                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="履约保证金" name="margin">
-                                <a-input-number class="commonInput" v-model:value="formState.margin" :min="0" style="width: 260px" />
-                                <span class="input-enumdicname">%</span>
-                            </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" v-model:value="formState.vidaliteTime" :allowClear="false" class="commonDatePicker dialogDatePicker" />
-                            </a-form-item>
-                        </a-col>
-
-                        <a-col :span="24">
-                            <a-form-item label="履约方式" class="inputIconBox">
-                                <span :class="['clickBox', formState.permanceTempName ? 'white' : '']" @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="24">
-                            <a-form-item label="指定朋友" class="inputIconBox">
-                                <span :class="['clickBox', getFriendLength() ? 'white' : '']" @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-col :span="24">
-                            <a-form-item label="挂牌金额">
-                                <span class="white ml8">{{ getMoney() }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <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(getSelectedAccount()) }}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </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-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
-        </div>
-    </Drawer>
-    <!-- 选择朋友 -->
-    <Friend v-if="showFriend" :friends="formState.friends" @cancel="chooseFriend" @update="chooseFriend" />
-    <!-- 选择履约模板 -->
-    <Permance v-if="showPermance" @cancel="choosePermance" @update="choosePermance" />
-</template>
-
-<script lang="ts">
-import { defineComponent, PropType, ref, UnwrapRef } from 'vue';
-import { Des } from '@/common/components/commonDes';
-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 { getUserId } from '@/services/bus/user';
-import { v3, v4 as uuidv4 } from 'uuid';
-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 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 { TradeMode } from '@/common/constants/enumCommon';
-
-export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: ModalEnum.spot_trade_warehouse_post_buying,
-    components: { Des, Drawer, PlusOutlined, MinusOutlined, Friend, Permance },
-    props: {
-        selectedRow: {
-            type: Object as PropType<TempWrOrderQuoteDetail>,
-            default: {},
-        },
-    },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        // 表单
-        const { rules, formState, formRef } = handleForm();
-        // 交收月
-        const momth = props.selectedRow.deliverymonth;
-        if (momth) {
-            formState.DeliveryMonth = moment(momth);
-        }
-        // 选择朋友
-        const { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends } = useBlocksFriends(formState);
-        // 履约模板
-        const { showPermance, choosePermance, openPermance } = useBlocksPermaceTemp(formState);
-        // 价格
-        const { priceCheck, increasePrice, decreasePrice } = useBlocksPrice(formState);
-        const loading = ref<boolean>(false);
-        // 摘牌数量
-        const { numCheck, increaseNumber, decreaseNumber } = useBlocksNumber(formState);
-        function submit() {
-            // 判断是否开市
-            if (!marketIsRun(TradeMode.WarehouseReceiptTrade)) {
-                return;
-            }
-            const marketInfo = getMarketRunByTradeMode(TradeMode.WarehouseReceiptTrade);
-            if (marketInfo) {
-                validateAction<BlocsListingForm>(formRef, formState).then((res) => {
-                    if (!formState.permanceTempName) {
-                        message.error('请选择履约模板');
-                        return;
-                    }
-                    if (!friendCheck.value) {
-                        if (formState.friends.length === 0) {
-                            message.error('请选择朋友');
-                            return;
-                        }
-                    }
-                    const param = {
-                        AccountID: res.accountid, // 默认内部资金账号第一个
-                        ClientSerialNo: uuidv4(), // 客户端流水号
-                        // OperateSrc: 2,
-                        ClientType: 4,
-                        // MarketID: marketInfo.marketid,
-                        LadingBillId: 0, // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-                        // LadingBillId: 'uint642081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-                        TradeDate: moment(marketInfo.tradedate).format('YYYYMMDD'), // 交易日 string
-                        // SubNum: '0', // 提单子单号
-                        SubNum: 0,
-                        // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        WRFactorTypeId: props.selectedRow.wrfactortypeid ? props.selectedRow.wrfactortypeid : 0, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        IsSpecified: 1, // 是否指定对手 0:不指定 1:指定 uint32
-                        MatchAccIDs: res.friends, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
-                        OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
-                        DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID  // 有仓单求购
-                        WRPriceType: 1, // 价格方式 1:固定价 2:浮动价
-                        FixedPrice: res.FixedPrice, // 固定价格
-                        PriceFactor: 1, // 价格系数(浮动价时填写)
-                        PriceMove: 0, // 升贴水(浮动价时填写)
-                        TimevalidType: 3, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
-                        ValidTime: moment(formState.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: 0, // 买卖方向 0买1卖
-                        PriceDisplayMode: 1, // 浮动价显示方式 1:合并显示 2:分开显示
-                        CanBargain: priceCheck.value ? 1 : 0, // 挂牌是否可议价0:不可1:可-摘牌是否议价
-                        Attachment1: '', // 附件1
-                        Attachment2: '', // 附件2
-                        Remark: '', // 备注
-                        ApplyID: 0, // 申请ID
-                        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, // 起摘数量
-                        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) => {
-                                      return {
-                                          DGFactoryItemTypeID: it.dgfactoryitemtypeid, // uint64 要素项类型ID
-                                          DGFactoryItemID: it.dgfactoryitemid, // uint64 预约要素项类型值
-                                          ItemTypeMode: 1, // uint32 要素项类型模式
-                                      };
-                                  })
-                                : [], // DGFactoryItems 要素类型明细集合(没有仓单要素ID填写)
-                    };
-                    requestResultLoadingAndInfo(hdWROrder, param, loading, ['求购成功', '求购失败:']).then(() => {
-                        cancel(true);
-                    });
-                });
-            }
-        }
-        return {
-            submit,
-            cancel,
-            visible,
-            rules,
-            formState,
-            formRef,
-            getCanUseMoney,
-            ...useBlocksAccount(formState),
-            ...useBlocksMoney(formState),
-            priceCheck,
-            increasePrice,
-            decreasePrice,
-            showPermance,
-            choosePermance,
-            openPermance,
-            numCheck,
-            increaseNumber,
-            decreaseNumber,
-            friendCheck,
-            showFriend,
-            chooseFriend,
-            openFriend,
-            getFriendLength,
-            limiteFriends,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.post_buying {
-    width: 100%;
-    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;
-            }
-        }
-        .conditionBtn + .conditionBtn {
-            margin-left: 10px;
-        }
-    }
-}
-
-.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;
-    }
-}
-.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;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.ant-input-suffix {
-    position: absolute;
-    right: -25px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item .ant-form-item-label {
-    width: 80px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item .ant-form-item-control-wrapper {
-    width: calc(100% - 80px);
-}
-.ant-form.dialogForm {
-    .ant-row.btnCenter.ant-form-item {
-        width: 100%;
-        .ant-col.ant-form-item-control-wrapper {
-            width: 100%;
-        }
-    }
-}
-</style>

+ 0 - 121
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/sell/index.vue

@@ -1,121 +0,0 @@
-<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="(record,index)=>index" :data-source="tableList">
-      <template #index="{ index }">
-        <span>{{ index + 1 }}</span>
-      </template>
-      <template #marginvalue="{ text }">
-        <span>{{ (text * 100).toFixed(2) + '%'}}</span>
-      </template>
-      <!-- 议价 -->
-      <template #canbargain="{ text }">
-        <span>{{ text ? '是' : '否' }}</span>
-      </template>
-      <!-- 整单 -->
-      <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
-      </template>
-      <!-- 挂牌有效期 -->
-      <template #validtime="{ text }">
-        <span>{{ formatTime(text, 'd') }}</span>
-      </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>
-  </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
-import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqReq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
-import { queryOrderQuote, queryQueryOrderQuoteMyq } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/common/setup/table/compose';
-import Filter from '../../components/filter/index.vue';
-import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import { handleColumns, filterBtn } from '../../setup';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-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);
-
-    // 表格列表数据
-    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">
-</style>

+ 0 - 63
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/index.vue

@@ -1,63 +0,0 @@
-<template>
-  <!-- 仓单贸易 贸易圈挂牌-->
-  <div class="topTableHeight">
-    <Filter :enumName="name"
-            @search="search"
-            @buy="buyOpen" />
-    <div>
-      <Sell />
-      <Buy />
-    </div>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
-  </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { defineComponent, defineAsyncComponent, ModalEnum } from '@/common/export/commonTable';
-import Filter from '../../components/filter/index.vue';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import Buy from './components/buy/index.vue';
-import Sell from './components/sell/index.vue';
-import { handleModalComponent } from '@/common/setup/asyncComponent';
-import { ref } from 'vue';
-import Bus from '@/utils/eventBus';
-
-export default defineComponent({
-    name: EnumRouterName.warehouse_pre_sale_blocs,
-    components: {
-        Filter,
-        Buy,
-        Sell,
-        postBuying: defineAsyncComponent(() => import('./components/post-buying/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        const selectedRow = ref();
-        function queryFn() {
-            Bus.$emit('spotTrade', true);
-        }
-        // 控制异步组件
-        const { componentId, closeComponent } = handleModalComponent(queryFn, selectedRow);
-        function search() {}
-        function buyOpen(value: any) {
-            componentId.value = 'postBuying';
-            selectedRow.value = value;
-        }
-        return {
-            isBottom,
-            search,
-            buyOpen,
-            componentId,
-            closeComponent,
-            selectedRow,
-            name: EnumRouterName.warehouse_pre_sale_blocs,
-        };
-    },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 40
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/setup.ts

@@ -1,40 +0,0 @@
-import { BtnListType } from '@/common/components/btnList/interface';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { QueryOrderQuoteMyqQsp } from '@/services/go/wrtrade/interface';
-
-
-export function handleColumns() {
-    const columns = [
-        { title: '品种', key: 'deliverygoodsname', align: 'center', width: 140 },
-        { title: '商品', key: 'wrtypename', align: 'center', width: 400 },
-        { title: '仓库', key: 'warehousename', align: 'center', width: 200 },
-        { title: '价格', key: 'fixedprice', align: 'center', width: 120 },
-        { title: '议价', key: 'canbargain', align: 'center', width: 80 },
-        { title: '数量', key: 'orderqty', align: 'center' },
-        { 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: 140 },
-        { title: '挂牌方', key: 'username', align: 'center', width: 100 },
-    ];
-    function getBuyOrSellColumns(type: BuyOrSell) {
-        const title = type === BuyOrSell.buy ? '买' : '卖'
-        const result = [
-            { title, dataIndex: 'index', key: 'index', width: 80, align: 'center' },
-            ...columns
-        ]
-        return result.map(el => {
-            const slots = { customRender: el.key };
-            return { ...el, slots, dataIndex: el.key };
-        })
-    }
-    return { getBuyOrSellColumns }
-}
-
-export function filterBtn(btnList: BtnListType[], selectedRow: QueryOrderQuoteMyqQsp) {
-    let result = btnList.filter(e => e.code !== 'warehouse_receipt_trade_blocs_post_buying')
-    if (selectedRow) {
-        result = selectedRow.canbargain ? result : result.filter(e => e.code !== 'warehouse_receipt_trade_blocs_bargain_delisting')
-    }
-    return result
-}

+ 0 - 107
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_floating_price/index.vue

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

+ 0 - 103
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_price/index.vue

@@ -1,103 +0,0 @@
-<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="(record,index)=>index" :data-source="tableList"></a-table>
-    <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
-    <component :is="componentId" v-if="componentId" :enumName="name" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-  </div>
-</template>
-
-<script lang="ts">
-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 Filter from '../../components/filter/index.vue';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import Bus from '@/utils/eventBus/index';
-
-export default defineComponent({
-  name: EnumRouterName.warehouse_pre_sale_price,
-  components: {
-    contextMenu,
-    Filter,
-    [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-    [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-    buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
-    postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-  },
-  setup() {
-    const isBottom = getShowBottomValue();
-    // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
-    // 获取列表数据
-    const queryTableAction = () => {
-      const param: QueryOrderQuoteReq = {
-        wrpricetype: 1,
-        haswr: 0,
-      };
-      queryTable(queryOrderQuote, param);
-    };
-    Bus.$on('spotTrade', queryTableAction);
-    // 表格通用逻辑
-    const param: ComposeTableParam = {
-      queryFn: queryTableAction,
-      menuType: EnumRouterName.warehouse_pre_sale_price,
-      tableName: 'table_pcweb_spot_trade_warehouse_sale_price',
-      tableFilterKey: [],
-      isDetail: false,
-    };
-    const {
-      contextMenu,
-      openContext,
-      closeContext, // 右键
-      columns,
-      registerColumn,
-      updateColumn, // 表头
-      expandedRowKeys,
-      selectedRow,
-      Rowclick, // 表格折腾面板数据与单击、双击事件
-      componentId,
-      closeComponent, // 控制异步组件
-      firstBtn, // 表格按钮
-    } = handleComposeTable<WrOrderQuote>(param);
-    function search(value: Object) {
-      const param: QueryOrderQuoteReq = {
-        wrpricetype: 1,
-        haswr: 0,
-      };
-      Object.assign(param, value);
-      queryTable(queryOrderQuote, param);
-    }
-    function buyOpen(value: any, goods: any) {
-      componentId.value = 'postBuying';
-      selectedRow.value = value;
-    }
-    return {
-      isBottom,
-      contextMenu,
-      openContext,
-      closeContext, // 右键
-      columns,
-      registerColumn,
-      updateColumn, // 表头
-      expandedRowKeys,
-      selectedRow,
-      Rowclick, // 表格折腾面板数据与单击、双击事件
-      componentId,
-      closeComponent, // 控制异步组件
-      firstBtn, // 表格按钮
-      name: EnumRouterName.warehouse_pre_sale_price,
-      loading,
-      tableList,
-      search,
-      buyOpen,
-    };
-  },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 28
src/views/market/spot_trade/warehouse_receipt_trade/index.vue

@@ -1,28 +0,0 @@
-<template>
-  <!-- 仓单贸易 -->
-  <div class="topTableHeight40">
-    <router-view></router-view>
-    <ThridMenu :list="tabList"
-               :selectedKey="index"
-               @selectMenu="changeTab" />
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent } from 'vue';
-import ThridMenu from '@/common/components/thirdMenu/index.vue';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { handleMartketThirdRouter } from '@/common/setup/matket/router';
-
-export default defineComponent({
-    name: EnumRouterName.warehouse_receipt_trade,
-    components: {
-        ThridMenu,
-    },
-    setup() {
-        return { ...handleMartketThirdRouter(EnumRouterName.warehouse_receipt_trade) };
-    },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 121
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/buy/index.vue

@@ -1,121 +0,0 @@
-<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="(record,index)=>index" :data-source="tableList">
-      <template #index="{ index }">
-        <span>{{ index + 1 }}</span>
-      </template>
-      <template #marginvalue="{ text }">
-        <span>{{ (text * 100).toFixed(2) + '%'}}</span>
-      </template>
-      <!-- 议价 -->
-      <template #canbargain="{ text }">
-        <span>{{ text ? '是' : '否' }}</span>
-      </template>
-      <!-- 整单 -->
-      <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
-      </template>
-      <!-- 挂牌有效期 -->
-      <template #validtime="{ text }">
-        <span>{{ formatTime(text, 'd') }}</span>
-      </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>
-  </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
-import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqReq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
-import { queryOrderQuote, queryQueryOrderQuoteMyq } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/common/setup/table/compose';
-import Filter from '../../components/filter/index.vue';
-import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import { handleColumns, filterBtn } from '../../setup';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-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);
-
-    // 表格列表数据
-    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">
-</style>

+ 0 - 454
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/delisting/index.vue

@@ -1,454 +0,0 @@
-<template>
-    <!--仓单贸易 贸易圈挂牌 摘牌-->
-    <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">
-                <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-select>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="挂牌方">
-                                <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>
-                            </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-form-item>
-                    </a-col>
-                    <a-col :span="24" v-else>
-                        <a-form-item label="摘牌价格">
-                            <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-select>
-                        </a-form-item>
-                    </a-col>
-
-                    <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>
-                        </a-col>
-                    </a-row>
-                    <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" />
-                                <div class="unit">
-                                    <span>0</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-form-item label="摘牌数量">
-                            <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-form-item label="摘牌金额">
-                                <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>
-                            </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>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </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">{{ isBuy() ? '卖出' : '买入' }}</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 { Des } from '@/common/components/commonDes';
-import Drawer from '@/common/components/drawer/index.vue';
-import { BuyOrSell, TradeMode } from '@/common/constants/enumCommon';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { validateAction } from '@/common/setup/form';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { getAccountTypeList, getCanUseMoney, getSelectedAccountId } from '@/services/bus/account';
-import { getUserId } from '@/services/bus/user';
-import { marketIsRun } from '@/services/bus/market';
-import { getRules } from '@/services/bus/rules';
-import { QueryOrderQuoteMyqQsp } from '@/services/go/wrtrade/interface';
-import { HdWRDealOrder, wrBargainApply } from '@/services/proto/warehousetrade';
-import { WrBargainApplyReq } from '@/services/proto/warehousetrade/interface';
-import Bus from '@/utils/eventBus';
-import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
-import Long from 'long';
-import moment from 'moment';
-import { v4 as uuidv4 } from 'uuid';
-import { defineComponent, PropType, ref } from 'vue';
-import { ListingForm } from './interface';
-import { handleForm, handleSpotWarrant } from './setup';
-
-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: '',
-        },
-    },
-    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 Math.round(price * num * 100) / 100;
-            } 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.round(result * 100) / 100 : '--';
-        }
-        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 isBargin() {
-            return props.componentId === 'warehouse_receipt_trade_blocs_bargain_delisting';
-        }
-        if (isBargin()) {
-            formState.price = props.selectedRow.fixedprice;
-        }
-
-        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(() => {
-                        Bus.$emit('spotTrade', true);
-                        cancel(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: isBuy() ? BuyOrSell.sell : BuyOrSell.buy, // 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;
-                    }
-
-                    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,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.post_buying {
-    width: 100%;
-    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;
-            }
-        }
-        .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;
-}
-.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;
-    }
-}
-.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;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.mt20 {
-    margin-top: 20px;
-}
-.mt-10 {
-    margin-top: -10px;
-}
-.ant-input-suffix {
-    position: absolute;
-    right: -25px;
-}
-.minusBtn,
-.plusBtn {
-    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;
-}
-.plusBtn {
-    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;
-}
-.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;
-    }
-}
-</style>

+ 0 - 12
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/delisting/interface.ts

@@ -1,12 +0,0 @@
-export interface ListingForm {
-    accountid: undefined | number,
-    price: number,
-    num: number,
-    LadingBillId: string,
-    case: string,
-    caseId: number,
-}
-export interface Wrhold {
-    id: string,
-    name: string,
-}

+ 0 - 56
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/delisting/setup.ts

@@ -1,56 +0,0 @@
-import { BuyOrSell } from "@/common/constants/enumCommon";
-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 { RuleObject } from "ant-design-vue/lib/form/interface";
-import { reactive, Ref, ref, UnwrapRef } from "vue";
-import { ListingForm } from "./interface";
-
-
-
-export function handleForm() {
-    const formRef = ref();
-    const formState: UnwrapRef<ListingForm> = reactive({
-        accountid: undefined,
-        price: 0,
-        num: 0,
-        LadingBillId: '',
-        case: '',
-        caseId: 0
-    })
-    const v_ContractType = async (rule: RuleObject, value: number) => {
-        return validateCommon(value, '请输入摘牌数量');
-    };
-    const rules = {
-        accountid: [{ required: true, message: '请选择交易账户' }],
-        LadingBillId: [{ required: true, message: '请选择现货仓单' }],
-        caseId: [{ required: true, message: '请选择融资方案' }],
-        num: [{ required: true, message: '请输入摘牌数量', trigger: 'blur', type: 'number', },
-        { required: true, validator: v_ContractType }],
-
-    }
-    return { rules, formState, formRef }
-}
-
-
-export function handleSpotWarrant(buyOrSell: BuyOrSell, selectedRow: QueryOrderQuoteMyqQsp, loading: Ref<boolean>) {
-    const wrHoldList = ref<Wrhold[]>([])
-    const allWrHoldList = ref<WrHoldLB[]>([])
-    if (buyOrSell === BuyOrSell.buy) {
-        queryResultLoadingAndInfo(queryHoldLB, loading).then(res => {
-            allWrHoldList.value = res
-            wrHoldList.value.length = 0
-            res.forEach(e => {
-                if (e.wrfactortypeid === String(selectedRow.wrfactortypeid)) {
-                    const { wrholdeno, enableqty, ladingbillid, enumdicname, subnum } = e
-                    const result = { id: ladingbillid, name: `${wrholdeno}(${enableqty}${enumdicname})`, subnum }
-                    wrHoldList.value.push(result)
-                }
-            })
-        })
-    }
-
-    return { wrHoldList, allWrHoldList }
-}

+ 0 - 345
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/post-buying/index.vue

@@ -1,345 +0,0 @@
-<template>
-    <!--仓单贸易 贸易圈挂牌 挂牌求购 -->
-    <Drawer :title="'挂牌求购'" :placement="'right'" :visible="visible" @cancel="cancel" class="top486">
-        <div class="post_buying">
-            <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-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌价格" name="FixedPrice" class="inputIconBox">
-                                <a-input-number class="commonInput" style="width: 260px" :min="0" v-model:value="formState.FixedPrice" />
-                                <MinusOutlined @click="decreasePrice" />
-                                <PlusOutlined @click="increasePrice" />
-                                <a-checkbox class="commonCheckbox" v-model:checked="priceCheck">可议价</a-checkbox>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌数量" name="OrderQty" class="inputIconBox">
-                                <a-input-number class="commonInput" style="width: 260px" :min="0" v-model:value="formState.OrderQty" />
-                                <MinusOutlined @click="decreaseNumber" />
-                                <PlusOutlined @click="increaseNumber" />
-                                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                                <a-checkbox v-model:checked="numCheck" class="commonCheckbox">整单</a-checkbox>
-                            </a-form-item>
-                        </a-col>
-
-                        <a-col :span="24" v-if="!numCheck">
-                            <a-form-item label="起摘数量" name="delistingQty">
-                                <a-input-number class="commonInput" v-model:value="formState.delistingQty" :min="0" style="width: 260px !important" />
-                                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="履约保证金" name="margin">
-                                <a-input-number class="commonInput" v-model:value="formState.margin" :min="0" style="width: 260px" />
-                                <span class="input-enumdicname">%</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌有效期" name="vidaliteTime" class="inputIconBox">
-                                <a-date-picker style="width: 260px" v-model:value="formState.vidaliteTime" :allowClear="false" class="commonDatePicker dialogDatePicker" />
-                            </a-form-item>
-                        </a-col>
-
-                        <a-col :span="24">
-                            <a-form-item label="履约方式" class="inputIconBox">
-                                <span :class="['clickBox', formState.permanceTempName ? 'white' : '']" @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="24">
-                            <a-form-item label="指定朋友" class="inputIconBox">
-                                <span :class="['clickBox', getFriendLength() ? 'white' : '']" @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-col :span="24">
-                            <a-form-item label="挂牌金额">
-                                <span class="white ml8">{{ getMoney() }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <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(getSelectedAccount()) }}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </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-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
-        </div>
-    </Drawer>
-    <!-- 选择朋友 -->
-    <Friend v-if="showFriend" :friends="formState.friends" @cancel="chooseFriend" @update="chooseFriend" />
-    <!-- 选择履约模板 -->
-    <Permance v-if="showPermance" @cancel="choosePermance" @update="choosePermance" />
-</template>
-
-<script lang="ts">
-import { defineComponent, PropType, ref, UnwrapRef } from 'vue';
-import { Des } from '@/common/components/commonDes';
-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 { getUserId } from '@/services/bus/user';
-import { v3, v4 as uuidv4 } from 'uuid';
-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 Friend from '@/common/components/friends/index.vue';
-import Permance from '@/common/components/permanceTemp/choosePermancePlanTmp.vue';
-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';
-
-export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: ModalEnum.spot_trade_warehouse_post_buying,
-    components: { Des, Drawer, PlusOutlined, MinusOutlined, Friend, Permance },
-    props: {
-        selectedRow: {
-            type: Object as PropType<TempWrOrderQuoteDetail>,
-            default: {},
-        },
-    },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        // 表单
-        const { rules, formState, formRef } = handleForm();
-        // 选择朋友
-        const { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends } = useBlocksFriends(formState);
-        // 履约模板
-        const { showPermance, choosePermance, openPermance } = useBlocksPermaceTemp(formState);
-        // 价格
-        const { priceCheck, increasePrice, decreasePrice } = useBlocksPrice(formState);
-        const loading = ref<boolean>(false);
-        // 摘牌数量
-        const { numCheck, increaseNumber, decreaseNumber } = useBlocksNumber(formState);
-        function submit() {
-            // 判断是否开市
-            if (!marketIsRun(TradeMode.WarehouseReceiptTrade)) {
-                return;
-            }
-            const marketInfo = getMarketRunByTradeMode(TradeMode.WarehouseReceiptTrade);
-            if (marketInfo) {
-                validateAction<BlocsListingForm>(formRef, formState).then((res) => {
-                    if (!formState.permanceTempName) {
-                        message.error('请选择履约模板');
-                        return;
-                    }
-                    if (!friendCheck.value) {
-                        if (formState.friends.length === 0) {
-                            message.error('请选择朋友');
-                            return;
-                        }
-                    }
-                    const param = {
-                        AccountID: res.accountid, // 默认内部资金账号第一个
-                        ClientSerialNo: uuidv4(), // 客户端流水号
-                        // OperateSrc: 2,
-                        ClientType: 4,
-                        // MarketID: marketInfo.marketid,
-                        LadingBillId: 0, // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-                        // LadingBillId: 'uint642081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-                        TradeDate: moment(marketInfo.tradedate).format('YYYYMMDD'), // 交易日 string
-                        // SubNum: '0', // 提单子单号
-                        SubNum: 0,
-                        // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        WRFactorTypeId: props.selectedRow.wrfactortypeid ? props.selectedRow.wrfactortypeid : 0, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        IsSpecified: 1, // 是否指定对手 0:不指定 1:指定 uint32
-                        MatchAccIDs: res.friends, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
-                        OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
-                        DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID  // 有仓单求购
-                        WRPriceType: 1, // 价格方式 1:固定价 2:浮动价
-                        FixedPrice: res.FixedPrice, // 固定价格
-                        PriceFactor: 1, // 价格系数(浮动价时填写)
-                        PriceMove: 0, // 升贴水(浮动价时填写)
-                        TimevalidType: 3, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
-                        ValidTime: moment(formState.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: 0, // 买卖方向 0买1卖
-                        PriceDisplayMode: 1, // 浮动价显示方式 1:合并显示 2:分开显示
-                        CanBargain: priceCheck.value ? 1 : 0, // 挂牌是否可议价0:不可1:可-摘牌是否议价
-                        Attachment1: '', // 附件1
-                        Attachment2: '', // 附件2
-                        Remark: '', // 备注
-                        ApplyID: 0, // 申请ID
-                        WRTradeGoods: [],
-                        CanPart: numCheck.value ? 0 : 1, // 是否允许部份摘牌0:不允许;1:允许
-                        WRStandardID: props.selectedRow.wrstandardid,
-                        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) => {
-                                      return {
-                                          DGFactoryItemTypeID: it.dgfactoryitemtypeid, // uint64 要素项类型ID
-                                          DGFactoryItemID: it.dgfactoryitemid, // uint64 预约要素项类型值
-                                          ItemTypeMode: 1, // uint32 要素项类型模式
-                                      };
-                                  })
-                                : [], // DGFactoryItems 要素类型明细集合(没有仓单要素ID填写)
-                    };
-                    requestResultLoadingAndInfo(hdWROrder, param, loading, ['求购成功', '求购失败:']).then(() => {
-                        cancel(true);
-                    });
-                });
-            }
-        }
-        return {
-            submit,
-            cancel,
-            visible,
-            rules,
-            formState,
-            formRef,
-            getCanUseMoney,
-            priceCheck,
-            increasePrice,
-            decreasePrice,
-            ...useBlocksAccount(formState),
-            ...useBlocksMoney(formState),
-            showPermance,
-            choosePermance,
-            openPermance,
-            numCheck,
-            increaseNumber,
-            decreaseNumber,
-            friendCheck,
-            showFriend,
-            chooseFriend,
-            openFriend,
-            getFriendLength,
-            limiteFriends,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.post_buying {
-    width: 100%;
-    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;
-            }
-        }
-        .conditionBtn + .conditionBtn {
-            margin-left: 10px;
-        }
-    }
-}
-
-.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;
-    }
-}
-.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;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.ant-input-suffix {
-    position: absolute;
-    right: -25px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item .ant-form-item-label {
-    width: 80px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item .ant-form-item-control-wrapper {
-    width: calc(100% - 80px);
-}
-.ant-form.dialogForm {
-    .ant-row.btnCenter.ant-form-item {
-        width: 100%;
-        .ant-col.ant-form-item-control-wrapper {
-            width: 100%;
-        }
-    }
-}
-</style>

+ 0 - 122
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/sell/index.vue

@@ -1,122 +0,0 @@
-<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="(record,index)=>index" :data-source="tableList">
-      <template #index="{ index }">
-        <span>{{ index + 1 }}</span>
-      </template>
-      <template #marginvalue="{ text }">
-        <span>{{ (text * 100).toFixed(2) + '%'}}</span>
-      </template>
-      <!-- 议价 -->
-      <template #canbargain="{ text }">
-        <span>{{ text ? '是' : '否' }}</span>
-      </template>
-      <!-- 整单 -->
-      <template #canpart="{ text }">
-        <span>{{ text  === 1 ? '否' : '是' }}</span>
-      </template>
-      <!-- 挂牌有效期 -->
-      <template #validtime="{ text }">
-        <span>{{ formatTime(text, 'd') }}</span>
-      </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>
-  </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
-import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqReq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
-import { queryOrderQuote, queryQueryOrderQuoteMyq } from '@/services/go/wrtrade';
-import { handleComposeTable } from '@/common/setup/table/compose';
-import Filter from '../../components/filter/index.vue';
-import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import { handleColumns, filterBtn } from '../../setup';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-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);
-
-    // 表格列表数据
-    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,
-    };
-  },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 63
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/index.vue

@@ -1,63 +0,0 @@
-<template>
-  <!-- 仓单贸易 贸易圈挂牌-->
-  <div class="topTableHeight">
-    <Filter :enumName="name"
-            @search="search"
-            @buy="buyOpen" />
-    <div>
-      <Sell />
-      <Buy />
-    </div>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
-  </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { defineComponent, defineAsyncComponent, ModalEnum } from '@/common/export/commonTable';
-import Filter from '../../components/filter/index.vue';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import Buy from './components/buy/index.vue';
-import Sell from './components/sell/index.vue';
-import { handleModalComponent } from '@/common/setup/asyncComponent';
-import { ref } from 'vue';
-import Bus from '@/utils/eventBus';
-
-export default defineComponent({
-    name: EnumRouterName.warehouse_receipt_trade_blocs,
-    components: {
-        Filter,
-        Buy,
-        Sell,
-        postBuying: defineAsyncComponent(() => import('./components/post-buying/index.vue')),
-    },
-    setup() {
-        const isBottom = getShowBottomValue();
-        const selectedRow = ref();
-        function queryFn() {
-            Bus.$emit('spotTrade', true);
-        }
-        // 控制异步组件
-        const { componentId, closeComponent } = handleModalComponent(queryFn, selectedRow);
-        function search() {}
-        function buyOpen(value: any) {
-            componentId.value = 'postBuying';
-            selectedRow.value = value;
-        }
-        return {
-            isBottom,
-            search,
-            buyOpen,
-            componentId,
-            closeComponent,
-            selectedRow,
-            name: EnumRouterName.warehouse_receipt_trade_blocs,
-        };
-    },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 40
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/setup.ts

@@ -1,40 +0,0 @@
-import { BtnListType } from '@/common/components/btnList/interface';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { QueryOrderQuoteMyqQsp } from '@/services/go/wrtrade/interface';
-
-
-export function handleColumns() {
-    const columns = [
-        { title: '品种', key: 'deliverygoodsname', align: 'center', width: 140 },
-        { title: '商品', key: 'wrtypename', align: 'center', width: 400 },
-        { title: '仓库', key: 'warehousename', align: 'center', width: 200 },
-        { title: '价格', key: 'fixedprice', align: 'center', width: 120 },
-        { title: '议价', key: 'canbargain', align: 'center', width: 80 },
-        { title: '数量', key: 'orderqty', align: 'center' },
-        { 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: 140 },
-        { title: '挂牌方', key: 'username', align: 'center', width: 100 },
-    ];
-    function getBuyOrSellColumns(type: BuyOrSell) {
-        const title = type === BuyOrSell.buy ? '买' : '卖'
-        const result = [
-            { title, dataIndex: 'index', key: 'index', width: 80, align: 'center' },
-            ...columns
-        ]
-        return result.map(el => {
-            const slots = { customRender: el.key };
-            return { ...el, slots, dataIndex: el.key };
-        })
-    }
-    return { getBuyOrSellColumns }
-}
-
-export function filterBtn(btnList: BtnListType[], selectedRow: QueryOrderQuoteMyqQsp) {
-    let result = btnList.filter(e => e.code !== 'warehouse_receipt_trade_blocs_post_buying')
-    if (selectedRow) {
-        result = selectedRow.canbargain ? result : result.filter(e => e.code !== 'warehouse_receipt_trade_blocs_bargain_delisting')
-    }
-    return result
-}

+ 0 - 106
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue

@@ -1,106 +0,0 @@
-<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="(record,index)=>index" :data-source="tableList"></a-table>
-    <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
-    <component :is="componentId" v-if="componentId" :enumName="name" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-  </div>
-</template>
-
-<script lang="ts">
-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 Filter from '../../components/filter/index.vue';
-import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import Bus from '@/utils/eventBus/index';
-
-export default defineComponent({
-  name: EnumRouterName.warehouse_receipt_trade_floating_price,
-  components: {
-    contextMenu,
-    Filter,
-    [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-    [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-    buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
-    postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-  },
-  setup() {
-    const isBottom = getShowBottomValue();
-    // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
-    // 获取列表数据
-    const queryTableAction = () => {
-      const param: QueryOrderQuoteReq = {
-        wrpricetype: 2,
-        haswr: 1,
-      };
-      queryTable(queryOrderQuote, param);
-    };
-    Bus.$on('spotTrade', queryTableAction);
-    // 表格通用逻辑
-    const param: ComposeTableParam = {
-      queryFn: queryTableAction,
-      menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
-      tableName: 'table_pcweb_spot_trade_warehouse_float',
-      tableFilterKey: [],
-      isDetail: false,
-    };
-    const {
-      contextMenu,
-      openContext,
-      closeContext, // 右键
-      columns,
-      registerColumn,
-      updateColumn, // 表头
-      expandedRowKeys,
-      selectedRow,
-      Rowclick, // 表格折腾面板数据与单击、双击事件
-      componentId,
-      closeComponent, // 控制异步组件
-      firstBtn, // 表格按钮
-    } = handleComposeTable<WrOrderQuote>(param);
-    function search(value: Object) {
-      const param: QueryOrderQuoteReq = {
-        wrpricetype: 2,
-        haswr: 1,
-      };
-      Object.assign(param, value);
-      queryTable(queryOrderQuote, param);
-    }
-    function buyOpen(value: any, goods: Goods) {
-      componentId.value = 'postBuying';
-      value.goodsid = goods.goodsid;
-      value.goodscode = goods.goodscode;
-      selectedRow.value = value;
-    }
-    return {
-      isBottom,
-      contextMenu,
-      openContext,
-      closeContext, // 右键
-      columns,
-      registerColumn,
-      updateColumn, // 表头
-      expandedRowKeys,
-      selectedRow,
-      Rowclick, // 表格折腾面板数据与单击、双击事件
-      componentId,
-      closeComponent, // 控制异步组件
-      firstBtn, // 表格按钮
-      name: EnumRouterName.warehouse_receipt_trade_floating_price,
-      loading,
-      tableList,
-      search,
-      buyOpen,
-    };
-  },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 104
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_price/index.vue

@@ -1,104 +0,0 @@
-<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="(record,index)=>index" :data-source="tableList"></a-table>
-    <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
-    <component :is="componentId" v-if="componentId" :enumName="name" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-  </div>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { queryTableList, BtnList, 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 Bus from '@/utils/eventBus/index';
-import Filter from '../../components/filter/index.vue';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-
-export default defineComponent({
-  name: EnumRouterName.warehouse_receipt_trade_price,
-  components: {
-    contextMenu,
-    Filter,
-    [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
-    [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-    buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
-    postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
-  },
-  setup() {
-    const isBottom = getShowBottomValue();
-    // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
-    // 获取列表数据
-    const queryTableAction = () => {
-      const param: QueryOrderQuoteReq = {
-        wrpricetype: 1,
-        haswr: 1,
-      };
-      queryTable(queryOrderQuote, param);
-    };
-    Bus.$on('spotTrade', queryTableAction);
-    // 表格通用逻辑
-    const param: ComposeTableParam = {
-      queryFn: queryTableAction,
-      menuType: EnumRouterName.warehouse_receipt_trade_price,
-      tableName: 'table_pcweb_spot_trade_warehouse_price',
-      tableFilterKey: [],
-      isDetail: false,
-    };
-    const {
-      contextMenu,
-      openContext,
-      closeContext, // 右键
-      columns,
-      registerColumn,
-      updateColumn, // 表头
-      expandedRowKeys,
-      selectedRow,
-      Rowclick, // 表格折腾面板数据与单击、双击事件
-      componentId,
-      closeComponent, // 控制异步组件
-      firstBtn, // 表格按钮
-    } = handleComposeTable<WrOrderQuote>(param);
-    function search(value: Object) {
-      const param: QueryOrderQuoteReq = {
-        wrpricetype: 1,
-        haswr: 1,
-      };
-      Object.assign(param, value);
-      queryTable(queryOrderQuote, param);
-    }
-    function buyOpen(value: any, goods: any) {
-      componentId.value = 'postBuying';
-      selectedRow.value = value;
-    }
-
-    return {
-      isBottom,
-      contextMenu,
-      openContext,
-      closeContext, // 右键
-      columns,
-      registerColumn,
-      updateColumn, // 表头
-      expandedRowKeys,
-      selectedRow,
-      Rowclick, // 表格折腾面板数据与单击、双击事件
-      componentId,
-      closeComponent, // 控制异步组件
-      firstBtn, // 表格按钮
-      name: EnumRouterName.warehouse_receipt_trade_price,
-      loading,
-      tableList,
-      search,
-      buyOpen,
-    };
-  },
-});
-</script>
-<style lang="less">
-</style>

+ 0 - 21
src/views/market/warehouseTrade/chart/index.vue

@@ -1,21 +0,0 @@
-<template>
-  <div class="warehouse-trade-chart">
-    仓单贸易图表
-  </div>
-</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'arehouse-trade-chart',
-    components: {},
-    setup() {
-        return {};
-    },
-});
-</script>
-
-<style lang="less">
-.warehouse-trade-chart {
-}
-</style>;

+ 0 - 212
src/views/market/warehouseTrade/components/delisting/index.vue

@@ -1,212 +0,0 @@
-<template>
-    <!-- 挂牌 -->
-    <div class="listed">
-        <div class="condition">
-            <a-button class="conditionBtn">螺纹钢</a-button>
-            <a-button class="conditionBtn">12mm-江铜</a-button>
-            <!-- <a-button class="conditionBtn">江铜</a-button> -->
-            <a-button class="conditionBtn">华南仓库</a-button>
-        </div>
-        <div class="formBar">
-            <a-form class="inlineForm dialogForm" :form="form" @submit="handleSearch">
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="挂牌方式">
-                            <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>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="挂牌价">
-                            <a-input class="commonInput" style="width: 140px" />
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="挂牌数量">
-                            <a-input class="commonInput" suffix="吨" style="width: 140px" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="起摘数量" class="relative">
-                            <a-input
-                                class="commonInput"
-                                suffix="吨"
-                                style="width: 140px !important"
-                            />
-                            <div class="tip">最小单位:1吨</div>
-                        </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" />
-                            <div class="unit">
-                                <span>0</span>
-                                <span>300吨</span>
-                            </div>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">&nbsp;</a-col>
-                </a-row>
-                <a-row :gutter="24">
-                    <a-col :span="24">
-                        <a-form-item label="行情商品">
-                            <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-form-item>
-                    </a-col>
-                </a-row>
-                <a-row :gutter="24" type="flex" justify="center">
-                    <a-col :span="24">
-                        <a-form-item class="tc">
-                            <a-button class="listedBtn">卖出</a-button>
-                            <a-button class="ml10 cancelBtn">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
-        </div>
-    </div>
-</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'warehouse-trade-fixed-price',
-    components: {},
-    setup() {
-        const form = {
-            type: '1',
-        };
-        return {
-            form,
-        };
-    },
-});
-</script>
-
-<style lang="less" scoped>
-// 浮动价挂牌
-.listed {
-    width: 100%;
-    height: 100%;
-    .flex;
-    flex-direction: column;
-
-    .condition {
-        width: calc(100% - 32px);
-        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;
-        }
-    }
-}
-.mt-20 {
-    margin-top: -20px;
-}
-.formProgress {
-    width: 140px;
-    // height: 3px;
-    // .rounded-corners(2px);
-    margin-left: 70px;
-    .ant-progress-outer {
-        margin-right: 0;
-        padding-right: 0;
-        .ant-progress-inner {
-            background: @m-grey14;
-            .rounded-corners(2px);
-            .ant-progress-bg {
-                height: 3px !important;
-                border-radius: 2px !important;
-                background-color: @m-blue0;
-            }
-        }
-    }
-    .ant-progress-text {
-        display: none;
-    }
-}
-.unit {
-    margin-left: 70px;
-    width: 140px;
-    .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;
-    }
-}
-.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%);
-        color: @m-white0-hover;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ml5 {
-    margin-left: 5px;
-}
-</style>;

+ 0 - 21
src/views/market/warehouseTrade/components/filterOption/index.vue

@@ -1,21 +0,0 @@
-<template>
-  <div class="warehouse-trade-filter-option">
-    仓单贸易过滤选项
-  </div>
-</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'warehouse-trade-filter-option',
-    components: {},
-    setup() {
-        return {};
-    },
-});
-</script>
-
-<style lang="less">
-.warehouse-trade-filter-option {
-}
-</style>;

+ 0 - 21
src/views/market/warehouseTrade/components/fixedPrice/index.vue

@@ -1,21 +0,0 @@
-<template>
-  <div class="warehouse-trade-fixed-price">
-    仓单贸易一口价
-  </div>
-</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'warehouse-trade-fixed-price',
-    components: {},
-    setup() {
-        return {};
-    },
-});
-</script>
-
-<style lang="less">
-.warehouse-trade-fixed-price {
-}
-</style>;

+ 0 - 21
src/views/market/warehouseTrade/components/floatPrice/index.vue

@@ -1,21 +0,0 @@
-<template>
-  <div class="warehouse-trade-fixed-price">
-    仓单贸易浮动价
-  </div>
-</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'warehouse-trade-fixed-price',
-    components: {},
-    setup() {
-        return {};
-    },
-});
-</script>
-
-<style lang="less">
-.warehouse-trade-fixed-price {
-}
-</style>;

+ 0 - 212
src/views/market/warehouseTrade/components/listed/index.vue

@@ -1,212 +0,0 @@
-<template>
-    <!-- 挂牌 -->
-    <div class="listed">
-        <div class="condition">
-            <a-button class="conditionBtn">螺纹钢</a-button>
-            <a-button class="conditionBtn">12mm-江铜</a-button>
-            <!-- <a-button class="conditionBtn">江铜</a-button> -->
-            <a-button class="conditionBtn">华南仓库</a-button>
-        </div>
-        <div class="formBar">
-            <a-form class="inlineForm dialogForm" :form="form" @submit="handleSearch">
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="挂牌方式">
-                            <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>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="挂牌价">
-                            <a-input class="commonInput" style="width: 140px" />
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="挂牌数量">
-                            <a-input class="commonInput" suffix="吨" style="width: 140px" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="起摘数量" class="relative">
-                            <a-input
-                                class="commonInput"
-                                suffix="吨"
-                                style="width: 140px !important"
-                            />
-                            <div class="tip">最小单位:1吨</div>
-                        </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" />
-                            <div class="unit">
-                                <span>0</span>
-                                <span>300吨</span>
-                            </div>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">&nbsp;</a-col>
-                </a-row>
-                <a-row :gutter="24">
-                    <a-col :span="24">
-                        <a-form-item label="行情商品">
-                            <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-form-item>
-                    </a-col>
-                </a-row>
-                <a-row :gutter="24" type="flex" justify="center">
-                    <a-col :span="24">
-                        <a-form-item class="tc">
-                            <a-button class="listedBtn">卖出</a-button>
-                            <a-button class="ml10 cancelBtn">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
-        </div>
-    </div>
-</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'warehouse-trade-fixed-price',
-    components: {},
-    setup() {
-        const form = {
-            type: '1',
-        };
-        return {
-            form,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-// 浮动价挂牌
-.listed {
-    width: 100%;
-    height: 100%;
-    .flex;
-    flex-direction: column;
-
-    .condition {
-        width: calc(100% - 32px);
-        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;
-        }
-    }
-}
-.mt-20 {
-    margin-top: -20px;
-}
-.formProgress {
-    width: 140px;
-    // height: 3px;
-    // .rounded-corners(2px);
-    margin-left: 70px;
-    .ant-progress-outer {
-        margin-right: 0;
-        padding-right: 0;
-        .ant-progress-inner {
-            background: @m-grey14;
-            .rounded-corners(2px);
-            .ant-progress-bg {
-                height: 3px !important;
-                border-radius: 2px !important;
-                background-color: @m-blue0;
-            }
-        }
-    }
-    .ant-progress-text {
-        display: none;
-    }
-}
-.unit {
-    margin-left: 70px;
-    width: 140px;
-    .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;
-    }
-}
-.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%);
-        color: @m-white0-hover;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ml5 {
-    margin-left: 5px;
-}
-</style>;

+ 0 - 392
src/views/market/warehouseTrade/components/trade/index.vue

@@ -1,392 +0,0 @@
-<template>
-    <!-- 期货交易 -->
-    <div class="trade">
-        <div class="left">
-            <a-row>
-                <a-col class="label">合约:</a-col>
-                <a-col>
-                    <a-select class="inlineFormSelect" default-value="1" style="width: 207px">
-                        <a-select-option value="1">一口价</a-select-option>
-                        <a-select-option value="2">一口价2</a-select-option>
-                    </a-select>
-                </a-col>
-            </a-row>
-            <a-row>
-                <a-col class="label">代码:</a-col>
-                <a-col>CU2012</a-col>
-            </a-row>
-            <a-row>
-                <a-col class="label">价格:</a-col>
-                <a-col>
-                    <a-input default-value="3247.2" class="commonInput" style="width: 140px;">
-                        <div slot="addonBefore">
-                            <a-icon type="minus" />
-                        </div>
-                        <div slot="addonAfter">
-                            <a-icon type="plus" />
-                        </div>
-                    </a-input>
-                    <a-select
-                        class="shortSelect"
-                        default-value="1"
-                        style="width: 60px; margin-left: 7px;"
-                    >
-                        <a-select-option value="1">最新</a-select-option>
-                    </a-select>
-                </a-col>
-            </a-row>
-            <a-row>
-                <a-col class="label">数量:</a-col>
-                <a-col>
-                    <a-input default-value="3247.2" class="commonInput" style="width: 140px;">
-                        <div slot="addonBefore">
-                            <a-icon type="minus" />
-                        </div>
-                        <div slot="addonAfter">
-                            <a-icon type="plus" />
-                        </div>
-                    </a-input>
-                    <a-button class="resetBtn">复位</a-button>
-                </a-col>
-            </a-row>
-            <a-row class="btnBlock">
-                <a-col :span="24">
-                    <a-button class="numAndOperBtn red">
-                        <p>54353</p>
-                        <p>买入</p>
-                    </a-button>
-                    <a-button class="numAndOperBtn green">
-                        <p>54353</p>
-                        <p>卖出</p>
-                    </a-button>
-                    <a-button class="numAndOperBtn yellow">
-                        <p>先开先平</p>
-                        <p>平仓</p>
-                    </a-button>
-                </a-col>
-            </a-row>
-            <a-row class="btns">
-                <a-col :span="24">
-                    <div class="avaliable">
-                        <div>
-                            <span>可买&lt;=</span>
-                            <span class="white">0</span>
-                        </div>
-                        <div>
-                            <span>可买&lt;=</span>
-                            <span class="white">0</span>
-                        </div>
-                    </div>
-                </a-col>
-            </a-row>
-        </div>
-        <div class="right">
-            <div class="rightBar">
-                <div class="topFive">
-                    <a-row class="line">
-                        <a-col class="firstCol">
-                            <div class="no">5</div>
-                            <div class="num">355.000</div>
-                        </a-col>
-                        <a-col class="lastCol">32.3K</a-col>
-                    </a-row>
-                    <a-row class="line">
-                        <a-col class="firstCol">
-                            <div class="no">4</div>
-                            <div class="num">355.000</div>
-                        </a-col>
-                        <a-col class="lastCol">24.5K</a-col>
-                    </a-row>
-                    <a-row class="line">
-                        <a-col class="firstCol">
-                            <div class="no">3</div>
-                            <div class="num">355.000</div>
-                        </a-col>
-                        <a-col class="lastCol">40.2K</a-col>
-                    </a-row>
-                    <a-row class="line">
-                        <a-col class="firstCol">
-                            <div class="no">2</div>
-                            <div class="num">355.000</div>
-                        </a-col>
-                        <a-col class="lastCol">23.3K</a-col>
-                    </a-row>
-                    <a-row class="line">
-                        <a-col class="firstCol">
-                            <div class="no">1</div>
-                            <div class="num">355.000</div>
-                        </a-col>
-                        <a-col class="lastCol">54.0K</a-col>
-                    </a-row>
-                </div>
-                <div class="bottomFive">
-                    <a-row class="line">
-                        <a-col class="firstCol">
-                            <div class="no">1</div>
-                            <div class="num">355.000</div>
-                        </a-col>
-                        <a-col class="lastCol">32.3K</a-col>
-                    </a-row>
-                    <a-row class="line">
-                        <a-col class="firstCol">
-                            <div class="no">2</div>
-                            <div class="num">355.000</div>
-                        </a-col>
-                        <a-col class="lastCol">24.5K</a-col>
-                    </a-row>
-                    <a-row class="line">
-                        <a-col class="firstCol">
-                            <div class="no">3</div>
-                            <div class="num">355.000</div>
-                        </a-col>
-                        <a-col class="lastCol">40.2K</a-col>
-                    </a-row>
-                    <a-row class="line">
-                        <a-col class="firstCol">
-                            <div class="no">4</div>
-                            <div class="num">355.000</div>
-                        </a-col>
-                        <a-col class="lastCol">23.3K</a-col>
-                    </a-row>
-                    <a-row class="line">
-                        <a-col class="firstCol">
-                            <div class="no">5</div>
-                            <div class="num">355.000</div>
-                        </a-col>
-                        <a-col class="lastCol">54.0K</a-col>
-                    </a-row>
-                </div>
-                <div class="newLine">
-                    <div class="lineBlock">
-                        <div>最新</div>
-                        <div class="red">546546</div>
-                    </div>
-                </div>
-                <div class="newLine">
-                    <div class="lineBlock">
-                        <div>涨幅</div>
-                        <div class="red">0.76%</div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'warehouse-trade-fixed-price',
-    components: {},
-    setup() {
-        const form = {
-            type: '1',
-        };
-        const price = '';
-        return {
-            form,
-            price,
-        };
-    },
-});
-</script>
-
-<style lang="less" scoped>
-.trade {
-    width: 100%;
-    height: 100%;
-    background: @m-black22;
-    .inlineflex;
-    overflow: hidden;
-    .left {
-        flex: 1;
-        height: 100%;
-        padding-left: 18px;
-        padding-right: 9px;
-        .inlineFormSelect.ant-select-single {
-            margin-right: 0;
-        }
-        .ant-row {
-            margin-bottom: 10px;
-            font-size: 14px;
-            height: 30px;
-            line-height: 30px;
-            color: @m-grey1;
-            .ant-col.label {
-                width: 42px;
-            }
-            .ant-col:last-child {
-                color: @m-white1;
-            }
-        }
-        .ant-row:first-child {
-            margin-top: 21px;
-        }
-        .ant-row.btnBlock {
-            height: 64px;
-            margin-top: 22px;
-        }
-        .btns {
-            margin-top: -5px;
-            .avaliable {
-                .inlineflex;
-                color: @m-grey1;
-                div + div {
-                    margin-left: 33px;
-                }
-            }
-        }
-        .ant-btn.numAndOperBtn {
-            width: 80px;
-            height: 64px;
-            border-radius: 5px;
-            text-align: center;
-            padding: 0;
-            p {
-                width: 100%;
-                height: 32px;
-                line-height: 30px;
-                text-align: center;
-                font-size: 16px;
-                margin-bottom: 0;
-            }
-            p:last-child {
-                font-size: 20px;
-                font-weight: bold;
-                line-height: 28px;
-            }
-        }
-        .numAndOperBtn + .numAndOperBtn {
-            margin-left: 5px;
-        }
-        .red {
-            color: @m-red3;
-            background: @m-red4;
-            border: 1px solid @m-red1;
-            p:first-child {
-                border-bottom: 1px dashed @m-red5;
-            }
-            p:last-child {
-                color: @m-red3;
-            }
-        }
-        .green {
-            background: @m-black23;
-            border: 1px solid @m-green4;
-            p:first-child {
-                border-bottom: 1px dashed @m-green4;
-                color: @m-green4;
-            }
-            p:last-child {
-                color: @m-green4;
-            }
-        }
-        .yellow {
-            background: @m-red6;
-            border: 1px solid @m-yellow2;
-            p:first-child {
-                border-bottom: 1px dashed @m-yellow3;
-                color: @m-yellow2;
-            }
-            p:last-child {
-                color: @m-yellow2;
-            }
-        }
-        .ant-btn.resetBtn {
-            margin-left: 6px;
-            width: 60px;
-            height: 30px;
-            line-height: 28px;
-            padding: 0;
-            color: @m-blue10;
-            font-size: 14px;
-            text-align: center;
-            background: @m-blue22;
-            border: 1px solid @m-blue10;
-            border-radius: 3px;
-        }
-    }
-    .right {
-        width: 150px;
-        height: 100%;
-        padding-top: 6px;
-        margin-right: 12px;
-        .flex;
-        flex-direction: column;
-        .rightBar {
-            height: 292px;
-            background: @m-grey21;
-            border: 2px solid @m-grey21;
-            .rounded-corners(5px);
-        }
-    }
-}
-.ant-row.line {
-    width: 100%;
-    height: 14px;
-    margin-bottom: 8px;
-    .inlineflex;
-    .ant-col.firstCol {
-        width: 70%;
-        .inlineflex;
-        .no {
-            width: 14px;
-            height: 14px;
-            line-height: 14px;
-            background: @m-yellow2;
-            .rounded-corners(2px);
-            text-align: center;
-            font-size: 12px;
-            color: @m-white0;
-            align-self: center;
-            align-items: center;
-        }
-        .num {
-            margin-left: 9px;
-            font-size: 12px;
-            color: @m-red7;
-            align-self: center;
-            align-items: center;
-        }
-    }
-    .ant-col.lastCol {
-        flex: 1;
-        max-width: 30%;
-        text-align: right;
-        align-self: center;
-        align-items: center;
-        color: @m-white1;
-        font-size: 12px;
-    }
-}
-.topFive {
-    width: 100%;
-    height: 124px;
-    padding: 4px 6px;
-    background: @m-red6;
-    .rounded-corners(5px, 5px, 0, 0);
-}
-.bottomFive:extend(.topFive) {
-    background: @m-blue22;
-    .rounded-corners(0);
-}
-.newLine {
-    width: 100%;
-    height: 20px;
-    line-height: 20px;
-    padding: 0 6px;
-    .lineBlock {
-        width: 100%;
-        height: 100%;
-        .inlineflex;
-        justify-content: space-between;
-        div {
-            color: @m-white0;
-            font-size: 12px;
-        }
-        .red {
-            color: @m-red8;
-        }
-    }
-}
-</style>;

+ 0 - 143
src/views/market/warehouseTrade/index.vue

@@ -1,143 +0,0 @@
-<template>
-    <!-- 仓单贸易 -->
-    <section class="forward-section warehouse-trade">
-        <div class="conditionIcon icon iconfont icon-saixuantiaojiantubiao"></div>
-        <!-- 这里需要加上二级菜单 二级菜单封装在公告组件里面 secondeMenu -->
-        <firstMenu :list="list" :value="'value'" @selectMenu="selectMenu" />
-
-        <quoteTable :columns="columns" :dataSource="data" :contextMenuList="contextMenuList" />
-        <thirdMenu></thirdMenu>
-    </section>
-</template>
-
-<script lang="ts">
-import { defineComponent, computed, reactive, ref, toRefs, unref, onMounted, onUpdated, onUnmounted, provide, inject } from 'vue';
-import { initData } from '@/common/methods';
-import firstMenu from '@/common/components/firstMenu/index.vue';
-import thirdMenu from '@/common/components/thirdMenu/index.vue';
-import quoteTable from '@/common/components/quoteTable/index.vue';
-import { MenuItem } from '@/common/components/contextMenu/interface';
-
-const columns = [
-    { title: '序号', width: 100, dataIndex: 'name', key: 'name', fixed: 'left', align: 'center' },
-    { title: '品种', width: 100, dataIndex: 'age', key: 'age', fixed: 'left', align: 'center' },
-    { title: '种类', dataIndex: 'address', key: '1', width: 200, align: 'center' },
-    { title: '品牌', dataIndex: 'address', key: '2', width: 200, align: 'center' },
-    { title: '数量', dataIndex: 'address', key: '3', width: 200, align: 'center' },
-    { title: '价格', dataIndex: 'address', key: '4', width: 200, align: 'center' },
-    { title: '仓库', dataIndex: 'address', key: '5', width: 200, align: 'center' },
-    { title: '所在地', dataIndex: 'address', key: '6', width: 200, align: 'center' },
-    { title: '挂牌方', dataIndex: 'address', key: '7', width: 'auto', align: 'center' },
-    // {
-    //     title: 'Action',
-    //     key: 'operation',
-    //     fixed: 'right',
-    //     align: 'center',
-    //     width: 100,
-    //     slots: { customRender: 'action' },
-    // },
-];
-
-interface DataItem {
-    key: number;
-    name: string;
-    age: number;
-    address: string;
-}
-
-const data: DataItem[] = [];
-for (let i = 0; i < 100; i++) {
-    data.push({
-        key: i,
-        name: `Edrward ${i}`,
-        age: 32,
-        address: `London Park no. ${i}`,
-    });
-}
-
-function handleMenu() {
-    const list = [
-        { key: '1', value: '仓单贸易' },
-        { key: '2', value: '拍卖' },
-    ];
-    function selectMenu(item: any) {}
-    return { list, selectMenu };
-}
-
-const orderCulums = [
-    { title: 'Column 1', dataIndex: 'address', key: '1', width: 156, align: 'center' },
-    { title: 'Column 2', dataIndex: 'address', key: '2', width: 156, align: 'center' },
-    { title: 'Column 3', dataIndex: 'address', key: '3', width: 156, align: 'center' },
-    { title: 'Column 4', dataIndex: 'address', key: '4', width: 200, align: 'center' },
-    { title: 'Column 5', dataIndex: 'address', key: '5', width: 200, align: 'center' },
-    { title: 'Column 6', dataIndex: 'address', key: '6', width: 200, align: 'center' },
-    { title: 'Column 7', dataIndex: 'address', key: '7', width: 200, align: 'center' },
-    { title: 'Column 8', dataIndex: 'address', key: '8', width: 200, align: 'center' },
-    { title: 'Column 8', dataIndex: 'address', key: '9', width: 200, align: 'center' },
-    { title: 'Column 8', dataIndex: 'address', key: '10', width: 200, align: 'center' },
-    { title: 'Column 8', dataIndex: 'address', key: '11', width: 200, align: 'center' },
-    { title: 'Column 8', dataIndex: 'address', key: '12', width: 200, align: 'center' },
-    { title: 'Column 8', dataIndex: 'address', key: '13', width: 200, align: 'center' },
-    { title: 'Column 9', dataIndex: 'address', key: '14', width: 200, align: 'center' },
-    { title: 'Column 9', dataIndex: 'address', key: '15', width: 200, align: 'center' },
-    { title: 'Column 10', dataIndex: 'address', key: '16', width: 200, align: 'center' },
-];
-
-export default defineComponent({
-    name: 'forward',
-    components: {
-        firstMenu,
-        quoteTable,
-        thirdMenu,
-    },
-    setup() {
-        initData(() => {
-            // 加载数据在这里
-        });
-        const { list, selectMenu } = handleMenu();
-        const contextMenuList = ref<MenuItem[]>([
-            {
-                lable: '下单',
-                callback: () => {},
-            },
-        ]);
-        return {
-            data,
-            columns,
-            list,
-            selectMenu,
-            contextMenuList,
-            orderCulums,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.warehouse-trade {
-    height: 100%;
-    height: 100%;
-    .flex;
-    flex-direction: column;
-    position: relative;
-    .conditionIcon {
-        font-size: 18px;
-        color: @m-blue0;
-        width: 18px;
-        height: 18px;
-        line-height: 18px;
-        cursor: pointer;
-        .position(absolute, 8px, 14px, auto, auto);
-        &:hover {
-            color: @m-blue0-hover;
-        }
-    }
-    .topBar {
-        flex: 1;
-    }
-    .warehouse-trade-order {
-        height: 330px;
-    }
-}
-</style
->;

+ 0 - 21
src/views/market/warehouseTrade/order/index.vue

@@ -1,21 +0,0 @@
-<template>
-  <div class="warehouse-trade-order">
-    仓单贸易单据
-  </div>
-</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'warehouse-trade-order',
-    components: {},
-    setup() {
-        return {};
-    },
-});
-</script>
-
-<style lang="less">
-.warehouse-trade-order {
-}
-</style>;