Browse Source

refactor: 优化订单管理页面样式和功能

- 调整 `orderTakingManage/detail/index.scss` 中的字体大小和对齐方式
- 修改 `getUrl.js` 中的开发环境 API 地址
- 统一 `orderTakingManage/pet/detail.vue` 中图标大小单位
- 优化 `orderTakingManage/detail/index.vue` 的布局和样式
- 添加 `orderTakingManage/components/list.vue` 中的点击事件和文本格式化
- 在 `myOrdersManage/components/systemOrder.vue` 中添加订单详情跳转功能
master
前端-胡立永 2 months ago
parent
commit
e5efc54e7e
7 changed files with 71 additions and 26 deletions
  1. +1
    -1
      manifest.json
  2. +2
    -1
      otherPages/orderTakingManage/detail/index.scss
  3. +13
    -7
      otherPages/orderTakingManage/detail/index.vue
  4. +2
    -2
      otherPages/orderTakingManage/pet/detail.vue
  5. +37
    -10
      pages/myOrdersManage/components/systemOrder.vue
  6. +14
    -3
      pages/orderTakingManage/components/list.vue
  7. +2
    -2
      utils/getUrl.js

+ 1
- 1
manifest.json View File

@ -1,6 +1,6 @@
{
"name" : "uni-vuu3",
"appid" : "__UNI__08423D1",
"appid" : "__UNI__197A38F",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",


+ 2
- 1
otherPages/orderTakingManage/detail/index.scss View File

@ -78,8 +78,10 @@
display: flex;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
.time-content{
width: 500rpx;
text-align: right;
}
}
@ -139,7 +141,6 @@
width: 35rpx;
height: 35rpx;
border-radius: 35rpx;
background-color: red;
margin-left: 15rpx;
}


+ 13
- 7
otherPages/orderTakingManage/detail/index.vue View File

@ -34,7 +34,8 @@
{{ typeInfo[orderDetail.order.type].title }}
</view>
</view>
<view class="information box-size" :style="{ borderRadius: '16rpx' }">
<view class="information box-size" style="border-radius: 15rpx;
padding-bottom: 30rpx;">
<view class="form-title">
基本信息
</view>
@ -78,20 +79,22 @@
<view class="img" :style="{borderRadius:'100rpx'}">
<image :src="pet.photo" mode=""></image>
</view>
<view >
<view>
<view class="flex name">
<view class="name_text">
{{ pet.breed }}
</view>
<image src="" mode=""></image>
<image :src="pet.gender == '男生' ? 'https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/personal/pet/sex_m.png':
'https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/personal/pet/sex_f.png'" mode=""></image>
</view>
{{ pet.type }}{{ pet.bodyType }}
</view>
</view>
<view class="pet-level" v-for="(it, i) in pet.productNameText">
{{ it.time }}
<view class="pet-level" v-for="(it, i) in pet.productNameText"
:key="i" style="margin: 4rpx 0;">
<text style="color: #999;padding-right: 20rpx">{{ it.time }}</text>
<text>{{ it.name }}</text>
上门1次
<text style="color: #999;padding-left: 20rpx">上门1次</text>
</view>
<!-- <view class="pet-level">
12-15
@ -146,7 +149,7 @@
</view>
</view>
</view>
<view class="bottom">
<view class="bottom" v-if="pathType != 'my'">
<view @click="rushToBuyAnOrder" class="bottom_button level" :style="{ borderRadius: '41rpx' }">
立即抢单
</view>
@ -276,12 +279,15 @@
onLoad((options) => {
orderId.value = options.id || null;
pathType.value = options.type || ''
});
onShow(() => {
getDetail();
})
const pathType = ref('')
const store = useStore();
const orderId = ref(null);
const orderDetail = ref({});


+ 2
- 2
otherPages/orderTakingManage/pet/detail.vue View File

@ -147,10 +147,10 @@
<view class="container_item level" v-for="(value, index) in healthData"
:key="index">
<view class="icon" :style="{borderRadius:'30rpx'}" v-if="petInfo.healthStatus.includes(value)">
<up-icon name="checkbox-mark" color="#FFFFFF" size="40"></up-icon>
<up-icon name="checkbox-mark" color="#FFFFFF" size="40rpx"></up-icon>
</view>
<view class="icon_" :style="{borderRadius:'30rpx'}" v-else>
<up-icon name="checkbox-mark" color="#FFFFFF" size="40"></up-icon>
<up-icon name="checkbox-mark" color="#FFFFFF" size="40rpx"></up-icon>
</view>
{{ value }}
</view>


+ 37
- 10
pages/myOrdersManage/components/systemOrder.vue View File

