li.shaoyi 2 年之前
父節點
當前提交
ecd175df2b

+ 1 - 2
src/business/trade/index.ts

@@ -558,14 +558,13 @@ export function useOrder() {
         ClientType: ClientType.Web,
         LoginID: loginStore.loginId,
         AccountID: accountStore.accountId,
-        ValidType: EValidType.VALIDTYPE_DR,
         OperateType: EOrderOperateType.ORDEROPERATETYPE_NORMAL,
         OrderSrc: OrderSrc.ORDERSRC_CLIENT,
         OperatorID: loginStore.loginId,
         ListingSelectType: EListingSelectType.LISTINGSELECTTYPE_DELISTING,
         DelistingType: EDelistingType.DELISTINGTYPE_SELECTED,
         BuildType: EBuildType.BUILDTYPE_OPEN,
-        TimevalidType: 1,
+        TimevalidType: EValidType.VALIDTYPE_DR,
         OrderFlag: 1,
     })
 

+ 6 - 0
src/packages/mobile/components/modules/quote/chart/index.less

@@ -1,4 +1,6 @@
 .app-quote-chart {
+    background-color: #fff;
+
     &__header {
         display: flex;
         align-items: center;
@@ -6,6 +8,10 @@
 
         .van-tabs {
             flex: 1;
+
+            &__nav {
+                background-color: transparent;
+            }
         }
     }
 }

+ 22 - 0
src/packages/mobile/components/modules/quote/forex/index.less

