Commit a5847e36 authored by 郭晓清's avatar 郭晓清

详情页面数据交互调整

parent 99704795
......@@ -89,7 +89,7 @@
</view>
</view>
</view>
<view v-if="orderRecords.length > showLenght">
<view v-if="orderRecords && orderRecords.length > showLenght">
<view v-if="readMoreRecord" @click="readMoreRecord = false" class="read-more-toggle">
<u-icon name="arrow-down"></u-icon>
<text class="read-more-text">查看更多</text>
......@@ -251,7 +251,7 @@
return btnClass
},
shwoOrderRecords() {
if (this.readMoreRecord) {
if (this.readMoreRecord && this.orderRecords && this.orderRecords.length>0) {
return this.orderRecords.slice(0, 5)
} else {
return this.orderRecords
......@@ -338,6 +338,7 @@
self.order = res.data
this.getCurrentBtn()
if(self.order.isFirstOrder){
this.visibale = true
}
} else {
console.log(res.message, "获取订单详情失败!");
......@@ -388,7 +389,6 @@
let res = await this.$u.api.workerCalendar(params)
if(res && res.code == 200) {
self.dateList = res.data
self.dateList[1].timeRange[0]='appointment_range_8'
}
},
......@@ -405,9 +405,9 @@
}
},
dateChange(data){
this.loadTimerange()
// 点击日期选择
console.log(data,'dateChange')
this.loadCalendar()
let self = this
self.appointmentDatetime = data.item.day
self.timeList.map((item, index) => {
......@@ -492,12 +492,12 @@
}
}else if (this.submitType === 'maintainWorkerCheckin') { // 签到
// 检查见到距离是否符合
if(!this.isErrorSign){
if(this.getDistance(this.order.contactAddressLatitud,this.order.contactAddressLongitud)>3){
this.commonToast('签到失败,请点击异常签到处理或联系客服','error')
return
}
}
// if(!this.isErrorSign){
// if(this.getDistance(this.order.contactAddressLatitud,this.order.contactAddressLongitud)>3){
// this.commonToast('签到失败,请点击异常签到处理或联系客服','error')
// return
// }
// }
data.exception = this.isErrorSign
data.coordinate = this.dataValue ? this.dataValue[0]+','+this.dataValue[1]:''
data.url = this.errorSignUrl?this.errorSignUrl:''
......@@ -623,9 +623,9 @@
},
handleClick(){
this.visibale = false
// 去完工
// 交互规范
uni.navigateTo({
url: 'pages/photo/list'
url: 'pages/learn/index'
})
}
}
......
......@@ -250,23 +250,23 @@
// 获取订单数量
getOrderCount() {
// 加载订单列表
this.$u.api.listOrderCount().then((res) => {
var self = this; // 加载订单列表
self.$u.api.listOrderCount().then((res) => {
if (res.code == 200) {
console.log("===", res.data)
if (res.data) {
var count = 0
this.list.forEach(item => {
self.list.forEach(item => {
if (item.name === '待预约') {
item.total = res.data.toAppointmentCount
item.count = res.data.toAppointmentCount
} else if (item.name === '待签到') {
item.total = res.data.toCheckinCount
item.count = res.data.toCheckinCount
} else if (item.name === '待完工') {
item.total = res.data.toFinishCount
item.count = res.data.toFinishCount
} else if (item.name === '审核中') {
item.total = res.data.reviewingCount
item.count = res.data.reviewingCount
} else if (item.name === '异常单') {
item.total = res.data.exceptionCount
item.count = res.data.exceptionCount
}
})
var count = 0
......@@ -290,11 +290,28 @@
})
},
handleClick(item) {
if(item.orderStatus===86 || item.orderStatus===88){
this.filish(item)
return
}
console.log('click cell')
this.viewOderItem(item.orderId)
},
filish(item){
// 去完工
uni.navigateTo({
url: 'pages/order/complete?orderId='+item.orderId
+ "&categoryId=" + item.categoryId
+ "&orderServiceType=" + item.orderServiceType
+ "&inGuaranteePeriod=" + item.inGuaranteePeriod
})
},
handleAction(item) {
console.log('click button')
if(item.orderStatus===86 || item.orderStatus===88){
this.filish(item)
return
}
this.viewOderItem(item.orderId)
},
handleClickSearch() {
......
......@@ -82,17 +82,12 @@
if (e && e.brandId) {
this.brandId = e.brandId
}
uni.setNavigationBarTitle({
title: "郭小清"
});
// if (e && e.brand) {
// this.brand = e.brand!==undefined?e.brand:"郭小清"
// uni.setNavigationBarTitle({
// title: this.brand
// });
// }
if (e && e.brand) {
this.brand = decodeURIComponent(e.brand)
uni.setNavigationBarTitle({
title: this.brand
});
}
if (e && e.orderId) {
this.orderId = e.orderId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment