Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
085246cc
Commit
085246cc
authored
May 07, 2021
by
郭晓清
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、签到,预约详情的第一轮bug修复
parent
5c54644a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
49 deletions
+10
-49
detail.vue
src/pages/order/detail.vue
+9
-48
list.vue
src/pages/photo/list.vue
+1
-1
No files found.
src/pages/order/detail.vue
View file @
085246cc
...
@@ -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
=
Date
.
now
()
let
now
=
Date
.
now
()
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
({
...
@@ -381,7 +345,7 @@
...
@@ -381,7 +345,7 @@
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
self
.
order
=
res
.
data
self
.
order
=
res
.
data
this
.
getCurrentBtn
()
this
.
getCurrentBtn
()
self
.
timeOutChange
(
self
.
order
.
currentOverTime
)
//
self.timeOutChange(self.order.currentOverTime)
if
(
self
.
order
.
isFirstOrder
){
if
(
self
.
order
.
isFirstOrder
){
this
.
visibale
=
true
this
.
visibale
=
true
}
}
...
@@ -436,7 +400,6 @@
...
@@ -436,7 +400,6 @@
self
.
dateList
=
res
.
data
self
.
dateList
=
res
.
data
}
}
},
},
/* 加载预约时间段 */
/* 加载预约时间段 */
async
loadTimerange
()
{
async
loadTimerange
()
{
let
self
=
this
let
self
=
this
...
@@ -480,10 +443,6 @@
...
@@ -480,10 +443,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
// 业务类型 指派单/订单池
// 业务类型 指派单/订单池
...
@@ -501,6 +460,7 @@
...
@@ -501,6 +460,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"
...
@@ -510,6 +470,7 @@
...
@@ -510,6 +470,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"
...
@@ -539,6 +500,7 @@
...
@@ -539,6 +500,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'
){
// 预约
...
@@ -646,7 +608,6 @@
...
@@ -646,7 +608,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
)
{
...
@@ -682,7 +643,7 @@
...
@@ -682,7 +643,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
;
//经纬度转换成三角函数中度分表形式。
...
@@ -696,7 +657,7 @@
...
@@ -696,7 +657,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
}
}
...
...
src/pages/photo/list.vue
View file @
085246cc
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment