li.shaoyi 3 anni fa
parent
commit
f90bc450f5
40 ha cambiato i file con 737 aggiunte e 579 eliminazioni
  1. 27 0
      public/androidPrivacy.json
  2. 2 2
      public/config/appconfig.j2
  3. 2 2
      public/config/appconfig.json
  4. 7 13
      public/manifest.json
  5. 21 14
      src/business/trade/index.ts
  6. 1 1
      src/constants/order.ts
  7. 16 6
      src/filters/index.ts
  8. 0 14
      src/packages/mobile/components/modules/trade/index.less
  9. 0 35
      src/packages/mobile/components/modules/trade/index.vue
  10. 1 1
      src/packages/mobile/main.ts
  11. 0 10
      src/packages/mobile/router/index.ts
  12. 5 5
      src/packages/mobile/views/contract/details/index.vue
  13. 22 11
      src/packages/mobile/views/credit/signin/index.vue
  14. 32 27
      src/packages/mobile/views/home/components/main/index.less
  15. 9 11
      src/packages/mobile/views/home/components/main/index.vue
  16. 28 32
      src/packages/mobile/views/home/index.vue
  17. 3 3
      src/packages/mobile/views/mine/generalize/index.vue
  18. 4 4
      src/packages/mobile/views/mine/order/detail/purchasetrade/index.vue
  19. 2 2
      src/packages/mobile/views/mine/order/his/purchasetrade/index.vue
  20. 2 2
      src/packages/mobile/views/mine/order/list/components/purchasetrade/index.vue
  21. 2 1
      src/packages/mobile/views/mine/order/list/components/wrorder/index.vue
  22. 2 1
      src/packages/mobile/views/mine/order/list/components/wrtrade/index.vue
  23. 9 2
      src/packages/mobile/views/mine/order/list/index.less
  24. 101 0
      src/packages/mobile/views/mine/wareorder/components/listing/index.vue
  25. 199 0
      src/packages/mobile/views/mine/wareorder/components/pickup/index.vue
  26. 48 27
      src/packages/mobile/views/mine/wareorder/list/components/holdlb/index.vue
  27. 36 20
      src/packages/mobile/views/mine/wareorder/list/components/wroutinapply/index.vue
  28. 76 4
      src/packages/mobile/views/mine/wareorder/list/index.less
  29. 3 4
      src/packages/mobile/views/mine/wareorder/list/index.vue
  30. 0 90
      src/packages/mobile/views/mine/wareorder/listing/index.vue
  31. 0 179
      src/packages/mobile/views/mine/wareorder/pickup/index.vue
  32. 6 6
      src/packages/mobile/views/purchase/detail/index.backup.vue
  33. 7 7
      src/packages/mobile/views/purchase/detail/index.vue
  34. 30 20
      src/packages/mobile/views/user/login/index.less
  35. 18 6
      src/packages/mobile/views/user/login/index.vue
  36. 1 1
      src/services/api/common/index.ts
  37. 1 0
      src/services/index.ts
  38. 1 1
      src/types/model/goods.d.ts
  39. 5 5
      src/types/proto/trade.d.ts
  40. 8 10
      src/utils/h5plus/index.ts

+ 27 - 0
public/androidPrivacy.json

@@ -0,0 +1,27 @@
+{
+	"version": "1",
+	"prompt": "template",
+	"title": "服务协议和隐私政策",
+	"message": "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
+	"buttonAccept": "同意并接受",
+	"buttonRefuse": "拒绝",
+	"hrefLoader": "system|default",
+	"second": {
+		"title": "确认提示",
+		"message": "  进入应用前,你需先同意<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>,否则将退出应用。",
+		"buttonAccept": "同意并继续",
+		"buttonRefuse": "退出应用"
+	},
+	"disagreeMode": {
+		"support": false,
+		"loadNativePlugins": false,
+		"visitorEntry": true,
+		"showAlways": true
+	},
+	"styles": {
+		"borderRadius": "5px",
+		"buttonAccept": {
+			"color": "#ee0a24"
+		}
+	}
+}

+ 2 - 2
public/config/appconfig.j2

@@ -1,5 +1,5 @@
 {
-  "version": "1.0.10",
-  "versionCode": "100010",
+  "version": "1.0.0",
+  "versionCode": "100000",
   "apiUrl": "{apiUrl}"
 }

+ 2 - 2
public/config/appconfig.json

@@ -1,5 +1,5 @@
 {
-  "version": "1.0.10",
-  "versionCode": "100010",
+  "version": "1.0.0",
+  "versionCode": "100000",
   "apiUrl": "http://218.17.158.45:16021/cfg?key=test_thj"
 }

+ 7 - 13
public/manifest.json

@@ -5,9 +5,9 @@
     "name" : "铁合金掌上行",
     /*应用名称,程序桌面图标名称*/
     "version" : {
-        "name" : "1.0.2",
+        "name" : "1.0.0",
         /*应用版本名称*/
-        "code" : 100002
+        "code" : 100000
     },
     "description" : "",
     /*应用描述信息*/
@@ -133,16 +133,10 @@
                 /*Android应用打包使用密钥库中证书的密码*/
                 "aliasname" : "",
                 /*Android应用打包使用密钥库中证书的别名*/
-                "permissions" : [
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>"
-                ],
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
+                "permissions" : [],
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
+                "autoSdkPermissions" : false,
+                "minSdkVersion" : 29
             },
             /*使用Native.js调用原生安卓API需要使用到的系统权限*/
             "orientation" : [ "portrait-primary" ],
@@ -273,7 +267,7 @@
                 },
                 "androidStyle" : "default",
                 "iosStyle" : "common",