@ -2,7 +2,10 @@
<up-list @scrolltolower="scrolltolower">
<up-list-item>
<view v-if="list && list.length > 0">
<view class="mb28 container-list-item" v-for="(item, index) in list" :key="item.id">
<view class="mb28 container-list-item"
@click.stop="toOrderDetail(item.id)"
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>本单酬劳
@ -10,24 +13,41 @@
</view>
</view>
<view class="container-list">
<view class="flex-between flex mb28" v-for="(pet, index) in item.h5OrderVO.petVOList">
<view class="flex-between flex mb28"
:key="index"
style="justify-content: flex-start;"
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 style="display: flex;flex-direction: column;gap: 20rpx;">
<!-- <view class="font28 col3">服务天数: {{ pet.orderServiceText.length }} I {{ pet.orderServiceText.join(',') }}
</view> -->
<view class="font28 col3">服务天数: {{ pet.orderServiceText.length }} I
{{ pet.orderServiceText.length >= 2 ? `${pet.orderServiceText[0]}${pet.orderServiceText[pet.orderServiceText.length - 1]}` : pet.orderServiceText.join(',') }}
</view>
<view style="margin: 18rpx 0">期望上门时间</view>
<view>{{ pet.breed }}{{ pet.bodyType }} | {{ pet.productNameText.join('+') }}</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="打卡记录" @click="showServicePopup(item)" shape="circle"
class="mr20" color="#FFAA48"></up-button>
<up-button type="primary" text="宠物档案" @click="toPet(item)" shape="circle" class="mr20"
<!-- <up-button type="primary" text="订单详情"
shape="circle"
class="mr20" color="#FFAA48"></up-button> -->
<up-button type="primary" text="打卡记录"
@click.stop="showServicePopup(item)"
shape="circle"
class="mr20" color="#FFAA48"></up-button>
<up-button type="primary" text="宠物档案"
@click.stop="toPet(item)" shape="circle" class="mr20"
color="#FFAA48"></up-button>
<up-button type="primary" text="服务档案" @click="toService(item)" shape="circle"
<up-button type="primary" text="服务档案"
@click.stop="toService(item)" shape="circle"
color="#FFAA48"></up-button>
</view>
</view>
@ -92,6 +112,13 @@ import PetServicePopup from './petServicePopup.vue';
})
}
//
const toOrderDetail = (id) => {
uni.navigateTo({
url: `/otherPages/orderTakingManage/detail/index?id=${id}&type=my`
});
}
//
function showServicePopup(item) {
//


+ 14
- 3
pages/orderTakingManage/components/list.vue View File

@ -11,11 +11,15 @@
</view>
</view>
<view class="container-list">
<view class="flex mb28" v-for="(pet, index) in item.h5OrderVO.petVOList">
<view class="flex mb28"
@click="toDetail(pet.id)"
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 class="font28 col3">服务天数: {{ pet.orderServiceText.length }} I
{{ pet.orderServiceText.length >= 2 ? `${pet.orderServiceText[0]}${pet.orderServiceText[pet.orderServiceText.length - 1]}` : pet.orderServiceText.join(',') }}
</view>
<!-- <view class="font28 col3">服务天数: {{ item.h5OrderVO.orderServiceList.length }} I
<text v-for="itemService in item.h5OrderVO.orderServiceList" :key="itemService.id">
@ -25,7 +29,7 @@
</view> -->
<!-- <view style="margin: 18rpx 0">期望上门时间{{itemService.expectServiceTime}}</view> -->
<view class="" style="margin-top: 10rpx;">{{ pet.breed }}({{ pet.bodyType }}) | {{ pet.productNameText.join('+') }}
<view class="" style="margin-top: 10rpx;">{{ pet.breed }}({{ pet.bodyType }}) | {{ pet.productNameText.join(',') }}
<!-- <text v-for="itemPet in item.h5OrderVO.orderItemList" :key="itemPet.id">
{{ itemPet.productName }}
@ -145,6 +149,13 @@ const cancel = () => {
}
const toDetail = (id) => {
uni.navigateTo({
url: `/otherPages/orderTakingManage/pet/detail?id=${id}`
})
}
function checkUserBcs(){
const { userBcs, userBcsRole } = userInfo.value


+ 2
- 2
utils/getUrl.js View File

@ -3,9 +3,9 @@ const accountInfo = wx.getAccountInfoSync();
current = accountInfo.miniProgram.envVersion;
const api = {
// develop:"http://h5.xzaiyp.top",
develop:"http://h5.xzaiyp.top",
// develop:"https://api.catmdogd.com/prod-api",
develop:"http://pet-admin.hhlm1688.com/api",
// develop:"http://pet-admin.hhlm1688.com/api",
// develop: "http://youyi-test.natapp1.cc/prod-api", // 开发
trial: "https://api.catmdogd.com/prod-api", //测试
release: "https://api.catmdogd.com/prod-api",


Loading…
Cancel
Save