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

详情页面数据交互调整

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