Handy_Cao il y a 3 ans
Parent
commit
79aa7f0ab8

+ 37 - 0
src/constants/order.ts

@@ -0,0 +1,37 @@
+import { useEnumStore } from '@/stores'
+
+const { getEnumTypeList, getEnumTypeName } = useEnumStore()
+
+/**
+ * 获取交割方式类型列表
+ * @returns 
+ */
+ export function getTHJDeliveryModeList() {
+    return getEnumTypeList('thjDeliveryMode')
+}
+
+/**
+ * 获取交割方式类型名称
+ * @returns 
+ */
+ export function getTHJDeliveryModeName(value: number) {
+    const enums = getTHJDeliveryModeList()
+    return getEnumTypeName(enums, value)
+}
+
+/**
+ * 获取单据状态类型列表
+ * @returns 
+ */
+ export function getTHJOrderStatusList() {
+    return getEnumTypeList('thjOrderStatus')
+}
+
+/**
+ * 获取单据状态类型名称
+ * @returns 
+ */
+ export function getTHJOrderStatusName(value: number) {
+    const enums = getTHJDeliveryModeList()
+    return getEnumTypeName(enums, value)
+}

+ 26 - 0
src/packages/mobile/router/index.ts

@@ -199,6 +199,32 @@ const routes: Array<RouteRecordRaw> = [
     ]
   },
   {
+    path: '/order',
+    component: Page,
+    children: [
+      {
+        path: 'order',
+        name: 'my-order',
+        component: () => import('../views/mine/order/index.vue'),
+      },
+      {
+        path: 'purchasetradedetail',
+        name: 'purchase-trade-detail',
+        component: () => import('../views/mine/order/components/purchasetradedetail/index.vue'),
+      },
+      {
+        path: 'wrorderdetail',
+        name: 'wr-order-detail',
+        component: () => import('../views/mine/order/components/wrorderdetail/index.vue'),
+      },
+      {
+        path: 'wrtradedetail',
+        name: 'wr-trade-detail',
+        component: () => import('../views/mine/order/components/wrtradedetail/index.vue'),
+      }
+    ]
+  },
+  {
     path: '/rules',
     component: Page,
     children: [

+ 17 - 1
src/packages/mobile/views/bank/wallet/components/deposit/index.vue

@@ -11,6 +11,9 @@
                 </Field>
             </CellGroup>
         </Form>
+        <div class="g-form__time">
+            <label>提现时间:{{start}}-{{end}}</label>
+        </div>
         <template #footer>
             <div class="g-form__footer">
                 <Button round block type="primary" @click="formRef?.submit()">确定</Button>
@@ -27,10 +30,14 @@ import { fullloading, dialog } from '@/utils/vant';
 import { useNavigation } from '@/hooks/navigation'
 import axios from 'axios';
 import { getServiceUrl } from '@/services/http';
+import { useUserStore } from '@/stores'
 
 const formRef = ref<FormInstance>()
 const { formData, onSubmit, extendInfo } = useDoDeposit()
 const { router } = useNavigation()
+const { getSystemParamValue } = useUserStore()
+const start = getSystemParamValue('012')
+const end = getSystemParamValue('013')
 
 /// 证件正面地址
 const fileList = ref([]);
@@ -88,4 +95,13 @@ const formSubmit = () => {
     })
 }
 
-</script>
+</script>
+
+<style lang="less">
+.g-form {
+    &__time {
+        color: #999;
+        padding-left: 15px;
+    }
+}
+</style>

+ 5 - 0
src/packages/mobile/views/bank/wallet/components/withdraw/index.less

@@ -10,4 +10,9 @@
             font-size: .24rem;
         }
     }
+
+    &__time {
+        color: #999;
+        padding-left: 15px;
+    }
 }

+ 7 - 0
src/packages/mobile/views/bank/wallet/components/withdraw/index.vue

@@ -30,6 +30,9 @@
                 </Field>
             </CellGroup>
         </Form>
+        <div class="g-form__time">
+            <label>提现时间:{{start}}-{{end}}</label>
+        </div>
         <template #footer>
             <div class="g-form__footer">
                 <Button round block type="primary" @click="formRef?.submit()">确定</Button>
@@ -44,12 +47,16 @@ import { Form, Field, CellGroup, FormInstance, Button, FieldRule, Toast } from '
 import { shallowRef } from 'vue'
 import { fullloading, dialog } from '@/utils/vant'
 import { useNavigation } from '@/hooks/navigation'
