Forráskód Böngészése

Merge branch 'master' into zzx

zouzexu 6 órája
szülő
commit
498d91b4ed

+ 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 {
     /**

+ 2 - 1
src/api/apiDefinitions.ts

@@ -116,6 +116,7 @@ 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'],
+  'djk.submitRefund':['POST', '/smqjh-oms/api/v1/djkOrder/submitRefund'],
 
 };

+ 24 - 1
src/api/globals.d.ts

@@ -1147,7 +1147,30 @@ declare global {
       >(
         config: Config
       ): Alova2Method<apiResData<any>, 'djk.addWelfareOrder', Config>;
-
+      submitRefund<
+        Config extends Alova2MethodConfig<apiResData<any>> & {
+          data: {
+            /**
+          * 订单号
+          */
+            orderNumber?: string;
+            /**
+             * 退款描述
+             */
+            refundDesc?: string;
+            /**
+             * 退款图片
+             */
+            refundImg?: string;
+            /**
+             * 退款原因
+             */
+            refundReason?: string;
+          };
+        }
+      >(
+        config: Config
+      ): Alova2Method<apiResData<any>, 'djk.submitRefund', Config>;
     }
   }
 }

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

@@ -19,7 +19,6 @@ declare global {
   const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
   const boolToNumber: typeof import('./utils/index')['boolToNumber']
   const calculateCenterPointSpherical: typeof import('./utils/index')['calculateCenterPointSpherical']
-  const clearCart: typeof import('./store/user')['clearCart']
   const computed: typeof import('vue')['computed']
   const computedAsync: typeof import('@vueuse/core')['computedAsync']
   const computedEager: typeof import('@vueuse/core')['computedEager']
@@ -52,13 +51,7 @@ declare global {
   const getCurrentInstance: typeof import('vue')['getCurrentInstance']
   const getCurrentPath: typeof import('./utils/index')['getCurrentPath']
   const getCurrentScope: typeof import('vue')['getCurrentScope']
-  const getOrderPayMent: typeof import('./subPack-xsb/utils/confirm-order')['getOrderPayMent']
-  const getWxCommonPayment: typeof import('./subPack-xsb/utils/confirm-order')['getWxCommonPayment']
   const h: typeof import('vue')['h']
-  const handleCommonCancelOrder: typeof import('./subPack-xsb/utils/order-data')['handleCommonCancelOrder']
-  const handleCommonDeleteOrder: typeof import('./subPack-xsb/utils/order-data')['handleCommonDeleteOrder']
-  const handleCommonOrderStatusText: typeof import('./subPack-xsb/utils/order-data')['handleCommonOrderStatusText']
-  const handleCommonPayMent: typeof import('./subPack-xsb/utils/confirm-order')['handleCommonPayMent']
   const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
   const inject: typeof import('vue')['inject']
   const injectLocal: typeof import('@vueuse/core')['injectLocal']
@@ -76,8 +69,6 @@ declare global {
   const mapWritableState: typeof import('pinia')['mapWritableState']
   const markRaw: typeof import('vue')['markRaw']
   const mountApis: typeof import('./api/createApis')['mountApis']
-  const navCommonMiniProgram: typeof import('./utils/index')['navCommonMiniProgram']
-  const navTabTypeList: typeof import('./subPack-xsb/utils/order-data')['navTabTypeList']
   const nextTick: typeof import('vue')['nextTick']
   const onActivated: typeof import('vue')['onActivated']
   const onAddToFavorites: typeof import('@dcloudio/uni-app')['onAddToFavorites']
@@ -120,12 +111,9 @@ declare global {
   const onUnload: typeof import('@dcloudio/uni-app')['onUnload']
   const onUnmounted: typeof import('vue')['onUnmounted']
   const onUpdated: typeof import('vue')['onUpdated']
-  const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
-  const orderStatusList: typeof import('./subPack-xsb/utils/order-data')['orderStatusList']
   const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
-  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']
@@ -199,7 +187,6 @@ declare global {
   const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems']
   const useCloned: typeof import('@vueuse/core')['useCloned']
   const useColorMode: typeof import('@vueuse/core')['useColorMode']
-  const useConcurrentRequests: typeof import('./composables/useConcurrentRequests')['useConcurrentRequests']
   const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
   const useCounter: typeof import('@vueuse/core')['useCounter']
   const useCssModule: typeof import('vue')['useCssModule']
@@ -242,7 +229,6 @@ declare global {
   const useGlobalLoading: typeof import('./composables/useGlobalLoading')['useGlobalLoading']
   const useGlobalMessage: typeof import('./composables/useGlobalMessage')['useGlobalMessage']
   const useGlobalToast: typeof import('./composables/useGlobalToast')['useGlobalToast']
-  const useId: typeof import('vue')['useId']
   const useIdle: typeof import('@vueuse/core')['useIdle']
   const useImage: typeof import('@vueuse/core')['useImage']
   const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
@@ -261,7 +247,6 @@ declare global {
   const useMemoize: typeof import('@vueuse/core')['useMemoize']
   const useMemory: typeof import('@vueuse/core')['useMemory']
   const useMessage: typeof import('wot-design-uni')['useMessage']
-  const useModel: typeof import('vue')['useModel']
   const useMounted: typeof import('@vueuse/core')['useMounted']
   const useMouse: typeof import('@vueuse/core')['useMouse']
   const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
@@ -316,7 +301,6 @@ declare global {
   const useSysStore: typeof import('./store/sys')['useSysStore']
   const useSysXsbStore: typeof import('./subPack-xsb/store-xsb/sys')['useSysXsbStore']
   const useTabbar: typeof import('./composables/useTabbar')['useTabbar']
-  const useTemplateRef: typeof import('vue')['useTemplateRef']
   const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
   const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
   const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
@@ -353,10 +337,6 @@ declare global {
   const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
   const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
   const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
-  const useXsbCartStore: typeof import('./store/cart')['useXsbCartStore']
-  const useXsbTabbar: typeof import('./composables/useXsbTabbar')['useXsbTabbar']
-  const useXsbTabbarStore: typeof import('./subPack-xsb/store-xsb/tabbar')['useXsbTabbarStore']
-  const useconfirmOrderStore: typeof import('./store/confirmOrder')['useconfirmOrderStore']
   const watch: typeof import('vue')['watch']
   const watchArray: typeof import('@vueuse/core')['watchArray']
   const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
@@ -497,6 +477,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']>

+ 1 - 1
src/components/Zpopup.vue

@@ -15,7 +15,7 @@ const show = defineModel({ default: false })
   <wd-popup v-model="show" lock-scroll custom-style="border-radius:32rpx;32rpx 0rpx 0rpx" :z-index="zindex" position="bottom">
     <view :style="{ background: bg }">
       <slot />
-      <view class="h150rpx" />
+      <view v-if="showfooter" class="h150rpx" />
       <view v-if="showfooter" class="ios footer fixed bottom-0 left-0 box-border w-full rounded-t-32rpx bg-white px24rpx pt20rpx">
         <slot name="footer" />
       </view>

+ 1 - 1
src/config/index.ts

@@ -8,8 +8,8 @@ const mapEnvVersion = {
   // 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.11:8080', // 王
+  // develop: 'http://192.168.1.89:8080', // 田
   // develop: 'http://74949mkfh190.vicp.fun', // 付
   // develop: 'http://47.109.84.152:8081',
   // develop: 'https://5ed0f7cc.r9.vip.cpolar.cn',

+ 8 - 0
src/pages.json

@@ -514,6 +514,14 @@
     {
       "root": "subPack-djk",
       "pages": [
+        {
+          "path": "afterSales/index",
+          "name": "djk-afterSales",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "申请退款"
+          }
+        },
         {
           "path": "commonTab/index",
           "name": "djk-homeTabbar",

+ 5 - 0
src/store/sys.ts

@@ -32,6 +32,10 @@ interface SysState {
    * 是否上线审核
    */
   isOnlineAudit: boolean
+  /**
+   * 如果是组件模式加tabbar,从订单详情返回订单列表页面需要刷新,监听此字段刷新页面
+   */
+  refreshOrderList: boolean
 
 }
 export const useSysStore = defineStore('system', {
@@ -43,6 +47,7 @@ export const useSysStore = defineStore('system', {
     payFailPath: '',
     opcity: 0,
     isOnlineAudit: true,
+    refreshOrderList: false,
   }),
   actions: {
     getSystemData() {

+ 10 - 0
src/store/user.ts

@@ -416,5 +416,15 @@ export const useUserStore = defineStore('user', {
       }
       return '未知订单状态'
     },
+    handleDjkCommonOrderStatusText(order: Api.xsbOrderList) {
+      const textMap = {
+        [OrderStatus.OrderAccepted]: '待使用',
+        [OrderStatus.OrderCompleted]: '已完成',
+        [OrderStatus.OrderCancel]: '已取消',
+        [OrderStatus.OrderRefund]: '已退款',
+        [OrderStatus.OrderExpired]: '已过期',
+      }
+      return textMap[order.hbOrderStatus as keyof typeof textMap] || '未知订单状态'
+    },
   },
 })

+ 140 - 0
src/subPack-djk/afterSales/index.vue

@@ -0,0 +1,140 @@
+<script setup lang="ts">
+import { StaticUrl } from '@/config'
+import router from '@/router'
+
+definePage({ name: 'djk-afterSales', islogin: true, style: { navigationBarTitleText: '申请退款' } })
+const orderInfo = ref<Api.xsbOrderList>()
+const fileList = ref<{ url: string }[]>([])
+const remark = ref()
+const reson = ref()
+const { refreshOrderList } = storeToRefs(useSysStore())
+onLoad((option: any) => {
+  orderInfo.value = JSON.parse(option.data)
+  console.log(orderInfo.value, '===')
+})
+async function handleSubmit() {
+  if (!reson.value) {
+    useGlobalToast().show('请选择退款原因')
+    return
+  }
+  uni.showLoading({ mask: true })
+  try {
+    await Apis.djk.submitRefund({ data: {
+      orderNumber: orderInfo.value?.orderNumber,
+      refundReason: reson.value,
+      refundDesc: remark.value,
+      refundImg: fileList.value.map(item => item.url).join(','),
+    } })
+    uni.hideLoading()
+    useGlobalToast().show('申请退款成功')
+    setTimeout(() => {
+      refreshOrderList.value = true
+      router.back()
+    }, 2000)
+  }
+  catch {
+    uni.hideLoading()
+  }
+}
+</script>
+
+<template>
+  <view class="pages-djk p24rpx">
+    <view class="rounded-16rpx bg-white p24rpx">
+      <view class="text-36rpx font-semibold">
+        退款订单:{{ orderInfo?.djkOrderAttachInfo?.goodsName }}
+      </view>
+      <view class="mt16rpx">
+        <view class="text-24rpx">
+          商品金额: {{ orderInfo?.djkOrderAttachInfo?.price }}
+        </view>
+      </view>
+      <view class="mt16rpx">
+        <view class="text-24rpx">
+          可退金额: {{ orderInfo?.actualTotal }}
+        </view>
+      </view>
+    </view>
+    <view class="mt20rpx rounded-16rpx bg-white px24rpx py28rpx">
+      <view class="flex items-center justify-between">
+        <view class="text-32rpx font-semibold">
+          请选择退款原因 <text class="text-28rpx text-gray">
+            (必选)
+          </text>
+        </view>
+      </view>
+      <view class="mt20rpx">
+        <wd-radio-group v-model="reson" shape="dot">
+          <wd-radio value="计划有变,无法使用">
+            计划有变,无法使用
+          </wd-radio>
+          <wd-radio value="服务项目不符">
+            服务项目不符
+          </wd-radio>
+          <wd-radio value="找到更合适的服务">
+            找到更合适的服务
+          </wd-radio>
+          <wd-radio value="其他项目">
+            其他项目
+          </wd-radio>
+        </wd-radio-group>
+      </view>
+      <view class="mt24rpx text-28rpx font-semibold">
+        详情说明 <text class="text-gray">
+          (可选)
+        </text>
+      </view>
+      <view class="mt20rpx rounded-16rpx bg-#F6F6F6 p24rpx">
+        <wd-textarea v-model="remark" placeholder="请描述您的具体情况" show-word-limit :maxlength="200" />
+        <view class="upload mt18rpx">
+          <Zupload v-model:value="fileList" />
+        </view>
+      </view>
+    </view>
+    <view class="mt20rpx rounded-16rpx bg-white p24rpx">
+      <view class="text-32rpx font-semibold">
+        <image
+          :src="`${StaticUrl}/djk-goods-erro.png`"
+          class="mr5rpx h24rpx w24rpx"
+        /> 退款提示
+      </view>
+      <view class="mt20rpx text-28rpx">
+        ·退款申请提交后立即处理,无需审核
+      </view>
+      <view class="mt20rpx text-28rpx">
+        ·退款将在1-3个工作日内到账
+      </view>
+      <view class="mt20rpx text-28rpx">
+        ·退款将原路返回支付账户
+      </view>
+      <view class="mt20rpx text-28rpx">
+        ·退款成功后订单将关闭
+      </view>
+    </view>
+    <view class="h200rpx" />
+  </view>
+  <view
+    class="ios fixed bottom-0 z-10 box-border w-full w-full rounded-t-32rpx bg-white px32rpx pt-16rpx"
+  >
+    <wd-button block @click="handleSubmit">
+      提交
+    </wd-button>
+  </view>
+</template>
+
+<style lang="scss" scoped>
+.pages-djk{
+  :deep(){
+    .wd-textarea{
+      background: #F6F6F6 !important;
+      padding: 0 !important;
+      .wd-textarea__value{
+        background: #F6F6F6 !important;
+      }
+      .wd-textarea__count{
+        background: #F6F6F6 !important;
+      }
+    }
+  }
+}
+</style>

+ 7 - 2
src/subPack-djk/commonTab/components/fl.vue

@@ -15,6 +15,10 @@ const mapStatus = [
   { status: 2, name: '进行中', color: '#52C41A' },
   { status: 3, name: '已结束', color: '#AAAAAA' },
 ]
+async function handleGo(item: Api.DjkWelfareVO) {
+  await useUserStore().checkLogin()
+  router.push({ name: 'djk-welfare', params: { id: String(item.id) } })
+}
 </script>
 
 <template>
@@ -29,8 +33,8 @@ const mapStatus = [
     />
     <scroll-view scroll-y :style="{ height: `calc(100vh - ${(statusBarHeight + MenuButtonHeight) * 4}rpx)` }">
       <view class="px24rpx">
-        <view v-for="item in flList" :key="item.id" class="mt20rpx rounded-16rpx bg-white p24rpx" @click="router.push({ name: 'djk-welfare', params: { id: String(item.id) } })">
-          <view class="h248rpx w-full">
+        <view v-for="item in flList" :key="item.id" class="mt20rpx rounded-16rpx bg-white p24rpx" @click="handleGo(item)">
+          <view class="h248rpx w-full overflow-hidden rounded-16rpx">
             <image
               :src="item.activityImg"
               class="h-full w-full"
@@ -56,6 +60,7 @@ const mapStatus = [
           </view>
         </view>
         <view class="h40rpx" />
+        <StatusTip v-if="!flList.length" tip="暂无内容" />
       </view>
     </scroll-view>
   </view>

+ 4 - 3
src/subPack-djk/commonTab/components/index.vue

@@ -25,8 +25,8 @@ function handleBottom() {
   <view>
     <wd-navbar
       title="大健康"
-      :bordered="false" :z-index="99" safe-area-inset-top
-      left-arrow placeholder fixed @click-left="router.back()"
+      :bordered="false" :z-index="99"
+      safe-area-inset-top placeholder left-arrow fixed @click-left="router.back()"
     />
     <scroll-view scroll-y :style="{ height: `calc(100vh - ${(statusBarHeight + MenuButtonHeight) * 4}rpx)` }" @scrolltolower="handleBottom">
       <view class="px24rpx">
@@ -49,7 +49,7 @@ function handleBottom() {
             </view>
           </view>
           <view class="ml164rpx">
-            <view v-for="its in item.goodsList" :key="its.id" class="mt14rpx flex items-center justify-between" @click="router.push({ name: 'djk-goods', params: { id: `${its.id}` } })">
+            <view v-for="its in item.goodsList" :key="its.id" class="mt14rpx flex items-center justify-between" @click="router.push({ name: 'djk-goods', params: { id: `${its.id}`, type: '0' } })">
               <view class="text-28rpx text-#FF4D3A font-semibold">
                 <text class="text-20rpx">
@@ -69,6 +69,7 @@ function handleBottom() {
       <template v-if="goodsList.length > 10">
         <wd-loadmore :state="state" :loading-props="{ color: '#9ED605', size: 20 }" @reload="reload" />
       </template>
+      <StatusTip v-if="!goodsList.length" tip="暂无内容" />
     </scroll-view>
   </view>
 </template>

+ 10 - 1
src/subPack-djk/commonTab/components/order.vue

@@ -2,7 +2,7 @@
 import djkorder from '@/subPack-smqjh/components/djk-order/index.vue?async'
 import { createGlobalLoadingMiddleware } from '@/api/core/middleware'
 
-const { statusBarHeight, MenuButtonHeight } = storeToRefs(useSysStore())
+const { statusBarHeight, MenuButtonHeight, refreshOrderList } = storeToRefs(useSysStore())
 const { data: orderList, refresh, isLastPage, page, reload, error } = usePagination((pageNum, pageSize) => Apis.xsb.orderList({ data: {
   businessType: 'DJK',
   pageNum,
@@ -15,6 +15,7 @@ const { data: orderList, refresh, isLastPage, page, reload, error } = usePaginat
   data: res => res.data?.list,
   append: true,
   middleware: createGlobalLoadingMiddleware(),
+  immediate: false,
 })
 const state = computed(() => {
   return error.value ? 'error' : !isLastPage.value ? 'loading' : 'finished'
@@ -24,6 +25,14 @@ function handleBottom() {
     page.value++
   }
 }
+reload()
+watch(() => refreshOrderList.value, () => {
+  console.log('刷新页面', refreshOrderList.value)
+  if (refreshOrderList.value) {
+    reload()
+    refreshOrderList.value = false
+  }
+})
 </script>
 
 <template>

+ 4 - 0
src/subPack-djk/commonTab/index.vue

@@ -14,11 +14,15 @@ definePage({
     disableScroll: true,
   },
 })
+const { refreshOrderList } = storeToRefs(useSysStore())
 onLoad((options: any) => {
   if (options.pay) {
     handleTabbarChange({ value: 'djk-order' })
   }
 })
+onMounted(() => {
+  refreshOrderList.value = false
+})
 const tabbarItems = ref([
   { name: 'djk-home', value: null, active: true, title: '首页', icon1: `${StaticUrl}/djk-idx0.png`, icon2: `${StaticUrl}/djk-idx1.png` },
   { name: 'djk-fl', value: null, active: false, title: '福利中心', icon1: `${StaticUrl}/djk-fl0.png`, icon2: `${StaticUrl}/djk-fl1.png` },

+ 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">

+ 16 - 6
src/subPack-djk/goodsinfo/index.vue

@@ -14,7 +14,9 @@ const current = ref<number>(0)
 
 const isShowTab = ref(false)
 const goodsId = ref()
+const type = ref(0)
 onLoad((option: any) => {
+  type.value = Number(option.type)
   goodsId.value = option.id
   getGoodsDetaile()
 })
@@ -61,12 +63,20 @@ async function handlePay() {
     <template v-if="goodsInfo">
       <wd-swiper v-model:current="current" :list="swiperList" :autoplay="false" :height="375" />
       <view class="relative z999 rounded-t-48rpx bg-white px24rpx py28rpx -mt20rpx">
-        <view class="flex items-end text-#FF4D3A font-semibold">
-          <view class="text-24rpx">
-            
+        <view class="flex items-center">
+          <view v-if="type" class="text-24rpx text-#FF4D3A">
+            福利价
           </view>
-          <view class="text-36rpx line-height-[36rpx]">
-            {{ goodsInfo?.price }}
+          <view class="flex items-end text-#FF4D3A font-semibold">
+            <view class="text-24rpx">
+              ¥
+            </view>
+            <view class="text-36rpx line-height-[36rpx]">
+              {{ type ? 0 : goodsInfo?.price }}
+            </view>
+          </view>
+          <view v-if="type" class="ml16rpx text-24rpx text-gray line-through">
+            ¥{{ goodsInfo?.price }}
           </view>
         </view>
         <view class="mt20rpx text-32rpx font-semibold">
@@ -143,7 +153,7 @@ async function handlePay() {
             </view>
           </view>
           <view class="ml24rpx flex-1">
-            <wd-button block class="w-full" @click="handlePay">
+            <wd-button block class="w-full" :disabled="Boolean(type)" @click="handlePay">
               立即购买
             </wd-button>
           </view>

+ 119 - 109
src/subPack-djk/orderDetaile/index.vue

@@ -10,9 +10,9 @@ definePage({
     navigationStyle: 'custom',
   },
 })
-const collapse = ref(true)
 const orderInfo = ref<Api.xsbOrderList>()
 const orderNum = ref()
+const { refreshOrderList } = storeToRefs(useSysStore())
 onLoad((options: any) => {
   orderNum.value = options.id
   getDetail(options.id)
@@ -26,25 +26,25 @@ async function getDetail(id: string) {
   orderInfo.value = data
 }
 
-function handleCollapse() {
-  collapse.value = !collapse.value
-}
 async function handleCancel() {
-  await handleCommonCancelOrder(orderInfo.value as Api.xsbOrderList)
+  await useUserStore().handleCommonCancelOrder(orderInfo.value as Api.xsbOrderList)
+  refreshOrderList.value = true
   getDetail(String(unref(orderInfo)?.orderNumber))
 }
 async function handlePay() {
-  const res = await handleCommonPayMent(String(unref(orderInfo)?.orderNumber))
+  const res = await useUserStore().handleCommonPayMent(String(unref(orderInfo)?.orderNumber))
   if (res.payType !== 1) {
-    await getWxCommonPayment(res)
+    await useUserStore().getWxCommonPayment(res)
     getDetail(String(unref(orderInfo)?.orderNumber))
   }
   else {
     getDetail(String(unref(orderInfo)?.orderNumber))
   }
+  refreshOrderList.value = true
 }
 async function handelDel() {
-  await handleCommonDeleteOrder(unref(orderInfo) as Api.xsbOrderList)
+  await useUserStore().handleCommonDeleteOrder(unref(orderInfo) as Api.xsbOrderList)
+  refreshOrderList.value = true
   router.back()
 }
 async function handleFinish() {
@@ -61,15 +61,21 @@ function handleCopy() {
   })
 }
 async function handleAfterSale() {
-  if (!orderInfo.value?.orderItemList) {
-    useGlobalToast().show('商品异常!')
-    return
-  }
-  await useSysStore().getRefunOrder(orderInfo.value.orderNumber as string)
+  router.push({
+    name: 'djk-afterSales',
+    params: { data: JSON.stringify(orderInfo.value) },
+  })
 }
-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>
 
@@ -78,7 +84,7 @@ async function handleReceive() {
     v-if="orderInfo" class="page-xsb"
   >
     <wd-navbar
-      title="订单详情" :bordered="false" placeholder :z-index="99" safe-area-inset-top left-arrow fixed
+      title="订单详情" :bordered="false" :z-index="99" safe-area-inset-top left-arrow placeholder fixed
       @click-left="router.back()"
     />
     <view class="relative z-90 box-border bg-[#f6f6f6] px-24rpx">
@@ -115,29 +121,8 @@ 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>
-            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCancel" class="mr-10rpx">
-              订单取消
-            </view>
-            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderArrived" class="mr-10rpx">
-              订单已送达
-            </view>
-            <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCompleted" class="mr-10rpx">
-              订单已完成
-            </view>
+            {{ useUserStore().handleDjkCommonOrderStatusText(orderInfo) }}
           </view>
           <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCancel" class="mt-20rpx text-28rpx text-[#AAAAAA]">
             取消原因:{{ orderInfo.cancelReason }}
@@ -146,15 +131,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"
@@ -173,72 +149,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="mt20rpx flex items-center justify-between">
+          <view class="text-28rpx text-gray">
+            积分{{ orderInfo.offsetPoints ? `(${orderInfo.offsetPoints})` : '' }}
+          </view>
+          <view class="text-28rpx text-#FF4D3A font-semibold">
+            -¥{{ Number(orderInfo.offsetPoints) / 100 }}
           </view>
         </view>
-        <view class="mt-24rpx flex items-center justify-between">
-          <view class="text-28rpx">
-            积分
+        <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-[#FF4A39] font-semibold">
-            -¥{{ Number(orderInfo?.offsetPoints) / 100 }}
+          <view class="text-28rpx font-semibold">
+            ¥{{ orderInfo.actualTotal }}
           </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>
+      <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">
           订单信息
@@ -246,7 +272,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]">
@@ -257,14 +283,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]">
               下单时间
@@ -273,14 +291,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/shopinfo/index.vue

@@ -100,7 +100,7 @@ function handlePhone() {
         </view>
         <scroll-view scroll-y type="custom">
           <grid-view type="masonry" cross-axis-count="2" main-axis-gap="10" cross-axis-gap="10">
-            <view v-for="item in shopInfo.goodsList" :key="item.id" class="overflow-hidden rounded-16rpx" @click="router.push({ name: 'djk-goods', params: { id: `${item.id}` } })">
+            <view v-for="item in shopInfo.goodsList" :key="item.id" class="overflow-hidden rounded-16rpx" @click="router.push({ name: 'djk-goods', params: { id: `${item.id}`, type: '0' } })">
               <image
                 class="h318rpx w318rpx"
                 :src="item.goodsImg"

+ 71 - 3
src/subPack-djk/welfare/index.vue

@@ -3,27 +3,48 @@ import router from '@/router'
 
 definePage({ name: 'djk-welfare', islogin: false, style: { navigationBarTitleText: '活动详情' } })
 const welfare = ref<Api.DjkWelfareVO>()
+const show = ref(false)
+const isAllow = ref(true)
+const isEdit = ref(false)
 
 onLoad((options: any) => {
   getWelfare(options.id)
 })
 const mapUser = ['全部用户', '仅限新用户', '特定用户标签', '指定用户']
+const phone = ref(useUserStore().userInfo.mobile)
+const selectGoods = ref<Api.PmsDjkGoods>()
 async function getWelfare(id: number) {
   const res = await Apis.djk.welfareInfo({ data: { id } })
   welfare.value = res.data
 }
 async function handleSelect(item: Api.PmsDjkGoods) {
+  show.value = true
+  selectGoods.value = item
+}
+async function handelSubmit() {
+  uni.showLoading({ mask: true })
   try {
     await Apis.djk.welfareClaimInfo({
       data: {
         welfareId: Number(welfare.value?.id),
-        goodsId: item.id,
+        goodsId: selectGoods.value?.id,
         memberId: useUserStore().userInfo.id,
+        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()
+
+    setTimeout(() => {
+      router.push({
+        name: 'djk-orderDetaile',
+        params: { id: data.data },
+      })
+    }, 1500)
   }
   catch {
+    uni.hideLoading()
     console.log('领取失败')
   }
 }
@@ -46,8 +67,8 @@ async function handleSelect(item: Api.PmsDjkGoods) {
       <view class="text-28rpx">
         请选择商品(二选一)
       </view>
-      <view v-for="item, idx in welfare.welfareGoodList" :key="item.goodsCode" class="mt20rpx">
-        <view class="flex" @click="router.push({ name: 'djk-goods', params: { id: `${item.id}` } })">
+      <view v-for="item, idx in welfare.welfareGoodList" :key="item.id" class="mt20rpx">
+        <view class="flex" @click="router.push({ name: 'djk-goods', params: { id: `${item.id}`, type: '1' } })">
           <image
             :src="item.goodsImg?.split(',')[0]"
             class="h160rpx w160rpx flex-shrink-0"
@@ -89,6 +110,53 @@ async function handleSelect(item: Api.PmsDjkGoods) {
         2.到店使用需提前预约
       </view>
     </view>
+
+    <Zpopup v-model="show">
+      <view class="bg-white p24rpx">
+        <view class="text-center text-32rpx font-semibold">
+          确认选择
+        </view>
+        <view class="mt20rpx text-32rpx font-semibold">
+          您确认选择【{{ selectGoods?.goodsName }}】吗?
+        </view>
+        <view class="mt20rpx rounded-16rpx bg-white p24rpx">
+          <view class="flex items-center justify-between">
+            <view class="text-28rpx text-gray">
+              允许商户通过此号码致电沟通到店时间
+            </view>
+            <wd-checkbox v-model="isAllow" />
+          </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') }}
+            </view>
+            <view v-else>
+              <input v-model="phone" type="number" :maxlength="11" @blur="isEdit = false">
+            </view>
+            <view v-if="!isEdit" class="flex items-center" @click="isEdit = true">
+              <view class="mr5rpx">
+                修改
+              </view>
+              <wd-icon name="arrow-right" size="18px" color="#000" />
+            </view>
+          </view>
+        </view>
+      </view>
+      <template #footer>
+        <view class="flex items-center justify-between">
+          <view class="w48%">
+            <wd-button block type="info" @click="show = false">
+              取消
+            </wd-button>
+          </view>
+          <view class="w48%">
+            <wd-button block @click="handelSubmit">
+              确认领取
+            </wd-button>
+          </view>
+        </view>
+      </template>
+    </Zpopup>
   </view>
 </template>
 

+ 52 - 44
src/subPack-smqjh/components/djk-order/index.vue

@@ -39,59 +39,67 @@ function handleClick(no: string) {
   router.push({ name: 'djk-orderDetaile', params: { id: no } })
 }
 async function handleAfterSale(item: Api.xsbOrderList) {
-  if (!item.orderItemList) {
-    useGlobalToast().show('商品异常!')
-    return
-  }
-  await useSysStore().getRefunOrder(item.orderNumber as string)
+  router.push({
+    name: 'djk-afterSales',
+    params: { data: JSON.stringify(item) },
+  })
 }
 </script>
 
 <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().handleDjkCommonOrderStatusText(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,10 +131,10 @@ 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)">
-            申请售后
+            申请退款
           </wd-button>
         </view>
       </template>

+ 58 - 14
src/subPack-smqjh/order/index.vue

@@ -1,7 +1,6 @@
 <script setup lang="ts">
 import OrderRenderer from './components/OrderRenderer.vue'
 import { navTabTypeList, orderStatusList } from './order-data'
-import { createGlobalLoadingMiddleware } from '@/api/core/middleware'
 
 definePage({
   name: 'smqjh-order',
@@ -10,11 +9,12 @@ definePage({
     navigationBarTitleText: '订单列表',
   },
 })
+const skelet = ref(true)
 
 const navActiveTab = ref('all')
 const scrollViewId = ref()
 const orderStatusActive = ref('all')
-const { data: orderList, refresh, isLastPage, page, reload } = usePagination((pageNum, pageSize) => Apis.xsb.orderList({
+const { data: orderList, isLastPage, page, reload } = usePagination((pageNum, pageSize) => Apis.xsb.orderList({
   data: {
     businessType: unref(navActiveTab) === 'all' ? '' : unref(navActiveTab),
     orderStatus: unref(orderStatusActive),
@@ -28,10 +28,10 @@ const { data: orderList, refresh, isLastPage, page, reload } = usePagination((pa
   initialData: [],
   data: res => res.data?.list,
   append: true,
-  middleware: createGlobalLoadingMiddleware(),
-})
+}).onSuccess(() => skelet.value = false)
 
 function handleChangeTypeNav(value: string) {
+  skelet.value = true
   navActiveTab.value = value
   scrollViewId.value = null
   orderList.value = []
@@ -39,8 +39,8 @@ function handleChangeTypeNav(value: string) {
   reload()
 }
 onShow(() => {
-  orderList.value = []
-  refresh()
+  // orderList.value = []
+  reload()
 })
 onReachBottom(() => {
   if (!isLastPage.value) {
@@ -48,6 +48,7 @@ onReachBottom(() => {
   }
 })
 function handleChangeStatus(value: string) {
+  skelet.value = true
   orderStatusActive.value = value
   orderList.value = []
   reload()
@@ -56,7 +57,7 @@ function handleChangeStatus(value: string) {
 
 <template>
   <view class="page-smqjh">
-    <view class="nav sticky top-0 z-10 bg-white px-24rpx py-18rpx">
+    <view class="nav sticky top-0 z-99 bg-white px-24rpx py-18rpx">
       <scroll-view
         class="whitespace-nowrap" :scroll-into-view="`id-${scrollViewId}`"
         :scroll-into-view-offset="-150" scroll-x scroll-with-animation enable-passive
@@ -88,13 +89,56 @@ function handleChangeStatus(value: string) {
       </view>
     </view>
     <view class="p-24rpx">
-      <template v-for="item in orderList" :key="item.orderNumber">
-        <OrderRenderer
-          :order-list="item"
-          @refresh="reload"
-        />
-      </template>
-      <StatusTip v-if="!orderList.length" tip="暂无内容" />
+      <templat v-if="skelet">
+        <view v-for="item in 10" :key="item" class="mb20rpx rounded-16rpx bg-white p24rpx">
+          <wd-skeleton
+            animation="gradient"
+            theme="text"
+            :row-col="[{ width: '100%' }]"
+          />
+          <view class="mt20rpx flex">
+            <wd-skeleton
+              animation="gradient"
+              theme="image"
+              :row-col="[{ width: '160rpx', height: '160rpx' }]"
+            />
+            <view class="ml20rpx flex-1">
+              <wd-skeleton
+                animation="gradient"
+                theme="text"
+                :row-col="[{ width: '100%' }]"
+              />
+              <wd-skeleton
+                animation="gradient"
+                theme="text"
+                :row-col="[{ width: '90%' }]"
+                :custom-style="{ marginTop: '20rpx' }"
+              />
+              <wd-skeleton
+                animation="gradient"
+                theme="text"
+                :row-col="[{ width: '80%' }]"
+                :custom-style="{ marginTop: '20rpx' }"
+              />
+            </view>
+          </view>
+          <wd-skeleton
+            animation="gradient"
+            theme="text"
+            :custom-style="{ marginTop: '20rpx' }"
+            :row-col="[{ width: '100%', height: '60rpx' }]"
+          />
+        </view>
+      </templat>
+      <view v-else>
+        <template v-for="item in orderList" :key="item.orderNumber">
+          <OrderRenderer
+            :order-list="item"
+            @refresh="reload"
+          />
+        </template>
+        <StatusTip v-if="!orderList.length" tip="暂无内容" />
+      </view>
     </view>
     <view class="h-20rpx" />
   </view>

+ 7 - 3
src/subPack-xsb/commonTab/components/classfiy.vue

@@ -202,12 +202,16 @@ onMounted(async () => {
   if (leftActive.value) {
     handleChange({ value: leftActive.value })
   }
+  else {
+    goodsLoading.value = 'finished'
+  }
   if (topNavActive.value) {
     topScrollView.value = null
     nextTick(() => {
       topScrollView.value = topNavActive.value
     })
   }
+  console.log(topNavActive.value, '  ==', leftActive.value)
 
   getCartBox()
   if (token.value) {
@@ -332,7 +336,7 @@ function handlePay() {
 <template>
   <view class="page-xsb">
     <wd-navbar
-      title="" custom-style="background-color:#F4FFD1" :bordered="false" :z-index="99" safe-area-inset-top
+      title="" custom-style="background-color:#F4FFD1" :bordered="false" :z-index="9999" safe-area-inset-top
       fixed
     >
       <template #left>
@@ -400,7 +404,7 @@ function handlePay() {
         展开
         <image :src="`${StaticUrl}/xia.png`" class="mt20rpx h20rpx w20rpx" />
       </view>
-      <wd-popup v-model="show" position="top" custom-style="border-radius:32rpx;">
+      <wd-popup v-model="show" :z-index="9998" position="top" custom-style="border-radius:32rpx;">
         <view
           class="box-border bg-#F4FFD1 p24rpx"
           :style="{ paddingTop: `${(Number(statusBarHeight) || 44) + MenuButtonHeight + 12}px` }"
@@ -540,7 +544,7 @@ function handlePay() {
                     </view>
                   </view>
                 </view>
-              </view>.
+              </view>
             </view>
             <StatusTip v-else tip="暂无内容" />
             <view v-if="goodsLoading == 'finished' || isTopLoading" class="h-40vh" />

+ 18 - 6
src/subPack-xsb/commonTab/components/index.vue

@@ -38,6 +38,10 @@ onMounted(() => {
 
 function handleCommonClass(item: Api.xsbCategories) {
   console.log(item, '===================')
+  if (!item.children) {
+    useGlobalToast().show('敬请期待!')
+    return
+  }
 
   topNavActive.value = item.code
   leftActive.value = item.children && item.children[0].code
@@ -103,7 +107,7 @@ function handleChangeSwiper(e: UniHelper.SwiperOnChangeEvent) {
     </wd-navbar>
     <scroll-view
       :lower-threshold="80"
-      scroll-y enable-passive scroll-anchoring :scroll-top="scrollTop" class="content ios" @scroll="handleScroll" @scrolltolower="emit('scrollBottom')"
+      scroll-y enable-passive scroll-anchoring :scroll-top="scrollTop" class="ios content" @scroll="handleScroll" @scrolltolower="emit('scrollBottom')"
     >
       <view
         class="header-linear h320rpx px24rpx"
@@ -176,11 +180,16 @@ function handleChangeSwiper(e: UniHelper.SwiperOnChangeEvent) {
                 ]"
               >
                 <view class="px24rpx pt24rpx">
-                  <view class="grid grid-cols-5 gap-x-38rpx gap-y-24rpx">
-                    <view v-for="item, index in classfiylist" :key="index" @click="handleCommonClass(item)">
-                      <image :src="item.icon" class="h100rpx w100rpx" />
-                      <view class="mt12rpx text-24rpx text-#222">
-                        {{ item.name }}
+                  <view class="grid grid-cols-5 gap-x-24rpx gap-y-24rpx">
+                    <view v-for="item, index in classfiylist" :key="index" class="relative">
+                      <view @click="handleCommonClass(item)">
+                        <image :src="item.icon" class="h100rpx w100rpx" />
+                        <view class="mt12rpx whitespace-nowrap text-nowrap text-24rpx text-#222">
+                          {{ item.name }}
+                        </view>
+                      </view>
+                      <view v-if="!item.children" class="absolute left-0 top-0 h100rpx w100rpx flex items-center justify-center rounded-26rpx bg-[rgba(0,0,0,0.6)] text-16rpx text-white">
+                        敬请期待
                       </view>
                     </view>
                   </view>
@@ -195,6 +204,9 @@ function handleChangeSwiper(e: UniHelper.SwiperOnChangeEvent) {
                       <view class="text-24rpx text-#222">
                         {{ item.name }}
                       </view>
+                      <view v-if="!item.children" class="absolute left-50% top-0 h72rpx w72rpx flex items-center justify-center rounded-26rpx bg-[rgba(0,0,0,0.6)] text-16rpx text-white -translate-x-50%">
+                        敬请期待
+                      </view>
                     </swiper-item>
                   </swiper>
                   <view class="mt24rpx flex items-center justify-center">

+ 4 - 4
src/subPack-xsb/orderDetaile/index.vue

@@ -73,13 +73,13 @@ function handleCollapse() {
   collapse.value = !collapse.value
 }
 async function handleCancel() {
-  await handleCommonCancelOrder(orderInfo.value as Api.xsbOrderList)
+  await useUserStore().handleCommonCancelOrder(orderInfo.value as Api.xsbOrderList)
   getDetail(String(unref(orderInfo)?.orderNumber))
 }
 async function handlePay() {
-  const res = await handleCommonPayMent(String(unref(orderInfo)?.orderNumber))
+  const res = await useUserStore().handleCommonPayMent(String(unref(orderInfo)?.orderNumber))
   if (res.payType !== 1) {
-    await getWxCommonPayment(res)
+    await useUserStore().getWxCommonPayment(res)
     getDetail(String(unref(orderInfo)?.orderNumber))
   }
   else {
@@ -87,7 +87,7 @@ async function handlePay() {
   }
 }
 async function handelDel() {
-  await handleCommonDeleteOrder(unref(orderInfo) as Api.xsbOrderList)
+  await useUserStore().handleCommonDeleteOrder(unref(orderInfo) as Api.xsbOrderList)
   router.back()
 }
 async function handleFinish() {

+ 1 - 0
src/uni-pages.d.ts

@@ -48,6 +48,7 @@ interface NavigateToOptions {
        "/subPack-videoRights/videoRightsDetail/videoRightsDetail" |
        "/subPack-videoRights/videoRightsOrderInfo/videoRightsOrderInfo" |
        "/subPack-videoRights/videoRightsSubmitOrder/videoRightsSubmitOrder" |
+       "/subPack-djk/afterSales/index" |
        "/subPack-djk/commonTab/index" |
        "/subPack-djk/confirmOrder/index" |
        "/subPack-djk/goodsinfo/index" |

+ 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')
+}