Browse Source

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

zhou.xiaoning 4 năm trước cách đây
mục cha
commit
da3d726ee4

+ 89 - 80
src/common/components/drawer/index.vue

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

+ 2 - 2
src/services/go/ermcp/order/index.ts

@@ -69,9 +69,9 @@ export function queryTradeOrderDetail(req: QueryTradeOrderDetailReq): Promise<Qu
  * /Order/QueryTradePosition
  * @param //  交易模式 - 格式:1,2,3
  */
-export function queryTradePosition(radeMode?: string): Promise<QueryTradePositionRsp[]> {
+export function queryTradePosition(tradeMode?: string): Promise<QueryTradePositionRsp[]> {
     const accountID = getAccoutIdList()
-    const param = radeMode ? { accountID, radeMode } : { accountID }
+    const param = tradeMode ? { accountID, tradeMode } : { accountID }
     return commonSearch_go('/Order/QueryTradePosition', param).catch((err) => {
         throw new Error(`仓汇总查询(合约市场): ${err}`);
     });

+ 158 - 140
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/index.vue

@@ -1,142 +1,146 @@
 <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="估算价">
-                <span class="white">{{getPrice()}}</span>
-              </a-form-item>
-            </a-col>
+    <!-- 挂牌求购 -->
+    <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>
+        <template v-slot:titleLeft>
+            <div class="collapse-close" @click="showChartAction">
+                <LineChartOutlined />
+            </div>
+        </template>
+        <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="估算价">
+                                <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">{{selected.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() ? selected.minivalue : 0}}</span>
-                  <span>{{getMaxNum()}}{{selected.enumdicname}}</span>
+                        <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">{{ selected.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() ? selected.minivalue : 0 }}</span>
+                                    <span>{{ getMaxNum() }}{{ selected.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-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>
+                <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>
-        <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>
+        <div>图表</div>
+    </Drawer>
 </template>
 
 <script lang="ts">
@@ -169,12 +173,12 @@ 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';
-
+import { handleForm, isFloat, useBuySellDirection, useNum, usePrice, useChart } from './setup';
+import { DoubleRightOutlined, LineChartOutlined } from '@ant-design/icons-vue';
 export default defineComponent({
     emits: ['cancel', 'update'],
     name: ModalEnum.spot_trade_warehouse_post_buying,
-    components: { Des, Drawer, PlusOutlined, MinusOutlined, SwapOutlined },
+    components: { Des, Drawer, PlusOutlined, MinusOutlined, SwapOutlined, LineChartOutlined },
     props: {
         selectedRow: {
             type: Object as PropType<RefGoodsList>,
@@ -267,6 +271,10 @@ export default defineComponent({
             }
             return result;
         }
+        // 显示 行情图表
+        function showChart() {
+
+        }
         function submit() {
             validateAction<FormParam>(formRef, formState).then((res) => {
                 const { goodsid } = props.selectedRow;
@@ -339,9 +347,11 @@ export default defineComponent({
             accountList,
             ...usePrice(),
             ...useNum(getMaxNum),
+            ...useChart(),
             getPrice,
             loading,
             selected,
+            showChart,
         };
     },
 });
@@ -435,14 +445,22 @@ export default defineComponent({
     text-align: center;
     border: 0;
     &:hover {
-        background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
+        background: linear-gradient(
+            0deg,
+            @m-blue0-hover 0%,
+            @m-blue2-hover 100%
+        );
         color: @m-white0-hover;
     }
 }
 .cancelBtn:extend(.listedBtn) {
     background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
     &:hover {
-        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%) !important;
+        background: linear-gradient(
+            0deg,
+            @m-grey12-hover 0%,
+            @m-grey13-hover 100%
+        ) !important;
         color: @m-white0-hover;
     }
 }

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

@@ -80,4 +80,13 @@ export const useNum = (getMaxNum: Function) => {
         }
     }
     return { increaseNum, decreaseNum };
+}
+
+// 图表
+export const useChart = () => {
+    const showChart = ref<boolean>(false)
+    function showChartAction() {
+        showChart.value = !showChart.value
+    }
+    return { showChart, showChartAction }
 }

+ 0 - 1
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/index.vue

@@ -420,7 +420,6 @@ export default defineComponent({
             return item.taaccounttype === 2 ? item : list[0];
         }
         function submit() {
-            debugger;
             // 市场信息
             if (!formState.marketid) { 
               message.info("请选择市场")

+ 0 - 1
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/setup.ts

@@ -147,7 +147,6 @@ export function handleNumAndPrice() {
             markets.findIndex(m => m.marketid === item.marketid) !== -1
         )
         spotMarkets.value = resMarkets
-        debugger;
     })
 
     return { spotMarkets };

+ 413 - 418
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/index.vue

@@ -1,10 +1,12 @@
 <template>
   <!-- 现货仓单 现货明细 挂牌 -->
-  <Drawer :title="'挂牌'"
-          :placement="'right'"
-          class="delistingBottom650"
-          :visible="visible"
-          @cancel="cancel">
+  <Drawer
+    :title="'挂牌'"
+    :placement="'right'"
+    class="delistingBottom650"
+    :visible="visible"
+    @cancel="cancel"
+  >
     <div class="listing">
       <div class="condition">
         <a-button class="conditionBtn">{{ selectedRow.deliverygoodsname }}</a-button>
@@ -12,109 +14,110 @@
         <a-button class="conditionBtn">{{ selectedRow.warehousename }}</a-button>
       </div>
 
-      <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="12">
-              <a-form-item label="挂牌方式"
-                           name="marketid">
-                <a-select class="inlineFormSelect"
-                          v-model:value="formState.marketid"
-                          @change="handleMarket"
-                          style="width: 140px"
-                          placeholder="请选择挂牌市场">
+              <a-form-item label="挂牌方式" name="marketid">
+                <a-select
+                  class="inlineFormSelect"
+                  v-model:value="formState.marketid"
+                  @change="handleMarket"
+                  style="width: 140px"
+                  placeholder="请选择挂牌市场"
+                >
                   <!-- <a-select-option :value="1">一口价</a-select-option>
                   <a-select-option :value="2">浮动价</a-select-option>
-                  <a-select-option :value="3">贸易圈</a-select-option> -->
-                <a-select-option v-for="item in spotMarkets" :key="item.marketid" :value="item.marketid">{{item.marketname}}</a-select-option>
+                  <a-select-option :value="3">贸易圈</a-select-option>-->
+                  <a-select-option
+                    v-for="item in spotMarkets"
+                    :key="item.marketid"
+                    :value="item.marketid"
+                  >{{ item.marketname }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
-            <a-col :span="12"
-                   v-if="isFixed()">
-              <a-form-item label="挂牌价"
-                           name="FixedPrice">
-                <a-input-number class="dialogInput"
-                                :min="0"
-                                style="width: 140px"
-                                v-model:value="formState.FixedPrice"
-                                placeholder="请输入挂牌价" />
+            <a-col :span="12" v-if="isFixed()">
+              <a-form-item label="挂牌价" name="FixedPrice">
+                <a-input-number
+                  class="dialogInput"
+                  :min="0"
+                  style="width: 140px"
+                  v-model:value="formState.FixedPrice"
+                  placeholder="请输入挂牌价"
+                />
               </a-form-item>
             </a-col>
-            <a-col :span="12"
-                   v-if="isBlocs()">
-              <a-form-item label="挂牌价格"
-                           name="FixedPrice"
-                           class="inputIconBox">
-                <a-input-number class="commonInput"
-                                style="width: 140px"
-                                :min="0"
-                                v-model:value="formState.FixedPrice" />
-                <a-checkbox class="commonCheckbox"
-                            v-model:checked="priceCheck">可议价</a-checkbox>
+            <a-col :span="12" v-if="isBlocs()">
+              <a-form-item label="挂牌价格" name="FixedPrice" class="inputIconBox">
+                <a-input-number
+                  class="commonInput"
+                  style="width: 140px"
+                  :min="0"
+                  v-model:value="formState.FixedPrice"
+                />
+                <a-checkbox class="commonCheckbox" v-model:checked="priceCheck">可议价</a-checkbox>
               </a-form-item>
             </a-col>
-
           </a-row>
-          <a-row :gutter="24"
-                 v-if="isFloat()">
+          <a-row :gutter="24" v-if="isFloat()">
             <a-col :span="24">
-              <a-form-item label="行情商品"
-                           name="goodsid">
+              <a-form-item label="行情商品" name="goodsid">
                 <!-- <a-select class="inlineFormSelect"
                           style="width: 135px"
                           placeholder="请择交易所">
-                                </a-select>-->
-                <a-select class="inlineFormSelect ml5"
-                          @change="handleGoodsGroups"
-                          style="width: 180px"
-                          v-model:value="formState.goodsgroupid"
-                          placeholder="请选择商品">
-                  <a-select-option v-for="item in goodsGroup"
-                                   :value="item.goodsgroupid"
-                                   :key="item.goodsgroupid">{{ item.goodsgroupname }}
-                  </a-select-option>
+                </a-select>-->
+                <a-select
+                  class="inlineFormSelect ml5"
+                  @change="handleGoodsGroups"
+                  style="width: 180px"
+                  v-model:value="formState.goodsgroupid"
+                  placeholder="请选择商品"
+                >
+                  <a-select-option
+                    v-for="item in goodsGroup"
+                    :value="item.goodsgroupid"
+                    :key="item.goodsgroupid"
+                  >{{ item.goodsgroupname }}</a-select-option>
                 </a-select>
-                <a-select class="inlineFormSelect ml5"
-                          style="width: 180px"
-                          @change="handleGoodsChange"
-                          v-model:value="formState.goodsid"
-                          placeholder="请选择合约">
-                  <a-select-option v-for="item in goodsList"
-                                   :value="item.goodsid"
-                                   :key="item.goodsid">{{ item.goodsname }}</a-select-option>
+                <a-select
+                  class="inlineFormSelect ml5"
+                  style="width: 180px"
+                  @change="handleGoodsChange"
+                  v-model:value="formState.goodsid"
+                  placeholder="请选择合约"
+                >
+                  <a-select-option
+                    v-for="item in goodsList"
+                    :value="item.goodsid"
+                    :key="item.goodsid"
+                  >{{ item.goodsname }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
             <a-col :span="12">
-              <a-form-item label="挂牌数量"
-                           class="inputIconBox"
-                           name="OrderQty">
-                <a-input-number class="dialogInput"
-                                style="width: 140px !important"
-                                :min="0"
-                                v-model:value="formState.OrderQty"
-                                placeholder="请输入挂牌数量" />
+              <a-form-item label="挂牌数量" class="inputIconBox" name="OrderQty">
+                <a-input-number
+                  class="dialogInput"
+                  style="width: 140px !important"
+                  :min="0"
+                  v-model:value="formState.OrderQty"
+                  placeholder="请输入挂牌数量"
+                />
                 <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                <a-checkbox class="commonCheckbox"
-                            v-if="isBlocs()"
-                            v-model:checked="numCheck">整单</a-checkbox>
+                <a-checkbox class="commonCheckbox" v-if="isBlocs()" v-model:checked="numCheck">整单</a-checkbox>
               </a-form-item>
             </a-col>
-            <a-col :span="12"
-                   v-if="!numCheck">
-              <a-form-item label="起摘数量"
-                           class="relative"
-                           name="DelistMinQty">
-                <a-input-number class="commonInput"
-                                :min="0"
-                                v-model:value="formState.DelistMinQty"
-                                style="width: 140px !important" />
+            <a-col :span="12" v-if="!numCheck">
+              <a-form-item label="起摘数量" class="relative" name="DelistMinQty">
+                <a-input-number
+                  class="commonInput"
+                  :min="0"
+                  v-model:value="formState.DelistMinQty"
+                  style="width: 140px !important"
+                />
                 <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
                 <div class="tip-listing">
                   <span>最小单位:</span>
@@ -124,14 +127,15 @@
             </a-col>
           </a-row>
           <a-row :gutter="24">
-            <a-col :span="12"
-                   class="mt-20">
+            <a-col :span="12" class="mt-20">
               <a-form-item>
-                <a-slider v-model:value="formState.OrderQty"
-                          :min="0"
-                          :max="selectedRow.enableqty"
-                          class="formSlider"
-                          style="width: 140px" />
+                <a-slider
+                  v-model:value="formState.OrderQty"
+                  :min="0"
+                  :max="selectedRow.enableqty"
+                  class="formSlider"
+                  style="width: 140px"
+                />
                 <div class="unit">
                   <span>0</span>
                   <span>{{ selectedRow.enableqty }}{{ selectedRow.enumdicname }}</span>
@@ -140,112 +144,103 @@
             </a-col>
             <a-col :span="12">&nbsp;</a-col>
           </a-row>
-          
-            <a-row :gutter="24">
-              <a-col :span="12">
-                <a-form-item label="履约保证金"
-                             name="margin">
-                  <a-input-number class="commonInput"
-                                  v-model:value="formState.margin"
-                                  :min="0"
-                                  style="width: 140px" />
-                  <span class="input-enumdicname">%</span>
-                </a-form-item>
-              </a-col>
-              <a-col :span="12">
-                <a-form-item label="挂牌有效期"
-                             name="vidaliteTime"
-                             class="inputIconBox">
-                  <a-date-picker style="width: 140px"
-                                 v-model:value="formState.vidaliteTime"
-                                 :allowClear="false"
-                                 class="commonDatePicker dialogDatePicker" />
-                </a-form-item>
-              </a-col>
-            </a-row>
-            <a-row :gutter="24">
-              <a-col :span="12">
-                <a-form-item label="履约方式"
-                             class="inputIconBox">
-                  <span :class="['clickBox', formState.permanceTempName ? 'white' : '']"
-                        style="width: 140px"
-                        @click="handlePermance">{{ formState.permanceTempName ? formState.permanceTempName : '选择履约模板' }}</span>
-                  <svg class="icon svg-icon"
-                       aria-hidden="true"
-                       @click="handlePermance">
-                    <use xlink:href="#icon-moban" />
-                  </svg>
-                </a-form-item>
-              </a-col>
-              <template v-if="isBlocs()">
+
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="履约保证金" name="margin">
+                <a-input-number
+                  class="commonInput"
+                  v-model:value="formState.margin"
+                  :min="0"
+                  style="width: 140px"
+                />
+                <span class="input-enumdicname">%</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="挂牌有效期" name="vidaliteTime" class="inputIconBox">
+                <a-date-picker
+                  style="width: 140px"
+                  v-model:value="formState.vidaliteTime"
+                  :allowClear="false"
+                  class="commonDatePicker dialogDatePicker"
+                />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="履约方式" class="inputIconBox">
+                <span
+                  :class="['clickBox', formState.permanceTempName ? 'white' : '']"
+                  style="width: 140px"
+                  @click="handlePermance"
+                >{{ formState.permanceTempName ? formState.permanceTempName : '选择履约模板' }}</span>
+                <svg class="icon svg-icon" aria-hidden="true" @click="handlePermance">
+                  <use xlink:href="#icon-moban" />
+                </svg>
+              </a-form-item>
+            </a-col>
+            <template v-if="isBlocs()">
               <a-col :span="12">
-                <a-form-item label="指定朋友"
-                             class="inputIconBox">
-                  <span :class="['clickBox', getFriendLength() ? 'white' : '']"
-                        style="width: 140px"
-                        @click="openFriend">{{ getFriendLength() ? `已选${getFriendLength()}人` : '选择朋友' }}</span>
-                  <svg class="icon svg-icon"
-                       aria-hidden="true"
-                       @click="openFriend">
+                <a-form-item label="指定朋友" class="inputIconBox">
+                  <span
+                    :class="['clickBox', getFriendLength() ? 'white' : '']"
+                    style="width: 140px"
+                    @click="openFriend"
+                  >{{ getFriendLength() ? `已选${getFriendLength()}人` : '选择朋友' }}</span>
+                  <svg class="icon svg-icon" aria-hidden="true" @click="openFriend">
                     <use xlink:href="#icon-pengyou1" />
                   </svg>
-                  <a-checkbox class="commonCheckbox"
-                              v-model:checked="friendCheck"
-                              @change="limiteFriends">不限</a-checkbox>
+                  <a-checkbox
+                    class="commonCheckbox"
+                    v-model:checked="friendCheck"
+                    @change="limiteFriends"
+                  >不限</a-checkbox>
                 </a-form-item>
               </a-col>
-              </template>
-            </a-row>
-          <a-row :gutter="24"
-                 v-if="isFloat()">
+            </template>
+          </a-row>
+          <a-row :gutter="24" v-if="isFloat()">
             <a-col :span="12">
-              <a-form-item label="基差"
-                           name="PriceMove">
-                <a-input-number class="commonInput"
-                                v-model:value="formState.PriceMove"
-                                style="width: 140px" />
+              <a-form-item label="基差" name="PriceMove">
+                <a-input-number
+                  class="commonInput"
+                  v-model:value="formState.PriceMove"
+                  style="width: 140px"
+                />
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
-            <a-col :span="24"
-                   v-if="isFloat()"
-                   class="relative">
+            <a-col :span="24" v-if="isFloat()" class="relative">
               <a-form-item :label="'估算价'">
                 <span class="white ml8">{{ getPrice() }}</span>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
-            <a-col :span="24"
-                   v-if="isFloat()"
-                   class="relative">
+            <a-col :span="24" v-if="isFloat()" class="relative">
               <a-form-item :label="'估算金额'">
                 <span class="white ml8">{{ getWrMoney() }}</span>
               </a-form-item>
             </a-col>
-            <a-col :span="24"
-                   v-if="isFixed()"
-                   class="relative">
+            <a-col :span="24" v-if="isFixed()" class="relative">
               <a-form-item :label="'挂牌金额'">
                 <span class="white ml8">{{ getWrMoney() }}</span>
               </a-form-item>
             </a-col>
-            <a-col :span="24"
-                   v-if="isBlocs()"
-                   class="relative">
+            <a-col :span="24" v-if="isBlocs()" class="relative">
               <a-form-item :label="'挂牌金额'">
                 <span class="white ml8">{{ getMoney() }}</span>
               </a-form-item>
             </a-col>
-            <a-col :span="24"
-                   v-if="getWrMargin() && !isBlocs()">
+            <a-col :span="24" v-if="getWrMargin() && !isBlocs()">
               <a-form-item :label="getWrMargin() ? '履约保证金' : ''">
                 <span class="white ml8">{{ getWrMargin() }}</span>
               </a-form-item>
             </a-col>
-            <a-col :span="24"
-                   v-if="isBlocs()">
+            <a-col :span="24" v-if="isBlocs()">
               <a-form-item label="履约保证金">
                 <span class="white ml8">{{ getMargin() }}</span>
               </a-form-item>
@@ -258,17 +253,15 @@
           </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">卖出</a-button>
-              <a-button class="ml10 cancelBtn"
-                        :loading="loading"
-                        :disabled="loading"
-                        @click="cancel">取消</a-button>
+              <a-button class="listedBtn" :loading="loading" :disabled="loading" @click="submit">卖出</a-button>
+              <a-button
+                class="ml10 cancelBtn"
+                :loading="loading"
+                :disabled="loading"
+                @click="cancel"
+              >取消</a-button>
             </a-form-item>
           </a-col>
         </a-row>
@@ -276,17 +269,21 @@
     </div>
   </Drawer>
   <!-- 选择朋友 -->
-  <Friend v-if="showFriend"
-          :friends="formState.friends"
-          :position="'bottom'"
-          @cancel="chooseFriend"
-          @update="chooseFriend" />
+  <Friend
+    v-if="showFriend"
+    :friends="formState.friends"
+    :position="'bottom'"
+    @cancel="chooseFriend"
+    @update="chooseFriend"
+  />
   <!-- 选择履约模板 -->
-  <Permance v-if="showPermance"
-            :position="'bottom'"
-            :marketid="formState.marketid"
-            @cancel="choosePermance"
-            @update="choosePermance" />
+  <Permance
+    v-if="showPermance"
+    :position="'bottom'"
+    :marketid="formState.marketid"
+    @cancel="choosePermance"
+    @update="choosePermance"
+  />
 </template>
 
 <script lang="ts">
@@ -315,127 +312,125 @@ import { ListingForm } from './interface';
 import { handleForm, handleGoods, handleNumAndPrice, queryMarketSection } from './setup';
 
 export default defineComponent({
-    name: ModalEnum.spot_warrant_spot_details_listed,
-    components: { Drawer, Friend, Permance },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<WrHoldLB>,
-            default: {},
-        },
+  name: ModalEnum.spot_warrant_spot_details_listed,
+  components: { Drawer, Friend, Permance },
+  emits: ['cancel', 'update'],
+  props: {
+    selectedRow: {
+      type: Object as PropType<WrHoldLB>,
+      default: {},
     },
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
-        const { rules, formState, formRef } = handleForm(props.selectedRow);
+  },
+  setup(props, context) {
+    const loading = ref<boolean>(false);
+    const { visible, cancel } = _closeModal(context);
+    const { rules, formState, formRef } = handleForm(props.selectedRow);
 
-        // 选择朋友
-        const { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends } = useBlocksFriends(formState);
-        // 履约模板
-        const { showPermance, choosePermance, openPermance } = useBlocksPermaceTemp(formState);
-        // 价格
-        const { priceCheck, increasePrice, decreasePrice } = useBlocksPrice(formState);
-        // 摘牌数量
-        const { numCheck, increaseNumber, decreaseNumber } = useBlocksNumber(formState);
+    // 选择朋友
+    const { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends } = useBlocksFriends(formState);
+    // 履约模板
+    const { showPermance, choosePermance, openPermance } = useBlocksPermaceTemp(formState);
+    // 价格
+    const { priceCheck, increasePrice, decreasePrice } = useBlocksPrice(formState);
+    // 摘牌数量
+    const { numCheck, increaseNumber, decreaseNumber } = useBlocksNumber(formState);
 
-        const { goodsGroup, goodsList, groupsChange, findGoodsCode } = handleGoods();
+    const { goodsGroup, goodsList, groupsChange, findGoodsCode } = handleGoods();
 
-        // 获取仓单贸易市场
-        const { spotMarkets } = queryMarketSection(false)
+    // 获取仓单贸易市场
+    const { spotMarkets } = queryMarketSection(false)
 
-        // 切换市场
-        function handleMarket(value: number) {
-          const market = spotMarkets.value.find(item => item.marketid === value)
-          if (!market) return
+    // 切换市场
+    function handleMarket(value: number) {
+      const market = spotMarkets.value.find(item => item.marketid === value)
+      if (!market) return
 
-          // 判断所选择市场挂牌方式 1:一口价 2:浮动价 3:贸易圈 4:协议指定
-          if (market.listingmode === 1) {
-            formState.WRPriceType = 1
-          } else if (market.listingmode === 2) {
-            formState.WRPriceType = 2
-          } else {
-            formState.WRPriceType = 3
-          }
-        }
-
-        // 点选履约模板
-        function handlePermance() {
-          // 必须先选择市场再选择对应的履约模板
-          if (!formState.marketid) {
-            message.info('请先选择市场')
-            return
-          }
+      // 判断所选择市场挂牌方式 1:一口价 2:浮动价 3:贸易圈 4:协议指定
+      if (market.listingmode === 1) {
+        formState.WRPriceType = 1
+      } else if (market.listingmode === 2) {
+        formState.WRPriceType = 2
+      } else {
+        formState.WRPriceType = 3
+      }
+    }
 
-          openPermance()
-        }
+    // 点选履约模板
+    function handlePermance() {
+      // 必须先选择市场再选择对应的履约模板
+      if (!formState.marketid) {
+        message.info('请先选择市场')
+        return
+      }
 
-        // 切换商品组
-        function handleGoodsGroups(value: number) {
-            groupsChange(value);
-            formState.goodsid = undefined;
-            // formRef.value.validate();
-        }
-        const uuid = v4();
-        const goodsCode = ref<string>('');
-        // 切换商品
-        function handleGoodsChange(id: number) {
-            //行情订阅
-            removeSubscribeQuotation(uuid);
-            goodsCode.value = goodsList.value.find((e) => e.goodsid === id)?.goodscode as string;
-            const arr = [{ exchangeCode: 250, goodsCode: goodsCode.value, subState: 0 }];
-            addSubscribeQuotation(uuid, arr);
-            formRef.value.validate();
-        }
-        // 估算价
-        function getPrice() {
-            let result = '--';
-            if (goodsCode.value) {
-                const goodsPrice = getQuoteDayInfoByCodeFindPrice(goodsCode.value);
-                if (goodsPrice && goodsPrice !== '--') {
-                    // 有实时行情价格
-                    result = ((goodsPrice as number) + formState.PriceMove).toFixed(2);
-                }
-            }
+      openPermance()
+    }
 
-            return result;
+    // 切换商品组
+    function handleGoodsGroups(value: number) {
+      groupsChange(value);
+      formState.goodsid = undefined;
+      // formRef.value.validate();
+    }
+    const uuid = v4();
+    const goodsCode = ref<string>('');
+    // 切换商品
+    function handleGoodsChange(id: number) {
+      //行情订阅
+      removeSubscribeQuotation(uuid);
+      goodsCode.value = goodsList.value.find((e) => e.goodsid === id)?.goodscode as string;
+      const arr = [{ exchangeCode: 250, goodsCode: goodsCode.value, subState: 0 }];
+      addSubscribeQuotation(uuid, arr);
+      formRef.value.validate();
+    }
+    // 估算价
+    function getPrice() {
+      let result = '--';
+      if (goodsCode.value) {
+        const goodsPrice = getQuoteDayInfoByCodeFindPrice(goodsCode.value);
+        if (goodsPrice && goodsPrice !== '--') {
+          // 有实时行情价格
+          result = ((goodsPrice as number) + formState.PriceMove).toFixed(2);
         }
-        onMounted(() => {
-            removeSubscribeQuotation(uuid);
-        });
-        const { getWrMoney, getWrMargin, isFloat, isFixed, isBlocs } = handleNumAndPrice();
-        function submit() {
-            debugger;
-            // 市场信息
-            if (!formState.marketid) { 
-              message.info("请选择市场")
-              return
-            }
-            // const marketInfo = getMarketRunByTradeMode(17);
-            const market = spotMarkets.value.find(item => item.marketid === formState.marketid)
-            if (!market) {
-              message.info("市场信息异常,请稍后重试")
-              return
-            }
+      }
 
-            // 履约模板
-            if (!formState.permanceTempName) {
-              message.info('请选择履约模板')
-              return
-            }
+      return result;
+    }
+    onMounted(() => {
+      removeSubscribeQuotation(uuid);
+    });
+    const { getWrMoney, getWrMargin, isFloat, isFixed, isBlocs } = handleNumAndPrice();
+    function submit() {
+      // 市场信息
+      if (!formState.marketid) {
+        message.info("请选择市场")
+        return
+      }
+      // const marketInfo = getMarketRunByTradeMode(17);
+      const market = spotMarkets.value.find(item => item.marketid === formState.marketid)
+      if (!market) {
+        message.info("市场信息异常,请稍后重试")
+        return
+      }
 
-            const marketInfo = getMarketRunByTradeMode(market!.trademode)
-            if (marketInfo) {
-                validateAction<ListingForm>(formRef, formState).then((res) => {
-                    const wrGoodsInfo: WRGoodsInfo = {
-                        GoodsID: res.goodsid as number, // uint32 配置商品ID
-                        GoodsCode: findGoodsCode(res.goodsid as number) as string, // string 配置商品代码
-                        PriceFactor: 1, // double 商品价格系数
-                        PriceMove: 0, // double 商品升贴水值
-                        WeightRatio: 1, // double 商品重量系数
-                    };
+      // 履约模板
+      if (!formState.permanceTempName) {
+        message.info('请选择履约模板')
+        return
+      }
 
-                    // 仓单贸易挂牌  (仓单贸易 = HasWr = 1)
+      const marketInfo = getMarketRunByTradeMode(market!.trademode)
+      if (marketInfo) {
+        validateAction<ListingForm>(formRef, formState).then((res) => {
+          const wrGoodsInfo: WRGoodsInfo = {
+            GoodsID: res.goodsid as number, // uint32 配置商品ID
+            GoodsCode: findGoodsCode(res.goodsid as number) as string, // string 配置商品代码
+            PriceFactor: 1, // double 商品价格系数
+            PriceMove: 0, // double 商品升贴水值
+            WeightRatio: 1, // double 商品重量系数
+          };
 
+          // 仓单贸易挂牌  (仓单贸易 = HasWr = 1)
                     const param = {
                         AccountID: getInTaAccount(), // 默认内部资金账号第一个
                         ClientSerialNo: v4(), // 客户端流水号
@@ -512,161 +507,161 @@ export default defineComponent({
             } else {
                 message.error('市场信息未获取到,请联系管理员!');
             }
-        }
+    }
 
-        return {
-            submit,
-            visible,
-            cancel,
-            loading,
-            rules,
-            formState,
-            formRef,
-            goodsGroup,
-            goodsList,
-            handleGoodsGroups,
-            handleGoodsChange,
-            getWrMoney,
-            getWrMargin,
-            isFloat,
-            isFixed,
-            isBlocs,
-            getCanUseMoney,
-            priceCheck,
-            increasePrice,
-            decreasePrice,
-            ...useBlocksAccount(formState),
-            ...useBlocksMoney(formState),
-            showPermance,
-            choosePermance,
-            openPermance,
-            numCheck,
-            increaseNumber,
-            decreaseNumber,
-            friendCheck,
-            showFriend,
-            chooseFriend,
-            openFriend,
-            getFriendLength,
-            limiteFriends,
-            getPrice,
-            spotMarkets,
-            handleMarket,
-            handlePermance,
-        };
-    },
+    return {
+      submit,
+      visible,
+      cancel,
+      loading,
+      rules,
+      formState,
+      formRef,
+      goodsGroup,
+      goodsList,
+      handleGoodsGroups,
+      handleGoodsChange,
+      getWrMoney,
+      getWrMargin,
+      isFloat,
+      isFixed,
+      isBlocs,
+      getCanUseMoney,
+      priceCheck,
+      increasePrice,
+      decreasePrice,
+      ...useBlocksAccount(formState),
+      ...useBlocksMoney(formState),
+      showPermance,
+      choosePermance,
+      openPermance,
+      numCheck,
+      increaseNumber,
+      decreaseNumber,
+      friendCheck,
+      showFriend,
+      chooseFriend,
+      openFriend,
+      getFriendLength,
+      limiteFriends,
+      getPrice,
+      spotMarkets,
+      handleMarket,
+      handlePermance,
+    };
+  },
 });
 </script>
 
 <style lang="less" scoped>
 .inputIconBox .input-enumdicname {
-    right: 100px;
+  right: 100px;
 }
 .ant-form.inlineForm .relative.ant-form-item .tip {
-    top: -5px;
-    left: calc(100% + 5px);
-    white-space: normal;
-    span {
-        display: block;
-        line-height: 15px;
-    }
+  top: -5px;
+  left: calc(100% + 5px);
+  white-space: normal;
+  span {
+    display: block;
+    line-height: 15px;
+  }
 }
 .listing {
-    width: 100%;
-    height: 100%;
-    .flex;
-    flex-direction: column;
-    overflow: hidden;
-    .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;
-        }
+  width: 100%;
+  height: 100%;
+  .flex;
+  flex-direction: column;
+  overflow: hidden;
+  .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;
+      }
     }
-    /deep/.ant-form {
-        .formBar {
-            height: calc(100% - 98px);
-            .clickBox {
-                height: 30px;
-            }
-            .ant-row.inputIconBox.ant-form-item {
-                .ant-col.ant-form-item-control-wrapper {
-                    .ant-form-item-control {
-                        .ant-form-item-children {
-                            width: 232px;
-                            .ant-checkbox-wrapper.commonCheckbox {
-                                left: 140px;
-                                .ant-checkbox {
-                                    margin-right: 0;
-                                }
-                            }
-                        }
-                    }
+    .conditionBtn + .conditionBtn {
+      margin-left: 10px;
+    }
+  }
+  /deep/.ant-form {
+    .formBar {
+      height: calc(100% - 98px);
+      .clickBox {
+        height: 30px;
+      }
+      .ant-row.inputIconBox.ant-form-item {
+        .ant-col.ant-form-item-control-wrapper {
+          .ant-form-item-control {
+            .ant-form-item-children {
+              width: 232px;
+              .ant-checkbox-wrapper.commonCheckbox {
+                left: 140px;
+                .ant-checkbox {
+                  margin-right: 0;
                 }
+              }
             }
+          }
         }
+      }
     }
+  }
 }
 .mt-20 {
-    margin-top: -20px;
+  margin-top: -20px;
 }
 .unit {
-    margin-left: 70px;
-    width: 140px;
-    .flex;
-    justify-content: space-between;
-    font-size: 14px;
-    color: @m-grey41;
-    height: 14px;
-    line-height: 14px;
+  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;
-    }
+  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;
-    }
+  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;
+  margin-left: 10px;
 }
 .ml5 {
-    margin-left: 5px;
+  margin-left: 5px;
 }
 </style>;

+ 6 - 7
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/setup.ts

@@ -3,16 +3,16 @@ import { validateCommon } from '@/common/setup/validate';
 import { handleForm as useForm } from '@/common/setup/warehouse_receipt_trade/listing';
 import { useVerifyBeginDelistingNum, useVerifyListingBasis, useVerifyListingNum } from '@/hooks/form/verify';
 import { getGoodsGroupsByTradeMode, getIPOGoodsList, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
+import { getAllMarkets } from '@/services/bus/market';
 import { getRules } from '@/services/bus/rules';
 import { Goods } from "@/services/go/ermcp/goodsInfo/interface";
+import { queryTjmdMarketSection } from "@/services/go/Tjmd";
+import { TjmdMarketSectionConfig } from '@/services/go/Tjmd/interface';
 import { WrHoldLB } from "@/services/go/wrtrade/interface";
 import { RuleObject } from 'ant-design-vue/lib/form/interface';
 import moment from 'moment';
 import { onBeforeUnmount, reactive, ref, UnwrapRef } from "vue";
 import { ListingForm } from "./interface";
-import { queryTjmdMarketSection } from "@/services/go/Tjmd"
-import { TjmdMarketSection, TjmdMarketSectionConfig } from '@/services/go/Tjmd/interface';
-import { getAllMarkets } from '@/services/bus/market';
 
 function initFormData(): ListingForm {
     return {
@@ -135,17 +135,16 @@ export function handleNumAndPrice() {
  * 查询市场板块,用于挂牌时挂牌方式选择,替代之前的“一口价、浮动价和贸易圈”
  */
 export function queryMarketSection(isPre: boolean) {
-    const spotMarkets = ref<TjmdMarketSectionConfig[]>([]); 
+    const spotMarkets = ref<TjmdMarketSectionConfig[]>([]);
     queryTjmdMarketSection().then(res => {
-        debugger;
         let resMarkets: TjmdMarketSectionConfig[] = []
         res.forEach(item => { resMarkets.push(...item.mlist) })
         // 根据有无仓单过滤出仓单市场
         // 过滤掉没有权限的市场
         const markets = getAllMarkets()
-        resMarkets = resMarkets.filter(item => 
+        resMarkets = resMarkets.filter(item =>
             item.auctionwrtype === (isPre ? 1 : 2) && (item.trademode === TradeMode.WarehouseReceiptTrade)
-        ).filter(item => 
+        ).filter(item =>
             markets.findIndex(m => m.marketid === item.marketid) !== -1
         )
         spotMarkets.value = resMarkets

+ 74 - 72
src/views/order/swap_the_order/components/swap_commodity_contract_summary/components/swap_commodity_contract_summary_deal_closed/index.vue

@@ -1,79 +1,81 @@
 <template>
-  <!-- 协议平仓-->
-  <Drawer :title="'协议平仓'"
-          :placement="'right'"
-          class="bottom486"
-          :visible="visible"
-          @cancel="cancel">
-    <div class="listed c_c_s_s">
-      <a-form class="inlineForm dialogForm"
-              ref="formRef"
-              :model="formState"
-              :rules="rules">
-        <div class="formBar">
-          <div class="formtop">
-            <div class="firstTitle">
-              <span>合约:{{selectedRow.goodscode}}/{{selectedRow.goodsname}}</span>
-            </div>
-            <div class="secondLine">
-              <div class="left">持仓单号/方向</div>
-              <div class="middle">数量/价格/金额</div>
-              <div class="right">到期日/盈亏</div>
-            </div>
+    <!-- 协议平仓-->
+    <Drawer
+        :title="'协议平仓'"
+        :placement="'right'"
+        class="bottom486"
+        :visible="visible"
+        @cancel="cancel"
+    >
+        <div class="listed c_c_s_s">
+            <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
+                <div class="formBar">
+                    <div class="formtop">
+                        <div class="firstTitle">
+                            <span>合约:{{ selectedRow.goodscode }}/{{ selectedRow.goodsname }}</span>
+                        </div>
+                        <div class="secondLine">
+                            <div class="left">持仓单号/方向</div>
+                            <div class="middle">数量/价格/金额</div>
+                            <div class="right">到期日/盈亏</div>
+                        </div>
 
-              <div class="lineBar">
-                <div class="line1">
-                  <div class="name">{{ selectedRow.tradeid }}
-                  </div>
-                  <div class="date">{{formatTime(selectedRow.expiredate, 'd')}}</div>
+                        <div class="lineBar">
+                            <div class="line1">
+                                <div class="name">{{ selectedRow.tradeid }}</div>
+                                <div class="date">{{ formatTime(selectedRow.expiredate, 'd') }}</div>
+                            </div>
+                            <div class="line2">
+                                <div
+                                    class="left"
+                                >{{ selectedRow.buyorsell === BuyOrSell.buy ? '买入' : '卖出' }}</div>
+                                <div class="middle">
+                                    <div>{{ selectedRow.holderqty }}</div>
+                                    <div>{{ selectedRow.holderprice }}</div>
+                                    <div>{{ selectedRow.holderamount }}</div>
+                                </div>
+                                <div class="right red">{{ useProfit(selectedRow, goodscode) }}</div>
+                            </div>
+                        </div>
+                    </div>
                 </div>
-                <div class="line2">
-                  <div class="left">{{selectedRow.buyorsell === BuyOrSell.buy ? '买入' : '卖出'}}</div>
-                  <div class="middle">
-                    <div>{{selectedRow.holderqty}}</div>
-                    <div>{{selectedRow.holderprice}}</div>
-                    <div>{{selectedRow.holderamount}}</div>
-                  </div>
-                  <div class="right red">
-                    {{useProfit(selectedRow, goodscode)}}</div>
+                <div class="fixedBtns">
+                    <a-row :gutter="24">
+                        <a-col :span="24" class="mt12">
+                            <a-form-item
+                                label="协议价"
+                                name="price"
+                                class="inputIconBox mb10 not-copy"
+                            >
+                                <a-input-number
+                                    class="commonInput not-copy"
+                                    v-model:value="formState.price"
+                                    style="width: 200px"
+                                    :min="0"
+                                />
+                                <MinusOutlined @click="decreasePrice" />
+                                <PlusOutlined @click="increasePirce" />
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24">
+                            <a-form-item label="平仓金额" class="mb10 not-copy">
+                                <span class="white">{{ getMoney() }}</span>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
+                    <a-form-item class="btnCenter mt10">
+                        <a-button
+                            class="listedBtn"
+                            :loading="loading"
+                            :disabled="loading"
+                            @click="submit"
+                        >提交</a-button>
+                        <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
+                    </a-form-item>
                 </div>
-              </div>
-          </div>
+            </a-form>
         </div>
-        <div class="fixedBtns">
-          <a-row :gutter="24">
-            <a-col :span="24"
-                   class="mt12">
-              <a-form-item label="协议价"
-                           name="price"
-                           class="inputIconBox mb10 not-copy">
-                <a-input-number class="commonInput not-copy"
-                                v-model:value="formState.price"
-                                style="width: 200px"
-                                :min="0" />
-                <MinusOutlined @click="decreasePrice" />
-                <PlusOutlined @click="increasePirce" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-item label="平仓金额"
-                           class="mb10 not-copy ">
-                <span class="white">{{getMoney()}}</span>
-              </a-form-item>
-            </a-col>
-          </a-row>
-          <a-form-item class="btnCenter mt10">
-            <a-button class="listedBtn"
-                      :loading="loading"
-                      :disabled="loading"
-                      @click="submit">提交</a-button>
-            <a-button class="ml10 cancelBtn"
-                      @click="cancel">取消</a-button>
-          </a-form-item>
-        </div>
-      </a-form>
-    </div>
-  </Drawer>
+    </Drawer>
 </template>
 
 <script lang="ts">
@@ -114,7 +116,7 @@ export default defineComponent({
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
         const { rules, formState, formRef } = handleForm();
-        const goodscode = findGoodsCode(props.selectedRow.goodsid, props.selectedRow.goodscode, props.swapList);
+        const goodscode = findGoodsCode(props.selectedRow.refgoodsid, props.selectedRow.goodscode, props.swapList);
         const loading = ref<boolean>(false);
 
         // 平仓金额

+ 71 - 70
src/views/order/swap_the_order/components/swap_commodity_contract_summary/components/swap_commodity_contract_summary_order_closed/index.vue

@@ -1,76 +1,77 @@
 <template>
-  <!-- 平仓-->
-  <Drawer :title="'平仓'"
-          :placement="'right'"
-          class="bottom486"
-          :visible="visible"
-          @cancel="cancel">
-    <div class="listed c_c_s_s">
-      <a-form class="inlineForm dialogForm"
-              ref="formRef"
-              :model="formState"
-              :rules="rules">
-        <div class="formBar">
-          <div class="formtop">
-            <div class="firstTitle">
-              <span>合约:{{ selectedRow.goodscode }}/{{ selectedRow.goodsname }}</span>
-            </div>
-            <div class="secondLine">
-              <div class="left">持仓单号/方向</div>
-              <div class="middle">数量/价格/金额</div>
-              <div class="right">到期日/盈亏</div>
-            </div>
-              <div class="lineBar">
-                <div class="line1">
-                  <div class="name">{{ selectedRow.tradeid }}
-                    <template v-if="selectedRow.holderdays">
-                      <span class="red">{{selectedRow.holderdays}}</span>天后可平
-                    </template>
-                  </div>
-                  <div class="date">{{ formatTime(selectedRow.expiredate, 'd') }}</div>
+    <!-- 平仓-->
+    <Drawer
+        :title="'平仓'"
+        :placement="'right'"
+        class="bottom486"
+        :visible="visible"
+        @cancel="cancel"
+    >
+        <div class="listed c_c_s_s">
+            <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
+                <div class="formBar">
+                    <div class="formtop">
+                        <div class="firstTitle">
+                            <span>合约:{{ selectedRow.goodscode }}/{{ selectedRow.goodsname }}</span>
+                        </div>
+                        <div class="secondLine">
+                            <div class="left">持仓单号/方向</div>
+                            <div class="middle">数量/价格/金额</div>
+                            <div class="right">到期日/盈亏</div>
+                        </div>
+                        <div class="lineBar">
+                            <div class="line1">
+                                <div class="name">
+                                    {{ selectedRow.tradeid }}
+                                    <template
+                                        v-if="selectedRow.holderdays"
+                                    >
+                                        <span class="red">{{ selectedRow.holderdays }}</span>天后可平
+                                    </template>
+                                </div>
+                                <div class="date">{{ formatTime(selectedRow.expiredate, 'd') }}</div>
+                            </div>
+                            <div class="line2">
+                                <div
+                                    class="left"
+                                >{{ selectedRow.buyorsell === BuyOrSell.buy ? '买入' : '卖出' }}</div>
+                                <div class="middle">
+                                    <div>{{ selectedRow.holderqty }}</div>
+                                    <div>{{ selectedRow.holderprice }}</div>
+                                    <div>{{ selectedRow.holderamount }}</div>
+                                </div>
+                                <div class="right red">{{ useProfit(selectedRow, goodscode) }}</div>
+                            </div>
+                        </div>
+                    </div>
                 </div>
-                <div class="line2">
-                  <div class="left">{{ selectedRow.buyorsell === BuyOrSell.buy ? '买入' : '卖出' }}</div>
-                  <div class="middle">
-                    <div>{{ selectedRow.holderqty }}</div>
-                    <div>{{ selectedRow.holderprice }}</div>
-                    <div>{{ selectedRow.holderamount }}</div>
-                  </div>
-                  <div class="right red">
-                    {{useProfit(selectedRow, goodscode)}}</div>
+                <div class="fixedBtns">
+                    <a-row :gutter="24">
+                        <a-col :span="24" class="mt12">
+                            <a-form-item label="估算价" class="inputIconBox mb10 not-copy">
+                                <!-- 估算价取标的商品行情的最新价 -->
+                                <span class="white">{{ getQuoteDayInfoByCodeFindPrice(goodscode) }}</span>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24">
+                            <a-form-item label="估算金额" class="mb10 not-copy">
+                                <span class="white">{{ getMoney() }}</span>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
+                    <a-form-item class="btnCenter mt10">
+                        <a-button
+                            class="listedBtn"
+                            :loading="loading"
+                            :disabled="loading"
+                            @click="submit"
+                        >提交</a-button>
+                        <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
+                    </a-form-item>
                 </div>
-              </div>
-          </div>
+            </a-form>
         </div>
-        <div class="fixedBtns">
-          <a-row :gutter="24">
-            <a-col :span="24"
-                   class="mt12">
-              <a-form-item label="估算价"
-                           class="inputIconBox mb10 not-copy">
-                <!-- 估算价取标的商品行情的最新价 -->
-                <span class="white">{{getQuoteDayInfoByCodeFindPrice(goodscode)}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-item label="估算金额"
-                           class="mb10 not-copy">
-                <span class="white">{{ getMoney()}}</span>
-              </a-form-item>
-            </a-col>
-          </a-row>
-          <a-form-item class="btnCenter mt10">
-            <a-button class="listedBtn"
-                      :loading="loading"
-                      :disabled="loading"
-                      @click="submit">提交</a-button>
-            <a-button class="ml10 cancelBtn"
-                      @click="cancel">取消</a-button>
-          </a-form-item>
-        </div>
-      </a-form>
-    </div>
-  </Drawer>
+    </Drawer>
 </template>
 
 <script lang="ts">
@@ -112,7 +113,7 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const goodscode = findGoodsCode(props.selectedRow.goodsid, props.selectedRow.goodscode, props.swapList);
+        const goodscode = findGoodsCode(props.selectedRow.refgoodsid, props.selectedRow.goodscode, props.swapList);
 
         const { visible, cancel } = _closeModal(context);
         const { rules, formState, formRef } = handleForm();

+ 1 - 1
src/views/order/swap_the_order/components/swap_commodity_contract_summary/setup.ts

@@ -89,7 +89,7 @@ export const useDetail = () => {
             { key: 'holderamount', title: '建仓金额' },
             { key: 'marketamount', title: '市值' },
             { key: 'profitloss', title: '浮动盈亏' },
-            { key: 'operate', title: '操作' },
+            { key: 'operate', title: '操作', width: 160 },
         ]
         return useSetColumns(list)
     }