-                "useOriginalMsgbox" : false
+                "useOriginalMsgbox" : true
             },
             "plugins" : {
                 "ad" : {}

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

@@ -261,7 +261,7 @@ export function useWrOutInApply(holdlb?: Model.HoldLBRsp) {
     const loading = shallowRef(false)
     const { getUserId, getFirstAccountId, getLoginId } = useLoginStore()
     const orderQty = shallowRef(0.0)
-    const checked = shallowRef('3')
+    const checked = shallowRef(3)
 
     const formData = reactive<Partial<Proto.WROutApplyReq>>({
         AppointmentRemark: '',
@@ -270,9 +270,9 @@ export function useWrOutInApply(holdlb?: Model.HoldLBRsp) {
         CreatorID: getLoginId(),         // 创建人ID
         WRStandardID: holdlb?.wrstandardid,
         WarehouseID: holdlb?.warehouseid,
-        ClientSerialID: <number><unknown>v4(),    // 客户端流水号
-        AppointmentModel: <number><unknown>checked.value,
-        AppointmentDate: formatDate(new Date().toString(), 'YYYY-MM-DD'),
+        ClientSerialID: new Date().getTime(),    // 客户端流水号
+        AppointmentModel: checked.value,
+        AppointmentDate: formatDate(new Date().toISOString(), 'YYYY-MM-DD'),
     })
 
     const applySubmit = () => {
@@ -306,9 +306,12 @@ export function useWrOutInApply(holdlb?: Model.HoldLBRsp) {
 export function useHdWROrder(holdlb?: Model.HoldLBRsp) {
     const loading = shallowRef(false)
     const { getUserId, getFirstAccountId, getLoginId } = useLoginStore()
+    const { wrstandardid, subnum, deliverygoodsid, ladingbillid = '0', wrfactortypeid = '0' } = holdlb ?? {}
 
-    const formData = reactive<Partial<Proto.HdWROrderReq>>({
-        TradeDate: formatDate(new Date().toString(), "YYYYMMDD"),
+    const formData = reactive<Proto.HdWROrderReq>({
+        Header: {
+            AccountID: getFirstAccountId(),
+        },
         IsSpecified: 0,
         PriceFactor: 1.0,
         FirstRatio: 0.0,
@@ -317,30 +320,34 @@ export function useHdWROrder(holdlb?: Model.HoldLBRsp) {
         UserID: getUserId(),
         AccountID: getFirstAccountId(),
         OperatorID: getLoginId(),
-        ClientSerialNo: v4(),
-        ClientOrderTime: formatDate(new Date().toString(), 'YYYY-MM-DD HH:mm:ss'),
+        ClientType: ClientType.Web,
         BuyOrSell: 1,
         WRPriceType: 1,
         MarginFlag: 0,
         TimevalidType: 4,
         HasWr: 1,
-        WRStandardID: holdlb?.wrstandardid,
-        DeliveryGoodsID: holdlb?.deliverygoodsid,
-        LadingBillId: <number><unknown>holdlb?.ladingbillid,
-        WRFactorTypeId: <number><unknown>holdlb?.wrfactortypeid,
+        WRStandardID: wrstandardid,
+        DeliveryGoodsID: deliverygoodsid,
+        LadingBillId: Long.fromString(ladingbillid),
+        WRFactorTypeId: Long.fromString(wrfactortypeid),
+        SubNum: subnum,
+        PerformanceTemplateID: -1,
     })
 
-
     const amount = computed(() => {
         const { OrderQty = 0, FixedPrice = 0 } = formData
         return (OrderQty * FixedPrice).toFixed(2)
     })
 
     const listingSubmit = () => {
+        const date = new Date().toISOString()
         loading.value = true
         return hdWROrder({
             data: {
-                ...formData
+                ...formData,
+                TradeDate: formatDate(date, 'YYYYMMDD'),
+                ClientSerialNo: v4(),
+                ClientOrderTime: formatDate(date),
             },
             complete: () => {
                 loading.value = false

+ 1 - 1
src/constants/order.ts

@@ -59,7 +59,7 @@ export function getTHJOrderStatusList() {
  * @returns 
  */
 export function getTHJOrderStatusName(value: number) {
-    const enums = getTHJDeliveryModeList()
+    const enums = getTHJOrderStatusList()
     return getEnumTypeName(enums, value)
 }
 

+ 16 - 6
src/filters/index.ts

@@ -58,7 +58,7 @@ export function handlePriceColor(curValue: number, preValue: number) {
  * @param suffix 后缀名
  * @returns 
  */
-export function handleNoneValue<T>(value: T, suffix = '') {
+export function handleNoneValue<T>(value?: T, suffix = '') {
     if (value == null || String(value) === '') {
         return '--'
     }
@@ -84,6 +84,16 @@ export function handleNumberValue(value: number | string, suffix = '') {
 }
 
 /**
+ * 数值转换百分比
+ * @param value 
+ * @param decimal 保留小数位
+ */
+export function parsePercent(value: number, decimal = 2) {
+    const val = formatDecimal(value * 100, decimal, false)
+    return handleNumberValue(val, '%')
+}
+
+/**
  * 强制保留小数位,不足位数自动补零
  * @param value 
  * @param decimal 保留小数位
@@ -131,15 +141,15 @@ export function formatAmount(value: number, decimal = 2) {
 
 /**
  * 日期格式化
- * @param date 
+ * @param value 
  * @param format 
  * @returns 
  */
-export function formatDate(date?: string, format = 'YYYY-MM-DD HH:mm:ss') {
-    if (date) {
-        return moment(date).format(format)
+export function formatDate(value?: string, format = 'YYYY-MM-DD HH:mm:ss') {
+    if (value) {
+        return moment(value).format(format)
     }
-    return '--'
+    return handleNoneValue()
 }
 
 /**

+ 0 - 14
src/packages/mobile/components/modules/trade/index.less

@@ -1,14 +0,0 @@
-.app-trade {
-    &__wrapper {
-        display         : flex;
-        flex-direction  : column;
-        width           : 100%;
-        height          : 100%;
-        background-color: #f7f7f7;
-    }
-
-    &__body {
-        flex      : 1;
-        overflow-y: auto;
-    }
-}

+ 0 - 35
src/packages/mobile/components/modules/trade/index.vue

@@ -1,35 +0,0 @@
-<template>
-    <app-modal class="app-trade" direction="right" height="100%" v-model:show="showModal">
-        <div class="app-trade__wrapper">
-            <div class="app-trade__header">
-                <app-navbar title="挂牌求购" @back="closed" />
-            </div>
-            <div class="app-trade__body">
-                <AddressEdit show-postal show-delete show-set-default show-search-result
-                    :area-columns-placeholder="['请选择', '请选择', '请选择']" />
-            </div>
-        </div>
-    </app-modal>
-</template>
-
-<script lang="ts" setup>
-import { ref } from 'vue'
-import { AddressEdit } from 'vant'
-import AppModal from '@/components/base/modal/index.vue'
-
-const showModal = ref(true);
-
-// 关闭弹窗
-const closed = () => {
-    showModal.value = false;
-}
-
-// 暴露组件属性给父组件调用
-defineExpose({
-    closed,
-})
-</script>
-
-<style lang="less">
-@import './index.less';
-</style>

+ 1 - 1
src/packages/mobile/main.ts

@@ -12,7 +12,7 @@ import './assets/iconfont/iconfont.js'
 import './assets/themes/style.less' // 主题样式
 import { timerInterceptor } from '@/utils/timer'
 // import Vconsole from 'vconsole'
-// new Vconsole();
+// new Vconsole()
 
 const app = createApp(App)
 app.use(router)

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

@@ -252,16 +252,6 @@ const routes: Array<RouteRecordRaw> = [
         name: 'wroutinapply-detail',
         component: () => import('../views/mine/wareorder/wroutinapplydetail/index.vue'),
       },
-      {
-        path: 'pickup',
-        name: 'warehouse-pickup',
-        component: () => import('../views/mine/wareorder/pickup/index.vue'),
-      },
-      {
-        path: 'listing',
-        name: 'warehouse-listing',
-        component: () => import('../views/mine/wareorder/listing/index.vue'),
-      }
     ]
   },
   {

+ 5 - 5
src/packages/mobile/views/contract/details/index.vue

@@ -5,12 +5,12 @@
         </template>
         <Form ref="formRef" class="goods-details__form" @submit="onSubmit">
             <CellGroup>
-                <Field name="TransferID" label="交月份" :rules="formRules.TransferID" is-link>
+                <Field name="TransferID" label="交月份" :rules="formRules.TransferID" is-link>
                     <template #input>
                         <app-select :options="deliveryDate" @confirm="onDateChange" />
                     </template>
                 </Field>
-                <Field label="交日期" v-if="selectedDate?.enddate">
+                <Field label="交日期" v-if="selectedDate?.enddate">
                     <template #input>
                         <span>{{ formatDate(selectedDate.enddate, 'YYYY-MM-DD') }}</span>
                     </template>
@@ -61,7 +61,7 @@
 import { shallowRef, computed, defineAsyncComponent } from 'vue'
 import { CellGroup, Button, Field, Form, FormInstance, Toast, FieldRule, Divider } from 'vant'
 import { fullloading } from '@/utils/vant'
-import { getImageUrl, formatDate } from '@/filters'
+import { getImageUrl, formatDate, parsePercent } from '@/filters'
 import { useNavigation } from '@/hooks/navigation'
 import { useContractDetails } from '@/business/contract'
 import { useSpotPresaleTransferDesting } from '@/business/trade'
@@ -94,7 +94,7 @@ const goodsImages = computed(() => {
 // 表单验证规则
 const formRules: { [key in keyof Proto.SpotPresaleTransferDestingReq]?: FieldRule[] } = {
     TransferID: [{
-        message: '请选择交日期',
+        message: '请选择交日期',
         validator: () => {
             return !formData.TransferID?.equals(0)
         }
@@ -105,7 +105,7 @@ const formRules: { [key in keyof Proto.SpotPresaleTransferDestingReq]?: FieldRul
 const deliveryDate = computed(() => {
     const list = details.value.deliverydate ?? []
     return list.map((e) => ({
-        label: `${formatDate(e.enddate, 'YYYY-MM')} ${(e.depositrate * 100).toFixed(0)}%`,
+        label: `${formatDate(e.enddate, 'YYYY-MM')} ${parsePercent(e.depositrate)}`,
         value: e.transferid,
     }))
 })

+ 22 - 11
src/packages/mobile/views/credit/signin/index.vue

@@ -39,25 +39,22 @@
                 <dd class="list-item">
                     <div class="list-item__title">
                         <app-iconfont class="icon-title" icon="icon-meiriqiandao">每日签到</app-iconfont>
-                        <app-iconfont class="icon-score" icon="icon-jifenyue">+20</app-iconfont>
+                        <app-iconfont class="icon-score" icon="icon-jifenyue">+{{ getScoreConfig(2) }}</app-iconfont>
                     </div>
-                    <!-- <div class="list-item__button">
-                        <Button type="primary" v-if="userAccount.issigned" round>已完成</Button>
-                    </div> -->
                 </dd>
                 <dd class="list-item">
                     <div class="list-item__title">
                         <app-iconfont class="icon-title" icon="icon-yaoqingxinrenzhuce">邀请新人注册</app-iconfont>
-                        <app-iconfont class="icon-score" icon="icon-jifenyue">+50</app-iconfont>
+                        <app-iconfont class="icon-score" icon="icon-jifenyue">+{{ getScoreConfig(3) }}</app-iconfont>
                     </div>
                     <div class="list-item__button">
                         <Button type="primary" @click="routerTo('mine-generalize')" round>去完成</Button>
                     </div>
                 </dd>
-                <dd class="list-item">
+                <!-- <dd class="list-item">
                     <div class="list-item__title">
                         <app-iconfont class="icon-title" icon="icon-haoyouxiadan">好友下单每次</app-iconfont>
-                        <app-iconfont class="icon-score" icon="icon-jifenyue">+200</app-iconfont>
+                        <app-iconfont class="icon-score" icon="icon-jifenyue">+{{ getScoreConfig(4) }}</app-iconfont>
                     </div>
                     <div class="list-item__button">
                         <Button type="primary" round>去完成</Button>
@@ -66,7 +63,7 @@
                 <dd class="list-item">
                     <div class="list-item__title">
                         <app-iconfont class="icon-title" icon="icon-caigouxiadan">采购下单每次</app-iconfont>
-                        <app-iconfont class="icon-score" icon="icon-jifenyue">+100</app-iconfont>
+                        <app-iconfont class="icon-score" icon="icon-jifenyue">+{{ getScoreConfig(5) }}</app-iconfont>
                     </div>
                     <div class="list-item__button">
                         <Button type="primary" round>去完成</Button>
@@ -75,12 +72,12 @@
                 <dd class="list-item">
                     <div class="list-item__title">
                         <app-iconfont class="icon-title" icon="icon-gongqiuxiadan">供求下单每次</app-iconfont>
-                        <app-iconfont class="icon-score" icon="icon-jifenyue">+100</app-iconfont>
+                        <app-iconfont class="icon-score" icon="icon-jifenyue">+{{ getScoreConfig(6) }}</app-iconfont>
                     </div>
                     <div class="list-item__button">
                         <Button type="primary" round>去完成</Button>
                     </div>
-                </dd>
+                </dd> -->
             </dl>
         </div>
     </app-view>
@@ -92,20 +89,28 @@ import { Toast, Button } from 'vant'
 import { fullloading } from '@/utils/vant'
 import { useLoginStore } from '@/stores'
 import { queryUserAccount } from '@/services/api/account'
+import { queryTHJScoreConfig } from '@/services/api/credit'
 import { signin } from '@/services/api/common'
 import { useNavigation } from '@/hooks/navigation'
 import AppIconfont from '@mobile/components/base/iconfont/index.vue'
 
 const { getUserId } = useLoginStore()
 const { routerTo } = useNavigation()
-const userAccount = shallowRef<Partial<Model.UserAccount>>({})
 const headerRef = shallowRef<HTMLDivElement>()
+const userAccount = shallowRef<Partial<Model.UserAccount>>({})
+const scoreConfig = shallowRef<Model.THJScoreConfigRsp[]>([])
 
 const onReady = (el: HTMLDivElement) => {
     // 设置背景图位置
     headerRef.value?.style.setProperty('background-position', `0 -${el.clientHeight}px`)
 }
 
+// 获取积分配置
+const getScoreConfig = (value: number) => {
+    const item = scoreConfig.value.find((e) => e.scoreconfigtype === value)
+    return item?.parma1 ?? 0
+}
+
 const userSignin = () => {
     fullloading(() => {
         signin({
@@ -138,6 +143,12 @@ const getUserAccount = () => {
     })
 }
 
+queryTHJScoreConfig({
+    success: (res) => {
+        scoreConfig.value = res.data
+    },
+})
+
 onActivated(() => getUserAccount())
 </script>
 

+ 32 - 27
src/packages/mobile/views/home/components/main/index.less

@@ -2,7 +2,7 @@
 
 .home-main {
     &__container {
-        flex      : 1;
+        flex: 1;
         overflow-y: auto;
     }
 
@@ -16,8 +16,8 @@
                 font-size: 0;
 
                 img {
-                    width     : 100%;
-                    height    : 100%;
+                    width: 100%;
+                    height: 100%;
                     object-fit: cover;
                 }
             }
@@ -37,7 +37,7 @@
             padding: .24rem;
 
             .van-swipe {
-                min-height   : 1.5rem;
+                min-height: 1.5rem;
                 border-radius: .16rem;
 
                 &-item {
@@ -49,12 +49,17 @@
 
     &__iconbar {
         background-color: #fff;
-        padding-bottom  : .24rem;
+        padding-bottom: .24rem;
 
         ul {
-            display        : flex;
-            justify-content: space-around;
-            padding-top    : .24rem;
+            display: flex;
+            flex-wrap: wrap;
+            padding-top: .24rem;
+
+            li {
+                width: calc(~'100% / 4');
+                text-align: center;
+            }
         }
 
         .app-iconfont {
@@ -63,51 +68,51 @@
             }
 
             &__label {
-                font-size : .24rem;
+                font-size: .24rem;
                 margin-top: .08rem;
             }
         }
     }
 
     &__market {
-        display         : flex;
-        align-items     : center;
+        display: flex;
+        align-items: center;
         background-color: #fff;
-        padding         : .16rem;
-        margin          : .2rem 0;
+        padding: .16rem;
+        margin: .2rem 0;
 
         .left {
-            display        : flex;
-            flex-direction : column;
+            display: flex;
+            flex-direction: column;
             justify-content: center;
-            align-items    : center;
-            padding        : .24rem;
-            border-right   : 1px solid #eee;
+            align-items: center;
+            padding: .24rem;
+            border-right: 1px solid #eee;
 
             h2 {
                 font-size: .36rem;
-                color    : #00577C;
+                color: #00577C;
             }
 
             span {
                 font-size: .24rem;
-                color    : #666;
+                color: #666;
             }
         }
 
         .right {
-            flex   : 1;
+            flex: 1;
             padding: 0 .24rem;
 
             table {
-                width    : 100%;
+                width: 100%;
                 font-size: .24rem;
 
                 tr {
                     td {
                         line-height: .4rem;
-                        width      : 25%;
-                        text-align : center;
+                        width: 25%;
+                        text-align: center;
                     }
                 }
             }
@@ -117,13 +122,13 @@
     &__news {
         .titlebar {
             &-title {
-                font-size  : .36rem;
+                font-size: .36rem;
                 font-weight: bold;
             }
 
             &-more {
                 font-size: .28rem;
-                color    : #00577C;
+                color: #00577C;
             }
         }
 
@@ -137,7 +142,7 @@
                 }
 
                 &__time {
-                    flex       : initial;
+                    flex: initial;
                     margin-left: .48rem;
                 }
             }

+ 9 - 11
src/packages/mobile/views/home/components/main/index.vue

@@ -16,26 +16,24 @@
           <li @click="routerTo('product')">
             <app-iconfont icon="icon-chanpinjieshao" label-direction="bottom">产品介绍</app-iconfont>
           </li>
-          <li @click="routerTo('contract')">
+          <!-- <li @click="routerTo('contract')">
             <app-iconfont icon="icon-chanpinjiage" label-direction="bottom">合同转让</app-iconfont>
-          </li>
+          </li> -->
           <li @click="routerTo('rules-ptgz')">
             <app-iconfont icon="icon-pingtaiguize" label-direction="bottom">平台规则</app-iconfont>
           </li>
-        </ul>
-        <ul>
           <li @click="routerTo('credit-signin')">
             <app-iconfont icon="icon-woderenwu" label-direction="bottom">我的任务</app-iconfont>
           </li>
-          <li @click="routerTo('rules-myrz')">
+          <!-- <li @click="routerTo('rules-myrz')">
             <app-iconfont icon="icon-maoyirongzi" label-direction="bottom">贸易融资</app-iconfont>
-          </li>
+          </li> -->
           <li @click="routerTo('rules-ccwl')">
             <app-iconfont icon="icon-a-bianzu12" label-direction="bottom">仓储物流</app-iconfont>
           </li>
         </ul>
       </div>
-      <div class="home-main__market">
+      <div class="home-main__market" v-if="false">
         <div class="left">
           <h2>合金指数</h2>
           <span>{{ formatDate(marketRun.tradedate, "YYYY-MM-DD") }}</span>
@@ -45,9 +43,9 @@
             <tbody>
               <tr v-for="(item, index) in dataList" :key="index">
                 <td>{{ item.wrstandardname }}</td>
-                <td>{{ item.prespotgoodsprice }}</td>
-                <td>{{ item.todayspotgoodsprice }}</td>
-                <td>{{ item.chg }}</td>
+                <td>{{ handleNumberValue(item.prespotgoodsprice) }}</td>
+                <td>{{ handleNumberValue(item.todayspotgoodsprice) }}</td>
+                <td>{{ parsePercent(item.chg) }}</td>
               </tr>
             </tbody>
           </table>
@@ -78,7 +76,7 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { Cell, CellGroup, Swipe, SwipeItem, PullRefresh } from 'vant'
-import { getImageUrl, formatDate } from '@/filters'
+import { getImageUrl, formatDate, parsePercent, handleNumberValue } from '@/filters'
 import { useNavigation } from '@/hooks/navigation'
 import { queryImageConfigs } from '@/services/api/common'
 import { querySiteColumnDetail } from '@/services/api/news'

+ 28 - 32
src/packages/mobile/views/home/index.vue

@@ -18,7 +18,6 @@ import Home from './components/main/index.vue'
 import Purchase from './components/purchase/index.vue'
 import SupplyDemand from './components/supply-demand/index.vue'
 import Mine from './components/mine/index.vue'
-import axios from 'axios'
 
 const components = {
   home: Home,
@@ -36,18 +35,18 @@ const tabList: Tabbar[] = [
     icon: 'icon-thj-logo-un',
     activeIcon: 'icon-thj-logo'
   },
-  {
-    name: 'purchase',
-    label: '采购',
-    icon: 'icon-caigou-1',
-    activeIcon: 'icon-caigou'
-  },
-  {
-    name: 'supplyDemand',
-    label: '供求',
-    icon: 'icon-gongqiu-1',
-    activeIcon: 'icon-gongqiu'
-  },
+  // {
+  //   name: 'purchase',
+  //   label: '采购',
+  //   icon: 'icon-caigou-1',
+  //   activeIcon: 'icon-caigou'
+  // },
+  // {
+  //   name: 'supplyDemand',
+  //   label: '供求',
+  //   icon: 'icon-gongqiu-1',
+  //   activeIcon: 'icon-gongqiu'
+  // },
   {
     name: 'mine',
     label: '我的',
@@ -60,27 +59,24 @@ const onChange = (index: number) => {
   componentId.value = tabList[index].name
 }
 
-plus.onPlusReady(() => {
-  // 获取应用配置信息
-  axios('./config/appconfig.json').then((res) => {
-    const config = res.data
-    // 获取应用更新信息
-    GetAppUpdateInfo({
-      success: (res) => {
-        const data = JSON.parse(res)
-        if (data) {
-          const { LastVersionCode, ApkUrl } = data[0] as Model.AppUpdateInfo
-          if (Number(LastVersionCode) > Number(config.versionCode)) {
-            dialog('发现新版本,是否更新?', {
-              showCancelButton: true,
-              confirmButtonText: '更新'
-            }).then(() => {
-              plus.updateApp(ApkUrl)
-            })
-          }
+// 获取当前应用版本号
+plus.getVersionCode((currentVersionCode) => {
+  // 获取应用更新信息
+  GetAppUpdateInfo({
+    success: (res) => {
+      const data = JSON.parse(res)
+      if (data) {
+        const { LastVersionCode, ApkUrl } = data[0] as Model.AppUpdateInfo
+        if (Number(LastVersionCode) > Number(currentVersionCode)) {
+          dialog('发现新版本,是否更新?', {
+            showCancelButton: true,
+            confirmButtonText: '更新'
+          }).then(() => {
+            plus.updateApp(ApkUrl)
+          })
         }
       }
-    })
+    }
   })
 })
 </script>

+ 3 - 3
src/packages/mobile/views/mine/generalize/index.vue

@@ -14,8 +14,8 @@
                     <span>{{ userAccount.todayrefercount }}</span>
                 </div>
                 <div class="block-right">
-                    <h4>推广二维码</h4>
-                    <Icon name="qr" size=".48rem" @click="showQRCode = true" />
+                    <h4>推广编号</h4>
+                    <span @click="showQRCode = true">{{ userAccount.refernum }}</span>
                 </div>
             </div>
         </div>
@@ -33,7 +33,7 @@
 
 <script lang="ts" setup>
 import { shallowRef, computed } from 'vue'
-import { Tab, Tabs, Icon } from 'vant'
+import { Tab, Tabs } from 'vant'
 import { useLoginStore } from '@/stores'
 import { queryUserAccount } from '@/services/api/account'
 import AppQrcode from '@mobile/components/base/qrcode/index.vue'

+ 4 - 4
src/packages/mobile/views/mine/order/detail/purchasetrade/index.vue

@@ -9,7 +9,7 @@
                 <Cell title="参考价" :value="detail.tradeprice.toFixed(2)" />
                 <Cell title="数量" :value="detail.tradeqty" />
                 <Cell title="定金" :value="detail.payeddeposit.toFixed(2)" />
-                <Cell title="定金比例" :value="`${(detail.depositrate * 100).toFixed(0)}%`" />
+                <Cell title="定金比例" :value="parsePercent(detail.depositrate)" />
                 <Cell title="总预付款" :value="handleNumberValue(detail.tradeamount.toFixed(2))" />
                 <Cell title="采购价" :value="handleNumberValue(detail.transferprice.toFixed(2))" />
                 <Cell title="实际价" :value="handleNumberValue(detail.lastprice.toFixed(2))" />
@@ -18,8 +18,8 @@
                 <Cell title="采购时间:" :value="formatDate(detail.tradetime)" />
                 <Cell title="到期日期" :value="detail.enddate" />
             </CellGroup>
-            <CellGroup title="交信息">
-                <Cell title="交方式" :value="detail.thjdeliverymodedisplay" />
+            <CellGroup title="交信息">
+                <Cell title="交方式" :value="detail.thjdeliverymodedisplay" />
                 <Cell title="联系人" :value="detail.contactname" v-if="detail.contactname" />
                 <Cell title="联系方式" :value="detail.contactinfo" v-if="detail.contactinfo" />
                 <Cell title="目的地地址" :value="detail.desaddress" v-if="detail.desaddress" />
@@ -57,7 +57,7 @@ import { shallowRef } from 'vue'
 import { useNavigation } from '@/hooks/navigation'
 import { fullloading, dialog } from '@/utils/vant'
 import { CellGroup, Cell, Empty, Button, Toast, Dialog } from 'vant'
-import { formatDate, getUrl, handleNumberValue } from '@/filters'
+import { formatDate, getUrl, handleNumberValue, parsePercent } from '@/filters'
 import { useSpotPresaleDeliveryConfirm, useSpotPresaleBreachOfContractApply, useSpotPresaleTransferCancel, useSpotPresaleTransferListing, useSpotPresalePlayment } from "@/business/trade";
 
 const vanDialog = Dialog.Component

+ 2 - 2
src/packages/mobile/views/mine/order/his/purchasetrade/index.vue

@@ -11,7 +11,7 @@
                         <div class="left">
                             <span>{{ item.wrstandardname }}</span>
                             <span>{{ item.enddatemonth }}</span>
-                            <span>{{ (item.depositrate * 100).toFixed(0) }}%</span>
+                            <span>{{ parsePercent(item.depositrate) }}</span>
                             <span>{{ item.tradeqty }}{{ getGoodsUnitName(item.unitid) }}</span>
                         </div>
                         <div class="right">
@@ -51,7 +51,7 @@
 import { shallowRef, onActivated } from 'vue'
 import { Button } from 'vant'
 import { useNavigation } from '@/hooks/navigation'
-import { handleNumberValue } from '@/filters'
+import { handleNumberValue, parsePercent } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
 import { useTHJPurchaseTradeDetail } from '@/business/order'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'

+ 2 - 2
src/packages/mobile/views/mine/order/list/components/purchasetrade/index.vue

@@ -9,7 +9,7 @@
                         <div class="left">
                             <span>{{ item.wrstandardname }}</span>
                             <span>{{ item.enddatemonth }}</span>
-                            <span>{{ (item.depositrate * 100).toFixed(0) }}%</span>
+                            <span>{{ parsePercent(item.depositrate) }}</span>
                             <span>{{ item.tradeqty }}{{ getGoodsUnitName(item.unitid) }}</span>
                         </div>
                         <div class="right">
@@ -49,7 +49,7 @@
 import { shallowRef, onActivated } from 'vue'
 import { Button } from 'vant'
 import { useNavigation } from '@/hooks/navigation'
-import { handleNumberValue } from '@/filters'
+import { handleNumberValue, parsePercent } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
 import { useTHJPurchaseTradeDetail } from '@/business/order'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'

+ 2 - 1
src/packages/mobile/views/mine/order/list/components/wrorder/index.vue

@@ -24,7 +24,8 @@
                                 <td>{{ item.tradeqty }}</td>
                             </tr>
                             <tr>
-                                <td>{{ handleNoneValue(item.warehousename) }}</td>
+                                <th>仓库</th>
+                                <td colspan="5">{{ handleNoneValue(item.warehousename) }}</td>
                             </tr>
                         </table>
                     </div>

+ 2 - 1
src/packages/mobile/views/mine/order/list/components/wrtrade/index.vue

@@ -25,7 +25,8 @@
                                 <td>{{ item.tradeqty }}</td>
                             </tr>
                             <tr>
-                                <td>{{ handleNoneValue(item.warehousename) }}</td>
+                                <th>仓库</th>
+                                <td colspan="5">{{ handleNoneValue(item.warehousename) }}</td>
                             </tr>
                         </table>
                     </div>

+ 9 - 2
src/packages/mobile/views/mine/order/list/index.less

@@ -60,16 +60,23 @@
                         width    : 100%;
                         font-size: .24rem;
 
+                        th,
+                        td {
+                            padding: .08rem 0;
+                        }
+
                         th {
                             font-weight: normal;
                             color      : #999;
-                            padding    : .08rem 0;
                         }
                     }
                 }
 
                 &__btnbar {
-                    text-align: right;
+                    display        : flex;
+                    justify-content: flex-end;
+                    gap            : .16rem;
+                    margin-top     : .2rem;
 
                     .van-button {
                         width       : 1.6rem;

+ 101 - 0
src/packages/mobile/views/mine/wareorder/components/listing/index.vue

@@ -0,0 +1,101 @@
+<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>
+            <Form ref="formRef" class="g-form__container" @submit="formSubmit">
+                <CellGroup inset>
+                    <Field label="商品">
+                        <template #input>
+                            {{ selectedRow.wrstandardname }}
+                        </template>
+                    </Field>
+                    <Field label="仓库">
+                        <template #input>
+                            {{ selectedRow.warehousename }}
+                        </template>
+                    </Field>
+                    <Field label="参考价格">
+                        <template #input>
+                            7000元/吨
+                        </template>
+                    </Field>
+                    <Field name="Price" label="挂牌价格" v-model="formData.FixedPrice" placeholder="请输入挂牌价格"
+                        :rules="formRules.FixedPrice" />
+                    <Field name="Qty" label="挂牌数量" v-model="formData.OrderQty" placeholder="请输入挂牌数量"
+                        :rules="formRules.OrderQty" />
+                    <Field label="货款金额">
+                        <template #input>
+                            {{ amount }}
+                        </template>
+                    </Field>
+                </CellGroup>
+            </Form>
+
+            <template #footer>
+                <div class="g-form__footer">
+                    <Button type="primary" round block @click="formRef?.submit()">卖出</Button>
+                </div>
+            </template>
+        </app-view>
+    </app-modal>
+</template>
+
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { CellGroup, Button, Field, Form, FormInstance, FieldRule, Toast } from 'vant'
+import { useHdWROrder } from "@/business/trade";
+import { fullloading, dialog } from '@/utils/vant'
+import AppModal from '@/components/base/modal/index.vue'
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.HoldLBRsp>,
+        required: true
+    }
+})
+
+const formRef = shallowRef<FormInstance>()
+const showModal = shallowRef(true)
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const { formData, listingSubmit, amount } = useHdWROrder(props.selectedRow)
+
+// 表单验证规则
+const formRules: { [key in keyof Proto.HdWROrderReq]?: FieldRule[] } = {
+    FixedPrice: [{
+        required: true,
+        message: '请输入挂牌价格',
+    }],
+    OrderQty: [{
+        required: true,
+        message: '请输入挂牌数量',
+    }],
+}
+
+const formSubmit = () => {
+    fullloading((hideLoading) => {
+        listingSubmit().then(() => {
+            hideLoading()
+            dialog('挂牌提交成功。').then(() => {
+                closed(true)
+            })
+        }).catch((err) => {
+            Toast.fail(err)
+        })
+    })
+}
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 199 - 0
src/packages/mobile/views/mine/wareorder/components/pickup/index.vue

@@ -0,0 +1,199 @@
+<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>
+            <Form ref="formRef" class="g-form__container" @submit="formSubmit">
+                <CellGroup inset>
+                    <Field label="商品" readonly>
+                        <template #input>
+                            {{ selectedRow.wrstandardname }}
+                        </template>
+                    </Field>
+                    <Field label="仓库" readonly>
+                        <template #input>
+                            {{ selectedRow.warehousename }}
+                        </template>
+                    </Field>
+                    <Field name="OrderQty" label="提货数量" v-model="orderQty" placeholder="请输入提货数量"
+                        :rules="formRules.orderQty" />
+
+                    <Field label="提货方式" readonly>
+                        <template #input>
+                            <RadioGroup v-model="checked" direction="horizontal">
+                                <Radio :name="3">代办运输</Radio>
+                                <Radio :name="2">自提</Radio>
+                            </RadioGroup>
+                        </template>
+                    </Field>
+                    <Field name="ContractName" label="联系人" v-model="formData.ContactName" placeholder="请输入联系人"
+                        :rules="formRules.ContactName">
+                        <template #button>
+                            <Button size="normal" icon="add-o" @click="showContact = true" />
+                        </template>
+                    </Field>
+                    <Field name="ContactNum" label="联系方式" v-model="formData.ContactNum" placeholder="请输入联系方式"
+                        :rules="formRules.ContactNum" />
+                    <Field name="Address" label="目的地地址" v-model="formData.Address" placeholder="请输入目的地地址"
+                        :rules="formRules.Address" v-if="checked === 3" />
+                    <Field name="AppointmentRemark" label="发票信息" rows="10" autosize v-model="formData.AppointmentRemark"
+                        placeholder="请填入发票信息" :rules="formRules.AppointmentRemark">
+                        <template #button>
+                            <Button size="normal" icon="add-o" @click="showReceipt = true" />
+                        </template>
+                    </Field>
+                </CellGroup>
+            </Form>
+            <template #footer>
+                <div class="g-form__footer">
+                    <Button type="primary" round block @click="formRef?.submit()">提货</Button>
+                </div>
+            </template>
+        </app-view>
+        <app-contact v-model:show="showContact" @change="contactChange" />
+        <app-receipt v-model:show="showReceipt" @change="receiptChange" />
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { CellGroup, Button, Field, Form, FormInstance, FieldRule, Toast, Radio, RadioGroup } from 'vant'
+import { useWrOutInApply } from "@/business/trade";
+import { fullloading, dialog } from '@/utils/vant'
+import { getReceiptTypeName } from '@/constants/receipt'
+import { validateRules } from '@/constants/regex'
+import AppModal from '@/components/base/modal/index.vue'
+import AppContact from '@mobile/components/modules/contact/index.vue'
+import AppReceipt from '@mobile/components/modules/receipt/index.vue'
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.HoldLBRsp>,
+        required: true
+    }
+})
+
+const formRef = shallowRef<FormInstance>()
+const showContact = shallowRef(false) // 显示联系人选择列表
+const showReceipt = shallowRef(false) // 显示发票选择列表
+const showModal = shallowRef(true)
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const { formData, applySubmit, orderQty, checked } = useWrOutInApply(props.selectedRow)
+
+// 表单验证规则
+const formRules: { [key in keyof Proto.WROutApplyReq | 'orderQty']?: FieldRule[] } = {
+    orderQty: [{
+        required: true,
+        message: '请输入提货数量',
+    }],
+    ContactName: [{
+        required: true,
+        message: '请输入联系人',
+    }],
+    ContactNum: [{
+        required: true,
+        message: '请输入联系方式',
+        validator: (val) => {
+            if (validateRules.phone.validate(val)) {
+                return true
+            }
+            return validateRules.phone.message
+        }
+    }],
+    Address: [{
+        required: checked.value === 3,
+        message: '请输入目的地地址',
+    }],
+    AppointmentRemark: [{
+        required: true,
+        message: '请输入发票信息',
+    }],
+}
+
+// 选择联系信息
+const contactChange = (item: Model.UserReceiveInfoRsp) => {
+    formData.ContactName = item.receivername
+    formData.ContactNum = item.phonenum
+
+    if (checked.value === 3) {
+        formData.Address = [item.provincename, item.cityname, item.districtname, item.address].join(' ')
+    } else {
+        formData.Address = ''
+    }
+}
+
+// 选择发票信息
+const receiptChange = (item: Model.WrUserReceiptInfoRsp) => {
+    formData.AppointmentRemark = ''
+    Object.entries(item).forEach(([key, value]) => {
+        if (value !== '') {
+            switch (key) {
+                case 'receipttype': {
+                    formData.AppointmentRemark += '发票类型:' + getReceiptTypeName(Number(value)) + '\n'
+                    break
+                }
+                case 'username': {
+                    formData.AppointmentRemark += '发票抬头:' + value + '\n'
+                    break
+                }
+                case 'taxpayerid': {
+                    formData.AppointmentRemark += '税号:' + value + '\n'
+                    break
+                }
+                case 'receiptbank': {
+                    formData.AppointmentRemark += '开户银行:' + value + '\n'
+                    break
+                }
+                case 'receiptaccount': {
+                    formData.AppointmentRemark += '银行账号:' + value + '\n'
+                    break
+                }
+                case 'address': {
+                    formData.AppointmentRemark += '企业地址:' + value + '\n'
+                    break
+                }
+                case 'contactinfo': {
+                    formData.AppointmentRemark += '企业电话:' + value + '\n'
+                    break
+                }
+                case 'email': {
+                    formData.AppointmentRemark += '邮箱:' + value + '\n'
+                    break
+                }
+            }
+        }
+    })
+}
+
+const formSubmit = () => {
+    fullloading((hideLoading) => {
+        applySubmit().then(() => {
+            hideLoading()
+            dialog('提货申请提交成功。').then(() => {
+                closed(true)
+            })
+        }).catch((err) => {
+            Toast.fail(err)
+        })
+    })
+}
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    if (showContact.value) {
+        showContact.value = false
+    } else if (showReceipt.value) {
+        showReceipt.value = false
+    } else {
+        refresh.value = isRefresh
+        showModal.value = false
+    }
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 48 - 27
src/packages/mobile/views/mine/wareorder/list/components/holdlb/index.vue

@@ -1,47 +1,68 @@
 <template>
-    <app-view class="order-list-purchase">
-        <app-pull-refresh v-model:error="error" v-model:pageIndex="pageIndex" :page-count="pageCount"
-            @refresh="onRefresh">
-            <app-list :columns="columns" :data-list="dataList">
-                <template #operator="{row}">
-                    <Button size="small" type="primary" round @click="listing(row)">挂牌</Button>
-                    <Button size="small" type="danger" round @click="pickup(row)">提货</Button>
-                </template>
-            </app-list>
+    <app-view class="wareorder-list-purchase">
+        <app-pull-refresh class="wareorder-list__wrapper" v-model:error="error" v-model:pageIndex="pageIndex"
+            :page-count="pageCount" @refresh="onRefresh">
+            <ul class="section">
+                <li class="section-item" v-for="(item, index) in dataList" :key="index">
+                    <div class="section-item__titlebar">
+                        <div class="left">
+                            <span>{{ item.wrstandardname }}</span>
+                        </div>
+                    </div>
+                    <div class="section-item__content">
+                        <table cellspacing="0" cellpadding="0">
+                            <tr>
+                                <th>库存</th>
+                                <td>{{ item.qty }}</td>
+                                <th>冻结</th>
+                                <td>{{ item.freezerqty }}</td>
+                                <th>可用</th>
+                                <td>{{ item.enableqty }}</td>
+                            </tr>
+                            <tr>
+                                <th>仓库</th>
+                                <td colspan="5">{{ item.warehousename }}</td>
+                            </tr>
+                        </table>
+                    </div>
+                    <div class="section-item__btnbar">
+                        <Button size="small" round @click="listing(item)">挂牌</Button>
+                        <Button size="small" round @click="pickup(item)">提货</Button>
+                    </div>
+                </li>
+            </ul>
         </app-pull-refresh>
+        <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
+            @closed="closeComponent" v-if="componentId" />
     </app-view>
 </template>
 
 <script lang="ts" setup>
-
-import { shallowRef } from 'vue'
-import { useNavigation } from '@/hooks/navigation'
-import { useQueryHoldLB } from '@/business/order'
+import { shallowRef, defineAsyncComponent } from 'vue'
 import { Button } from 'vant'
+import { useQueryHoldLB } from '@/business/order'
+import { useComponent } from '@/hooks/component'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
-import AppList from '@mobile/components/base/list/index.vue'
 
-const { router } = useNavigation()
+const componentMap = new Map<string, unknown>([
+    ['listing', defineAsyncComponent(() => import('../../../components/listing/index.vue'))],
+    ['pickup', defineAsyncComponent(() => import('../../../components/pickup/index.vue'))],
+])
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent()
 const { pageIndex, pageCount, getHoldLB } = useQueryHoldLB()
 const dataList = shallowRef<Model.HoldLBRsp[]>([])
+const selectedRow = shallowRef()
 const error = shallowRef(false)
 
-const columns: Model.TableColumn[] = [
-    { prop: 'wrstandardname', label: '商品' },
-    { prop: 'qty', label: '库存' },
-    { prop: 'freezerqty', label: '冻结' },
-    { prop: 'enableqty', label: '可用' },
-    { prop: 'warehousename', label: '仓库' },
-    { prop: 'operator', label: '操作' }
-]
-
 const pickup = (item: Model.HoldLBRsp) => {
-    router.push({ name: 'warehouse-pickup', params: { item: JSON.stringify(item) } })
+    selectedRow.value = item
+    openComponent('pickup')
 }
 
 const listing = (item: Model.HoldLBRsp) => {
-    console.log('sssssss', item)
-    router.push({ name: 'warehouse-listing', params: { item: JSON.stringify(item) } })
+    selectedRow.value = item
+    openComponent('listing')
 }
 
 const onRefresh = (finish: () => void) => {

+ 36 - 20
src/packages/mobile/views/mine/wareorder/list/components/wroutinapply/index.vue

@@ -1,39 +1,55 @@
 <template>
-    <app-view class="order-list-purchase">
-        <app-pull-refresh v-model:error="error" v-model:pageIndex="pageIndex" :page-count="pageCount"
-            @refresh="onRefresh">
-            <app-list :columns="columns" :data-list="dataList" @click="onClick" >
-                <template #applystatus="{ value }">
-                    {{ getApplyStatusName(value) }}
-                </template>
-            </app-list>
+    <app-view class="wareorder-list-purchase">
+        <app-pull-refresh class="wareorder-list__wrapper" v-model:error="error" v-model:pageIndex="pageIndex"
+            :page-count="pageCount" @refresh="onRefresh">
+            <ul class="section">
+                <li class="section-item" v-for="(item, index) in dataList" :key="index">
+                    <div class="section-item__titlebar">
+                        <div class="left">
+                            <span>{{ item.wrstandardname }}</span>
+                        </div>
+                        <div class="right">
+                            <span>{{ getApplyStatusName(item.applystatus) }}</span>
+                        </div>
+                    </div>
+                    <div class="section-item__content">
+                        <table cellspacing="0" cellpadding="0">
+                            <tr>
+                                <th>数量</th>
+                                <td>{{ item.qty }}</td>
+                                <th>类型</th>
+                                <td>{{ item.appointmentmodeldisplay }}</td>
+                                <th>申请时间</th>
+                                <td>{{ item.applytime }}</td>
+                            </tr>
+                            <tr>
+                                <th>仓库</th>
+                                <td colspan="5">{{ item.warehousename }}</td>
+                            </tr>
+                        </table>
+                    </div>
+                    <div class="section-item__btnbar">
+                        <Button size="small" round @click="onClick(item)">详情</Button>
+                    </div>
+                </li>
+            </ul>
         </app-pull-refresh>
     </app-view>
 </template>
 
 <script lang="ts" setup>
-
 import { shallowRef } from 'vue'
+import { Button } from 'vant'
 import { useNavigation } from '@/hooks/navigation'
 import { useQueryWrOutInApply } from '@/business/order'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
-import AppList from '@mobile/components/base/list/index.vue'
-import { getApplyStatusName } from "@/constants/order";
+import { getApplyStatusName } from "@/constants/order"
 
 const { router } = useNavigation()
 const { pageIndex, pageCount, getWrOutInApply } = useQueryWrOutInApply()
 const dataList = shallowRef<Model.WrOutInApplyRsp[]>([])
 const error = shallowRef(false)
 
-const columns: Model.TableColumn[] = [
-    { prop: 'wrstandardname', label: '商品' },
-    { prop: 'qty', label: '数量' },
-    { prop: 'appointmentmodeldisplay', label: '类型' },
-    { prop: 'applytime', label: '申请时间' },
-    { prop: 'warehousename', label: '仓库' },
-    { prop: 'applystatus', label: '状态' },
-]
-
 const onClick = (item: Model.WrOutInApplyRsp) => {
     router.push({ name: 'wroutinapply-detail', params: { item: JSON.stringify(item) } })
 }

+ 76 - 4
src/packages/mobile/views/mine/wareorder/list/index.less

@@ -1,17 +1,89 @@
-.mine-wareorder {
+.wareorder-list {
     .van-tabs {
         display       : flex;
         flex-direction: column;
         height        : 100%;
 
         &__content {
-            flex       : 1;
-            overflow-y : auto;
-            padding-top: .2rem;
+            flex      : 1;
+            overflow-y: auto;
         }
 
         .van-tab__panel {
             height: 100%;
         }
     }
+
+    &__wrapper {
+        .section {
+            padding       : .2rem;
+            padding-bottom: 0;
+
+            &-item {
+                background-color: #fff;
+                border-radius   : .16rem;
+                padding         : .24rem;
+
+                &:not(:first-child) {
+                    margin-top: .2rem;
+                }
+
+                &__titlebar {
+                    display        : flex;
+                    justify-content: space-between;
+                    align-items    : center;
+                    margin-bottom  : .2rem;
+
+                    .left {
+                        span {
+                            &:first-child {
+                                margin-right: .2rem;
+                            }
+
+                            &:not(:first-child):not(:last-child) {
+                                &::after {
+                                    content: '/';
+                                    margin : 0 .1rem;
+                                }
+                            }
+                        }
+                    }
+
+                    .right {
+                        font-size: .24rem;
+                        color    : #999;
+                    }
+                }
+
+                &__content {
+                    table {
+                        width    : 100%;
+                        font-size: .24rem;
+
+                        th,
+                        td {
+                            padding: .08rem 0;
+                        }
+
+                        th {
+                            font-weight: normal;
+                            color      : #999;
+                        }
+                    }
+                }
+
+                &__btnbar {
+                    display        : flex;
+                    justify-content: flex-end;
+                    gap            : .16rem;
+                    margin-top     : .2rem;
+
+                    .van-button {
+                        width       : 1.6rem;
+                        border-width: 1px;
+                    }
+                }
+            }
+        }
+    }
 }

+ 3 - 4
src/packages/mobile/views/mine/wareorder/list/index.vue

@@ -1,14 +1,14 @@
 <template>
-    <app-view class="mine-wareorder">
+    <app-view class="wareorder-list">
         <template #header>
             <app-navbar title="我的仓单" />
         </template>
         <Tabs v-model:active="activeTab">
             <Tab title="明细">
-                <HoldLB />
+                <HoldLB v-if="activeTab === 0" />
             </Tab>
             <Tab title="提货">
-                <WrOutInApply />
+                <WrOutInApply v-if="activeTab === 1" />
             </Tab>
         </Tabs>
     </app-view>
@@ -21,7 +21,6 @@ import HoldLB from './components/holdlb/index.vue'
 import WrOutInApply from './components/wroutinapply/index.vue'
 
 const activeTab = shallowRef(0)
-
 </script>
 
 <style lang="less">

+ 0 - 90
src/packages/mobile/views/mine/wareorder/listing/index.vue

@@ -1,90 +0,0 @@
-<template>
-    <app-view class="wareorder-listing">
-        <template #header>
-            <app-navbar title="供求挂牌" />
-        </template>
-
-        <Form ref="formRef" class="g-form__container" @submit="formSubmit">
-            <CellGroup inset>
-                <Field label="商品">
-                    <template #input>
-                        {{ detail?.wrstandardname }}
-                    </template>
-                </Field>
-                <Field label="仓库">
-                    <template #input>
-                        {{ detail?.warehousename }}
-                    </template>
-                </Field>
-                <Field label="参考价格">
-                    <template #input>
-                        7000元/吨
-                    </template>
-                </Field>
-                <Field name="Price" label="挂牌价格" v-model="formData.FixedPrice" placeholder="请输入挂牌价格"
-                    :rules="formRules.FixedPrice" />
-                <Field name="Qty" label="挂牌数量" v-model="formData.OrderQty" placeholder="请输入挂牌数量"
-                    :rules="formRules.OrderQty" />
-                <Field label="货款金额" >
-                    <template #input>
-                        {{ amount }}
-                    </template>
-                </Field> 
-            </CellGroup>
-        </Form>
-
-        <template #footer>
-            <div class="g-form__footer">
-                <Button type="primary" round block @click="formRef?.submit()">卖出</Button>
-            </div>
-        </template>
-    </app-view>
-</template>
-
-
-<script lang="ts" setup>
-
-import { shallowRef } from 'vue'
-import { CellGroup, Button, Field, Form, FormInstance, FieldRule, Toast } from 'vant'
-import { useHdWROrder } from "@/business/trade";
-import { useNavigation } from '@/hooks/navigation'
-import { fullloading, dialog } from '@/utils/vant'
-     
-const { router, route } = useNavigation()
-const formRef = shallowRef<FormInstance>()
-
-const item = route.params.item
-const detail = shallowRef<Model.HoldLBRsp>()
-
-if (item) {
-    detail.value = JSON.parse(item.toString())
-}
-
-const { formData, listingSubmit, amount} = useHdWROrder(detail.value)
-
-// 表单验证规则
-const formRules: { [key in keyof Proto.HdWROrderReq]?: FieldRule[] } = {
-    FixedPrice: [{
-        required: true,
-        message: '请输入挂牌价格',
-    }],
-    OrderQty: [{
-        required: true,
-        message: '请输入挂牌数量',
-    }],
-}
-
-const formSubmit = () => {
-    fullloading((hideLoading) => {
-        listingSubmit().then(() => {
-            hideLoading()
-            dialog('挂牌提交成功。').then(() => {
-                router.back()
-            })
-        }).catch((err) => {
-            Toast.fail(err)
-        })
-    })
-}
-
-</script>

+ 0 - 179
src/packages/mobile/views/mine/wareorder/pickup/index.vue

@@ -1,179 +0,0 @@
-<template>
-    <app-view class="wareorder-pickup">
-        <template #header>
-            <app-navbar title="提货" />
-        </template>
-
-        <Form ref="formRef" class="g-form__container" @submit="formSubmit">
-            <CellGroup inset>
-                <Field label="商品" readonly>
-                    <template #input>
-                        {{ detail?.wrstandardname }}
-                    </template>
-                </Field>
-                <Field label="仓库" readonly>
-                    <template #input>
-                        {{ detail?.warehousename }}
-                    </template>
-                </Field>
-                <Field name="OrderQty" label="提货数量" v-model="orderQty" placeholder="请输入提货数量"
-                    :rules="formRules.orderQty" />
-
-                <Field label="提货方式" readonly>
-                   <template #input>
-                      <RadioGroup v-model="checked" direction="horizontal">
-                        <Radio name="3">代办运输</Radio>
-                        <Radio name="2">自提</Radio>
-                      </RadioGroup>
-                   </template>
-                </Field>
-                <Field name="ContractName" label="联系人" v-model="formData.ContactName" placeholder="请输入联系人"
-                :rules="formRules.ContactName">
-                    <template #button>
-                        <Button size="normal" icon="add-o" @click="showContact = true" />
-                    </template>
-                </Field>
-                <Field name="ContactNum" label="联系方式" v-model="formData.ContactNum" placeholder="请输入联系方式"
-                :rules="formRules.ContactNum"/>
-                <Field name="Address" label="目的地地址" v-model="formData.Address" placeholder="请输入目的地地址"
-                :rules="formRules.Address" v-if="checked === '3'" />
-                <Field name="AppointmentRemark" label="发票信息" rows="10" autosize v-model="formData.AppointmentRemark" placeholder="请填入发票信息"
-                :rules="formRules.AppointmentRemark">
-                    <template #button>
-                        <Button size="normal" icon="add-o" @click="showReceipt = true"/>
-                    </template>
-                </Field>
-            </CellGroup>
-        </Form>
-        <template #footer>
-            <div class="g-form__footer">
-                <Button type="primary" round block @click="formRef?.submit()">提货</Button>
-            </div>
-        </template>
-    </app-view>
-    <app-contact v-model:show="showContact" @change="contactChange" />
-    <app-receipt v-model:show="showReceipt" @change="receiptChange" />
-</template>
-
-<script lang="ts" setup>
-import { shallowRef } from 'vue'
-import { CellGroup, Button, Field, Form, FormInstance, FieldRule, Toast, Radio, RadioGroup } from 'vant'
-import { useWrOutInApply } from "@/business/trade";
-import { useNavigation } from '@/hooks/navigation'
-import { fullloading, dialog } from '@/utils/vant'
-import { getReceiptTypeName } from '@/constants/receipt'
-import { validateRules } from '@/constants/regex'
-import AppContact from '@mobile/components/modules/contact/index.vue'
-import AppReceipt from '@mobile/components/modules/receipt/index.vue'
-
-const showContact = shallowRef(false) // 显示联系人选择列表
-const showReceipt = shallowRef(false) // 显示发票选择列表
-const { router, route } = useNavigation()
-const formRef = shallowRef<FormInstance>()
-const item = route.params.item
-const detail = shallowRef<Model.HoldLBRsp>()
-
-if (item) {
-    detail.value = JSON.parse(item.toString())
-}
-
-const { formData, applySubmit, orderQty, checked} = useWrOutInApply(detail.value)
-
-// 表单验证规则
-const formRules: { [key in keyof Proto.WROutApplyReq | 'orderQty']?: FieldRule[] } = {
-    orderQty: [{
-        required: true,
-        message: '请输入提货数量',
-    }],
-    ContactName: [{
-        required: true,
-        message: '请输入联系人',
-    }],
-    ContactNum: [{
-        required: true,
-        message: '请输入联系方式',
-        validator: (val) => {
-            if (validateRules.phone.validate(val)) {
-                return true
-            }
-            return validateRules.phone.message
-        }
-    }],
-    Address: [{
-        required: checked.value === '3',
-        message: '请输入目的地地址',
-    }],
-    AppointmentRemark: [{
-        required: true,
-        message: '请输入发票信息',
-    }],
-}
-
-const formSubmit = () => {
-    fullloading((hideLoading) => {
-        applySubmit().then(() => {
-            hideLoading()
-            dialog('提货申请提交成功。').then(() => {
-                router.back()
-            })
-        }).catch((err) => {
-            Toast.fail(err)
-        })
-    })
-}
-
-// 选择联系信息
-const contactChange = (item: Model.UserReceiveInfoRsp) => {
-    formData.ContactName = item.receivername
-    formData.ContactNum = item.phonenum
-
-    if (checked.value === '3') {
-        formData.Address = [item.provincename, item.cityname, item.districtname, item.address].join(' ')
-    } else {
-        formData.Address = ''
-    }
-}
-
-// 选择发票信息
-const receiptChange = (item: Model.WrUserReceiptInfoRsp) => {
-    formData.AppointmentRemark = ''
-    Object.entries(item).forEach(([key, value]) => {
-        if (value !== '') {
-            switch (key) {
-                case 'receipttype': {
-                    formData.AppointmentRemark += '发票类型:' + getReceiptTypeName(Number(value)) + '\n'
-                    break
-                }
-                case 'username': {
-                    formData.AppointmentRemark += '发票抬头:' + value + '\n'
-                    break
-                }
-                case 'taxpayerid': {
-                    formData.AppointmentRemark += '税号:' + value + '\n'
-                    break
-                }
-                case 'receiptbank': {
-                    formData.AppointmentRemark += '开户银行:' + value + '\n'
-                    break
-                }
-                case 'receiptaccount': {
-                    formData.AppointmentRemark += '银行账号:' + value + '\n'
-                    break
-                }
-                case 'address': {
-                    formData.AppointmentRemark += '企业地址:' + value + '\n'
-                    break
-                }
-                case 'contactinfo': {
-                    formData.AppointmentRemark += '企业电话:' + value + '\n'
-                    break
-                }
-                case 'email': {
-                    formData.AppointmentRemark += '邮箱:' + value + '\n'
-                    break
-                }
-            }
-        }
-    })
-}
-</script>

+ 6 - 6
src/packages/mobile/views/purchase/detail/index.backup.vue

@@ -5,14 +5,14 @@
         </template>
         <Form ref="formRef" class="goods-details__form" @submit="onSubmit">
             <CellGroup>
-                <Field name="THJDeliveryMode" label="交方式" :rules="formRules.THJDeliveryMode" is-link>
+                <Field name="THJDeliveryMode" label="交方式" :rules="formRules.THJDeliveryMode" is-link>
                     <template #input>
                         <app-select v-model="formData.THJDeliveryMode" placeholder="请选择"
                             :options="details.deliverymodes"
                             :optionProps="{ label: 'enumdicname', value: 'enumitemname' }" />
                     </template>
                 </Field>
-                <Field label="交月份" name="PresaleApplyID" :rules="formRules.PresaleApplyID">
+                <Field label="交月份" name="PresaleApplyID" :rules="formRules.PresaleApplyID">
                     <template #input>
                         <app-select placeholder="开始月份" :options="deliveryMonths" @confirm="onMonthChange" />
                         <app-select placeholder="结束日期" :options="deliveryDays"
@@ -88,7 +88,7 @@
 import { shallowRef, computed, defineAsyncComponent } from 'vue'
 import { CellGroup, Button, Field, Form, FormInstance, Toast, FieldRule, Divider } from 'vant'
 import { fullloading } from '@/utils/vant'
-import { getImageUrl } from '@/filters'
+import { getImageUrl, parsePercent } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
 import { useComponent } from '@/hooks/component'
 import { useNavigation } from '@/hooks/navigation'
@@ -145,7 +145,7 @@ const presaleApplyDeposits = computed(() => {
     const presaleApplyId = selectedDate.value?.presaleapplyid
 
     return deposits.filter((e) => e.presaleapplyid === presaleApplyId).map(({ depositid, depositrate }) => ({
-        label: `${depositrate * 100}%`,
+        label: parsePercent(depositrate),
         value: depositid
     }))
 })
@@ -188,14 +188,14 @@ const validatorAddressInfo = computed(() => {
 // 表单验证规则
 const formRules: { [key in keyof Proto.SpotPresaleDestingOrderReq | 'addressInfo']?: FieldRule[] } = {
     THJDeliveryMode: [{
-        message: '请选择交方式',
+        message: '请选择交方式',
         validator: () => {
             return !!formData.value.THJDeliveryMode
         }
     }],
     PresaleApplyID: [
         {
-            message: '请选择交日期',
+            message: '请选择交日期',
             validator: () => {
                 return !!formData.value.PresaleApplyID
             }

+ 7 - 7
src/packages/mobile/views/purchase/detail/index.vue

@@ -5,13 +5,13 @@
         </template>
         <Form ref="formRef" class="goods-details__form" @submit="onSubmit">
             <CellGroup>
-                <Field name="THJDeliveryMode" label="交方式" :rules="formRules.THJDeliveryMode" is-link>
+                <Field name="THJDeliveryMode" label="交方式" :rules="formRules.THJDeliveryMode" is-link>
                     <template #input>
                         <app-select v-model="formData.THJDeliveryMode" :options="details.deliverymodes"
                             :optionProps="{ label: 'enumdicname', value: 'enumitemname' }" />
                     </template>
                 </Field>
-                <Field name="PresaleApplyID" label="交月份" :rules="formRules.PresaleApplyID" is-link>
+                <Field name="PresaleApplyID" label="交月份" :rules="formRules.PresaleApplyID" is-link>
                     <template #input>
                         <app-select :options="details.deliverymonth"
                             :optionProps="{ label: 'endmonth', value: 'presaleapplyid' }" @confirm="onMonthChange" />
@@ -23,7 +23,7 @@
                         <app-select v-model="formData.DepositID" :options="presaleApplyDeposits" />
                     </template>
                 </Field>
-                <Field label="交日期" v-if="selectedDate?.presaleapplyid">
+                <Field label="交日期" v-if="selectedDate?.presaleapplyid">
                     <template #input>
                         <span>{{ selectedDate.enddate }}</span>
                     </template>
@@ -98,7 +98,7 @@
 import { shallowRef, computed, defineAsyncComponent } from 'vue'
 import { CellGroup, Button, Field, Form, FormInstance, Toast, FieldRule, Divider } from 'vant'
 import { fullloading } from '@/utils/vant'
-import { getImageUrl } from '@/filters'
+import { getImageUrl, parsePercent } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
 import { useComponent } from '@/hooks/component'
 import { useNavigation } from '@/hooks/navigation'
@@ -138,7 +138,7 @@ const presaleApplyDeposits = computed(() => {
     const presaleApplyId = selectedDate.value?.presaleapplyid
 
     return deposits.filter((e) => e.presaleapplyid === presaleApplyId).map(({ depositid, depositrate }) => ({
-        label: `${(depositrate * 100).toFixed(0)}%`,
+        label: parsePercent(depositrate),
         value: depositid
     }))
 })
@@ -181,13 +181,13 @@ const validatorAddressInfo = computed(() => {
 // 表单验证规则
 const formRules: { [key in keyof Proto.SpotPresaleDestingOrderReq | 'addressInfo']?: FieldRule[] } = {
     THJDeliveryMode: [{
-        message: '请选择交方式',
+        message: '请选择交方式',
         validator: () => {
             return !!formData.value.THJDeliveryMode
         }
     }],
     PresaleApplyID: [{
-        message: '请选择交日期',
+        message: '请选择交日期',
         validator: () => {
             return !!formData.value.PresaleApplyID
         }

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

@@ -1,15 +1,15 @@
 .login {
-    display        : flex;
-    flex-direction : column;
-    background     : #d4eaf4 url('@mobile/assets/images/login-bg.jpg') no-repeat center top;
+    display: flex;
+    flex-direction: column;
+    background: #d4eaf4 url('@mobile/assets/images/login-bg.jpg') no-repeat center top;
     background-size: 100% auto;
 
     &-logo {
-        font-size  : .64rem;
+        font-size: .64rem;
         font-weight: bold;
-        text-align : center;
-        color      : #00577C;
-        padding    : 2.2rem 0 1.6rem 0;
+        text-align: center;
+        color: #00577C;
+        padding: 2.2rem 0 1.6rem 0;
     }
 
     &-form {
@@ -17,14 +17,14 @@
 
         .van-cell-group {
             border-radius: 8px;
-            overflow     : hidden;
+            overflow: hidden;
         }
 
         .button {
             &-link {
-                display        : flex;
+                display: flex;
                 justify-content: space-between;
-                padding        : .32rem 0;
+                padding: .32rem 0;
 
                 a {
                     color: #333;
@@ -34,16 +34,26 @@
     }
 
     &-footer {
-        display        : flex;
-        justify-content: center;
-        align-items    : center;
-        flex-wrap      : wrap;
-        font-size      : .24rem;
-        margin-top     : auto;
-        padding        : .36rem;
-
-        .van-checkbox {
-            margin-right: .12rem;
+        padding: .36rem;
+        margin-top: auto;
+
+        &__trem {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            flex-wrap: wrap;
+            font-size: .24rem;
+
+            .van-checkbox {
+                margin-right: .12rem;
+            }
+        }
+
+        &__version {
+            font-size: .24rem;
+            color: #999;
+            text-align: center;
+            margin-top: .08rem;
         }
     }
 }

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

@@ -17,12 +17,17 @@
       </div>
     </Form>
     <div class="login-footer">
-      <Checkbox shape="square" icon-size=".32rem" v-model="checked">我已阅读并同意</Checkbox>
-      <span @click="routerTo('rules-zcxy')" style="color:#E92020">《用户注册协议》</span>
-      <span>和</span>
-      <span @click="routerTo('rules-yhkhfxgzs')" style="color:#E92020">《用户开户风险告知书》</span>
-      <span>和</span>
-      <span @click="routerTo('rules-yszc')" style="color:#E92020">《隐私政策》</span>
+      <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>和</span>
+        <span @click="routerTo('rules-yhkhfxgzs')" style="color:#E92020">《用户开户风险告知书》</span>
+        <span>和</span>
+        <span @click="routerTo('rules-yszc')" style="color:#E92020">《隐私政策》</span>
+      </div>
+      <div class="login-footer__version" v-if="appVersion">
+        <span>v{{ appVersion }}</span>
+      </div>
     </div>
   </app-statusbar>
 </template>
@@ -35,12 +40,14 @@ import { fullloading } from '@/utils/vant'
 import { useAuth } from '@/business/auth'
 import { useNavigation } from '@/hooks/navigation'
 import service from '@/services'
+import plus from '@/utils/h5plus'
 
 const { routerTo } = useNavigation()
 const { user, login } = useAuth()
 const route = useRoute()
 const router = useRouter()
 const checked = shallowRef(false) // 是否同意协议管理
+const appVersion = shallowRef('') // 应用版本号
 
 // 导航跳转
 const navigationTo = (name: string) => {
@@ -73,6 +80,11 @@ const formSubmit = () => {
     Toast('请先同意使用条款')
   }
 }
+
+// 获取当前应用版本号
+plus.getVersion((version) => {
+  appVersion.value = version
+})
 </script>
 
 <style lang="less" scoped>

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

@@ -12,7 +12,7 @@ import { CommonParams, HttpParams } from '@/services/http/interface'
  * 获取应用更新信息
  */
 export function GetAppUpdateInfo(params: CommonParams<{ rsp: string }>) {
-    return commonRequest('http://47.116.5.81:8022/PhoneService/GetUpdateInfo', 'get', params);
+    return commonRequest(getServiceUrl('androidUpdateUrl'), 'get', params);
 }
 
 /**

+ 1 - 0
src/services/index.ts

@@ -26,6 +26,7 @@ export default new (class {
         oem: '',
         iOS: '',
         android: '',
+        androidUpdateUrl: '',
         pcNewsUrl: '',
         pcMangerUrl: '',
     }

+ 1 - 1
src/types/model/goods.d.ts

@@ -216,7 +216,7 @@ declare namespace Model {
     /** 获取现货行情 响应 */
     interface SpotGoodsPriceRsp {
         /// 涨跌幅
-        chg: string
+        chg: number
         /// 报价货币ID
         currencyid: number
         /// 现货品种ID

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

@@ -97,7 +97,7 @@ declare global {
             WRTradeDetailID?: Long; // 采购成交单ID,必填
             ClientType?: number; // 终端类型
             ClientSerialNo?: string; // 客户端流水号
-}
+        }
         // 铁合金现货预售付款处理接口应答
         interface SpotPresalePlaymentRsp {
             Header?: IMessageHead;
@@ -121,13 +121,13 @@ declare global {
             OperatorID?: number  // 操作员账号ID
             BuyOrSell?: number  // 买卖方向
             WRID?: number // 仓单ID,卖的时候填写
-}
+        }
         // 挂牌撤单应答
         interface WRListingCancelOrderRsp {
             Header?: IMessageHead;
             RetCode: number; // 返回码
             RetDesc: string; // 描述信息
-            WRTradeCancelID ?: string // 仓单贸易撤单号
+            WRTradeCancelID?: string // 仓单贸易撤单号
             OldWRTradeOrderID?: string // 目标仓单贸易委托单ID
             UserID?: number // 用户ID
             AccountID?: number // 资金账号
@@ -194,10 +194,10 @@ declare global {
         // 持仓单挂牌请求
         interface HdWROrderReq {
             Header?: IMessageHead;
-            LadingBillId?: number; // 提单id(wrholdlb的LadingBillId字段),卖的时候填写
+            LadingBillId?: Long; // 提单id(wrholdlb的LadingBillId字段),卖的时候填写
             TradeDate?: string; // 交易日
             SubNum?: number; // 提单子单号(wrholdlb的SubNum字段),卖的时候填写
-            WRFactorTypeId?: number; // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
+            WRFactorTypeId?: Long; // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
             UserID?: number; // 用户ID
             AccountID?: number; // 资金账号
             IsSpecified?: number; // 是否指定对手

+ 8 - 10
src/utils/h5plus/index.ts

@@ -49,10 +49,10 @@ export default new (class {
      * 客户端的版本名称
      * @returns 
      */
-    getVersion() {
-        return new Promise<string>((resolve) => {
-            this.onPlusReady((plus) => {
-                resolve(plus.runtime.version)
+    getVersion(callback: (version: string) => void) {
+        this.onPlusReady((plus) => {
+            plus.runtime.getProperty(plus.runtime.appid, (info: { version: string }) => {
+                callback(info.version)
             })
         })
     }
@@ -61,12 +61,10 @@ export default new (class {
      * 获取客户端的版本号
      * @returns 
      */
-    getVersionCode() {
-        return new Promise<string>((resolve) => {
-            this.onPlusReady((plus) => {
-                const versionCode = plus.runtime.versionCode
-                console.log('版本号', versionCode)
-                resolve(versionCode)
+    getVersionCode(callback: (versionCode: string) => void) {
+        this.onPlusReady((plus) => {
+            plus.runtime.getProperty(plus.runtime.appid, (info: { versionCode: string }) => {
+                callback(info.versionCode)
             })
         })
     }