瀏覽代碼

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

zhou.xiaoning 2 年之前
父節點
當前提交
983e83582b
共有 59 個文件被更改,包括 1388 次插入139 次删除
  1. 1 1
      .env.mobile
  2. 1 1
      .env.pc
  3. 3 0
      android/fxgl.txt
  4. 3 3
      package-lock.json
  5. 1 1
      package.json
  6. 1 1
      public/config/appconfig.json
  7. 1 1
      public/manifest.json
  8. 14 10
      src/business/trade/index.ts
  9. 28 0
      src/constants/order.ts
  10. 1 1
      src/hooks/echarts/candlestick/dataset.ts
  11. 1 1
      src/hooks/echarts/timeline/dataset.ts
  12. 36 34
      src/hooks/echarts/timeline/index.ts
  13. 0 0
      src/packages/mobile/assets/iconfont/iconfont.js
  14. 二進制
      src/packages/mobile/assets/images/boot-1080p.png
  15. 二進制
      src/packages/mobile/assets/images/boot-480p.png
  16. 二進制
      src/packages/mobile/assets/images/boot-720p.png
  17. 二進制
      src/packages/mobile/assets/images/login-bg.jpg
  18. 二進制
      src/packages/mobile/assets/images/login-logo.png
  19. 8 8
      src/packages/mobile/components/modules/echarts-kline/index.less
  20. 1 1
      src/packages/mobile/components/modules/echarts-kline/index.vue
  21. 33 0
      src/packages/mobile/components/modules/echarts-timeline/index.less
  22. 9 11
      src/packages/mobile/components/modules/echarts-timeline/index.vue
  23. 1 1
      src/packages/mobile/views/ballot/detail/Index.vue
  24. 1 5
      src/packages/mobile/views/bank/statement/Index.vue
  25. 1 5
      src/packages/mobile/views/bank/statement/history/Index.vue
  26. 2 1
      src/packages/mobile/views/boot/Index.vue
  27. 1 1
      src/packages/mobile/views/boot/index.less
  28. 1 1
      src/packages/mobile/views/goods/detail/components/listing/Index.vue
  29. 2 2
      src/packages/mobile/views/home/Index.vue
  30. 2 2
      src/packages/mobile/views/home/main/Index.vue
  31. 82 19
      src/packages/mobile/views/market/detail/Index.vue
  32. 38 2
      src/packages/mobile/views/market/detail/index.less
  33. 107 3
      src/packages/mobile/views/news/detail/Index.vue
  34. 58 0
      src/packages/mobile/views/news/detail/index.less
  35. 72 5
      src/packages/mobile/views/news/list/Index.vue
  36. 20 0
      src/packages/mobile/views/news/list/index.less
  37. 14 0
      src/packages/mobile/views/order/list/Index.vue
  38. 55 0
      src/packages/mobile/views/order/list/components/hislistingorder/detail/Index.vue
  39. 149 0
      src/packages/mobile/views/order/list/components/hislistingorder/list/Index.vue
  40. 56 0
      src/packages/mobile/views/order/list/components/hislistingtrade/detail/Index.vue
  41. 145 0
      src/packages/mobile/views/order/list/components/hislistingtrade/list/Index.vue
  42. 1 1
      src/packages/mobile/views/order/list/components/hisswaporder/list/Index.vue
  43. 1 1
      src/packages/mobile/views/order/list/components/hisswaptrade/list/Index.vue
  44. 83 0
      src/packages/mobile/views/order/list/components/listingorder/detail/Index.vue
  45. 131 0
      src/packages/mobile/views/order/list/components/listingorder/list/Index.vue
  46. 56 0
      src/packages/mobile/views/order/list/components/listingtrade/detail/Index.vue
  47. 98 0
      src/packages/mobile/views/order/list/components/listingtrade/list/Index.vue
  48. 1 1
      src/packages/mobile/views/presale/detail/Index.vue
  49. 2 1
      src/packages/mobile/views/presale/detail/components/delisting/index.vue
  50. 6 6
      src/packages/mobile/views/user/login/Index.vue
  51. 3 3
      src/packages/mobile/views/user/login/index.less
  52. 2 0
      src/services/api/bank/index.ts
  53. 10 0
      src/services/api/market/index.ts
  54. 1 1
      src/services/api/trade/index.ts
  55. 7 3
      src/services/websocket/build/index.ts
  56. 6 0
      src/stores/modules/futures.ts
  57. 2 0
      src/types/model/bank.d.ts
  58. 28 0
      src/types/model/market.d.ts
  59. 1 1
      src/types/proto/trade.d.ts

+ 1 - 1
.env.mobile

@@ -1,4 +1,4 @@
 VUE_APP_ENV = 'mobile'
-VUE_APP_TITLE = 华南石化
+VUE_APP_TITLE = 多元世纪
 VUE_APP_ROOT = src/packages/mobile/
 VUE_APP_HOST = localhost

+ 1 - 1
.env.pc

@@ -1,4 +1,4 @@
 VUE_APP_ENV = 'pc'
-VUE_APP_TITLE = 华南石化
+VUE_APP_TITLE = 多元世纪
 VUE_APP_ROOT = src/packages/pc/
 VUE_APP_HOST = localhost

+ 3 - 0
android/fxgl.txt

@@ -29,3 +29,6 @@ http://47.116.5.81:8022/PhoneService/GetUpdateInfo
 下载地址:http://47.116.5.81:8023/thj_demo.apk
 App Name: 铁合金掌上行演示版
 
+多元演示
+cn.muchinfo.demo_v1.0.0.apk
+http://103.40.249.126:18280/cfg?key=mtp_20

+ 3 - 3
package-lock.json

@@ -1,11 +1,11 @@
 {
-  "name": "hnsh",
+  "name": "muchinfo",
   "version": "0.1.0",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
-      "name": "hnsh",
+      "name": "muchinfo",
       "version": "0.1.0",
       "dependencies": {
         "@tinymce/tinymce-vue": "^5.0.0",
@@ -23505,4 +23505,4 @@
       }
     }
   }
-}
+}

+ 1 - 1
package.json

