Commit b4fb3328 authored by Morson's avatar Morson
parents 50d7fc1f 8356b206
...@@ -10,9 +10,14 @@ ...@@ -10,9 +10,14 @@
<view class="right-view">{{ orderData.orderBusinessTypeText }}</view> <view class="right-view">{{ orderData.orderBusinessTypeText }}</view>
</view> </view>
<view class="content-view"> <view class="content-view">
<view class="info-view" v-for="(item, key) in infoTexts" :key="key"> <view class="info-view" v-for="(item, key) in infoTexts" :key="key">
<text>{{item + ':'}}</text> <view class="info-title">
<text>{{orderData[key]}}</text> <text>{{item.name + ':'}}</text>
</view>
<view class="info-content">
<text>{{orderData[key]}}</text>
<text v-if="item.content">{{' / ' + orderData[item.content]}}</text>
</view>
</view> </view>
<view class="address-view"> <view class="address-view">
<view class="address-left-view"> <view class="address-left-view">
...@@ -133,9 +138,10 @@ ...@@ -133,9 +138,10 @@
}, },
infoTexts() { infoTexts() {
return { return {
'orderNumber': '工单编号', 'orderNumber': {name:'工单编号'},
'contactName': '客户信息', 'partnerCompanyName': {name: '合作厂商'},
'contactPhone': '联系方式' 'contactName': {name: '客户信息', content: 'contactPhone'},
} }
}, },
typeTexts() { typeTexts() {
...@@ -375,8 +381,17 @@ ...@@ -375,8 +381,17 @@
text-align: left; text-align: left;
color: #333333; color: #333333;
font-size: 26rpx; font-size: 26rpx;
margin-top: 12rpx; margin-top: 18rpx;
margin-bottom: 12rpx; margin-bottom: 18rpx;
display: flex;
align-items: flex-start;
.info-title {
flex-shrink: 0;
}
.info-content {
word-break: break-all;
}
} }
.address-view { .address-view {
...@@ -385,7 +400,7 @@ ...@@ -385,7 +400,7 @@
justify-content: space-between; justify-content: space-between;
color: #333333; color: #333333;
font-size: 24rpx; font-size: 24rpx;
margin-top: 12rpx; margin-top: 20rpx;
.address-left-view { .address-left-view {
display: flex; display: flex;
......
...@@ -53,6 +53,9 @@ ...@@ -53,6 +53,9 @@
"ios" : {}, "ios" : {},
/* ios打包配置 */ /* ios打包配置 */
"sdkConfigs" : {} "sdkConfigs" : {}
},
"uniStatistics" : {
"enable" : true
} }
}, },
/* SDK配置 */ /* SDK配置 */
...@@ -71,6 +74,9 @@ ...@@ -71,6 +74,9 @@
"scope.userLocation" : { "scope.userLocation" : {
"desc" : "方便查看订单与你的距离" "desc" : "方便查看订单与你的距离"
} }
},
"uniStatistics" : {
"enable" : true
} }
}, },
"mp-alipay" : { "mp-alipay" : {
......
...@@ -158,6 +158,7 @@ ...@@ -158,6 +158,7 @@
} else { } else {
this.waitInit = true this.waitInit = true
} }
// 第一次入驻成功弹出客服弹窗
if (e && e.visible) { if (e && e.visible) {
this.visible = e.visible this.visible = e.visible
} }
...@@ -166,8 +167,10 @@ ...@@ -166,8 +167,10 @@
// 每次进入页面都刷新入驻状态 // 每次进入页面都刷新入驻状态
this.pageNumber = 0 this.pageNumber = 0
this.initSettleInfo(); this.initSettleInfo();
this.getLocation() if (this.status == 7) {
this.getLocation()
}
}, },
// onPullDownRefresh() { // onPullDownRefresh() {
// console.log('------下拉刷新------') // console.log('------下拉刷新------')
......
...@@ -153,7 +153,7 @@ var json = { ...@@ -153,7 +153,7 @@ var json = {
{ {
title: "服务规范", title: "服务规范",
desc: "为用户提供更好服务,自己赚更多钱", desc: "为用户提供更好服务,自己赚更多钱",
pic: process.uniEnv.qn_base_url + "fwgf-3x.png", pic: process.uniEnv.qn_base_url + "fwgf-3x-v2.png",
percent: 0, percent: 0,
status: "", status: "",
id: 173, id: 173,
...@@ -162,7 +162,7 @@ var json = { ...@@ -162,7 +162,7 @@ var json = {
{ {
title: "接单规范", title: "接单规范",
desc: "快速学习,使用APP 接单、抢单", desc: "快速学习,使用APP 接单、抢单",
pic: process.uniEnv.qn_base_url + "jdgf-3x.png", pic: process.uniEnv.qn_base_url + "jdgf-3x-v2.png",
percent: 0, percent: 0,
status: "", status: "",
id: 173, id: 173,
...@@ -171,7 +171,7 @@ var json = { ...@@ -171,7 +171,7 @@ var json = {
{ {
title: "从0-1学习充电桩安装服务", title: "从0-1学习充电桩安装服务",
desc: "让你全面了解充电桩市场及服务规范", desc: "让你全面了解充电桩市场及服务规范",
pic: process.uniEnv.qn_base_url + "cdz-3x.png", pic: process.uniEnv.qn_base_url + "cdz-3x-v2.png",
percent: 0, percent: 0,
status: "", status: "",
id: 173, id: 173,
...@@ -182,7 +182,7 @@ var json = { ...@@ -182,7 +182,7 @@ var json = {
{ {
title: "服务规范", title: "服务规范",
desc: "为用户提供更好服务,自己赚更多钱", desc: "为用户提供更好服务,自己赚更多钱",
pic: process.uniEnv.qn_base_url + "fwgf-3x.png", pic: process.uniEnv.qn_base_url + "fwgf-3x-v2.png",
percent: 0, percent: 0,
status: "", status: "",
id: 150, id: 150,
...@@ -191,7 +191,7 @@ var json = { ...@@ -191,7 +191,7 @@ var json = {
{ {
title: "接单规范", title: "接单规范",
desc: "快速学习,使用APP 接单、抢单", desc: "快速学习,使用APP 接单、抢单",
pic: process.uniEnv.qn_base_url + "jdgf-3x.png", pic: process.uniEnv.qn_base_url + "jdgf-3x-v2.png",
percent: 0, percent: 0,
status: "", status: "",
id: 149, id: 149,
...@@ -200,7 +200,7 @@ var json = { ...@@ -200,7 +200,7 @@ var json = {
{ {
title: "从0-1学习充电桩安装服务", title: "从0-1学习充电桩安装服务",
desc: "让你全面了解充电桩市场及服务规范", desc: "让你全面了解充电桩市场及服务规范",
pic: process.uniEnv.qn_base_url + "cdz-3x.png", pic: process.uniEnv.qn_base_url + "cdz-3x-v2.png",
percent: 0, percent: 0,
status: "", status: "",
id: 151, id: 151,
...@@ -211,7 +211,7 @@ var json = { ...@@ -211,7 +211,7 @@ var json = {
{ {
title: "服务规范", title: "服务规范",
desc: "为用户提供更好服务,自己赚更多钱", desc: "为用户提供更好服务,自己赚更多钱",
pic: process.uniEnv.qn_base_url + "fwgf-3x.png", pic: process.uniEnv.qn_base_url + "fwgf-3x-v2.png",
percent: 0, percent: 0,
status: "", status: "",
sectionId: "", sectionId: "",
...@@ -219,7 +219,7 @@ var json = { ...@@ -219,7 +219,7 @@ var json = {
{ {
title: "接单规范", title: "接单规范",
desc: "快速学习,使用APP 接单、抢单", desc: "快速学习,使用APP 接单、抢单",
pic: process.uniEnv.qn_base_url + "jdgf-3x.png", pic: process.uniEnv.qn_base_url + "jdgf-3x-v2.png",
percent: 0, percent: 0,
status: "", status: "",
sectionId: "", sectionId: "",
...@@ -227,7 +227,7 @@ var json = { ...@@ -227,7 +227,7 @@ var json = {
{ {
title: "从0-1学习充电桩安装服务", title: "从0-1学习充电桩安装服务",
desc: "让你全面了解充电桩市场及服务规范", desc: "让你全面了解充电桩市场及服务规范",
pic: process.uniEnv.qn_base_url + "cdz-3x.png", pic: process.uniEnv.qn_base_url + "cdz-3x-v2.png",
percent: 0, percent: 0,
status: "", status: "",
sectionId: "", sectionId: "",
...@@ -242,7 +242,7 @@ var examJson = { ...@@ -242,7 +242,7 @@ var examJson = {
desc: "通过本认证,是接单的必要条件", desc: "通过本认证,是接单的必要条件",
condition: "随机20题,及格20题", condition: "随机20题,及格20题",
status: "", status: "",
pic: process.uniEnv.qn_base_url + "fwgf-3x.png", pic: process.uniEnv.qn_base_url + "fwgf-e-3x.png",
id: 2, id: 2,
examId: "", examId: "",
examStatus: "", examStatus: "",
...@@ -425,6 +425,12 @@ export default { ...@@ -425,6 +425,12 @@ export default {
}, },
}, },
onShow: function (param) { onShow: function (param) {
try {
if (param.tabs) {
this.current = param.tabs;
this.swiperCurrent = param.tabs;
}
} catch (e) {}
if (this.current == 2 || this.current == 3) { if (this.current == 2 || this.current == 3) {
this.tabsChange(this.current); this.tabsChange(this.current);
} }
...@@ -588,8 +594,8 @@ export default { ...@@ -588,8 +594,8 @@ export default {
}, },
//tabs通知swiper切换 //tabs通知swiper切换
tabsChange(index) { tabsChange(index) {
this.swiperCurrent = index; this.swiperCurrent = Number(index);
switch (index) { switch (this.swiperCurrent) {
case 1: case 1:
this.loadNews(); this.loadNews();
break; break;
...@@ -705,25 +711,24 @@ export default { ...@@ -705,25 +711,24 @@ export default {
var examInfo = this.examList[index]; var examInfo = this.examList[index];
if (examInfo.examStatus == 0) { if (examInfo.examStatus == 0) {
wx.navigateTo({ wx.navigateTo({
// url: "/pages/learn/answer?examId=" + examInfo.id,
url: "/pages/learn/assessment?examId=" + examInfo.id, url: "/pages/learn/assessment?examId=" + examInfo.id,
}); });
} else if (examInfo.examStatus == 1) { } else if (examInfo.examStatus == 1) {
let url = '';
if (examInfo.status == "已通过") { if (examInfo.status == "已通过") {
wx.navigateTo({ url = "/pages/learn/exam-pass?userExamId=" +
url: examInfo.examId +
"/pages/learn/exam-pass?userExamId=" + "&examId=" +
examInfo.examId, examInfo.id;
});
} else { } else {
wx.navigateTo({ url = "/pages/learn/result?userExamId=" +
url:
"/pages/learn/result?userExamId=" +
examInfo.examId + examInfo.examId +
"&examId=" + "&examId=" +
examInfo.id, examInfo.id
});
} }
wx.navigateTo({
url: url,
});
} else if (examInfo.examStatus == 2) { } else if (examInfo.examStatus == 2) {
wx.navigateTo({ wx.navigateTo({
url: "/pages/learn/assessment?examId=" + examInfo.id, url: "/pages/learn/assessment?examId=" + examInfo.id,
...@@ -885,7 +890,7 @@ export default { ...@@ -885,7 +890,7 @@ export default {
width: 160rpx; width: 160rpx;
height: 200rpx; height: 200rpx;
position: absolute; position: absolute;
top: -45rpx; bottom: 5rpx;
left: 30rpx; left: 30rpx;
} }
......
...@@ -136,25 +136,22 @@ export default { ...@@ -136,25 +136,22 @@ export default {
toSubmit() { toSubmit() {
//判断是否通过,通过去成功页,失败去失败页 //判断是否通过,通过去成功页,失败去失败页
let examInfo = this.examInfo; let examInfo = this.examInfo;
let examId = this.examId;
let status = examInfo.examLevelResult == "已通过"; let status = examInfo.examLevelResult == "已通过";
let url = '';
if (status) { if (status) {
wx.navigateTo({ url = "/pages/learn/exam-pass?userExamId=" +
url:
"/pages/learn/exam-pass?userExamId=" +
this.userExamId + this.userExamId +
"&examId=" + "&examId=" +
examId, this.examId;
});
} else { } else {
wx.navigateTo({ url = "/pages/learn/result?userExamId=" +
url:
"/pages/learn/result?userExamId=" +
this.userExamId + this.userExamId +
"&examId=" + "&examId=" +
examId, this.examId
});
} }
wx.redirectTo({
url: url,
});
}, },
contentFilter(txt) { contentFilter(txt) {
if (!txt) { if (!txt) {
...@@ -172,7 +169,12 @@ export default { ...@@ -172,7 +169,12 @@ export default {
this.getUserExamInfo(); this.getUserExamInfo();
}, },
gotoLogin() {
uni.navigateTo({
url: "/pages/login/wxlogin",
});
return;
},
//获取考试信息 //获取考试信息
getUserExamInfo: function () { getUserExamInfo: function () {
uni.showLoading({ uni.showLoading({
...@@ -201,10 +203,12 @@ export default { ...@@ -201,10 +203,12 @@ export default {
return; return;
} }
if (res.data.code == 401 || res.data.code == 403) { if (res.data.code == 401 || res.data.code == 403) {
uni.navigateTo({ //提示 提交结果失败 请再次提交
url: "/pages/login/wxlogin", uni.showToast({
icon: "none",
title: "获取考试结果失败,请再次尝试提交",
}); });
return; return
} }
if (res.data.code == 200) { if (res.data.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与 //examStatus 用户考试状态 0考试中 1考试完成 2未参与
...@@ -264,10 +268,8 @@ export default { ...@@ -264,10 +268,8 @@ export default {
success: (res) => { success: (res) => {
uni.hideLoading(); uni.hideLoading();
if (res.statusCode == 401) { if (res.statusCode == 401) {
uni.navigateTo({ this.gotoLogin();
url: "/pages/login/wxlogin", return
});
return;
} }
if (res.data.code == 200) { if (res.data.code == 200) {
...@@ -347,11 +349,16 @@ export default { ...@@ -347,11 +349,16 @@ export default {
success: (res) => { success: (res) => {
uni.hideLoading(); uni.hideLoading();
if (res.statusCode == 401) { if (res.statusCode == 401) {
uni.navigateTo({ this.gotoLogin()
url: "/pages/login/wxlogin",
});
return; return;
} }
if(res.statusCode == 403){
uni.showToast({
icon: "none",
title: "获取考试结果失败,请再次尝试提交",
});
return
}
if (res.data.code == 200) { if (res.data.code == 200) {
that.currentItem = res.data.data; that.currentItem = res.data.data;
console.log(that.currentItem); console.log(that.currentItem);
...@@ -496,55 +503,6 @@ export default { ...@@ -496,55 +503,6 @@ export default {
this.handleAnswer(); this.handleAnswer();
//this.getNext() //this.getNext()
}, },
//上传考试结果
postResult: function () {
uni.showLoading({
title: "请稍候",
});
let that = this;
uni.request({
url:
ucenterApiUrl +
"/v1/settled/update-settled-exam-score" +
"?access-token=" +
that.vuex_token,
method: "POST",
data: {
score: this.examScore || 0,
},
success: (res) => {
uni.hideLoading();
if (res.statusCode == 401) {
uni.navigateTo({
url: "/pages/login/wxlogin",
});
return;
}
if (res.statusCode == 200) {
// uni.navigateTo({
// url: '/pages/settle/prompt'
// })
} else {
uni.showToast({
icon: "none",
title: "上传考试结果失败",
});
}
},
fail: (e) => {
uni.hideLoading();
uni.showToast({
icon: "none",
title: "上传考试结果失败",
});
},
});
},
//所选答案 //所选答案
handleAnswer: function () { handleAnswer: function () {
/* /*
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
data() { data() {
return { return {
text: "", text: "",
examId: 2, examId: null,
result: null, result: null,
is_pass: false, is_pass: false,
score: 0, score: 0,
...@@ -39,54 +39,44 @@ export default { ...@@ -39,54 +39,44 @@ export default {
}; };
}, },
onLoad(a) { onLoad(a) {
this.examId = a.examId;
this.userExamId = a.userExamId; this.userExamId = a.userExamId;
console.log("userExamId是", this.userExamId); console.log("userExamId是", this.userExamId);
this.nextClick(); this.getCourseResult();
},
onUnload() {
this.toIndex()
}, },
// onUnload() {
// wx.reLaunch({
// url: "./index",
// });
// },
methods: { methods: {
//考试结果 //考试结果
nextClick: function () { getCourseResult: function () {
console.log("wwwwwwwwww"); this.$u.api
uni.request({ .getExamResult(this.examId)
url: .then((res) => {
process.uniEnv.systemUrl.apiUrl + if (res.code != 200) {
"/wxh-worker-rest/rest/exam" + console.log("getUserExamInfo 200 err");
"/serviceRule/next/" + uni.showToast({
this.vuex_token + icon: "none",
"?userExamId=" + title: "获取考试结果失败",
this.userExamId, });
}
method: "POST", this.result = res.data;
header: { this.text = res.data.examLevelResult;
"Content-Type": "application/x-www-form-urlencoded",
},
success: (res) => {
this.result = res.data.data;
this.text = res.data.data.examLevelResult;
this.score = this.result.examScore; this.score = this.result.examScore;
this.is_pass = this.result.result == '通过'; })
console.log("标识符55", this.result); .catch((err) => {
}, console.log("getUserExamInfo err" + err);
}); uni.hideLoading();
}, uni.showToast({
//再次考试 icon: "none",
getAgain: function () { title: "获取考试信息失败",
wx.navigateTo({ });
url: "/pages/learn/assessment", });
});
}, },
//下次再考跳转到学习主界面页面 //下次再考跳转到学习主界面页面
toIndex: function () { toIndex: function () {
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组 uni.switchTab({
let length = routes.length url: '/pages/index/learn'
uni.navigateBack({
delta: length - 1
}); });
}, },
}, },
......
...@@ -46,52 +46,50 @@ export default { ...@@ -46,52 +46,50 @@ export default {
this.userExamId = a.userExamId; this.userExamId = a.userExamId;
this.examId = a.examId; this.examId = a.examId;
console.log("userExamId是", this.userExamId); console.log("userExamId是", this.userExamId);
this.nextClick(); this.getCourseResult();
},
onUnload() {
this.toIndex()
}, },
// onUnload() {
// wx.reLaunch({
// url: "./index",
// });
// },
methods: { methods: {
//考试结果 //考试结果
nextClick: function () { getCourseResult: function () {
console.log("wwwwwwwwww"); this.$u.api
uni.request({ .getExamResult(this.examId)
url: .then((res) => {
process.uniEnv.systemUrl.apiUrl + if (res.code != 200) {
"/wxh-worker-rest/rest/exam" + console.log("getUserExamInfo 200 err");
"/serviceRule/next/" + uni.showToast({
this.vuex_token + icon: "none",
"?userExamId=" + title: "获取考试结果失败",
this.userExamId, });
}
method: "POST", this.result = res.data;
header: { this.text = res.data.examLevelResult;
"Content-Type": "application/x-www-form-urlencoded",
},
success: (res) => {
this.result = res.data.data;
this.text = res.data.data.examLevelResult;
this.score = this.result.examScore; this.score = this.result.examScore;
console.log("标识符55", this.result); })
}, .catch((err) => {
}); console.log("getUserExamInfo err" + err);
uni.hideLoading();
uni.showToast({
icon: "none",
title: "获取考试信息失败",
});
});
}, },
//再次考试 //再次考试
getAgain: function () { getAgain: function () {
let examId = this.examId; let examId = this.examId;
wx.navigateTo({ let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
console.log(routes.length);
uni.navigateTo({
url: "/pages/learn/assessment?examId=" + examId, url: "/pages/learn/assessment?examId=" + examId,
}); });
}, },
//下次再考跳转到学习主界面页面 //下次再考跳转到学习主界面页面
toIndex: function () { toIndex: function () {
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组 uni.switchTab({
let length = routes.length url: '/pages/index/learn'
uni.navigateBack({
delta: length - 1
}); });
}, },
}, },
......
...@@ -101,9 +101,10 @@ export default { ...@@ -101,9 +101,10 @@ export default {
} }
.jf-currency-class { .jf-currency-class {
width: 100%; width: 100%;
min-height: 180rpx;
border-radius: 12rpx; border-radius: 12rpx;
padding-top: 40rpx; padding: 20rpx;
margin-top: 74rpx; margin-top: 80rpx;
background: #ffffff; background: #ffffff;
position: relative; position: relative;
.left { .left {
...@@ -111,7 +112,7 @@ export default { ...@@ -111,7 +112,7 @@ export default {
height: 200rpx; height: 200rpx;
padding: 30rpx 14rpx 0 14rpx; padding: 30rpx 14rpx 0 14rpx;
position: absolute; position: absolute;
top: -40rpx; bottom: 30rpx;
left: 30rpx; left: 30rpx;
background: url(@/static/photo/hetong.png); background: url(@/static/photo/hetong.png);
border-radius: 6px; border-radius: 6px;
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
<text>工单编号:</text> <text>工单编号:</text>
<text>{{ order.orderNumber }}</text> <text>{{ order.orderNumber }}</text>
</view> </view>
<view class="order-cell">
<text>合作厂商:</text>
<text>{{ order.partnerCompanyName }}</text>
</view>
<view class="order-cell between-cell"> <view class="order-cell between-cell">
<view class="left"> <view class="left">
<text>客户信息:</text> <text>客户信息:</text>
...@@ -123,7 +127,7 @@ ...@@ -123,7 +127,7 @@
<view> <view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
<view v-if="showCenterBtn" @click="$u.throttle(handleBtn, 500)" class="button" :class="['center-button-view', btnClass]"> <view v-if="showCenterBtn" @click="$u.throttle(handleBtn, 500)" class="button" :class="['center-button-view', btnClass]">
<text>{{ centerButtonText }}</text> <text>{{ centerButtonText }}</text>
<view v-if="order.currentOverTime && showTimeOut" class="time-view"> <view v-if="order.currentOverTime && showTimeOut" class="time-view">
<text style="padding-right: 8rpx;">{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text> <text style="padding-right: 8rpx;">{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text>
...@@ -232,7 +236,8 @@ ...@@ -232,7 +236,8 @@
num:0, num:0,
showTimeOut:true, showTimeOut:true,
clicking: false, clicking: false,
dateItem: null dateItem: null,
centerBtnDisabled:false
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -242,9 +247,14 @@ ...@@ -242,9 +247,14 @@
} }
this.loadOrderDetail() this.loadOrderDetail()
this.loadOrderRecord() this.loadOrderRecord()
this.getLocation() // this.getLocation()
this.getSignDistance() this.getSignDistance()
}, },
onHide() {
this.closeLocationChange()
},onUnload() {
this.closeLocationChange()
},
computed: { computed: {
phoneIcon() { phoneIcon() {
...@@ -301,6 +311,38 @@ ...@@ -301,6 +311,38 @@
}); });
} }
}, },
updateLocation(){
let self = this
wx.startLocationUpdate({
success:function(){
self.openLocationChange()
}
})
},
_locationChangeFn(res) {
let self = this
console.log('location change', res)
const dataValue = this.dataValue || []
dataValue.push(res.longitude)
dataValue.push(res.latitude)
self.dataValue = dataValue
if(this.getDistance(res.latitude,res.longitude)>this.signDistance){
// 计算签到距离
this.btnClass = "isGan-btn"
this.centerBtnDisabled = false
}else{
this.centerBtnDisabled = true
}
},
openLocationChange(){
console.log("openLocationChange")
wx.onLocationChange(this._locationChangeFn);
},
closeLocationChange(){
console.log("closeLocationChange")
wx.offLocationChange(this._locationChangeFn);
},
phoneToCustomer(phone){ // 联系客户 phoneToCustomer(phone){ // 联系客户
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
uni.makePhoneCall({ uni.makePhoneCall({
...@@ -515,7 +557,8 @@ ...@@ -515,7 +557,8 @@
this.submitType = "maintainWorkerCheckin" this.submitType = "maintainWorkerCheckin"
this.isAllowDianhuaAndDaohang = true this.isAllowDianhuaAndDaohang = true
this.errorSignIn = true this.errorSignIn = true
this.addressToCoordinate() // this.addressToCoordinate()
this.updateLocation()
} else if (orderStatus > 31 && orderStatus < 80) { } else if (orderStatus > 31 && orderStatus < 80) {
// 完工 // 完工
this.centerButton = "filish" this.centerButton = "filish"
...@@ -554,9 +597,15 @@ ...@@ -554,9 +597,15 @@
} }
data.appointmentDatetimeRange = this.appointmentDatetimeRange.pkey data.appointmentDatetimeRange = this.appointmentDatetimeRange.pkey
}else if (this.submitType === 'maintainWorkerCheckin') { // 签到 }else if (this.submitType === 'maintainWorkerCheckin') { // 签到
// 检查见到距离是否符合 // 检查见到距离是否符合
if(!this.isErrorSign){ if(!this.isErrorSign){
if(this.getDistance(this.contactAddressLatitud,this.contactAddressLongitud)>this.signDistance){ if(!this.centerBtnDisabled){
return
}else{
this.closeLocationChange()
}
if(this.getDistance() > this.signDistance){
this.commonToast('签到失败,请点击异常签到处理或联系客服','error') this.commonToast('签到失败,请点击异常签到处理或联系客服','error')
return return
} }
...@@ -603,13 +652,14 @@ ...@@ -603,13 +652,14 @@
} }
}) })
} else { } else {
let self = this
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.data.message!==undefined ? res.data.message:res.message, title: res.data.message!==undefined ? res.data.message:res.message,
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default' // 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
type: 'warning', type: 'warning',
callback: function() { callback: function() {
this.clicking = false this.clicking = false
res.data.message==='抱歉,手快的师傅已经抢到此单!'?this.isGan():'' res.data.message==='抱歉,手快的师傅已经抢到此单!'?self.isGan():''
} }
}) })
} }
...@@ -683,7 +733,7 @@ ...@@ -683,7 +733,7 @@
}); });
}, },
getDistance(Latitud, Longitud){ getDistance(Latitud, Longitud){
return this.distance(Latitud,Longitud,this.dataValue[1],this.dataValue[0]) return this.distance(this.order.contactAddressLatitud,this.order.contactAddressLongitud,this.dataValue[1],this.dataValue[0])
}, },
/** /**
* echo distance(116.3896,39.91917,116.3940,39.91726); * echo distance(116.3896,39.91917,116.3940,39.91726);
...@@ -720,7 +770,7 @@ ...@@ -720,7 +770,7 @@
var nowTime = new Date(); // 当前时间 var nowTime = new Date(); // 当前时间
if(currentOverTime && nowTime.getTime() > currentOverTime){ if(currentOverTime && nowTime.getTime() > currentOverTime){
this.btnClass='timeOut-btn' this.btnClass='timeOut-btn'
self.$refs['uCountDown'].seconds += 2 this.$refs['uCountDown'].seconds += 2
} }
}, },
handleClick(){ handleClick(){
...@@ -1074,7 +1124,7 @@ ...@@ -1074,7 +1124,7 @@
.between-cell { .between-cell {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: center;
} }
.display-cell { .display-cell {
display: flex; display: flex;
......
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