Commit 481248dc authored by 刘用法's avatar 刘用法
parents 49decbe4 089094d2
...@@ -302,6 +302,10 @@ ...@@ -302,6 +302,10 @@
/deep/ button[plain] { /deep/ button[plain] {
border: none; border: none;
} }
button[disabled]:not([type]) {
background: #d1d4d4;
color: #ffffff;
}
} }
} }
</style> </style>
...@@ -52,9 +52,11 @@ ...@@ -52,9 +52,11 @@
<text>x{{ order.orderProductCount }}</text> <text>x{{ order.orderProductCount }}</text>
</view> </view>
<view class="order-cell between-cell"> <view class="order-cell between-cell">
<text>充电桩信息:</text>
<text class="cell-title">充电桩信息:</text> <text class="cell-title">充电桩信息:</text>
<text>{{ order.serviceContent }}</text> <text>{{ order.serviceContent }}</text>
</view> </view>
<!-- <view class="order-cell between-cell">
<!-- <view class="order-cell between-cell"> <!-- <view class="order-cell between-cell">
<text>备注:</text> <text>备注:</text>
<text>{{ order.serviceContent }}</text> <text>{{ order.serviceContent }}</text>
...@@ -130,8 +132,6 @@ ...@@ -130,8 +132,6 @@
</u-count-down> </u-count-down>
</view> </view>
</view> </view>
</view> </view>
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件--> <!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view class="right"> <view class="right">
...@@ -212,7 +212,8 @@ ...@@ -212,7 +212,8 @@
isAllowDianhuaAndDaohang : false, isAllowDianhuaAndDaohang : false,
appointmentDatetimeRange:'', appointmentDatetimeRange:'',
appointmentDatetime:'', appointmentDatetime:'',
signDistance:3000 signDistance:3000,
num:0
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -220,8 +221,6 @@ ...@@ -220,8 +221,6 @@
console.log("option", option) console.log("option", option)
if (option && option.id) { if (option && option.id) {
this.orderId = option.id this.orderId = option.id
} else {
// 异常处理
} }
this.loadOrderDetail() this.loadOrderDetail()
this.loadOrderRecord() this.loadOrderRecord()
...@@ -236,7 +235,6 @@ ...@@ -236,7 +235,6 @@
}else{ }else{
return process.uniEnv.qn_base_url + 'dianhua-0.png' return process.uniEnv.qn_base_url + 'dianhua-0.png'
} }
}, },
navigationIcon() { navigationIcon() {
//self-support/icon/daohang-0@2x.png //self-support/icon/daohang-0@2x.png
...@@ -245,7 +243,6 @@ ...@@ -245,7 +243,6 @@
}else{ }else{
return process.uniEnv.qn_base_url + 'daohang-0.png' return process.uniEnv.qn_base_url + 'daohang-0.png'
} }
}, },
centerButtonClass() { centerButtonClass() {
let btnClass = "appoint-btn" let btnClass = "appoint-btn"
...@@ -336,7 +333,6 @@ ...@@ -336,7 +333,6 @@
}; };
self.$u.api.orderDetail(data, self.orderId).then((res) => { self.$u.api.orderDetail(data, self.orderId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log("===", res.data)
self.order = res.data self.order = res.data
this.getCurrentBtn() this.getCurrentBtn()
if(self.order.isFirstOrder){ if(self.order.isFirstOrder){
...@@ -362,7 +358,6 @@ ...@@ -362,7 +358,6 @@
}; };
self.$u.api.listOrderRecord(param).then((res) => { self.$u.api.listOrderRecord(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
self.orderRecords = res.data self.orderRecords = res.data
} else { } else {
console.log(res.message, "获取订单详情失败!"); console.log(res.message, "获取订单详情失败!");
...@@ -371,39 +366,55 @@ ...@@ -371,39 +366,55 @@
}, },
weekChange(data){ weekChange(data){
// 点击下一周 // 点击下一周
console.log(data,'weekChange') console.log(data,'week-data')
if (data && data.time) { if (data && data.time) {
let num = data.num let num = data.num
let time = data.time let time = data.time
this.num = num
if (num == 0) { if (num == 0) {
this.dateList = [ this.loadCalendar()
{day: time, timeRange: []},
{day: time + (1*86400000), timeRange: []},
{day: time + (2*86400000), timeRange: []},
{day: time + (3*86400000), timeRange: []},
{day: time + (4*86400000), timeRange: []},
{day: time + (5*86400000), timeRange: []},
{day: time + (6*86400000), timeRange: []},
]
} else { } else {
this.dateList = [ this.loadCalendar()
{day: time, timeRange: []},
{day: time + (1*86400000), timeRange: []},
{day: time + (2*86400000), timeRange: []},
{day: time + (3*86400000), timeRange: []},
{day: time + (4*86400000), timeRange: []},
{day: time + (5*86400000), timeRange: []},
]
} }
} }
},/* 加载日历数据 */
async loadCalendar() {
let self = this
let params = {
num: this.num
}
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'
}
},
/* 加载预约时间段 */
async loadTimerange() {
let self = this
let res = await this.$u.api.openTimerange()
if(res && res.code == 200) {
let list = res.data
list.map((item, index) => {
item.disabled = false
})
self.timeList = list
}
}, },
dateChange(data){ dateChange(data){
// 点击日期选择 // 点击日期选择
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) => {
if(data.item.timeRange.indexOf(item.pkey) > -1) {
item.disabled = true
} else {
item.disabled = false
}
})
}, },
timeChange(data){ timeChange(data){
// 时间段选择变化 // 时间段选择变化
...@@ -624,7 +635,7 @@ ...@@ -624,7 +635,7 @@
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.order-wrap { .order-wrap {
width: 750rpx; width: 750rpx;
height: 100vh; height: 100vh;
...@@ -756,6 +767,7 @@ ...@@ -756,6 +767,7 @@
.order-item-more { .order-item-more {
font-size: 26rpx; font-size: 26rpx;
color: #333333; color: #333333;
text-align: right;
.line-view { .line-view {
background-color: #F4F5F7; background-color: #F4F5F7;
height: 2rpx; height: 2rpx;
...@@ -945,7 +957,7 @@ ...@@ -945,7 +957,7 @@
color: #333333; color: #333333;
line-height: 48rpx; line-height: 48rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
text-align: right;
} }
.between-cell { .between-cell {
......
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