Commit 8b91f718 authored by 李超鹏's avatar 李超鹏

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/common/api/order.js
parents 37caa8cc 4eee97a2
const UNI_APP = { const UNI_APP = {
ucenterUrl: { ucenterUrl: {
apiUrl: 'http://192.168.1.46', //php端域名请求头 apiUrl: 'http://rest-u.yunya.com', //php端域名请求头
xueUrl: 'http://192.168.1.46:8088', //学院 xueUrl: 'http://xue.yunya.com', //学院
// banshou: 'https://m.banshou.com', //扳手app // banshou: 'https://m.banshou.com', //扳手app
}, },
systemUrl: { systemUrl: {
apiUrl: 'http://192.168.1.22', //java端域名请求头 // apiUrl: 'http://192.168.1.22', //java端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头 apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
}, },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/' qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
} }
......
...@@ -7,7 +7,7 @@ let learnApiFun = function(vm){ ...@@ -7,7 +7,7 @@ let learnApiFun = function(vm){
let getTrainingNoticeList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/list', params); let getTrainingNoticeList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/list', params);
/* 获取学习视频基本信息 */ /* 获取学习视频基本信息 */
let CourseList = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/course-details?course_id=173',params); let CourseList = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/course-details',params);
/* 获取章节详情 */ /* 获取章节详情 */
let ChapterDetails = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/chapter-sections',params); let ChapterDetails = async (params = {}) => await vm.$u.get(collegeApiUrl+'/v1/chapter-sections',params);
/* 获取课程节信息*/ /* 获取课程节信息*/
......
import util from '@/utils/util.js' import util from '@/utils/util.js'
// 接口公共前缀
const prefix = '/wxh-worker-rest/rest/'
let orderApiFun = function(vm){ let orderApiFun = function(vm){
let listByRecommendOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/recommend/order', params); let listByRecommendOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/recommend/order', params);
/** /**
* 工单数量查询接口 * 工单数量查询接口
*/ */
let listOrderCount = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/wokerOrder/queryOrdersCount/V2', params); let listOrderCount = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/queryOrdersCount/V2', params);
/** /**
* 工单列表接口 wxh-worker-rest/rest/order/revision/{token}/list * 工单列表接口
*/ */
let listOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/list', params); let listOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/' + vm.vuex_token + '/list', params);
/** /**
* 获取师傅的预约日历 * 获取师傅的预约日历
*/ */
let workerCalendar = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/wokerOrder/appointment/calendar', params); let workerCalendar = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/appointment/calendar', params);
/** /**
* 师傅预约 * 师傅预约
*/ */
let workerAppointment = async (params = {}) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/'+ vm.vuex_token+'/order/{orderId}', params,{'content-type': 'application/x-www-form-urlencoded'}); let workerAppointment = async (params = {}) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/'+ vm.vuex_token+'/order/{orderId}', params,{'content-type': 'application/x-www-form-urlencoded'});
// 联系顾客时间更新接口,暂时没有 // 联系顾客时间更新接口,暂时没有
/** /**
* 师傅签到接口 * 师傅签到接口
*/ */
let maintainWorkerCheckin = async (params = {},orderId) => await vm.$u.post(prefix + '/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+orderId+'/maintainWorkerCheckin', params,{'content-type': 'application/x-www-form-urlencoded'}); let maintainWorkerCheckin = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token + '/order/'+orderId+'/maintainWorkerCheckin', params,{'content-type': 'application/x-www-form-urlencoded'});
/** /**
* 订单详情查询 * 订单详情查询
*/ */
let orderDetail = async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/'+orderId, params); let orderDetail = async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/'+orderId, params);
/* 过程反馈查询接口 */ /* 过程反馈查询接口 */
let feedbackConfig = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rst/order/v2/getFeedBack/' + vm.vuex_token, params) let feedbackConfig = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/v2/getFeedBack/' + vm.vuex_token, params)
/* 预约+过程反馈 接口 */ /* 预约+过程反馈 接口 */
let traceAndAppointment = async (params = {}, orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/' + vm.vuex_token + '/' + orderId, params) let traceAndAppointment = async (params = {}, orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/' + vm.vuex_token + `/${orderId}`, params)
/* 师傅拒单 */ /* 师傅拒单 */
let rejectOrder = async (params = {}, orderId) => await vm.$u.get('/wxh-worker-rest/rest/' + vm.vuex_token + '/order/' + orderId + '/workerReject/V2', params) let rejectOrder = async (params = {}, orderId) => await vm.$u.get(prefix + vm.vuex_token + `/order/${orderId}/workerReject/V2`, params)
/** /**
* 查询工单操作记录列表接口 * 查询工单操作记录列表接口
*/ */
let listOrderRecord = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/record/'+ vm.vuex_token+'/listOrderRecord/'+params.orderId, params); let listOrderRecord = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/record/'+ vm.vuex_token+'/listOrderRecord/'+params.orderId, params);
/** /**
* 接单 * 接单
*/ */
let orderAccept= async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+orderId+'/accept', params); let orderAccept = async (params = {},orderId) => await vm.$u.get(prefix + vm.vuex_token+'/order/'+orderId+'/accept', params);
/** /**
* 抢单 * 抢单
*/ */
let orderGan = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/revision/applets/'+ vm.vuex_token+'/order/acceptAppletsOrder', params,{'content-type': 'application/x-www-form-urlencoded'}); let orderGan = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/revision/applets/'+ vm.vuex_token+'/order/acceptAppletsOrder', params,{'content-type': 'application/x-www-form-urlencoded'});
/** /**
* 获取拍照标准 * 获取拍照标准
*/ */
let orderStandard = async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/photo/standard', params); let orderStandard = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token+'/photo/standard', params);
/** /**
* 保存图片信息 * 保存图片信息
*/ */
let saveImage = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+orderId+'/maintain/saveImage', params); let saveImage = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token + '/order/'+orderId+'/maintain/saveImage', params);
/** /**
* 获取师傅水印 or 默认水印 * 获取师傅水印 or 默认水印
*/ */
let getWatermark= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/photo/watermark', params); let getWatermark = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/photo/watermark', params);
/**
* 获取师傅开放可选时间段
*/
let openTimerange = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/appointment/timerange', params);
/**
* 联系时间接口
*/
let contactTime = async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/order/record/'+ vm.vuex_token+'/contact/'+orderId, params);
/**
* 检查是否可以拒单
*/
let checkRejectable = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/'+ vm.vuex_token+'/wokerOrder/checkRejectable', params);
/** /**
* 获取订单的完工项目(配置+数据) * 获取订单的完工项目(配置+数据)
*/ */
let getCompleteConfigAndData= async (orderId) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+ orderId +'/maintain/info'); let getCompleteConfigAndData= async (orderId) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+ orderId +'/maintain/info');
/** /**
* 查询措施 * 查询措施
*/ */
let getMeasure= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/service/'+ vm.vuex_token+'/measure/queryMeasureItems', params); let getMeasure= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/service/'+ vm.vuex_token+'/measure/queryMeasureItems', params);
/** /**
* 保存售后记录 * 保存售后记录
*/ */
let saveCompleteData = async (params = {},orderId) => await vm.$u.post('wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+ orderId +'/maintain/saveMaintainInfoV2', params); let saveCompleteData = async (params = {},orderId) => await vm.$u.post('wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+ orderId +'/maintain/saveMaintainInfoV2', params);
const orderApi = { const orderApi = {
listByRecommendOrder, listByRecommendOrder,
listOrderCount, listOrderCount,
...@@ -105,6 +123,9 @@ let orderApiFun = function(vm){ ...@@ -105,6 +123,9 @@ let orderApiFun = function(vm){
orderStandard, orderStandard,
saveImage, saveImage,
getWatermark, getWatermark,
openTimerange,
contactTime,
checkRejectable,
getCompleteConfigAndData, getCompleteConfigAndData,
getMeasure, getMeasure,
saveCompleteData saveCompleteData
...@@ -113,4 +134,4 @@ let orderApiFun = function(vm){ ...@@ -113,4 +134,4 @@ let orderApiFun = function(vm){
} }
module.exports = { module.exports = {
orderApiFun orderApiFun
} }
\ No newline at end of file
...@@ -39,7 +39,7 @@ let settledApiFun = function(vm){ ...@@ -39,7 +39,7 @@ let settledApiFun = function(vm){
let saveCourseRate = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/save-course-rate', params); let saveCourseRate = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/save-course-rate', params);
/* 获取消息内容列表 */ /* 获取消息内容列表 */
let listByNotice = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/list', params); let listByNotice = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/home-list', params);
const settledApi = { const settledApi = {
getSettleBaseInfo, getSettleBaseInfo,
......
...@@ -12,6 +12,7 @@ const globalUrl = process.uniEnv || {} ...@@ -12,6 +12,7 @@ const globalUrl = process.uniEnv || {}
const install = (Vue, vm) => { const install = (Vue, vm) => {
let systemApiUrl = globalUrl.systemUrl.apiUrl let systemApiUrl = globalUrl.systemUrl.apiUrl
let ucenterApiUrl = globalUrl.ucenterUrl.apiUrl let ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
let xueApiUrl = globalUrl.ucenterUrl.xueUrl
function toLoginPage(){ function toLoginPage(){
const app = getApp() const app = getApp()
...@@ -48,7 +49,7 @@ const install = (Vue, vm) => { ...@@ -48,7 +49,7 @@ const install = (Vue, vm) => {
config.url += '?access-token=' + token config.url += '?access-token=' + token
} }
} }
if(config.url.indexOf(ucenterApiUrl)>-1){ if(config.url.indexOf(ucenterApiUrl)>-1 || config.url.indexOf(xueApiUrl)>-1){
// php端增加header Authorization // php端增加header Authorization
config.header['Authorization'] = token config.header['Authorization'] = token
} }
......
<!-- 预约时间 --> <!-- 预约时间 -->
<template> <template>
<view :class="{'con-box':titleShow}"> <view :class="{'con-box':titleShow}">
<view class="title" v-if="titleShow">{{ '预约时间' }}</view> <view class="title" v-if="titleShow">{{ title }}</view>
<view class="u-m-t-40"> <view class="u-m-t-40">
<view class="appoint-box"> <view class="appoint-box">
<view class="select-date"> <view class="select-date">
<view class="u-flex u-row-between "> <view class="u-flex u-row-between ">
<view class="txt">选择日期</view> <view class="txt">选择日期:</view>
<view class="txt active">{{ dateList[currentDay].day }}</view> <view class="txt active">{{appointTime | datefmt('YYYY.MM.DD')}}</view>
</view> </view>
<view class="u-m-t-30 u-flex u-row-between date-list"> <view class="u-m-t-30 u-flex u-row-between date-list">
<view :class="{'date-item':true,'active':index===currentDay}" <view v-show="hasLast" class="last" @click="lastWeek(dateList[0],dateList)">
@click="dateChange(item,index,dateList)" v-for="(item,index) in dateList" :key="index"> <u-icon name="arrow-left" color="#2979ff" size="28"></u-icon>
<text class="day">{{item.weekDay}}</text>
<text class="day day1">{{item.day}}</text>
</view> </view>
<view class="next" @click="weekChange"> <view class="u-flex u-row-between date-box">
<view :class="{'date-item':true,'active':item.day===appointTime}"
@click="dateChange(item,index,dateList)" v-for="(item,index) in dateList" :key="index">
<text class="day">{{ item.day | datefmt('周dd')}}</text>
<text class="day day1">{{ item.day | datefmt('DD')}}</text>
</view>
</view>
<view class="next" @click="nextWeek(dateList[0],dateList)">
<u-icon name="arrow-right" color="#2979ff" size="28"></u-icon> <u-icon name="arrow-right" color="#2979ff" size="28"></u-icon>
</view> </view>
</view> </view>
...@@ -23,14 +28,18 @@ ...@@ -23,14 +28,18 @@
<!-- weekChange --> <!-- weekChange -->
<view class="select-time u-p-t-50"> <view class="select-time u-p-t-50">
<view class="u-flex u-row-between"> <view class="u-flex u-row-between">
<view class="txt">选择时间</view> <view class="txt">选择时间:</view>
<view class="txt active">{{ currentTimeTxt }}</view> <view class="txt active">{{ currentTimeTxt }}</view>
</view> </view>
<view class="u-p-t-30 u-flex u-flex-wrap time-list"> <view class="u-p-t-30 u-flex u-flex-wrap time-list">
<view @click="timeChange(item,index,timeList)" <view
:class="{'time-item':true,'active': (currentTime && index===currentTime)}" v-for="(item,index) in timeList" :class="{'time-item':true,'active': index===currentTime}" v-for="(item,index) in timeList"
:key="index"> :key="item.pkey">
<text class="time">{{item}}</text> <button class="time" :plain="true"
:disabled="item.disabled" :hair-line="false"
@click="timeChange(item,index,timeList)">
{{item.name}}
</button>
</view> </view>
</view> </view>
</view> </view>
...@@ -41,45 +50,72 @@ ...@@ -41,45 +50,72 @@
</template> </template>
<script> <script>
let now = Date.now()
export default { export default {
props: { props: {
titleShow: { titleShow: {
type: Boolean, type: Boolean,
default: true default: true
}, },
title: {
type: String,
default(){
return "预约时间"
}
},
dateList: {
type: Array,
default(){
return [
{day: now, timeRange: []},
{day: now + (1*86400000), timeRange: []},
{day: now + (2*86400000), timeRange: []},
{day: now + (3*86400000), timeRange: []},
{day: now + (4*86400000), timeRange: []},
{day: now + (5*86400000), timeRange: []},
{day: now + (6*86400000), timeRange: []},
]
}
},
timeList: {
type: Array,
default(){
return [
{"name":"06:00-08:00","pkey":"appointment_range_8","disabled":false},
{"name":"08:00-10:00","pkey":"appointment_range_10","disabled":false},
{"name":"10:00-12:00","pkey":"appointment_range_12","disabled":false},
{"name":"12:00-14:00","pkey":"appointment_range_14","disabled":false},
{"name":"14:00-16:00","pkey":"appointment_range_16","disabled":false},
{"name":"16:00-18:00","pkey":"appointment_range_18","disabled":false},
{"name":"18:00-20:00","pkey":"appointment_range_20","disabled":false},
{"name":"20:00-22:00","pkey":"appointment_range_22","disabled":false},
{"name":"22:00-24:00","pkey":"appointment_range_24","disabled":false}
]
}
},
}, },
data() { data() {
return { return {
currentDay: 0, currentDay: 0,
currentTime: null, currentTime: null,
dateList: [{ appointTime: Date.now(),
weekDay: '周三', appointRange: "",
day: '21', num: 0,
}, { hasLast: false
weekDay: '周四', }
day: '22', },
}, { watch: {
weekDay: '周五', title() {
day: '23', this.currentDay = 0
}, { this.appointTime = Date.now()
weekDay: '周六', this.currentTime = null
day: '24', this.appointRange = ""
}, {
weekDay: '周日',
day: '25',
}, {
weekDay: '周一',
day: '26',
}, ],
timeList: ['06:00-08:00', '08:00-10:00', '10:00-12:00', '12:00-14:00', '14:00-16:00', '16:00-18:00',
'18:00-20:00', '20:00-22:00', '22:00-24:00'
],
} }
}, },
computed: { computed: {
currentTimeTxt() { currentTimeTxt() {
if(this.currentTime != null) { if(this.currentTime != null) {
return this.timeList[this.currentTime] return this.timeList[this.currentTime].name
} }
return '' return ''
}, },
...@@ -88,13 +124,16 @@ ...@@ -88,13 +124,16 @@
getDateList() { getDateList() {
// 获取日期 // 获取日期
}, },
dateChange(item, index, list) { async dateChange(item, index, list) {
let data = { let data = {
item, item,
index, index,
list, list,
} }
this.currentDay = index this.currentDay = index
this.appointTime = item.day
this.currentTime = null
this.appointRange = ""
this.$emit('date-change', data) this.$emit('date-change', data)
}, },
timeChange(item, index, list) { timeChange(item, index, list) {
...@@ -104,6 +143,7 @@ ...@@ -104,6 +143,7 @@
list, list,
} }
this.currentTime = index this.currentTime = index
this.appointRange = item.pkey
this.$emit('time-change', data) this.$emit('time-change', data)
}, },
weekChange(item, index, list) { weekChange(item, index, list) {
...@@ -114,7 +154,34 @@ ...@@ -114,7 +154,34 @@
} }
this.$emit('week-change', data) this.$emit('week-change', data)
}, },
lastWeek(item, list) {
if(this.num > 0) {
this.num --
let len = list.length
if(this.num == 0) {
this.hasLast = false
len ++
}
let time = item.day - len*86400000
let data = {
time: time,
num: this.num
}
this.$emit('week-change', data)
}
},
nextWeek(item, list) {
this.hasLast = true
this.num ++
let len = list.length
let time = item.day + len*86400000
let data = {
time: time,
num: this.num
}
this.$emit('week-change', data)
},
} }
} }
</script> </script>
...@@ -146,59 +213,71 @@ ...@@ -146,59 +213,71 @@
.date-list { .date-list {
background-color: #F4F5F7; background-color: #F4F5F7;
.next{ .last{
width: 60rpx; width: 60rpx;
height: 120rpx; height: 120rpx;
line-height: 120rpx; line-height: 120rpx;
text-align: center; text-align: center;
border-left: 2rpx solid #fff; border-right: 2rpx solid #fff;
} }
.date-item { .date-box {
padding: 20rpx 20rpx 16rpx; padding: 20rpx 18rpx 16rpx 20rpx;
border-radius: 12rpx; width: 568rpx;
.date-item {
.day { // padding: 20rpx 20rpx 16rpx;
display: block; border-radius: 12rpx;
font-size: 24rpx;
line-height: 26rpx;
color: #999;
&.day1 {
width: 48rpx;
height: 48rpx;
margin-top: 10rpx;
border-radius: 50%;
font-size: 28rpx;
text-align: center;
line-height: 48rpx;
}
}
&.active {
// background-color: #2272FF;
.day { .day {
color: #2272FF; display: block;
font-size: 24rpx;
line-height: 26rpx;
color: #999;
&.day1 { &.day1 {
background-color: #2272FF; width: 48rpx;
color: #fff !important; height: 48rpx;
margin-top: 10rpx;
border-radius: 50%;
font-size: 28rpx;
text-align: center;
line-height: 48rpx;
}
}
&.active {
// background-color: #2272FF;
.day {
color: #2272FF;
&.day1 {
background-color: #2272FF;
color: #fff !important;
}
} }
} }
} }
} }
.next{
width: 60rpx;
height: 120rpx;
line-height: 120rpx;
text-align: center;
border-left: 2rpx solid #fff;
}
} }
.time-list { .time-list {
justify-content: space-between;
margin-bottom: -30rpx; margin-bottom: -30rpx;
.time-item { .time-item {
min-width: 196rpx; min-width: 196rpx;
margin-right: 21rpx; // margin-right: 24rpx;
margin-bottom: 24rpx; margin-bottom: 20rpx;
border-radius: 12rpx; border-radius: 12rpx;
padding: 26rpx 20rpx 24rpx;
background-color: #F4F5F7; background-color: #F4F5F7;
&:nth-child(3n) { &:nth-child(3n) {
...@@ -212,9 +291,17 @@ ...@@ -212,9 +291,17 @@
} }
.time { .time {
font-size: 26rpx; font-size: 26rpx;
line-height: 26rpx; line-height: 76rpx;
color: #999; color: #999;
} }
/deep/ button {
padding: 0;
height: 76rpx;
}
/deep/ button[plain] {
border: none;
}
} }
} }
</style> </style>
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
<view class="reason-view" v-if="showReason"><text>未通过原因:</text> <view class="reason-view" v-if="showReason"><text class="reason-text">未通过原因:</text>
<text class="reason-text">{{orderData.auditResults.remark}}</text> <text>{{orderData.auditResults.remark}}</text>
</view> </view>
<view class="bottom-view"> <view class="bottom-view">
<view> <view>
...@@ -78,13 +78,15 @@ ...@@ -78,13 +78,15 @@
} }
} }
}, },
// waitAccept:待接单、 /* 订单类型
// waitAppointment:待预约、 waitAccept:待接单、
// waitCheckIn:待签到、 waitAppointment:待预约、
// waitFinish:待完工、 waitCheckIn:待签到、
// review: 审核中、 waitFinish:待完工、
// exception:异常单、 audit: 审核中、
// finish:已完工 exception:异常单、
finish:已完工
*/
type: String, type: String,
location: { // 当前坐标 location: { // 当前坐标
type: Array, type: Array,
...@@ -156,7 +158,7 @@ ...@@ -156,7 +158,7 @@
.orderBusinessType != 'R') .orderBusinessType != 'R')
}, },
showTime() { showTime() {
return [4, 6].indexOf(this.orderType) != -1 return [4, 5, 6].indexOf(this.orderType) != -1
}, },
infoTexts() { infoTexts() {
return { return {
...@@ -222,7 +224,7 @@ ...@@ -222,7 +224,7 @@
'waitAppointment': 1, // 待预约、 'waitAppointment': 1, // 待预约、
'waitCheckIn': 2, // 待签到、 'waitCheckIn': 2, // 待签到、
'waitFinish': 3, // 待完工、 'waitFinish': 3, // 待完工、
'review': 4, // 审核中、 'audit': 4, // 审核中、
'exception': 5, // 异常单、 'exception': 5, // 异常单、
'finish': 6, //已完工 'finish': 6, //已完工
} }
...@@ -367,10 +369,12 @@ ...@@ -367,10 +369,12 @@
text-align: left; text-align: left;
margin-top: 30rpx; margin-top: 30rpx;
font-size: 26rpx; font-size: 26rpx;
color: #666666; color: #FA5A49;
display: flex;
align-items: flex-start;
.reason-text { .reason-text {
color: #FA5A49; flex-shrink: 0;
color: #666666;
} }
} }
......
...@@ -6,7 +6,12 @@ ...@@ -6,7 +6,12 @@
<view class="order-pop-title"> <view class="order-pop-title">
<text>{{title}}</text> <text>{{title}}</text>
</view> </view>
<view class="line-view" /> <view class="line-view" />
<view class="order-content">
<view v-if="count">
你本月还有<text class="order-content-count">{{count}}</text>次拒单机会
</view>
</view>
<view class="order-pop-text"> <view class="order-pop-text">
<text>{{message}}</text> <text>{{message}}</text>
</view> </view>
...@@ -16,7 +21,7 @@ ...@@ -16,7 +21,7 @@
取消 取消
</u-button> </u-button>
<u-button :custom-style="customStyleSave" shape="circle" type="primary" @click="handleClickSure"> <u-button :custom-style="customStyleSave" shape="circle" type="primary" @click="handleClickSure">
查看 {{buttonText}}
</u-button> </u-button>
</view> </view>
</view> </view>
...@@ -29,7 +34,12 @@ ...@@ -29,7 +34,12 @@
props: { props: {
visible: Boolean, visible: Boolean,
title: String, title: String,
message: String, message: String,
count: Number, // 剩余次数
buttonText: { // 确定按钮
type: String,
default: '查看'
},
}, },
data() { data() {
return {} return {}
...@@ -76,21 +86,32 @@ ...@@ -76,21 +86,32 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.order-pop-view { .order-pop-view {
padding: 30rpx; padding: 30rpx;
min-height: 520rpx;
.order-pop-title { .order-pop-title {
font-size: 40rpx; font-size: 40rpx;
margin-top: 40rpx; margin-top: 30rpx;
margin-bottom: 40rpx; margin-bottom: 34rpx;
text-align: center; text-align: center;
color: #333333; color: #333333;
}
.order-content {
min-height: 14rpx;
text-align: center;
color: #333333;
font-size: 32rpx;
margin-top: 26rpx;
.order-content-count {
color: #FA5A49;
}
} }
.order-pop-text { .order-pop-text {
color: #999999; color: #999999;
text-align: center; text-align: center;
margin-top: 40rpx; margin-top: 30rpx;
font-size: 28rpx; font-size: 28rpx;
margin-bottom: 260rpx; // margin-bottom: 180rpx;
} }
.line-view { .line-view {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<u-navbar style="position: absolute;" title="入驻" background="{background: transparent}" :border-bottom="false" <u-navbar style="position: absolute;" title="入驻" background="{background: transparent}" :border-bottom="false"
back-icon-color="#ffffff" title-color="#ffffff"></u-navbar> back-icon-color="#ffffff" title-color="#ffffff"></u-navbar>
<image :src="url" style="width: 100%;" mode="widthFix"></image> <image :src="url" style="width: 100%;" mode="widthFix"></image>
<view class="introduction"> <view :class="['introduction', {'active': type}]">
<slot></slot> <slot></slot>
</view> </view>
<view class="settle-bottom"> <view class="settle-bottom">
...@@ -18,6 +18,11 @@ ...@@ -18,6 +18,11 @@
index: { index: {
type: Number, type: Number,
default: 1 default: 1
},
// 0: introduction距离底部168rpx 1: introduction距离底部0rpx
type: {
type: Number,
default: 0
} }
}, },
data() { data() {
...@@ -45,7 +50,10 @@ ...@@ -45,7 +50,10 @@
top: 370rpx; top: 370rpx;
bottom: 168rpx; bottom: 168rpx;
left: 30rpx; left: 30rpx;
right: 30rpx; right: 30rpx;
&.active {
bottom: 0rpx;
}
} }
.settle-bottom { .settle-bottom {
......
import Vue from 'vue' import Vue from 'vue'
import moment from 'moment'
import App from './App' import App from './App'
import uView from "uview-ui"; import uView from "uview-ui";
import vuexStore from "@/store/$u.mixin.js"; import vuexStore from "@/store/$u.mixin.js";
...@@ -7,13 +8,24 @@ import {router,RouterMount} from '@/router/index.js' //路径换成自己的 ...@@ -7,13 +8,24 @@ import {router,RouterMount} from '@/router/index.js' //路径换成自己的
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.mixin(vuexStore) Vue.mixin(vuexStore)
Vue.use(uView); Vue.use(uView);
App.mpType = 'app' App.mpType = 'app'
const app = new Vue({ const app = new Vue({
store, store,
...App ...App
}) })
// 引入时间组件 moment
moment.locale('zh-cn');
Vue.prototype.moment = moment
Vue.filter('datefmt',function (input,fmtstring) {//当input为时间戳,需转为Number类型
if(input){
return moment(input).format(fmtstring);
}else{
return "";
}
});
// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用 // http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
import httpInterceptor from '@/common/http.interceptor.js' import httpInterceptor from '@/common/http.interceptor.js'
......
...@@ -324,9 +324,10 @@ ...@@ -324,9 +324,10 @@
"path": "pages/photo/index", //启动页面,必选 "path": "pages/photo/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
}, },
{ {
"name": "工单搜索", // gaomingbo
"path": "pages/order/search", "name": "工单-过程反馈",
"path": "pages/order/feedback",
"query": "" "query": ""
}, },
{ {
...@@ -368,6 +369,11 @@ ...@@ -368,6 +369,11 @@
"name": "订单 - 拒单", //模式名称 "name": "订单 - 拒单", //模式名称
"path": "pages/order/refuse", //启动页面,必选 "path": "pages/order/refuse", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "订单 - 过程反馈", //模式名称
"path": "pages/order/feedback", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
} }
] ]
} }
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
</view> </view>
<image class="right-icon" :src="shouyeyouImage"></image> <image class="right-icon" :src="shouyeyouImage"></image>
</view> </view>
<view class="line-view" v-if="index != 2"></view> <view class="line-view" v-if="index != 1"></view>
</view> </view>
</view> </view>
</view> </view>
<!-- 订单推荐吸顶 --> <!-- 订单推荐吸顶 -->
<u-sticky> <u-sticky offset-top="60">
<view class="sticky"> <view class="sticky">
<text>订单推荐</text> <text>订单推荐</text>
</view> </view>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
}, },
data() { data() {
return { return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
location: [116.3896, 39.91917], // 经纬度 location: [116.3896, 39.91917], // 经纬度
title: false, title: false,
title: "Hello", title: "Hello",
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
search: { search: {
token: "", token: "",
pageNumber: 0, pageNumber: 0,
pageSize: 100, pageSize: 10,
}, },
bottomLoading: false bottomLoading: false
}; };
...@@ -179,8 +179,8 @@ ...@@ -179,8 +179,8 @@
self.$u.api.listByNotice().then((res) => { self.$u.api.listByNotice().then((res) => {
uni.stopPullDownRefresh() // 结束下拉刷新 uni.stopPullDownRefresh() // 结束下拉刷新
if (res.code == 200) { if (res.code == 200) {
if (res.data && res.data.length > 3) { if (res.data && res.data.length > 2) {
self.messageList = res.data.slice(0, 3); self.messageList = res.data.slice(0, 2);
} else { } else {
self.messageList = res.data || []; self.messageList = res.data || [];
} }
...@@ -197,8 +197,8 @@ ...@@ -197,8 +197,8 @@
self.$u.api.listByRecommendOrder(self.search).then((res) => { self.$u.api.listByRecommendOrder(self.search).then((res) => {
uni.stopPullDownRefresh() // 结束下拉刷新 uni.stopPullDownRefresh() // 结束下拉刷新
if (res.code == 200) { if (res.code == 200) {
if (res.data && res.data.length > 0) { if (res.data && res.data.list && res.data.list.length > 0) {
self.orderList.push(...res.data); self.orderList.push(...res.data.list);
} }
} else { } else {
console.log(res.message, "初始化订单列表异常"); console.log(res.message, "初始化订单列表异常");
...@@ -235,10 +235,12 @@ ...@@ -235,10 +235,12 @@
handleScroll() { handleScroll() {
console.log("-----scroll-------"); console.log("-----scroll-------");
}, },
/* 立即入驻 */
immediatelyIn() { immediatelyIn() {
if (this.vuex_token) { if (this.vuex_token) {
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' // 用户已登录
var pageIndex = 1; var pageIndex = 1;
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
switch (this.status) { switch (this.status) {
case 1: case 1:
case 2: case 2:
...@@ -266,6 +268,7 @@ ...@@ -266,6 +268,7 @@
"/pages/settle/prompt?pageIndex=" + pageIndex : "/pages/settle/index", "/pages/settle/prompt?pageIndex=" + pageIndex : "/pages/settle/index",
}); });
} else { } else {
// 用户未登录
uni.navigateTo({ uni.navigateTo({
url: "pages/login/index", url: "pages/login/index",
}); });
...@@ -294,7 +297,7 @@ ...@@ -294,7 +297,7 @@
border-radius: 12rpx; border-radius: 12rpx;
background-color: #ffffff; background-color: #ffffff;
padding: 12rpx 30rpx; padding: 12rpx 30rpx;
height: 252rpx; height: 174rpx;
} }
.msg-content { .msg-content {
......
This diff is collapsed.
<template> <template>
<view class="content"> <view class="content">
<view class="title">考试规则说明</view> <view class="title">考试规则说明</view>
<view class="test"> <view class="test">
<view class="text"> <view class="text">
<text class="left">考试科目:</text><text style="color: #007AFF;">{{exam.examName}}</text> <text class="left">考试科目:</text
</view> ><text style="color: #007aff">{{ exam.examName }}</text>
<view class="text"> </view>
<text class="left">合格条件:</text><text>{{exam.ruleDisc}}</text> <view class="text">
</view> <text class="left">合格条件:</text
<view class="text"> ><text>{{ exam.ruleDisc }}</text>
<text class="left">考试时间:</text><text>30分钟</text> </view>
</view> <view class="text">
<view class="text"> <text class="left">考试时间:</text><text>30分钟</text>
<text class="left">题目规则:</text><text>题库100题,随机抽20题</text> </view>
</view> <view class="text">
<view class="text"> <text class="left">题目规则:</text
<text class="left">备注说明:</text><text>无</text> ><text>题库100题,随机抽20题</text>
</view> </view>
</view> <view class="text">
<button @click="aaa">开始考试</button> <text class="left">备注说明:</text><text>无</text>
</view> </view>
</view>
<button @click="getUserExamId()">开始考试</button>
</view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
examId:1, examId: 2,
exam:null exam: null,
} userExamId: null,
}, };
onLoad() { },
this.getUserExamInfo() onLoad() {
}, // this.getUserExamInfo();
methods: { },
aaa(){ methods: {
//申请考试获取userExamId
wx.navigateTo({ getUserExamId: function () {
var that = this;
url:'./answer' console.log("这是一条消息");
}) uni.request({
}, url:
//获取考试信息 "http://192.168.1.22" +
getUserExamInfo: function() { "/wxh-worker-rest/rest/exam/serviceRule/" +
that.vuex_token +
uni.showLoading({ "?examId=" +
title: '请稍候' this.examId,
}) method: "POST",
header: {
let that = this "Content-Type": "application/x-www-from-urlencoded",
uni.request({ },
url: 'https://system.banshouhui.com' +
'/wxh-worker-rest/rest/exam' + success: (res) => {
'/serviceRule/userExamInfo/' + console.log("标识符1", res.data);
'RTOKENf86a7c0606ef5ebf36f211ace3466b7f9de56e37' + uni.hideLoading();
'?examId=' + this.examId, if (res.data.code == 200) {
method: 'POST', if (res.data.data.userExamId) {
data: { that.userExamId = res.data.data.userExamId;
//examId:this.examId, console.log("这个是个标识符", that.userExamId);
}, }
header: { }
'Content-Type': 'application/x-www-form-urlencoded' },
}, });
success: (res) => { setTimeout(() => {
console.log(res.data) wx.navigateTo({
uni.hideLoading() url: "./answer?userExamId=" + that.userExamId,
if (!res.data) { });
return }, 1000);
} },
if (res.data.code == 401 || res.data.code == 403) { },
// uni.navigateTo({ };
// url: '/pages/login/wxlogin'
// })
// return
console.log('洪塘张学友')
}
if (res.data.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that.exam = res.data.data
console.log(that.exam)
if (res.data.data.examStatus == 2) {
that.applyExam()
return
}
if(res.data.data.examStatus == 1){
console.log('111111111111111111111111111')
that.isComplete = true
that.examScore = res.data.data.examScore
that.postResult()
return
}
if (res.data.data.examStatus == 0 ) {
that.userExamId = res.data.data.id
that.getNext()
}
} else {
uni.showToast({
icon: 'none',
title: res.data.message
})
}
},
fail: (e) => {
uni.hideLoading()
uni.showToast({
icon: 'none',
title: '获取考试信息失败'
})
}
})
},
}
}
</script> </script>
<style > <style>
.content{ .content {
margin: 187rpx 80rpx; margin: 187rpx 80rpx;
} }
.title{
font-size: 17px; .title {
text-align: center; font-size: 17px;
} text-align: center;
.test{ }
margin: 0 0 ;
} .test {
.left{ margin: 0 0;
margin-right: 8rpx; }
margin-left: 68rpx;
.left {
} margin-right: 8rpx;
.text{ margin-left: 68rpx;
margin: 50rpx 0; }
}
button{ .text {
width:364rpx; margin: 50rpx 0;
height: 56rpx; }
background: #007AFF;
font-size: 24rpx; button {
color: #FFFFFF; width: 364rpx;
} height: 56rpx;
background: #007aff;
font-size: 24rpx;
color: #ffffff;
}
</style> </style>
...@@ -3,30 +3,34 @@ ...@@ -3,30 +3,34 @@
<view class="title"> <view class="title">
课程简介 课程简介
</view> </view>
<view class="u-content">
<u-parse :html="courseInfo.intro"></u-parse>
</view>
<view class="lecturer"> <view class="lecturer">
<view class="" style="font-size: 40rpx;font-weight: bold;margin: 30rpx 0;"> <view class="" v-if="courseInfo.isTeachers">
讲师 <view class="" style="font-size: 40rpx;font-weight: bold;margin: 30rpx 0;">
</view> 讲师
<view class="" style="display: flex;"> </view>
<image src="../../static/logo.png" mode=""></image> <view class="" style="display: flex;">
<view style="font-size: 30rpx;font-weight:1000;margin: 19px 24px;">扳手卢老师</view> <image src="../../static/logo.png" mode=""></image>
<view style="font-size: 30rpx;font-weight:1000;margin: 19px 24px;">{{ courseInfo.teacher.name }}</view>
</view>
</view> </view>
<view class="" style="margin: 36rpx 0;"> <view class="" style="margin: 36rpx 0;">
<view class="" style="font-size: 40rpx;font-weight:1000"> <view class="" style="font-size: 40rpx;font-weight:1000">
目录 目录
</view> </view>
<view v-for="item in list"> <view v-for="(item,index) in list">
<view class="chapter"> <view class="chapter">
{{item.name}} {{item.name}}
</view> </view>
<view class="video" v-for="key in item.section" @click=details(key.id)> <view class="video" v-for="(section,key) in item.section" @click=details(section.id)>
<view class="video_1" > <view class="video_1" >
<view class="text" v-text="wareType(key.ware)"> <view class="text" v-text="wareType(section.ware)">
</view> </view>
<text>1-{{key.order}}</text> <text class="texts">{{index+1}}-{{key+1}}</text>
<text class="text2">{{key.name}}</text> <text class="text2">{{section.name}}</text>
<text class="text3" v-text="key.isLearned==false?'未开始':'完成'"></text> <text class="text3" v-text="section.isLearned==false?'未开始':'完成'"></text>
</view> </view>
</view> </view>
</view> </view>
...@@ -45,6 +49,11 @@ ...@@ -45,6 +49,11 @@
}, },
list:[], list:[],
examId:1, examId:1,
courseInfo: {
intro: '',
isTeachers: false,
teacher: {}
}
} }
}, },
onLoad(a){ onLoad(a){
...@@ -52,8 +61,31 @@ ...@@ -52,8 +61,31 @@
this.params.course_id=a.course_id this.params.course_id=a.course_id
console.log(this.params.course_id) console.log(this.params.course_id)
this.getCapterDetails() this.getCapterDetails()
this.getCourseInfo()
}, },
methods: { methods: {
getCourseInfo() {
let param = {
course_id: this.params.course_id
};
this.$u.api
.CourseList(param)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.courseInfo.intro = res.data.course.intro;
this.courseInfo.isTeachers = res.data.course.teachers.length > 0;
this.courseInfo.teacher = this.courseInfo.isTeachers ? res.data.course.teachers[0] : {};
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
});
},
//获取章节详情 //获取章节详情
getCapterDetails() { getCapterDetails() {
console.log('获取章节详情') console.log('获取章节详情')
...@@ -133,7 +165,7 @@ ...@@ -133,7 +165,7 @@
<style lang="scss"> <style lang="scss">
.title{ .title{
height: 164rpx; height: 64rpx;
font-size: 40rpx; font-size: 40rpx;
font-weight: bold; font-weight: bold;
margin: 24rpx 34rpx; margin: 24rpx 34rpx;
...@@ -158,6 +190,12 @@ ...@@ -158,6 +190,12 @@
margin: 20rpx 0; margin: 20rpx 0;
position: relative; position: relative;
width: 100%; width: 100%;
.texts{
border:1px solid #8F8F94;
text-align: center;
line-height: 38rpx;
margin-right: 5rpx;
}
.text{ .text{
width: 100rpx; width: 100rpx;
height: 38rpx; height: 38rpx;
...@@ -179,4 +217,7 @@ ...@@ -179,4 +217,7 @@
right: 0; right: 0;
} }
} }
.u-content {
padding: 0rpx 34rpx;
}
</style> </style>
This diff is collapsed.
<template> <template>
<view class="test-result"> <view class="test-result">
<text class="title">考试结果</text> <text class="title">考试结果</text>
<view class="result"> <view class="result"> {{ text }} </view>
未通过 <view class="test-explain">
</view> <view class="hang">
<view class="test-explain"> <text class="text1">合格条件:</text
<view class="hang"> ><text class="text2">答对20题</text>
<text class="text1">合格条件:</text><text class="text2">答对20题</text> </view>
</view> <view class="hang">
<view class="hang"> <text class="text1">考试结果:</text
<text class="text1">考试结果:</text><text class="text2">答对10题</text> ><text class="text2">答对10题</text>
</view> </view>
<view class="hang"> <view class="hang">
<text class="text1">考试用时:</text><text class="text2">16分29秒</text> <text class="text1">考试用时:</text
</view> ><text class="text2">16分29秒</text>
</view> </view>
<view class="btn"> </view>
<button class="btn1">再答一次</button> <view class="btn">
<button class="btn2">退出重考</button> <button class="btn1" @click="getAgain()">再答一次</button>
</view> <button class="btn2" @click="toIndex">下次再考</button>
</view> </view>
</view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
text: "",
} examId: 2,
}, result: null,
methods: { userExamId: null,
};
} },
} onLoad(a) {
this.userExamId = a.userExamId;
console.log("userExamId是", this.userExamId);
this.nextClick();
},
onUnload() {
wx.reLaunch({
url: "./index",
});
},
methods: {
//考试结果
nextClick: function () {
console.log("wwwwwwwwww");
uni.request({
url:
"http://192.168.1.22" +
"/wxh-worker-rest/rest/exam" +
"/serviceRule/next/" +
this.vuex_token +
"?userExamId=" +
this.userExamId,
method: "POST",
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
success: (res) => {
this.result = res.data.data;
this.text = res.data.data.examLevelResult;
console.log("标识符55", this.result);
},
});
},
//再次考试
getAgain: function () {
wx.navigateTo({
url: "./assessment",
});
},
//下次再考跳转到学习主界面页面
toIndex: function () {
wx.reLaunch({
url: "./index",
});
},
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
.test-result{ .test-result {
width: 610rpx; width: 610rpx;
height: 965rpx; height: 965rpx;
margin: 70rpx auto 0; margin: 70rpx auto 0;
.title{ .title {
margin: 0 44rpx 0; margin: 0 44rpx 0;
} }
.result{ .result {
color: red; color: red;
font-size: 66rpx; font-size: 66rpx;
text-align: center; text-align: center;
border-bottom: 1px dashed #000000; border-bottom: 1px dashed #000000;
margin: 74rpx 0; margin: 74rpx 0;
padding: 66rpx; padding: 66rpx;
} }
.test-explain{ .test-explain {
.hang{ .hang {
margin: 26rpx 26rpx; margin: 26rpx 26rpx;
.text1{ .text1 {
color: #a69999; color: #a69999;
margin-right: 22rpx; margin-right: 22rpx;
} }
.text2{ .text2 {
color: #333333; color: #333333;
} }
} }
} }
.btn{ .btn {
margin-top: 236rpx; margin-top: 236rpx;
.btn1{ .btn1 {
width: 478rpx; width: 478rpx;
height: 60rpx; height: 60rpx;
background: #0079fe; background: #0079fe;
color: #fff; color: #fff;
font-size: 26rpx; font-size: 26rpx;
line-height: 60rpx; line-height: 60rpx;
margin: 20rpx auto; margin: 20rpx auto;
} }
.btn2{ .btn2 {
width: 478rpx; width: 478rpx;
height: 60rpx; height: 60rpx;
background: #f2f2f2; background: #f2f2f2;
color: #333333; color: #333333;
font-size: 26rpx; font-size: 26rpx;
line-height: 60rpx; line-height: 60rpx;
margin:0 auto; margin: 0 auto;
} }
}
} }
}
</style> </style>
This diff is collapsed.
This diff is collapsed.
...@@ -20,14 +20,15 @@ ...@@ -20,14 +20,15 @@
<u-tabs <u-tabs
:list="tabList" :list="tabList"
:current="curTab" :current="curTab"
height="80" height="60"
gutter="89" gutter="89"
bar-height="4" bar-height="4"
bar-width="44" bar-width="44"
bg-color="none" bg-color="none"
active-color="#FFFFFF" active-color="#FFFFFF"
inactive-color="#FFFFFF" inactive-color="#DEDEDE"
font-size="32" font-size="32"
bold
@change="changeTab" @change="changeTab"
></u-tabs> ></u-tabs>
</view> </view>
...@@ -35,6 +36,7 @@ ...@@ -35,6 +36,7 @@
<!-- <view class="con-box"> <!-- <view class="con-box">
</view> --> </view> -->
<view class="content-view">
<view class="con-box"> <view class="con-box">
<view class="title">{{feedback.own.title}}</view> <view class="title">{{feedback.own.title}}</view>
<view class="u-flex u-flex-wrap"> <view class="u-flex u-flex-wrap">
...@@ -43,7 +45,7 @@ ...@@ -43,7 +45,7 @@
:key="index" :key="index"
@click="changeOwn(index)" @click="changeOwn(index)"
:class="{'txt-item':true,'active': (trace.reasonRelegation == index)}"> :class="{'txt-item':true,'active': (trace.reasonRelegation == index)}">
<text class="txt">{{index}}</text> <text class="txt">{{item}}</text>
</view> </view>
</view> </view>
<u-gap height="30"></u-gap> <u-gap height="30"></u-gap>
...@@ -53,21 +55,27 @@ ...@@ -53,21 +55,27 @@
v-for="(txt, index) in options[curTab][trace.reasonRelegation]" v-for="(txt, index) in options[curTab][trace.reasonRelegation]"
:key="index" :key="index"
@click="changeType(txt)" @click="changeType(txt)"
:class="{'txt-item':true,'active': (trace.reason == txt)}"> :class="{'txt-item':true,'active': (trace.reason == txt)}" style="width: 306rpx;margin-right: 18rpx">
<text class="txt">{{txt}}</text> <text class="txt">{{txt}}</text>
</view> </view>
</view> </view>
<u-input v-show="showRemark" v-model="trace.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input> <view class="input-view" v-show="showRemark">
<u-input v-model="trace.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input>
</view>
</view>
<view class="time-view">
<appoint-time :dateList="dateList" :title="appointTitle" :timeList="timeList" @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
</view> </view>
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view> </view>
<view class="u-m-60"> <view class="bottom-view">
<button class="btn" @click="submitForm" :loading="submiting" :disabled="disabledSubmit">确定</button> <button class="btn, bottom-btn" @click="submitForm" :loading="submiting" :disabled="disabledSubmit"><text class="button-text">确定</text></button>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
let now = Date.now()
import appointTime from '@/components/appoint/appoint-time.vue' import appointTime from '@/components/appoint/appoint-time.vue'
export default { export default {
data() { data() {
...@@ -76,6 +84,26 @@ ...@@ -76,6 +84,26 @@
categoryId: null, categoryId: null,
showRemark: false, showRemark: false,
submiting: false, submiting: false,
dateList: [
{day: now, timeRange: []},
{day: now + (1*86400000), timeRange: []},
{day: now + (2*86400000), timeRange: []},
{day: now + (3*86400000), timeRange: []},
{day: now + (4*86400000), timeRange: []},
{day: now + (5*86400000), timeRange: []},
{day: now + (6*86400000), timeRange: []},
],
timeList: [
{"name":"06:00-08:00","pkey":"appointment_range_8","disabled":false},
{"name":"08:00-10:00","pkey":"appointment_range_10","disabled":false},
{"name":"10:00-12:00","pkey":"appointment_range_12","disabled":false},
{"name":"12:00-14:00","pkey":"appointment_range_14","disabled":false},
{"name":"14:00-16:00","pkey":"appointment_range_16","disabled":false},
{"name":"16:00-18:00","pkey":"appointment_range_18","disabled":false},
{"name":"18:00-20:00","pkey":"appointment_range_20","disabled":false},
{"name":"20:00-22:00","pkey":"appointment_range_22","disabled":false},
{"name":"22:00-24:00","pkey":"appointment_range_24","disabled":false}
],
background: { background: {
backgroundColor: 'none', backgroundColor: 'none',
}, },
...@@ -96,7 +124,7 @@ ...@@ -96,7 +124,7 @@
config: null, config: null,
options: [], options: [],
trace: { trace: {
reasonType: '', // 反馈类型 reasonType: '报单', // 反馈类型
reasonRelegation: '', // 反馈归属 reasonRelegation: '', // 反馈归属
reason: '', // 反馈原因 reason: '', // 反馈原因
appointmentDatetime: null, // 预约时间 appointmentDatetime: null, // 预约时间
...@@ -115,7 +143,6 @@ ...@@ -115,7 +143,6 @@
} }
}, },
computed: { computed: {
disabledSubmit() { disabledSubmit() {
let self = this let self = this
if(self.trace.reasonType && self.trace.reasonType == '报备'){ if(self.trace.reasonType && self.trace.reasonType == '报备'){
...@@ -132,8 +159,12 @@ ...@@ -132,8 +159,12 @@
return true return true
}, },
appointTitle() {
return this.feedback.appoint[this.trace.reasonType]
},
}, },
async onLoad(e) { async onLoad(e) {
this.$u.vuex('vuex_token', 'RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5');
this.orderId = 1 this.orderId = 1
this.categoryId = 88 this.categoryId = 88
if(e) { if(e) {
...@@ -144,9 +175,12 @@ ...@@ -144,9 +175,12 @@
title: "数据加载中", title: "数据加载中",
mask: true mask: true
}) })
this.loadCalendar()
this.loadTimerange()
await this.initPageData() await this.initPageData()
}, },
methods: { methods: {
/* 初始化页面数据 */
async initPageData() { async initPageData() {
let self = this let self = this
let params = {categoryId: self.categoryId} let params = {categoryId: self.categoryId}
...@@ -158,6 +192,7 @@ ...@@ -158,6 +192,7 @@
} }
uni.hideLoading() uni.hideLoading()
}, },
/* 组装参数 */
buildConfig() { buildConfig() {
let self = this let self = this
if(self.config) { if(self.config) {
...@@ -169,6 +204,7 @@ ...@@ -169,6 +204,7 @@
}) })
} }
}, },
/* 初始化参数 */
initParams() { initParams() {
let self = this let self = this
if(self.config) { if(self.config) {
...@@ -188,6 +224,32 @@ ...@@ -188,6 +224,32 @@
} }
} }
}, },
/* 加载日历数据 */
async loadCalendar() {
let self = this
let params = {
num: 1
}
let res = await this.$u.api.workerCalendar(params)
if(res && res.code == 200) {
self.dateList = res.data
}
},
/* 加载预约时间段 */
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
}
},
/** /**
* 切换tab项 * 切换tab项
*/ */
...@@ -212,18 +274,54 @@ ...@@ -212,18 +274,54 @@
weekChange(data){ weekChange(data){
// 点击下一周 // 点击下一周
console.log(data,'week-data') console.log(data,'week-data')
if (data && data.time) {
let num = data.num
let time = data.time
if (num == 0) {
this.dateList = [
{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 {
this.dateList = [
{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: []},
]
}
}
}, },
dateChange(data){ dateChange(data){
debugger
// 点击日期选择 // 点击日期选择
console.log(data,'week-data') console.log(data,'week-data')
let self = this let self = this
if(self.trace.reasonType == '报备') { if(self.trace.reasonType == '报备') {
self.trace.appointmentDatetime = null self.trace.appointmentDatetime = null
self.trace.nextTraceDatetime = data.item.day self.trace.nextTraceDatetime = data.item.day
self.timeList.map((item, index) => {
item.disabled = false
})
} else if(self.trace.reasonType == '改约') { } else if(self.trace.reasonType == '改约') {
self.trace.appointmentDatetime = data.item.day self.trace.appointmentDatetime = data.item.day
self.trace.nextTraceDatetime = null self.trace.nextTraceDatetime = null
self.timeList.map((item, index) => {
if(data.item.timeRange.indexOf(item.pkey) > -1) {
item.disabled = true
} else {
item.disabled = false
}
})
} }
}, },
...@@ -257,11 +355,13 @@ ...@@ -257,11 +355,13 @@
height: 100vh; height: 100vh;
overflow: auto; overflow: auto;
background-color: #F4F5F7; background-color: #F4F5F7;
background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 100%); background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 50%);
background-size: 750rpx 600rpx; background-size: 750rpx 600rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.feedback-box { .feedback-box {
display: flex;
flex-direction: column;
.header { .header {
padding: 12rpx 30rpx 40rpx 30rpx; padding: 12rpx 30rpx 40rpx 30rpx;
display: flex; display: flex;
...@@ -280,9 +380,43 @@ ...@@ -280,9 +380,43 @@
.top-tab{ .top-tab{
text-align: center; text-align: center;
} }
.content {
display: flex;
flex-direction: column;
overflow: hidden;
margin-bottom: 188rpx;
.content-view {
height: 100%;
border-radius: 12rpx;
overflow: auto;
margin-top:30rpx;
.time-view {
border-radius: 12rpx;
background-color: #FFFFFF;
padding-bottom: 20rpx;
}
}
}
.bottom-view {
position: fixed;
bottom: 44rpx;
width: 100%;
}
.bottom-btn {
height: 104rpx;
width: 600rpx;
display: flex;
align-items: center;
justify-content: center;
.button-text {
font-size: 32rpx;
font-weight: bold;
}
}
.con-box{ .con-box{
margin-top:30rpx; padding: 30rpx 30rpx 8rpx 30rpx;
padding: 30rpx 30rpx 28rpx 30rpx;
border-radius: 12rpx; border-radius: 12rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
.title{ .title{
...@@ -293,28 +427,39 @@ ...@@ -293,28 +427,39 @@
} }
&>.u-flex{ &>.u-flex{
margin-top:40rpx; margin-top:40rpx;
margin-right:-20rpx; margin-right:-24rpx;
.txt-item{ .txt-item{
border-radius: 12rpx; border-radius: 12rpx;
padding:24rpx 38rpx; padding:24rpx 38rpx;
min-width: 196rpx; width: 196rpx;
height: 72rpx;
text-align: center; text-align: center;
margin-right: 20rpx; margin-right: 22rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background-color: #F4F5F7; background-color: #F4F5F7;
&.active{ &.active{
background-color: #2272FF; background-color: #2272FF;
.txt{ .txt{
color: #fff; color: #fff;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
} }
} }
} }
} }
.txt{ .txt{
display:block; display:block;
font-size: 26rpx; font-size: 26rpx;
line-height: 26rpx; line-height: 26rpx;
color: #333; color: #333;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.input-view {
margin-bottom: 24rpx;
} }
.textarea{ .textarea{
......
...@@ -83,10 +83,13 @@ ...@@ -83,10 +83,13 @@
loaded: false loaded: false
}; };
}, },
onLoad() { onLoad() {
this.getLocation(); this.getLocation();
this.getOrderCount(); // this.getOrderCount();
this.getOrderList(0); this.getOrderList(0);
},
onShow() {
this.getOrderCount()
}, },
computed: { computed: {
subList() { subList() {
...@@ -107,7 +110,7 @@ ...@@ -107,7 +110,7 @@
'waitAppointment': 0, // 待预约、 'waitAppointment': 0, // 待预约、
'waitCheckIn': 1, // 待签到、 'waitCheckIn': 1, // 待签到、
'waitFinish': 2, // 待完工、 'waitFinish': 2, // 待完工、
'review': 3, // 审核中、 'audit': 3, // 审核中、
'exception': 4, // 异常单、 'exception': 4, // 异常单、
'finish': 5, //已完工 'finish': 5, //已完工
} }
...@@ -118,7 +121,7 @@ ...@@ -118,7 +121,7 @@
0: 'waitAppointment', 0: 'waitAppointment',
1: 'waitCheckIn', 1: 'waitCheckIn',
2: 'waitFinish', 2: 'waitFinish',
3: 'review', 3: 'audit',
4: 'exception', 4: 'exception',
5: 'finish' 5: 'finish'
} }
...@@ -134,7 +137,7 @@ ...@@ -134,7 +137,7 @@
this.pageNumber = 0 this.pageNumber = 0
this.orderList = [] this.orderList = []
this.loadStatus = 'loading' this.loadStatus = 'loading'
this.getOrderList(index === 0 ? 0 : 5) this.getOrderList(index === 0 ? this.currentIndex : 5)
}, },
// tab栏切换 // tab栏切换
change(index) { change(index) {
...@@ -187,8 +190,8 @@ ...@@ -187,8 +190,8 @@
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/ /*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
res.data.type = self.orderType res.data.type = self.orderType
if (res.data.list) { if (res.data.list) {
res.data.total = 15 if (res.data.list.length == 0 && res.data.total > 0) {
if (res.data.list.length == 0 && res.data.total > 0) { res.data.total = 15
res.data.list = [{ res.data.list = [{
orderServiceType: '安装', // 服务类型:安装、维修 orderServiceType: '安装', // 服务类型:安装、维修
categoryName: '充电桩', // 品类:充电桩 categoryName: '充电桩', // 品类:充电桩
...@@ -208,13 +211,13 @@ ...@@ -208,13 +211,13 @@
auditResults: {}, // 审核结果 auditResults: {}, // 审核结果
orderBusinessType: 'R', // 业务类型 R 为抢单 orderBusinessType: 'R', // 业务类型 R 为抢单
orderId:'1100000216' orderId:'1100000216'
}] }]
res.data.list = [...res.data.list, ...res.data.list, ...res.data.list, ...res.data
.list,
...res.data.list, ...res.data.list, ...res.data.list, ...res.data.list, ...res
.data.list, ...res.data.list
]
} }
res.data.list = [...res.data.list, ...res.data.list, ...res.data.list, ...res.data
.list,
...res.data.list, ...res.data.list, ...res.data.list, ...res.data.list, ...res
.data.list, ...res.data.list
]
} }
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/ /*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
...@@ -255,7 +258,9 @@ ...@@ -255,7 +258,9 @@
item.count = res.data.exceptionCount item.count = res.data.exceptionCount
} }
}) })
} }
// 修改tab总数
// ...
} else { } else {
console.log(res.message, "获取订单数量失败!"); console.log(res.message, "获取订单数量失败!");
} }
......
<!-- 过程反馈 --> <!-- 过程反馈 -->
<template> <template>
<view class="refuse-box bg"> <view class="refuse-box bg">
<u-navbar back-icon-color="#FFFFFF" :background="background" title="拒单" title-color="#fff" :border-bottom="false"></u-navbar> <u-navbar back-icon-color="#FFFFFF" :background="background" title-color="#fff" :border-bottom="false"></u-navbar>
<view class="title">拒单说明</view> <view class="title">拒单说明</view>
<view class="content"> <view class="content">
<view class="con-box"> <view class="con-box">
...@@ -17,22 +17,26 @@ ...@@ -17,22 +17,26 @@
</view> </view>
</view> </view>
</view> </view>
<view class="con-box"> <view class="con-box" style="padding-top: 10rpx;">
<view class="tit u-m-b-40">补充说明</view> <view class="tit u-m-b-20">补充说明</view>
<u-input v-model="formData.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input> <u-input v-model="formData.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分" :clearable="false"></u-input>
</view> </view>
</view> </view>
<view class="u-m-60"> <view class="bottom-btn-view">
<button :loading="submiting" :disabled="disabledSubmit" class="btn" @click="submitForm">确定</button> <button :loading="submiting" :disabled="disabledSubmit" class="btn bottom-btn" @click="handleClickSubmit"><text class="button-text">提交</text></button>
</view> </view>
<PopView title="拒单提示" message="确定“拒单”操作,将影响对您的派单频率,\n甚至进入黑名单,请谨慎操作"
:visible.sync="visibale" :count="count" @click="handleClick" buttonText="确定"/>
</view> </view>
</template> </template>
<script> <script>
import PopView from "@/components/popView/index.vue"
export default { export default {
data() { data() {
return { return {
visibale: false,
orderId: '', orderId: '',
submiting: false, submiting: false,
background: { background: {
...@@ -46,6 +50,7 @@ ...@@ -46,6 +50,7 @@
rejectReason: '', rejectReason: '',
remark: '' remark: ''
}, },
count: 0, // 剩余次数
}; };
}, },
computed: { computed: {
...@@ -53,7 +58,9 @@ ...@@ -53,7 +58,9 @@
return !this.formData.rejectReason return !this.formData.rejectReason
} }
}, },
components:{}, components:{
PopView
},
onLoad(e) { onLoad(e) {
this.orderId = 111 this.orderId = 111
if(e && e.orderId) { if(e && e.orderId) {
...@@ -64,6 +71,21 @@ ...@@ -64,6 +71,21 @@
changeReason(reason) { changeReason(reason) {
this.formData.rejectReason = reason this.formData.rejectReason = reason
}, },
handleClickSubmit() {
if (this.count > 0) {
this.visibale = true
} else {
uni.showToast({
icon: 'none',
title: '本月无拒单机会,请联系客服',
})
}
},
handleClick() {
this.visibale = false
this.submitForm()
},
async submitForm() { async submitForm() {
let self = this let self = this
self.submiting = true self.submiting = true
...@@ -88,13 +110,13 @@ ...@@ -88,13 +110,13 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.bg { .bg {
width: 750rpx; width: 750rpx;
height: 100vh; height: 100vh;
overflow: auto; overflow: auto;
background-color: #F4F5F7; background-color: #F4F5F7;
background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 100%); background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 50%);
background-size: 750rpx 600rpx; background-size: 750rpx 600rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
...@@ -107,6 +129,7 @@ ...@@ -107,6 +129,7 @@
border-radius: 12rpx; border-radius: 12rpx;
padding-bottom: 60rpx; padding-bottom: 60rpx;
background-color: #fff; background-color: #fff;
min-height: 800rpx;
} }
.con-box{ .con-box{
padding: 30rpx; padding: 30rpx;
...@@ -123,10 +146,11 @@ ...@@ -123,10 +146,11 @@
margin-right:-20rpx; margin-right:-20rpx;
.txt-item{ .txt-item{
border-radius: 12rpx; border-radius: 12rpx;
padding:24rpx 38rpx; padding-top:24rpx;
min-width: 196rpx; padding-bottom: 24rpx;
width: 196rpx;
text-align: center; text-align: center;
margin-right: 20rpx; margin-right: 22rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background-color: #F4F5F7; background-color: #F4F5F7;
&.active{ &.active{
...@@ -193,4 +217,21 @@ ...@@ -193,4 +217,21 @@
margin-right: 10rpx; margin-right: 10rpx;
color:#FA5A49 color:#FA5A49
} }
.bottom-btn-view {
width: 100%;
padding: 0 80rpx;
position: absolute;
bottom: 44rpx;
.bottom-btn {
height: 104rpx;
display: flex;
align-items: center;
justify-content: center;
.button-text {
font-size: 32rpx;
font-weight: bold;
}
}
}
</style> </style>
<template> <template>
<view class="container u-row-between" v-if="info"> <view class="container u-row-between" v-if="info">
<Settle :index="pageIndex"> <Settle :index="pageIndex" :type="1">
<view class="content-view"> <view class="content-view">
<!-- <view style="min-height: 120rpx;" v-if="status == 8"></view> --> <!-- <view style="min-height: 120rpx;" v-if="status == 8"></view> -->
<view class="u-flex u-row-center"> <view class="u-flex u-row-center">
......
...@@ -470,7 +470,7 @@ ...@@ -470,7 +470,7 @@
} }
.item { .item {
display: flex; display: flex;
padding: 28rpx 30rpx; padding: 28rpx 0rpx;
width: 100%; width: 100%;
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
......
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