@@ -1,19 +1,41 @@
 .app-quote-forex {
     display: flex;
+    background-color: #fff;
+    margin: .2rem 0;
 
     dl {
         flex: 1;
+        padding: .24rem;
 
         dt {
             display: flex;
             justify-content: space-between;
+            padding-bottom: .24rem;
+
+            span {
+                &:last-child {
+                    font-size: .24rem;
+                    color: #999;
+                }
+            }
         }
 
         dd {
             display: flex;
+            font-size: .24rem;
+            text-align: center;
+            padding: .1rem 0;
 
             span {
                 flex: 1;
+
+                &:first-child {
+                    text-align: left;
+                }
+
+                &:last-child {
+                    text-align: right;
+                }
             }
         }
     }

+ 8 - 5
src/packages/mobile/components/modules/quote/forex/index.vue

@@ -3,7 +3,9 @@
         <dl>
             <dt>
                 <span>卖挂牌</span>
-                <span @click="navigateTo(BuyOrSell.Sell)" v-if="showMore">更多</span>
+                <span @click="navigateTo(BuyOrSell.Sell)" v-if="showMore">更多
+                    <Icon name="arrow" />
+                </span>
             </dt>
             <dd @click="onSellClick(1)">
                 <span>卖一</span>
@@ -34,7 +36,9 @@
         <dl>
             <dt>
                 <span>买挂牌</span>
-                <span @click="navigateTo(BuyOrSell.Buy)" v-if="showMore">更多</span>
+                <span @click="navigateTo(BuyOrSell.Buy)" v-if="showMore">更多
+                    <Icon name="arrow" />
+                </span>
             </dt>
             <dd @click="onBuyClick(1)">
                 <span>买一</span>
@@ -66,6 +70,7 @@
 </template>
 
 <script lang="ts" setup>
+import { Icon } from 'vant'
 import { handleNumberValue } from '@/filters'
 import { useNavigation } from '@/hooks/navigation'
 import { BuyOrSell } from '@/constants/order'
@@ -106,6 +111,4 @@ const navigateTo = (buyorsell: BuyOrSell) => {
 }
 </script>
 
-<style lang="less">
-@import './index.less';
-</style>
+<style lang="less">@import './index.less';</style>

+ 34 - 30
src/packages/mobile/components/modules/quote/price/index.less

@@ -3,57 +3,61 @@
     background-color: #fff;
     padding: .2rem 0;
 
-    &:empty {
-        display: none;
-    }
-
-    &__price {
+    &__main {
         display: flex;
         align-items: center;
-        padding: 0 .2rem;
+        text-align: center;
 
-        .wrap-left {
-            flex: 1;
+        .block {
+            &-left {
+                padding: 0 .48rem;
 
-            .price {
-                span {
-                    &:first-child {
-                        font-size: .44rem;
-                    }
+                .top-content {
+                    font-size: .44rem;
+                }
 
-                    +span {
+                .bottom-content {
+                    span+span {
                         margin-left: .2rem;
                     }
                 }
             }
 
-            .time {
-                font-size: .24rem;
-                color: #999;
-                margin-top: .1rem;
+            &-right {
+                flex: 1;
+
+                ul {
+                    display: flex;
+                    flex-wrap: wrap;
+
+                    li {
+                        display: flex;
+                        flex-direction: column;
+                        width: calc(~'100% / 3');
+                    }
+                }
             }
         }
     }
 
-    &__info {
+    &__more {
+        position: relative;
+
+        .block-icon {
+            text-align: center;
+        }
+
         ul {
             display: flex;
             flex-wrap: wrap;
-            margin-top: .2rem;
+            width: 100%;
+            background-color: #fff;
 
             li {
                 display: flex;
                 justify-content: space-between;
-                gap: .2rem;
-                width: ~"calc(100% / 3)";
-                font-size: .26rem;
-                padding: .04rem .2rem;
-
-                span {
-                    &:first-child {
-                        color: #666;
-                    }
-                }
+                width: 50%;
+                padding: .1rem .2rem;
             }
         }
     }

+ 52 - 30
src/packages/mobile/components/modules/quote/price/index.vue

@@ -1,53 +1,72 @@
 <template>
     <div class="app-quote-price">
-        <div class="app-quote-price__price" v-if="quote">
-            <div class="wrap-left">
-                <div class="price">
+        <div class="app-quote-price__main" v-if="quote">
+            <div class="block-left">
+                <div class="top-content">
                     <span :class="quote.lastColor">{{ handleNumberValue(quote.last) }}</span>
+                </div>
+                <div class="bottom-content">
                     <span :class="quote.lastColor">{{ handleNumberValue(quote.rise.toFixed(quote.decimalplace)) }}</span>
                     <span :class="quote.lastColor">{{ parsePercent(quote.change) }}</span>
                 </div>
-                <div class="time">
-                    <span>{{ formatDate(quote.lasttime, 'MM-DD HH:mm:ss') }}</span>
-                </div>
             </div>
-            <div class="wrap-right">
-                <slot></slot>
+            <div class="block-right">
+                <ul>
+                    <li>
+                        <span>开盘</span>
+                        <span>{{ handleNumberValue(quote.opened) }}</span>
+                    </li>
+                    <li>
+                        <span>最高</span>
+                        <span :class="quote.highestColor">{{ handleNumberValue(quote.highest) }}</span>
+                    </li>
+                    <li>
+                        <span>涨停</span>
+                        <span>{{ handleNumberValue(quote.limitup) }}</span>
+                    </li>
+                    <li>
+                        <span>昨结</span>
+                        <span>{{ handleNumberValue(quote.presettle) }}</span>
+                    </li>
+                    <li>
+                        <span>最低</span>
+                        <span :class="quote.lowestColor">{{ handleNumberValue(quote.lowest) }}</span>
+                    </li>
+                    <li>
+                        <span>跌停</span>
+                        <span>{{ handleNumberValue(quote.limitdown) }}</span>
+                    </li>
+                </ul>
             </div>
         </div>
-        <div class="app-quote-price__info" v-if="quote">
-            <ul>
+        <div class="app-quote-price__more" v-if="quote">
+            <div class="block-icon" @click="showMore = !showMore">
+                <Icon name="arrow-down" />
+            </div>
+            <ul v-show="showMore">
                 <li>
-                    <span>买价</span>
-                    <span :class="quote.bidColor">{{ handleNumberValue(quote.bid) }}</span>
+                    <span>买</span>
+                    <span>{{ handleNumberValue(quote.bidvolume) }}</span>
                 </li>
                 <li>
-                    <span>开盘</span>
-                    <span>{{ handleNumberValue(quote.opened) }}</span>
+                    <span>卖量</span>
+                    <span>{{ handleNumberValue(quote.askvolume) }}</span>
                 </li>
                 <li>
-                    <span>最高</span>
-                    <span :class="quote.highestColor">{{ handleNumberValue(quote.highest) }}</span>
+                    <span>买价</span>
+                    <span>{{ handleNumberValue(quote.bid) }}</span>
                 </li>
                 <li>
                     <span>卖价</span>
-                    <span :class="quote.askColor">{{ handleNumberValue(quote.ask) }}</span>
-                </li>
-                <li>
-                    <span>昨结</span>
-                    <span>{{ handleNumberValue(quote.presettle) }}</span>
-                </li>
-                <li>
-                    <span>最低</span>
-                    <span :class="quote.lowestColor">{{ handleNumberValue(quote.lowest) }}</span>
+                    <span>{{ handleNumberValue(quote.ask) }}</span>
                 </li>
                 <li>
-                    <span>涨停</span>
-                    <span>{{ handleNumberValue(quote.limitup) }}</span>
+                    <span>均价</span>
+                    <span>{{ handleNumberValue(quote.averageprice) }}</span>
                 </li>
                 <li>
-                    <span>跌停</span>
-                    <span>{{ handleNumberValue(quote.limitdown) }}</span>
+                    <span>振幅</span>
+                    <span>{{ handleNumberValue(quote.amplitude.toFixed(2)) }}</span>
                 </li>
             </ul>
         </div>
@@ -55,7 +74,9 @@
 </template>
 
 <script lang="ts" setup>
-import { parsePercent, handleNumberValue, formatDate } from '@/filters'
+import { shallowRef } from 'vue'
+import { Icon } from 'vant'
+import { parsePercent, handleNumberValue } from '@/filters'
 import { useFuturesStore } from '@/stores'
 
 const props = defineProps({
@@ -67,6 +88,7 @@ const props = defineProps({
 
 const futuresStore = useFuturesStore()
 const quote = futuresStore.getQuoteInfo(props.goodsCode)
+const showMore = shallowRef(true)
 </script>
 
 <style lang="less">

+ 1 - 1
src/packages/mobile/views/ballot/detail/components/delisting/index.vue

@@ -91,8 +91,8 @@ const onSubmit = () => {
     formData.MarketID = marketid
     formData.BuyOrSell = BuyOrSell.Buy
     formData.RelatedID = applyid
-    formData.ValidType = EValidType.VALIDTYPE_YZ
     formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
+    formData.TimevalidType = EValidType.VALIDTYPE_YZ
 
     fullloading((hideLoading) => {
         formSubmit().then(() => {

+ 3 - 3
src/packages/mobile/views/goods/detail/components/listing/Index.vue

@@ -45,12 +45,12 @@
                         <Button type="primary" :disabled="(sellQty === 0) || (orderQty > sellQty)" block round
                             @click="onBeforeSubmit(BuyOrSell.Buy)">
                             <span>转让买入</span>
-                            <span>({{ sellQty }})</span>
+                            <span v-if="sellQty">({{ sellQty }})</span>
                         </Button>
                         <Button type="primary" :disabled="(buyQty === 0) || (orderQty > buyQty)" block round
                             @click="onBeforeSubmit(BuyOrSell.Sell)">
                             <span>转让卖出</span>
-                            <span>({{ buyQty }})</span>
+                            <span v-if="buyQty">({{ buyQty }})</span>
                         </Button>
                     </template>
                 </div>
@@ -234,7 +234,7 @@ const onSubmit = () => {
     formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING
     formData.DelistingType = EDelistingType.DELISTINGTYPE_PRICE
     formData.BuildType = EBuildType.BUILDTYPE_OPEN
-    formData.ValidType = EValidType.VALIDTYPE_DR
+    formData.TimevalidType = EValidType.VALIDTYPE_DR
     formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
     formData.BuildType = props.buildType
     formData.OrderQty = orderQty.value / agreeunit.value // 数量÷合约乘数

+ 3 - 3
src/packages/mobile/views/goods/trade/components/delisting/index.vue

@@ -57,7 +57,7 @@
                         <Button type="primary" :disabled="(sellQty === 0) || (orderQty > sellQty)" block round
                             @click="onBeforeSubmit(EBuildType.BUILDTYPE_CLOSE)">
                             <span>转让卖出</span>
-                            <span>({{ sellQty }})</span>
+                            <span v-if="sellQty">({{ sellQty }})</span>
                         </Button>
                     </template>
                     <template v-if="selectedRow.buyorsell === BuyOrSell.Sell">
@@ -65,7 +65,7 @@
                         <Button type="primary" :disabled="(buyQty === 0) || (orderQty > buyQty)" block round
                             @click="onBeforeSubmit(EBuildType.BUILDTYPE_CLOSE)">
                             <span>转让买入</span>
-                            <span>({{ buyQty }})</span>
+                            <span v-if="buyQty">({{ buyQty }})</span>
                         </Button>
                     </template>
                 </div>
@@ -171,7 +171,7 @@ const onSubmit = () => {
     formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTING
     formData.DelistingType = EDelistingType.DELISTINGTYPE_SELECTED
     formData.BuildType = EBuildType.BUILDTYPE_OPEN
-    formData.ValidType = EValidType.VALIDTYPE_DR
+    formData.TimevalidType = EValidType.VALIDTYPE_DR
     formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
     formData.OrderQty = orderQty.value / agreeunit.value // 数量÷合约乘数
 

+ 1 - 1
src/packages/mobile/views/order/position/components/goods/close/Index.vue

@@ -109,7 +109,7 @@ const onCloseSumit = () => {
         formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING
         formData.DelistingType = EDelistingType.DELISTINGTYPE_PRICE
         formData.BuildType = EBuildType.BUILDTYPE_CLOSE
-        formData.ValidType = EValidType.VALIDTYPE_DR
+        formData.TimevalidType = EValidType.VALIDTYPE_DR
         formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
 
         /// loding....

+ 1 - 1
src/packages/mobile/views/order/position/components/transfer/listing/Index.vue

@@ -92,7 +92,7 @@ const onSubmit = () => {
     formData.GoodsID = goodsid
     formData.MarketID = 49201
     formData.BuyOrSell = BuyOrSell.Sell
-    formData.ValidType = EValidType.VALIDTYPE_YZ
+    formData.TimevalidType = EValidType.VALIDTYPE_YZ
     formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
     formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_LISTING
     formData.BuildType = EBuildType.BUILDTYPE_CLOSE

+ 1 - 1
src/packages/mobile/views/presale/detail/components/delisting/index.vue

@@ -101,7 +101,7 @@ const onSubmit = () => {
     formData.MarketID = marketid
     formData.BuyOrSell = BuyOrSell.Buy
     formData.RelatedID = applyid
-    formData.ValidType = EValidType.VALIDTYPE_YZ
+    formData.TimevalidType = EValidType.VALIDTYPE_YZ
     formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
 
     fullloading((hideLoading) => {

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

@@ -155,7 +155,7 @@ const onSubmit = () => {
     formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTING
     formData.DelistingType = EDelistingType.DELISTINGTYPE_SELECTED
     formData.BuildType = EBuildType.BUILDTYPE_OPEN
-    formData.ValidType = EValidType.VALIDTYPE_DR
+    formData.TimevalidType = EValidType.VALIDTYPE_DR
     formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
     formData.TriggerType = 0
     formData.ServiceTime = ""

+ 1 - 1
src/packages/mobile/views/swap/detail/components/listing/Index.vue

@@ -127,7 +127,7 @@ const onSubmit = () => {
     formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_LISTING
     formData.DelistingType = EDelistingType.DELISTINGTYPE_SELECTED
     formData.BuildType = EBuildType.BUILDTYPE_OPEN
-    formData.ValidType = EValidType.VALIDTYPE_DR
+    formData.TimevalidType = EValidType.VALIDTYPE_DR
     formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
     formData.TriggerType = 0
     formData.ServiceTime = ""

+ 1 - 1
src/packages/mobile/views/transfer/delisting/components/delisting/index.vue

@@ -116,7 +116,7 @@ const onSubmit = () => {
     formData.MarketID = 49201
     formData.BuyOrSell = BuyOrSell.Buy
     formData.RelatedID = orderid
-    formData.ValidType = EValidType.VALIDTYPE_YZ
+    formData.TimevalidType = EValidType.VALIDTYPE_YZ
     formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
     formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTING
     formData.BuildType = EBuildType.BUILDTYPE_OPEN