瀏覽代碼

feat: 添加物流插件配置和退款功能

- 集成微信小程序物流插件,配置物流插件版本2.1.12
- 新增退款相关API接口定义,包括退款详情、列表、取消等接口
- 添加退款订单数据类型定义,包含退款状态、商品信息等字段
- 实现退款详情页面,展示退款流程和商品信息
- 新增Zcontact组件用于客服联系功能
- 优化个人中心页面客服联系方式,使用新组件替代原生按钮
- 添加退款状态枚举和统一的取消退款处理函数
zhangtao 2 天之前
父節點
當前提交
f739be1198

+ 7 - 0
manifest.config.ts

@@ -71,6 +71,13 @@ export default defineManifestConfig({
     // componentFramework: 'glass-easel',
     // darkmode: false,
     // themeLocation: 'theme.json',
+    plugins: {
+      logisticsPlugin: {
+        version: '2.1.12',
+        provider: 'wx9ad912bf20548d92',
+      },
+    },
+
   },
   'mp-alipay': {
     usingComponents: true,

+ 1 - 6
src/App.vue

@@ -50,12 +50,7 @@ onLaunch(() => { })
   height: 0;
   color: transparent;
 }
-.zbutton{
-  all: unset;
-  &::after{
-    border: none;
-  }
-}
+
 .page-xsb {
   :deep() {
     .line {

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

@@ -538,6 +538,10 @@ namespace Api {
     [property: string]: any
   }
   interface xsbOrderList {
+    /**
+     * 物流公司名称
+     */
+    dvyName?: string
     /**
      *  经度
      */
@@ -594,6 +598,7 @@ namespace Api {
     /**
      * 物流单号
      */
+
     dvyFlowId?: string
     /**
      * 配送方式ID
@@ -1127,5 +1132,323 @@ namespace Api {
     updateTime?: string
     [property: string]: any
   }
+  interface AppRefundOrderListVo {
+    /**
+     * 退款订单业务类型 1-星闪豹
+     */
+    businessType?: number
+    /**
+     * 创建时间
+     */
+    createTime?: string
+    /**
+     * id
+     */
+    id?: string
+    /**
+     * 订单所属用户
+     */
+    memberId?: number
+    /**
+     * 订单用户信息id
+     */
+    memberInfoId?: string
+    /**
+     * 返回进度
+     */
+    omsOrderRefundRecord?: OmsOrderRefundRecord
+    /**
+     * 订单编号
+     */
+    orderNumber?: string
+    /**
+     * 推送失败原因
+     */
+    pushReason?: string
+    /**
+     * 推送状态 0-未推送 1-推送成功 2-推送失败
+     */
+    pushStatus?: number
+    /**
+     * 退款时过期的积分
+     */
+    refundExpiredScore?: number
+    /**
+     * 退款金额(分)
+     */
+    refundMoney?: number
+    /**
+     * 退款订单编号
+     */
+    refundNumber?: string
+    /**
+     * 订单状态 0-进行中,1-已完成
+     */
+    refundOrderStatus?: number
+    /**
+     * 商品信息
+     */
+    refundProdList?: OmsOrderRefundSku[]
+    /**
+     * 退款总商品价格
+     */
+    refundProdMoney?: number
+    /**
+     * 总退总款商品数
+     */
+    refundProdNumber?: number
+    /**
+     * 退款总积分
+     */
+    refundScore?: number
+    /**
+     * 退款状态
+     * 退款单状态 10:待审核 20:处理中 30:驳回退款 40:撤销退款 60:待退货(一审同意) 65:待确认收货(二审待审核) 70:退款完成
+     */
+    refundStatus?: number
+    /**
+     * 店铺id
+     */
+    shopId?: number
+    /**
+     * 退款状态映射业务编码
+     */
+    statusBusinessCode?: string
+    /**
+     * 状态映射业务编码类型
+     */
+    statusBusinessType?: string
+    /**
+     * 用户实际退款金额
+     */
+    userRefundMoney?: number
+    [property: string]: any
+  }
+
+  /**
+   * 返回进度
+   *
+   * OmsOrderRefundRecord
+   */
+  interface OmsOrderRefundRecord {
+    /**
+     * 审核状态(1-申请原因,2-商家待审核,3-申请已通过,4-用户撤回申请, 5-用户待发货,7-待商家收货,10-审核通过,20-驳回,25-已收货,30-退款成功)
+     */
+    auditStatus?: number
+    /**
+     * 创建时间
+     */
+    createTime?: string
+    /**
+     * 退款记录ID
+     */
+    id?: number
+    /**
+     * 说明
+     */
+    instructions?: string
+    /**
+     * 退款单ID
+     */
+    orderRefundId?: number
+    /**
+     * 排序
+     */
+    sort?: number
+    /**
+     * 修改时间
+     */
+    updateTime?: string
+    [property: string]: any
+  }
+
+  /**
+   * com.smqjh.mall.oms.model.entity.OmsOrderRefundSku
+   *
+   * OmsOrderRefundSku
+   */
+  interface OmsOrderRefundSku {
+    /**
+     * 订单项id
+     */
+    orderItemId?: number
+    /**
+     * 退款单ID
+     */
+    orderRefundId?: number
+    /**
+     * 商品名称
+     */
+    prodName?: string
+    /**
+     * 退款商品数量
+     */
+    productCount?: number
+    /**
+     * 商品图片
+     */
+    prodUrl?: string
+    /**
+     * 商品id
+     */
+    skuId?: number
+    /**
+     * 产品名称
+     */
+    skuName?: string
+    /**
+     * 商品单价
+     */
+    skuPrice?: number
+    [property: string]: any
+  }
+  interface OrderRefundDetails {
+    /**
+     * 申请时间
+     */
+    applyTime?: string
+    /**
+     * 申请类型:1,仅退款,2退款退货,5差价退款
+     */
+    applyType?: number
+    /**
+     * 申请说明
+     */
+    buyerDesc?: string
+    /**
+     * 联系方式(退款时留下的手机号码)
+     */
+    buyerMobile?: string
+    /**
+     * 申请原因
+     */
+    buyerReason?: string
+    /**
+     * 撤销时间
+     */
+    cancelTime?: string
+    /**
+     * 收货人地址
+     */
+    consigneeAddress?: string
+    /**
+     * 收货人电话
+     */
+    consigneeMobile?: string
+    /**
+     * 收货人姓名
+     */
+    consigneeName?: string
+    createTime?: string
+    /**
+     * 订单运费
+     */
+    freightAmount?: number
+    /**
+     * 退款数量
+     */
+    goodsNum?: number
+    /**
+     * 该退款单是否处理完成
+     */
+    handler?: number
+    /**
+     * 是否接收到商品(1:已收到,0:未收到)
+     */
+    isReceiver?: number
+    /**
+     * 是否填写了退货物流信息(1:已填写,0:未填写)
+     */
+    isReturnLogistics?: number
+    /**
+     * 操作列表信息
+     */
+    omsOrderRefundRecords?: OmsOrderRefundRecord[]
+    /**
+     * 订单信息
+     */
+    omsOrderVo?: OmsOrderVo
+    /**
+     * 订单单号
+     */
+    orderNumber?: string
+    /**
+     * 商品信息
+     */
+    orderRefundSkuList?: OrderRefundSkuVo[]
+    /**
+     * 收货时间
+     */
+    receiveTime?: string
+    /**
+     * 退款金额
+     */
+    refundAmount?: number
+    /**
+     * 退款总订单id
+     */
+    refundOrderTotalId?: string
+    /**
+     * 退款单类型(1:整单退款,2:单个物品退款)
+     */
+    refundType?: number
+    /**
+     * 拒绝原因
+     */
+    rejectMessage?: string
+    /**
+     * 退款单状态 10:待审核 20:处理中 30:驳回退款 40:撤销退款 60:待退货(一审同意) 65:待确认收货(二审待审核) 70:退款完成
+     */
+    returnMoneySts?: number
+    /**
+     * 卖家备注
+     */
+    sellerMsg?: string
+    /**
+     * 发货时间
+     */
+    shipTime?: string
+    updateTime?: string
+    [property: string]: any
+  }
+  interface OrderRefundSkuVo {
+    /**
+     * 订单项id
+     */
+    orderItemId?: number
+    /**
+     * 退款单ID
+     */
+    orderRefundId?: number
+    /**
+     * pic
+     */
+    pic?: string
+    /**
+     * prod_name
+     */
+    prodName?: string
+    /**
+     * 退款商品数量
+     */
+    productCount?: number
+    /**
+     * 商品id
+     */
+    skuId?: number
+    /**
+     * skuName
+     */
+    skuName?: string
+    /**
+     * 商品单价
+     */
+    skuPrice?: number
+    /**
+     * spec
+     */
+    spec?: string
+    [property: string]: any
+  }
 
 }

+ 4 - 0
src/api/apiDefinitions.ts

@@ -57,6 +57,10 @@ export default {
   'xsb.riderInfo':['GET', '/smqjh-oms/api/v1/order/riderInfo'],
   'xsb.deliveryNode':['GET', '/smqjh-oms/api/v1/order/deliveryNode'],
   'xsb.findByOrderNumber':['GET', '/smqjh-oms/app-api/v1/refund/findByOrderNumber'],
+  'xsb.getWaybillToken':['GET', '/smqjh-oms/api/v1/order/getWaybillToken'],
+  'xsb.refundList':['POST', '/smqjh-oms/app-api/v1/refund/findList'],
+  'xsb.refundCancel':['GET', '/smqjh-oms/app-api/v1/refund/cancel'],
+  'xsb.refundDetails':['GET', '/smqjh-oms/app-api/v1/refund/findByDetails'],
 
   'common.myShoppingCart':['GET', '/smqjh-oms/app-api/v1/shoppingCart/myShoppingCart'],
   'common.addShoppingCart':['POST', '/smqjh-oms/app-api/v1/shoppingCart/addShoppingCart'],

+ 37 - 0
src/api/globals.d.ts

@@ -192,6 +192,43 @@ declare global {
       ): Alova2Method<listData<Api.sysDict>, 'sys.dictPage', Config>;
     }
     xsb: {
+      refundDetails<
+        Config extends Alova2MethodConfig<apiResData<Api.OrderRefundDetails>> & {
+          data: {
+             refundNumber: string;
+          };
+        }
+      >(
+        config: Config
+      ): Alova2Method<apiResData<Api.OrderRefundDetails>, 'xsb.refundList', Config>;
+      refundCancel<
+        Config extends Alova2MethodConfig<any> & {
+          data: {
+            refundNumber: string;
+          };
+        }
+      >(
+        config: Config
+      ): Alova2Method<any, 'xsb.refundCancel', Config>;
+      refundList<
+        Config extends Alova2MethodConfig<listData<Api.AppRefundOrderListVo>> & {
+          data: {
+            pageNum: number;
+            pageSize:number
+          };
+        }
+      >(
+        config: Config
+      ): Alova2Method<listData<Api.AppRefundOrderListVo>, 'xsb.refundList', Config>;
+      getWaybillToken<
+        Config extends Alova2MethodConfig<apiResData<any>> & {
+          data: {
+            orderNumber: string;
+          };
+        }
+      >(
+        config: Config
+      ): Alova2Method<apiResData<any>, 'xsb.getWaybillToken', Config>;
       findByOrderNumber<
         Config extends Alova2MethodConfig<apiResData<Api.xsbOmsOrderItem[]>> & {
           data: {

+ 1 - 2
src/components.d.ts

@@ -35,8 +35,6 @@ declare module 'vue' {
     WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default']
     WdRadioGroup: typeof import('wot-design-uni/components/wd-radio-group/wd-radio-group.vue')['default']
     WdRate: typeof import('wot-design-uni/components/wd-rate/wd-rate.vue')['default']
-    WdSidebar: typeof import('wot-design-uni/components/wd-sidebar/wd-sidebar.vue')['default']
-    WdSidebarItem: typeof import('wot-design-uni/components/wd-sidebar-item/wd-sidebar-item.vue')['default']
     WdSkeleton: typeof import('wot-design-uni/components/wd-skeleton/wd-skeleton.vue')['default']
     WdSortButton: typeof import('wot-design-uni/components/wd-sort-button/wd-sort-button.vue')['default']
     WdStatusTip: typeof import('wot-design-uni/components/wd-status-tip/wd-status-tip.vue')['default']
@@ -51,6 +49,7 @@ declare module 'vue' {
     WdTextarea: typeof import('wot-design-uni/components/wd-textarea/wd-textarea.vue')['default']
     WdToast: typeof import('wot-design-uni/components/wd-toast/wd-toast.vue')['default']
     WdUpload: typeof import('wot-design-uni/components/wd-upload/wd-upload.vue')['default']
+    Zcontact: typeof import('./components/Zcontact.vue')['default']
     Zpopup: typeof import('./components/Zpopup.vue')['default']
     Zupload: typeof import('./components/Zupload.vue')['default']
   }

+ 18 - 0
src/components/Zcontact.vue

@@ -0,0 +1,18 @@
+<script setup lang="ts">
+
+</script>
+
+<template>
+  <button open-type="contact" class="zbutton">
+    <slot />
+  </button>
+</template>
+
+<style scoped lang="scss">
+.zbutton{
+  all: unset;
+  &::after{
+    border: none;
+  }
+}
+</style>

+ 8 - 2
src/manifest.json

@@ -64,7 +64,13 @@
       "wxbc64403830bb13c5",
       "wx9894a01b9e92c368"
     ],
-    "lazyCodeLoading": "requiredComponents"
+    "lazyCodeLoading": "requiredComponents",
+    "plugins": {
+      "logisticsPlugin": {
+        "version": "2.1.12",
+        "provider": "wx9ad912bf20548d92"
+      }
+    }
   },
   "mp-alipay": {
     "usingComponents": true,
@@ -87,4 +93,4 @@
     "darkmode": true,
     "themeLocation": "theme.json"
   }
-}
+}

+ 3 - 3
src/pages/my/index.vue

@@ -123,9 +123,9 @@ function handleGo(item: { name: string }) {
               <image :src="`${StaticUrl}/5.png`" class="h50rpx w50rpx" />
             </template>
             <template #title>
-              <button class="zbutton ml20rpx w80%" open-type="contact">
-                联系平台客服
-              </button>
+              <view class="ml20rpx w90%">
+                <Zcontact>联系平台客服</Zcontact>
+              </view>
             </template>
           </wd-cell>
         </wd-cell-group>

+ 256 - 272
src/subPack-common/afterSalesDetail/index.vue

@@ -1,4 +1,5 @@
 <script setup lang="ts">
+import { handleCommonRefundOrderCancel, refundStatus } from '../afterSalesList/index'
 import { StaticUrl } from '@/config'
 
 definePage({
@@ -9,320 +10,303 @@ definePage({
 
   },
 })
-const activeStep = ref(0)
 const showTime = ref(false)
 const TimeId = ref()
 const dayId = ref(1)
+const refundOrderInfo = ref<Api.OrderRefundDetails>()
+const refundNumber = ref()
+onLoad((options: any) => {
+  refundNumber.value = options.refundNumber
+  getDetail(options.refundNumber)
+})
+async function getDetail(refundNumber: string) {
+  const res = await api.xsb.refundDetails({ data: { refundNumber } })
+  refundOrderInfo.value = res.data
+}
+async function handleCancel() {
+  await handleCommonRefundOrderCancel(refundNumber.value)
+  getDetail(refundNumber.value)
+}
 </script>
 
 <template>
   <page-meta :page-style="showTime ? 'overflow: hidden;' : '' " />
-  <view class="page-xsb pt20rpx">
-    <view class="mb24rpx">
-      <wd-card>
-        <view class="py24rpx">
-          <view class="text-32rpx text-#222 font-semibold">
-            待填写配送信息
-          </view>
-          <view class="mt20rpx text-24rpx text-#AAAAAA">
-            申请已通过,请在47时59分内,填写配送信息并支付配送费
-          </view>
+  <view v-if="refundOrderInfo" class="page-xsb px24rpx pt20rpx">
+    <!-- <view class="mb24rpx rounded-16rpx bg-white p24rpx">
+      <view class="text-32rpx text-#222 font-semibold">
+        待填写配送信息
+      </view>
+      <view class="mt20rpx text-24rpx text-#AAAAAA">
+        申请已通过,请在47时59分内,填写配送信息并支付配送费
+      </view>
+    </view> -->
+    <!-- <view class="mb24rpx rounded-16rpx bg-white p24rpx">
+      <view class="text-32rpx text-#222 font-semibold">
+        配送信息
+      </view>
+      <view class="mt24rpx flex items-center justify-between" @click="showTime = true">
+        <view class="text-28rpx">
+          <text class="text-#FF4D3A">
+            *
+          </text>
+          <text class="text-#222">
+            取件时间
+          </text>
+        </view>
+        <view class="flex items-center text-#AAAAAA">
+          请选择时间 <wd-icon name="chevron-right" size="22px" />
+        </view>
+      </view>
+      <view class="mt24rpx flex items-center justify-between">
+        <view class="text-28rpx">
+          <text class="text-#FF4D3A">
+            *
+          </text>
+          <text class="text-#222">
+            取件地址
+          </text>
+        </view>
+        <view class="flex items-center text-#222">
+          富力中心A座3401
+        </view>
+      </view>
+      <view class="mt24rpx flex items-center justify-between">
+        <view />
+        <view class="flex items-center text-#222">
+          杨先生 189****4678
+        </view>
+      </view>
+      <view class="mt24rpx flex items-center justify-between">
+        <view class="text-28rpx">
+          <text class="text-#FF4D3A">
+            *
+          </text>
+          <text class="text-#222">
+            退货方式
+          </text>
         </view>
-      </wd-card>
+        <view class="flex items-center text-#222">
+          上门取件
+        </view>
+      </view>
+      <view class="mt24rpx h2rpx w-full bg-#F0F0F0" />
+      <view class="mt28rpx text-28rpx text-#222 font-semibold">
+        请支付配送费 <text class="text-32rpx text-#FF4D3A">
+          ¥12
+        </text>
+      </view>
+      <view class="mt24rpx text-24rpx text-#AAAAAA">
+        <view> 1.因个人原因退货,需客户承担商品返还商家的运费</view>
+        <view class="mt20rpx">
+          2.请确保商品不影响二次销售,否则商家会拒绝收货
+        </view>
+      </view>
+      <view class="mt24rpx w-full">
+        <wd-button block>
+          立即支付
+        </wd-button>
+      </view>
+    </view> -->
+    <view v-if="refundOrderInfo.omsOrderRefundRecords" class="rounded-16rpx bg-white p24rpx">
+      <view class="text-32rpx text-#222 font-semibold">
+        {{ refundOrderInfo.omsOrderRefundRecords[0].auditStatusDescribe }}
+      </view>
+      <view class="mt20rpx text-24rpx text-#AAAAAA">
+        {{ refundOrderInfo.omsOrderRefundRecords[0].instructions }}
+      </view>
+      <view class="mt24rpx flex items-center justify-between text-28rpx">
+        <view class="text-#222 font-semibold">
+          退款金额
+        </view>
+        <view class="text-#FF4D3A font-semibold">
+          ¥{{ refundOrderInfo.refundAmount }}
+        </view>
+      </view>
+      <view class="mt20rpx text-24rpx text-#AAAAAA">
+        申请通过后,将退回至原账户
+      </view>
     </view>
-    <view class="mb24rpx">
-      <wd-card>
-        <view class="py24rpx">
-          <view class="text-32rpx text-#222 font-semibold">
-            配送信息
+    <view class="mt20rpx rounded-16rpx bg-white p24rpx">
+      <view class="grid grid-cols-5 py24rpx text-28rpx text-#222">
+        <view
+          v-if="[refundStatus.Cancel].includes(Number(refundOrderInfo.returnMoneySts))"
+          class="flex flex-col items-center"
+          @click="useSysStore().getRefunOrder(refundOrderInfo.orderNumber as string)"
+        >
+          <image :src="`${StaticUrl}/refund-apply.png`" class="h40rpx w40rpx" />
+          <view class="mt40rpx">
+            再次申请
           </view>
-          <view class="mt24rpx flex items-center justify-between" @click="showTime = true">
-            <view class="text-28rpx">
-              <text class="text-#FF4D3A">
-                *
-              </text>
-              <text class="text-#222">
-                取件时间
-              </text>
-            </view>
-            <view class="flex items-center text-#AAAAAA">
-              请选择时间 <wd-icon name="chevron-right" size="22px" />
-            </view>
+        </view>
+        <view
+          v-if="[refundStatus.PendingAudit].includes(Number(refundOrderInfo.returnMoneySts))"
+          class="flex flex-col items-center"
+          @click="handleCancel"
+        >
+          <image :src="`${StaticUrl}/orderDetaile-apply.png`" class="h40rpx w40rpx" />
+          <view class="mt40rpx">
+            取消申请
           </view>
-          <view class="mt24rpx flex items-center justify-between">
+        </view>
+        <view class="contact relative flex flex-col items-center">
+          <image :src="`${StaticUrl}/orderDetaile-wx.png`" class="h40rpx w40rpx" />
+          <button open-type="contact" class="zbutton mt40rpx">
             <view class="text-28rpx">
-              <text class="text-#FF4D3A">
-                *
-              </text>
-              <text class="text-#222">
-                取件地址
-              </text>
+              联系商家
             </view>
-            <view class="flex items-center text-#222">
-              富力中心A座3401
+          </button>
+        </view>
+      </view>
+    </view>
+    <view class="mt20rpx rounded-16rpx bg-white p24rpx">
+      <view class="mb20rpx text-32rpx font-semibold">
+        退款流程
+      </view>
+      <wd-steps :active="0" vertical dot>
+        <wd-step v-for="item in refundOrderInfo?.omsOrderRefundRecords" :key="item.id">
+          <template #title>
+            <view class="text-28rpx font-semibold">
+              {{ item.auditStatusDescribe }}
             </view>
-          </view>
-          <view class="mt24rpx flex items-center justify-between">
-            <view />
-            <view class="flex items-center text-#222">
-              杨先生 189****4678
+          </template>
+          <template #description>
+            <view class="mt20rpx text-24rpx text-#AAAAAA">
+              <view>{{ item.instructions }} </view>
+              <view class="mt12rpx">
+                {{ item.createTime }}
+              </view>
             </view>
-          </view>
-          <view class="mt24rpx flex items-center justify-between">
-            <view class="text-28rpx">
-              <text class="text-#FF4D3A">
-                *
-              </text>
-              <text class="text-#222">
-                退货方式
-              </text>
+          </template>
+        </wd-step>
+      </wd-steps>
+    </view>
+    <view class="mt20rpx rounded-16rpx bg-white p24rpx">
+      <view class="flex items-center justify-between text-28rpx font-semibold">
+        <view class="">
+          退款商品
+        </view>
+        <view class="text-#FF4A39">
+          退款金额:¥{{ refundOrderInfo.refundAmount }}
+        </view>
+      </view>
+      <view class="mt24rpx h2rpx w-full bg-#F0F0F0" />
+      <CollapsePanel :line-height="150">
+        <view v-for="item in refundOrderInfo.orderRefundSkuList" :key="item.skuId" class="mb20rpx">
+          <view class="w-full flex items-center">
+            <view class="mr20rpx w120rpx flex-shrink-0">
+              <image
+                :src="item.pic"
+                class="h120rpx w120rpx"
+              />
             </view>
-            <view class="flex items-center text-#222">
-              上门取件
+            <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.skuTotalPrice }}
+                </view>
+              </view>
+              <view class="text-24rpx text-#AAAAAA">
+                规格:{{ item.spec }}
+              </view>
+              <view class="text-24rpx text-#AAAAAA">
+                单价:¥{{ item.skuPrice }}
+              </view>
             </view>
           </view>
           <view class="mt24rpx h2rpx w-full bg-#F0F0F0" />
-          <view class="mt28rpx text-28rpx text-#222 font-semibold">
-            请支付配送费 <text class="text-32rpx text-#FF4D3A">
-              ¥12
-            </text>
-          </view>
-          <view class="mt24rpx text-24rpx text-#AAAAAA">
-            <view> 1.因个人原因退货,需客户承担商品返还商家的运费</view>
-            <view class="mt20rpx">
-              2.请确保商品不影响二次销售,否则商家会拒绝收货
-            </view>
-          </view>
-          <view class="mt24rpx w-full">
-            <wd-button block>
-              立即支付
-            </wd-button>
-          </view>
         </view>
-      </wd-card>
-    </view>
-    <wd-card>
-      <view class="py24rpx">
-        <view class="text-32rpx text-#222 font-semibold">
-          待商家审核
+      </CollapsePanel>
+
+      <view class="mt24rpx flex items-center justify-between">
+        <view class="text-28rpx">
+          商品金额
         </view>
-        <view class="mt20rpx text-24rpx text-#AAAAAA">
-          商家将在23小时59分内为您处理,逾期将自动同意
+        <view class="text-#FF4A39 font-semibold">
+          ¥{{ refundOrderInfo.omsOrderVo.total }}
         </view>
-        <view class="mt24rpx flex items-center justify-between text-28rpx">
-          <view class="text-#222 font-semibold">
-            退款金额
-          </view>
-          <view class="text-#FF4D3A font-semibold">
-            ¥21
-          </view>
+      </view>
+      <view class="mt24rpx flex items-center justify-between">
+        <view class="text-28rpx">
+          配送费({{ refundOrderInfo.omsOrderVo.dvyType == 1 ? '快递' : '即时配送' }})
         </view>
-        <view class="mt20rpx text-24rpx text-#AAAAAA">
-          申请通过后,将退回至原账户
+        <view class="text-#FF4A39 font-semibold">
+          ¥{{ refundOrderInfo.omsOrderVo.freightAmount }}
         </view>
       </view>
-    </wd-card>
-    <view class="mt20rpx">
-      <wd-card>
-        <view class="grid grid-cols-5 py24rpx text-28rpx text-#222">
-          <view class="flex flex-col items-center">
-            <image
-              :src="`${StaticUrl}/orderDetaile-apply.png`"
-              class="h40rpx w40rpx"
-            />
-            <view class="mt20rpx">
-              取消申请
-            </view>
-          </view>
-          <view class="flex flex-col items-center">
-            <image
-              :src="`${StaticUrl}/orderDetaile-wx.png`"
-              class="h40rpx w40rpx"
-            />
-            <view class="mt20rpx">
-              联系商家
-            </view>
-          </view>
+      <view class="mt24rpx flex items-center justify-between">
+        <view class="text-28rpx">
+          积分({{ refundOrderInfo.omsOrderVo.offsetPoints }})
         </view>
-      </wd-card>
-    </view>
-    <view class="mt20rpx">
-      <wd-card>
-        <view class="py24rpx">
-          <view class="mb20rpx text-32rpx font-semibold">
-            退款流程
-          </view>
-          <wd-steps :active="activeStep" vertical dot>
-            <wd-step>
-              <template #title>
-                <view class="text-28rpx font-semibold">
-                  待商家审核
-                </view>
-              </template>
-              <template #description>
-                <view class="mt20rpx text-24rpx text-#AAAAAA">
-                  <view>您的服务单已申请成功,待商家审核</view>
-                  <view class="mt12rpx">
-                    2024-12-13 11:12:30
-                  </view>
-                </view>
-              </template>
-            </wd-step>
-            <wd-step>
-              <template #title>
-                <view class="text-28rpx font-semibold">
-                  申请原因
-                </view>
-              </template>
-              <template #description>
-                <view class="mt20rpx text-24rpx text-#AAAAAA">
-                  <view>不需要</view>
-                  <view class="mt12rpx">
-                    2024-12-13 11:12:30
-                  </view>
-                </view>
-              </template>
-            </wd-step>
-          </wd-steps>
+        <view class="text-#FF4A39 font-semibold">
+          ¥{{ refundOrderInfo.omsOrderVo.offsetPointsMoney }}
+        </view>
+      </view>
+      <view class="my24rpx h2rpx w-full bg-#F0F0F0" />
+      <view class="flex items-center justify-between">
+        <view class="text-28rpx font-semibold">
+          合计:
+        </view>
+        <view class="ml8rpx text-28rpx text-#FF4D3A font-semibold">
+          ¥{{ refundOrderInfo.omsOrderVo.orderMoney }}
         </view>
-      </wd-card>
+      </view>
     </view>
-    <view class="mt20rpx">
-      <wd-card>
-        <template #title>
-          <view class="flex items-center justify-between text-28rpx font-semibold">
-            <view class="">
-              退款商品
-            </view>
-            <view class="text-#FF4A39">
-              退款金额:¥21
-            </view>
-          </view>
-          <view class="mt24rpx h2rpx w-full bg-#F0F0F0" />
-        </template>
-        <CollapsePanel :line-height="150">
-          <view v-for="item in 5" :key="item" class="mb20rpx">
-            <view class="w-full flex items-center">
-              <view class="mr20rpx w120rpx flex-shrink-0">
-                <image
-                  :src="`${StaticUrl}/shu.png`"
-                  class="h120rpx w120rpx"
-                />
-              </view>
-              <view class="flex-1">
-                <view class="w-full flex items-center justify-between font-semibold">
-                  <view class="text-28rpx">
-                    赶海季生鲜大闸蟹
-                  </view>
-                  <view class="text-32rpx text-#FF4D3A">
-                    ¥103.95
-                  </view>
-                </view>
-                <view class="text-24rpx text-#AAAAAA">
-                  规格:5kg,盒
-                </view>
-                <view class="text-24rpx text-#AAAAAA">
-                  单价:¥1.8
-                </view>
-              </view>
+    <view class="mt20rpx rounded-16rpx bg-white p24rpx">
+      <view class="pb20rpx">
+        <view class="mb28rpx flex items-center justify-between">
+          <view class="text-28rpx text-#AAAAAA">
+            订单编号
+          </view>
+          <view class="flex items-center">
+            <text class="text-#222">
+              {{ refundOrderInfo.orderNumber }}
+            </text>
+            <view class="ml10rpx">
+              <wd-icon name="file-copy" size="22px" />
             </view>
-            <view class="mt24rpx h2rpx w-full bg-#F0F0F0" />
-          </view>
-        </CollapsePanel>
-
-        <view class="mt24rpx h2rpx w-full bg-#F0F0F0" />
-        <view class="mt24rpx flex items-center justify-between">
-          <view class="text-28rpx">
-            商品金额
-          </view>
-          <view class="text-#FF4A39 font-semibold">
-            ¥54.00
           </view>
         </view>
-        <view class="mt24rpx flex items-center justify-between">
-          <view class="text-28rpx">
-            配送费(即时配送)
+        <view class="mb28rpx flex items-center justify-between">
+          <view class="text-28rpx text-#AAAAAA">
+            售后编号
           </view>
-          <view class="text-#FF4A39 font-semibold">
-            ¥54.00
+          <view class="flex items-center">
+            <text class="text-#222">
+              {{ refundNumber }}
+            </text>
+            <view class="ml10rpx">
+              <wd-icon name="file-copy" size="22px" />
+            </view>
           </view>
         </view>
-        <view class="mt24rpx flex items-center justify-between">
-          <view class="text-28rpx">
-            积分(1400)
+        <view class="mb28rpx flex items-center justify-between">
+          <view class="text-28rpx text-#AAAAAA">
+            申请时间
           </view>
-          <view class="text-#FF4A39 font-semibold">
-            ¥54.00
+          <view class="text-#222">
+            {{ refundOrderInfo.applyTime }}
           </view>
         </view>
-        <view class="mt24rpx h2rpx w-full bg-#F0F0F0" />
-        <template #footer>
-          <view class="flex items-center justify-between">
-            <view class="text-28rpx font-semibold">
-              合计:
-            </view>
-            <view class="ml8rpx text-28rpx text-#FF4D3A font-semibold">
-              ¥54.00
-            </view>
+        <view class="mb28rpx flex items-center justify-between">
+          <view class="text-28rpx text-#AAAAAA">
+            服务类型
           </view>
-        </template>
-      </wd-card>
-    </view>
-    <view class="mt20rpx">
-      <wd-card title="订单信息">
-        <view class="pb20rpx">
-          <view class="mb28rpx flex items-center justify-between">
-            <view class="text-28rpx text-#AAAAAA">
-              订单编号
-            </view>
-            <view class="flex items-center">
-              <text class="text-#222">
-                1867402054587256856
-              </text>
-              <view class="ml10rpx">
-                <wd-icon name="file-copy" size="22px" />
-              </view>
-            </view>
+          <view class="text-#222">
+            仅退款
           </view>
-          <view class="mb28rpx flex items-center justify-between">
-            <view class="text-28rpx text-#AAAAAA">
-              售后编号
-            </view>
-            <view class="flex items-center">
-              <text class="text-#222">
-                1867402054587256856
-              </text>
-              <view class="ml10rpx">
-                <wd-icon name="file-copy" size="22px" />
-              </view>
-            </view>
-          </view>
-          <view class="mb28rpx flex items-center justify-between">
-            <view class="text-28rpx text-#AAAAAA">
-              申请时间
-            </view>
-            <view class="text-#222">
-              2024-12-13 11:12:30
-            </view>
-          </view>
-          <view class="mb28rpx flex items-center justify-between">
-            <view class="text-28rpx text-#AAAAAA">
-              服务类型
-            </view>
-            <view class="text-#222">
-              仅退款
-            </view>
+        </view>
+        <view class="mb28rpx flex items-center justify-between">
+          <view class="text-28rpx text-#AAAAAA">
+            申请原因
           </view>
-          <view class="mb28rpx flex items-center justify-between">
-            <view class="text-28rpx text-#AAAAAA">
-              申请原因
-            </view>
-            <view class="text-#222">
-              无
-            </view>
+          <view class="text-#222">
+            {{ refundOrderInfo.buyerReason }}
           </view>
         </view>
-      </wd-card>
+      </view>
     </view>
     <view class="h30rpx" />
     <Zpopup v-model="showTime" bg="#fff">

+ 80 - 0
src/subPack-common/afterSalesList/index.ts

@@ -0,0 +1,80 @@
+// 10:待审核 20:处理中 30:驳回退款 40:撤销退款 60:待退货(一审同意) 65:待确认收货(二审待审核) 70:退款完成
+export enum refundStatus {
+  /**
+   *
+   * 待审核
+   */
+  PendingAudit = 10,
+  /**
+   *
+   * 处理中
+   */
+  Processing = 20,
+  /**
+   *
+   * 驳回退款
+   */
+  Rejected = 30,
+  /**
+   *
+   * 撤销退款
+   */
+  Cancel = 40,
+  /**
+   *
+   * 待退货(一审同意)
+   *
+   */
+
+  PendingReturn = 60,
+  /**
+   *
+   * 待确认收货(二审待审核)
+   */
+  Returning = 65,
+  /**
+   *
+   * 退货完成
+   */
+  ReturnCompleted = 70,
+}
+
+/**
+ * 退款订单状态
+ */
+export const refundOrderStatusText = {
+  [refundStatus.PendingAudit]: '待审核',
+  [refundStatus.Processing]: '处理中',
+  [refundStatus.Rejected]: '驳回退款',
+  [refundStatus.Cancel]: '撤销退款',
+  [refundStatus.PendingReturn]: '待退货',
+  [refundStatus.Returning]: '待确认收货',
+  [refundStatus.ReturnCompleted]: '退货完成',
+}
+
+/**
+ * 统一取消退款订单接口
+ * @param refundNumber
+ */
+export function handleCommonRefundOrderCancel(refundNumber: string) {
+  return new Promise((resolve, reject) => {
+    useGlobalMessage().confirm({
+      title: '取消退款',
+      msg: '确定要取消申请退款吗?',
+      success: async () => {
+        uni.showLoading({ mask: true })
+        Apis.xsb.refundCancel({
+          data: {
+            refundNumber,
+          },
+        }).then((res) => {
+          uni.hideLoading()
+          resolve(res)
+        }).catch((err) => {
+          uni.hideLoading()
+          reject(err)
+        })
+      },
+    })
+  })
+}

+ 46 - 20
src/subPack-common/afterSalesList/index.vue

@@ -1,5 +1,6 @@
 <script setup lang="ts">
-import { StaticUrl } from '@/config'
+import { handleCommonRefundOrderCancel, refundOrderStatusText, refundStatus } from './index'
+import { createGlobalLoadingMiddleware } from '@/api/core/middleware'
 import router from '@/router'
 
 definePage({
@@ -9,18 +10,40 @@ definePage({
     navigationBarTitleText: '售后列表',
   },
 })
+
+const { data: refundList, refresh, page, isLastPage } = usePagination((pageNum, pageSize) => Apis.xsb.refundList({ data: { pageNum, pageSize } }), {
+  immediate: false,
+  pageNum: 1,
+  pageSize: 10,
+  initialData: [],
+  data: res => res.data?.list,
+  append: true,
+  middleware: createGlobalLoadingMiddleware(),
+})
+onShow(() => {
+  refresh()
+})
+onReachBottom(() => {
+  if (!isLastPage.value) {
+    page.value++
+  }
+})
+async function handleCancel(item: Api.AppRefundOrderListVo) {
+  await handleCommonRefundOrderCancel(item.refundNumber as string)
+  refresh()
+}
 </script>
 
 <template>
-  <view class="page-xsb py24rpx">
-    <wd-card v-for="item in 10" :key="item">
-      <view class="py24rpx" @click="router.push({ name: 'common-afterSalesDetail' })">
+  <view class="page-xsb px24rpx py24rpx">
+    <view v-for="item in refundList" :key="item.refundNumber" class="mb24rpx rounded-16rpx bg-white p24rpx">
+      <view @click="router.push({ name: 'common-afterSalesDetail', params: { refundNumber: `${item.refundNumber}` } })">
         <view class="flex items-center justify-between">
-          <view class="text-28rpx text-#AAAAAA">
-            售后编号:2048602564
+          <view class="whitespace-nowrap text-28rpx text-#AAAAAA">
+            售后编号:{{ item.refundNumber }}
           </view>
           <view class="text-24rpx text-#222">
-            仅退款
+            {{ refundOrderStatusText[item.refundStatus as keyof typeof refundOrderStatusText] }}
           </view>
         </view>
         <view class="mt24rpx h2rpx w-full bg-#F0F0F0" />
@@ -28,9 +51,9 @@ definePage({
           <view class="box-border h-full w480rpx py28rpx pl20rpx">
             <scroll-view scroll-x class="h-full w-full whitespace-nowrap">
               <view class="flex items-center">
-                <view v-for="items in 20" :key="items" class="mr50rpx">
+                <view v-for="items in item.refundProdList" :key="items.id" class="mr50rpx">
                   <image
-                    :src="`${StaticUrl}/shu.png`"
+                    :src="items.prodUrl"
                     class="h120rpx w120rpx"
                   />
                 </view>
@@ -38,27 +61,30 @@ definePage({
             </scroll-view>
           </view>
           <view class="box-shadow box-border h-full flex-1 flex-shrink-0 px14rpx py40rpx">
-            <view class="text-32rpx text-#FF4D3A font-semibold">
-              ¥13.95
+            <view class="text-center text-32rpx text-#FF4D3A font-semibold">
+              ¥{{ item.refundProdMoney }}
             </view>
             <view class="text-center text-28rpx text-#AAAAAA">
-              共5
+              共{{ item.refundProdList?.length }}
             </view>
           </view>
         </view>
         <view class="mt24rpx rounded-16rpx bg-#F9F9F9 px24rpx py20rpx text-28rpx text-#222">
-          售后取消
+          {{ item.omsOrderRefundRecord?.auditStatusDescribe }}
           <text class="text-24rpx text-#AAAAAA">
-            您已主动取消退款申请,如有需要可再次提交
+            {{ item.omsOrderRefundRecord?.instructions }}
           </text>
         </view>
-        <view class="mt20rpx flex items-center justify-end">
-          <wd-button plain block type="info" size="small">
-            再次申请
-          </wd-button>
-        </view>
       </view>
-    </wd-card>
+      <view class="mt20rpx flex items-center justify-end">
+        <wd-button v-if="item.refundStatus == refundStatus.Cancel" plain block type="info" size="small" @click.stop="useSysStore().getRefunOrder(item.orderNumber as string)">
+          再次申请
+        </wd-button>
+        <wd-button v-if="item.refundStatus == refundStatus.PendingAudit" plain block type="info" size="small" @click.stop="handleCancel(item)">
+          取消申请
+        </wd-button>
+      </view>
+    </view>
   </view>
 </template>
 

+ 3 - 3
src/subPack-smqjh/order/index.vue

@@ -14,12 +14,12 @@ definePage({
 const subPackOrder = ref<typeof import('@/subPack-xsb/utils/order-data')>()
 const subPackComfirm = ref<typeof import('@/subPack-xsb/utils/confirm-order')>()
 
-const navActiveTab = ref(0)
+const navActiveTab = ref('all')
 const scrollViewId = ref()
 const orderStatusActive = ref('all')
 const { data: orderList, refresh, isLastPage, page, reload } = usePagination((pageNum, pageSize) => Apis.xsb.orderList({
   data: {
-    businessType: 'XSB',
+    businessType: unref(navActiveTab) === 'all' ? '' : unref(navActiveTab),
     orderStatus: unref(orderStatusActive),
     pageNum,
     pageSize,
@@ -37,7 +37,7 @@ onMounted(async () => {
   subPackOrder.value = await AsyncImport('@/subPack-xsb/utils/order-data')
   subPackComfirm.value = await AsyncImport('@/subPack-xsb/utils/confirm-order')
 })
-function handleChangeTypeNav(value: number) {
+function handleChangeTypeNav(value: string) {
   navActiveTab.value = value
   scrollViewId.value = null
   orderList.value = []

+ 5 - 5
src/subPack-smqjh/order/order-data.ts

@@ -1,9 +1,9 @@
 export const navTabTypeList = [
-  { name: '全部', value: 0 },
-  { name: '星闪豹', value: 1 },
-  { name: '电影演出', value: 2 },
-  { name: '视频权益', value: 3 },
-  { name: '大盘点餐', value: 4 },
+  { name: '全部', value: 'all' },
+  { name: '星闪豹', value: 'XSB' },
+  { name: '电影演出', value: 'MOVIE' },
+  { name: '视频权益', value: 'VIDEO' },
+  { name: '大牌点餐', value: 'SHOP' },
 ]
 
 export const orderStatusList = [

+ 4 - 4
src/subPack-xsb/commonTab/components/classfiy.vue

@@ -205,7 +205,7 @@ onMounted(async () => {
     topNavActive.value = props.categoryList && props.categoryList[0].code
     leftActive.value = props.categoryList[0].children && props.categoryList[0].children[0].code
   }
-
+  goodsLoading.value = 'loading'
   if (leftActive.value) {
     handleChange({ value: leftActive.value })
   }
@@ -215,9 +215,9 @@ onMounted(async () => {
       topScrollView.value = topNavActive.value
     })
   }
+
   getCartBox()
   if (token.value) {
-    // goodsLoading.value = 'loading'
     await getCartCategorList()
   }
 })
@@ -543,7 +543,7 @@ function handlePay() {
               </view>
             </view>
             <wd-status-tip v-else image="content" tip="暂无内容" />
-            <view v-if="goodsLoading == 'finished' || isTopLoading" class="h-30vh" />
+            <view v-if="goodsLoading == 'finished' || isTopLoading" class="h-40vh" />
           </scroll-view>
           <view v-if="goodsLoading == 'loading' || isTopLoading" class="absolute left-0 top-0 z-10 h-full w-full flex items-center justify-center bg-white">
             <wd-loading color="#9ED605" :size="20" />
@@ -648,7 +648,7 @@ function handlePay() {
       <template #footer>
         <view class="box-border w-full flex items-center justify-between py20rpx">
           <view class="w-48%">
-            <wd-button hairline plain block @click="selectGoods = false">
+            <wd-button plain hairline block @click="selectGoods = false">
               取消
             </wd-button>
           </view>

+ 7 - 7
src/subPack-xsb/commonTab/components/my.vue

@@ -21,10 +21,10 @@ const tabList = ref([
 const { token, userInfo, getUserAvatar } = storeToRefs(useUserStore())
 useUserStore().getUserInfo()
 function handleGo(item: { name: string }) {
-  if (item.name === 'common-afterSalesList') {
-    useGlobalToast().show('此功能暂未开放')
-    return
-  }
+  // if (item.name === 'common-afterSalesList') {
+  //   useGlobalToast().show('此功能暂未开放')
+  //   return
+  // }
   router.push({ name: item.name })
 }
 </script>
@@ -109,9 +109,9 @@ function handleGo(item: { name: string }) {
               <image :src="`${StaticUrl}/5.png`" class="h50rpx w50rpx" />
             </template>
             <template #title>
-              <button class="zbutton ml20rpx w90%" open-type="contact">
-                联系平台客服
-              </button>
+              <view class="ml20rpx w90%">
+                <Zcontact>联系平台客服</Zcontact>
+              </view>
             </template>
           </wd-cell>
         </wd-cell-group>

+ 1 - 1
src/subPack-xsb/confirmOrder/index.vue

@@ -169,7 +169,7 @@ async function handlePay() {
         </view>
       </view>
       <view class="flex items-center justify-between text-28rpx">
-        <view>积分({{ orderInfo?.offsetPoints }})</view>
+        <view>积分({{ offsetPoints }})</view>
         <view class="text-#FF4D3A font-semibold">
           - ¥{{ offsetPoints / 100 }}
         </view>

+ 3 - 4
src/subPack-xsb/goods/index.vue

@@ -157,7 +157,7 @@ async function handleAddCart() {
           </view>
         </template>
       </wd-swiper>
-      <view class="view-0 header relative z-3 rounded-t-32rpx px24rpx pt24rpx -mt30rpx">
+      <view class="header view-0 relative z-3 rounded-t-32rpx px24rpx pt24rpx -mt30rpx">
         <view class="flex items-center justify-between">
           <view class="flex items-end text-#FF4D3A font-semibold">
             <view class="text-24rpx">
@@ -337,12 +337,11 @@ async function handleAddCart() {
               :src="`${StaticUrl}/goods-kf.png`"
               class="h44rpx w44rpx"
             />
-
-            <button class="zbutton" open-type="contact">
+            <Zcontact>
               <view class="text-20rpx">
                 客服
               </view>
-            </button>
+            </Zcontact>
           </view>
           <wd-badge :model-value="getTotalNum">
             <view @click="router.replace({ name: 'xsb-homeTabbar', animationType: 'fade-out', params: { name: 'xsb-cart' } })">

+ 102 - 55
src/subPack-xsb/orderDetaile/index.vue

@@ -1,10 +1,11 @@
 <script setup lang="ts">
 import type { MapMarker, MapPolyline } from '@uni-helper/uni-types'
-import { OrderStatus, handleCommonCancelOrder, handleCommonDeleteOrder, handleCommonOrderStatusText } from '../utils/order-data'
+import { OrderStatus, handleCommonCancelOrder, handleCommonDeleteOrder, handleCommonOrderReceive, handleCommonOrderStatusText } from '../utils/order-data'
 import { StaticUrl } from '@/config'
 import router from '@/router'
 import { getWxCommonPayment, handleCommonPayMent } from '@/subPack-xsb/utils/confirm-order'
 
+const plugins = requirePlugin('logisticsPlugin')
 const { statusBarHeight, MenuButtonHeight } = storeToRefs(useSysStore())
 const { userInfo } = storeToRefs(useUserStore())
 definePage({
@@ -15,7 +16,7 @@ definePage({
     navigationStyle: 'custom',
   },
 })
-const collapse = ref(false)
+const collapse = ref(true)
 const orderInfo = ref<Api.xsbOrderList>()
 const orderNum = ref()
 const mapInfo = ref<Api.RiderInfo>()
@@ -23,6 +24,9 @@ const mapMarkers = ref<MapMarker[]>([])
 const mapPolyLine = ref<MapPolyline[]>([])
 const showNode = ref(false)
 const NodeList = ref<Api.DeliveryNode[]>([])
+const viewDevyBtn = computed(() => {
+  return orderInfo.value?.actualTotal && orderInfo.value.dvyType === 1
+})
 const showMapStatus = [OrderStatus.OrderAccepted, OrderStatus.OrderWaitDelivery, OrderStatus.OrderDelivering, OrderStatus.OrderArrived]
 const mapStaticShopImg = {
   [OrderStatus.OrderAccepted]: `${StaticUrl}/order-map-jian.png`,
@@ -32,8 +36,8 @@ const mapStaticShopImg = {
 }
 const mapTextShop = {
   [OrderStatus.OrderAccepted]: '商家拣货中',
-  [OrderStatus.OrderWaitDelivery]: '等待骑手配送',
-  [OrderStatus.OrderDelivering]: '骑手配送中',
+  [OrderStatus.OrderWaitDelivery]: orderInfo.value?.dvyType === 3 ? '等待骑手配送' : '待发货',
+  [OrderStatus.OrderDelivering]: orderInfo.value?.dvyType === 3 ? '骑手配送中' : '待收货',
   [OrderStatus.OrderArrived]: '已送达',
 }
 
@@ -65,7 +69,6 @@ async function getDetail(id: string) {
   if (showMapStatus.includes(data.hbOrderStatus)) {
     getOrderMapInf()
   }
-  getOrderNode()
 }
 
 function handleCollapse() {
@@ -220,30 +223,68 @@ async function getOrderMapInf() {
   console.log(mapPolyLine.value, 'mapPolyLine')
 }
 async function getOrderNode() {
-  const res = await Apis.xsb.deliveryNode({
-    data: {
-      orderNumber: String(orderInfo.value?.orderNumber),
-    },
+  uni.showLoading({
+    mask: true,
+  })
+  return new Promise((resolve, reject) => {
+    Apis.xsb.deliveryNode({
+      data: {
+        orderNumber: String(orderInfo.value?.orderNumber),
+      },
+    }).then((res) => {
+      NodeList.value = res.data
+      resolve(res.data)
+    }).catch((err) => {
+      reject(err)
+    }).finally(() => uni.hideLoading())
   })
-  NodeList.value = res.data
 }
 
-function handleMarkerTap(e: UniHelper.MapOnMarkertapEvent) {
+async function handleMarkerTap(e: UniHelper.MapOnMarkertapEvent) {
   console.log(e, 'sadada')
-  showNode.value = true
+  if (orderInfo.value?.dvyType === 3) {
+    await getOrderNode()
+    showNode.value = true
+  }
+  if (viewDevyBtn.value) {
+    uni.showLoading({ mask: true })
+    try {
+      const res = await Apis.xsb.getWaybillToken({ data: { orderNumber: String(orderInfo.value?.orderNumber) } })
+      uni.hideLoading()
+      const jsData = JSON.parse(res.data)
+      if (jsData.errmsg === 'ok') {
+        plugins.openWaybillTracking({
+          waybillToken: jsData.waybill_token,
+        })
+      }
+    }
+    catch {
+      uni.hideLoading()
+    }
+  }
+}
+async function handleReceive() {
+  await handleCommonOrderReceive(orderInfo.value as Api.xsbOrderList)
+  getDetail(String(unref(orderInfo)?.orderNumber))
 }
 </script>
 
 <template>
-  <page-meta :page-style="showNode ? 'overflow: hidden;' : '' " />
-  <view v-if="orderInfo" class="page-xsb" :class="[collapse ? 'pt850rpx' : ``]" :style="{ paddingTop: `${collapse ? '850rpx' : (`${Number(statusBarHeight) + Number(MenuButtonHeight) + 10}px`)}` }">
+  <page-meta :page-style="showNode ? 'overflow: hidden;' : ''" />
+  <view
+    v-if="orderInfo" class="page-xsb"
+    :style="{ paddingTop: `${showMapStatus.includes(orderInfo?.hbOrderStatus) ? '850rpx' : (`${Number(statusBarHeight) + Number(MenuButtonHeight) + 10}px`)}` }"
+  >
     <wd-navbar
-      title="订单详情" :bordered="false" :z-index="99"
-      safe-area-inset-top left-arrow fixed
+      title="订单详情" :bordered="false" :z-index="99" safe-area-inset-top left-arrow fixed
       @click-left="router.back()"
     />
     <view v-if="showMapStatus.includes(orderInfo?.hbOrderStatus)">
-      <map id="orderMap" :polyline="mapPolyLine" :scale="mapLation.scale" :markers="mapMarkers" :latitude="mapLation.latitude" :longitude="mapLation.longitude" class="fixed top-0 z80 h-900rpx w-screen" @markertap="handleMarkerTap" />
+      <map
+        id="orderMap" :polyline="mapPolyLine" :scale="mapLation.scale" :markers="mapMarkers"
+        :latitude="mapLation.latitude" :longitude="mapLation.longitude" class="fixed top-0 z80 h-900rpx w-screen"
+        @markertap="handleMarkerTap"
+      />
     </view>
 
     <view class="relative z-90 box-border bg-#f6f6f6 px24rpx">
@@ -278,7 +319,10 @@ function handleMarkerTap(e: UniHelper.MapOnMarkertapEvent) {
               </view>
             </view>
           </view>
-          <view v-if="orderInfo.hbOrderStatus !== OrderStatus.PaddingPay" class="flex items-center" @click="handleCollapse">
+          <view
+            v-if="orderInfo.hbOrderStatus !== OrderStatus.PaddingPay" class="flex items-center"
+            @click="handleCollapse"
+          >
             <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderAccepted" class="mr10rpx">
               商家拣货中
             </view>
@@ -312,42 +356,49 @@ function handleMarkerTap(e: UniHelper.MapOnMarkertapEvent) {
       <view class="mt20rpx rounded-16rpx bg-white p24rpx">
         <view v-if="orderInfo.dvyFlowId" class="mb24rpx text-24rpx">
           <view class="mb20rpx">
-            快递单号
+            {{ orderInfo.dvyName }}
           </view>
           <view class="text-48rpx font-semibold">
             {{ orderInfo.dvyFlowId }}
           </view>
         </view>
         <view class="grid grid-cols-5 text-28rpx text-#222">
-          <view v-if="[OrderStatus.OrderCancel, OrderStatus.OrderCompleted].includes(Number(orderInfo.hbOrderStatus))" class="flex flex-col items-center" @click="handelDel">
-            <image
-              :src="`${StaticUrl}/orderDetaile-del.png`"
-              class="h40rpx w40rpx"
-            />
+          <view
+            v-if="orderInfo.hbOrderStatus === OrderStatus.OrderArrived" class="flex flex-col items-center"
+            @click="handleReceive"
+          >
+            <image :src="`${StaticUrl}/orderDetaile-submit-order.png`" class="h40rpx w40rpx" />
+            <view class="mt40rpx">
+              确认收货
+            </view>
+          </view>
+          <view
+            v-if="[OrderStatus.OrderCancel, OrderStatus.OrderCompleted].includes(Number(orderInfo.hbOrderStatus))"
+            class="flex flex-col items-center" @click="handelDel"
+          >
+            <image :src="`${StaticUrl}/orderDetaile-del.png`" class="h40rpx w40rpx" />
             <view class="mt40rpx">
               删除订单
             </view>
           </view>
           <view class="contact relative flex flex-col items-center">
-            <image
-              :src="`${StaticUrl}/orderDetaile-wx.png`"
-              class="h40rpx w40rpx"
-            />
-            <button open-type="contact" class="zbutton mt40rpx">
-              <view class="text-28rpx">
+            <image :src="`${StaticUrl}/orderDetaile-wx.png`" class="h40rpx w40rpx" />
+            <Zcontact>
+              <view class="mt40rpx text-28rpx">
                 联系商家
               </view>
-            </button>
+            </Zcontact>
           </view>
-          <view v-if="[OrderStatus.OrderCompleted, OrderStatus.OrderWaitDelivery, OrderStatus.OrderAccepted].includes(orderInfo.hbOrderStatus) " class="flex flex-col items-center" @click="handleAfterSale">
-            <image
-              :src="`${StaticUrl}/orderDetaile-shou.png`"
-              class="h40rpx w40rpx"
-            />
+          <view
+            v-if="[OrderStatus.OrderCompleted, OrderStatus.OrderWaitDelivery, OrderStatus.OrderAccepted].includes(orderInfo.hbOrderStatus)"
+            class="flex flex-col items-center" @click="handleAfterSale"
+          >
+            <image :src="`${StaticUrl}/orderDetaile-shou.png`" class="h40rpx w40rpx" />
             <view class="mt40rpx">
               申请售后
             </view>
           </view>
+
           <!-- <view class="flex  flex-col items-center " @click="router.push({ name: 'common-revalue' })">
           <image
             :src="`${StaticUrl}/orderDetaile-pj.png`"
@@ -370,10 +421,7 @@ function handleMarkerTap(e: UniHelper.MapOnMarkertapEvent) {
       </view>
       <view class="mt20rpx rounded-16rpx bg-white p24rpx">
         <view class="flex items-center">
-          <image
-            :src="`${StaticUrl}/orderDetaile-user.png`"
-            class="mr20rpx h40rpx w40rpx"
-          />
+          <image :src="`${StaticUrl}/orderDetaile-user.png`" class="mr20rpx h40rpx w40rpx" />
           <view class="text-32rpx text-#222 font-semibold">
             {{ orderInfo?.consigneeName }} {{ orderInfo?.consigneeMobile }}
           </view>
@@ -384,10 +432,7 @@ function handleMarkerTap(e: UniHelper.MapOnMarkertapEvent) {
       </view>
       <view class="mt20rpx rounded-16rpx bg-white p24rpx">
         <view class="flex items-center">
-          <image
-            :src="`${StaticUrl}/order-icon.png`"
-            class="h36rpx w36rpx"
-          />
+          <image :src="`${StaticUrl}/order-icon.png`" class="h36rpx w36rpx" />
           <view class="ml20rpx text-32rpx font-semibold">
             {{ orderInfo?.shopName }}
           </view>
@@ -396,10 +441,7 @@ function handleMarkerTap(e: UniHelper.MapOnMarkertapEvent) {
         <CollapsePanel :line-height="150">
           <view v-for="item in orderInfo?.orderItemList" :key="item.skuId" class="mb20rpx w-full flex items-center">
             <view class="mr20rpx w120rpx flex-shrink-0">
-              <image
-                :src="item.pic"
-                class="h120rpx w120rpx"
-              />
+              <image :src="item.pic" class="h120rpx w120rpx" />
             </view>
             <view class="flex-1">
               <view class="w-full flex items-center justify-between font-semibold">
@@ -454,7 +496,9 @@ function handleMarkerTap(e: UniHelper.MapOnMarkertapEvent) {
             总计{{ orderInfo.orderMoney }} 共减 {{ Number(orderInfo.offsetPoints) / 100 }}
           </view>
           <view class="ml20rpx text-28rpx text-#FF4D3A font-semibold">
-            {{ [OrderStatus.PaddingPay, OrderStatus.OrderCancel].includes(Number(orderInfo.hbOrderStatus)) ? '需' : '实' }}付款¥{{ orderInfo.actualTotal }}
+            {{ [OrderStatus.PaddingPay, OrderStatus.OrderCancel].includes(Number(orderInfo.hbOrderStatus)) ? '需' : '实'
+            }}付款¥{{
+              orderInfo.actualTotal }}
           </view>
         </view>
       </view>
@@ -526,19 +570,22 @@ function handleMarkerTap(e: UniHelper.MapOnMarkertapEvent) {
 
 <style scoped lang="scss">
 .page-xsb {
-  :deep(){
-    .info-btn .wd-button{
+  :deep() {
+    .info-btn .wd-button {
       background: #fff !important;
       color: #aaa !important;
     }
-    .btn .wd-button{
+
+    .btn .wd-button {
       width: 100% !important;
     }
-    .wd-count-down{
-      color: #FF4D3A  !important;
+
+    .wd-count-down {
+      color: #FF4D3A !important;
       font-size: 36rpx !important;
     }
-    .contact .wd-button{
+
+    .contact .wd-button {
       font-size: 28rpx !important;
       height: 40rpx !important;
       padding: 0 !important;

+ 1 - 1
src/subPack-xsb/utils/order-data.ts

@@ -55,7 +55,7 @@ export enum OrderStatus {
  */
 export function handleCommonOrderStatusText(order: Api.xsbOrderList): any {
   if (order.hbOrderStatus === OrderStatus.PaddingPay) {
-    const endTime = dayjs(order.createTime).add(15, 'minutes')
+    const endTime = dayjs(order.createTime).add(16, 'minutes')
     const remaining = dayjs(endTime).valueOf() - dayjs().valueOf()
     return Math.max(0, remaining) // 确保不会返回负数
   }