Commit e26f4273 authored by Damon's avatar Damon
parents 95401bde 01a6eefe
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
</view> </view>
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]"> <view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]">
<text>{{ centerButtonText }}</text> <text>{{ centerButtonText }}</text>
<view v-if="order.currentOverTime" 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>
<u-count-down <u-count-down
:timestamp="timestampDiff(order.currentOverTime)" :timestamp="timestampDiff(order.currentOverTime)"
...@@ -157,11 +157,6 @@ ...@@ -157,11 +157,6 @@
import takePhoto from '@/components/take/index.vue' import takePhoto from '@/components/take/index.vue'
import PopView from "@/components/popView/index.vue" import PopView from "@/components/popView/index.vue"
let now = new Date(new Date().toLocaleDateString()).getTime(); let now = new Date(new Date().toLocaleDateString()).getTime();
let r = require("../../libs/bmap-wx.min.js");
let h = new r.BMapWX({
// ak: "rpVq5d3yxaRCoKzVwmFMo0o4iC524CAG",
ak: "lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI"
});
export default { export default {
components: { components: {
appointTime, appointTime,
...@@ -228,13 +223,7 @@ ...@@ -228,13 +223,7 @@
contactAddressLongitud:0, contactAddressLongitud:0,
contactAddressLatitud:0, contactAddressLatitud:0,
num:0, num:0,
waterInfo: { showTimeOut:true
longitude: '', // 经度
latitude: '', // 维度
address: '', //地址
date: '', //日期
markImage: 'https://qn-static.banshouhui.com/live_mark.png'
}
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -279,31 +268,6 @@ ...@@ -279,31 +268,6 @@
} }
}, },
methods: { methods: {
baiduLocation() {
// 百度sdk解析经纬度
let waterInfo = this.waterInfo
const t = function() {
let t = {
success: function(res) {
let e = res.wxMarkerData[0];
let i = e.address;
waterInfo.address = i
},
fail: function(err) {
console.log(err, 'err')
}
};
if (waterInfo.latitude && waterInfo.longitude) {
let e = waterInfo.latitude + "," + waterInfo.longitude;
t.location = e;
}
if(waterInfo.address){
t.address = waterInfo.address
}
h.geocoding(t);
};
t()
},
openLocation(){ openLocation(){
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
uni.getLocation({ uni.getLocation({
...@@ -362,7 +326,7 @@ ...@@ -362,7 +326,7 @@
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面, // 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if(img){ // 拍照完成 if(img){ // 拍照完成
this.isErrorSign = true this.isErrorSign = true
this.errorSignUrl = process.uniEnv.qn_asset_url +img[img.length-1].key this.errorSignUrl = img[img.length-1].key
this.handleBtn() this.handleBtn()
}else{ }else{
this.$refs.uToast.show({ this.$refs.uToast.show({
...@@ -439,7 +403,6 @@ ...@@ -439,7 +403,6 @@
self.dateList = res.data self.dateList = res.data
} }
}, },
/* 加载预约时间段 */ /* 加载预约时间段 */
async loadTimerange() { async loadTimerange() {
let self = this let self = this
...@@ -484,10 +447,6 @@ ...@@ -484,10 +447,6 @@
}) })
}, },
getCurrentBtn() { getCurrentBtn() {
// this.waterInfo.address=this.order.contactProvinceText+this.order.contactCityText
// +this.order.contactCommunityText
// //+this.order.contactStreetText
// this.baiduLocation()
// 根据工单状态确定按钮的显示 // 根据工单状态确定按钮的显示
var orderStatus = this.order.orderStatus var orderStatus = this.order.orderStatus
// 业务类型 指派单/订单池 // 业务类型 指派单/订单池
...@@ -505,6 +464,7 @@ ...@@ -505,6 +464,7 @@
this.centerButtonText = "抢单" this.centerButtonText = "抢单"
this.showCenterBtn = true this.showCenterBtn = true
this.submitType = "orderGan" this.submitType = "orderGan"
this.showTimeOut=false
} else if (orderStatus === 31 && !this.order.appointmentDatetime) { } else if (orderStatus === 31 && !this.order.appointmentDatetime) {
// 预约 // 预约
this.centerButton = "appoint2" this.centerButton = "appoint2"
...@@ -514,6 +474,7 @@ ...@@ -514,6 +474,7 @@
this.showTimeSelect = true this.showTimeSelect = true
this.isAllowDianhuaAndDaohang = true this.isAllowDianhuaAndDaohang = true
this.submitType = "workerAppointment" this.submitType = "workerAppointment"
this.loadCalendar()
} else if (orderStatus === 31 && this.order.appointmentDatetime) { } else if (orderStatus === 31 && this.order.appointmentDatetime) {
// 签到 // 签到
this.centerButton = "appoint3" this.centerButton = "appoint3"
...@@ -543,6 +504,7 @@ ...@@ -543,6 +504,7 @@
// 不同请求类型传递不同数据 // 不同请求类型传递不同数据
if(this.submitType === 'orderAccept'){ // 接单 if(this.submitType === 'orderAccept'){ // 接单
data.orderId = this.order.orderId data.orderId = this.order.orderId
data.channel = 'zypt'
}else if(this.submitType === 'orderGan'){ // 抢单 }else if(this.submitType === 'orderGan'){ // 抢单
data.orderId = this.order.orderId data.orderId = this.order.orderId
}else if(this.submitType === 'workerAppointment'){ // 预约 }else if(this.submitType === 'workerAppointment'){ // 预约
...@@ -650,7 +612,6 @@ ...@@ -650,7 +612,6 @@
getLocation() { getLocation() {
let self = this let self = this
const dataValue = this.dataValue || [] const dataValue = this.dataValue || []
const waterInfo = this.waterInfo
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'gcj02',
success: function(res) { success: function(res) {
...@@ -686,7 +647,7 @@ ...@@ -686,7 +647,7 @@
s = s *6378.137 ;// EARTH_RADIUS; s = s *6378.137 ;// EARTH_RADIUS;
s = Math.round(s * 10000)/10 ; //输出为米 s = Math.round(s * 10000)/10 ; //输出为米
console.log("计算结果",s,'M'); console.log("计算结果",s,'M');
return s?s.toFixed(2):0; return Number(s?s.toFixed(2):0);
}, },
Rad(d){ Rad(d){
return d * Math.PI / 180.0;//经纬度转换成三角函数中度分表形式。 return d * Math.PI / 180.0;//经纬度转换成三角函数中度分表形式。
...@@ -700,7 +661,7 @@ ...@@ -700,7 +661,7 @@
timeOutChange(currentOverTime){ timeOutChange(currentOverTime){
let self = this let self = this
var nowTime = new Date(); // 当前时间 var nowTime = new Date(); // 当前时间
if(nowTime.getTime() > currentOverTime){ if(currentOverTime && nowTime.getTime() > currentOverTime){
this.btnClass='timeOut-btn' this.btnClass='timeOut-btn'
self.$refs['uCountDown'].seconds += 2 self.$refs['uCountDown'].seconds += 2
} }
......
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
console.log(img) console.log(img)
if(img !==undefined ){ if(img !==undefined ){
// step1 添加图片 // step1 添加图片
this.currentItemDate.orderImages.push(process.uniEnv.qn_asset_url+img[img.length-1].key) this.currentItemDate.orderImages.push(img[img.length-1].key)
// step2 保存图片 // step2 保存图片
var data={ var data={
type : this.currentItemDate.type, type : this.currentItemDate.type,
......
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