@@ -1,5 +1,5 @@
 {
-  "name": "hnsh",
+  "name": "muchinfo",
   "version": "0.1.0",
   "private": true,
   "scripts": {

+ 1 - 1
public/config/appconfig.json

@@ -1,5 +1,5 @@
 {
   "version": "1.0.0",
   "versionCode": "100000",
-  "apiUrl": "http://192.168.31.158:18240/cfg?key=dev_104"
+  "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204"
 }

+ 1 - 1
public/manifest.json

@@ -2,7 +2,7 @@
     "@platforms" : [ "android", "iPhone", "iPad" ],
     "id" : "H5E4A9458",
     /*应用的标识*/
-    "name" : "铁合金掌上行",
+    "name" : "多元演示系统",
     /*应用名称,程序桌面图标名称*/
     "version" : {
         "name" : "1.0.0",

+ 14 - 10
src/business/trade/index.ts

@@ -243,20 +243,23 @@ export function useSpotPresaleTransferDesting() {
 export function useWrListingCancelOrder() {
     const loading = shallowRef(false)
 
-    const cancelSubmit = async (id: string, buyorsell: number) => {
+    /// 接口请求
+    const formData = reactive<Proto.WRListingCancelOrderReq>({
+        UserID: loginStore.userId,
+        AccountID: accountStore.accountId,
+        OperatorID: loginStore.loginId,
+        OrderSrc: OrderSrc.ORDERSRC_CLIENT,
+        ClientOrderTime: formatDate(new Date().toISOString()),
+        ClientSerialNo: v4(),
+        ClientType: ClientType.Web,
+    })
+
+    const cancelSubmit = async () => {
         try {
             loading.value = true
             return await wrListingCancelOrder({
                 data: {
-                    UserID: loginStore.userId,
-                    AccountID: accountStore.accountId,
-                    OperatorID: loginStore.loginId,
-                    OrderSrc: OrderSrc.ORDERSRC_CLIENT,
-                    OldWRTradeOrderID: Long.fromString(id),
-                    ClientOrderTime: formatDate(new Date().toISOString()),
-                    ClientSerialNo: v4(),
-                    ClientType: ClientType.Web,
-                    BuyOrSell: buyorsell,
+                    ...formData,
                 }
             })
         } finally {
@@ -266,6 +269,7 @@ export function useWrListingCancelOrder() {
 
     return {
         loading,
+        formData,
         cancelSubmit
     }
 }

+ 28 - 0
src/constants/order.ts

@@ -27,6 +27,12 @@ export enum PriceMode {
     Limit = 2, // 限价
 }
 
+/// 仓单贸易类型
+export enum WrTradeType {
+    Liting = 1,
+    DeListing = 2,
+}
+
 /**
  * 获取买卖方向列表
  * @returns 
@@ -38,6 +44,19 @@ export function getBuyOrSellList() {
     ]
 }
 
+
+/**
+ * 获取仓单贸易类型列表
+ * @returns 
+ */
+export function getWrTradeTypeList() {
+    return [
+        { label: '挂牌', value: WrTradeType.Liting },
+        { label: '摘牌', value: WrTradeType.DeListing },
+    ]
+}
+
+
 /**
  * 获取	委托单据类型列表
  * @returns 
@@ -58,6 +77,15 @@ export function getBuyOrSellName(value: number) {
     return getEnumTypeName(getBuyOrSellList(), value)
 }
 
+
+/**
+ * 获取仓单贸易类型名称
+ * @returns 
+ */
+export function getWrTradeTypeName(value: number) {
+    return getEnumTypeName(getWrTradeTypeList(), value)
+}
+
 /**
  * 获取买卖方向名称
  * @returns 

+ 1 - 1
src/hooks/echarts/candlestick/dataset.ts

@@ -37,7 +37,7 @@ export function useDataset() {
     }
 
     // 处理行情数据
-    const handleData = (rawData: Model.QueryHistoryDatasRsp[], onReady?: () => void) => {
+    const handleData = (rawData: Model.HistoryDatasRsp[], onReady?: () => void) => {
         for (let i = 0; i < rawData.length; i++) {
             const { o, c, h, l, ts: date, f, tv } = rawData[i];
             if (f) dataset.invalid.push(i); // 添加补充数据的索引位置

+ 1 - 1
src/hooks/echarts/timeline/dataset.ts

@@ -38,7 +38,7 @@ export function useDataset() {
     }
 
     // 处理行情数据
-    const handleData = (rawData: Model.QueryTSDataRsp, onReady?: () => void) => {
+    const handleData = (rawData: Model.TSDataRsp, onReady?: () => void) => {
         const { date, close, ma5 } = dataset.timeline.source;
         const { preSettle, decimalPlace, runSteps, historyDatas } = rawData;
 

+ 36 - 34
src/hooks/echarts/timeline/index.ts

@@ -1,24 +1,25 @@
-import { ref, computed, watch } from 'vue'
+import { ref, computed, watch, getCurrentInstance } from 'vue'
 //import { timerInterceptor } from '@/utils/timer'
 import { queryTSData } from '@/services/api/quote'
 import { useFuturesStore } from '@/stores'
 import { useDataset } from './dataset'
 import { useOptions } from './options'
-import moment from 'moment';
+import moment from 'moment'
 
 export function useTimelineChart(goodscode: string) {
+    const context = getCurrentInstance()
     const futuresStore = useFuturesStore()
-    const { dataset, handleData, clearData, calcIndicator } = useDataset();
-    const { options, initOptions, updateOptions } = useOptions(dataset);
+    const { dataset, handleData, clearData, calcIndicator } = useDataset()
+    const { options, initOptions, updateOptions } = useOptions(dataset)
 
-    const loading = ref(false);
-    const isEmpty = ref(false);
-    const dataIndex = ref(-1); // 当前数据索引值
-    const quote = futuresStore.getQuoteInfo(goodscode); // 实时行情
+    const loading = ref(false)
+    const isEmpty = ref(false)
+    const dataIndex = ref(-1) // 当前数据索引值
+    const quote = futuresStore.getQuoteInfo(goodscode) // 实时行情
 
     // 当前选中的数据项
     const selectedItem = computed(() => {
-        const { close, ma5 } = dataset.timeline.source;
+        const { close, ma5 } = dataset.timeline.source
         return {
             close: close[dataIndex.value] ?? '--',
             ma5: ma5[dataIndex.value] ?? '--'
@@ -29,10 +30,10 @@ export function useTimelineChart(goodscode: string) {
      * 初始化数据
      */
     const initData = () => {
-        clearData();
-        dataIndex.value = -1;
-        isEmpty.value = true;
-        loading.value = true;
+        clearData()
+        dataIndex.value = -1
+        isEmpty.value = true
+        loading.value = true
 
         // 获取历史行情
         queryTSData({
@@ -40,14 +41,15 @@ export function useTimelineChart(goodscode: string) {
                 goodsCode: goodscode
             }
         }).then((res) => {
-            const { historyDatas } = res.data;
+            const { historyDatas, startTime, endTime } = res.data
             if (historyDatas.length) {
-                dataIndex.value = historyDatas.length - 1;
-                isEmpty.value = false;
-                handleData(res.data);
+                dataIndex.value = historyDatas.length - 1
+                isEmpty.value = false
+                handleData(res.data)
             }
+            context?.emit('ready', startTime, endTime)
         }).finally(() => {
-            loading.value = false;
+            loading.value = false
         })
     }
 
@@ -56,34 +58,34 @@ export function useTimelineChart(goodscode: string) {
      */
     const updateChart = () => {
         if (quote.value) {
-            const { last, lasttime } = quote.value;
-            const { close, ma5 } = dataset.timeline.source;
-            const lastIndex = close.length - 1; // 历史数据最后索引位置
-            const cycleMilliseconds = 60 * 1000; // 一分钟毫秒数
+            const { last, lasttime } = quote.value
+            const { close, ma5 } = dataset.timeline.source
+            const lastIndex = close.length - 1 // 历史数据最后索引位置
+            const cycleMilliseconds = 60 * 1000 // 一分钟毫秒数
 
-            const oldTime = lastIndex === -1 ? moment(lasttime) : moment(dataset.rawDate[lastIndex]); // 历史行情最后时间
-            const diffTime = moment(lasttime).valueOf() - oldTime.valueOf(); // 计算时间差
+            const oldTime = lastIndex === -1 ? moment(lasttime) : moment(dataset.rawDate[lastIndex]) // 历史行情最后时间
+            const diffTime = moment(lasttime).valueOf() - oldTime.valueOf() // 计算时间差
 
             if (diffTime > cycleMilliseconds * 2) {
                 // 时间间隔超过两个周期,重新请求历史数据
-                //timerInterceptor.debounce(() => initData(), 1000, 'updateChart');
+                //timerInterceptor.debounce(() => initData(), 1000, 'updateChart')
             } else {
                 // 判断时间差是否大于周期时间
                 if (lastIndex === -1 || diffTime > cycleMilliseconds) {
-                    oldTime.add(cycleMilliseconds, 'ms');
-                    const lastDate = oldTime.format('YYYY-MM-DD HH:mm:ss');
+                    oldTime.add(cycleMilliseconds, 'ms')
+                    const lastDate = oldTime.format('YYYY-MM-DD HH:mm:ss')
 
                     // 新增分时数据
-                    dataset.rawDate.push(lastDate);
-                    close.push(last);
+                    dataset.rawDate.push(lastDate)
+                    close.push(last)
                     ma5.push('-')
                 } else {
-                    close[lastIndex] = last; // 更新最后一条记录的收盘价
+                    close[lastIndex] = last // 更新最后一条记录的收盘价
                 }
 
                 // 更新各种指标
-                calcIndicator(lastIndex === -1 ? 0 : lastIndex);
-                updateOptions();
+                calcIndicator(lastIndex === -1 ? 0 : lastIndex)
+                updateOptions()
             }
         }
     }
@@ -91,11 +93,11 @@ export function useTimelineChart(goodscode: string) {
     // 监听行情推送
     watch(() => quote.value?.last, () => {
         if (!loading.value && !isEmpty.value) {
-            updateChart();
+            updateChart()
         }
     })
 
-    initData();
+    initData()
 
     return {
         loading,

File diff suppressed because it is too large
+ 0 - 0
src/packages/mobile/assets/iconfont/iconfont.js


二進制
src/packages/mobile/assets/images/boot-1080p.png


二進制
src/packages/mobile/assets/images/boot-480p.png


二進制
src/packages/mobile/assets/images/boot-720p.png


二進制
src/packages/mobile/assets/images/login-bg.jpg


二進制
src/packages/mobile/assets/images/login-logo.png


+ 8 - 8
src/packages/mobile/components/modules/echarts-kline/index.less

@@ -1,15 +1,15 @@
 .app-echats-kline {
-    display       : flex;
+    display: flex;
     flex-direction: column;
-    height        : 300px;
+    height: 250px;
 
     &__tip {
         margin: auto;
     }
 
     &__container {
-        flex          : 1;
-        display       : flex;
+        flex: 1;
+        display: flex;
         flex-direction: column;
 
         .app-echarts {
@@ -17,11 +17,11 @@
         }
 
         .legend {
-            display  : flex;
-            color    : #7a8a94;
+            display: flex;
+            color: #7a8a94;
             font-size: 12px;
-            padding  : 4px 4%;
-            margin   : 0;
+            padding: 4px 4%;
+            margin: 0;
 
             &-item {
                 &:not(:first-child) {

+ 1 - 1
src/packages/mobile/components/modules/echarts-kline/index.vue

@@ -8,7 +8,7 @@
         </template>
         <template v-else>
             <div class="app-echats-kline__container">
-                <ul class="legend">
+                <ul class="legend" v-if="false">
                     <li class="legend-item">开: {{ selectedItem.open }}</li>
                     <li class="legend-item">收: {{ selectedItem.close }}</li>
                     <li class="legend-item">高: {{ selectedItem.highest }}</li>

+ 33 - 0
src/packages/mobile/components/modules/echarts-timeline/index.less

@@ -0,0 +1,33 @@
+.app-echats-timeline {
+    display: flex;
+    flex-direction: column;
+    height: 250px;
+
+    &__tip {
+        margin: auto;
+    }
+
+    &__container {
+        flex: 1;
+        display: flex;
+        flex-direction: column;
+
+        .app-echarts {
+            flex: 1;
+        }
+
+        .legend {
+            display: flex;
+            color: #7a8a94;
+            font-size: 12px;
+            padding: 4px 4%;
+            margin: 0;
+
+            &-item {
+                &:not(:first-child) {
+                    margin-left: 10px;
+                }
+            }
+        }
+    }
+}

+ 9 - 11
src/packages/mobile/components/modules/echarts-timeline/index.vue

@@ -1,21 +1,15 @@
 <template>
     <div class="app-echats-timeline">
         <template v-if="loading">
-            <div class="app-echats-kline__tip">正在加载...</div>
+            <div class="app-echats-timeline__tip">正在加载...</div>
         </template>
         <template v-else-if="isEmpty">
-            <div class="app-echats-kline__tip">暂无数据</div>
+            <div class="app-echats-timeline__tip">暂无数据</div>
         </template>
         <template v-else>
-            <div class="app-echats-kline__container">
-                <ul class="legend">
-                    <li class="legend-item">开: {{ selectedItem.open }}</li>
-                    <li class="legend-item">收: {{ selectedItem.close }}</li>
-                    <li class="legend-item">高: {{ selectedItem.highest }}</li>
-                    <li class="legend-item">低: {{ selectedItem.lowest }}</li>
+            <div class="app-echats-timeline__container">
+                <ul class="legend" v-if="false">
                     <li class="legend-item">MA5: {{ selectedItem.ma5 }}</li>
-                    <li class="legend-item">MA10: {{ selectedItem.ma10 }}</li>
-                    <li class="legend-item">MA15: {{ selectedItem.ma15 }}</li>
                 </ul>
                 <app-echarts :option="options.timeline" v-model:dataIndex="dataIndex" @ready="initOptions" />
             </div>
@@ -35,4 +29,8 @@ const props = defineProps({
 })
 
 const { loading, dataIndex, isEmpty, options, selectedItem, initOptions } = useTimelineChart(props.goodscode)
-</script>
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

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

@@ -92,7 +92,7 @@ const detailBanners = computed(() => {
 const earnest = computed(() => {
     switch (detail.presaledepositalgorithm) {
         case 1:
-            return (detail.presaledepositvalue * 100).toFixed(2)
+            return parsePercent(detail.presaledepositvalue)
         case 2:
             return detail.presaledepositvalue.toFixed(2)
         default:

+ 1 - 5
src/packages/mobile/views/bank/statement/Index.vue

@@ -16,9 +16,6 @@
                     <span>{{ formatDate(value, 'YYYY-MM-DD') }}</span>
                     <span>{{ formatDate(value, 'HH:mm:ss') }}</span>
                 </template>
-                <template #businesscode="{ value }">
-                    {{ getAccountBusinessCodeName(value) }}
-                </template>
             </app-list>
         </app-pull-refresh>
     </app-view>
@@ -29,7 +26,6 @@ import { shallowRef } from 'vue'
 import { formatDate } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { useNavigation } from '@/hooks/navigation'
-import { getAccountBusinessCodeName } from '@/constants/bank'
 import { queryAmountLog } from '@/services/api/bank'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import AppList from '@mobile/components/base/list/index.vue'
@@ -40,7 +36,7 @@ const error = shallowRef(false)
 
 const columns: Model.TableColumn[] = [
     { prop: 'createtime', label: '时间' },
-    { prop: 'businesscode', label: '操作类型' },
+    { prop: 'operatetypename', label: '操作类型' },
     { prop: 'amount', label: '金额' },
 ]
 

+ 1 - 5
src/packages/mobile/views/bank/statement/history/Index.vue

@@ -10,9 +10,6 @@
                     <span>{{ formatDate(value, 'YYYY-MM-DD') }}</span>
                     <span>{{ formatDate(value, 'HH:mm:ss') }}</span>
                 </template>
-                <template #businesscode="{ value }">
-                    {{ getAccountBusinessCodeName(value) }}
-                </template>
             </app-list>
         </app-pull-refresh>
     </app-view>
@@ -22,7 +19,6 @@
 import { shallowRef } from 'vue'
 import { formatDate } from '@/filters'
 import { useRequest } from '@/hooks/request'
-import { getAccountBusinessCodeName } from '@/constants/bank'
 import { queryHisAmountLog } from '@/services/api/bank'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import AppList from '@mobile/components/base/list/index.vue'
@@ -32,7 +28,7 @@ const error = shallowRef(false)
 
 const columns: Model.TableColumn[] = [
     { prop: 'createtime', label: '时间' },
-    { prop: 'businesscode', label: '操作类型' },
+    { prop: 'operatetypename', label: '操作类型' },
     { prop: 'amount', label: '金额' },
 ]
 

+ 2 - 1
src/packages/mobile/views/boot/Index.vue

@@ -29,7 +29,8 @@ const router = useRouter()
 const countdown = 1  // 倒计时秒数
 
 const state = reactive({
-  showGuide: (!plus.hasPlus() || localStorage.getItem('hnsh_app_showguide') === 'false') ? false : true, // 是否显示引导页
+  showGuide: false,
+  //showGuide: (!plus.hasPlus() || localStorage.getItem('hnsh_app_showguide') === 'false') ? false : true, // 是否显示引导页
   second: countdown, // 剩余秒数
   currentRate: 100, // 当前进度
   rate: 100, // 目标进度

+ 1 - 1
src/packages/mobile/views/boot/index.less

@@ -1,7 +1,7 @@
 .boot {
     height: 100vh;
     background: #fff url('@mobile/assets/images/boot-1080p.png') no-repeat center top;
-    background-size: 100%;
+    background-size: cover;
     overflow: hidden;
 
     &__guide {

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

@@ -83,7 +83,7 @@ const onSubmit = () => {
     /// 获取对应的市场ID
     formData.MarketID = useFuturesStore().getGoods(goodsid).value?.marketid ?? 0
     formData.BuyOrSell = buyOrSell.value,
-        formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
+    formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
     formData.MarketMaxSub = 0.0
     formData.GoodsID = goodsid
     formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING

+ 2 - 2
src/packages/mobile/views/home/Index.vue

@@ -34,8 +34,8 @@ const tabList: Tabbar[] = [
   {
     name: 'home-index',
     label: '首页',
-    icon: 'icon-home',
-    activeIcon: 'icon-home-active',
+    icon: 'icon-shouye-1',
+    activeIcon: 'icon-shouye',
   },
   {
     name: 'home-presale',

+ 2 - 2
src/packages/mobile/views/home/main/Index.vue

@@ -1,7 +1,7 @@
 <template>
   <app-scroll-view class="home-main">
     <template #afterHeader>
-      <app-navbar title="华南石化" :show-back-button="false" />
+      <app-navbar title="多元世纪" :show-back-button="false" />
     </template>
     <app-statusbar class="home-main__header">
       <div class="home-main__banner home-main__banner--header">
@@ -122,7 +122,7 @@
           </Cell>
           <template v-for="(item, index) in newsList" :key="index">
             <Cell class="article-item" :title="item.title" :value="formatDate(item.publishdate, 'MM/DD')"
-              :to="{ name: 'news-details', query: { id: item.id } }" />
+              :to="{ name: 'news-detail', query: { id: item.id } }" />
           </template>
         </CellGroup>
       </app-block>

+ 82 - 19
src/packages/mobile/views/market/detail/Index.vue

@@ -1,32 +1,33 @@
 <template>
     <app-view class="market-detail">
         <template #header>
-            <app-navbar title="商品详情" />
+            <app-navbar :title="quote?.goodsname ?? '商品详情'" />
         </template>
         <div class="market-detail__quote" v-if="quote">
-            <ul>
-                <li>
-                    <span>{{ quote.last }}</span>
-                </li>
+            <ul class="price">
+                <li :class="quote.lastColor">{{ quote.last }}</li>
+                <li :class="quote.lastColor">{{ handleNumberValue(quote.rise.toFixed(quote.decimalplace)) }}</li>
+                <li :class="quote.lastColor">{{ parsePercent(quote.change) }}</li>
+            </ul>
+            <ul class="time">
+                <li>{{ formatDate(quote.lasttime, 'MM-DD HH:mm:ss') }}</li>
+            </ul>
+            <ul class="info">
                 <li>
                     <span>卖价</span>
-                    <span>{{ quote.ask }}</span>
+                    <span :class="quote.askColor">{{ quote.ask }}</span>
                 </li>
                 <li>
                     <span>开盘</span>
                     <span>{{ quote.opened }}</span>
                 </li>
                 <li>
-                    <span>{{ handleNumberValue(quote.rise.toFixed(quote.decimalplace)) }}</span>
-                    <span>{{ parsePercent(quote.change) }}</span>
-                </li>
-                <li>
                     <span>买价</span>
-                    <span>{{ quote.bid }}</span>
+                    <span :class="quote.bidColor">{{ quote.bid }}</span>
                 </li>
                 <li>
                     <span>均价</span>
-                    <span>{{ }}</span>
+                    <span>{{ quote.averageprice }}</span>
                 </li>
                 <li>
                     <span>昨结</span>
@@ -34,19 +35,19 @@
                 </li>
                 <li>
                     <span>最高</span>
-                    <span>{{ quote.highest }}</span>
+                    <span :class="quote.highestColor">{{ quote.highest }}</span>
                 </li>
                 <li>
                     <span>结算</span>
-                    <span>{{ }}</span>
+                    <span>{{ quote.settle }}</span>
                 </li>
                 <li>
                     <span>昨收</span>
-                    <span>{{ }}</span>
+                    <span>{{ quote.preclose }}</span>
                 </li>
                 <li>
                     <span>最低</span>
-                    <span>{{ quote.lowest }}</span>
+                    <span :class="quote.lowestColor">{{ quote.lowest }}</span>
                 </li>
             </ul>
         </div>
@@ -55,19 +56,31 @@
                 <Tab :title="item.label" :name="item.value" />
             </template>
         </Tabs>
-        <component :is="componentMap.get('echartsTimeline')" v-bind="{ goodscode }" v-if="active === ChartCycleType.Time" />
+        <component :is="componentMap.get('echartsTimeline')" v-bind="{ goodscode }" @ready="onReady"
+            v-if="active === ChartCycleType.Time" />
         <component :is="componentMap.get('echartsKline')" v-bind="{ goodscode, cycleType: active }" v-else />
+        <AppList :columns="columns" :data-list="dataList" style="border-top: 1px solid #eee;">
+            <template #TS="{ value }">
+                {{ formatDate(value, 'HH:mm:ss') }}
+            </template>
+            <template #PE="{ value }">
+                <span>{{ value }}</span>
+            </template>
+        </AppList>
     </app-view>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, onMounted, onUnmounted, defineAsyncComponent } from 'vue'
+import { ref, shallowRef, onMounted, onUnmounted, defineAsyncComponent, watch } from 'vue'
 import { Tab, Tabs } from 'vant'
-import { parsePercent, handleNumberValue } from '@/filters'
+import { parsePercent, handleNumberValue, formatDate } from '@/filters'
 import { getChartCycleTypeList, ChartCycleType } from '@/constants/chart'
 import { useNavigation } from '@/hooks/navigation'
+import { useRequest } from '@/hooks/request'
+import { queryHistoryTikDatas } from '@/services/api/market'
 import { useFuturesStore } from '@/stores'
 import quoteSocket from '@/services/websocket/quote'
+import AppList from '@mobile/components/base/list/index.vue'
 
 const componentMap = new Map<string, unknown>([
     ['echartsTimeline', defineAsyncComponent(() => import('@mobile/components/modules/echarts-timeline/index.vue'))],
@@ -81,6 +94,56 @@ const active = shallowRef(ChartCycleType.Time)
 
 const quote = futuresStore.getQuoteInfo(goodscode)
 const subscribe = quoteSocket.addSubscribe([goodscode])
+const dataList = ref<Model.HistoryTikDatasRsp[]>([])
+
+const { run } = useRequest(queryHistoryTikDatas, {
+    manual: true,
+    params: {
+        goodsCode: goodscode,
+        count: 20
+    },
+    onSuccess: (res) => {
+        dataList.value = res.data
+    }
+})
+
+const columns: Model.TableColumn[] = [
+    { prop: 'TS', label: '时间' },
+    { prop: 'PE', label: '最新价' },
+    { prop: 'Vol', label: '现量' },
+]
+
+const onReady = (startTime: string, endTime: string) => {
+    run({
+        startTime: formatDate(startTime),
+        endTime: formatDate(endTime),
+    })
+}
+
+watch(() => quote.value?.last, () => {
+    if (quote.value) {
+        const list = dataList.value
+        if (list.length > 19) {
+            // 移除列表最后一条记录
+            list.pop()
+        }
+        // 向列表开头添加新纪录
+        list.unshift({
+            AV: 0,
+            Ask: 0,
+            BV: 0,
+            Bid: 0,
+            HI: 0,
+            HV: 0,
+            PE: quote.value.last,
+            TDR: 0,
+            TK: 0,
+            TS: quote.value.lasttime,
+            TT: 0,
+            Vol: quote.value.lastvolume,
+        })
+    }
+})
 
 onMounted(() => subscribe.start())
 

+ 38 - 2
src/packages/mobile/views/market/detail/index.less

@@ -1,14 +1,50 @@
 .market-detail {
+    background-color: #fff;
+
+    .van-tabs {
+        &__nav {
+            background-color: #f2f2f2;
+        }
+    }
+
     &__quote {
-        ul {
+        padding: .2rem 0;
+
+        .price {
+            display: flex;
+            align-items: center;
+            padding: 0 .2rem;
+
+            li {
+                &:first-child {
+                    font-size: .44rem;
+                }
+
+                +li {
+                    margin-left: .2rem;
+                }
+            }
+        }
+
+        .time {
+            font-size: .24rem;
+            color: #999;
+            padding: 0 .2rem;
+            margin-top: .1rem;
+        }
+
+        .info {
             display: flex;
             flex-wrap: wrap;
+            margin-top: .2rem;
 
             li {
                 display: flex;
                 justify-content: space-between;
+                gap: .2rem;
                 width: ~"calc(100% / 3)";
-                padding: 0 .2rem;
+                font-size: .26rem;
+                padding: .04rem .2rem;
             }
         }
     }

+ 107 - 3
src/packages/mobile/views/news/detail/Index.vue

@@ -1,8 +1,112 @@
 <template>
-    <app-view>
-
+    <app-view class="news-details">
+        <template #header>
+            <app-navbar title="资讯详情">
+                <!-- <template #right>
+                    <div @click="sendShareMessage" v-if="plus.hasPlus()">
+                        <Icon name="share" size=".36rem" />
+                    </div>
+                    <div :data-clipboard-text="getNewsShareUrl(newsId)" v-copy="onCopy" v-else>
+                        <Icon name="share" size=".36rem" />
+                    </div>
+                </template> -->
+            </app-navbar>
+        </template>
+        <section class="news-details__container" v-if="data">
+            <h1>{{ data.title }}</h1>
+            <h4>
+                <span>来源:</span>
+                <img :src="getFileUrl(data.srclogo)" v-if="data.srclogo" />
+                <span @click="openUrl(data?.srcurl)" style="color:dodgerblue" v-if="data.srcname">{{ data.srcname }}</span>
+                <span>{{ formatDate(data.publishdate, 'YYYY-MM-DD') }}</span>
+                <span style="margin-left: auto;">阅览数: {{ data.hits }}</span>
+            </h4>
+            <HtmlContainer :context="formatHtmlString(data.context)" v-if="data.context" />
+            <p style="color: #999;margin-top: .24rem;font-size: .24rem;" v-if="data.author">作者: {{ data.author }}</p>
+        </section>
+        <template v-if="dataList.length">
+            <Divider>热门资讯</Divider>
+            <CellGroup class="news-details__list">
+                <template v-for="(item, index) in dataList" :key="index">
+                    <Cell class="article-item" title-class="article-item__title" value-class="article-item__time"
+                        :title="item.title" :value="formatDate(item.publishdate, 'MM/DD')"
+                        :to="{ name: 'news-details', query: { id: item.id } }" replace />
+                </template>
+            </CellGroup>
+        </template>
     </app-view>
 </template>
 
 <script lang="ts" setup>
-</script>
+import { CellGroup, Cell, Divider, showFailToast, showToast, Icon } from 'vant'
+import { formatDate, getFileUrl, getNewsShareUrl, formatHtmlString } from '@/filters'
+import { useNavigation } from '@/hooks/navigation'
+import { useRequest } from '@/hooks/request'
+import { queryNewTitles, queryNewContents } from '@/services/api/news'
+import plus from '@/utils/h5plus'
+import HtmlContainer from '@mobile/components/base/html-container/index.vue'
+
+const { getQueryString } = useNavigation()
+const newsId = getQueryString('id')
+
+const { dataList, run } = useRequest(queryNewTitles, {
+    manual: true,
+    params: {
+        pagesize: 10,
+    },
+    onSuccess: (res) => {
+        dataList.value = res.data.filter((e) => e.id.toString() !== newsId)
+    }
+})
+
+const { data } = useRequest(queryNewContents, {
+    params: {
+        ids: newsId
+    },
+    onSuccess: (res) => {
+        if (res.data.length) {
+            const details = res.data[0]
+            data.value = details
+            run({ columnid: details.columnid })
+        } else {
+            run()
+        }
+    }
+})
+
+// 跳转链接
+const openUrl = (url?: string) => {
+    if (url) {
+        plus.openURL(url)
+    }
+}
+
+// 分享消息
+const sendShareMessage = () => {
+    if (data.value) {
+        plus.systemShare({
+            title: data.value.title,
+            href: getNewsShareUrl(newsId),
+        }).catch((err) => {
+            showFailToast(err)
+        })
+    } else {
+        showFailToast('文章不存在,分享失败')
+    }
+}
+
+const onCopy = (status: boolean) => {
+    if (status) {
+        showToast({
+            message: '已复制,快去粘贴吧~',
+            position: 'bottom',
+        })
+    } else {
+        showFailToast('复制失败')
+    }
+}
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 58 - 0
src/packages/mobile/views/news/detail/index.less

@@ -0,0 +1,58 @@
+@import '@mobile/assets/themes/base/mixin.less';
+
+.news-details {
+    background-color: #fff;
+
+    .app-view__body {
+        padding-bottom: 1.2rem;
+    }
+
+    &__container {
+        padding: .32rem;
+
+        >h1 {
+            font-size: .35rem;
+            font-weight: bold;
+        }
+
+        >h4 {
+            display: flex;
+            align-items: center;
+            gap: .12rem;
+            font-size: .24rem;
+            color: #999;
+            padding: .32rem 0;
+
+            img {
+                width: .48rem;
+                height: .48rem;
+                border-radius: 50%;
+                font-size: 0;
+            }
+        }
+
+        >p {
+            font-size: .28rem;
+            line-height: .48rem;
+
+            img {
+                max-width: 100%;
+            }
+        }
+    }
+
+    &__list {
+        .article-item {
+            &__title {
+                span {
+                    .mixin-text-overflow()
+                }
+            }
+
+            &__time {
+                flex: initial;
+                margin-left: .48rem;
+            }
+        }
+    }
+}

+ 72 - 5
src/packages/mobile/views/news/list/Index.vue

@@ -1,8 +1,75 @@
 <template>
-    <app-view>
-
-    </app-view>
+  <app-view class="news-list" flex>
+    <template #header>
+      <app-navbar title="市场资讯" />
+    </template>
+    <Tabs v-model:active="currentColumnId" @change="onClickTab">
+      <template v-for="(item, index) in siteColumns" :key="index">
+        <Tab :name="item.id" :title="item.columnname" />
+      </template>
+    </Tabs>
+    <app-pull-refresh ref="pullRefreshRef" class="news-list__container" v-model:loading="loading" v-model:error="error"
+      v-model:pageIndex="pageIndex" :page-count="pageCount" @refresh="onRefresh">
+      <Empty v-if="!dataList.length" />
+      <template v-for="(item, index) in dataList" :key="index">
+        <Cell class="article-item" title-class="article-item__title" value-class="article-item__time" :title="item.title"
+          :value="formatDate(item.publishdate, 'MM/DD')" :to="{ name: 'news-detail', query: { id: item.id } }" />
+      </template>
+    </app-pull-refresh>
+  </app-view>
 </template>
-
+  
 <script lang="ts" setup>
-</script>
+import { shallowRef } from 'vue'
+import { Cell, Tab, Tabs, Empty } from 'vant'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { querySiteColumnDetail, querySiteColumnConfig } from '@/services/api/news'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const pullRefreshRef = shallowRef()
+const dataList = shallowRef<Model.SiteColumnDetailRsp[]>([])
+const siteColumns = shallowRef<Model.SiteColumnConfigRsp[]>([])
+const currentColumnId = shallowRef(0)
+const error = shallowRef(false)
+
+/// 查询栏目配置
+const getSiteColumnConfig = querySiteColumnConfig().then((res) => {
+  siteColumns.value = res.data
+  /// 默认第一个
+  if (res.data.length) {
+    currentColumnId.value = res.data[0].id
+  }
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(querySiteColumnDetail, {
+  manual: true,
+  params: {
+    pagesize: 20,
+  },
+  onSuccess: (res) => {
+    if (pageIndex.value === 1) {
+      dataList.value = []
+    }
+    dataList.value.push(...res.data)
+  },
+  onError: () => {
+    error.value = true
+  }
+})
+
+const onRefresh = () => {
+  getSiteColumnConfig.then(() => {
+    run({ columnid: currentColumnId.value })
+  })
+}
+
+// Tab触发
+const onClickTab = () => {
+  pullRefreshRef.value?.refresh()
+}
+</script>
+  
+<style lang="less">
+@import './index.less';
+</style>

+ 20 - 0
src/packages/mobile/views/news/list/index.less

@@ -0,0 +1,20 @@
+@import '@mobile/assets/themes/base/mixin.less';
+
+.news-list {
+    &__container {
+        padding-top: .2rem;
+
+        .article-item {
+            &__title {
+                span {
+                    .mixin-text-overflow()
+                }
+            }
+
+            &__time {
+                flex       : initial;
+                margin-left: .48rem;
+            }
+        }
+    }
+}

+ 14 - 0
src/packages/mobile/views/order/list/Index.vue

@@ -32,8 +32,10 @@
                 <component :is="componentMap.get('goodstrade')" />
             </Tab>
             <Tab title="挂牌委托">
+                <component :is="componentMap.get('listingorder')" />
             </Tab>
             <Tab title="挂牌成交">
+                <component :is="componentMap.get('listingtrade')" />
             </Tab>
             <Tab title="点价委托">
                 <component :is="componentMap.get('pricingorder')" />
@@ -68,6 +70,10 @@ const componentMap = new Map<string, unknown>([
     ['hisgoodstrade', defineAsyncComponent(() => import('./components/hisgoodstrade/list/Index.vue'))], // 历史订单成交
     ['pricingorder', defineAsyncComponent(() => import('./components/pricingorder/list/Index.vue'))], // 挂牌点价委托
     ['pricingtrade', defineAsyncComponent(() => import('./components/pricingtrade/list/Index.vue'))], // 挂牌点价成交
+    ['listingtrade', defineAsyncComponent(() => import('./components/listingtrade/list/Index.vue'))], // 挂牌委托
+    ['listingorder', defineAsyncComponent(() => import('./components/listingorder/list/Index.vue'))], // 挂牌成交
+    ['hislistingtrade', defineAsyncComponent(() => import('./components/hislistingtrade/list/Index.vue'))], // 历史挂牌委托
+    ['hislistingorder', defineAsyncComponent(() => import('./components/hislistingorder/list/Index.vue'))], // 历史挂牌成交
 ])
 
 const onMoreClick = () => {
@@ -94,6 +100,14 @@ const onMoreClick = () => {
             showComponent('hisgoodstrade')
             break
         }
+        case 7: {
+            showComponent('hislistingorder')
+            break
+        }
+        case 8: {
+            showComponent('hislistingtrade')
+            break
+        }
     }
 }
 

+ 55 - 0
src/packages/mobile/views/order/list/components/hislistingorder/detail/Index.vue

@@ -0,0 +1,55 @@
+<!-- 我的订单- 历史挂牌委托 - 详情 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="详细" @back="closed" />
+            </template>
+            <div v-if="props" class="order-detail__container g-form__container">
+                <CellGroup title="历史挂牌委托信息">
+                    <Cell title="商品代码/名称" :value="selectedRow.deliverygoodscode + '/' + selectedRow.deliverygoodsname" />
+                    <Cell title="仓库" :value="selectedRow.warehousename" />
+                    <Cell title="仓库" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
+                    <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
+                    <Cell title="委托价格" :value="formatDecimal(selectedRow.fixedprice)" />
+                    <Cell title="委托数量" :value="formatDecimal(selectedRow.orderqty)" />
+                    <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
+                    <Cell title="撤销数量" :value="formatDecimal(selectedRow.cancelqty)" />
+                    <Cell title="委托时间" :value="formatDate(selectedRow.ordertime)" />wrtradeorderstatus
+                    <Cell title="委托状态" :value="getWRTradeOrderStatusName(selectedRow.wrtradeorderstatus)" />
+                    <Cell title="委托单号" :value="selectedRow.wrtradeorderid" />
+                </CellGroup>
+            </div>
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import AppModal from '@/components/base/modal/index.vue'
+import { CellGroup, Cell } from 'vant'
+import { getBuyOrSellName, getWRTradeOrderStatusName, getWrTradeTypeName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+
+const showModal = shallowRef(true)
+// 是否刷新父组件数据
+const refresh = shallowRef(false)
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.WrOrderDetailRsp>,
+        required: true,
+    }
+})
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 149 - 0
src/packages/mobile/views/order/list/components/hislistingorder/list/Index.vue

@@ -0,0 +1,149 @@
+<!-- 我的订单- 历史挂牌订单 - 委托 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="历史挂牌委托" @back="closed" />
+            </template>
+            <Cell title="查询日期" :value="date" @click="show = true" is-link></Cell>
+            <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
+        :page-count="pageCount" @refresh="run">
+                <div class="g-order-list">
+                    <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
+                        <div class="g-order-list__titlebar">
+                            <div class="left">
+                                <h5>{{ item.goodscode }}/{{ item.goodsname }}</h5>
+                            </div>
+                        </div>
+                        <div class="g-order-list__content">
+                            <ul>
+                                <li>
+                                    <span>时间:</span>
+                                    <span>{{ formatDate(item.ordertime, 'HH:mm:ss') }}</span>
+                                </li>
+                                <li>
+                                    <span>方向:</span>
+                                    <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
+                                </li>
+                                <li>
+                                    <span>挂牌数量:</span>
+                                    <span>{{ formatDecimal(item.orderqty) }}</span>
+                                </li>
+                                <li>
+                                    <span>挂牌价格:</span>
+                                    <span>{{ formatDecimal(item.fixedprice) }}</span>
+                                </li>
+                                <li>
+                                    <span>成交数量:</span>
+                                    <span>{{ formatDecimal(item.tradeqty) }}</span>
+                                </li>
+                                <li>
+                                    <span>仓库:</span>
+                                    <span>{{ item.warehousename }}</span>
+                                </li>
+                                <li>
+                                    <span>委托状态:</span>
+                                    <span>{{ getWRTradeOrderStatusName(item.wrtradeorderstatus) }}</span>
+                                </li>
+                                <li>
+                                    <span>单号:</span>
+                                    <span>{{ item.wrtradeorderid }}</span>
+                                </li>
+                            </ul>
+                        </div>
+                        <div class="g-order-list__btnbar">
+                            <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
+                        </div>
+                    </div>
+                </div>
+                <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+                    v-if="componentId" />
+            </app-pull-refresh>
+            <Calendar :show="show" type="range" :max-date="new Date()" :min-date="moment().subtract(1, 'years').toDate()"
+            @close="onClose" @confirm="onConfirm" />
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, ref, reactive, defineAsyncComponent } from 'vue'
+import { useRequest } from '@/hooks/request'
+import { queryWrOrderDetail } from '@/services/api/order'
+import { getBuyOrSellName, getWRTradeOrderStatusName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+import { useComponent } from '@/hooks/component'
+import { Button, Calendar, Cell } from 'vant'
+import moment from 'moment'
+import AppModal from '@/components/base/modal/index.vue'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const dataList = shallowRef<Model.WrOrderDetailRsp[]>([])
+const showModal = shallowRef(true)
+/// 是否显示日历
+const show = shallowRef(false)
+/// 显示日期
+const date = ref('')
+const selectedRow = shallowRef<Model.WrOrderDetailRsp>()
+const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],
+])
+
+const formData = reactive<Model.WrOrderDetailReq>({
+    marketid: 17201,
+    haswr: 1,
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryWrOrderDetail, {
+    manual: true,
+    params: {
+        ...formData
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+
+const showComponent = (componentName: string, row: Model.WrOrderDetailRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
+}
+
+const onClose = () => {
+    show.value = false
+}
+
+const onConfirm = (values: Date[]) => {
+    const [start, end] = values;
+    show.value = false
+    formData.begindate = formatDate(start.toString(), 'YYYYMMDD')
+    formData.enddate = formatDate(end.toString(), 'YYYYMMDD')
+    date.value = formData.begindate + '-' + formData.enddate
+    /// 查询
+    pullRefreshRef.value?.refresh()
+}
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 56 - 0
src/packages/mobile/views/order/list/components/hislistingtrade/detail/Index.vue

@@ -0,0 +1,56 @@
+<!-- 我的订单- 历史挂牌成交 - 详情 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="详细" @back="closed" />
+            </template>
+            <div v-if="props" class="order-detail__container g-form__container">
+                <CellGroup title="历史挂牌成交信息">
+                    <Cell title="商品代码/名称" :value="selectedRow.deliverygoodscode+'/'+selectedRow.deliverygoodsname"/>
+                    <Cell title="仓库" :value="selectedRow.warehousename" />
+                    <Cell title="类型" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
+                    <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
+                    <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
+                    <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
+                    <Cell title="成交金额" :value="formatDecimal(selectedRow.tradeqty*selectedRow.tradeprice)" />
+                    <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
+                    <Cell title="对手方" :value="selectedRow.matchaccountid" />
+                    <Cell title="成交单号" :value="selectedRow.wrtradedetailid" />
+                </CellGroup>
+            </div>
+            <div v-else>
+                <Empty />
+            </div>
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { CellGroup, Cell } from 'vant'
+import { formatDate, formatDecimal } from '@/filters'
+import AppModal from '@/components/base/modal/index.vue'
+import { getBuyOrSellName, getWrTradeTypeName } from '@/constants/order'
+
+const showModal = shallowRef(true)
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.WrTradeDetailRsp>,
+        required: true,
+    }
+})
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 145 - 0
src/packages/mobile/views/order/list/components/hislistingtrade/list/Index.vue

@@ -0,0 +1,145 @@
+<!-- 我的订单- 历史挂牌订单 - 成交 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="历史挂牌成交" @back="closed" />
+            </template>
+            <Cell title="查询日期" :value="date" @click="show = true" is-link></Cell>
+            <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
+        :page-count="pageCount" @refresh="run">
+                <div class="g-order-list">
+                    <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
+                        <div class="g-order-list__titlebar">
+                            <div class="left">
+                                <h5>{{ item.deliverygoodscode }}/{{ item.deliverygoodsname }}</h5>
+                            </div>
+                        </div>
+                        <div class="g-order-list__content">
+                            <ul>
+                                <li>
+                                    <span>成交时间:</span>
+                                    <span>{{ formatDate(item.tradedate) }}</span>
+                                </li>
+                                <li>
+                                    <span>方向:</span>
+                                    <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
+                                </li>
+                                <li>
+                                    <span>成交数量:</span>
+                                    <span>{{ item.tradeqty }}</span>
+                                </li>
+                                <li>
+                                    <span>成交价格:</span>
+                                    <span>{{ formatDecimal(item.tradeqty) }}</span>
+                                </li>
+                                <li>
+                                    <span>成交金额:</span>
+                                    <span>{{ formatDecimal(item.tradeprice*item.tradeqty) }}</span>
+                                </li>
+                                <li>
+                                    <span>仓库:</span>
+                                    <span>{{ item.warehousename }}</span>
+                                </li>
+                                <li>
+                                    <span>成交单号:</span>
+                                    <span>{{ item.wrtradedetailid }}</span>
+                                </li>
+                            </ul>
+                        </div>
+                        <div class="g-order-list__btnbar">
+                            <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
+                        </div>
+                    </div>
+                </div>
+                <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+                    v-if="componentId" />
+            </app-pull-refresh>
+            <Calendar :show="show" type="range" :max-date="new Date()" :min-date="moment().subtract(1, 'years').toDate()"
+            @close="onClose" @confirm="onConfirm" />
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, ref, reactive, defineAsyncComponent } from 'vue'
+import { useRequest } from '@/hooks/request'
+import { queryWrTradeDetail } from '@/services/api/order'
+import { getBuyOrSellName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+import { useComponent } from '@/hooks/component'
+import { Button, Calendar, Cell } from 'vant'
+import moment from 'moment'
+import AppModal from '@/components/base/modal/index.vue'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const dataList = shallowRef<Model.WrTradeDetailRsp[]>([])
+const showModal = shallowRef(true)
+/// 是否显示日历
+const show = shallowRef(false)
+/// 显示日期
+const date = ref('')
+const selectedRow = shallowRef<Model.WrTradeDetailRsp>()
+const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],
+])
+
+const formData = reactive<Model.WrTradeDetailReq>({
+    marketid: 17201,
+    haswr: 1
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryWrTradeDetail, {
+    manual: true,
+    params: {
+        ...formData
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+
+const showComponent = (componentName: string, row: Model.WrTradeDetailRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
+}
+
+const onClose = () => {
+    show.value = false
+}
+
+const onConfirm = (values: Date[]) => {
+    const [start, end] = values;
+    show.value = false
+    formData.begindate = formatDate(start.toString(), 'YYYYMMDD')
+    formData.enddate = formatDate(end.toString(), 'YYYYMMDD')
+    date.value = formData.begindate + '-' + formData.enddate
+    /// 查询
+    pullRefreshRef.value?.refresh()
+}
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 1 - 1
src/packages/mobile/views/order/list/components/hisswaporder/list/Index.vue

@@ -1,4 +1,4 @@
-<!-- 我的订单- 掉期订单 - 委托 -->
+<!-- 我的订单- 历史掉期订单 - 委托 -->
 <template>
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">

+ 1 - 1
src/packages/mobile/views/order/list/components/hisswaptrade/list/Index.vue

@@ -1,4 +1,4 @@
-<!-- 我的订单- 掉期订单 - 成交 -->
+<!-- 我的订单- 历史掉期订单 - 成交 -->
 <template>
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">

+ 83 - 0
src/packages/mobile/views/order/list/components/listingorder/detail/Index.vue

@@ -0,0 +1,83 @@
+<!-- 我的订单- 挂牌委托 - 详情 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="详细" @back="closed" />
+            </template>
+            <div v-if="props" class="order-detail__container g-form__container">
+                <CellGroup title="挂牌委托信息">
+                    <Cell title="商品代码/名称" :value="selectedRow.deliverygoodscode + '/' + selectedRow.deliverygoodsname" />
+                    <Cell title="仓库" :value="selectedRow.warehousename" />
+                    <Cell title="仓库" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
+                    <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
+                    <Cell title="委托价格" :value="formatDecimal(selectedRow.fixedprice)" />
+                    <Cell title="委托数量" :value="formatDecimal(selectedRow.orderqty)" />
+                    <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
+                    <Cell title="撤销数量" :value="formatDecimal(selectedRow.cancelqty)" />
+                    <Cell title="委托时间" :value="formatDate(selectedRow.ordertime)" />wrtradeorderstatus
+                    <Cell title="委托状态" :value="getWRTradeOrderStatusName(selectedRow.wrtradeorderstatus)" />
+                    <Cell title="委托单号" :value="selectedRow.wrtradeorderid" />
+                </CellGroup>
+            </div>
+            <template #footer v-if="selectedRow.wrtradeorderstatus === 3 || selectedRow.wrtradeorderstatus === 7">
+                <Button type="primary" block round @click="onCancelSumit">撤销</Button>
+            </template>
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import AppModal from '@/components/base/modal/index.vue'
+import { CellGroup, Cell, Button } from 'vant'
+import { getBuyOrSellName, getWRTradeOrderStatusName, getWrTradeTypeName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+import { useWrListingCancelOrder } from '@/business/trade'
+import { dialog, fullloading } from '@/utils/vant'
+
+const showModal = shallowRef(true)
+// 是否刷新父组件数据
+const refresh = shallowRef(false)
+const { cancelSubmit, formData } = useWrListingCancelOrder()
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.WrOrderDetailRsp>,
+        required: true,
+    }
+})
+
+const onCancelSumit = () => {
+    dialog({
+        message: '确认要撤销吗?',
+        showCancelButton: true,
+    }).then(() => {
+        ///  参数信息
+        formData.Header = { MarketID: 17201 }
+        formData.OldWRTradeOrderID = props.selectedRow.wrtradeorderid
+        formData.BuyOrSell = props.selectedRow.buyorsell
+
+        /// loding....
+        fullloading((hideLoading) => {
+            cancelSubmit().then(() => {
+                hideLoading('撤销成功')
+                closed(true)
+            }).catch((err) => {
+                hideLoading(err, 'fail')
+            })
+        })
+    })
+}
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 131 - 0
src/packages/mobile/views/order/list/components/listingorder/list/Index.vue

@@ -0,0 +1,131 @@
+<!-- 我的订单-挂牌委托 -->
+<template>
+    <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
+        :page-count="pageCount" @refresh="run">
+        <div class="g-order-list">
+            <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
+                <div class="g-order-list__titlebar">
+                    <div class="left">
+                        <h5>{{ item.deliverygoodscode }}/{{ item.deliverygoodsname }}</h5>
+                    </div>
+                </div>
+                <div class="g-order-list__content">
+                    <ul>
+                        <li>
+                            <span>时间:</span>
+                            <span>{{ formatDate(item.ordertime, 'HH:mm:ss') }}</span>
+                        </li>
+                        <li>
+                            <span>方向:</span>
+                            <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
+                        </li>
+                        <li>
+                            <span>挂牌数量:</span>
+                            <span>{{ formatDecimal(item.orderqty) }}</span>
+                        </li>
+                        <li>
+                            <span>挂牌价格:</span>
+                            <span>{{ formatDecimal(item.fixedprice) }}</span>
+                        </li>
+                        <li>
+                            <span>成交数量:</span>
+                            <span>{{ formatDecimal(item.tradeqty) }}</span>
+                        </li>
+                        <li>
+                            <span>仓库:</span>
+                            <span>{{ item.warehousename }}</span>
+                        </li>
+                        <li>
+                            <span>委托状态:</span>
+                            <span>{{ getWRTradeOrderStatusName(item.wrtradeorderstatus) }}</span>
+                        </li>
+                        <li>
+                            <span>单号:</span>
+                            <span>{{ item.wrtradeorderid }}</span>
+                        </li>
+                    </ul>
+                </div>
+                <div class="g-order-list__btnbar">
+                    <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
+                    <Button size="small" v-if="(item.wrtradeorderstatus === 3 || item.wrtradeorderstatus === 7)"
+                        @click="onCancelSumit(item)" round>撤销</Button>
+                </div>
+            </div>
+        </div>
+        <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+            v-if="componentId" />
+    </app-pull-refresh>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, defineAsyncComponent } from 'vue'
+import { Button } from 'vant'
+import { useComponent } from '@/hooks/component'
+import { useRequest } from '@/hooks/request'
+import { queryWrOrderDetail } from '@/services/api/order'
+import { getBuyOrSellName, getWRTradeOrderStatusName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+import { useWrListingCancelOrder } from '@/business/trade'
+import { dialog } from '@/utils/vant'
+import { fullloading } from '@/utils/vant'
+
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))]
+])
+
+const { cancelSubmit, formData } = useWrListingCancelOrder()
+const dataList = shallowRef<Model.WrOrderDetailRsp[]>([])
+const selectedRow = shallowRef<Model.WrOrderDetailRsp>()
+const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryWrOrderDetail, {
+    params: {
+        pagesize: 20,
+        wrtradetype: 1,
+        marketid: 17201,
+        haswr: 1
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+
+const onCancelSumit = (item: Model.WrOrderDetailRsp) => {
+    dialog({
+        message: '确认要撤销吗?',
+        showCancelButton: true,
+    }).then(() => {
+        ///  参数信息
+        formData.Header = { MarketID: 17201 }
+        formData.OldWRTradeOrderID = item.wrtradeorderid
+        formData.BuyOrSell = item.buyorsell
+
+        /// loding....
+        fullloading((hideLoading) => {
+            cancelSubmit().then(() => {
+                hideLoading('撤销成功')
+            }).catch((err) => {
+                hideLoading(err, 'fail')
+            })
+        })
+    })
+}
+
+const showComponent = (componentName: string, row: Model.WrOrderDetailRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
+}
+</script>

+ 56 - 0
src/packages/mobile/views/order/list/components/listingtrade/detail/Index.vue

@@ -0,0 +1,56 @@
+<!-- 我的订单- 挂牌成交 - 详情 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="详细" @back="closed" />
+            </template>
+            <div v-if="props" class="order-detail__container g-form__container">
+                <CellGroup title="挂牌成交信息">
+                    <Cell title="商品代码/名称" :value="selectedRow.deliverygoodscode+'/'+selectedRow.deliverygoodsname"/>
+                    <Cell title="仓库" :value="selectedRow.warehousename" />
+                    <Cell title="类型" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
+                    <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
+                    <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
+                    <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
+                    <Cell title="成交金额" :value="formatDecimal(selectedRow.tradeqty*selectedRow.tradeprice)" />
+                    <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
+                    <Cell title="对手方" :value="selectedRow.matchaccountid" />
+                    <Cell title="成交单号" :value="selectedRow.wrtradedetailid" />
+                </CellGroup>
+            </div>
+            <div v-else>
+                <Empty />
+            </div>
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { CellGroup, Cell } from 'vant'
+import { formatDate, formatDecimal } from '@/filters'
+import AppModal from '@/components/base/modal/index.vue'
+import { getBuyOrSellName, getWrTradeTypeName } from '@/constants/order'
+
+const showModal = shallowRef(true)
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.WrTradeDetailRsp>,
+        required: true,
+    }
+})
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 98 - 0
src/packages/mobile/views/order/list/components/listingtrade/list/Index.vue

@@ -0,0 +1,98 @@
+<!-- 我的订单-挂牌成交 -->
+<template>
+    <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
+        :page-count="pageCount" @refresh="run">
+        <div class="g-order-list">
+            <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
+                <div class="g-order-list__titlebar">
+                    <div class="left">
+                        <h5>{{ item.deliverygoodscode }}/{{ item.deliverygoodsname }}</h5>
+                    </div>
+                </div>
+                <div class="g-order-list__content">
+                    <ul>
+                        <li>
+                            <span>成交时间:</span>
+                            <span>{{ formatDate(item.tradedate) }}</span>
+                        </li>
+                        <li>
+                            <span>方向:</span>
+                            <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
+                        </li>
+                        <li>
+                            <span>成交数量:</span>
+                            <span>{{ item.tradeqty }}</span>
+                        </li>
+                        <li>
+                            <span>成交价格:</span>
+                            <span>{{ formatDecimal(item.tradeqty) }}</span>
+                        </li>
+                        <li>
+                            <span>成交金额:</span>
+                            <span>{{ formatDecimal(item.tradeprice*item.tradeqty) }}</span>
+                        </li>
+                        <li>
+                            <span>仓库:</span>
+                            <span>{{ item.warehousename }}</span>
+                        </li>
+                        <li>
+                            <span>成交单号:</span>
+                            <span>{{ item.wrtradedetailid }}</span>
+                        </li>
+                    </ul>
+                </div>
+                <div class="g-order-list__btnbar">
+                    <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
+                </div>
+            </div>
+        </div>
+        <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+            v-if="componentId" />
+    </app-pull-refresh>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, defineAsyncComponent } from 'vue'
+import { Button } from 'vant'
+import { useComponent } from '@/hooks/component'
+import { useRequest } from '@/hooks/request'
+import { queryWrTradeDetail } from '@/services/api/order'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { getBuyOrSellName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],
+])
+
+const dataList = shallowRef<Model.WrTradeDetailRsp[]>([])
+const selectedRow = shallowRef<Model.WrTradeDetailRsp>()
+const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryWrTradeDetail, {
+    params: {
+        pagesize: 20,
+        marketid: 17201,
+        haswr: 1
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+
+const showComponent = (componentName: string, row: Model.WrTradeDetailRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
+}
+</script>

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

@@ -92,7 +92,7 @@ const detailBanners = computed(() => {
 const earnest = computed(() => {
     switch (detail.presaledepositalgorithm) {
         case 1:
-            return (detail.presaledepositvalue * 100).toFixed(2)
+            return parsePercent(detail.presaledepositvalue)
         case 2:
             return detail.presaledepositvalue.toFixed(2)
         default:

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

@@ -39,6 +39,7 @@
 import { shallowRef, PropType, onMounted, computed } from 'vue'
 import { Form, Field, Stepper, Button, FieldRule, FormInstance } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
+import { parsePercent } from '@/filters'
 import { useAccountStore } from '@/stores'
 import { useOrder } from '@/business/trade'
 import AppPopup from '@mobile/components/base/popup/index.vue'
@@ -79,7 +80,7 @@ const formRules: { [key in keyof Proto.OrderReq]?: FieldRule[] } = {
 const earnest = computed(() => {
     switch (props.detail.presaledepositalgorithm) {
         case 1:
-            return (props.detail.presaledepositvalue * 100).toFixed(2)
+            return parsePercent(props.detail.presaledepositvalue)
         case 2:
             return props.detail.presaledepositvalue.toFixed(2)
         default:

+ 6 - 6
src/packages/mobile/views/user/login/Index.vue

@@ -10,21 +10,21 @@
           :rules="[{ required: true, message: '请输入密码' }]" autocomplete="off" />
       </CellGroup>
       <div class="button-link">
-        <span @click="navigationTo('UserRegister')">用户注册</span>
-        <span @click="navigationTo('UserForget')">忘记密码</span>
+        <span @click="navigationTo('user-register')">用户注册</span>
+        <span @click="navigationTo('user-forget')">忘记密码</span>
       </div>
       <div class="button-submit">
-        <Button type="primary" native-type="submit" round block>登录</Button>
+        <Button native-type="submit" round block>登录</Button>
       </div>
     </Form>
     <div class="login-footer">
       <div class="login-footer__trem">
         <Checkbox shape="square" icon-size=".32rem" v-model="checked">我已阅读并同意</Checkbox>
-        <span @click="routerTo('rules-zcxy')" style="color:#E92020">《用户注册协议》</span>
+        <span @click="routerTo('rules-zcxy')">《用户注册协议》</span>
         <span>、</span>
-        <span @click="routerTo('rules-yhkhfxgzs')" style="color:#E92020">《用户开户风险告知书》</span>
+        <span @click="routerTo('rules-yhkhfxgzs')">《用户开户风险告知书》</span>
         <span>、</span>
-        <span @click="routerTo('rules-yszc')" style="color:#E92020">《隐私政策》</span>
+        <span @click="routerTo('rules-yszc')">《隐私政策》</span>
       </div>
       <div class="login-footer__version" v-if="plus.getSystemInfo('os') !== 'Web'">
         <span>v{{ appVersion }}</span>

+ 3 - 3
src/packages/mobile/views/user/login/index.less

@@ -11,10 +11,10 @@
     }
 
     &-logo {
-        height: 3.28rem;
+        height: 2.08rem;
         background: url('@mobile/assets/images/login-logo.png') no-repeat center top;
-        background-size: 4.86rem 3.28rem;
-        margin: 1.6rem 0 .5rem .96rem;
+        background-size: 60%;
+        margin: 1.6rem 0 .5rem 0;
     }
 
     &-form {

+ 2 - 0
src/services/api/bank/index.ts

@@ -109,6 +109,7 @@ export function queryHisAmountLog(config: RequestConfig<Model.HisAmountLogReq> =
         url: '/TaAccount/QueryHisAmountLog',
         params: {
             accountID: accountStore.accountId.toString(),
+            pageflag: 1,
             ...config.data
         },
     })
@@ -122,6 +123,7 @@ export function queryAmountLog(config: RequestConfig<Model.AmountLogReq> = {}) {
         url: '/TaAccount/QueryAmountLog',
         params: {
             accountID: accountStore.accountId.toString(),
+            pageflag: 1,
             ...config.data
         },
     })

+ 10 - 0
src/services/api/market/index.ts

@@ -38,4 +38,14 @@ export function queryThjSpotQuoteConfig(config: RequestConfig<Model.ThjSpotQuote
         url: '/Ferroalloy/QueryThjSpotQuoteConfig',
         params: config.data,
     })
+}
+
+/**
+ * 查询行情Tik数据
+ */
+export function queryHistoryTikDatas(config: RequestConfig<Model.HistoryTikDatasReq> = {}) {
+    return http.commonRequest<Model.HistoryTikDatasRsp[]>({
+        url: '/Quote/QueryHistoryTikDatas',
+        params: config.data,
+    })
 }

+ 1 - 1
src/services/api/trade/index.ts

@@ -2,7 +2,7 @@ import { v4 } from 'uuid'
 import http from '@/services/http'
 import { RequestConfig } from '@/services/http/types'
 import { ClientType } from '@/constants/client'
-import { useLoginStore, useAccountStore,useUserStore } from '@/stores'
+import { useLoginStore, useAccountStore } from '@/stores'
 
 const loginStore = useLoginStore()
 const accountStore = useAccountStore()

+ 7 - 3
src/services/websocket/build/index.ts

@@ -15,6 +15,8 @@ export class MTP2WebSocket<T extends Package40 | Package50>{
     private host;
     /** WebSocket 对象 */
     private ws?: WebSocket;
+    /** WebSocket 协议 */
+    private protocols: string | string[];
     /** 心跳定时器 */
     private beatTimer = 0;
     /** 心跳发送时间 */
@@ -52,9 +54,10 @@ export class MTP2WebSocket<T extends Package40 | Package50>{
     /** 消息超时时长,默认为15秒 */
     timeoutInterval = 15 * 1000;
 
-    constructor(pkg: Package<T>, host = '') {
+    constructor(pkg: Package<T>, host = '', protocols = '') {
         this.Package = pkg;
         this.host = host;
+        this.protocols = protocols;
     }
 
     /**
@@ -65,6 +68,7 @@ export class MTP2WebSocket<T extends Package40 | Package50>{
             clearTimeout(this.reconnectTimer);
             this.stopHeartBeat();
             this.host = host || this.host;
+            this.protocols = protocols || this.protocols;
             this.connState = 'Connecting';
             console.log(this.host, '正在连接');
 
@@ -146,7 +150,7 @@ export class MTP2WebSocket<T extends Package40 | Package50>{
     private startHeartBeat() {
         this.beatTimer = window.setTimeout(() => {
             this.beatTimerId = moment(new Date()).format('HH:mm:ss');
-            //console.log(this.host, '发送心跳', this.beatTimerId);
+            console.log(this.host, '发送心跳', this.beatTimerId);
             // 发送心跳
             switch (this.Package) {
                 case Package40: {
@@ -326,7 +330,7 @@ export class MTP2WebSocket<T extends Package40 | Package50>{
             switch (p.mainClassNumber) {
                 case 0x12: {
                     // 接收到心跳回复
-                    //console.log(this.host, '收到心跳回复', this.beatTimerId);
+                    console.log(this.host, '收到心跳回复', this.beatTimerId);
                     this.stopHeartBeat();
                     this.startHeartBeat();
                     break;

+ 6 - 0
src/stores/modules/futures.ts

@@ -29,6 +29,7 @@ export const useFuturesStore = defineStore(() => {
             const { goodsid, goodscode, goodsname, goodsgroupid, marketid, decimalplace } = cur
             const quoteDayInfo = state.quoteDayList.find((e) => e.goodscode.toUpperCase() === goodscode.toUpperCase())
             const {
+                averageprice = 0,
                 last = 0,
                 bid = 0,
                 ask = 0,
@@ -39,11 +40,13 @@ export const useFuturesStore = defineStore(() => {
                 holdvolume = 0,
                 holdincrement = 0,
                 presettle = 0,
+                preclose = 0,
                 totalturnover = 0,
                 opened = 0,
                 highest = 0,
                 lowest = 0,
                 lasttime = '',
+                settle = 0,
             } = quoteDayInfo ?? {}
 
             const rise = last ? last - presettle : 0   // 涨跌额/涨跌: 最新价 - 昨结价
@@ -62,6 +65,7 @@ export const useFuturesStore = defineStore(() => {
             }
 
             const item: Model.Futures = {
+                averageprice,
                 marketid,
                 goodsgroupid,
                 goodsid,
@@ -82,10 +86,12 @@ export const useFuturesStore = defineStore(() => {
                 holdvolume,
                 holdincrement,
                 presettle,
+                preclose,
                 totalturnover,
                 opened,
                 highest,
                 lowest,
+                settle,
                 bidColor: handleColor(bid),
                 askColor: handleColor(ask),
                 lastColor: handleColor(last),

+ 2 - 0
src/types/model/bank.d.ts

@@ -188,6 +188,7 @@ declare namespace Model {
         marketname: string; // 市场名称
         moneyticket: number; // 资金流水号:银行端流水号
         operatetype: number; // 资金操作类型 (AccountFundCmdOp)- 101:入金 102:入金手续费 103:出金 104:出金冻结 105:出金解冻 106:出金手续费 107:出金手续费冻结 108:出金手续费解冻 201:交易冻结 202:交易解冻 203:交易占用 204:交易解占用 205:交易手续费冻结 206:交易手续费解冻 207:交易手续费 208:交易货款 209:交易盈亏 301:交割冻结 302:交割解冻 303:交割手续费 304:交割手续费冻结 305:交割手续费解冻 306:交割货款 307:交割税款 401:结算盈亏 402:结算递延费 403:分润收入 404:延期分润 501:授信增加 502:授信减少 503:转积分 504:转入 505:转出 506:转出冻结 507:转出解冻 601:履约金额冻结 602:履约最大冻结 603:履约金额解冻 604:履约扣款 605:履约收款 606:履约违约手续费 607:履约违约收入 608:履约最大扣款 701:供应链金融冻结 702:供应链金融解冻 703:供应链金融最大冻结 704:供应链金融利息 705:供应链金融货款 706:供应链金融押金 707:供应链金融最大扣款 801:仓单贸易冻结 802:仓单贸易解冻 803:仓单贸易首付款 804:仓单贸易最大扣款 901:商城扣款冻结 902:商城扣款解冻 903:商城扣款 904:商城收款 1001:期权冻结 1002:期权解冻 1003:期权权力金 1004:期权手续费冻结 1005:期权手续费解冻 1006:期权手续费 1007:期权盈亏 1101:营销扣款 1102:营销收款
+        operatetypename: string; // 资金操作类型名称(显示)
         relationorderid: string; // 关联单号
         remark: string; // 备注
         trademode: number; // 交易模式
@@ -270,6 +271,7 @@ declare namespace Model {
         // 资金流水号:银行端流水号
         moneyticket: number
         // 资金操作类型 (AccountFundCmdOp)- 101:入金 102:入金手续费 103:出金 104:出金冻结 105:出金解冻 106:出金手续费 107:出金手续费冻结 108:出金手续费解冻 201:交易冻结 202:交易解冻 203:交易占用 204:交易解占用 205:交易手续费冻结 206:交易手续费解冻 207:交易手续费 208:交易货款 209:交易盈亏 301:交割冻结 302:交割解冻 303:交割手续费 304:交割手续费冻结 305:交割手续费解冻 306:交割货款 307:交割税款 401:结算盈亏 402:结算递延费 403:分润收入 404:延期分润 501:授信增加 502:授信减少 503:转积分 504:转入 505:转出 506:转出冻结 507:转出解冻 601:履约金额冻结 602:履约最大冻结 603:履约金额解冻 604:履约扣款 605:履约收款 606:履约违约手续费 607:履约违约收入 608:履约最大扣款 701:供应链金融冻结 702:供应链金融解冻 703:供应链金融最大冻结 704:供应链金融利息 705:供应链金融货款 706:供应链金融押金 707:供应链金融最大扣款 801:仓单贸易冻结 802:仓单贸易解冻 803:仓单贸易首付款 804:仓单贸易最大扣款 901:商城扣款冻结 902:商城扣款解冻 903:商城扣款 904:商城收款 1001:期权冻结 1002:期权解冻 1003:期权权力金 1004:期权手续费冻结 1005:期权手续费解冻 1006:期权手续费 1007:期权盈亏 1101:营销扣款 1102:营销收款
+        operatetypename: string; // 资金操作类型名称(显示)
         operatetype: number
         // 关联单号
         relationorderid: string

+ 28 - 0
src/types/model/market.d.ts

@@ -39,8 +39,34 @@ declare namespace Model {
         wrstandardname: string; // 现货商品名称
     }
 
+    /** 查询行情Tik数据 请求 */
+    interface HistoryTikDatasReq {
+        goodsCode: string, // 商品代码
+        startTime?: string, // 开始时间,格式:yyyy-MM-dd HH:mm:ss
+        endTime?: string, // 结束时间,格式:yyyy-MM-dd HH:mm:ss
+        count?: number, // 条数
+        isAsc?: boolean, // 是否按时间顺序排序(默认为时间倒序排序)
+    }
+
+    /** 查询行情Tik数据 响应 */
+    interface HistoryTikDatasRsp {
+        AV: number; // 卖量
+        Ask: number; // 卖价
+        BV: number; // 买量
+        Bid: number; // 买价
+        HI: number; // 单笔持仓
+        HV: number; // 持仓量
+        PE: number; // 现价
+        TDR: number; // 交易方向,0:买 1:卖
+        TK: number; // 交易类型
+        TS: string; // 行情时间文本
+        TT: number; // 现金额
+        Vol: number; // 现量
+    }
+
     /** 期货行情 */
     interface Futures {
+        averageprice: number; // 均价
         marketid: number; // 所属市场ID
         goodsgroupid: number; // 所属商品组ID
         goodsid: number; // 商品ID
@@ -61,6 +87,7 @@ declare namespace Model {
         holdvolume: number; // 持仓量
         holdincrement: number; // 日增
         presettle: number; // 昨结价
+        preclose: number; // 昨收
         totalturnover: number; // 金额
         opened: number; // 开盘
         highest: number; // 最高
@@ -73,5 +100,6 @@ declare namespace Model {
         openedColor: string;// 开盘颜色
         highestColor: string;// 最高颜色
         lowestColor: string;// 最低颜色
+        settle: number; // 结算价
     }
 }

+ 1 - 1
src/types/proto/trade.d.ts

@@ -116,7 +116,7 @@ declare global {
             Header?: IMessageHead;
             UserID?: number // 用户ID
             AccountID?: number // 资金账号
-            OldWRTradeOrderID?: Long // 目标仓单贸易委托单ID
+            OldWRTradeOrderID?: string // 目标仓单贸易委托单ID
             OrderSrc?: number // 委托来源
             ClientSerialNo?: string // 客户端流水号
             ClientOrderTime?: string // 客户端委托时间

Some files were not shown because too many files changed in this diff