Kaynağa Gözat

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

marymelisa 4 yıl önce
ebeveyn
işleme
cb65c7794a

+ 1 - 1
src/services/bus/system.ts

@@ -32,7 +32,7 @@ export const notice = (logout: Function) => {
     // 注册实时行情推送通知; => 实时行情推送
     eventBus.$onOnly('quoteReceiveNtf', (msg: any) => {
         if (msg) {
-            console.warn(msg);
+            // console.warn(msg);
             parseReceivePush(msg);
         }
     });

+ 2 - 2
src/views/business/purchase/components/someprice/index.vue

@@ -98,7 +98,7 @@
               <a-input-number class="dialogInput"
                               style="width: 200px"
                               v-model:value="formState.PricedPrice"
-                              :min="0"
+                              ::min="0"
                               placeholder="请输入点价价格" />
             </a-form-item>
           </a-col>
@@ -124,7 +124,7 @@
               <a-input-number class="dialogInput"
                               style="width: 200px"
                               v-model:value="formState.PricedQty"
-                              :min="0"
+                              ::min="0"
                               :max="selectedRow.unpricedqty"
                               placeholder="请输入点价数量" />
               <div class="tip mt10">

+ 2 - 2
src/views/business/sell/components/someprice/index.vue

@@ -99,7 +99,7 @@
               <a-input-number class="dialogInput"
                               style="width: 200px"
                               v-model:value="formState.PricedPrice"
-                              :min="0"
+                              ::min="0"
                               placeholder="请输入点价价格" />
             </a-form-item>
           </a-col>
@@ -125,7 +125,7 @@
               <a-input-number class="dialogInput"
                               style="width: 200px"
                               v-model:value="formState.PricedQty"
-                              :min="0"
+                              ::min="0"
                               :max="selectedRow.unpricedqty"
                               placeholder="请输入点价数量" />
               <div class="tip mt10">

+ 14 - 7
src/views/market/spot_trade/components/buy-sell-market/components/delisting/index.vue

@@ -75,7 +75,7 @@
             <a-col :span="24"
                    class="mt-20">
               <a-form-item>
-                <a-slider :min="0"
+                <a-slider ::min="0"
                           v-model:value="formState.num"
                           :max="selectedRow.orderqty"
                           class="formSlider" />
@@ -149,14 +149,19 @@
           </a-row>
           <a-row :gutter="24">
             <a-col :span="24">
-              <a-form-item label="挂牌价格">
+              <a-form-item label="基差"
+                           v-if="isFloat()">
+                <span class="yellow">{{selectedRow.pricemove}}</span>
+              </a-form-item>
+              <a-form-item label="挂牌价格"
+                           v-if="!isFloat()">
                 <span class="yellow">{{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">{{selectedRow.orderqty}}</span>
+                <span class="white">{{selectedRow.orderqty}}{{selectedRow.enumdicname}}</span>
               </a-form-item>
             </a-col>
           </a-row>
@@ -184,8 +189,9 @@
                            name="num">
                 <a-input-number class="dialogInput"
                                 style="width: 260px"
+                                :min="0"
                                 v-model:value="formState.num"
-                                suffix="吨" />
+                                :suffix="selectedRow.enumdicname" />
               </a-form-item>
             </a-col>
           </a-row>
@@ -193,7 +199,7 @@
             <a-col :span="24"
                    class="mt-20">
               <a-form-item>
-                <a-slider :min="0"
+                <a-slider ::min="0"
                           v-model:value="formState.num"
                           :max="selectedRow.orderqty"
                           class="formSlider" />
@@ -209,7 +215,7 @@
             <a-col :span="24"
                    class="mt-20">
               <a-form-item label="挂牌金额">
-                <span class="white">50400.00</span>
+                <span class="white">--</span>
               </a-form-item>
             </a-col>
           </a-row>
@@ -278,7 +284,7 @@ export default defineComponent({
             formState.accountid = accountList[0].accountid;
         }
         const loading = ref<boolean>(false);
-        const { isSale, isBuy } = handleIs(props.enumName, props.buyOrSell);
+        const { isSale, isBuy, isFloat } = handleIs(props.enumName, props.buyOrSell);
         const { wrHoldList } = handleSpotWarrant(props.enumName, props.buyOrSell, props.parantSelectedRow, loading);
 
         function submit() {
@@ -328,6 +334,7 @@ export default defineComponent({
             submit,
             isSale,
             isBuy,
+            isFloat,
             rules,
             formState,
             formRef,

+ 9 - 1
src/views/market/spot_trade/components/buy-sell-market/components/delisting/setup.ts

@@ -39,7 +39,15 @@ export function handleIs(enumName: EnumRouterName, buyOrSell: BuyOrSell) {
     function isBuy() {
         return buyOrSell === BuyOrSell.buy
     }
-    return { isSale, isBuy }
+    /**
+     *
+     * @returns  true => 浮动价; false =>一口价
+     */
+    function isFloat() {
+        return enumName === EnumRouterName.warehouse_receipt_trade_floating_price ||
+            enumName === EnumRouterName.warehouse_pre_sale_floating_price
+    }
+    return { isSale, isBuy, isFloat }
 }
 
 // 处理现货仓单

+ 8 - 7
src/views/market/spot_trade/components/buy-sell-market/index.vue

@@ -51,19 +51,20 @@
     </div>
     <a-row>
       <a-col :span="12"
-             v-if="buyMarket.isMarket">
-        <Buy :enumName="enumName"
-             ref="buy"
-             :parantSelectedRow="selectedRow"
-             :btnList="buyMarket.btnList" />
-      </a-col>
-      <a-col :span="12"
              v-if="sellMarket.isMarket">
         <Sell :enumName="enumName"
               ref="sellRef"
               :parantSelectedRow="selectedRow"
               :btnList="sellMarket.btnList" />
       </a-col>
+      <a-col :span="12"
+             v-if="buyMarket.isMarket">
+        <Buy :enumName="enumName"
+             ref="buy"
+             :parantSelectedRow="selectedRow"
+             :btnList="buyMarket.btnList" />
+      </a-col>
+
     </a-row>
     <component :is="componentId"
                v-if="componentId"

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

@@ -57,7 +57,7 @@
             <a-col :span="24"
                    class="mt-10">
               <a-form-item>
-                <a-slider :min="0"
+                <a-slider ::min="0"
                           :max="300"
                           class="formSlider" />
                 <div class="unit">

+ 146 - 151
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/index.vue

@@ -1,155 +1,150 @@
 <template>
-    <!-- 预售仓单 现货明细 挂牌 -->
-    <Drawer :title="'挂牌'" :placement="'bottom'" :visible="visible" @cancel="cancel">
-        <div class="listed">
-            <div class="condition">
-                <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
-                <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
-                <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
-            </div>
-            <div class="formBar">
-                <a-form
-                    class="inlineForm dialogForm"
-                    ref="formRef"
-                    :model="formState"
-                    :rules="rules"
-                >
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="挂牌方式" name="WRPriceType">
-                                <a-select
-                                    class="inlineFormSelect"
-                                    default-value="1"
-                                    v-model:value="formState.WRPriceType"
-                                    style="width: 140px"
-                                >
-                                    <a-select-option :value="1">一口价</a-select-option>
-                                    <a-select-option :value="2">浮动价</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="formState.WRPriceType === 1">
-                            <a-form-item label="挂牌价" name="FixedPrice">
-                                <a-input-number
-                                    class="dialogInput"
-                                    style="width: 140px"
-                                    v-model:value="formState.FixedPrice"
-                                    placeholder="请输入挂牌价"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="formState.WRPriceType === 2">
-                            <a-form-item label="基差" name="PriceMove">
-                                <a-input
-                                    class="commonInput"
-                                    v-model:value="formState.PriceMove"
-                                    style="width: 140px"
-                                />
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="挂牌数量" name="OrderQty">
-                                <a-input-number
-                                    class="dialogInput"
-                                    style="width: 140px"
-                                    :suffix="selectedRow.enumdicname"
-                                    v-model:value="formState.OrderQty"
-                                    placeholder="请输入挂牌数量"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">
-                            <a-form-item label="起摘数量" class="relative">
-                                <a-input
-                                    class="commonInput"
-                                    :suffix="selectedRow.enumdicname"
-                                    style="width: 140px"
-                                />
-                                <div class="tip">最小单位:1{{selectedRow.enumdicname}}</div>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="交收月" name="time">
-                                <a-month-picker
-                                    style="width: 140px"
-                                    v-model:value="formState.DeliveryMonth"
-                                    :allowClear="false"
-                                    class="commonDatePicker dialogDatePicker"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">
-                            <a-form-item>&nbsp;</a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12" class="mt-20">
-                            <a-form-item>
-                                <a-slider
-                                    v-model:value="formState.OrderQty"
-                                    :min="0"
-                                    :max="selectedRow.enableqty"
-                                    class="formSlider"
-                                />
-                                <div class="unit">
-                                    <span>0</span>
-                                    <span>{{selectedRow.enableqty}}{{selectedRow.enumdicname}}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">&nbsp;</a-col>
-                    </a-row>
-                    <a-row :gutter="24" v-if="formState.WRPriceType === 2">
-                        <a-col :span="24">
-                            <a-form-item label="行情商品" name="goodsid">
-                                <!-- <a-select class="inlineFormSelect"
+  <!-- 预售仓单 现货明细 挂牌 -->
+  <Drawer :title="'挂牌'"
+          :placement="'bottom'"
+          :visible="visible"
+          @cancel="cancel">
+    <div class="listed">
+      <div class="condition">
+        <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
+        <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
+        <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
+      </div>
+      <div class="formBar">
+        <a-form class="inlineForm dialogForm"
+                ref="formRef"
+                :model="formState"
+                :rules="rules">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="挂牌方式"
+                           name="WRPriceType">
+                <a-select class="inlineFormSelect"
+                          default-value="1"
+                          v-model:value="formState.WRPriceType"
+                          style="width: 140px">
+                  <a-select-option :value="1">一口价</a-select-option>
+                  <a-select-option :value="2">浮动价</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12"
+                   v-if="formState.WRPriceType === 1">
+              <a-form-item label="挂牌价"
+                           name="FixedPrice">
+                <a-input-number class="dialogInput"
+                                style="width: 140px"
+                                v-model:value="formState.FixedPrice"
+                                placeholder="请输入挂牌价" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12"
+                   v-if="formState.WRPriceType === 2">
+              <a-form-item label="基差"
+                           name="PriceMove">
+                <a-input class="commonInput"
+                         v-model:value="formState.PriceMove"
+                         style="width: 140px" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="挂牌数量"
+                           name="OrderQty">
+                <a-input-number class="dialogInput"
+                                style="width: 140px"
+                                :suffix="selectedRow.enumdicname"
+                                v-model:value="formState.OrderQty"
+                                placeholder="请输入挂牌数量" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="起摘数量"
+                           class="relative">
+                <a-input class="commonInput"
+                         :suffix="selectedRow.enumdicname"
+                         style="width: 140px" />
+                <div class="tip">最小单位:1{{selectedRow.enumdicname}}</div>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="交收月"
+                           name="time">
+                <a-month-picker style="width: 140px"
+                                v-model:value="formState.DeliveryMonth"
+                                :allowClear="false"
+                                class="commonDatePicker dialogDatePicker" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item>&nbsp;</a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12"
+                   class="mt-20">
+              <a-form-item>
+                <a-slider v-model:value="formState.OrderQty"
+                          ::min="0"
+                          :max="selectedRow.enableqty"
+                          class="formSlider" />
+                <div class="unit">
+                  <span>0</span>
+                  <span>{{selectedRow.enableqty}}{{selectedRow.enumdicname}}</span>
+                </div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">&nbsp;</a-col>
+          </a-row>
+          <a-row :gutter="24"
+                 v-if="formState.WRPriceType === 2">
+            <a-col :span="24">
+              <a-form-item label="行情商品"
+                           name="goodsid">
+                <!-- <a-select class="inlineFormSelect"
                           style="width: 135px"
                           placeholder="请择交易所">
                                 </a-select>-->
-                                <a-select
-                                    class="inlineFormSelect ml5"
-                                    @change="groupsChange"
-                                    style="width: 135px"
-                                    v-model:value="formState.goodsgroupid"
-                                    placeholder="请选择商品"
-                                >
-                                    <a-select-option
-                                        v-for="item in goodsGroup"
-                                        :value="item.goodsgroupid"
-                                        :key="item.goodsgroupid"
-                                    >{{item.goodsgroupname}}</a-select-option>
-                                </a-select>
-                                <a-select
-                                    class="inlineFormSelect ml5"
-                                    style="width: 135px"
-                                    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" type="flex" justify="center">
-                        <a-col :span="24">
-                            <a-form-item class="tc">
-                                <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>
-        </div>
-    </Drawer>
+                <a-select class="inlineFormSelect ml5"
+                          @change="groupsChange"
+                          style="width: 135px"
+                          v-model:value="formState.goodsgroupid"
+                          placeholder="请选择商品">
+                  <a-select-option v-for="item in goodsGroup"
+                                   :value="item.goodsgroupid"
+                                   :key="item.goodsgroupid">{{item.goodsgroupname}}
+                  </a-select-option>
+                </a-select>
+                <a-select class="inlineFormSelect ml5"
+                          style="width: 135px"
+                          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"
+                 type="flex"
+                 justify="center">
+            <a-col :span="24">
+              <a-form-item class="tc">
+                <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>
+    </div>
+  </Drawer>
 </template>
 
 <script lang="ts">
@@ -172,7 +167,7 @@ import { message } from 'ant-design-vue';
 import { getGoodsGroupsByTradeMode } from '@/services/bus/goods';
 import { BuyOrSell, TradeMode } from '@/common/constants/enumCommon';
 import { HdWROrderReq, WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
-import Bus from "@/utils/eventBus";
+import Bus from '@/utils/eventBus';
 
 export default defineComponent({
     name: ModalEnum.spot_warrant_spot_details_listed,
@@ -242,12 +237,12 @@ export default defineComponent({
                         CanPart: 1, // 是否允许部份摘牌0:不允许;1:允许
                         WRTradeGoods: [wrGoodsInfo],
                         wrstandardid: props.selectedRow.wrstandardid,
-                        DeliveryMonth : moment(res.DeliveryMonth).format('YYYY/MM'), // string 交收月
+                        DeliveryMonth: moment(res.DeliveryMonth).format('YYYY/MM'), // string 交收月
                         HasWr: 0, // 0 无仓单  1: 有仓单
                     };
                     console.log(param);
                     requestResultLoadingAndInfo(hdWROrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
-                        cancel(true)
+                        cancel(true);
                     });
                 });
             }

+ 131 - 133
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/index.vue

@@ -1,140 +1,138 @@
 <template>
-    <!-- 现货仓单 现货明细 挂牌 -->
-    <Drawer :title="'挂牌'" :placement="'bottom'" :visible="visible" @cancel="cancel">
-        <div class="listing">
-            <div class="condition">
-                <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
-                <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
-                <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
-            </div>
-            <div class="formBar">
-                <a-form
-                    class="inlineForm dialogForm"
-                    ref="formRef"
-                    :model="formState"
-                    :rules="rules"
-                >
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="挂牌方式" name="WRPriceType">
-                                <a-select
-                                    class="inlineFormSelect"
-                                    default-value="1"
-                                    v-model:value="formState.WRPriceType"
-                                    style="width: 140px"
-                                >
-                                    <a-select-option :value="1">一口价</a-select-option>
-                                    <a-select-option :value="2">浮动价</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="formState.WRPriceType === 1">
-                            <a-form-item label="挂牌价" name="FixedPrice">
-                                <a-input-number
-                                    class="dialogInput"
-                                    style="width: 140px"
-                                    v-model:value="formState.FixedPrice"
-                                    placeholder="请输入挂牌价"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="formState.WRPriceType === 2">
-                            <a-form-item label="升贴水" name="PriceMove">
-                                <a-input-number
-                                    class="commonInput"
-                                    v-model:value="formState.PriceMove"
-                                    style="width: 140px"
-                                />
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="挂牌数量" name="OrderQty">
-                                <a-input-number
-                                    class="dialogInput"
-                                    style="width: 140px"
-                                    :suffix="selectedRow.enumdicname"
-                                    v-model:value="formState.OrderQty"
-                                    placeholder="请输入挂牌数量"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">
-                            <a-form-item label="起摘数量" class="relative">
-                                <a-input
-                                    class="commonInput"
-                                    :suffix="selectedRow.enumdicname"
-                                    style="width: 140px"
-                                />
-                                <div class="tip">最小单位:1{{selectedRow.enumdicname}}</div>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12" class="mt-20">
-                            <a-form-item>
-                                <a-slider
-                                    v-model:value="formState.OrderQty"
-                                    :min="0"
-                                    :max="selectedRow.enableqty"
-                                    class="formSlider"
-                                />
-                                <div class="unit">
-                                    <span>0</span>
-                                    <span>{{selectedRow.enableqty}}{{selectedRow.enumdicname}}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">&nbsp;</a-col>
-                    </a-row>
-                    <a-row :gutter="24" v-if="formState.WRPriceType === 2">
-                        <a-col :span="24">
-                            <a-form-item label="行情商品" name="goodsid">
-                                <!-- <a-select class="inlineFormSelect"
+  <!-- 现货仓单 现货明细 挂牌 -->
+  <Drawer :title="'挂牌'"
+          :placement="'bottom'"
+          :visible="visible"
+          @cancel="cancel">
+    <div class="listing">
+      <div class="condition">
+        <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
+        <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
+        <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
+      </div>
+      <div class="formBar">
+        <a-form class="inlineForm dialogForm"
+                ref="formRef"
+                :model="formState"
+                :rules="rules">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="挂牌方式"
+                           name="WRPriceType">
+                <a-select class="inlineFormSelect"
+                          default-value="1"
+                          v-model:value="formState.WRPriceType"
+                          style="width: 140px">
+                  <a-select-option :value="1">一口价</a-select-option>
+                  <a-select-option :value="2">浮动价</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12"
+                   v-if="formState.WRPriceType === 1">
+              <a-form-item label="挂牌价"
+                           name="FixedPrice">
+                <a-input-number class="dialogInput"
+                                style="width: 140px"
+                                v-model:value="formState.FixedPrice"
+                                placeholder="请输入挂牌价" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12"
+                   v-if="formState.WRPriceType === 2">
+              <a-form-item label="升贴水"
+                           name="PriceMove">
+                <a-input-number class="commonInput"
+                                v-model:value="formState.PriceMove"
+                                style="width: 140px" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="挂牌数量"
+                           name="OrderQty">
+                <a-input-number class="dialogInput"
+                                style="width: 140px"
+                                :min="0"
+                                :suffix="selectedRow.enumdicname"
+                                v-model:value="formState.OrderQty"
+                                placeholder="请输入挂牌数量" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="起摘数量"
+                           class="relative">
+                <a-input class="commonInput"
+                         :min="0"
+                         :suffix="selectedRow.enumdicname"
+                         style="width: 140px" />
+                <div class="tip">最小单位:1{{selectedRow.enumdicname}}</div>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12"
+                   class="mt-20">
+              <a-form-item>
+                <a-slider v-model:value="formState.OrderQty"
+                          ::min="0"
+                          :max="selectedRow.enableqty"
+                          class="formSlider" />
+                <div class="unit">
+                  <span>0</span>
+                  <span>{{selectedRow.enableqty}}{{selectedRow.enumdicname}}</span>
+                </div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">&nbsp;</a-col>
+          </a-row>
+          <a-row :gutter="24"
+                 v-if="formState.WRPriceType === 2">
+            <a-col :span="24">
+              <a-form-item label="行情商品"
+                           name="goodsid">
+                <!-- <a-select class="inlineFormSelect"
                           style="width: 135px"
                           placeholder="请择交易所">
                                 </a-select>-->
-                                <a-select
-                                    class="inlineFormSelect ml5"
-                                    @change="groupsChange"
-                                    style="width: 135px"
-                                    v-model:value="formState.goodsgroupid"
-                                    placeholder="请选择商品"
-                                >
-                                    <a-select-option
-                                        v-for="item in goodsGroup"
-                                        :value="item.goodsgroupid"
-                                        :key="item.goodsgroupid"
-                                    >{{item.goodsgroupname}}</a-select-option>
-                                </a-select>
-                                <a-select
-                                    class="inlineFormSelect ml5"
-                                    style="width: 135px"
-                                    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" type="flex" justify="center">
-                        <a-col :span="24">
-                            <a-form-item class="tc">
-                                <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>
-        </div>
-    </Drawer>
+                <a-select class="inlineFormSelect ml5"
+                          @change="groupsChange"
+                          style="width: 135px"
+                          v-model:value="formState.goodsgroupid"
+                          placeholder="请选择商品">
+                  <a-select-option v-for="item in goodsGroup"
+                                   :value="item.goodsgroupid"
+                                   :key="item.goodsgroupid">{{item.goodsgroupname}}
+                  </a-select-option>
+                </a-select>
+                <a-select class="inlineFormSelect ml5"
+                          style="width: 135px"
+                          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"
+                 type="flex"
+                 justify="center">
+            <a-col :span="24">
+              <a-form-item class="tc">
+                <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>
+    </div>
+  </Drawer>
 </template>
 
 <script lang="ts">

+ 13 - 1
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/setup.ts

@@ -24,9 +24,21 @@ export function handleForm(data: WrHoldLB) {
             return Promise.reject('请选择商品')
         }
     };
+    const v_num = async (rule: RuleObject, value: number) => {
+        if (value) {
+            if (value > data.enableqty || value < 1) {
+                return Promise.reject('提示挂牌数量有误')
+            } else {
+                return Promise.resolve();
+            }
+        } else {
+            return Promise.reject('请输入挂牌数量')
+        }
+    };
+
     const rules = {
         FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', min: 1, }],
-        OrderQty: [{ required: true, message: '请输入挂牌数量', trigger: 'blur', type: 'number', min: 1, ma: data.enableqty }],
+        OrderQty: [{ required: true, validator: v_num, trigger: 'blur', type: 'number' }],
         PriceMove: [{ required: true, message: '请输入升贴水', trigger: 'blur', type: 'number', }],
         goodsid: [{ required: true, validator: v_group }],
     }