Browse Source

feat: 添加日订单功能并优化订单管理页面

- 新增日订单功能,支持按日期查看订单
- 优化订单管理页面的加载状态和空状态显示
- 调整订单详情页的样式和交互逻辑
- 删除不再使用的CSS和Java文件
master
前端-胡立永 1 month ago
parent
commit
41c0cc3e56
20 changed files with 4421 additions and 1721 deletions
  1. +13
    -0
      api/order/order.js
  2. +7
    -6
      otherPages/myOrdersManage/clock/index.vue
  3. +0
    -306
      otherPages/myOrdersManage/service/PetCare.java
  4. +0
    -9
      otherPages/myOrdersManage/service/detail.css
  5. +191
    -21
      otherPages/myOrdersManage/service/detail.vue
  6. +252
    -248
      otherPages/orderTakingManage/detail/index.css
  7. +1
    -0
      otherPages/orderTakingManage/detail/index.min.css
  8. +251
    -0
      otherPages/orderTakingManage/detail/index.scss
  9. +59
    -15
      otherPages/orderTakingManage/detail/index.vue
  10. +2
    -1
      otherPages/workbenchManage/myLevel/commponents/myData.vue
  11. +4
    -2
      otherPages/workbenchManage/myLevel/index.vue
  12. +154
    -22
      pages/myOrdersManage/components/petServicePopup.vue
  13. +49
    -28
      pages/myOrdersManage/components/systemOrder.vue
  14. +0
    -958
      pages/myOrdersManage/components/testData.json
  15. +173
    -72
      pages/myOrdersManage/components/timelineService.vue
  16. +3123
    -0
      pages/myOrdersManage/dateOrder.json
  17. +123
    -30
      pages/myOrdersManage/index.vue
  18. +18
    -2
      pages/orderTakingManage/components/list.vue
  19. +1
    -1
      pages/userManage/index.scss
  20. BIN
      static/images/order/address.png

+ 13
- 0
api/order/order.js View File

