diff --git a/otherPages/orderTakingManage/detail/index.vue b/otherPages/orderTakingManage/detail/index.vue
index 998b71a..23ad55d 100644
--- a/otherPages/orderTakingManage/detail/index.vue
+++ b/otherPages/orderTakingManage/detail/index.vue
@@ -6,29 +6,31 @@
本单客户支付金额
- ¥ 45
+ ¥ {{ orderDetail.order?.h5OrderVO?.payAmount }}
X
您的分成比例
- 20%
+
+ {{ orderDetail.pet_payment_bcs[userInfo.userBcsRole - 1].paramValueText }}
=
本单酬劳
- ¥ 9
+ ¥ {{ orderDetail.pet_payment_bcs[userInfo.userBcsRole - 1].paramValueNo * orderDetail.order?.h5OrderVO?.payAmount }}
- 订单为系统派发,请确认订单信息后再抢单
+
+ {{ typeInfo[orderDetail.order.type].content }}
- 系统派单
+ {{ typeInfo[orderDetail.order.type].title }}
@@ -41,8 +43,8 @@
服务日期
-
- 12-0,12-08
+
+ {{ getTextList() }}
@@ -68,31 +70,31 @@
-
+
-
+
- {{ pet.nickName }}
+ {{ pet.breed }}
- {{ pet.type }}
+ {{ pet.type }}{{ pet.bodyType }}
-
- 12-14
- 专业喂养
+
+ {{ it.time }}
+ {{ it.name }}
上门1次
-
+
@@ -101,7 +103,7 @@
合计
- ¥ {{ orderDetail.order?.price }}
+ ¥ {{ orderDetail.order?.payAmount }}
@@ -116,7 +118,7 @@
订单编号:
- fe34521532513256
+ {{ orderDetail.order.id }}
@@ -263,6 +265,8 @@
import {
useStore
} from "vuex"
+
+ import dayjs from "dayjs";
onLoad((options) => {
orderId.value = options.id || null;
@@ -289,6 +293,21 @@
const rushToBuyAnOrder = () => {
open()
}
+
+ const typeInfo = [
+ {
+ title : '系统派单',
+ content : '订单为系统派发,请确认订单信息后再抢单',
+ },
+ {
+ title : '个人订单',
+ content : '订单为系统派发,请确认订单信息后再抢单',
+ },
+ {
+ title : '流失订单',
+ content : '订单为系统派发,请确认订单信息后再抢单',
+ },
+ ]
// 查看宠物信息
const petInfo = () => {
@@ -334,13 +353,58 @@
});
if (response.code == 200 && response.data) {
orderDetail.value = response.data;
+ orderDetail.value.order.h5OrderVO.petVOList.forEach(pet => {
+
+ pet.productNameText = getProductNameText(pet.id, orderDetail.value.order.h5OrderVO.orderItemList,
+ orderDetail.value.order.h5OrderVO.orderServiceList)
+ })
}
}
+
+ function getOrderServiceText(petId, orderServiceList){
+
+ let YYYY = undefined
+
+ return orderServiceList
+ .filter(service => service.petId == petId)//过滤
+ .map(service => dayjs(service.serviceDate))//转成时间
+ .sort((a, b) => a.valueOf() - b.valueOf())//排序
+ .map((service, i) => {
+ // if(YYYY && YYYY.format('YYYY-MM') == service.format('YYYY-MM')){
+ // return service.format('DD')
+ // }
+ // if(YYYY && YYYY.format('YYYY') == service.format('YYYY')){
+ // return service.format('MM-DD')
+ // }
+ // YYYY = service
+ return service.format('MM-DD')
+ })
+ }
+ function getProductNameText(petId, productList, orderServiceList){
+
+ let orderService = orderServiceList.filter(service => service.petId == petId)
+
+ 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,
+ }
+ })
+ }
+
+ function getTextList(){
+ return orderDetail.value.order?.h5OrderVO
+ .orderServiceList.map(item =>
+ dayjs(item.serviceDate).format('MM-DD')).join(',')
+ }
\ No newline at end of file
diff --git a/pages/orderTakingManage/index.vue b/pages/orderTakingManage/index.vue
index cc1aee8..72620f3 100644
--- a/pages/orderTakingManage/index.vue
+++ b/pages/orderTakingManage/index.vue
@@ -79,6 +79,8 @@ import dayjs from "dayjs";
if (response.code == 200 && response.data) {
orderlist.value = response.data.rows;
+ list[current.value].badge.value = response.data.total
+
orderlist.value.forEach(item => {
item.h5OrderVO.petVOList.forEach(pet => {
pet.orderServiceText = getOrderServiceText(pet.id, item.h5OrderVO.orderServiceList)
@@ -97,14 +99,14 @@ import dayjs from "dayjs";
.map(service => dayjs(service.serviceDate))//转成时间
.sort((a, b) => a.valueOf() - b.valueOf())//排序
.map((service, i) => {
- if(YYYY && YYYY.format('YYYY-MM') == service.format('YYYY-MM')){
- return service.format('DD')
- }
- if(YYYY && YYYY.format('YYYY') == service.format('YYYY')){
- return service.format('MM-DD')
- }
- YYYY = service
- return service.format('YYYY-MM-DD')
+ // if(YYYY && YYYY.format('YYYY-MM') == service.format('YYYY-MM')){
+ // return service.format('DD')
+ // }
+ // if(YYYY && YYYY.format('YYYY') == service.format('YYYY')){
+ // return service.format('MM-DD')
+ // }
+ // YYYY = service
+ return service.format('MM-DD')
})
}
function getProductNameText(petId, productList, orderServiceList){
diff --git a/utils/getUrl.js b/utils/getUrl.js
index 7932bbd..06456b1 100644
--- a/utils/getUrl.js
+++ b/utils/getUrl.js
@@ -3,7 +3,7 @@ const accountInfo = wx.getAccountInfoSync();
current = accountInfo.miniProgram.envVersion;
const api = {
- develop:"http://h5.xzaiyp.top/prod-api",
+ develop:"http://h5.xzaiyp.top",
// develop: "http://youyi-test.natapp1.cc/prod-api", // 开发
trial: "https://pet-admin.hhlm1688.com/prod-api", //测试
release: "https://pet-admin.hhlm1688.com/api/prod-api", // 线上