Commit 7a4ee397 authored by zhengzy's avatar zhengzy

Merge branch 'master' of https://git.banshouhui.com/lijundan/self-support

# Conflicts:
#	src/pages/learn/index.vue
parents b97e6cba 5b812f62
import util from '@/utils/util.js'
let orderApiFun = function(vm){
let listByRecommendOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/recommend/order', params);
/**
* 工单数量查询接口
*/
let listOrderCount = async (params = {}) => await vm.$u.get('http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/queryOrdersCount/V2', params);
/**
* 工单列表接口
*/
let listOrder = async (params = {}) => await vm.$u.get('http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/revision/list', params);
/**
* 获取师傅的预约日历
*/
let workerCalendar = async (params = {}) => await vm.$u.get('http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/'+ vm.vuex_token+'/wokerOrder/appointment/calendar', params);
/**
* 师傅预约
*/
let workerAppointment = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/'+ vm.vuex_token+'/order/{orderId}', params,{'content-type': 'application/x-www-form-urlencoded'});
// 联系顾客时间更新接口,暂时没有
/**
* 师傅签到接口
*/
let maintainWorkerCheckin = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/{orderId}/maintainWorkerCheckin', params,{'content-type': 'application/x-www-form-urlencoded'});
const orderApi = {
listByRecommendOrder,
listOrderCount,
listOrder,
workerCalendar,
workerAppointment,
maintainWorkerCheckin
}
return orderApi
}
......
<!-- 预约时间 -->
<template>
<view :class="{'con-box':titleShow}">
<view class="title" v-if="titleShow">{{'预约时间'}}</view>
<view class="u-m-t-40">
<view class="appoint-box">
<view class="select-date">
<view class="u-flex u-row-between ">
<view class="txt">选择日期</view>
<view class="txt active">2021.04.21</view>
</view>
<view class="u-m-t-30 u-flex u-row-between date-list">
<view :class="{'date-item':true,'active':index===currentDay}"
@click="dateChange(item,index,dateList)" v-for="(item,index) in dateList" :key="index">
<text class="day">{{item.weekDay}}</text>
<text class="day day1">{{item.day}}</text>
</view>
<view class="next" @click="weekChange">
<u-icon name="arrow-right" color="#2979ff" size="28"></u-icon>
</view>
</view>
</view>
<!-- weekChange -->
<view class="select-time u-p-t-50">
<view class="u-flex u-row-between">
<view class="txt">选择时间</view>
<view class="txt active">14:00-16:00</view>
</view>
<view class="u-p-t-30 u-flex u-flex-wrap time-list">
<view @click="timeChange(item,index,timeList)"
:class="{'time-item':true,'active':index===currentTime}" v-for="(item,index) in timeList"
:key="index">
<text class="time">{{item}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
titleShow: {
type: Boolean,
default: true
},
},
data() {
return {
currentDay: 0,
currentTime: 0,
dateList: [{
weekDay: '周三',
day: '21'
}, {
weekDay: '周三',
day: '21'
}, {
weekDay: '周三',
day: '21'
}, {
weekDay: '周三',
day: '21'
}, {
weekDay: '周三',
day: '21'
}, {
weekDay: '周三',
day: '21'
}, ],
timeList: ['06:00-08:00', '06:00-08:00', '06:00-08:00', '06:00-08:00', '06:00-08:00', '06:00-08:00',
'06:00-08:00', '06:00-08:00', '06:00-08:00'
]
}
},
methods: {
getDateList() {
// 获取日期
},
dateChange(item, index, list) {
let data = {
item,
index,
list,
}
this.currentDay = index
this.$emit('date-change', data)
},
timeChange(item, index, list) {
let data = {
item,
index,
list,
}
this.currentTime = index
this.$emit('time-change', data)
},
weekChange(item, index, list) {
let data = {
item,
index,
list,
}
this.$emit('week-change', data)
},
}
}
</script>
<style lang="scss" scoped>
.con-box {
margin-top: 30rpx;
padding: 30rpx 30rpx 20rpx;
border-radius: 12rpx;
background-color: #FFFFFF;
.title {
font-weight: bold;
font-size: 32rpx;
line-height: 32rpx;
color: #333;
}
}
.txt {
font-size: 26rpx;
line-height: 26rpx;
color: #333;
&.active {
color: #2272FF
}
}
.date-list {
background-color: #F4F5F7;
.next{
width: 60rpx;
height: 120rpx;
line-height: 120rpx;
text-align: center;
border-left: 2rpx solid #fff;
}
.date-item {
padding: 20rpx 20rpx 16rpx;
border-radius: 12rpx;
.day {
display: block;
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 {
color: #2272FF;
&.day1 {
background-color: #2272FF;
color: #fff !important;
}
}
}
}
}
.time-list {
margin-bottom: -30rpx;
.time-item {
min-width: 196rpx;
margin-right: 21rpx;
margin-bottom: 24rpx;
border-radius: 12rpx;
padding: 26rpx 20rpx 24rpx;
background-color: #F4F5F7;
&:nth-child(3n) {
margin-right: 0;
}
&.active{
background-color: #2272FF;
.time{
color:#fff;
}
}
.time {
font-size: 26rpx;
line-height: 26rpx;
color: #999;
}
}
}
</style>
<template>
<view class="order-view">
<text>订单</text>
</view>
</template>
<script>
export default {
props: {
orderData: {
type: Object,
default: {}
}
},
data() {
return {
};
}
}
</script>
<style lang="scss" scoped>
.order-view {
width: 100%;
height: 200rpx;
}
<template>
<view class="order-cell">
<view class="order-view" @click="handleClickCell">
<view class="order-top-view">
<view class="left-view">
<view :class="['tag-view', {'active': active}]">
{{ orderData.orderServiceType }}
</view>
<view class="store-view">{{ orderData.categoryName }}</view>
</view>
<view class="right-view">{{ orderData.orderBusinessTypeText }}</view>
</view>
<view class="content-view">
<view class="info-view" v-for="(item, key) in infoTexts" :key="key">
<text>{{item + ':'}}</text>
<text>{{orderData[key]}}</text>
</view>
<view class="address-view">
<view class="address-left-view">
<image class="address-image" :src="dizhiImage" mode="widthFix"></image>
<text>{{orderData.contactAddress }}</text>
</view>
<view v-if="showDistance">
{{getDistance(orderData.contactAddressLatitud,orderData.contactAddressLongitud)}}km
</view>
</view>
</view>
<view class="line-view"></view>
<view class="reason-view" v-if="showReason"><text>未通过原因:</text>
<text class="reason-text">{{orderData.auditResults.remark}}</text>
</view>
<view class="bottom-view">
<view>
<view v-if="showCountTime" class="bottom-left-view">
<view :class="['bottom-tag-view', {'will': orderData.currentWillOverTime}]">{{tagText}}</view>
<u-count-down :timestamp="orderData.currentWillOverTime || orderData.currentOverTime"
font-size="44" color="#FF930D" @change="handleChange" ref="order-count-down"></u-count-down>
</view>
<view v-else-if="showTime">
<text>{{timeTitle}}</text>
<text>{{timeText}}</text>
</view>
</view>
<u-button class="right-btn" @click.stop="handleClick" :custom-style="buttonStyle" type="primary"
shape="circle">
{{orderText}}
</u-button>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
orderData: {
type: Object,
default () {
return {
orderServiceType: '安装', // 服务类型:安装、维修
categoryName: '充电桩', // 品类:充电桩
orderBusinessTypeText: '分配单', // 业务类型:分配单、订单池
orderNumber: 'OR2021041809827', // 工单编号
contactName: '郭小清', // 客户信息
contactPhone: '13631612077', // 联系方式
contactAddress: '湾街道荔枝花园D座125号', // 详细地址
contactAddressLatitud: '116.3896', // 联系人地址经度
contactAddressLongitud: '39.91917', // 联系人地址纬度
orderStatus: 0, // 工单状态
appointmentDatetime: '', // 预约时间
currentWillOverTime: 10000, // 剩余时间
currentOverTime: 0, // 超过时间
auditDatetime: '2021.04.19 12:45:09', // 审核时间
submissionTime: '2021.04.19 16:24:48', // 提交时间
auditResults: {}, // 审核结果
orderBusinessType: 'R', // 业务类型 R 为抢单
}
}
},
orderType: Number, // 0:待接单 1:'去预约', 2:'去签到', 3:'去完工', 4:'审核中', 5:'去处理', 6'已完工'
location: { // 当前坐标
type: Array,
default () {
return [116.3896, 39.91917] // 经度,纬度
}
}
},
data() {
return {
};
},
computed: {
/*
orderStatus:
待接单 orderStatus<31 工单状态小于31
待预约 orderStatus == 31 and appointmentDatetime == null 工单状态等于30并且预约时间为空
待签到 orderStatus == 31 and appointmentDatetime is not null 工单状态等于30并且预约时间不为空
待完工 orderStatus >31 and orderStatus < 80 工单状态大于31 小于80
审核中 orderStatus ==85 or orderStatus == 87 工单状态 等于85 或者 等于有87
异常 orderStatus ==86 or orderStatus == 88 工单状态 等于86 或者 等于有88
已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110
*/
orderText() { // 按钮文字
if (!this.orderType) {
if (this.orderData.orderStatus < 31) {
this.orderType = 0
} else if (this.orderData.orderStatus == 31) {
if (this.orderData.appointmentDatetime) {
return this.orderType = 2
} else {
this.orderType = 1
}
} else if (this.orderData.orderStatus > 31 && this.orderData.orderStatus < 80) {
this.orderType = 3
} else if (this.orderData.orderStatus == 85 && this.orderData.orderStatus == 87) {
this.orderType = 4
} else if (this.orderData.orderStatus == 86 && this.orderData.orderStatus == 88) {
this.orderType = 5
} else if ([80, 81, 89, 110].indexOf(this.orderData.orderStatus) != -1) {
this.orderType = 6
} else {
this.orderType = 0
}
}
return this.typeTexts[this.orderType]
},
buttonStyle() { // 按钮样式
switch (this.orderType) {
case 0:
if (this.orderData.orderBusinessType != 'R') {
return this.buttonStyles[0]
} else {
return this.buttonStyles[1]
}
case 1:
case 2:
case 3:
case 5:
return this.buttonStyles[0]
case 4:
case 6:
return this.buttonStyles[2]
}
},
showCountTime() {
return [1, 2, 3].indexOf(this.orderType) != -1 || (this.orderType == 0 && this.orderData
.orderBusinessType != 'R')
},
showTime() {
return [4, 6].indexOf(this.orderType) != -1
},
infoTexts() {
return {
'orderNumber': '工单编号',
'contactName': '客户信息',
'contactPhone': '联系方式'
}
},
typeTexts() {
return [this.type0Text, '去预约', '去签到', '去完工', '审核中', '去处理', '已完工']
},
type0Text() {
return this.orderData.orderBusinessType != 'R' ? '接单' : '抢单'
},
buttonStyles() {
return [{
'background-color': '#2272FF',
'color': '#FFFFFF',
'font-size': '32rpx',
'height': '80rpx',
'width': '200rpx'
}, {
'background-color': '#FF930D',
'color': '#FFFFFF',
'font-size': '32rpx',
'height': '80rpx',
'width': '200rpx'
}, {
'background-color': 'transparent',
'color': '#2272FF',
'font-size': '32rpx',
'height': '32rpx',
'width': '100rpx'
}]
},
buttonDisabled() {
return this.orderData.orderStatus == 4 || this.orderData.orderStatus == 6
},
dizhiImage() {
return process.uniEnv.qn_base_url + 'shouye-dizhi.png'
},
active() {
return this.orderData.orderServiceType == '安装'
},
tagText() {
return this.orderData.currentWillOverTime ? '剩' : '超'
},
timeText() {
return this.orderType == 4 ? this.orderData.submissionTime : this.orderData.auditDatetime
},
timeTitle() {
return this.orderType == 4 ? '提交时间:' : '审核时间:'
},
showReason() {
return this.orderType == 5
},
showDistance() {
return this.orderType == 0
}
},
methods: {
handleClick() {
if (this.buttonDisabled) return
this.$emit('action')
},
handleClickCell() {
this.$emit('click')
},
handleChange(timestamp) {
if (this.orderData.currentOverTime) this.$refs['order-count-down'].seconds += 2
},
getDistance(Latitud, Longitud) {
return this.distance(Latitud, Longitud, this.location[0], this.location[1])
},
/**
* echo distance(116.3896,39.91917,116.3940,39.91726);
* 计算两点之间直线距离
* @param float $lon1 经度
* @param float $lat1 维度
* @param float $lon2 经度
* @param float $lat2 维度
* @return float 浮点数
*/
distance(la1, lo1, la2, lo2) {
var La1 = la1 * Math.PI / 180.0;
var La2 = la2 * Math.PI / 180.0;
var La3 = La1 - La2;
var Lb3 = lo1 * Math.PI / 180.0 - lo2 * Math.PI / 180.0;
var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(La3 / 2), 2), Math.cos(La1) * Math.cos(La2) * Math.pow(
Math.sin(Lb3 / 2), 2)));
s = s * 6378.137; //地球半径
s = Math.round(s * 10000) / 10000;
// console.log("计算结果",s,'KM');
return s ? s.toFixed(2) : 0;
},
}
}
</script>
<style lang="scss" scoped>
.order-cell {
padding-bottom: 20rpx;
.order-view {
width: 100%;
background-color: #FFFFFF;
border-radius: 12rpx;
padding: 30rpx;
margin-bottom: 20rpx;
.order-top-view {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20rpx;
.left-view {
display: flex;
align-items: center;
.tag-view {
width: 84rpx;
height: 40rpx;
color: #FFFFFF;
border-radius: 8rpx;
background-image: linear-gradient(to right, #FF930D, #FFC174);
&.active {
background-image: linear-gradient(to right, #2272FF, #47ABFF);
}
}
.store-view {
color: #333333;
font-size: 36rpx;
font-weight: bold;
margin-left: 20rpx;
}
}
.right-view {
width: 100rpx;
height: 40rpx;
background-color: #F4F5F7;
border-radius: 20rpx;
color: #333333;
font-size: 22rpx;
line-height: 40rpx;
}
}
.content-view {
.info-view {
text-align: left;
color: #333333;
font-size: 26rpx;
margin-top: 12rpx;
margin-bottom: 12rpx;
}
.address-view {
display: flex;
align-items: flex-start;
justify-content: space-between;
color: #333333;
font-size: 24rpx;
margin-top: 12rpx;
.address-left-view {
display: flex;
align-items: center;
align-items: flex-start;
.address-image {
width: 26rpx;
height: 28rpx;
margin-right: 8rpx;
flex-shrink: 0;
margin-top: 4rpx;
}
}
.address-right-view {}
}
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
margin-top: 30rpx;
}
.reason-view {
text-align: left;
margin-top: 30rpx;
font-size: 26rpx;
color: #666666;
.reason-text {
color: #FA5A49;
}
}
.bottom-view {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 30rpx;
.bottom-left-view {
display: flex;
align-items: center;
.bottom-tag-view {
width: 52rpx;
height: 52rpx;
border-radius: 26rpx;
line-height: 56rpx;
color: #FFFFFF;
font-size: 26rpx;
background-color: #FA5A49;
margin-right: 20rpx;
&.will {
background-color: #FF930D;
}
}
}
.right-btn {}
}
}
}
</style>
......@@ -31,7 +31,13 @@
}
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
.settle-view {
::-webkit-scrollbar {
width: 0;
}
}
.introduction {
border-radius: 12rpx;
overflow: auto;
......
......@@ -21,8 +21,11 @@ Vue.use(httpInterceptor, app)
Vue.use(router)
// http接口API抽离,免于写url或者一些固定的参数
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)
Vue.use(httpApi, app)
// 分享
let mpShare = require('@/uview-ui/libs/mixin/mpShare.js')
Vue.mixin(mpShare)
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
RouterMount(app,router,'#app')
......
......@@ -21,6 +21,22 @@
"style": {
"navigationBarTitleText": "订单-完工配置"
}
},{
"path": "pages/order/feedback",
"style": {
"navigationBarTitleText": "订单-过程反馈",
"enablePullDownRefresh": false,
"navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true
}
},{
"path": "pages/order/refuse",
"style": {
"navigationBarTitleText": "订单-拒单",
"enablePullDownRefresh": false,
"navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true
}
},
{
"path": "pages/mine/index",
......@@ -97,7 +113,8 @@
"path": "pages/settle/select",
"style": {
"navigationBarTitleText": "选择可服务的城市",
"navigationBarBackgroundColor": "#FFFFFF"
"navigationBarBackgroundColor": "#FFFFFF",
"disableScroll": true
}
},
{
......@@ -174,6 +191,15 @@
"enablePullDownRefresh": false
}
}
,{
// 订单详情页
"path" : "pages/order/detail",
"style" :
{
"navigationStyle": "custom"// 隐藏系统导航栏
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
......@@ -227,8 +253,8 @@
"query": ""
},
{
"name": "基本信息", //模式名称
"path": "pages/settle/base", //启动页面,必选
"name": "订单详情", //模式名称
"path": "pages/order/detail", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
......@@ -251,10 +277,10 @@
"path": "pages/settle/file", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "缴纳保证金", //模式名称
"path": "pages/settle/pay-ensure", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
{
"name": "缴纳保证金", //模式名称
"path": "pages/settle/pay-ensure", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "签约页面", //模式名称
......@@ -262,8 +288,8 @@
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "订单 - 完工配置", //模式名称
"path": "pages/order/complete", //启动页面,必选
"name": "订单 - 过程反馈", //模式名称
"path": "pages/order/feedback", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}
]
......
......@@ -53,7 +53,7 @@
</view>
<view class="bottomRightView">
<view :class="isSelect ? 'nextBtn selectBackColor' : 'nextBtn defaultBackColor' "
@click="nextClick()">
@click="handleClick()">
<text class="bottomTitle">{{bottomTitle}}</text>
</view>
</view>
......@@ -300,7 +300,7 @@
that.vuex_token +
'?userExamId=' + this.userExamId +
'&questionId=' + questionId +
'&userAnswerIds=' + this.userAnswerIds,
'&userAnswerIds=' + (this.userAnswerIds || '9999'), // 9999超时自动下一题
method: 'POST',
data: {
// userExamId:this.userExamId,
......@@ -372,7 +372,6 @@
},
startCounting: function() {
if (this.isStop) {
return
}
......@@ -441,16 +440,18 @@
},
// 点击下一步
handleClick() {
// 判断有没有选
if (!this.isSelect) {
return
}
this.nextClick()
},
//下一题
nextClick: function() {
//判断有没有选
if (!this.isSelect) {
return
}
clearTimeout(this.timer)
this.currentNumber = this.currentNumber + 1
......
<template>
<view class="content">
<!-- <scroll-view class="scroll-view" scroll-y style="height: 100%; width: 100%" @scrolltolower="reachBottom"
@scroll="handleScroll" refresher-enabled :refresher-triggered="triggered" @refresherrefresh="onRefresh"
scroll-anchoring @refresherrestore="onRestore" @refresherpulling="triggered = true" :show-scrollbar="false"
enable-back-to-top> -->
<view style="width: 700rpx; height: 800rpx">
<!-- <view class="title-view">充电桩自营平台</view> -->
<u-navbar
:is-back="false"
background="{background: transparent}"
:is-fixed="false"
:background="{ background: 'transparent' }"
:border-bottom="false"
:is-fixed="false"
>
<text class="title-view">充电桩自营平台</text>
</u-navbar>
......@@ -76,7 +72,7 @@
class="order-item-view"
>
<view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item"> </OrderCell>
<OrderCell :orderData="item" :orderType="0" :location="location" @click="handleClick" @action="handleAction"> </OrderCell>
</view>
<u-loadmore
:status="currentLoadStatus"
......@@ -110,7 +106,8 @@ export default {
data() {
return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
triggered: false,
triggered: false,
location: [116.3896, 39.91917], // 经纬度
// list: [
// {
// image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
......@@ -183,7 +180,14 @@ export default {
this.loadOrderList();
}
},
methods: {
methods: {
handleClick() { // 点击了cell
console.log('点击了cell')
},
handleAction() { // 点击了按钮
console.log('点击了按钮')
},
async initSettleInfo() {
let self = this;
if (self.status == 7) return;
......
......@@ -162,6 +162,7 @@
</template>
<script>
<<<<<<< .merge_file_a10028
export default {
data() {
return {
......@@ -359,6 +360,148 @@
},
},
};
=======
export default {
data() {
return {
banner: [
{
image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
title: "昨夜星辰昨夜风,画楼西畔桂堂东",
},
{
image: "https://cdn.uviewui.com/uview/swiper/2.jpg",
title: "身无彩凤双飞翼,心有灵犀一点通",
},
{
image: "https://cdn.uviewui.com/uview/swiper/3.jpg",
title: "谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳",
},
],
tabs: [
{
name: "交付规范",
},
{
name: "培训通知",
},
{
name: "在线学习",
},
{
name: "考核认证",
},
],
current: 0,
swiperCurrent: 0,
params: {
start: 0,
},
list: [],
loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore: false, //是否加载中
};
},
onLoad() {
this.getList();
this.$u.mpShare.path = ''
},
methods: {
getList() {
this.$u.api
.getTrainingNoticeList(this.params)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.list = this.list.concat(res.data);
if (res.data.length < 5) {
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true;
this.loadStatus = "nomore";
} else {
this.isLoadMore = false;
}
} else {
this.isLoadMore = true;
this.loadStatus = "nomore";
}
} else {
//接口请求失败的处理
uni.showToast({ title: res.message, icon: "none" });
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
//tabs通知swiper切换
tabsChange(index) {
this.swiperCurrent = index;
},
//swiper-item左右移动,通知tabs的滑块跟随移动
transition(e) {
let dx = e.detail.dx;
this.$refs.uTabs.setDx(dx);
},
animationfinish(e) {
let current = e.detail.current;
this.$refs.uTabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
//跳转到assessment页面
aaa() {
wx.navigateTo({
url: "./assessment",
});
},
//跳转到
bbb() {
wx.navigateTo({
url: "./news-details",
});
},
//scroll-view到底部加载更多
onreachBottom() {
console.log("上拉触底函数");
//上拉触底函数
if (!this.isLoadMore) {
this.isLoadMore = true;
this.params.start += 5;
if (this.loadStatus !== "nomore") {
this.getList();
}
}
},
//跳转到拍照小程序首页
goToPrint() {
console.log("111111");
uni.navigateToMiniProgram({
appId: "wxd1d6eede324b0465",
success(res) {
//打开成功
console.log("success", res);
},
fail(err) {
console.log("err", err);
},
});
},
},
};
>>>>>>> .merge_file_a11812
</script>
<style>
......
......@@ -33,7 +33,10 @@
console.log(news,'news')
})
}
},
onLoad() {
this.$u.mpShare.path = ''
},
}
</script>
......
<template>
<view class="order-wrap">
<u-navbar back-icon-color="#FFFFFF" :background="background" :border-bottom="false"></u-navbar>
<view class="header">
<view class="title">订单信息</view>
<view v-show="allowRejection" class="button" @click="rejectOrder">拒单</view>
</view>
<view class="content">
<view class="card base-item">
<view class="top-item">
<view class="left">
<view class="tag">{{ order.orderServiceType }}</view>
<text class="title">{{ order.categoryName }}</text>
</view>
<view class="right">分配单</view>
</view>
<view class="order-cell">
<text>工单编号:</text>
<text>{{ order.orderNumber }}</text>
</view>
<view class="order-cell between-cell">
<view class="left">
<text>客户信息:</text>
<text>{{ order.contactName }}</text>
</view>
<u-image width="60rpx" height="60rpx" :src="phoneIcon"></u-image>
</view>
<view class="order-cell">
<text>联系方式:</text>
<text>{{ order.contactPhone }}</text>
</view>
<view class="between-cell address-cell">
<view class="left">
<u-icon name="map" size="28"></u-icon>
<text class="address-txt">{{ order.contactAddress }}</text>
</view>
<u-image width="60rpx" height="60rpx" :src="navigationIcon"></u-image>
</view>
</view>
<view class="card order-item">
<view class="top-item">
<text class="title">订单内容</text>
</view>
<view class="order-cell between-cell">
<text>品牌:</text>
<text>{{ order.brandName }}</text>
</view>
<view class="order-cell between-cell">
<text>数量:</text>
<text>x{{ order.orderProductCount }}</text>
</view>
<view class="order-cell between-cell">
<text>信息:</text>
<text>{{ order.serviceContent }}</text>
</view>
<view class="order-cell between-cell">
<text>备注:</text>
<text>{{ order.serviceContent }}</text>
</view>
</view>
<view class="card order-item record-item">
<view class="top-item">
<text class="title">履约记录</text>
</view>
<view class="order-cell between-cell">
<text>接单时间:2021.04.21 16:40:35</text>
</view>
</view>
<view class="card appoint-item">
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
</view>
<view class="toolbar">
<!-- view用于占位 -->
<view class="left">
<view v-show="allowFeedback" @click="clickFeedback" class="button"></view>
</view>
<view class="center">
<view v-if="centerButton=='appoint'" @click="clickCenterButton" class="button" :class="centerButtonClass">
{{ centerButtonText }}
</view>
</view>
<view class="right">
<view v-show="allowFeedback" @click="clickFeedback" class="button"></view>
</view>
</view>
</view>
</template>
<script>
import appointTime from '@/components/appoint/appoint-time.vue'
export default {
components:{
appointTime
},
data() {
return {
background: {
backgroundColor: 'none',
// 导航栏背景图
// background: 'url(https://cdn.uviewui.com/uview/swiper/1.jpg) no-repeat',
// 还可以设置背景图size属性
// backgroundSize: 'cover',
// 渐变色
},
orderId: null,
order: {},
allowRejection: false, // 允许拒单
allowFeedback: true, // 允许过程反馈
needPhotograph: true, // 需要现场拍摄
centerButton: 'appoint', // 是否显示按钮
centerButtonText: '预约',
};
},
onLoad(e) {
if(e && e.id) {
this.orderId = e.id
} else {
// 异常处理
}
this.loadOrderDetail()
},
computed: {
phoneIcon() {
return process.uniEnv.qn_base_url + 'icon/dianhua-1@2x.png'
},
navigationIcon() {
return process.uniEnv.qn_base_url + 'icon/daohang-1@2x.png'
},
centerButtonClass() {
let btnClass = "appoint-btn"
return btnClass
},
},
methods: {
loadOrderDetail() {
let self = this
let timestamp = new Date().getTime();
let order = {
brandName: '沃尔沃',
categoryId: 1,
categoryName: '充电桩',
contactAddress: '湾街道荔枝花园D座125号',
contactAddressLatitud: '116.3896',
contactAddressLongitud: '39.91917',
contactCity: 4403,
contactCityText: '深圳市',
contactCommunity: 440306,
contactCommunityText: '宝安区',
contactId: 1,
contactName: '郭小清',
contactPhone: '13631612077',
contactProvince: 44,
contactProvinceText: '广东省',
contactStreet: 44030601,
contactStreetText: '新安街道',
lianbaoBrandId: 1,
orderBusinessType: 'R',
orderId: 1,
orderNumber: 'OR2021041809827',
orderProductCount: 1,
orderServiceType: '安装',
orderStatus: '30',
serviceContent: '沃尔沃全球标充电桩(国标32A,4G联网)',
orderBusinessTypeText: '订单池',
auditResults: [],
currentWillOverTime: timestamp,
currentOverTime: timestamp,
appointmentDatetime: timestamp,
auditDatetime: timestamp,
}
self.order = order
},
/**
* 拒单
*/
rejectOrder() {
console.log("点击拒单")
},
/**
* 点击下一周
* @param {Object} data
*/
weekChange(data){
console.log(data,'week-data')
},
/**
* 点击日期选择
* @param {Object} data
*/
dateChange(data){
console.log(data,'week-data')
},
/**
* 时间段选择变化
* @param {Object} data
*/
timeChange(data){
console.log(data,'week-data')
},
clickCenterButton() {
},
}
}
</script>
<style lang="scss">
.order-wrap {
width: 750rpx;
height: 100vh;
overflow: auto;
background-color: #F4F5F7;
background-image: linear-gradient(to top, #F4F5F7 , #2272FF);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
.header {
padding: 12rpx 30rpx 40rpx 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.title {
font-size: 40rpx;
font-weight: bold;
color: #FFFFFF;
}
.button {
text-align: center;
width: 106rpx;
height: 52rpx;
background: #FFFFFF;
border-radius: 40rpx;
font-size: 24rpx;
font-weight: 400;
color: #2272FF;
line-height: 52rpx;
}
}
.content{
height: 2000rpx;
.card {
background-color: #FFFFFF;
margin: 0 30rpx 20rpx 30rpx;
padding: 30rpx 30rpx 0 30rpx;
border-radius: 6px;
}
.base-item {
padding-bottom: 36rpx;
.top-item {
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
.left {
display: flex;
align-items: center;
.tag {
text-align: center;
width: 84rpx;
height: 40rpx;
background-image: linear-gradient(270deg, #47ABFF 0%, #2272FF 100%);
border-radius: 8rpx;
font-size: 22rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 40rpx;
}
.title {
margin-left: 30rpx;
height: 36rpx;
font-size: 36rpx;
font-weight: bold;
color: #333333;
line-height: 36rpx;
}
}
.right {
text-align: center;
width: 100rpx;
height: 40rpx;
background: #F4F5F7;
border-radius: 22rpx;
font-size: 22rpx;
font-weight: 400;
color: #333333;
line-height: 40rpx;
}
}
.address-cell {
height: 24rpx;
font-size: 24rpx;
font-weight: 400;
color: #333333;
line-height: 24rpx;
.left {
.address-txt {
margin-left: 8rpx;
}
}
}
}
.order-item {
padding-bottom: 34rpx;
.top-item {
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
.title {
height: 36rpx;
font-size: 36rpx;
font-weight: bold;
color: #333333;
line-height: 36rpx;
}
}
.address-cell {
height: 24rpx;
font-size: 24rpx;
font-weight: 400;
color: #333333;
line-height: 24rpx;
.left {
.address-txt {
margin-left: 8rpx;
}
}
}
}
.record-item {
}
.appoint-item {
padding: 0;
}
}
.toolbar {
margin-bottom: 104rpx;
display: flex;
justify-content: center;
align-items: center;
.left {
width: 100rpx;
height: 100rpx;
.button {
width: 100rpx;
height: 100rpx;
background: #929CB8;
border-radius: 100rpx;
}
}
.center {
width: 140rpx;
height: 140rpx;
margin-left: 74rpx;
margin-right: 74rpx;
.button {
width: 140rpx;
height: 140rpx;
border-radius: 100rpx;
display: flex;
justify-content: center;
align-items: center;
color: #FFFFFF;
font-size: 32rpx;
font-weight: bold;
}
.appoint-btn {
background: #2272FF;
box-shadow: 2px 2px 20px 0px rgba(34, 114, 255, 0.3);
}
.sign-timeout-btn {
background: #FA5A49;
box-shadow: 2px 2px 20px 0px rgba(34, 114, 255, 0.3);
}
.appoint-btn {
background: #2272FF;
box-shadow: 2px 2px 20px 0px rgba(34, 114, 255, 0.3);
}
}
.right {
width: 100rpx;
height: 100rpx;
.button {
width: 100rpx;
height: 100rpx;
background: #12CF84;
border-radius: 100rpx;
}
}
}
}
// 页面公用css
.order-cell {
height: 48rpx;
font-size: 26rpx;
font-weight: 400;
color: #333333;
line-height: 48rpx;
margin-bottom: 30rpx;
}
.between-cell {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>
<!-- 过程反馈 -->
<template>
<view class="feedback-box bg">
<u-navbar back-icon-color="#FFFFFF" :background="background" title="过程反馈" title-color="#fff" :border-bottom="false"></u-navbar>
<view class="content u-p-l-30 u-p-r-30">
<view class="width-320 u-m-t-20">
<u-subsection
:bold="false"
:current="curNow"
:list="list"
active-color="white"
bg-color="white"
height="72"
inactive-color="#666"
button-color="#2272FF"
border-radius="36"
></u-subsection>
</view>
<view class="con-box">
<view class="title">{{feedback.own.title}}</view>
<view class="u-flex u-flex-wrap">
<view :class="{'txt-item':true,'active':true}" v-for="(txt,index) in feedback.own.list" :key="index">
<text class="txt">{{txt}}</text>
</view>
</view>
</view>
<view class="con-box">
<view class="title">{{feedback.type.title}}</view>
<view class="u-flex u-flex-wrap">
<view :class="{'txt-item':true,'active':false}" v-for="(txt,index) in feedback.type.list" :key="index">
<text class="txt">{{txt}}</text>
</view>
</view>
<u-input class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input>
</view>
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
<view class="u-m-60">
<button class="btn">确定</button>
</view>
</view>
</template>
<script>
import appointTime from '@/components/appoint/appoint-time.vue'
export default {
data() {
return {
background: {
backgroundColor: 'none',
},
// questionList: ['个人', '客户', '现场/客户'],
feedback: {
own:{
title:'问题归属',
list:['个人', '客户', '现场/客户'],
},
type:{
title:'问题类型',
list:['有事耽搁', '未带齐工具', '个人改约','其他']
},
appoint:{
title:'预约时间',
}
},
list:['报备','预约'],
curNow: 1
};
},
components:{
appointTime
},
methods: {
/**
* 拒单
*/
rejectOrder() {
console.log("点击拒单")
},
sectionChange(index) {
this.curNow = index;
},
weekChange(data){
// 点击下一周
console.log(data,'week-data')
},
dateChange(data){
// 点击日期选择
console.log(data,'week-data')
},
timeChange(data){
// 时间段选择变化
console.log(data,'week-data')
},
}
}
</script>
<style lang="scss">
.bg {
width: 750rpx;
height: 100vh;
overflow: auto;
background-color: #F4F5F7;
background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 100%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
}
/deep/ .u-subsection{
padding:4rpx!important;
}
.con-box{
margin-top:30rpx;
padding:30rpx 30rpx 30rpx 20rpx;
border-radius: 12rpx;
background-color: #FFFFFF;
.title{
font-weight: bold;
font-size: 32rpx;
line-height: 32rpx;
color: #333;
}
&>.u-flex{
margin-top:40rpx;
margin-right:-20rpx;
.txt-item{
border-radius: 12rpx;
padding:24rpx 38rpx;
min-width: 196rpx;
text-align: center;
margin-right: 20rpx;
margin-bottom: 20rpx;
background-color: #F4F5F7;
&.active{
background-color: #2272FF;
.txt{
color: #fff;
}
}
}
}
.txt{
display:block;
font-size: 26rpx;
line-height: 26rpx;
color: #333;
}
.textarea{
/deep/ .u-input{
textarea{
margin-top:20rpx;
border: 2rpx solid #ECECEC;
padding:18rpx 30rpx;
}
}
}
}
.btn{
padding:30rpx;
border-radius: 52rpx;
line-height: 44rpx;
font-size:32rpx;
text-align: center;
background-color: #2272FF;
color:#fff;
&::after{
content:'';
height:0;
}
}
.width-320{
width:320rpx;
}
</style>
......@@ -4,13 +4,14 @@
<view class="tools-box">
<view class="search-sub">
<u-subsection
:current="0"
:list="['待受理', '待完工']"
:current="curNow"
:list="['待受理', '已完工']"
active-color="white"
bg-color="white"
inactive-color="#666"
button-color="#2272FF"
border-radius="36"
@change="sectionChange"
></u-subsection>
</view>
<view class="search-btn">
......@@ -18,7 +19,7 @@
<text class="search-btn-text">搜订单</text>
</view>
</view>
<view class="u-tabs-box">
<view class="u-tabs-box" v-show="showSview">
<u-tabs-swiper
activeColor="#2272FF"
bg-color="none"
......@@ -33,47 +34,41 @@
swiperWidth="750"
></u-tabs-swiper>
</view>
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
<swiper v-show="showSview" class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
<view class="page-box">
<view class="order" v-for="(res, index) in orderList[0]" :key="res.id">
<view class="order" v-for="(res, index) in orderList" :key="res.id">
<view class="top">
<view class="left">
<view class="tag">安装</view>
<view class="store">{{ res.store }}</view>
<view class="tag">{{ res.orderServiceType }}</view>
<view class="store">{{ res.categoryName }}</view>
<view >{{ res.orderNumber }}</view>
</view>
<view class="right">{{ res.deal }}</view>
<view class="right">{{ res.orderBusinessTypeText }}</view>
</view>
<view class="item" v-for="(item, idx) in res.goodsList" :key="idx">
<view class="content">
<view class="title u-line-2">
<text>工单编号:</text><text>{{ "OR2021041809827" }}</text>
</view>
<view class="title u-line-2">
<text>客户信息:</text><text>{{ "王先生" }}</text>
</view>
<view class="title u-line-2">
<text>联系方式:</text><text>{{ '189xxxxxxxx' }}</text>
</view>
<view class="content">
<view class="title u-line-2">
<text>{{res.contactName }}</text> <text style="margin-left: 8rpx;">{{ res.contactPhone }}</text>
</view>
<view class="address u-line-2">
<view class="left">
<u-icon name="map" size="32"></u-icon>
<text style="margin-left: 8rpx;">深圳市龙岗区南湾街道荔枝花园D座125号</text>
</view>
<view class="right">10.01km</view>
</view>
<view class="address u-line-2">
<view class="left">
<view ><u-icon name="map" size="32"></u-icon>
<text style="margin-left: 8rpx;">{{res.contactAddress }}</text></view>
</view>
<view class="right">{{getDistance(res.contactAddressLatitud,res.contactAddressLongitud)}}km</view>
</view>
<u-divider margin-top="16" half-width="630" border-color="#F4F5F7" :use-slot="false">
</u-divider>
<view class="bottom">
<view class="left">
<view class="tag">剩</view>
<u-count-down :timestamp="timestamp" font-size="44" color="#FF930D"></u-count-down>
<view class="tag">{{res.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</view>
<u-count-down :timestamp="timestampDiff(res.currentOverTime)" font-size="44" color="#FF930D" :ref="'uCountDown' + index" @change="timeChange(res.currentOverTime,index)" >
</u-count-down>
</view>
<view class="right-btn">
去预约
<view class="right-btn" @click="viewOderItem">
<text>去预约</text>
</view>
</view>
</view>
......@@ -81,12 +76,52 @@
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
<view class="page-box">
<view class="order" v-for="(res, index) in orderList" :key="res.id">
<view class="top">
<view class="left">
<view class="tag">{{ res.orderServiceType }}</view>
<view class="store">{{ res.categoryName }}</view>
<view >{{ res.orderNumber }}</view>
</view>
<view class="right">{{ res.orderBusinessTypeText }}</view>
</view>
<view class="content">
<view class="title u-line-2">
<text>{{res.contactName }}</text> <text style="margin-left: 8rpx;">{{ res.contactPhone }}</text>
</view>
</view>
<view class="address u-line-2">
<view class="left">
<view ><u-icon name="map" size="32"></u-icon>
<text style="margin-left: 8rpx;">{{res.contactAddress }}</text></view>
</view>
<view class="right">{{getDistance(res.contactAddressLatitud,res.contactAddressLongitud)}}km</view>
</view>
<u-divider margin-top="16" half-width="630" border-color="#F4F5F7" :use-slot="false">
</u-divider>
<view class="bottom">
<view class="left">
<view class="tag">{{res.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</view>
<u-count-down :timestamp="timestampDiff(res.currentOverTime)" font-size="44" color="#FF930D" :ref="'uCountDown' + index" @change="timeChange(res.currentOverTime,index)" >
</u-count-down>
</view>
<view class="right-btn">
<text>去签到</text>
</view>
</view>
</view>
<u-loadmore :status="loadStatus[0]" bgColor="#f2f2f2"></u-loadmore>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;">
<scroll-view scroll-y style="height: 100%;width: 100%;" v-if="orderList.length<2">
<view class="page-box">
<view>
<view class="centre">
......@@ -100,9 +135,178 @@
</view>
</view>
</scroll-view>
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" v-else>
<view class="page-box">
<view class="order" v-for="(res, index) in orderList" :key="res.id">
<view class="top">
<view class="left">
<view class="tag">{{ res.orderServiceType }}</view>
<view class="store">{{ res.categoryName }}</view>
<view >{{ res.orderNumber }}</view>
</view>
<view class="right">{{ res.orderBusinessTypeText }}</view>
</view>
<view class="content">
<view class="title u-line-2">
<text>{{res.contactName }}</text> <text style="margin-left: 8rpx;">{{ res.contactPhone }}</text>
</view>
</view>
<view class="address u-line-2">
<view class="left">
<view ><u-icon name="map" size="32"></u-icon>
<text style="margin-left: 8rpx;">{{res.contactAddress }}</text></view>
</view>
<view class="right">{{getDistance(res.contactAddressLatitud,res.contactAddressLongitud)}}km</view>
</view>
<u-divider margin-top="16" half-width="630" border-color="#F4F5F7" :use-slot="false">
</u-divider>
<view class="bottom">
<view class="left">
<view class="tag">{{res.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</view>
<u-count-down :timestamp="timestampDiff(res.currentOverTime)" font-size="44" color="#FF930D" :ref="'uCountDown' + index" @change="timeChange(res.currentOverTime,index)" >
</u-count-down>
</view>
<view class="right-btn" @click="viewOderItem">
<text>去完工</text>
</view>
</view>
</view>
<u-loadmore :status="loadStatus[0]" bgColor="#f2f2f2"></u-loadmore>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
<view class="page-box">
<view class="order" v-for="(res, index) in orderList" :key="res.id">
<view class="top">
<view class="left">
<view class="tag">{{ res.orderServiceType }}</view>
<view class="store">{{ res.categoryName }}</view>
<view >{{ res.orderNumber }}</view>
</view>
<view class="right">{{ res.orderBusinessTypeText }}</view>
</view>
<view class="content">
<view class="title u-line-2">
<text>{{res.contactName }}</text> <text style="margin-left: 8rpx;">{{ res.contactPhone }}</text>
</view>
</view>
<view class="address u-line-2">
<view class="left">
<view ><u-icon name="map" size="32"></u-icon>
<text style="margin-left: 8rpx;">{{res.contactAddress }}</text></view>
</view>
<view class="right">{{getDistance(res.contactAddressLatitud,res.contactAddressLongitud)}}km</view>
</view>
<u-divider margin-top="16" half-width="630" border-color="#F4F5F7" :use-slot="false">
</u-divider>
<view class="bottom">
<view class="left">
<view class="tag">{{res.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</view>
<u-count-down :timestamp="timestampDiff(res.currentOverTime)" font-size="44" color="#FF930D" :ref="'uCountDown' + index" @change="timeChange(res.currentOverTime,index)" >
</u-count-down>
</view>
<view class="right-btn" @click="viewOderItem">
<text>审核中</text>
</view>
</view>
</view>
<u-loadmore :status="loadStatus[0]" bgColor="#f2f2f2"></u-loadmore>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
<view class="page-box">
<view class="order" v-for="(res, index) in orderList" :key="res.id">
<view class="top">
<view class="left">
<view class="tag">{{ res.orderServiceType }}</view>
<view class="store">{{ res.categoryName }}</view>
<view >{{ res.orderNumber }}</view>
</view>
<view class="right">{{ res.orderBusinessTypeText }}</view>
</view>
<view class="content">
<view class="title u-line-2">
<text>{{res.contactName }}</text> <text style="margin-left: 8rpx;">{{ res.contactPhone }}</text>
</view>
</view>
<view class="address u-line-2">
<view class="left">
<view ><u-icon name="map" size="32"></u-icon>
<text style="margin-left: 8rpx;">{{res.contactAddress }}</text></view>
</view>
<view class="right">{{getDistance(res.contactAddressLatitud,res.contactAddressLongitud)}}km</view>
</view>
<u-divider margin-top="16" half-width="630" border-color="#F4F5F7" :use-slot="false">
</u-divider>
<view class="bottom">
<view class="left">
<view class="tag">{{res.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</view>
<u-count-down :timestamp="timestampDiff(res.currentOverTime)" font-size="44" color="#FF930D" :ref="'uCountDown' + index" @change="timeChange(res.currentOverTime,index)" >
</u-count-down>
</view>
<view class="right-btn" @click="viewOderItem">
<text>去处理</text>
</view>
</view>
</view>
<u-loadmore :status="loadStatus[0]" bgColor="#f2f2f2"></u-loadmore>
</view>
</scroll-view>
</swiper-item>
</swiper>
<swiper v-show="!showSview" class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
<view class="page-box">
<view class="order" v-for="(res, index) in orderList" :key="res.id">
<view class="top">
<view class="left">
<view class="tag">{{ res.orderServiceType }}</view>
<view class="store">{{ res.categoryName }}</view>
<view >{{ res.orderNumber }}</view>
</view>
<view class="right">{{ res.orderBusinessTypeText }}</view>
</view>
<view class="content">
<view class="title u-line-2">
<text>{{res.contactName }}</text> <text style="margin-left: 8rpx;">{{ res.contactPhone }}</text>
</view>
</view>
<view class="address u-line-2">
<view class="left">
<view >
<u-icon name="map" size="32"></u-icon>
<text style="margin-left: 8rpx;">{{res.contactAddress }}</text>
<text style="margin-left: 200rpx; font-size:large;" @click="viewOderItem" > > </text>
</view>
</view>
</view>
<u-divider margin-top="16" half-width="630" border-color="#F4F5F7" :use-slot="false">
</u-divider>
<view class="bottom">
<view class="left">
<text>审核时间 :</text><text>{{res.auditDatetime}}</text>
</view>
<view >
<text>已完工</text>
</view>
</view>
</view>
<!-- <u-loadmore :status="loadStatus[0]" bgColor="#f2f2f2"></u-loadmore> -->
</view>
</scroll-view>
</swiper-item>
</swiper>
......@@ -114,8 +318,12 @@
export default {
data() {
return {
timestamp: 6666,
orderList: [[], [], [], []],
showSview : true,
curNow : 0,
timestamp:1000,
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus:{0:'waitAccept',1:'waitAppointment',2:'waitCheckIn',3:'waitFinish',4:'exception',5:'finish'},
orderList: [],
dataList: [
{
id: 1,
......@@ -219,13 +427,15 @@ export default {
swiperCurrent: 0,
tabsHeight: 0,
dx: 0,
loadStatus: ['loadmore', 'loadmore', 'loadmore', 'loadmore']
loadStatus: ['loadmore', 'loadmore', 'loadmore', 'loadmore'],
dataValue:[],
total:0
};
},
onLoad() {
this.getLocation();
this.getOrderCount();
this.getOrderList(0);
this.getOrderList(1);
this.getOrderList(3);
},
computed: {
// 价格小数
......@@ -244,6 +454,76 @@ export default {
}
},
methods: {
sectionChange(index){
if(index === 1){
this.showSview = false
// 加载已完工的数据
this.getOrderList(5)
}else {
this.showSview = true
// 加载已完工的数据
this.getOrderList(0)
}
this.curNow = index;
},
timeChange(currentOverTime,index){
let self = this
var nowTime = new Date(); // 当前时间
if(nowTime.getTime() > currentOverTime*1000){
self.$refs['uCountDown'+index][0].seconds += 2
}
},
timestampDiff(currentOverTime){
var nowTime = new Date(); // 当前时间
if(nowTime.getTime() > currentOverTime*1000){
var diff = nowTime.getTime() - (currentOverTime*1000);
}else{
var diff = (currentOverTime*1000) - nowTime.getTime();
}
return diff;
},
/**
* 获取当前位置的经纬度
*/
getLocation() {
let self = this
const dataValue = this.dataValue || []
const waterInfo = this.waterInfo
uni.getLocation({
type: 'gcj02',
success: function(res) {
dataValue.push(res.longitude)
dataValue.push(res.latitude)
self.dataValue = dataValue
},
fail(err) {
}
});
},
getDistance(Latitud, Longitud){
return this.distance(Latitud,Longitud,this.dataValue[0],this.dataValue[1])
},
/**
* echo distance(116.3896,39.91917,116.3940,39.91726);
* 计算两点之间直线距离
* @param float $lon1 经度
* @param float $lat1 维度
* @param float $lon2 经度
* @param float $lat2 维度
* @return float 浮点数
*/
distance(la1, lo1, la2, lo2) {
var La1 = la1 * Math.PI / 180.0;
var La2 = la2 * Math.PI / 180.0;
var La3 = La1 - La2;
var Lb3 = lo1 * Math.PI / 180.0 - lo2 * Math.PI / 180.0;
var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(La3 / 2), 2),Math.cos(La1) * Math.cos(La2) * Math.pow(Math.sin(Lb3 / 2), 2)));
s = s * 6378.137;//地球半径
s = Math.round(s * 10000) / 10000;
// console.log("计算结果",s,'KM');
return s?s.toFixed(2):0;
},
reachBottom() {
// 此tab为空数据
if (this.current != 2) {
......@@ -254,14 +534,65 @@ export default {
}
},
// 页面数据
getOrderList(idx) {
for (let i = 0; i < 5; i++) {
let index = this.$u.random(0, this.dataList.length - 1);
let data = JSON.parse(JSON.stringify(this.dataList[index]));
data.id = this.$u.guid();
this.orderList[idx].push(data);
}
this.loadStatus.splice(this.current, 1, 'loadmore');
getOrderList(index) {
// 状态处理
console.log("chage:",this.indexStatus[index])
var page=0
var pageSize=10
var param = {pageNumber:page,pageSize:pageSize,keyword:'',type:this.indexStatus[index]}
var self = this;
self.$u.api.listOrder(param).then((res) => {
if (res.code == 200) {
console.log("getOrderList",res.data)
if (res.data) {
self.orderList = res.data.list;
//测试使用
self.orderList.forEach((item,index)=>{
if(index === 1){
item.currentOverTime -= 10
}
})
self.total =res.data.total;
}
} else {
console.log(res.message, "获取订单数量失败!");
}
});
// for (let i = 0; i < indexStatus.size; i++) {
// let index = this.$u.random(0, this.dataList.length - 1);
// let data = JSON.parse(JSON.stringify(this.dataList[index]));
// data.id = this.$u.guid();
// this.orderList[idx].push(data);
// }
// this.loadStatus.splice(this.current, 1, 'loadmore');
},
// 获取订单数量
getOrderCount() {
var self = this; // 加载订单列表
self.$u.api.listOrderCount().then((res) => {
if (res.code == 200) {
console.log("===",res.data)
if (res.data) {
self.list.forEach(item=>{
if(item.name==='待预约'){
item.count=res.data.toAppointmentCount
}else if(item.name==='待签到'){
item.count=res.data.toCheckinCount
}else if(item.name==='待完工'){
item.count=res.data.toFinishCount
}else if(item.name==='待审核'){
item.count=res.data.reviewingCount
}else if(item.name==='异常单'){
item.count=res.data.exceptionCount
}
})
}
} else {
console.log(res.message, "获取订单数量失败!");
}
});
},
// 总价
totalPrice(item) {
......@@ -281,6 +612,7 @@ export default {
},
// tab栏切换
change(index) {
console.log("============",index)
this.swiperCurrent = index;
this.getOrderList(index);
},
......@@ -291,6 +623,12 @@ export default {
this.$refs.tabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},viewOderItem() { // 跳转工单详情页面
let that = this;
let params ='' //`id=${e.id}&courseId=${e.courseId}&status=${e.status}`
uni.navigateTo({
url: `/pages/order/orderItem?${params}`
})
}
}
};
......
<!-- 过程反馈 -->
<template>
<view class="refuse-box bg">
<u-navbar back-icon-color="#FFFFFF" :background="background" title="拒单" title-color="#fff" :border-bottom="false"></u-navbar>
<view class="title">拒单说明</view>
<view class="content">
<view class="con-box">
<view class="tit u-m-b-40 u-flex"><text class="txt label">※</text>{{refuse.title}}</view>
<view class="u-flex u-flex-wrap">
<view :class="{'txt-item':true,'active':true}" v-for="(txt,index) in refuse.list" :key="index">
<text class="txt">{{txt}}</text>
</view>
</view>
</view>
<view class="con-box">
<view class="tit u-m-b-40">补充说明</view>
<u-input class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input>
</view>
</view>
<view class="u-m-60">
<button class="btn">确定</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
background: {
backgroundColor: 'none',
},
refuse:{
title:'问题归属',
list:['时间不匹配', '技术不匹配', '价格过低', '距离太远', '其他'],
},
};
},
components:{},
methods: {
}
}
</script>
<style lang="scss">
.bg {
width: 750rpx;
height: 100vh;
overflow: auto;
background-color: #F4F5F7;
background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 100%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
}
/deep/ .u-subsection{
padding:4rpx!important;
}
.content{
margin:0 30rpx;
overflow: hidden;
border-radius: 12rpx;
padding-bottom: 60rpx;
background-color: #fff;
}
.con-box{
padding:30rpx 30rpx 30rpx 20rpx;
// border-radius: 12rpx;
background-color: #FFFFFF;
.tit{
font-weight: bold;
font-size: 32rpx;
line-height: 32rpx;
color: #333;
}
&>.u-flex{
// margin-top:40rpx;
margin-right:-20rpx;
.txt-item{
border-radius: 12rpx;
padding:24rpx 38rpx;
min-width: 196rpx;
text-align: center;
margin-right: 20rpx;
margin-bottom: 20rpx;
background-color: #F4F5F7;
&.active{
background-color: #2272FF;
.txt{
color: #fff;
}
}
}
}
.txt{
display:block;
font-size: 26rpx;
line-height: 26rpx;
color: #333;
}
.textarea{
/deep/ .u-input{
textarea{
margin-top:20rpx;
border: 2rpx solid #ECECEC;
padding:18rpx 30rpx;
}
}
}
}
.btn{
padding:30rpx;
border-radius: 52rpx;
line-height: 44rpx;
font-size:32rpx;
text-align: center;
background-color: #2272FF;
color:#fff;
&::after{
content:'';
height:0;
}
}
.width-320{
width:320rpx;
}
.title{
padding:30rpx 30rpx 46rpx;
line-height: 40rpx;
font-size:40rpx;
color:#fff;
}
.label{
display: inline-block;
line-height: 40rpx;
font-size:24rpx;
margin-right: 10rpx;
color:#FA5A49
}
</style>
......@@ -235,7 +235,7 @@
}
this.baseInfo = res.data
uni.showToast({
title: '入驻基本信息提交成功',
title: '提交成功',
icon: 'success'
});
},
......@@ -326,7 +326,9 @@
*/
async submitBaseInfo() {
if (!this.submitStatus) {
return
}
// this.newSubmitBaseInfo()
// return
const baseInfo = this.baseInfo;
......
......@@ -321,7 +321,7 @@ export default {
break;
}
await self.chooseImage("qiniu", attr)
await self.chooseImage("qiniu", {...attr, options: {count: 1}})
if(self.uploadType && self.imgList && self.imgList.length > 0) {
// 设置图片对象
self.imgObj[self.uploadType] = self.imgList
......@@ -460,7 +460,10 @@ export default {
return formFlag;
},
async submitFileInfo() {
async submitFileInfo() {
if (!this.submitBtnStatus) {
return
}
if (!this.checkFileInfo()) {
return;
}
......
......@@ -2,7 +2,7 @@
<view class="content">
<Settle :index="5">
<view class="base-list">
<view class="title">充电桩安装需缴纳配件押金</view>
<view class="title">您还需缴纳配件押金</view>
<view class="price"><text>¥ </text>{{settledInfo.record.deposit}}</view>
<view class="list">
<view class="item u-flex u-row-between">
......@@ -146,7 +146,8 @@
this.saving = true
uni.showLoading({
title: '支付中……'
})
})
// 提交支付订单
const code = await this.getCode()
const params = {
......@@ -158,31 +159,14 @@
}
const response = await this.$u.api.paySettleDeposit(params)
console.log(response)
if (response.code !== 200) {
if (response.code !== 200) {
this.saving = false
uni.showToast({
title: response.message,
icon: 'none'
})
return
}
let timer = setTimeout(res => {
clearTimeout(timer)
uni.showModal({
title: '提示',
content: '支付结果',
confirmText: '成功',
cancelText: '失败',
success: function(res) {
if (res.confirm) {
// console.log(res.confirm,'res.confirm')
self.pending()
} else if (res.cancel) {
self.saving = false
console.log('用户点击取消');
}
}
});
}, 1000)
const {
charge,
......@@ -193,16 +177,19 @@
pingpp.createPayment(charge, (result, err) => {
if (result == "success") {
// 只有微信公众账号 (wx_pub)、微信小程序 (wx_lite)、QQ 公众号 (qpay_pub)、支付宝口碑 (alipay_qr)
// 支付成功的结果会在这里返回,其他的支付结果都会跳转到 extra 中对应的 URL。
// 支付成功的结果会在这里返回,其他的支付结果都会跳转到 extra 中对应的 URL。
this.showPopView()
uni.showToast({
title: '支付成功',
icon: 'none'
})
} else if (result == "fail") {
// charge 不正确或者微信公众账号/QQ 公众号/支付宝口碑支付失败时会在此处返回
// console.log(err.msg)
// console.log(err.msg)
this.showPopView()
} else if (result == "cancel") {
// 微信公众账号、QQ 公众号、支付宝口碑支付取消支付
// 微信公众账号、QQ 公众号、支付宝口碑支付取消支付
this.saving = false
uni.showToast({
title: '您已经取消了支付',
icon: 'none'
......@@ -210,6 +197,26 @@
}
});
},
showPopView() {
// let timer = setTimeout(res => {
// clearTimeout(timer)
uni.showModal({
title: '提示',
content: '支付结果',
confirmText: '成功',
cancelText: '失败',
success: ((res) => {
if (res.confirm) {
// console.log(res.confirm,'res.confirm')
this.pending()
} else if (res.cancel) {
this.pending()
console.log('用户点击取消');
}
})
});
// }, 1000)
}
},
}
</script>
......
......@@ -2,9 +2,9 @@
<view class="container u-row-between" v-if="info">
<Settle :index="pageIndex">
<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">
<image :class="['icon', {active: status != 1}]"
<image :class="['icon', {active: status != 1, h: [1, 2, 3, 4].indexOf(status) != -1}]"
:src="imageUrl">
</image>
</view>
......@@ -16,7 +16,7 @@
v-for="(txt,index) in info.tipsArr" :key="index">{{txt}}</text>
</view>
<view class="services-view">
<view v-if="status != 8">
<view v-if="[1, 2, 3, 4].indexOf(status) != -1">
<image class="service-info-image" :src="erweimaImage"></image>
<view class="content-info-tip">长按二维码添加官方客服微信</view>
<view class="content-info-tip">及时了解审核进度</view>
......@@ -45,14 +45,14 @@
promptList: [{
status: 1,
statusName: '待审核',
txtArr: ['已提交,等待审核', '正在审核中'],
txtArr: ['入驻资料提交成功', '您的申请入驻资料已成功提交,工作人员正在审核中'],
btnTxt: '去首页',
url: '/pages/index/index'
}, {
status: 2,
statusName: '已通过',
txtArr: ['恭喜,审核通过', '“充电桩安装入驻审核”'],
btnTxt: '去考试',
txtArr: ['入驻资料审核成功', '您的申请入驻资料已审核提交,可进行在线学习考试'],
btnTxt: '下一步',
url: '/pages/learn/exam'
}, {
status: 3,
......@@ -64,28 +64,26 @@
}, {
status: 4,
statusName: '已驳回',
txtArr: ['您的入驻资料已被驳回!', '可重新提交资料!'],
txtArr: ['入驻资料审核失败'],
tipsArr: ['原因:', '图片不够清楚'],
btnTxt: '重新提交',
url: '/pages/settle/file'
}, {
status: 8,
statusName: 'step4',
txtArr: ['您已通过', '“充电桩安装入驻考试”'],
tipsArr: ['可以正式签约了'],
btnTxt: '去签约',
txtArr: ['您已通过接单在线考试', '通过在线考试后,可以前往签约'],
btnTxt: '下一步',
url: '/pages/settle/sign-contract'
}, {
status: [5, 6],
statusName: '未支付保证金',
txtArr: ['您已成为', "充电桩安装的签约服务商"],
tipsArr: ['请缴纳1000元质保金'],
btnTxt: '去缴纳保证金',
txtArr: ['您已成功完成签约', "完成签约后,缴纳配件押金即可完成入驻"],
btnTxt: '下一步',
url: '/pages/settle/pay-ensure'
}, {
status: 7,
statusName: '已支付保证金',
txtArr: ['您已成为', "充电桩安装的正式服务商"],
txtArr: ['您已成功缴纳配件押金', " 成功缴纳配件押金后即前往接单"],
btnTxt: '去首页',
url: '/pages/index/index'
}],
......@@ -177,9 +175,10 @@
this.info = this.promptList[0]
return
}
if (status === 6) {
info.tipsArr[0] = '请缴纳' + this.settledInfo.record.deposit + '元质保金'
} else if (status === 4) {
// if (status === 6) {
// info.tipsArr[0] = '请缴纳' + this.settledInfo.record.deposit + '元质保金'
// } else
if (status === 4) {
info.tipsArr[1] = this.settledInfo.record.reason || ''
}
this.info = info
......@@ -218,9 +217,15 @@
height: 224rpx;
&.active {
margin-top: 38rpx;
margin-top: 150rpx;
width: 234rpx;
height: 222rpx;
}
&.h {
margin-top: 38rpx;
width: 234rpx;
height: 222rpx;
}
}
......
......@@ -366,7 +366,7 @@
// }
uni.hideLoading()
uni.showToast({
title: '入驻基本信息提交成功',
title: '提交成功',
icon: 'success'
});
// let timer = setTimeout(() => {
......
......@@ -2,8 +2,8 @@ module.exports = {
onLoad() {
// 设置默认的转发参数
this.$u.mpShare = {
title: '', // 默认为小程序名称
path: '', // 默认为当前页面路径
title: '充电桩安装火爆进行中...就等你', // 默认为小程序名称
path: '/pages/index/index', // 默认为当前页面路径
imageUrl: '' // 默认为当前页面的截图
}
},
......
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