Handy_Cao há 2 anos atrás
pai
commit
91ffb831bf

+ 11 - 4
src/packages/mobile/views/goods/detail/Index.vue

@@ -21,7 +21,7 @@
         </div>
         <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
         :page-count="pageCount" @refresh="onTabChange">
-            <Tabs v-model:active="tabIndex" @click="onTabChange">
+            <Tabs v-model:active="tabIndex" @click="onChange">
                 <Tab title="买大厅" />
                 <Tab title="卖大厅" />
             </Tabs>
@@ -36,7 +36,7 @@
                 </app-list>
             </div>
         </app-pull-refresh>
-        <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ selectedRow, tabIndex, item }" @closed="closeComponent"
+        <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ selectedRow, tabIndex, item, quote }" @closed="closeComponent"
             v-if="componentId" />
     </app-view>
 </template>
@@ -61,8 +61,6 @@ const componentMap = new Map<string, unknown>([
     ['listing', defineAsyncComponent(() => import('./components/listing/Index.vue'))],
 ])
 
-
-
 const loginStore = useLoginStore()
 
 const { getParamString } = useNavigation()
@@ -82,6 +80,7 @@ const { pageIndex, loading, run, pageCount } = useRequest(queryWrTradeOrderDetai
         buyorsell: tabIndex.value
     },
     onSuccess: (res) => {
+        console.log(pageIndex.value)
         if (pageIndex.value === 1) {
             dataList.value = []
         }
@@ -95,6 +94,14 @@ const { pageIndex, loading, run, pageCount } = useRequest(queryWrTradeOrderDetai
 const onTabChange = () => {
     run({
         buyorsell: tabIndex.value,
+    })
+}
+
+const onChange = () => {
+    /// 重置为1
+    pageIndex.value = 1
+    run({
+        buyorsell: tabIndex.value,
         page: 1
     })
 }

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

@@ -41,7 +41,7 @@
             </Field>
             <Field name="OrderQty" :rules="formRules.OrderQty" label="摘牌数量">
                 <template #input>
-                    <Stepper v-model="formData.OrderQty" input-width="100" theme="round" button-size="22" :min="0" :step="0.01" :max="selectedRow.orderqty" :auto-fixed="false" />
+                    <Stepper v-model="formData.OrderQty" input-width="100" theme="round" button-size="22" :min="0" :step="1" :max="selectedRow.orderqty" :auto-fixed="false" integer/>
                 </template>
             </Field>
         </Form>

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

@@ -25,8 +25,8 @@
             </Field>
             <Field name="OrderPrice" :rules="formRules.OrderPrice" label="价格">
                 <template #input>
-                    <Stepper v-model="formData.OrderPrice" input-width="100" theme="round" button-size="22"
-                        :auto-fixed="false" :step="0.01" />
+                    <Stepper v-model="formData.OrderPrice" input-width="100" :default-value="$props.tabIndex === 0 ? $props.quote.ask : $props.quote.bid" theme="round" button-size="22"
+                        :auto-fixed="false" :decimal-length="item.decimalplace" />
                 </template>
             </Field>
             <Field name="OrderQty" :rules="formRules.OrderQty" label="数量">
@@ -53,7 +53,6 @@ import { EPriceMode, EListingSelectType, EDelistingType, EBuildType, EValidType,
 import AppPopup from '@mobile/components/base/popup/index.vue'
 
 const accountStore = useAccountStore()
-
 const formRef = shallowRef<FormInstance>()
 const showModal = shallowRef(true)
 const refresh = shallowRef(true) // 是否刷新父组件数据
@@ -70,6 +69,10 @@ const props = defineProps({
     tabIndex: {
         type: Number,
         required: true
+    },
+    quote: {
+        type: Object as PropType<Model.Futures>,
+        required: true
     }
 })
 

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

@@ -21,12 +21,12 @@
                     <Form class="goods-close__form" ref="formRef" @submit="onCloseSumit" v-if="props">
                         <Field name="OrderPrice" :rules="formRules.OrderPrice" label="平仓价格">
                             <template #input>
-                                <Stepper v-model="formData.OrderPrice" input-width="100" theme="round" button-size="22" :min="0" :step="0.01" :auto-fixed="false" />
+                                <Stepper v-model="formData.OrderPrice" input-width="100" theme="round" button-size="22" :min="0" :decimal-length="selectedRow.decimalplace" :auto-fixed="false" />
                             </template>
                         </Field>
                         <Field name="OrderQty" :rules="formRules.OrderQty" label="平仓数量">
                             <template #input>
-                                <Stepper v-model="formData.OrderQty" input-width="100" theme="round" button-size="22" :min="0" :step="0.01" :max="selectedRow.enableqty" :auto-fixed="false" />
+                                <Stepper v-model="formData.OrderQty" input-width="100" theme="round" button-size="22" :min="0" :max="selectedRow.enableqty" :auto-fixed="false" integer />
                             </template>
                         </Field>
                     </Form>

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

@@ -21,7 +21,7 @@
                     <Form class="goods-close__form" ref="formRef" @submit="onDeliverySumit" v-if="props">
                         <Field name="DeliveryLot" :rules="formRules.DeliveryLot" label="交收数量">
                             <template #input>
-                                <Stepper v-model="formData.DeliveryLot" input-width="100" theme="round" button-size="22" :min="0" :step="0.01" :max="selectedRow.enableqty" :auto-fixed="false" />
+                                <Stepper v-model="formData.DeliveryLot" input-width="100" theme="round" button-size="22" :min="0" :max="selectedRow.enableqty" :auto-fixed="false" integer />
                             </template>
                         </Field>
                         <Field name="DeliveryInfo" v-model="formData.DeliveryInfo" :rules="formRules.DeliveryInfo" label="交收信息" placeholder="请输入交收信息">

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

@@ -21,7 +21,7 @@
             </div>
         <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
         :page-count="pageCount" @refresh="onTabChange">
-            <Tabs v-model:active="tabIndex" @click="onTabChange">
+            <Tabs v-model:active="tabIndex" @click="onChange">
                 <Tab title="买大厅" />
                 <Tab title="卖大厅" />
             </Tabs>
@@ -98,6 +98,14 @@ const { pageIndex, loading, run, pageCount } = useRequest(queryTjmdTradeOrderDet
 const onTabChange = () => {
     run({
         buyorsell: tabIndex.value,
+    })
+}
+
+const onChange = () => {
+    /// 重置为1
+    pageIndex.value = 1
+    run({
+        buyorsell: tabIndex.value,
         page: 1
     })
 }

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

@@ -41,7 +41,7 @@
             </Field>
             <Field name="OrderPrice" v-if="priceMove === 2" :rules="formRules.OrderPrice" label="摘牌价格">
                 <template #input>
-                    <Stepper v-model="formData.OrderPrice" input-width="100" theme="round" button-size="22" :min="0" :auto-fixed="false" />
+                    <Stepper v-model="formData.OrderPrice" input-width="100" theme="round" button-size="22" :min="0"  :auto-fixed="false" />
                 </template>
             </Field>
             <Field label="估算金额" v-if="priceMove === 3">