浏览代码

屏蔽挂牌点价下单止盈止损功能

Handy_Cao 1 年之前
父节点
当前提交
3419797650
共有 1 个文件被更改,包括 26 次插入26 次删除
  1. 26 26
      src/packages/mobile/views/pricing/detail/components/trade/Index.vue

+ 26 - 26
src/packages/mobile/views/pricing/detail/components/trade/Index.vue

@@ -60,7 +60,7 @@
                              :auto-fixed="false" :decimal-length="quote?.decimalplace" :step="quote?.decimalvalue" />
                         </template>
                     </Field>
-                    <Field name="SlPrice" :rules="formRules.SlPrice"
+                    <!-- <Field name="SlPrice" :rules="formRules.SlPrice"
                         v-if="formData.PriceMode === PriceMode.Limit && formData.BuildType === BuildType.Open">
                         <template #label>
                             <Checkbox v-model="sl">止损</Checkbox>
@@ -69,8 +69,8 @@
                             <Stepper v-model="formData.SlPrice" :disabled="!sl" theme="round" button-size="22" allow-empty
                                 :default-value="0" :min="0" :decimal-length="quote?.decimalplace" :step="quote?.decimalvalue" />
                         </template>
-                    </Field>
-                    <Field name="SpPrice" :rules="formRules.SpPrice"
+                    </Field> -->
+                    <!-- <Field name="SpPrice" :rules="formRules.SpPrice"
                         v-if="formData.PriceMode === PriceMode.Limit && formData.BuildType === BuildType.Open">
                         <template #label>
                             <Checkbox v-model="sp">止盈</Checkbox>
@@ -79,7 +79,7 @@
                             <Stepper v-model="formData.SpPrice" :disabled="!sp" theme="round" button-size="22" allow-empty
                                 :default-value="0" :min="0" :decimal-length="quote?.decimalplace" :step="quote?.decimalvalue" />
                         </template>
-                    </Field>
+                    </Field> -->
                     <template v-if="formData.BuyOrSell === BuyOrSell.Buy || quote?.tradeproperty !== 2">
                         <Field label="预估可订立量">
                             <template #input>
@@ -166,8 +166,8 @@ const marketPrice = computed(() => {
     const { ask = 0, bid = 0 } = quote.value ?? {}
     return formData.BuyOrSell === BuyOrSell.Buy ? ask : bid
 })
-const sl = shallowRef(false) // 止损
-const sp = shallowRef(false) // 止盈
+// const sl = shallowRef(false) // 止损
+// const sp = shallowRef(false) // 止盈
 const position = shallowRef<Model.TradePositionRsp[]>([]) // 持仓汇总
 // 是否刷新父组件数据
 const refresh = shallowRef(true) 
@@ -227,24 +227,24 @@ const formRules: { [key in keyof Proto.OrderReq]?: FieldRule[] } = {
             return true
         }
     }],
-    SlPrice: [{
-        message: '请输入止损价',
-        validator: () => {
-            if (sl.value) {
-                return !!formData.SlPrice
-            }
-            return true
-        }
-    }],
-    SpPrice: [{
-        message: '请输入止盈价',
-        validator: () => {
-            if (sp.value) {
-                return !!formData.SpPrice
-            }
-            return true
-        }
-    }],
+    // SlPrice: [{
+    //     message: '请输入止损价',
+    //     validator: () => {
+    //         if (sl.value) {
+    //             return !!formData.SlPrice
+    //         }
+    //         return true
+    //     }
+    // }],
+    // SpPrice: [{
+    //     message: '请输入止盈价',
+    //     validator: () => {
+    //         if (sp.value) {
+    //             return !!formData.SpPrice
+    //         }
+    //         return true
+    //     }
+    // }],
 }
 
 const onBuyOrSellChanged = () => {
@@ -294,8 +294,8 @@ const onSubmit = () => {
     // 市价
     if (formData.PriceMode === PriceMode.Market) { formData.OrderPrice = marketPrice.value }
     // 限价
-    if (!sl.value) { formData.SlPrice = undefined }
-    if (!sp.value) { formData.SpPrice = undefined }
+    // if (!sl.value) { formData.SlPrice = undefined }
+    // if (!sp.value) { formData.SpPrice = undefined }
 
     fullloading((hideLoading) => {
         formSubmit().then(() => {