瀏覽代碼

整改基本完成

Huanyi 15 小時之前
父節點
當前提交
b1c3d8b695

+ 1 - 0
package.json

@@ -8,6 +8,7 @@
   "type": "module",
   "scripts": {
     "dev": "vite serve --mode development",
+    "test": "vite serve --mode test",
     "prod": "vite serve --mode production",
     "build:prod": "vite build --mode production",
     "build:test": "vite build --mode test",

+ 1 - 1
src/components/CustomerDetailDrawer/index.vue

@@ -288,6 +288,7 @@ onMounted(() => {
 .name-row {
   display: flex;
   align-items: center;
+  gap: 12px;
 }
 
 .name {
@@ -297,7 +298,6 @@ onMounted(() => {
 }
 
 .phone {
-  margin-left: 10px;
   color: #666;
 }
 

+ 6 - 1
src/components/ImageUpload/index.vue

@@ -93,6 +93,11 @@ const props = defineProps({
   canDelete: {
     type: Boolean,
     default: true
+  },
+  // 是否在删除时发送请求
+  isDelete: {
+    type: Boolean,
+    default: true
   }
 });
 
@@ -215,7 +220,7 @@ const handleDelete = (file: any, isRequest = true): boolean => {
   if (findex > -1 && uploadList.value.length === number.value) {
     const ossId = fileList.value[findex].ossId;
     // 如果有 ossId 则逻辑上删除(实际调用后端接口删除物理文件取决于后端实现或需求)
-    if (ossId && isRequest) {
+    if (ossId && isRequest && props.isDelete) {
       delOss(ossId);
     }
     fileList.value.splice(findex, 1);

+ 2 - 1
src/components/PetDetailDrawer/index.vue

@@ -36,7 +36,7 @@
 
         <div class="section-title" style="margin-top: 20px">家庭信息</div>
         <el-descriptions :column="2" border>
-          <el-descriptions-item label="到家时间">{{ currentPet.arrivalTime || '-' }}</el-descriptions-item>
+          <el-descriptions-item label="到家时间">{{ currentPet.arrivalTime ? proxy.parseTime(currentPet.arrivalTime, '{y}-{m}-{d}') : '-' }}</el-descriptions-item>
           <el-descriptions-item label="房屋类型">
             <dict-tag :options="sys_house_type" :value="currentPet.houseType" />
           </el-descriptions-item>
@@ -268,6 +268,7 @@ onMounted(() => {
   font-size: 20px;
   font-weight: bold;
   color: #303133;
+  margin-right: 12px;
 }
 
 .section-title {

+ 1 - 1
src/views/archieves/customer/index.vue

@@ -73,7 +73,7 @@
             />
           </template>
         </el-table-column>
-<!--        <el-table-column prop="remark" label="备注" show-overflow-tooltip />-->
+        <el-table-column prop="remark" label="备注" show-overflow-tooltip min-width="150" />
         <el-table-column label="操作" width="200" align="center">
           <template #default="scope">
             <el-button link type="primary" size="small" @click="handleDetail(scope.row)" v-hasPermi="['archieves:customer:query']">详情</el-button>

+ 3 - 3
src/views/fulfiller/level/index.vue

@@ -99,10 +99,10 @@
               <el-input v-model="levelDialog.form.name" placeholder="请输入等级名称" />
             </el-form-item>
             <el-form-item label="等级图标">
-              <image-upload v-model="levelDialog.form.icon" :limit="1" />
+              <image-upload v-model="levelDialog.form.icon" :limit="1" :is-delete="false" />
             </el-form-item>
             <el-form-item label="背景图片">
-              <image-upload v-model="levelDialog.form.background" :limit="1" />
+              <image-upload v-model="levelDialog.form.background" :limit="1" :is-delete="false" />
             </el-form-item>
             <el-form-item label="节假日加成">
               <el-input-number v-model="levelDialog.form.holidayBonus" :min="0" :precision="2" :step="0.1" />
@@ -182,7 +182,7 @@
           <el-input v-model="rightDialog.form.name" placeholder="请输入权益名称" />
         </el-form-item>
         <el-form-item label="权益图标" required prop="icon">
-          <image-upload v-model="rightDialog.form.icon" :limit="1" />
+          <image-upload v-model="rightDialog.form.icon" :limit="1" :is-delete="false" />
         </el-form-item>
         <el-form-item label="权益状态">
           <el-switch v-model="rightDialog.form.status" active-text="启用" inactive-text="停用" />

+ 2 - 2
src/views/fulfiller/pool/index.vue

@@ -62,7 +62,7 @@
                     {{ getLevelText(scope.row.levelName) }}
                   </el-tag>
                 </div>
-                <div class="sub-text">{{ scope.row.age }}岁 | {{ scope.row.phone }}</div>
+                <div class="sub-text">{{ scope.row.phone }}</div>
               </div>
             </div>
           </template>
@@ -175,7 +175,7 @@
               <span class="user-name">{{ currentItem.name }}</span>
               <el-tag size="small" :type="currentItem.gender === '0' ? '' : 'danger'" effect="plain" round
                 style="margin-left: 8px;">
-                {{ currentItem.gender === '0' ? '男' : '女' }} {{ currentItem.age }}岁
+                {{ currentItem.gender === '0' ? '男' : '女' }}
               </el-tag>
               <span class="status-badge" :class="currentItem.status">{{ getStatusText(currentItem.status) }}</span>
             </div>

+ 10 - 7
src/views/order/orderList/components/OrderDetailDrawer.vue

@@ -84,8 +84,6 @@
                                 <div class="b-tags">
                                     <el-tag size="small" type="info">{{ order.petAge || '-' }}</el-tag>
                                     <el-tag size="small" type="info">{{ order.petWeight || '-' }}</el-tag>
-                                    <el-tag size="small" type="info">{{ order.petAge || '-' }}</el-tag>
-                                    <el-tag size="small" type="info">{{ order.petWeight || '-' }}</el-tag>
                                 </div>
                             </div>
                         </div>
@@ -94,8 +92,6 @@
                                 }}</el-descriptions-item>
                             <el-descriptions-item label="疫苗状态"><span style="color:#67c23a">{{ order.petVaccine || '-'
                                     }}</span></el-descriptions-item>
-                            <el-descriptions-item label="性格特点">{{ order.petCharacter || '-' }}</el-descriptions-item>
-                            <el-descriptions-item label="健康状况">{{ order.petHealth || '-' }}</el-descriptions-item>
                             <el-descriptions-item label="性格特点">{{ order.petPersonality || order.petCharacter || '-'
                                 }}</el-descriptions-item>
                             <el-descriptions-item label="健康状况">{{ order.petHealth || '-' }}</el-descriptions-item>
@@ -558,6 +554,9 @@ const loadPetAndCustomer = async (order) => {
                 if (orderRes.data.price != null) {
                     next.fulfillerFee = (orderRes.data.price / 100).toFixed(2)
                 }
+                if (orderRes.data.orderCommission != null) {
+                    next.orderCommission = (orderRes.data.orderCommission / 100).toFixed(2)
+                }
             }
         } catch (e) {
             console.error('获取订单详细信息失败', e)
@@ -569,9 +568,10 @@ const loadPetAndCustomer = async (order) => {
         try {
             const res = await getPet(petId)
             const pet = res?.data
+            console.log('Web管理端 - 宠物详情:', pet)
             if (pet) {
                 next.petName = pet.name ?? next.petName
-                next.petAvatar = pet.avatarUrl ?? next.petAvatar
+                next.petAvatar = pet.avatarUrl || pet.avatar || next.petAvatar
                 next.petGender = pet.gender ?? next.petGender
                 next.petAge = (pet.age !== undefined && pet.age !== null) ? `${pet.age}岁` : next.petAge
                 next.petWeight = (pet.weight !== undefined && pet.weight !== null) ? `${pet.weight}kg` : next.petWeight
@@ -580,7 +580,7 @@ const loadPetAndCustomer = async (order) => {
                     ? (Number(pet.isSterilized) === 1)
                     : next.petSterilized
                 next.petVaccine = pet.vaccineStatus ?? next.petVaccine
-                next.petPersonality = pet.personality ?? next.petPersonality
+                next.petPersonality = (pet.cutePersonality || pet.personality) ?? next.petPersonality
                 next.petHealth = pet.healthStatus ?? next.petHealth
             }
         } catch {
@@ -592,9 +592,10 @@ const loadPetAndCustomer = async (order) => {
         try {
             const res = await getCustomer(customerId)
             const customer = res?.data
+            console.log('Web管理端 - 客户详情:', customer)
             if (customer) {
                 next.userName = customer.name ?? next.userName
-                next.userAvatar = customer.avatarUrl ?? next.userAvatar
+                next.userAvatar = customer.avatarUrl || customer.avatar || next.userAvatar
                 next.contactPhone = customer.phone ?? next.contactPhone
                 next.city = customer.areaName ?? next.city
                 next.address = customer.address ?? next.address
@@ -608,7 +609,9 @@ const loadPetAndCustomer = async (order) => {
         try {
             const fRes = await getFulfiller(fulfillerId)
             const fulfiller = fRes?.data
+            console.log('Web管理端 - 履约者详情:', fulfiller)
             if (fulfiller) {
+                next.fulfillerAvatar = fulfiller.avatarUrl || fulfiller.avatar || next.fulfillerAvatar
                 next.fulfillerStation = fulfiller.stationName ?? next.fulfillerStation
                 next.fulfillerLevelName = fulfiller.levelName ?? next.fulfillerLevelName
             }

+ 1 - 1
src/views/order/purchase/index.vue

@@ -51,7 +51,7 @@
                 <div class="pet-select-row">
                   <div v-for="p in currentPets" :key="p.id" class="pet-card" :class="{ active: form.petId === p.id }"
                     @click="form.petId = p.id">
-                    <el-avatar :size="48" :src="p.avatar" shape="square" style="border-radius: 6px;">{{ p.name.charAt(0)
+                    <el-avatar :size="48" :src="p.avatarUrl || p.avatar" shape="square" style="border-radius: 6px;">{{ p.name.charAt(0)
                     }}</el-avatar>
                     <div class="pet-info">
                       <div class="name">{{ p.name }}</div>

+ 3 - 4
src/views/system/store/index.vue

@@ -595,13 +595,12 @@ const handleUpdate = async (row: StoreVO) => {
   const res = await getStore(row.id);
   Object.assign(form.value, res.data);
 
-  // 确保 services 为字数组类型,避免由于类型不匹配(如字符串或字符串数组)导致 el-checkbox-group 无法匹配和选中
+  // 确保 services 为字符串数组类型,避免由于类型不匹配导致 el-checkbox-group 无法匹配和选中
   if (form.value.services) {
     if (typeof form.value.services === 'string') {
-      form.value.services = (form.value.services as string).split(',').filter(v => v !== '').map(Number);
-    } else if (Array.isArray(form.value.services)) {
-      form.value.services = form.value.services.map(Number);
+      form.value.services = (form.value.services as string).split(',').filter(v => v !== '');
     }
+    // 保持原始字符串类型,不使用 Number() 强制转换
   } else {
     form.value.services = [];
   }

+ 1 - 1
src/views/systemConfig/platform/index.vue

@@ -29,7 +29,7 @@ import CustomerConfig from './components/CustomerConfig.vue';
 const activeSubTab = ref('order');
 
 const subTabs = [
-  { label: '订单配置', key: 'order' },
+  // { label: '订单配置', key: 'order' },
   { label: '地图key配置', key: 'map' },
   { label: '客服配置', key: 'customer' }
 ];