@ -12,6 +12,18 @@ export function getAppOrderList() {
})
}
// 获取日订单列表
export function getOrderDateList(params) {
return request({
headers: {
"isToken": true
},
url: "/applet/order/myDateList",
method: 'get',
params
})
}
// 根据订单id获取打卡详情
export function orderItemLogGetByOrderId(orderId) {
return request({
@ -74,4 +86,5 @@ export default {
getOrderPetById,
getPetById,
getPetCareByPetId,
getOrderDateList,
}

+ 7
- 6
otherPages/myOrdersManage/clock/index.vue View File

@ -226,11 +226,13 @@
orderId.value = options.id || null;
isRead.value = options.isRead || false;
itemOrderID.value = options.itemID
serviceId.value = options.serviceId;
GetByOrderId()
});
const orderId = ref(0)
const itemOrderID = ref(0)
const serviceId = ref(0)
const isRead = ref(false)
@ -311,7 +313,7 @@
}
function GetByOrderId(){
orderItemLogGetByOrderId(orderId.value)
orderItemLogGetByOrderId(serviceId.value)
.then(res => {
if(res.code == 200 && res.data) {
const data = res.data;
@ -375,6 +377,7 @@
const params = {
orderId: orderId.value,
itemOrderId : itemOrderID.value,
itemDateId : serviceId.value,
glovePhoto: fileList.glove?.map(item => item.url).join(',') || '',
shoeCoverPhoto: fileList.ShoeCover?.map(item => item.url).join(',') || '',
//
@ -420,11 +423,9 @@
icon: 'success'
})
// 稿
if(flag) {
setTimeout(() => {
uni.navigateBack()
}, 1500)
}
setTimeout(() => {
uni.navigateBack()
}, 1500)
} else {
uni.showToast({
title: res.msg || '提交失败',


+ 0
- 306
otherPages/myOrdersManage/service/PetCare.java View File

@ -1,306 +0,0 @@
package com.cyl.manager.ums.domain;
import java.math.BigDecimal;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
* 宠物服务档案对象 ums_pet_care
*
* @author daixiande
*/
@Data
public class PetCare {
private static final long serialVersionUID = 1L;
/** 主键,自增长的ID */
private Integer id;
/** 所属宠物ID */
@Excel(name = "所属宠物ID")
private Integer petId;
/** 是否包含干粮 */
@Excel(name = "是否包含干粮")
private Boolean includeDryFood;
/** 干粮摆放位置-图片 */
@Excel(name = "干粮摆放位置-图片")
private String dryFoodLocation;
/** 干粮喂养重量 */
@Excel(name = "干粮喂养重量")
private String dryFoodFeedWeight;
/** 干粮喂养批次_天 */
@Excel(name = "干粮喂养批次_天")
private Integer dryFoodFeedFrequencyDays;
/** 干粮喂养批次_次 */
@Excel(name = "干粮喂养批次_次")
private Integer dryFoodFeedFrequencyTimes;
/** 干粮备注 */
@Excel(name = "干粮备注")
private String dryFoodRemarks;
/** 是否包含湿粮 */
@Excel(name = "是否包含湿粮")
private Boolean includeWetFood;
/** 湿粮摆放位置-图片 */
@Excel(name = "湿粮摆放位置-图片")
private String wetFoodLocation;
/** 湿粮喂养重量 */
@Excel(name = "湿粮喂养重量")
private BigDecimal wetFoodFeedWeight;
/** 湿粮喂养批次_天 */
@Excel(name = "湿粮喂养批次_天")
private Integer wetFoodFeedFrequencyDays;
/** 湿粮喂养批次_次 */
@Excel(name = "湿粮喂养批次_次")
private Integer wetFoodFeedFrequencyTimes;
/** 湿粮备注 */
@Excel(name = "湿粮备注")
private String wetFoodRemarks;
/** 是否包含自制食品 */
@Excel(name = "是否包含自制食品")
private Boolean includeHomemadeFood;
/** 自制食品摆放位置-图片 */
@Excel(name = "自制食品摆放位置-图片")
private String homemadeFoodLocation;
/** 自制饭制作和喂食说明(备注) */
@Excel(name = "自制饭制作和喂食说明", readConverterExp = "备=注")
private String homemadeFoodInstructions;
/** 是否包含生骨肉 */
@Excel(name = "是否包含生骨肉")
private Boolean includeRawMeat;
/** 生骨肉摆放位置-图片 */
@Excel(name = "生骨肉摆放位置-图片")
private String rawMeatLocation;
/** 生骨肉喂食说明(备注) */
@Excel(name = "生骨肉喂食说明", readConverterExp = "备=注")
private String rawMeatFeedingInstructions;
/** 是否包含保健品 */
@Excel(name = "是否包含保健品")
private Boolean includeHealthSupplements;
/** 保健品摆放位置-图片 */
@Excel(name = "保健品摆放位置-图片")
private String healthSupplementsLocation;
/** 保健品喂食说明(备注) */
@Excel(name = "保健品喂食说明", readConverterExp = "备=注")
private String healthSupplementsFeedingInstructions;
/** 是否包含零食 */
@Excel(name = "是否包含零食")
private Boolean includeSnacks;
/** 零食摆放位置-图片 */
@Excel(name = "零食摆放位置-图片")
private String snacksLocation;
/** 零食喂养方式(备注) */
@Excel(name = "零食喂养方式", readConverterExp = "备=注")
private String snacksFeedingMethod;
/** 零食备注 */
@Excel(name = "其它备注")
private String otherRemark;
/** 食盆/自动喂食器摆放位置-图片 */
@Excel(name = "食盆/自动喂食器摆放位置-图片")
private String feedingTrayAutomaticFeederLocation;
/** 食盆/自动喂食器备注 */
@Excel(name = "食盆/自动喂食器备注")
private String feedingTrayAutomaticFeederRemarks;
/** 水碗、饮用水摆放位置-图片 */
@Excel(name = "水碗、饮用水摆放位置-图片")
private String waterBowlLocation;
/** 水碗、饮用水备注 */
@Excel(name = "水碗、饮用水备注")
private String waterBowlRemarks;
/** 是否有清洁要求 */
@Excel(name = "是否有清洁要求")
private Boolean cleaningRequirements;
/** 是否更换猫砂 */
@Excel(name = "厕所、猫砂摆放位置-图片")
private Boolean changeLitterBox;
/** 厕所、猫砂摆放位置-图片 */
@Excel(name = "厕所、猫砂摆放位置-图片")
private String litterBoxLocation;
/** 猫砂更换频次_天 */
@Excel(name = "猫砂更换频次_天")
private Integer litterBoxChangeFrequencyDays;
/** 猫砂更换频次_次 */
@Excel(name = "猫砂更换频次_次")
private Integer litterBoxChangeFrequencyTimes;
/** 厕所、猫砂备注 */
@Excel(name = "厕所、猫砂备注")
private String litterBoxRemarks;
/** 尿垫摆放位置-图片 */
@Excel(name = "尿垫摆放位置-图片")
private String peePadLocation;
/** 是否更换尿垫 */
@Excel(name = "是否更换尿垫")
private Boolean changePeePad;
/** 尿垫砂更换频次_天 */
@Excel(name = "尿垫更换频次_天")
private Integer peePadFrequencyDays;
/** 尿垫更换频次_次 */
@Excel(name = "尿垫更换频次_次")
private Integer peePadFrequencyTimes;
/** 尿垫备注 */
@Excel(name = "尿垫备注")
private String peePadRemarks;
/** 是否选择附加服务 */
@Excel(name = "是否选择附加服务")
private Boolean additionalService;
/** 是否陪玩*/
@Excel(name = "是否陪玩")
private Boolean playtimeService;
/** 陪玩用具摆放位置-图片 */
@Excel(name = "陪玩用具摆放位置-图片")
private String playtimeToolsLocation;
/** 希望的互动方式和要求(备注) */
@Excel(name = "希望的互动方式和要求", readConverterExp = "备=注")
private String playtimeRequirements;
/** 是否选择活动区吸毛 */
@Excel(name = "是否选择活动区吸毛")
private Boolean furCleaningService;
/** 吸毛用品摆放位置-图片 */
@Excel(name = "吸毛用品摆放位置-图片")
private String furCleaningToolsLocation;
/** 请说明吸毛区和要求(备注) */
@Excel(name = "请说明吸毛区和要求", readConverterExp = "备=注")
private String furCleaningRequirements;
/** 是否选择毛发梳理 */
@Excel(name = "是否选择毛发梳理")
private Boolean groomingService;
/** 毛发梳理用品摆放位置-图片 */
@Excel(name = "毛发梳理用品摆放位置-图片")
private String groomingToolsLocation;
/** 请说明毛发梳理要求(备注) */
@Excel(name = "请说明毛发梳理要求", readConverterExp = "备=注")
private String groomingRequirements;
/** 是否选择食具深度清洁 */
@Excel(name = "是否选择食具深度清洁")
private Boolean deepCleaningService;
/** 食具深度清洁用品摆放位置-图片 */
@Excel(name = "食具深度清洁用品摆放位置-图片")
private String deepCleaningToolsLocation;
/** 食具深度清洁备注 */
@Excel(name = "食具深度清洁备注")
private String deepCleaningRemarks;
/** 是否选择喂药上药 */
@Excel(name = "是否选择喂药上药")
private Boolean administerMedication;
/** 药品摆放位置-图片 */
@Excel(name = "药品摆放位置-图片")
private String administerMedicationLocation;
/** 喂药上药备注 */
@Excel(name = "喂药上药备注")
private String administerMedicationRemarks;
/** 附加服务用品摆放位置-图片 */
@Excel(name = "附加服务用品摆放位置-图片")
private String additionalServicesPlacement;
/** 服务用品摆放备注 */
@Excel(name = "服务用品摆放备注")
private String additionalServicesPlacementRemark;
/** 服务用品摆放备注 */
@Excel(name = "附加服务备注")
private String additionalServicesRemarks;
@Excel(name = "遛狗时长")
private Boolean isWalkDogDuration;
@Excel(name = "狗狗行为")
private Boolean isDogBehavior;
@Excel(name = "偏好区域")
private Boolean isFavoriteRegion;
@Excel(name = "偏好路线")
private Boolean isFavoriteRoute;
@Excel(name = "狗狗雨具位置")
private String dogRainGearLocation;
@Excel(name = "下雨天遛狗要求")
private String walkDogRainRemark;
/** 是否遛狗服务 */
@Excel(name = "是否遛狗服务")
private Boolean walkDog;
/** 遛狗用品摆放位置 */
@Excel(name = "遛狗用品摆放位置")
private String walkDogToolsLocation;
/** 是否雨天遛狗 */
@Excel(name = "是否雨天遛狗")
private Boolean walkDogRainyDay;
/** 遛狗时长 */
@Excel(name = "遛狗时长")
private String walkDogDuration;
/** 狗狗行为 */
@Excel(name = "狗狗行为")
private String dogBehavior;
/** 偏好区域 */
@Excel(name = "偏好区域")
private String favoriteRegion;
/** 偏好路线 */
@Excel(name = "偏好路线")
private String favoriteRoute;
}

+ 0
- 9
otherPages/myOrdersManage/service/detail.css View File

@ -1,9 +0,0 @@
.box {
width: 100vw;
height: 100vh;
padding: 0 20rpx;
}
.box-size {
box-sizing: border-box;
}

+ 191
- 21
otherPages/myOrdersManage/service/detail.vue View File

@ -3,26 +3,31 @@
<view class="box box-size">
<view style="margin: 32rpx 0;">
<up-steps :current="currentStep" activeColor="#FFA042" inactiveColor="#999999" class="up-steps-custom">
<up-steps :current="currentStep" activeColor="#FFA042" inactiveColor="#E5E5E5" class="up-steps-custom">
<up-steps-item title="喂养要求" :titleStyle="{fontSize: '32rpx', fontWeight: 'bold', color: currentStep === 0 ? '#FFA042' : '#999999'}"></up-steps-item>
<up-steps-item title="清洁要求" :titleStyle="{fontSize: '32rpx', fontWeight: 'bold', color: currentStep === 1 ? '#FFA042' : '#999999'}"></up-steps-item>
<up-steps-item title="附加服务" :titleStyle="{fontSize: '32rpx', fontWeight: 'bold', color: currentStep === 2 ? '#FFA042' : '#999999'}"></up-steps-item>
</up-steps>
</view>
<!-- 喂养要求内容 -->
<view v-if="currentStep === 0">
<view class="top box-size" :style="{borderRadius:'16rpx'}"
v-if="detail.includeDryFood
<!-- v-if="detail.includeDryFood
|| detail.includeWetFood
|| detail.includeHomemadeFood
|| detail.includeRawMeat
|| detail.includeHealthSupplements
|| detail.includeSnacks
">
" -->
<!-- 喂养要求内容 -->
<view v-if="currentStep === 0">
<view class="top box-size" :style="{borderRadius:'16rpx'}">
<view class="form-title">
本次喂养过程中您需要喂养的食品包括
</view>
<view v-if="!detail.includeDryFood && !detail.includeWetFood && !detail.includeHomemadeFood && !detail.includeRawMeat && !detail.includeHealthSupplements && !detail.includeSnacks" class="empty-state-full">
<up-icon name="info-circle" size="60rpx" color="#999999"></up-icon>
<text class="empty-text-full">暂无喂养食品</text>
</view>
<view class=" mt32 ml10" v-if="detail.includeDryFood">
<view class="color-A55 size-30 fw400">
干粮(主粮冻干等)
@ -31,7 +36,13 @@
干粮摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.dryFoodLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.dryFoodLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.dryFoodLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24 flex-between">
<view :style="{color:'#999999'}">干粮喂养重量</view>
@ -71,7 +82,13 @@
湿粮摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.wetFoodLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.wetFoodLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.wetFoodLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24 flex-between">
<view :style="{color:'#999999'}">湿粮喂养重量</view>
@ -111,7 +128,13 @@
自制食品摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.homemadeFoodLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.homemadeFoodLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.homemadeFoodLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24" :style="{color:'#999999'}">
自制饭制作和喂食说明
@ -129,7 +152,13 @@
生骨肉摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.rawMeatLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.rawMeatLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.rawMeatLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24" :style="{color:'#999999'}">
生骨肉喂食说明
@ -147,7 +176,13 @@
保健品摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.healthSupplementsLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.healthSupplementsLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.healthSupplementsLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24" :style="{color:'#999999'}">
保健品喂养方式
@ -165,7 +200,13 @@
零食摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.snacksLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.snacksLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.snacksLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24" :style="{color:'#999999'}">
零食喂养方式
@ -185,7 +226,13 @@
喂食器具摆放位置
</view>
<view class="mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.feedingTrayAutomaticFeederLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.feedingTrayAutomaticFeederLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.feedingTrayAutomaticFeederLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24" :style="{color:'#999999'}">
备注信息
@ -204,7 +251,13 @@
饮用水摆放位置
</view>
<view class="mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.waterBowlLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.waterBowlLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.waterBowlLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24" :style="{color:'#999999'}">
饮用水添加要求
@ -235,6 +288,10 @@
<view class="form-title">
您需要的清洁内容
</view>
<view v-if="!detail.includeCatLitter && !detail.includeUrinePad" class="empty-state-full">
<up-icon name="info-circle" size="60rpx" color="#999999"></up-icon>
<text class="empty-text-full">暂无清洁内容</text>
</view>
<view class="mt32 ml10" v-if="detail.includeCatLitter">
<view class="color-A55 size-30 fw400">
猫砂
@ -243,7 +300,13 @@
猫砂摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.catLitterLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.catLitterLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.catLitterLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24 flex-between">
<view :style="{color:'#999999'}">猫砂更换频率</view>
@ -275,7 +338,13 @@
尿垫摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.urinePadLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.urinePadLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.urinePadLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24 flex-between">
<view :style="{color:'#999999'}">更换尿垫</view>
@ -311,10 +380,14 @@
<!-- 附加服务内容 -->
<view v-if="currentStep === 2">
<view class="top box-size" :style="{borderRadius:'16rpx'}" v-if="detail.additionalService">
<view class="top box-size" :style="{borderRadius:'16rpx'}">
<view class="form-title">
您需要的附加服务
</view>
<view v-if="!detail.additionalService || (!detail.playtimeService && !detail.furCleaningService && !detail.groomingService && !detail.deepCleaningService)" class="empty-state-full">
<up-icon name="info-circle" size="60rpx" color="#999999"></up-icon>
<text class="empty-text-full">暂无附加服务</text>
</view>
<!-- 陪玩服务 -->
<view class="mt32 ml10" v-if="detail.playtimeService">
@ -325,7 +398,13 @@
陪玩用具摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.playtimeToolsLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.playtimeToolsLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.playtimeToolsLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24" :style="{color:'#999999'}">
您希望的互动方式和要求
@ -345,7 +424,13 @@
吸毛用品摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.furCleaningToolsLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.furCleaningToolsLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.furCleaningToolsLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24" :style="{color:'#999999'}">
请说明吸毛区域及要求
@ -365,7 +450,13 @@
毛发梳理用品摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.groomingToolsLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.groomingToolsLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.groomingToolsLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24" :style="{color:'#999999'}">
请说明毛发梳理要求(: 天数,次数等)
@ -385,7 +476,13 @@
需深度清洁的用具及消毒剂摆放位置
</view>
<view class="img mt20">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.deepCleaningToolsLocation)" :key="index"></u-image>
<template v-if="handleImageUrl(detail.deepCleaningToolsLocation).length > 0">
<u-image class="img" :src="item" mode="aspectFill" width="173rpx" height="230rpx" @click="previewImage(item)" v-for="(item, index) in handleImageUrl(detail.deepCleaningToolsLocation)" :key="index"></u-image>
</template>
<view v-else class="empty-state">
<up-icon name="info-circle" size="40rpx" color="#999999"></up-icon>
<text class="empty-text">暂无图片</text>
</view>
</view>
<view class="size-30 mt24" :style="{color:'#999999'}">
请说明食具/饮水机深度清洁要求(如清洁方式消毒剂使用方式频率等)
@ -581,4 +678,77 @@
<style scoped lang="scss">
@import"detail.scss";
@import"steps-custom.scss";
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 173rpx;
height: 230rpx;
background-color: #f5f5f5;
border-radius: 8rpx;
}
.empty-text {
margin-top: 10rpx;
font-size: 24rpx;
color: #999999;
}
.empty-state-full {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 200rpx;
background-color: #f9f9f9;
border-radius: 8rpx;
margin-top: 20rpx;
}
.empty-text-full {
margin-top: 20rpx;
font-size: 28rpx;
color: #999999;
}
/* 自定义步骤条样式 */
:deep(.up-steps-custom) {
.u-steps-item__wrapper {
width: 40rpx !important;
height: 40rpx !important;
&__circle {
width: 40rpx !important;
height: 40rpx !important;
background: #E5E5E5;
&__text {
font-size: 24rpx;
}
}
}
.u-steps-item__line {
top: 20rpx !important;
height: 4rpx !important;
background: #E5E5E5 !important;
}
/* 激活状态样式 */
.u-steps-item--active {
.u-steps-item__wrapper__circle {
background: linear-gradient(90deg, #FFA042, #FFD591) !important;
}
}
/* 已完成步骤前的线条样式 */
.u-steps-item--process {
.u-steps-item__line {
background: linear-gradient(90deg, #FFA042, #FFD591) !important;
}
}
}
</style>

+ 252
- 248
otherPages/orderTakingManage/detail/index.css View File

@ -1,248 +1,252 @@
.box {
width: 100vw;
height: 100vh;
background-color: #F5F5F5;
padding: 2% 3% 0 3%;
}
.box-size {
box-sizing: border-box;
}
.level {
display: flex;
}
/* 垂直、水平居中 */
.vertically_center {
display: grid;
place-items: center;
}
.top {
width: 710rpx;
height: 176rpx;
background-color: #FFFFFF;
padding: 1% 2%;
font-size: 22rpx;
display: grid;
justify-content: space-between;
}
.top_left {
width: 520rpx;
height: auto;
display: flex;
justify-content: space-between;
padding-top: 20rpx;
}
.text1 {
color: #FF2A2A;
font-size: 25rpx;
}
.top_bottom {
/* background-color: aqua; */
margin-left: 10rpx;
color: #999999;
}
.top-button {
width: 132rpx;
height: 54rpx;
border: 1rpx solid #FFBF60;
color: #FFBF60;
display: grid;
justify-content: center;
line-height: 54rpx;
position: absolute;
top: 30rpx;
right: 30rpx;
}
.information {
width: 710rpx;
height: 300rpx;
background-color: #FFFFFF;
/* background-color: pink; */
margin-top: 2%;
padding: 0 3%;
}
.time {
width: 650rpx;
/* background-color: gray; */
padding: 0 2%;
margin-top: 50rpx;
display: flex;
justify-content: space-between;
}
.service {
width: 710rpx;
height: auto;
background-color: #FFFFFF;
margin-top: 2%;
padding: 0 3% 3% 3%;
}
.horizontal_distribution {
display: flex;
justify-content: space-between;
}
.flex {
display: flex;
}
.service_top {
width: 670rpx;
}
.text2 {
width: auto;
height: 20rpx;
margin-top: 45rpx;
font-size: 22rpx;
color: #999999;
}
.pet_information {
width: 670rpx;
height: auto;
/* background-color: pink; */
padding: 5% 0 0 3%;
}
.pet_item {
color: #999999;
font-size: 28rpx;
}
.img image {
width: 140rpx;
height: 140rpx;
border-radius: 100rpx;
margin-right: 20rpx;
}
.name {
margin-bottom: 15rpx;
}
.name image {
width: 35rpx;
height: 35rpx;
border-radius: 35rpx;
background-color: red;
margin-left: 15rpx;
}
.name_text {
color: #000 !important;
font-size: 30rpx !important;
}
.pet- {
height: 40rpx;
line-height: 40rpx;
color: #999999;
font-size: 28rpx;
margin: 20rpx 0 20rpx 0;
}
.pet- text {
margin: 0 8rpx 0 30rpx;
color: #000;
}
.money_total {
width: 670rpx;
height: 45rpx;
/* background-color: pink; */
margin: 60rpx 0 20rpx 0;
justify-content: space-between;
font-size: 30rpx;
}
.money_text {
color: red !important;
font-size: 34rpx !important;
}
.other_information {
width: 710rpx;
height: 350rpx;
background-color: #FFFFFF;
/* background-color: pink; */
margin-top: 20rpx;
padding: 0 1% 0 3%;
}
.text3 {
margin: 40rpx 15rpx 0 15rpx;
}
.bottom {
width: 100vw;
height: 163rpx;
background-color: #FFFFFF;
margin-top: 20rpx;
position: relative;
}
.bottom_button {
width: 594rpx;
height: 94rpx;
background-color: #FFBF60;
color: #FFFFFF;
font-size: 30rpx;
line-height: 94rpx;
justify-content: center;
position: absolute;
top: 19%;
left: 11%;
}
.success {
width: 310rpx;
height: 370rpx;
background-color: #FFFFFF;
}
.pop_top {
width: 310rpx;
height: 100rpx;
background-image: linear-gradient(to bottom, #FFBF60, #FFD494)
}
.code {
width: 250rpx;
height: 50rpx;
background-color: #F3F3F3;
margin: 30rpx 0 0 30rpx;
}
.pop_image {
display: grid;
place-items: center;
margin-top: 20rpx;
}
.copy {
width: 260rpx;
height: 50rpx;
background-color: #FFBF60;
margin: 30rpx 0 0 25rpx;
}
.cancel {
width: 40rpx;
height: 40rpx;
background-color: #FFFFFF;
position: absolute;
top: -20rpx;
right: -17rpx;
}
@charset "UTF-8";
.box {
width: 100vw;
height: 100vh;
background-color: #F5F5F5;
padding: 2% 3% 0 3%;
}
.box-size {
box-sizing: border-box;
}
.level {
display: flex;
}
/* 垂直、水平居中 */
.vertically_center {
display: grid;
place-items: center;
}
.top {
width: 710rpx;
height: 176rpx;
background-color: #FFFFFF;
padding: 1% 2%;
font-size: 22rpx;
display: grid;
justify-content: space-between;
}
.top_left {
width: 520rpx;
height: auto;
display: flex;
justify-content: space-between;
padding-top: 20rpx;
}
.text1 {
color: #FF2A2A;
font-size: 25rpx;
}
.top_bottom {
/* background-color: aqua; */
margin-left: 10rpx;
color: #999999;
}
.top-button {
width: 132rpx;
height: 54rpx;
border: 1rpx solid #FFBF60;
color: #FFBF60;
display: grid;
justify-content: center;
line-height: 54rpx;
position: absolute;
top: 30rpx;
right: 30rpx;
}
.information {
width: 710rpx;
background-color: #FFFFFF;
/* background-color: pink; */
margin-top: 10rpx;
padding: 10rpx 10rpx;
}
.time {
width: 660rpx;
/* background-color: gray; */
padding: 0 2%;
margin-top: 50rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.time .time-content {
width: 500rpx;
}
.service {
width: 710rpx;
height: auto;
background-color: #FFFFFF;
margin-top: 2%;
padding: 0 3% 3% 3%;
}
.horizontal_distribution {
display: flex;
justify-content: space-between;
}
.flex {
display: flex;
}
.service_top {
width: 670rpx;
}
.text2 {
width: auto;
height: 20rpx;
margin-top: 45rpx;
font-size: 22rpx;
color: #999999;
}
.pet_information {
width: 670rpx;
height: auto;
/* background-color: pink; */
padding: 5% 0 0 3%;
}
.pet_item {
color: #999999;
font-size: 28rpx;
}
.img image {
width: 140rpx;
height: 140rpx;
border-radius: 100rpx;
margin-right: 20rpx;
}
.name {
margin-bottom: 15rpx;
}
.name image {
width: 35rpx;
height: 35rpx;
border-radius: 35rpx;
background-color: red;
margin-left: 15rpx;
}
.name_text {
color: #000 !important;
font-size: 30rpx !important;
}
.pet- {
height: 40rpx;
line-height: 40rpx;
color: #999999;
font-size: 28rpx;
margin: 20rpx 0 20rpx 0;
}
.pet- text {
margin: 0 8rpx 0 30rpx;
color: #000;
}
.money_total {
width: 670rpx;
height: 45rpx;
/* background-color: pink; */
margin: 60rpx 0 20rpx 0;
justify-content: space-between;
font-size: 30rpx;
}
.money_text {
color: red !important;
font-size: 34rpx !important;
}
.other_information {
width: 710rpx;
height: 350rpx;
background-color: #FFFFFF;
/* background-color: pink; */
margin-top: 20rpx;
padding: 0 1% 0 3%;
}
.text3 {
margin: 40rpx 15rpx 0 15rpx;
}
.bottom {
width: 100vw;
height: 163rpx;
background-color: #FFFFFF;
margin-top: 20rpx;
position: relative;
}
.bottom_button {
width: 594rpx;
height: 94rpx;
background-color: #FFBF60;
color: #FFFFFF;
font-size: 30rpx;
line-height: 94rpx;
justify-content: center;
position: absolute;
top: 19%;
left: 11%;
}
.success {
width: 310rpx;
height: 370rpx;
background-color: #FFFFFF;
}
.pop_top {
width: 310rpx;
height: 100rpx;
background-image: linear-gradient(to bottom, #FFBF60, #FFD494);
}
.code {
width: 250rpx;
height: 50rpx;
background-color: #F3F3F3;
margin: 30rpx 0 0 30rpx;
}
.pop_image {
display: grid;
place-items: center;
margin-top: 20rpx;
}
.copy {
width: 260rpx;
height: 50rpx;
background-color: #FFBF60;
margin: 30rpx 0 0 25rpx;
}
.cancel {
width: 40rpx;
height: 40rpx;
background-color: #FFFFFF;
position: absolute;
top: -20rpx;
right: -17rpx;
}

+ 1
- 0
otherPages/orderTakingManage/detail/index.min.css View File

@ -0,0 +1 @@
.box{width:100vw;height:100vh;background-color:#F5F5F5;padding:2% 3% 0 3%}.box-size{box-sizing:border-box}.level{display:flex}.vertically_center{display:grid;place-items:center}.top{width:710rpx;height:176rpx;background-color:#FFFFFF;padding:1% 2%;font-size:22rpx;display:grid;justify-content:space-between}.top_left{width:520rpx;height:auto;display:flex;justify-content:space-between;padding-top:20rpx}.text1{color:#FF2A2A;font-size:25rpx}.top_bottom{margin-left:10rpx;color:#999999}.top-button{width:132rpx;height:54rpx;border:1rpx solid #FFBF60;color:#FFBF60;display:grid;justify-content:center;line-height:54rpx;position:absolute;top:30rpx;right:30rpx}.information{width:710rpx;background-color:#FFFFFF;margin-top:10rpx;padding:10rpx 10rpx}.time{width:660rpx;padding:0 2%;margin-top:50rpx;display:flex;justify-content:space-between;align-items:center}.time .time-content{width:500rpx}.service{width:710rpx;height:auto;background-color:#FFFFFF;margin-top:2%;padding:0 3% 3% 3%}.horizontal_distribution{display:flex;justify-content:space-between}.flex{display:flex}.service_top{width:670rpx}.text2{width:auto;height:20rpx;margin-top:45rpx;font-size:22rpx;color:#999999}.pet_information{width:670rpx;height:auto;padding:5% 0 0 3%}.pet_item{color:#999999;font-size:28rpx}.img image{width:140rpx;height:140rpx;border-radius:100rpx;margin-right:20rpx}.name{margin-bottom:15rpx}.name image{width:35rpx;height:35rpx;border-radius:35rpx;background-color:red;margin-left:15rpx}.name_text{color:#000 !important;font-size:30rpx !important}.pet-{height:40rpx;line-height:40rpx;color:#999999;font-size:28rpx;margin:20rpx 0 20rpx 0}.pet- text{margin:0 8rpx 0 30rpx;color:#000}.money_total{width:670rpx;height:45rpx;margin:60rpx 0 20rpx 0;justify-content:space-between;font-size:30rpx}.money_text{color:red !important;font-size:34rpx !important}.other_information{width:710rpx;height:350rpx;background-color:#FFFFFF;margin-top:20rpx;padding:0 1% 0 3%}.text3{margin:40rpx 15rpx 0 15rpx}.bottom{width:100vw;height:163rpx;background-color:#FFFFFF;margin-top:20rpx;position:relative}.bottom_button{width:594rpx;height:94rpx;background-color:#FFBF60;color:#FFFFFF;font-size:30rpx;line-height:94rpx;justify-content:center;position:absolute;top:19%;left:11%}.success{width:310rpx;height:370rpx;background-color:#FFFFFF}.pop_top{width:310rpx;height:100rpx;background-image:linear-gradient(to bottom, #FFBF60, #FFD494)}.code{width:250rpx;height:50rpx;background-color:#F3F3F3;margin:30rpx 0 0 30rpx}.pop_image{display:grid;place-items:center;margin-top:20rpx}.copy{width:260rpx;height:50rpx;background-color:#FFBF60;margin:30rpx 0 0 25rpx}.cancel{width:40rpx;height:40rpx;background-color:#FFFFFF;position:absolute;top:-20rpx;right:-17rpx}

+ 251
- 0
otherPages/orderTakingManage/detail/index.scss View File

@ -0,0 +1,251 @@
.box {
width: 100vw;
height: 100vh;
background-color: #F5F5F5;
padding: 2% 3% 0 3%;
}
.box-size {
box-sizing: border-box;
}
.level {
display: flex;
}
/* 垂直、水平居中 */
.vertically_center {
display: grid;
place-items: center;
}
.top {
width: 710rpx;
height: 176rpx;
background-color: #FFFFFF;
padding: 1% 2%;
font-size: 22rpx;
display: grid;
justify-content: space-between;
}
.top_left {
width: 520rpx;
height: auto;
display: flex;
justify-content: space-between;
padding-top: 20rpx;
}
.text1 {
color: #FF2A2A;
font-size: 25rpx;
}
.top_bottom {
/* background-color: aqua; */
margin-left: 10rpx;
color: #999999;
}
.top-button {
width: 132rpx;
height: 54rpx;
border: 1rpx solid #FFBF60;
color: #FFBF60;
display: grid;
justify-content: center;
line-height: 54rpx;
position: absolute;
top: 30rpx;
right: 30rpx;
}
.information {
width: 710rpx;
background-color: #FFFFFF;
/* background-color: pink; */
margin-top: 10rpx;
padding: 10rpx 10rpx;
}
.time {
width: 660rpx;
/* background-color: gray; */
padding: 0 2%;
margin-top: 50rpx;
display: flex;
justify-content: space-between;
align-items: center;
.time-content{
width: 500rpx;
}
}
.service {
width: 710rpx;
height: auto;
background-color: #FFFFFF;
margin-top: 2%;
padding: 0 3% 3% 3%;
}
.horizontal_distribution {
display: flex;
justify-content: space-between;
}
.flex {
display: flex;
}
.service_top {
width: 670rpx;
}
.text2 {
width: auto;
height: 20rpx;
margin-top: 45rpx;
font-size: 22rpx;
color: #999999;
}
.pet_information {
width: 670rpx;
height: auto;
/* background-color: pink; */
padding: 5% 0 0 3%;
}
.pet_item {
color: #999999;
font-size: 28rpx;
}
.img image {
width: 140rpx;
height: 140rpx;
border-radius: 100rpx;
margin-right: 20rpx;
}
.name {
margin-bottom: 15rpx;
}
.name image {
width: 35rpx;
height: 35rpx;
border-radius: 35rpx;
background-color: red;
margin-left: 15rpx;
}
.name_text {
color: #000 !important;
font-size: 30rpx !important;
}
.pet- {
height: 40rpx;
line-height: 40rpx;
color: #999999;
font-size: 28rpx;
margin: 20rpx 0 20rpx 0;
}
.pet- text {
margin: 0 8rpx 0 30rpx;
color: #000;
}
.money_total {
width: 670rpx;
height: 45rpx;
/* background-color: pink; */
margin: 60rpx 0 20rpx 0;
justify-content: space-between;
font-size: 30rpx;
}
.money_text {
color: red !important;
font-size: 34rpx !important;
}
.other_information {
width: 710rpx;
height: 350rpx;
background-color: #FFFFFF;
/* background-color: pink; */
margin-top: 20rpx;
padding: 0 1% 0 3%;
}
.text3 {
margin: 40rpx 15rpx 0 15rpx;
}
.bottom {
width: 100vw;
height: 163rpx;
background-color: #FFFFFF;
margin-top: 20rpx;
position: relative;
}
.bottom_button {
width: 594rpx;
height: 94rpx;
background-color: #FFBF60;
color: #FFFFFF;
font-size: 30rpx;
line-height: 94rpx;
justify-content: center;
position: absolute;
top: 19%;
left: 11%;
}
.success {
width: 310rpx;
height: 370rpx;
background-color: #FFFFFF;
}
.pop_top {
width: 310rpx;
height: 100rpx;
background-image: linear-gradient(to bottom, #FFBF60, #FFD494)
}
.code {
width: 250rpx;
height: 50rpx;
background-color: #F3F3F3;
margin: 30rpx 0 0 30rpx;
}
.pop_image {
display: grid;
place-items: center;
margin-top: 20rpx;
}
.copy {
width: 260rpx;
height: 50rpx;
background-color: #FFBF60;
margin: 30rpx 0 0 25rpx;
}
.cancel {
width: 40rpx;
height: 40rpx;
background-color: #FFFFFF;
position: absolute;
top: -20rpx;
right: -17rpx;
}

+ 59
- 15
otherPages/orderTakingManage/detail/index.vue View File

@ -44,7 +44,7 @@
<view>
服务日期
</view>
<view v-if="orderDetail.order">
<view v-if="orderDetail.order" class="time-content">
{{ getTextList().join(',') }}
</view>
</view>
@ -54,7 +54,7 @@
<view>
服务地址
</view>
<view >
<view class="time-content">
{{ orderDetail.order?.address }}
</view>
</view>
@ -71,7 +71,9 @@
</view>
<view class="line1">
</view>
<view v-for="pet in orderDetail.order.h5OrderVO.petVOList" :key="pet.id" class="pet_information box-size">
<view v-for="pet in orderDetail.order.h5OrderVO.petVOList"
@click="toDetail(pet.id)"
:key="pet.id" class="pet_information box-size">
<view class="flex pet_item box-size">
<view class="img" :style="{borderRadius:'100rpx'}">
<image :src="pet.photo" mode=""></image>
@ -171,8 +173,8 @@
</view>
</view>
<view class="ok">
<view class="btn">
点击确定
<view class="btn" @click="handleConfirm(0)" :class="{ 'btn-confirmed': confirmStatus[0] }">
{{ confirmStatus[0] ? '已确认' : '点击确定' }}
</view>
</view>
</view>
@ -187,8 +189,8 @@
</view>
</view>
<view class="ok">
<view class="btn">
点击确定
<view class="btn" @click="handleConfirm(1)" :class="{ 'btn-confirmed': confirmStatus[1] }">
{{ confirmStatus[1] ? '已确认' : '点击确定' }}
</view>
</view>
</view>
@ -205,8 +207,8 @@
</view>
</view>
<view class="ok">
<view class="btn">
点击确定
<view class="btn" @click="handleConfirm(2)" :class="{ 'btn-confirmed': confirmStatus[2] }">
{{ confirmStatus[2] ? '已确认' : '点击确定' }}
</view>
</view>
</view>
@ -281,6 +283,7 @@
const showOrderSuccess = ref(false);
const value = ref("45619491656")
const petList = ref([])
const confirmStatus = ref([false, false, false]); //
const userInfo = computed(() => {
return store.getters.userInfo
})
@ -330,8 +333,15 @@
showOrderSuccess.value = true;
};
//
const handleConfirm = (index) => {
confirmStatus.value[index] = true;
}
const conform = async () => {
close();
//
confirmStatus.value = [false, false, false];
let response = await startByOrderId({
id: orderId.value,
userId: userInfo.value.userId
@ -383,13 +393,29 @@
let orderService = orderServiceList.filter(service => service.petId == petId)
return productList
.filter(product => orderService.filter(service => service.id == product.orderServiceId).length > 0)
.map(product => {
// return productList
// .filter(product => orderService.filter(service => service.id == product.orderServiceId).length > 0)
// .map(product => {
// return {
// time : dayjs(orderService.filter(service => service.id == product.orderServiceId)
// .serviceDate).format('MM-DD'),
// name : product.productName,
// }
// })
return orderService.map(item => {
let name = ''
productList.forEach(product => {
if(item.id == product.orderServiceId){
name = product.productName
}
})
return {
time : dayjs(orderService.filter(service => service.id == product.orderServiceId)
.serviceDate).format('MM-DD'),
name : product.productName,
time : dayjs(item.serviceDate).format('MM-DD'),
name,
}
})
}
@ -399,6 +425,12 @@
.orderServiceList.map(item =>
dayjs(item.serviceDate).format('MM-DD'))
}
const toDetail = (id) => {
uni.navigateTo({
url: `/otherPages/orderTakingManage/pet/detail?id=${id}`
})
}
</script>
<style scoped lang="scss">
@ -419,6 +451,14 @@
// background-color: red;
}
}
.time-content {
max-height: 120rpx;
overflow-y: auto;
word-break: break-word;
line-height: 1.5;
padding: 4rpx 0;
}
.order-confirmation {
.confirmation-item {
@ -491,4 +531,8 @@
.input {
margin-bottom: 40rpx;
}
.btn-confirmed {
background: #CCCCCC !important; /* 灰色背景 */
}
</style>

+ 2
- 1
otherPages/workbenchManage/myLevel/commponents/myData.vue View File

@ -31,7 +31,8 @@
import cardData from '../../components/cardData.vue'
import {
ref,
reactive
reactive,
computed,
} from "vue"
import { useStore } from 'vuex'


+ 4
- 2
otherPages/workbenchManage/myLevel/index.vue View File

@ -1,8 +1,10 @@
<template>
<view class="bind-user">
<view class="bind-user-header">
<view class="flex mb28">
<up-image width="120rpx" height="120rpx" :src="state.baseInfo.info.userImage" shape="circle"></up-image>
<view class="flex mb28" v-if="state.baseInfo && state.baseInfo.info">
<up-image width="120rpx" height="120rpx"
:src="state.baseInfo.info.userImage" shape="circle"></up-image>
<view class="header-name">
<view class="font32 mb20" :style="{ color: '#000', fontSize: '32rpx' }">
{{state.baseInfo.info.userName}}


+ 154
- 22
pages/myOrdersManage/components/petServicePopup.vue View File

@ -2,13 +2,40 @@
<up-popup :show="show" mode="bottom" @close="close" :round="10" :closeable="true">
<view class="popup-container">
<view class="popup-title">宠物服务时间列表</view>
<view class="service-list">
<view class="service-item" v-for="(service, index) in serviceList" :key="index">
<view class="service-date">{{ service.serviceDate }}</view>
<view class="service-products">
<view class="product-item" v-for="(product, pIndex) in service.products" :key="pIndex">
<view class="product-name">{{ product.productName }}</view>
<view class="product-price">{{ product.salePrice }}</view>
<view class="pet-list">
<!-- 宠物列表循环 -->
<view class="pet-item" v-for="(pet, petIndex) in petList" :key="pet.id">
<view class="pet-info">
<up-image class="pet-avatar" width="50px" height="50px" :src="pet.photo" shape="circle"></up-image>
<view class="pet-details">
<view class="pet-name">{{ pet.name }}</view>
<view class="pet-breed">{{ pet.breed }} {{ pet.bodyType }}</view>
</view>
</view>
<!-- 该宠物的服务时间列表 -->
<view class="service-list">
<view class="service-item" v-for="(service, index) in pet.services" :key="index">
<view class="service-header">
<view class="service-date">{{ service.serviceDate }}</view>
<view class="service-time">{{ getServiceTimeText(service.expectServiceTime) }}</view>
</view>
<view class="service-products">
<view class="product-item" v-for="(product, pIndex) in service.products" :key="pIndex">
<view class="product-name">{{ product.productName }}</view>
<!-- <view class="product-price">{{ product.salePrice }}</view> -->
</view>
</view>
<view class="service-footer">
<up-button
type="primary"
text="打卡"
@click="handleClock(service)"
shape="circle"
size="mini"
style="height: 60rpx;"
color="#FFAA48"></up-button>
</view>
</view>
</view>
</view>
@ -32,31 +59,72 @@ const props = defineProps({
});
const emit = defineEmits(['close']);
const serviceList = ref([]);
const petList = ref([]);
//
const close = () => {
emit('close');
};
//
//
const getServiceTimeText = (timeCode) => {
const timeMap = {
'MORNING': '早上',
'AFTERNOON': '下午',
'EVENING': '晚上'
};
return timeMap[timeCode] || '未指定';
};
//
const handleClock = (service) => {
if (!props.orderData || !service) return;
let url = `/otherPages/myOrdersManage/clock/index?id=${props.orderData.orderId}&itemID=${props.orderData.id}&serviceId=${service.id}`
if(service){
}
uni.navigateTo({
url,
});
};
//
const processOrderData = (orderData) => {
if (!orderData || !orderData.h5OrderVO) return [];
const { orderServiceList, orderItemList } = orderData.h5OrderVO;
if (!orderServiceList || !orderItemList) return [];
const { orderServiceList, orderItemList, petVOList } = orderData.h5OrderVO;
if (!orderServiceList || !orderItemList || !petVOList) return [];
// ID
const petMap = {};
//
petVOList.forEach(pet => {
petMap[pet.id] = {
...pet,
services: []
};
});
//
// ID
const serviceMap = {};
//
// ID
orderServiceList.forEach(service => {
const serviceId = service.id;
const petId = service.petId;
const serviceDate = service.serviceDate;
const expectServiceTime = service.expectServiceTime;
if (!serviceMap[serviceId]) {
serviceMap[serviceId] = {
id: serviceId,
petId,
serviceDate,
expectServiceTime,
products: []
};
}
@ -76,14 +144,26 @@ const processOrderData = (orderData) => {
}
});
//
return Object.values(serviceMap);
//
Object.values(serviceMap).forEach(service => {
if (petMap[service.petId]) {
petMap[service.petId].services.push(service);
}
});
//
const result = Object.values(petMap);
result.forEach(pet => {
pet.services.sort((a, b) => new Date(a.serviceDate) - new Date(b.serviceDate));
});
return result;
};
// orderData
//
const updateServiceList = () => {
if (props.orderData && props.orderData.h5OrderVO) {
serviceList.value = processOrderData(props.orderData);
petList.value = processOrderData(props.orderData);
}
};
@ -107,23 +187,70 @@ defineExpose({
margin-bottom: 30rpx;
}
.pet-list {
.pet-item {
margin-bottom: 40rpx;
.pet-info {
display: flex;
align-items: center;
margin-bottom: 20rpx;
.pet-avatar {
flex-shrink: 0;
margin-right: 20rpx;
}
.pet-details {
.pet-name {
font-size: 28rpx;
font-weight: bold;
color: #333;
}
.pet-breed {
font-size: 24rpx;
color: #666;
margin-top: 6rpx;
}
}
}
}
}
.service-list {
.service-item {
margin-bottom: 30rpx;
margin-bottom: 20rpx;
background-color: #f8f8f8;
border-radius: 12rpx;
padding: 20rpx;
.service-date {
font-size: 28rpx;
font-weight: bold;
color: #333;
.service-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
padding-bottom: 10rpx;
border-bottom: 1px solid #eee;
.service-date {
font-size: 28rpx;
font-weight: bold;
color: #333;
}
.service-time {
font-size: 24rpx;
color: #666;
background-color: #f0f0f0;
padding: 4rpx 12rpx;
border-radius: 20rpx;
}
}
.service-products {
margin-bottom: 20rpx;
.product-item {
display: flex;
justify-content: space-between;
@ -140,6 +267,11 @@ defineExpose({
}
}
}
.service-footer {
display: flex;
justify-content: flex-end;
}
}
}
</style>

+ 49
- 28
pages/myOrdersManage/components/systemOrder.vue View File

@ -1,39 +1,41 @@
<template>
<up-list @scrolltolower="scrolltolower">
<up-list-item>
<view class="mb28 container-list-item" v-for="(item, index) in list" :key="item.id">
<view class="flex-between flex" style="background: #FFF4E5;padding: 22rpx 42rpx">
<view>{{ orderStatus[item.status] }}</view>
<view>本单酬劳
<text style="color: #FF530A">{{ item.orderGivePrice }}</text>
<view v-if="list && list.length > 0">
<view class="mb28 container-list-item" v-for="(item, index) in list" :key="item.id">
<view class="flex-between flex" style="background: #FFF4E5;padding: 22rpx 42rpx">
<view>{{ orderStatus[item.status] }}</view>
<view>本单酬劳
<text style="color: #FF530A">{{ item.orderGivePrice }}</text>
</view>
</view>
</view>
<view class="container-list">
<view class="flex-between flex mb28" v-for="(pet, index) in item.h5OrderVO.petVOList">
<up-image style="flex-shrink:0" class="mr20" width="70px" height="70px"
:src="pet.photo" shape="circle"></up-image>
<view>
<view class="font28 col3">服务天数: {{ pet.orderServiceText.length }} I {{ pet.orderServiceText.join(',') }}
<view class="container-list">
<view class="flex-between flex mb28" v-for="(pet, index) in item.h5OrderVO.petVOList">
<up-image style="flex-shrink:0" class="mr20" width="70px" height="70px"
:src="pet.photo" shape="circle"></up-image>
<view>
<view class="font28 col3">服务天数: {{ pet.orderServiceText.length }} I {{ pet.orderServiceText.join(',') }}
</view>
<view style="margin: 18rpx 0">期望上门时间</view>
<view>{{ pet.breed }}{{ pet.bodyType }} | {{ pet.productNameText.join('+') }}</view>
</view>
<view style="margin: 18rpx 0">期望上门时间</view>
<view>{{ pet.breed }}{{ pet.bodyType }} | {{ pet.productNameText.join('+') }}</view>
</view>
</view>
<view class="mb28 address">{{ item.address }}</view>
<view class="mb28" v-if="item.type == 0">订单为系统派发请确认订单信息后再抢单</view>
<view class="flex flex-between">
<up-button type="primary" :text="btnTexts[item.orderStatus]" @click="showServicePopup(item)" shape="circle"
class="mr20" color="#FFAA48"></up-button>
<up-button type="primary" text="宠物档案" @click="toPet(item)" shape="circle" class="mr20"
color="#FFAA48"></up-button>
<up-button type="primary" text="服务档案" @click="toService(item)" shape="circle"
color="#FFAA48"></up-button>
<view class="mb28 address">{{ item.address }}</view>
<view class="mb28" v-if="item.type == 0">订单为系统派发请确认订单信息后再抢单</view>
<view class="flex flex-between">
<up-button type="primary" :text="btnTexts[item.orderStatus]" @click="showServicePopup(item)" shape="circle"
class="mr20" color="#FFAA48"></up-button>
<up-button type="primary" text="宠物档案" @click="toPet(item)" shape="circle" class="mr20"
color="#FFAA48"></up-button>
<up-button type="primary" text="服务档案" @click="toService(item)" shape="circle"
color="#FFAA48"></up-button>
</view>
</view>
</view>
</view>
<view v-else class="empty-state">
<text class="empty-text">暂无订单数据</text>
</view>
</up-list-item>
</up-list>
@ -95,7 +97,7 @@ import PetServicePopup from './petServicePopup.vue';
function showServicePopup(item) {
//
// if (item.orderStatus === 2) {
return toClock(item);
// return toClock(item);
// }
//
@ -130,4 +132,23 @@ import PetServicePopup from './petServicePopup.vue';
<style scoped lang="scss">
@import "../index";
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40rpx;
}
.empty-image {
width: 200rpx;
height: 200rpx;
margin-bottom: 20rpx;
}
.empty-text {
color: #999;
font-size: 28rpx;
}
</style>

+ 0
- 958
pages/myOrdersManage/components/testData.json View File

@ -1,958 +0,0 @@
{
"msg": "我的订单数据列表",
"code": 200,
"data": {
"total": 2,
"rows": [{
"id": 65,
"createTime": "2025-04-09 21:48:16",
"createBy": null,
"updateTime": "2025-04-14 21:01:28",
"updateBy": null,
"payTime": null,
"status": 1,
"num": null,
"price": 456.28,
"address": "上海市上海市长宁区江苏北路105弄小区5号楼503",
"type": "0",
"reason": null,
"userId": 1744109632960,
"userIdJson": null,
"petId": null,
"orderId": 6158437407770624,
"orderSn": "250123-6158437407770624",
"h5OrderVO": {
"orderId": 6158437407770624,
"payId": 6158437407770625,
"orderSn": "250123-6158437407770624",
"memberId": 40,
"totalAmount": 456.28,
"payAmount": 456.28,
"status": 3,
"aftersaleStatus": 1,
"orderItemList": [{
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437408278528,
"orderId": 6158437407770624,
"orderServiceId": 6158437407901696,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437408901120,
"orderId": 6158437407770624,
"orderServiceId": 6158437408540672,
"productId": 68,
"outProductId": "204",
"skuId": 410,
"outSkuId": "20401",
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/15c037a63146da44d397c3ecf66ac342ec毛发梳理@3x.png",
"productName": "毛发梳理",
"salePrice": 15.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 78,
"spData": "{\"版本\":\"通用\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437409130496,
"orderId": 6158437407770624,
"orderServiceId": 6158437408540672,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437410621440,
"orderId": 6158437407770624,
"orderServiceId": 6158437409916928,
"productId": 67,
"outProductId": "203",
"skuId": 407,
"outSkuId": "2031",
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/103f9df8607139449881e320f15b218d88陪玩@3x.png",
"productName": "陪玩",
"salePrice": 20.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 78,
"spData": "{\"时间\":\"15min\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437410981888,
"orderId": 6158437407770624,
"orderServiceId": 6158437409916928,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437412292608,
"orderId": 6158437407770624,
"orderServiceId": 6158437411702784,
"productId": 68,
"outProductId": "204",
"skuId": 410,
"outSkuId": "20401",
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/15c037a63146da44d397c3ecf66ac342ec毛发梳理@3x.png",
"productName": "毛发梳理",
"salePrice": 15.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 78,
"spData": "{\"版本\":\"通用\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437412587520,
"orderId": 6158437407770624,
"orderServiceId": 6158437411702784,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437413521408,
"orderId": 6158437407770624,
"orderServiceId": 6158437413095424,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437414176768,
"orderId": 6158437407770624,
"orderServiceId": 6158437413783552,
"productId": 68,
"outProductId": "204",
"skuId": 410,
"outSkuId": "20401",
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/15c037a63146da44d397c3ecf66ac342ec毛发梳理@3x.png",
"productName": "毛发梳理",
"salePrice": 15.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 78,
"spData": "{\"版本\":\"通用\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437414389760,
"orderId": 6158437407770624,
"orderServiceId": 6158437413783552,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437416028160,
"orderId": 6158437407770624,
"orderServiceId": 6158437415454720,
"productId": 67,
"outProductId": "203",
"skuId": 407,
"outSkuId": "2031",
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/103f9df8607139449881e320f15b218d88陪玩@3x.png",
"productName": "陪玩",
"salePrice": 20.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 78,
"spData": "{\"时间\":\"15min\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437416339456,
"orderId": 6158437407770624,
"orderServiceId": 6158437415454720,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}],
"orderServiceList": [{
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437415454720,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-31",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": {
"createBy": null,
"createTime": null,
"updateBy": null,
"updateTime": "2025-01-23 10:03:47",
"id": 69,
"name": "lulu",
"petType": "cat",
"gender": "女生",
"birthDate": null,
"remark": null,
"photo": "https://cdn.catmdogd.com/2025/01/1161c3c8198b4b4b81b39aa5abca194a68tmp_810ff2b601f3c6f93548a09a1c13b483.jpg",
"breed": "金渐层",
"bodyType": "小型(<10 KG)",
"personality": ["比较顽皮"],
"vaccineStatus": "每年都免疫",
"sterilization": null,
"dewormingStatus": "有驱虫史",
"doglicenseStatus": null,
"healthStatus": ["身体健康,无异常"],
"owner": "40"
},
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437413783552,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-30",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": null,
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437413095424,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-29",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": null,
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437411702784,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-28",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": null,
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437409916928,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-27",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": null,
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437408540672,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-26",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": null,
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437407901696,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-25",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "EVENING",
"feedCount": null,
"petVo": null,
"pets": null
}],
"service": null,
"note": null,
"deliverySn": "12345678",
"createTime": "2025-01-23 20:22:11",
"paymentTime": "2025-01-23 20:22:16",
"receiverName": "郑巧",
"receiverPhone": "15154177708",
"receiverProvince": "上海市",
"receiverCity": "上海市",
"receiverDistrict": "长宁区",
"receiverDetailAddress": "江苏北路105弄小区5号楼503",
"timeToPay": null,
"staffId": null,
"petVOList": [{
"createBy": null,
"createTime": null,
"updateBy": null,
"updateTime": "2025-01-23 10:03:47",
"id": 69,
"name": "lulu",
"petType": "cat",
"gender": "女生",
"birthDate": null,
"remark": null,
"photo": "https://cdn.catmdogd.com/2025/01/1161c3c8198b4b4b81b39aa5abca194a68tmp_810ff2b601f3c6f93548a09a1c13b483.jpg",
"breed": "金渐层",
"bodyType": "小型(<10 KG)",
"personality": ["比较顽皮"],
"vaccineStatus": "每年都免疫",
"sterilization": null,
"dewormingStatus": "有驱虫史",
"doglicenseStatus": null,
"healthStatus": ["身体健康,无异常"],
"owner": "40"
}]
},
"managerOrderDetailVO": null,
"startTime": "2025-04-14 21:01:28",
"name": "胡立永",
"phone": "13055015802",
"orderStatus": 0,
"orderGiveProportion": 0.75,
"orderGivePrice": 342.21,
"isDate": 1,
"isAddress": 1,
"isPet": 1
}, {
"id": 68,
"createTime": "2025-04-09 21:48:16",
"createBy": null,
"updateTime": "2025-04-15 14:40:35",
"updateBy": null,
"payTime": null,
"status": 1,
"num": null,
"price": 456.28,
"address": "上海市上海市长宁区江苏北路105弄小区5号楼503",
"type": "0",
"reason": null,
"userId": 1744109632960,
"userIdJson": null,
"petId": null,
"orderId": 6158437407770624,
"orderSn": "250123-6158437407770624",
"h5OrderVO": {
"orderId": 6158437407770624,
"payId": 6158437407770625,
"orderSn": "250123-6158437407770624",
"memberId": 40,
"totalAmount": 456.28,
"payAmount": 456.28,
"status": 3,
"aftersaleStatus": 1,
"orderItemList": [{
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437408278528,
"orderId": 6158437407770624,
"orderServiceId": 6158437407901696,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437408901120,
"orderId": 6158437407770624,
"orderServiceId": 6158437408540672,
"productId": 68,
"outProductId": "204",
"skuId": 410,
"outSkuId": "20401",
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/15c037a63146da44d397c3ecf66ac342ec毛发梳理@3x.png",
"productName": "毛发梳理",
"salePrice": 15.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 78,
"spData": "{\"版本\":\"通用\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437409130496,
"orderId": 6158437407770624,
"orderServiceId": 6158437408540672,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437410621440,
"orderId": 6158437407770624,
"orderServiceId": 6158437409916928,
"productId": 67,
"outProductId": "203",
"skuId": 407,
"outSkuId": "2031",
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/103f9df8607139449881e320f15b218d88陪玩@3x.png",
"productName": "陪玩",
"salePrice": 20.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 78,
"spData": "{\"时间\":\"15min\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437410981888,
"orderId": 6158437407770624,
"orderServiceId": 6158437409916928,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437412292608,
"orderId": 6158437407770624,
"orderServiceId": 6158437411702784,
"productId": 68,
"outProductId": "204",
"skuId": 410,
"outSkuId": "20401",
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/15c037a63146da44d397c3ecf66ac342ec毛发梳理@3x.png",
"productName": "毛发梳理",
"salePrice": 15.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 78,
"spData": "{\"版本\":\"通用\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437412587520,
"orderId": 6158437407770624,
"orderServiceId": 6158437411702784,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437413521408,
"orderId": 6158437407770624,
"orderServiceId": 6158437413095424,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437414176768,
"orderId": 6158437407770624,
"orderServiceId": 6158437413783552,
"productId": 68,
"outProductId": "204",
"skuId": 410,
"outSkuId": "20401",
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/15c037a63146da44d397c3ecf66ac342ec毛发梳理@3x.png",
"productName": "毛发梳理",
"salePrice": 15.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 78,
"spData": "{\"版本\":\"通用\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437414389760,
"orderId": 6158437407770624,
"orderServiceId": 6158437413783552,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437416028160,
"orderId": 6158437407770624,
"orderServiceId": 6158437415454720,
"productId": 67,
"outProductId": "203",
"skuId": 407,
"outSkuId": "2031",
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/103f9df8607139449881e320f15b218d88陪玩@3x.png",
"productName": "陪玩",
"salePrice": 20.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 78,
"spData": "{\"时间\":\"15min\"}"
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437416339456,
"orderId": 6158437407770624,
"orderServiceId": 6158437415454720,
"productId": 63,
"outProductId": "P001",
"skuId": 404,
"outSkuId": null,
"productSnapshotId": null,
"skuSnapshotId": null,
"pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png",
"productName": "专业遛狗",
"salePrice": 75.00,
"purchasePrice": null,
"quantity": 1,
"productCategoryId": 76,
"spData": "{\"时间\":\"60\"}"
}],
"orderServiceList": [{
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437415454720,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-31",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": {
"createBy": null,
"createTime": null,
"updateBy": null,
"updateTime": "2025-01-23 10:03:47",
"id": 69,
"name": "lulu",
"petType": "cat",
"gender": "女生",
"birthDate": null,
"remark": null,
"photo": "https://cdn.catmdogd.com/2025/01/1161c3c8198b4b4b81b39aa5abca194a68tmp_810ff2b601f3c6f93548a09a1c13b483.jpg",
"breed": "金渐层",
"bodyType": "小型(<10 KG)",
"personality": ["比较顽皮"],
"vaccineStatus": "每年都免疫",
"sterilization": null,
"dewormingStatus": "有驱虫史",
"doglicenseStatus": null,
"healthStatus": ["身体健康,无异常"],
"owner": "40"
},
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437413783552,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-30",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": null,
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437413095424,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-29",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": null,
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437411702784,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-28",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": null,
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437409916928,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-27",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": null,
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437408540672,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-26",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "AFTERNOON",
"feedCount": null,
"petVo": null,
"pets": null
}, {
"createBy": 40,
"createTime": "2025-01-23 20:22:11",
"updateBy": null,
"updateTime": null,
"id": 6158437407901696,
"orderId": 6158437407770624,
"pet": null,
"serviceFrequency": null,
"serviceDate": "2025-01-25",
"serviceTimeFirst": null,
"serviceTimeSecond": null,
"delFlag": 0,
"petId": 69,
"expectServiceTime": "EVENING",
"feedCount": null,
"petVo": null,
"pets": null
}],
"service": null,
"note": null,
"deliverySn": "12345678",
"createTime": "2025-01-23 20:22:11",
"paymentTime": "2025-01-23 20:22:16",
"receiverName": "郑巧",
"receiverPhone": "15154177708",
"receiverProvince": "上海市",
"receiverCity": "上海市",
"receiverDistrict": "长宁区",
"receiverDetailAddress": "江苏北路105弄小区5号楼503",
"timeToPay": null,
"staffId": null,
"petVOList": [{
"createBy": null,
"createTime": null,
"updateBy": null,
"updateTime": "2025-01-23 10:03:47",
"id": 69,
"name": "lulu",
"petType": "cat",
"gender": "女生",
"birthDate": null,
"remark": null,
"photo": "https://cdn.catmdogd.com/2025/01/1161c3c8198b4b4b81b39aa5abca194a68tmp_810ff2b601f3c6f93548a09a1c13b483.jpg",
"breed": "金渐层",
"bodyType": "小型(<10 KG)",
"personality": ["比较顽皮"],
"vaccineStatus": "每年都免疫",
"sterilization": null,
"dewormingStatus": "有驱虫史",
"doglicenseStatus": null,
"healthStatus": ["身体健康,无异常"],
"owner": "40"
}]
},
"managerOrderDetailVO": null,
"startTime": "2025-04-15 14:40:34",
"name": "胡立永",
"phone": "13055015802",
"orderStatus": 0,
"orderGiveProportion": 0.75,
"orderGivePrice": 342.21,
"isDate": 1,
"isAddress": 1,
"isPet": 1
}],
"code": 200,
"msg": "查询成功"
}
}

+ 173
- 72
pages/myOrdersManage/components/timelineService.vue View File

@ -6,25 +6,33 @@
<view class="date-box-color" :style="{'background-color': getTopBgColor()}"></view>
<view class="date-month-day">{{ formatDate(date).month }}-{{ formatDate(date).day }}</view>
</view>
<view class="status-tag" :class="{'status-tag-pending': status === 'pending'}">
<view class="status-tag" :class="{'status-tag-pending': status}">
<image src="/static/images/ydd/icon1.png" mode="aspectFit" class="status-icon"></image>
{{ status === 'pending' ? '待上门' : '已完成' }}{{ orderCount }}
{{ status ? '待上门' : '已完成' }}{{ orderCount }}
</view>
</view>
<!-- 空状态显示 -->
<view v-if="!processedList || processedList.length === 0" class="empty-state">
<text class="empty-text">暂无订单数据</text>
</view>
<!-- 时间线主体 -->
<view class="timeline-body" v-for="(item, index) in list">
<view class="timeline-line" :class="{'timeline-line-completed': status === 'completed'}"></view>
<view v-else class="timeline-body" v-for="(item, index) in processedList" :key="index">
<view class="timeline-line"></view>
<view class="time-point">
<view class="time-icon">
<image src="/static/images/ydd/icon1.png" mode="aspectFit" class="time-image"></image>
<image src="/static/images/order/address.png" mode="aspectFit" class="time-image"></image>
</view>
<view class="time-text">{{ item.address }}</view>
<view class="collapse-icon" @click="toggleServiceCard(index)">
{{ serviceCardCollapsed[index] ? '展开' : '收起' }} <text class="arrow" :class="{'arrow-up': !serviceCardCollapsed[index]}"></text>
</view>
</view>
<!-- 服务内容卡片 -->
<view class="service-card">
<view v-if="!serviceCardCollapsed[index]" class="service-card">
<!-- 服务日期 -->
<view class="service-section">
<view class="section-title">
@ -41,14 +49,14 @@
<view class="section-title">
<view class="title-indicator"></view>
<text>陪伴对象</text>
<view class="collapse-icon" @click="togglePetList">
收起 <text class="arrow" :class="{'arrow-up': !petListCollapsed}"></text>
<view class="collapse-icon" @click="togglePetList(index)">
{{ petListCollapsed[index] ? '展开' : '收起' }} <text class="arrow" :class="{'arrow-up': !petListCollapsed[index]}"></text>
</view>
</view>
<view class="section-content pet-list" v-if="!petListCollapsed">
<view class="section-content pet-list" v-if="!petListCollapsed[index]">
<view v-for="(pet, i) in item.petList" :key="i" class="pet-item">
<view class="pet-avatar">
<image :src="pet.avatar || '/static/images/ydd/dog.png'" mode="aspectFill" class="avatar-image"></image>
<image :src="pet.avatar" mode="aspectFill" class="avatar-image"></image>
</view>
<view class="pet-info">
<view class="pet-name">
@ -78,9 +86,9 @@
<!-- 操作按钮 -->
<view class="action-buttons">
<view class="btn btn-clock" @click="handleClock">打卡</view>
<view class="btn btn-clock" @click="handlePetFile">宠物档案</view>
<view class="btn btn-clock" @click="handleServiceFile">服务档案</view>
<view class="btn btn-clock" @click="handleClock(item)">打卡</view>
<view class="btn btn-clock" @click="handlePetFile(item)">宠物档案</view>
<view class="btn btn-clock" @click="handleServiceFile(item)">服务档案</view>
</view>
</view>
</view>
@ -102,47 +110,41 @@
default: 2
},
status : {
type: String,
default: 'pending'
type: Boolean,
default: true
},
current: {
type: Number,
default: 0
},
list: {
type: Array,
default: () => [
{
id: 1,
orderId: 1,
address: '广东省深圳市南山区',
addressDetail: '科技南二路111号',
fullDate : '2024-12-08 10:00',
petList : [
{
name: '小汪',
gender: 'male',
breed: '中华田园犬',
bodyType: '(小型犬)',
services: ['专业喂养', '提前熟悉', '陪玩'],
avatar: '/static/images/ydd/dog.png'
},
{
name: 'Billion',
gender: 'female',
breed: '豹猫',
bodyType: '(小型猫)',
services: ['上门喂养', '陪玩'],
avatar: '/static/images/ydd/cat.png'
}
]
}
]
default: () => []
}
});
//
const petListCollapsed = ref(false);
// - 使
const petListCollapsed = ref([]);
// - 使
const serviceCardCollapsed = ref([]);
//
const togglePetList = () => {
petListCollapsed.value = !petListCollapsed.value;
const togglePetList = (index) => {
if (petListCollapsed.value[index] === undefined) {
petListCollapsed.value[index] = true;
} else {
petListCollapsed.value[index] = !petListCollapsed.value[index];
}
};
//
const toggleServiceCard = (index) => {
if (serviceCardCollapsed.value[index] === undefined) {
serviceCardCollapsed.value[index] = true;
} else {
serviceCardCollapsed.value[index] = !serviceCardCollapsed.value[index];
}
};
//
@ -154,38 +156,88 @@
};
};
//
const fullDate = computed(() => {
const date = new Date(props.date);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}${month}${day}`;
//
const processedList = computed(() => {
return props.list.map(order => {
//
const petList = [];
let orderId = 0
let serviceId = 0
if (order.appletOrderItemDate && order.appletOrderItemDate.length > 0) {
order.appletOrderItemDate.forEach(item => {
if (item.orderServiceList && item.orderServiceList.petVo) {
const pet = item.orderServiceList.petVo;
const services = [];
//
if (item.orderItemList && item.orderItemList.length > 0) {
item.orderItemList.forEach(orderItem => {
services.push(orderItem.productName);
orderId = orderItem.orderId
});
}
serviceId = item.orderServiceList.id,
petList.push({
name: pet.name,
serviceId : item.orderServiceList.id,
gender: pet.gender === '男生' ? 'male' : 'female',
breed: pet.breed,
bodyType: `(${pet.bodyType})`,
services: services,
avatar: pet.photo || (pet.petType === 'dog' ? '/static/images/ydd/dog.png' : '/static/images/ydd/cat.png')
});
}
});
}
return {
id: order.id,
orderId,
serviceId,
address: order.cityAddress,
addressDetail: order.address,
fullDate: props.date.replace(/-/g, '/'),
petList: petList
};
});
});
//
const handleClock = (id) => {
//
const paths = [`/otherPages/orderTakingManage/detail/index?id=${id}`,'/otherPages/myOrdersManage/clock/index','/otherPages/myOrdersManage/clock/detail']
const handleClock = (item) => {
//
const paths = [
`/otherPages/myOrdersManage/clock/index?id=${item.orderId}&itemID=${item.id}&serviceId=${item.serviceId}`,
`/otherPages/myOrdersManage/clock/index?isRead=true&id=${item.orderId}&itemID=${item.id}`,
];
uni.navigateTo({
url: paths[props.current]
})
url: props.status ? paths[0] : paths[1]
});
};
const handlePetFile = () => {
//
const handlePetFile = (item) => {
uni.navigateTo({
url: "/otherPages/orderTakingManage/pet/index"
})
url: "/otherPages/orderTakingManage/pet/index?id=" + item.orderId
});
};
const handleServiceFile = () => {
const handleServiceFile = (item) => {
uni.navigateTo({
url: "/otherPages/myOrdersManage/service/index"
})
url: "/otherPages/myOrdersManage/service/index?id=" + item.orderId
});
};
function getTopBgColor(){
return '#FFAA48'
return props.status ? '#FFAA48' : '#4CD964';
}
</script>
@ -195,10 +247,30 @@
padding: 20rpx;
margin-bottom: 30rpx;
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80rpx 40rpx;
.empty-image {
width: 200rpx;
height: 200rpx;
margin-bottom: 20rpx;
}
.empty-text {
color: #999;
font-size: 28rpx;
}
}
.date-header {
display: flex;
align-items: center;
margin-bottom: 20rpx;
.date-box {
width: 80rpx;
@ -306,20 +378,32 @@
.timeline-body {
position: relative;
padding-left: 40rpx;
padding-bottom: 40rpx;
.timeline-line {
position: absolute;
left: 40rpx;
top: 0;
height: 100%;
width: 2rpx;
background-color: #FFAA48;
width: 0;
border-left: 2rpx dashed #707070;
border-left-style: dashed;
border-image: repeating-linear-gradient(to bottom, #707070 0, #707070 8rpx, transparent 8rpx, transparent 20rpx) 1;
z-index: 0;
&::after{
content: '';
display: block;
position: absolute;
width: 8rpx;
height: 8rpx;
background-color: #000;
border: 2rpx solid #707070;
border-radius: 50%;
left: -7rpx;
top: 30rpx;
}
}
.timeline-line-completed {
background-color: #4CD964;
}
.time-point {
display: flex;
@ -338,7 +422,7 @@
align-items: center;
margin-right: 20rpx;
position: relative;
left: -20rpx;
left: 20rpx;
.time-image {
width: 40rpx;
@ -349,6 +433,23 @@
.time-text {
font-size: 28rpx;
color: #333;
margin-left: 20rpx;
flex: 1;
}
.collapse-icon {
font-size: 24rpx;
color: #999;
padding: 0 20rpx;
.arrow {
transition: transform 0.3s;
display: inline-block;
}
.arrow-up {
transform: rotate(180deg);
}
}
}


+ 3123
- 0
pages/myOrdersManage/dateOrder.json
File diff suppressed because it is too large
View File


+ 123
- 30
pages/myOrdersManage/index.vue View File

@ -2,8 +2,8 @@
<view>
<view class="header-buts flex flex-center">
<view class="flex buts-box">
<view class="buts" :class="{'buts-active':activeIndex===1}" @click="activeIndex=1">总订单</view>
<view class="buts" :class="{'buts-active':activeIndex===2}" @click="activeIndex=2">日订单</view>
<view class="buts" :class="{'buts-active':activeIndex===1}" @click="clickTab(1)">总订单</view>
<view class="buts" :class="{'buts-active':activeIndex===2}" @click="clickTab(2)">日订单</view>
</view>
</view>
@ -34,13 +34,32 @@
</up-sticky>
<view class="container">
<systemOrder :list="list" :current="current" v-if="activeIndex == 1" />
<!-- 加载中状态 -->
<view v-if="loading" class="loading-container">
<up-loading-icon size="36" mode="circle" color="#FFAA48"></up-loading-icon>
<text class="loading-text">加载中...</text>
</view>
<!-- 总订单内容 -->
<systemOrder :list="list" :current="current" v-else-if="activeIndex == 1" />
<!-- 日订单内容 -->
<view v-else>
<timelineService
v-for="(item,index) in 10"
:key="index"
/>
<view v-if="dateOrderList && dateOrderList.length > 0">
<timelineService
v-for="(item,index) in dateOrderList"
:key="index"
:date="item.serviceDate"
:orderCount="item.num"
:status="current === 0"
:list="item.orderList"
:current="current"
/>
</view>
<view v-else class="empty-state">
<image src="/static/images/ydd/empty.png" mode="aspectFit" class="empty-image"></image>
<text class="empty-text">暂无订单数据</text>
</view>
</view>
<!-- <orderListByData :list="list" v-else /> -->
@ -58,7 +77,8 @@
import orderListByData from "./components/orderListByData.vue";
import timelineService from "./components/timelineService.vue";
import {
onShow
onShow,
onLoad,
} from "@dcloudio/uni-app"
import {
getLoginStatus
@ -68,6 +88,9 @@
import {
myList
} from "@/api/receivingHall/index.js"
import {
getOrderDateList
} from "@/api/order/order.js"
import {
useStore
} from "vuex"
@ -81,6 +104,8 @@ import { getOrderServiceText, getProductNameText } from '@/utils/serviceTime.js'
const current = ref(0)
const activeIndex = ref(1)
const list = ref([])
const dateOrderList = ref([])
const loading = ref(false) // loading
const store = useStore();
const userInfo = computed(() => {
@ -122,30 +147,65 @@ import { getOrderServiceText, getProductNameText } from '@/utils/serviceTime.js'
])
function getList() {
myList({
orderStatus: current.value,
userId: userInfo.value.userId
})
.then(res => {
if (res.code == 200) {
list.value = res.data.rows
if(activeIndex.value == 0){
tabList2[current.value].badge.value = res.data.total
}else{
tabList1[current.value].badge.value = res.data.total
}
list.value.forEach(item => {
item.h5OrderVO.petVOList.forEach(pet => {
pet.orderServiceText = getOrderServiceText(pet.id, item.h5OrderVO.orderServiceList)
pet.productNameText = getProductNameText(pet.id, item.h5OrderVO.orderItemList, item.h5OrderVO.orderServiceList)
})
})
}
})
loading.value = true; //
let index = current.value;
if (activeIndex.value == 1) {
myList({
orderStatus: index,
userId: userInfo.value.userId
})
.then(res => {
if (res.code == 200) {
list.value = res.data.rows
tabList1[index].badge.value = res.data.total
list.value.forEach(item => {
item.h5OrderVO.petVOList.forEach(pet => {
pet.orderServiceText = getOrderServiceText(pet.id, item.h5OrderVO.orderServiceList)
pet.productNameText = getProductNameText(pet.id, item.h5OrderVO.orderItemList, item.h5OrderVO.orderServiceList)
})
})
}
})
.finally(() => {
if(activeIndex.value == 1){
loading.value = false; //
}
})
}else{
dateOrderList.value = []
getOrderDateList({
status: index,
userId: userInfo.value.userId
})
.then(res => {
if (res.code == 200) {
dateOrderList.value = res.data
//
let totalOrders = 0;
dateOrderList.value.forEach(item => {
totalOrders += item.num || 0;
});
tabList2[index].badge.value = totalOrders;
}
})
.finally(() => {
if(activeIndex.value == 2){
loading.value = false; //
}
})
}
}
function clickTab(index) {
current.value = 0;
activeIndex.value = index;
getList();
}
const classIfyClickTab = (item) => {
current.value = item.index;
getList();
@ -154,4 +214,37 @@ import { getOrderServiceText, getProductNameText } from '@/utils/serviceTime.js'
<style scoped lang="scss">
@import "index.scss";
.loading-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40rpx;
.loading-text {
margin-top: 20rpx;
color: #999;
font-size: 28rpx;
}
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80rpx 40rpx;
.empty-image {
width: 200rpx;
height: 200rpx;
margin-bottom: 20rpx;
}
.empty-text {
color: #999;
font-size: 28rpx;
}
}
</style>

+ 18
- 2
pages/orderTakingManage/components/list.vue View File

@ -38,15 +38,17 @@
</view>
<view class="btm">
<view class="mb28 address" style="font-size: 26rpx;">{{ item.address }}</view>
<view class="mb28" style="padding-left: 20rpx;font-size: 26rpx;"
v-if="item.type == 0">订单为系统派发请确认订单信息后再抢单</view>
<view class="flex flex-between" v-if="current != 2">
<view class="flex flex-between" v-if="item.status != 2">
<up-button @click="unableToAcceptOrder(item.id)" text="无法接单" shape="circle" plain
class="mr20"></up-button>
<up-button @click="toOrderDetail(item.id)" type="primary" text="查看详情后接单" shape="circle"
color="#FFAA48"></up-button>
</view>
<view class="flex flex-between" v-if="current == 2">
<view class="flex flex-between" v-if="item.status == 2">
<!-- <up-button @click="unableToAcceptOrder(item.id)" text="无法接单" shape="circle" plain
class="mr20"></up-button> -->
<up-button @click="toOrderDetail(item.id)" type="primary" text="查看派单详情" shape="circle"
@ -99,6 +101,18 @@ const userInfo = computed(() => {
return store.getters.userInfo
})
const partnerMaster = computed(() => {
const { userHh } = userInfo.value
if (!userHh) {
return ''
}
const key = `partner_${LEVEL_AND_KEY_FIELDS_MAPPING[userHh]}`
return configList.value?.[key]?.paramValueImage
})
const scrolltolower = () => {
}
@ -118,6 +132,7 @@ const emits = defineEmits(['update']);
//
const toOrderDetail = (id) => {
console.log(userInfo.userBcs);
uni.navigateTo({
url: `/otherPages/orderTakingManage/detail/index?id=${id}`
});
@ -144,6 +159,7 @@ const close = () => {
showCause.value = false;
}
//
const noneOrder = async () => {
if (!id.value || !userInfo.value.userId) return


+ 1
- 1
pages/userManage/index.scss View File

@ -26,7 +26,7 @@
}
.header-money{
position: absolute;
bottom: -150rpx;
bottom: -180rpx;
color: #333333;
width: 100%;
&-list{


BIN
static/images/order/address.png View File

Before After
Width: 37  |  Height: 41  |  Size: 1.8 KiB

Loading…
Cancel
Save