Преглед на файлове

feat(djk): 新增大健康订单相关功能

- 添加 OmsDjkOrderAttach 接口定义,包含订单详情、商品信息、退款等字段
- 添加 djkOrderAttachInfo 到 Api 接口类型定义
- 修改确认订单页面,添加手机号格式化显示
- 更新订单详情页面,重构订单状态显示逻辑
- 新增订单导航和拨打电话功能
- 添加福利订单退款规则说明
- 调整订单列表显示样式,优化商品信息展示

fix(djk): 修复福利订单接口请求方式错误

- 将 djk.addWelfareOrder 接口从 GET 方式改为 POST 方式
- 在福利订单请求参数中添加 welfareId 字段

refactor(djk): 优化订单详情页面逻辑

- 移除冗余的 collapse 功能
- 重构订单状态判断逻辑
- 简化订单详情获取流程

style(djk): 统一订单状态文本显示

- 将"订单已完成"等状态文本简化为"已完成"
- 统一订单状态展示格式

chore(config): 更新开发环境配置

- 切换开发环境服务器地址
- 更新试用环境API地址配置

refactor(utils): 添加手机号格式化工具函数

- 新增 phoneFormat 函数,用于手机号脱敏显示
- 自动导入 phoneFormat 函数到全局

feat(charge): 充电订单列表添加登录验证

- 设置 chargeOrderList 页面需要登录访问

refactor(order): 优化订单列表刷新机制

- 添加订单列表自动刷新功能
- 改进订单加载逻辑
zhangtao преди 1 ден
родител
ревизия
1996fa4b04

+ 93 - 0
src/api/api.type.d.ts