+import { useUserStore } from '@/stores'
 
 const { formData, onSubmit, sign } = useDoWithdraw()
 /// 资金账户信息
 const { fund } = useAccountFundInfo()
 const { router } = useNavigation()
 const formRef = shallowRef<FormInstance>()
+const { getSystemParamValue } = useUserStore()
+const start = getSystemParamValue('012')
+const end = getSystemParamValue('013')
 
 // 表单验证规则
 const formRules: { [key in keyof Proto.t2bBankWithdrawReq]?: FieldRule[] } = {

+ 1 - 1
src/packages/mobile/views/home/components/mine/index.vue

@@ -53,7 +53,7 @@
         <li @click="routerTo('mine-generalize')" style="align-items:flex-start">
           <app-iconfont icon="icon-wodetuiguang" label-direction="bottom">我的推广</app-iconfont>
         </li>
-        <li>
+        <li @click="routerTo('my-order')" style="align-items:flex-start">
           <app-iconfont icon="icon-wodedingdan" label-direction="bottom">我的订单</app-iconfont>
         </li>
         <!-- <li>

+ 105 - 0
src/packages/mobile/views/mine/order/components/purchasetradedetail/index.vue

@@ -0,0 +1,105 @@
+<template>
+    <app-view class="purchase">
+        <app-pull-refresh class="purchase__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
+            :updateList="dataList" @refresh="onRefresh" @updated="onRefreshUpdated">
+            <template #header>
+                <ul class="list list-row" v-if="showHeader">
+                    <li class="list-column">
+                        <span>商品</span>
+                    </li>
+                    <li class="list-column">
+                        <span>数量</span>
+                    </li>
+                    <li class="list-column">
+                        <span>预售价</span>
+                    </li>
+                    <li class="list-column">
+                        <span>实际价</span>
+                    </li>
+                    <li class="list-column">
+                        <span>定金</span>
+                    </li>
+                    <li class="list-column">
+                        <span>尾款</span>
+                    </li>
+                    <li class="list-column">
+                        <span>状态</span>
+                    </li>
+                    <Button round @click="routerTo('')">更多</Button>
+                </ul>
+            </template>
+            <template #default="{ item }">
+                <ul class="list list-row">
+                    <li class="list-column"><span>{{ item.wrstandardname }}</span></li>
+                    <li class="list-column"><span>{{ item.tradeqty }}</span></li>
+                    <li class="list-column"><span>{{ item.tradeprice }}</span></li>
+                    <li class="list-column"><span>{{ item.lastprice }}</span></li>
+                    <li class="list-column"><span>{{ item.payeddeposit }}</span></li>
+                    <li class="list-column"><span>{{ item.remainamount }}</span></li>
+                    <li class="list-column"><span>{{ item.thjorderstatusdisplay }}</span></li>
+                </ul>
+            </template>
+        </app-pull-refresh>
+    </app-view>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { useTHJPurchaseTradeDetail } from '@/business/order'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { useNavigation } from '@/hooks/navigation'
+import { Button } from 'vant'
+
+const { dataList, pageIndex, pageCount, getTHJPurchaseTradeDetail } = useTHJPurchaseTradeDetail()
+const showHeader = shallowRef(false)
+const { routerTo } = useNavigation()
+
+const onRefresh = (callback: () => void) => {
+    getTHJPurchaseTradeDetail().finally(() => callback())
+}
+
+const onRefreshUpdated = (data: Model.UserScoreLogRsp[]) => {
+    showHeader.value = data.length > 0
+}
+</script>
+
+<style lang="less">
+.purchase {
+    &__container {
+        height: 100%;
+        overflow-y: auto;
+
+        .list {
+            display: flex;
+            align-items: center;
+            background-color: #fff;
+
+            &-row {
+                font-size: .32rem;
+                border-bottom: 1px solid #eee;
+                padding: .12rem .32rem;
+            }
+
+            &-column {
+                flex: 1;
+                display: flex;
+                flex-direction: column;
+                text-align: center;
+
+                &:first-child {
+                    text-align: left;
+                }
+
+                &:last-child {
+                    text-align: right;
+                }
+
+                span:last-child {
+                    color: #999;
+                    font-size: .24rem;
+                }
+            }
+        }
+    }
+}
+</style>

+ 102 - 0
src/packages/mobile/views/mine/order/components/wrorderdetail/index.vue

@@ -0,0 +1,102 @@
+<template>
+    <app-view class="wrorderdetail">
+        <app-pull-refresh class="wrorderdetail__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
+            :updateList="dataList" @refresh="onRefresh" @updated="onRefreshUpdated">
+            <template #header>
+                <ul class="list list-row" v-if="showHeader">
+                    <li class="list-column">
+                        <span>商品</span>
+                    </li>
+                    <li class="list-column">
+                        <span>方向</span>
+                    </li>
+                    <li class="list-column">
+                        <span>挂牌价格</span>
+                    </li>
+                    <li class="list-column">
+                        <span>挂牌数量</span>
+                    </li>
+                    <li class="list-column">
+                        <span>成交数量</span>
+                    </li>
+                    <li class="list-column">
+                        <span>状态</span>
+                    </li>
+                    <Button round @click="routerTo('')">更多</Button>
+                </ul>
+            </template>
+            <template #default="{ item }">
+                <ul class="list list-row">
+                    <li class="list-column"><span>{{ item.wrstandardname }}</span></li>
+                    <li class="list-column"><span>{{ item.buyorsell === 0 ? '买入' : '卖出' }}</span></li>
+                    <li class="list-column"><span>{{ item.fixedprice }}</span></li>
+                    <li class="list-column"><span>{{ item.orderqty }}</span></li>
+                    <li class="list-column"><span>{{ item.tradeqty }}</span></li>
+                    <li class="list-column"><span></span>{{ getTHJOrderStatusName(item.wrtradeorderstatus) }}</li>
+                </ul>
+            </template>
+        </app-pull-refresh>
+    </app-view>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { useQueryWrOrderDetail } from '@/business/order'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { useNavigation } from '@/hooks/navigation'
+import { Button } from 'vant'
+import { getTHJOrderStatusName } from "@/constants/order";
+
+const { dataList, pageIndex, pageCount, getWrOrderDetail } = useQueryWrOrderDetail()
+const showHeader = shallowRef(false)
+const { routerTo } = useNavigation()
+
+const onRefresh = (callback: () => void) => {
+    getWrOrderDetail(1).finally(() => callback())
+}
+
+const onRefreshUpdated = (data: Model.UserScoreLogRsp[]) => {
+    showHeader.value = data.length > 0
+}
+</script>
+
+<style lang="less">
+.wrorderdetail {
+    &__container {
+        height: 100%;
+        overflow-y: auto;
+
+        .list {
+            display: flex;
+            align-items: center;
+            background-color: #fff;
+
+            &-row {
+                font-size: .32rem;
+                border-bottom: 1px solid #eee;
+                padding: .12rem .32rem;
+            }
+
+            &-column {
+                flex: 1;
+                display: flex;
+                flex-direction: column;
+                text-align: center;
+
+                &:first-child {
+                    text-align: left;
+                }
+
+                &:last-child {
+                    text-align: right;
+                }
+
+                span:last-child {
+                    color: #999;
+                    font-size: .24rem;
+                }
+            }
+        }
+    }
+}
+</style>

+ 104 - 0
src/packages/mobile/views/mine/order/components/wrtradedetail/index.vue

@@ -0,0 +1,104 @@
+<template>
+    <app-view class="wrtradedetail">
+        <app-pull-refresh class="wrtradedetail__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
+            :updateList="dataList" @refresh="onRefresh" @updated="onRefreshUpdated">
+            <template #header>
+                <ul class="list list-row" v-if="showHeader">
+                    <li class="list-column">
+                        <span>商品</span>
+                    </li>
+                    <li class="list-column">
+                        <span>方向</span>
+                    </li>
+                    <li class="list-column">
+                        <span>成交价格</span>
+                    </li>
+                    <li class="list-column">
+                        <span>成交数量</span>
+                    </li>
+                    <li class="list-column">
+                        <span>成交金额</span>
+                    </li>
+                    <li class="list-column">
+                        <span>成交时间</span>
+                    </li>
+                    <Button round @click="routerTo('bank-hisstatement')">更多</Button>
+                </ul>
+            </template>
+            <template #default="{ item }">
+                <ul class="list list-row">
+                    <li class="list-column"><span>{{ item.wrstandardname }}</span></li>
+                    <li class="list-column"><span>{{ item.buyorsell === 0 ? '买入' : '卖出' }}</span></li>
+                    <li class="list-column"><span>{{ item.tradeprice }}</span></li>
+                    <li class="list-column"><span>{{ item.tradeqty }}</span></li>
+                    <li class="list-column">
+                        <span>{{ formatDate(item.tradetime, 'YYYY-MM-DD') }}</span>
+                        <span>{{ formatDate(item.tradetime, 'HH:mm:ss') }}</span>
+                    </li>
+                </ul>
+            </template>
+        </app-pull-refresh>
+    </app-view>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { useQueryWrTradeDetail } from '@/business/order'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { useNavigation } from '@/hooks/navigation'
+import { Button } from 'vant'
+import { formatDate } from '@/filters'
+
+const { dataList, pageIndex, pageCount, getWrTradeDetail } = useQueryWrTradeDetail()
+const showHeader = shallowRef(false)
+const { routerTo } = useNavigation()
+
+const onRefresh = (callback: () => void) => {
+    getWrTradeDetail(1).finally(() => callback())
+}
+
+const onRefreshUpdated = (data: Model.UserScoreLogRsp[]) => {
+    showHeader.value = data.length > 0
+}
+</script>
+
+<style lang="less">
+.wrtradedetail {
+    &__container {
+        height: 100%;
+        overflow-y: auto;
+
+        .list {
+            display: flex;
+            align-items: center;
+            background-color: #fff;
+
+            &-row {
+                font-size: .32rem;
+                border-bottom: 1px solid #eee;
+                padding: .12rem .32rem;
+            }
+
+            &-column {
+                flex: 1;
+                display: flex;
+                flex-direction: column;
+                text-align: center;
+
+                &:first-child {
+                    text-align: left;
+                }
+
+                &:last-child {
+                    text-align: right;
+                }
+
+                span:last-child {
+                    color: #999;
+                    font-size: .24rem;
+                }
+            }
+        }
+    }
+}
+</style>

+ 15 - 0
src/packages/mobile/views/mine/order/index.less

@@ -0,0 +1,15 @@
+.mine-order {
+    .van-tabs {
+        display       : flex;
+        flex-direction: column;
+        height        : 100%;
+
+        &__content {
+            flex: 1;
+        }
+
+        .van-tab__panel {
+            height: 100%;
+        }
+    }
+}

+ 32 - 0
src/packages/mobile/views/mine/order/index.vue

@@ -0,0 +1,32 @@
+<template>
+    <app-view class="mine-order">
+        <template #header>
+            <app-navbar title="我的订单" />
+        </template>
+        <Tabs>
+            <Tab title="采购订单">
+                <purchase-trade-detail />
+            </Tab>
+            <Tab title="供求委托">
+                <wr-order-detail />
+            </Tab>
+            <Tab title="供求成交">
+                <wr-trade-detail />
+            </Tab>
+        </Tabs>
+    </app-view>
+</template>
+
+<script lang="ts" setup>
+
+import { Tab, Tabs } from 'vant'
+
+import PurchaseTradeDetail from './components/purchasetradedetail/index.vue'
+import WrOrderDetail from './components/wrorderdetail/index.vue'
+import WrTradeDetail from './components/wrtradedetail/index.vue'
+
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 6 - 6
src/packages/mobile/views/rules/ptgz/index.vue

@@ -15,12 +15,12 @@
 
 <script lang="ts" setup>
 
-import {  ref } from 'vue'
-import AppHtml from '@mobile/components/base/html-panel/index.vue'
-import { Tab, Tabs, Toast } from 'vant'
+    import {  ref } from 'vue'
+    import AppHtml from '@mobile/components/base/html-panel/index.vue'
+    import { Tab, Tabs, Toast } from 'vant'
 
-  /// tab激活项
-const active = ref(0);
-const onClickTab = ( {name} ) => Toast(name);
+    /// tab激活项
+    const active = ref(0);
+    const onClickTab = ( {name} ) => Toast(name);
 
 </script>

+ 1 - 2
src/stores/modules/enum.ts

@@ -16,8 +16,7 @@ interface StoreState {
     loading: boolean;
     allEnums: ShallowRef<Model.EnumRsp[]>;
 }
-
-const enumKeys = ['clientType', 'scoreConfigType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'goodsunit'] as const
+const enumKeys = ['clientType', 'scoreConfigType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'thjDeliveryMode', 'goodsunit'] as const
 
 /**
  * 枚举存储类

+ 7 - 0
src/stores/modules/user.ts

@@ -71,6 +71,13 @@ const store = new (class extends VueStore<StoreState>{
         getUserInfo: () => {
             const { userInfo } = this.state.userData
             return userInfo
+        },
+        /** 获取对应系统参数的对应值 */
+        getSystemParamValue: (paramcode: string) => {
+            const {systemParams} = this.state.userData
+            return systemParams.find(obj => {
+                return obj.paramcode === paramcode
+            })?.paramvalue
         }
     }
 })