Handy_Cao před 2 roky
rodič
revize
75c97622d8

+ 6 - 0
src/packages/mobile/views/swap/detail/Index.vue

@@ -89,6 +89,12 @@ const { pageIndex, loading, run, pageCount } = useRequest(queryTjmdTradeOrderDet
     }
 })
 
+/// 每隔 30 秒去刷新请求数据信息
+setTimeout(() => {
+    // 获取买卖大厅数据
+    run()
+}, 30*1000)
+
 const onRefresh = () => {
     run({
         buyorsell: tabIndex.value,

+ 14 - 4
src/packages/mobile/views/swap/detail/components/delisting/Index.vue

@@ -29,13 +29,21 @@
                     <span>{{ selectedRow.orderprice }}</span>
                 </template>
             </Field>
+            <Field label="挂牌价格" v-if="selectedRow.pricemode === 3">
+                <template #input>
+                    <RadioGroup v-model="priceMode" direction='horizontal'>
+                        <Radio :name="1">市价</Radio>
+                        <Radio :name="2">限价</Radio>
+                    </RadioGroup>
+                </template>
+            </Field>
             <Field label="可摘数量">
                 <template #input>
                     <span>{{ selectedRow.orderqty }}</span>
                 </template>
             </Field>
-            <el-form-item v-if="priceMove === 3" prop="OrderPrice" label="摘牌价格">
-                <el-input-number placeholder="请输入" :min="0" :step="Math.pow(10, -1*(goods?.decimalplace ?? 0))" :precision="(goods?.decimalplace ?? 2)" v-model="formData.OrderPrice" @change="calculateDelistingAmount"/>
+            <el-form-item v-if="priceMove === 3" prop="OrderPrice" :label="selectedRow.buyorsell === 0 ? '卖出价格' : '买入价格'">
+                <el-input-number placeholder="请输入" :min="0.0" :step="Math.pow(10, -1*(goods?.decimalplace ?? 0))" :precision="(goods?.decimalplace ?? 2)" v-model="formData.OrderPrice" @change="calculateDelistingAmount"/>
             </el-form-item>
             <Field name="OrderQty" :rules="formRules.OrderQty" label="摘牌数量">
                 <template #input>
@@ -68,7 +76,7 @@
             </Field>
         </Form>
         <template #footer>
-            <Button type="danger" block round @click="formRef?.submit">摘牌</Button>
+            <Button type="danger" block round @click="formRef?.submit">{{ selectedRow.buyorsell === 0 ? '卖出' : '买入' }}</Button>
         </template>
     </app-popup>
 </template>
@@ -115,6 +123,8 @@ const amount = shallowRef(0.0)
 const permargin = shallowRef(0.0)
 /// 价格类型
 const priceMove = shallowRef(props.selectedRow.pricemode)
+/// 价格类型
+const priceMode = shallowRef(EPriceMode.PRICEMODE_MARKET)
 /// 保证金配置
 const margin = shallowRef<Model.TjmdTodayAccountMarginRsp>()
 /// 商品信息
@@ -185,7 +195,7 @@ const onSubmit = () => {
 
     /// 获取对应的市场ID
     formData.MarketID = marketid
-    formData.PriceMode = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? EPriceMode.PRICEMODE_LIMIT : EPriceMode.PRICEMODE_MARKET
+    formData.PriceMode = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? EPriceMode.PRICEMODE_LIMIT : priceMode.value
     formData.RelatedID = handleRequestBigNumber(orderid)
     formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
     formData.GoodsID = goodsid

+ 2 - 3
src/packages/pc/views/market/trade/swap/detail/order/delisting/index.vue

@@ -41,8 +41,8 @@
             <el-form-item label="可用资金">
                 <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
             </el-form-item>
-            <el-form-item v-if="priceMove === 3" prop="OrderPrice" label="摘牌价格">
-                <el-input-number placeholder="请输入" :min="0" :step="Math.pow(10, -1*(goods?.decimalplace ?? 0))" :precision="(goods?.decimalplace ?? 2)" v-model="formData.OrderPrice" @change="calculateDelistingAmount"/>
+            <el-form-item v-if="priceMove === 3" prop="OrderPrice" :label="selectedRow.buyorsell === 0 ? '卖出价格' : '买入价格'">
+                <el-input-number placeholder="请输入" :min="0.0" :step="Math.pow(10, -1*(goods?.decimalplace ?? 0))" :precision="(goods?.decimalplace ?? 2)" v-model="formData.OrderPrice" @change="calculateDelistingAmount"/>
             </el-form-item>
             <el-form-item prop="OrderQty" label="摘牌数量">
                 <div class="g-qty-group">
@@ -204,7 +204,6 @@ const onSubmit = (buildType: number) => {
                 formData.BuildType = buildType
                 formData.TimevalidType = EValidType.VALIDTYPE_DR
                 formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
-                formData.MarketMaxSub = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? 0.0 : formData.MarketMaxSub
                 
                 formSubmit().then(() => {
                     ElMessage.success('提交成功')