@@ -736,6 +736,99 @@ namespace Api {
      * 充电订单
      */
     chargeOrder?: ChargeOrderInfo
+    /**
+     *
+     */
+    djkOrderAttachInfo?: OmsDjkOrderAttach
+  }
+  interface OmsDjkOrderAttach {
+    /**
+     * 活动名称
+     */
+    activityName?: string
+    createTime?: string
+    /**
+     * 客户授权
+     */
+    customerAuthorization?: number
+    /**
+     * 大健康订单类型 0-正常订单 1-福利订单
+     */
+    djkOrderType?: number
+    /**
+     * 过期时间
+     */
+    expiredTime?: string
+    /**
+     * 商品编码
+     */
+    goodsCode?: string
+    /**
+     * 商品id
+     */
+    goodsId?: number
+    /**
+     * 商品图
+     */
+    goodsImg?: string
+    /**
+     * 商品名
+     */
+    goodsName?: string
+    /**
+     * 商品数量
+     */
+    goodsNum?: number
+    /**
+     * 订单号
+     */
+    orderNumber?: string
+    /**
+     * 价格
+     */
+    price?: number
+    /**
+     * 退款描述
+     */
+    refundDesc?: string
+    /**
+     * 退款图片
+     */
+    refundImg?: string
+    /**
+     * 退款单号
+     */
+    refundNo?: string
+    /**
+     * 退款原因
+     */
+    refundReason?: string
+    /**
+     * 退款到账时间
+     */
+    refundTime?: string
+    /**
+     * 订单备注
+     */
+    remark?: string
+    /**
+     * 提交退款时间
+     */
+    submitRefundTime?: string
+    updateTime?: string
+    /**
+     * 核销人
+     */
+    verificationPerson?: string
+    /**
+     * 核销门店
+     */
+    verificationShop?: string
+    /**
+     * 核销时间
+     */
+    verificationTime?: string
+    [property: string]: any
   }
   interface ChargeOrderInfo {
     /**

+ 1 - 1
src/api/apiDefinitions.ts

@@ -116,6 +116,6 @@ export default {
   'djk.welfareClaimInfo':['POST', '/smqjh-pms/app-api/v1/welfareClaimInfo/claim'],
   'djk.welfareClaimInfoDetaile':['GET', '/smqjh-pms/app-api/v1/welfareClaimInfo/{memberId}'],
   'djk.welfareClaimInfoPopup':['GET', '/smqjh-pms/app-api/v1/welfareClaimInfo/popup/{memberId}'],
-  'djk.addWelfareOrder':['GET', '/smqjh-oms/api/v1/djkOrder/addWelfareOrder'],
+  'djk.addWelfareOrder':['POST', '/smqjh-oms/api/v1/djkOrder/addWelfareOrder'],
 
 };

+ 2 - 0
src/auto-imports.d.ts

@@ -126,6 +126,7 @@ declare global {
   const payError: typeof import('./subPack-xsb/utils/confirm-order')['payError']
   const paySuccess: typeof import('./subPack-xsb/utils/confirm-order')['paySuccess']
   const persistPlugin: typeof import('./store/persist')['persistPlugin']
+  const phoneFormat: typeof import('./utils/index')['phoneFormat']
   const provide: typeof import('vue')['provide']
   const provideLocal: typeof import('@vueuse/core')['provideLocal']
   const reactify: typeof import('@vueuse/core')['reactify']
@@ -497,6 +498,7 @@ declare module 'vue' {
     readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
     readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
     readonly persistPlugin: UnwrapRef<typeof import('./store/persist')['persistPlugin']>
+    readonly phoneFormat: UnwrapRef<typeof import('./utils/index')['phoneFormat']>
     readonly provide: UnwrapRef<typeof import('vue')['provide']>
     readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']>
     readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>

+ 4 - 4
src/config/index.ts

@@ -7,8 +7,8 @@ const mapEnvVersion = {
   // develop: 'http://192.168.0.157:8080',
   // develop: 'http://192.168.1.253:8080',
   // develop: 'http://192.168.0.19:8080',
-  develop: 'http://192.168.0.217:8080', // 黄
-  // develop: 'http://192.168.1.89:8080', // 田
+  // develop: 'http://192.168.0.217:8080', // 黄
+  develop: 'http://192.168.1.89:8080', // 田
   // develop: 'http://192.168.0.11:8080', // 王S
   // develop: 'http://74949mkfh190.vicp.fun', // 付
   // develop: 'http://47.109.84.152:8081',
@@ -19,9 +19,9 @@ const mapEnvVersion = {
    */
   // trial: "http://192.168.1.166:8080/jeecg-boot",
   // trial: 'http://192.168.0.157:8080',
-  trial: 'http://47.109.84.152:8081',
+  // trial: 'http://47.109.84.152:8081',
   // trial: 'http://192.168.1.166:8080',
-  // trial: 'https://smqjh.api.zswlgz.com',
+  trial: 'https://smqjh.api.zswlgz.com',
   /**
    * 正式版
    */

+ 1 - 1
src/pages.json

@@ -428,7 +428,7 @@
         {
           "path": "chargeOrderList/chargeOrderList",
           "name": "charge-order-list",
-          "islogin": false,
+          "islogin": true,
           "style": {
             "navigationBarTitleText": "充电订单",
             "navigationStyle": "custom"

+ 5 - 0
src/subPack-djk/commonTab/components/order.vue

@@ -25,8 +25,13 @@ function handleBottom() {
     page.value++
   }
 }
+reload()
 watch(() => refreshOrderList.value, () => {
   console.log('刷新页面')
+  if (refreshOrderList.value) {
+    reload()
+    refreshOrderList.value = false
+  }
 })
 </script>
 

+ 2 - 2
src/subPack-djk/confirmOrder/index.vue

@@ -92,7 +92,7 @@ async function handlePay() {
           积分{{ points ? `(${points})` : '' }}
         </view>
         <view class="text-28rpx font-semibold" :class="[points ? '' : 'text-gray']">
-          {{ points ? `¥${points / 100}` : '不可用' }}
+          {{ points ? `-¥${points / 100}` : '不可用' }}
         </view>
       </view>
       <view class="my20rpx h2rpx w-full bg-#F0F0F0" />
@@ -114,7 +114,7 @@ async function handlePay() {
       </view>
       <view class="mt16rpx flex items-center text-28rpx">
         <view v-if="!isEdit" class="mr10rpx">
-          {{ phone?.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2') }}
+          {{ phoneFormat(String(phone)) }}
         </view>
         <view v-else>
           <input v-model="phone" type="number" :maxlength="11" @blur="isEdit = false">

+ 114 - 97
src/subPack-djk/orderDetaile/index.vue

@@ -10,7 +10,6 @@ definePage({
     navigationStyle: 'custom',
   },
 })
-const collapse = ref(true)
 const orderInfo = ref<Api.xsbOrderList>()
 const orderNum = ref()
 const { refreshOrderList } = storeToRefs(useSysStore())
@@ -27,9 +26,6 @@ async function getDetail(id: string) {
   orderInfo.value = data
 }
 
-function handleCollapse() {
-  collapse.value = !collapse.value
-}
 async function handleCancel() {
   await useUserStore().handleCommonCancelOrder(orderInfo.value as Api.xsbOrderList)
   getDetail(String(unref(orderInfo)?.orderNumber))
@@ -63,15 +59,18 @@ function handleCopy() {
   })
 }
 async function handleAfterSale() {
-  if (!orderInfo.value?.orderItemList) {
-    useGlobalToast().show('商品异常!')
-    return
-  }
-  await useSysStore().getRefunOrder(orderInfo.value.orderNumber as string)
+
 }
-async function handleReceive() {
-  await useUserStore().handleCommonOrderReceive(orderInfo.value as Api.xsbOrderList)
-  getDetail(String(unref(orderInfo)?.orderNumber))
+function handleNav() {
+  uni.openLocation({
+    latitude: Number(orderInfo.value?.djkOrderAttachInfo?.shopLat),
+    longitude: Number(orderInfo.value?.djkOrderAttachInfo?.shopLng),
+  })
+}
+function handlePhone() {
+  uni.makePhoneCall({
+    phoneNumber: String(orderInfo.value?.djkOrderAttachInfo?.tel),
+  })
 }
 </script>
 
@@ -117,28 +116,21 @@ async function handleReceive() {
           </view>
           <view
             v-if="orderInfo.hbOrderStatus !== OrderStatus.PaddingPay" class="flex items-center"
-            @click="handleCollapse"
           >
             <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderAccepted" class="mr-10rpx">
-              商家拣货中
-            </view>
-            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderWaitDelivery" class="mr-10rpx">
-              订单待配送
+              待使用
             </view>
-            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderDelivering" class="mr-10rpx">
-              订单配送中
-            </view>
-            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCancelAudit" class="mr-10rpx">
-              订单取消审核
+            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCompleted" class="mr-10rpx">
+              已完成
             </view>
             <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCancel" class="mr-10rpx">
-              订单取消
+              已取消
             </view>
-            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderArrived" class="mr-10rpx">
-              订单已送达
+            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderRefund" class="mr-10rpx">
+              已退款
             </view>
-            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCompleted" class="mr-10rpx">
-              订单已完成
+            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderExpired" class="mr-10rpx">
+              已过期
             </view>
           </view>
           <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCancel" class="mt-20rpx text-28rpx text-[#AAAAAA]">
@@ -148,15 +140,6 @@ async function handleReceive() {
       </view>
       <view class="mt-20rpx rounded-16rpx bg-white p-24rpx">
         <view class="grid grid-cols-5 text-28rpx text-[#222]">
-          <view
-            v-if="orderInfo.hbOrderStatus === OrderStatus.OrderArrived" class="flex flex-col items-center"
-            @click="handleReceive"
-          >
-            <image :src="`${StaticUrl}/orderDetaile-submit-order.png`" class="h-40rpx w-40rpx" />
-            <view class="mt-40rpx">
-              确认收货
-            </view>
-          </view>
           <view
             v-if="[OrderStatus.OrderCancel, OrderStatus.OrderCompleted].includes(Number(orderInfo.hbOrderStatus))"
             class="flex flex-col items-center" @click="handelDel"
@@ -175,72 +158,122 @@ async function handleReceive() {
             </Zcontact>
           </view>
           <view
-            v-if="orderInfo.refundStatus != 2 && [OrderStatus.OrderCompleted, OrderStatus.OrderWaitDelivery, OrderStatus.OrderAccepted].includes(orderInfo.hbOrderStatus)"
+            v-if="orderInfo.hbOrderStatus == OrderStatus.OrderAccepted && orderInfo.djkOrderAttachInfo?.djkOrderType == 0 "
             class="flex flex-col items-center" @click="handleAfterSale"
           >
             <image :src="`${StaticUrl}/orderDetaile-shou.png`" class="h-40rpx w-40rpx" />
             <view class="mt-40rpx">
-              申请售后
+              申请退款
             </view>
           </view>
         </view>
       </view>
-      <view class="mt-20rpx rounded-16rpx bg-white p-24rpx">
-        <view class="flex items-center">
-          <image :src="`${StaticUrl}/order-icon.png`" class="h-36rpx w-36rpx" />
-          <view class="ml-20rpx text-32rpx font-semibold">
-            {{ orderInfo?.shopName }}
+      <view class="mt-20rpx flex items-center rounded-16rpx bg-white p-24rpx">
+        <image
+          :src="orderInfo.djkOrderAttachInfo?.goodsImg?.split(',')[0]"
+          class="h160rpx w160rpx flex-shrink-0 rounded-16rpx"
+        />
+        <view class="ml20rpx flex-1">
+          <view class="text-32rpx font-semibold">
+            {{ orderInfo.djkOrderAttachInfo?.goodsName }}
           </view>
-        </view>
-        <view class="my-24rpx h-2rpx w-full bg-[#F0F0F0]" />
-        <CollapsePanel :line-height="150">
-          <view v-for="item in orderInfo?.orderItemList" :key="item.skuId" class="mb-20rpx w-full flex items-center">
-            <view class="mr-20rpx w-120rpx flex-shrink-0">
-              <image :src="item.pic" class="h-120rpx w-120rpx" />
+          <view class="mt16rpx text-24rpx text-gray">
+            有效期360天·需提前1天预约
+          </view>
+          <view class="mt16rpx flex items-center justify-between">
+            <view class="text-36rpx text-#FF4D3A font-semibold">
+              <text class="text-20rpx">
+                ¥
+              </text> {{ orderInfo.djkOrderAttachInfo?.price }}
             </view>
-            <view class="flex-1">
-              <view class="w-full flex items-center justify-between font-semibold">
-                <view class="text-28rpx">
-                  {{ item.skuName }}
-                </view>
-                <view class="text-32rpx text-[#FF4D3A]">
-                  ¥{{ item.price }}
-                </view>
-              </view>
-              <view class="text-24rpx text-[#AAAAAA]">
-                规格:{{ item.spec }}
-              </view>
-              <view class="text-24rpx text-[#AAAAAA]">
-                ×{{ item.prodCount }}
-              </view>
+            <view class="text-24rpx text-gray">
+              x{{ orderInfo.djkOrderAttachInfo?.goodsNum }}
             </view>
           </view>
-        </CollapsePanel>
-
-        <view class="mt-24rpx h-2rpx w-full bg-[#F0F0F0]" />
-        <view class="mt-24rpx flex items-center justify-between">
-          <view class="text-28rpx">
+        </view>
+      </view>
+      <view class="mt-20rpx rounded-16rpx bg-white p-24rpx">
+        <view class="flex items-center justify-between">
+          <view class="text-28rpx text-gray">
             商品金额
           </view>
-          <view class="text-[#FF4A39] font-semibold">
-            ¥{{ orderInfo?.total }}
+          <view class="text-28rpx font-semibold">
+            ¥{{ orderInfo.djkOrderAttachInfo?.price }}
           </view>
         </view>
-        <view class="mt-24rpx flex items-center justify-between">
-          <view class="text-28rpx">
-            积分
+        <view class="mt20rpx flex items-center justify-between">
+          <view class="text-28rpx text-gray">
+            积分{{ orderInfo.offsetPoints ? `(${orderInfo.offsetPoints})` : '' }}
           </view>
-          <view class="text-[#FF4A39] font-semibold">
-            -¥{{ Number(orderInfo?.offsetPoints) / 100 }}
+          <view class="text-28rpx text-#FF4D3A font-semibold">
+            -¥{{ orderInfo.offsetPoints }}
           </view>
         </view>
-        <view class="my-24rpx h-2rpx w-full bg-[#F0F0F0]" />
-        <view class="flex items-center justify-end">
-          <view class="text-28rpx">
-            总计{{ orderInfo.orderMoney }} 共减 {{ Number(orderInfo.offsetPoints) / 100 }}
+        <view class="my20rpx h2rpx w-full bg-#F0F0F0" />
+        <view class="mt20rpx flex items-center justify-between">
+          <view class="text-28rpx text-gray">
+            总计
+          </view>
+          <view class="text-28rpx font-semibold">
+            ¥{{ orderInfo.actualTotal }}
           </view>
         </view>
       </view>
+      <view class="mt20rpx rounded-16rpx bg-white p24rpx">
+        <view class="mt20rpx h160rpx flex items-center justify-between bg-cover bg-center px24rpx" :style="{ backgroundImage: `url(${StaticUrl}/djk-shop-nav-bg.png)` }">
+          <view class="flex items-center">
+            {{ orderInfo.djkOrderAttachInfo?.shopAddress }}
+          </view>
+          <view class="flex items-center">
+            <view class="mr40rpx flex flex-col items-center justify-center" @click="handleNav">
+              <image
+                :src="`${StaticUrl}/djk-shop-dh.png`"
+                class="h40rpx w40rpx"
+              />
+              <view class="mt20rpx text-28rpx">
+                导航
+              </view>
+            </view>
+            <view class="flex flex-col items-center justify-center" @click="handlePhone">
+              <image
+                :src="`${StaticUrl}/film-phone.png`"
+                class="h40rpx w40rpx"
+              />
+              <view class="mt20rpx text-28rpx">
+                电话
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="mt20rpx rounded-16rpx bg-white p24rpx">
+        <view class="text-32rpx font-semibold">
+          客户信息
+        </view>
+        <view class="mt20rpx text-24rpx">
+          {{ phoneFormat(String(orderInfo.consigneeMobile)) }}
+        </view>
+      </view>
+      <view class="mt20rpx rounded-16rpx bg-white p24rpx">
+        <view class="text-32rpx font-semibold">
+          退款规则
+        </view>
+        <view class="mt20rpx text-24rpx">
+          支付成功后,服务有效期为30天
+        </view>
+        <view class="mt20rpx text-24rpx">
+          有效期内可自主申请退款
+        </view>
+        <view class="mt20rpx text-24rpx">
+          过期未使用将自动退款,无需申请
+        </view>
+        <view class="mt20rpx text-24rpx text-gray">
+          (积分支付的,退还后积分过期后,也将不可使用)
+        </view>
+        <view class="mt20rpx text-24rpx">
+          已核销服务不可退款
+        </view>
+      </view>
       <view class="mt-20rpx rounded-16rpx bg-white p-24rpx">
         <view class="mb-24rpx text-28rpx font-semibold">
           订单信息
@@ -248,7 +281,7 @@ async function handleReceive() {
         <view class="pb-20rpx">
           <view class="mb-28rpx flex items-center justify-between">
             <view class="text-28rpx text-[#AAAAAA]">
-              订单
+              订单号
             </view>
             <view class="flex items-center">
               <text class="text-[#222]">
@@ -259,14 +292,6 @@ async function handleReceive() {
               </view>
             </view>
           </view>
-          <view class="mb-28rpx flex items-center justify-between">
-            <view class="text-28rpx text-[#AAAAAA]">
-              支付方式
-            </view>
-            <view class="text-[#222]">
-              微信支付
-            </view>
-          </view>
           <view class="mb-28rpx flex items-center justify-between">
             <view class="text-28rpx text-[#AAAAAA]">
               下单时间
@@ -275,14 +300,6 @@ async function handleReceive() {
               {{ orderInfo?.createTime }}
             </view>
           </view>
-          <view class="mb-28rpx flex items-center justify-between">
-            <view class="text-28rpx text-[#AAAAAA]">
-              备注信息
-            </view>
-            <view class="text-[#222]">
-              {{ orderInfo?.remarks || '无' }}
-            </view>
-          </view>
         </view>
       </view>
       <view class="h-80rpx" />

+ 1 - 1
src/subPack-djk/welfare/index.vue

@@ -32,7 +32,7 @@ async function handelSubmit() {
         customerAuthorization: boolToNumber(isAllow.value),
       },
     })
-    const data = await Apis.djk.addWelfareOrder({ data: { shopId: selectGoods.value?.shopId, channelId: useUserStore().userInfo.channelId, phone: phone.value, goodsId: selectGoods.value?.id, goodsNum: 1, customerAuthorization: boolToNumber(isAllow.value) } })
+    const data = await Apis.djk.addWelfareOrder({ data: { welfareId: Number(welfare.value?.id), shopId: selectGoods.value?.shopId, channelId: useUserStore().userInfo.channelId, phone: phone.value, goodsId: selectGoods.value?.id, goodsNum: 1, customerAuthorization: boolToNumber(isAllow.value) } })
     useGlobalToast().show('领取成功!')
     uni.hideLoading()
 

+ 47 - 38
src/subPack-smqjh/components/djk-order/index.vue

@@ -49,49 +49,58 @@ async function handleAfterSale(item: Api.xsbOrderList) {
 
 <template>
   <view class="mb-20rpx rounded-16rpx bg-white p-24rpx">
-    <view class="flex items-center justify-between">
-      <view class="flex items-center">
-        <view class="text-32rpx font-semibold">
-          {{ order.shopName }}
-        </view>
-      </view>
-      <view class="text-24rpx">
-        <template v-if="order.hbOrderStatus !== OrderStatus.PaddingPay">
-          {{ useUserStore().handleXSBCommonOrderStatusText(order) }}
-        </template>
-        <template v-else>
-          <view class="down flex items-center text-[#449DFE]">
-            待支付( 还剩 <wd-count-down :time="useUserStore().handleXSBCommonOrderStatusText(order)" @finish="$emit('refresh')">
-              <template #default="{ current }">
-                <view class="text-24rpx text-[#449DFE]">
-                  {{ current.minutes }}:{{ current.seconds }}
-                </view>
-              </template>
-            </wd-count-down> )
+    <view @click="handleClick(order.orderNumber as string)">
+      <view class="flex items-center justify-between">
+        <view class="flex items-center">
+          <view class="text-32rpx font-semibold">
+            {{ order.shopName }}
           </view>
-        </template>
+        </view>
+        <view class="text-24rpx">
+          <template v-if="order.hbOrderStatus !== OrderStatus.PaddingPay">
+            {{ useUserStore().handleXSBCommonOrderStatusText(order) }}
+          </template>
+          <template v-else>
+            <view class="down flex items-center text-[#449DFE]">
+              待支付( 还剩 <wd-count-down :time="useUserStore().handleXSBCommonOrderStatusText(order)" @finish="$emit('refresh')">
+                <template #default="{ current }">
+                  <view class="text-24rpx text-[#449DFE]">
+                    {{ current.minutes }}:{{ current.seconds }}
+                  </view>
+                </template>
+              </wd-count-down> )
+            </view>
+          </template>
+        </view>
       </view>
-    </view>
-    <view>
       <view
-        class="box-border h-176rpx w-full flex items-center justify-between"
-        @click="handleClick(order.orderNumber as string)"
+        class="mt20rpx box-border w-full flex items-center"
       >
-        <view class="box-border h-full w-480rpx py-28rpx pl-20rpx">
-          <scroll-view scroll-x class="h-full w-full whitespace-nowrap">
-            <view class="flex items-center">
-              <view v-for="goods in order.orderItemList" :key="goods.skuId" class="mr-50rpx">
-                <image :src="goods.pic" class="h-120rpx w-120rpx" />
-              </view>
+        <image
+          :src="order.djkOrderAttachInfo?.goodsImg?.split(',')[0]"
+          class="h160rpx w160rpx flex-shrink-0 rounded-16rpx"
+        />
+        <view class="ml20rpx box-border flex-1">
+          <view class="w-full flex items-center">
+            <view v-if="order.djkOrderAttachInfo?.djkOrderType" class="mr5rpx w60rpx flex-shrink-0">
+              <wd-tag type="danger">
+                福利
+              </wd-tag>
+            </view>
+            <view class="w386rpx truncate text-32rpx font-semibold">
+              {{ order.djkOrderAttachInfo?.goodsName }}
             </view>
-          </scroll-view>
-        </view>
-        <view class="box-shadow box-border h-full flex-1 flex-shrink-0 px-14rpx py-40rpx">
-          <view class="text-center text-32rpx text-[#FF4D3A] font-semibold">
-            ¥{{ order.actualTotal }}
           </view>
-          <view class="text-center text-28rpx text-[#AAAAAA]">
-            共{{ order.goodsTotal }}件
+          <view class="text-24rpx">
+            <view class="mt5rpx">
+              订单号:{{ order.djkOrderAttachInfo?.goodsNum }}
+            </view>
+            <view class="mt5rpx">
+              ¥{{ order.djkOrderAttachInfo?.price }} 有效期30天
+            </view>
+            <view class="mt5rpx">
+              {{ phoneFormat(String(order.consigneeMobile)) }}
+            </view>
           </view>
         </view>
       </view>
@@ -123,7 +132,7 @@ async function handleAfterSale(item: Api.xsbOrderList) {
           </wd-button>
         </view>
       </template>
-      <template v-if="order.refundStatus != 2 && [OrderStatus.OrderCompleted, OrderStatus.OrderWaitDelivery, OrderStatus.OrderAccepted].includes(order.hbOrderStatus) ">
+      <template v-if="order.hbOrderStatus == OrderStatus.OrderAccepted && order.djkOrderAttachInfo?.djkOrderType == 0 ">
         <view class="mr-20rpx">
           <wd-button size="small" plain type="info" @click.stop="() => handleAfterSale(order)">
             申请售后

+ 16 - 0
src/utils/index.ts

@@ -103,6 +103,15 @@ export enum OrderStatus {
    * 订单取消
    */
   OrderCancel = 60,
+  /**
+   * 订单已过期
+   */
+  OrderExpired = 62,
+  /**
+   * 大健康退款
+   */
+  OrderRefund = 61,
+
   /**
    * 订单已送达
    */
@@ -141,3 +150,10 @@ export class InputFormatUtil {
     return /^[1-9]\d{4,10}$/.test(qq)
   }
 }
+
+/**
+ * 手机号*号
+ */
+export function phoneFormat(phone: string) {
+  return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
+}