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
5c376c83
Commit
5c376c83
authored
Apr 26, 2021
by
郭晓清
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常签约+现场拍照
parent
8cb99bc6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
172 additions
and
45 deletions
+172
-45
order.js
src/common/api/order.js
+20
-3
detail.vue
src/pages/order/detail.vue
+25
-7
index.vue
src/pages/order/index.vue
+5
-6
list.vue
src/pages/photo/list.vue
+122
-29
No files found.
src/common/api/order.js
View file @
5c376c83
...
...
@@ -5,7 +5,7 @@ let orderApiFun = function(vm){
/**
* 工单数量查询接口
*/
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/
o
rder/queryOrdersCount/V2'
,
params
);
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/
wokerO
rder/queryOrdersCount/V2'
,
params
);
/**
* 工单列表接口 wxh-worker-rest/rest/order/revision/{token}/list
...
...
@@ -31,7 +31,7 @@ let orderApiFun = function(vm){
/**
* 订单详情查询
*/
let
orderDetail
=
async
(
params
=
{}
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/'
+
params
.
orderId
,
params
);
let
orderDetail
=
async
(
params
=
{}
,
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
);
/* 过程反馈查询接口 */
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rst/order/v2/getFeedBack/'
+
vm
.
vuex_token
,
params
)
...
...
@@ -50,6 +50,20 @@ let orderApiFun = function(vm){
*/
let
orderGan
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/revision/applets/'
+
vm
.
vuex_token
+
'/order/acceptAppletsOrder'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
/**
* 获取拍照标准
*/
let
orderStandard
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/photo/standard'
,
params
);
/**
* 保存图片信息
*/
let
saveImage
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/saveImage'
,
params
);
/**
* 获取师傅水印 or 默认水印
*/
let
getWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/photo/watermark'
,
params
);
const
orderApi
=
{
listByRecommendOrder
,
...
...
@@ -63,7 +77,10 @@ let orderApiFun = function(vm){
orderAccept
,
orderGan
,
maintainWorkerCheckin
,
feedbackConfig
feedbackConfig
,
orderStandard
,
saveImage
,
getWatermark
}
return
orderApi
}
...
...
src/pages/order/detail.vue
View file @
5c376c83
...
...
@@ -112,16 +112,19 @@
</view>
</view>
<take-photo
type=
"test"
v-if=
"takeStatus"
@
close=
"closeTake"
></take-photo>
<!--
<PopView
title=
"aaaa"
message=
"bbbb"
:visible
.
sync=
"visibale"
@
click=
"handleClick"
/>
-->
</view>
</
template
>
<
script
>
import
appointTime
from
'@/components/appoint/appoint-time.vue'
import
takePhoto
from
'@/components/take/index.vue'
// import PopView from "@/components/popView/index.vue"
export
default
{
components
:
{
appointTime
,
'take-photo'
:
takePhoto
'take-photo'
:
takePhoto
,
// PopView
},
data
()
{
return
{
...
...
@@ -149,7 +152,7 @@
btnClass
:
'appoint-btn'
,
takeStatus
:
false
,
errorSignIn
:
false
,
scenePhoto
:
fals
e
scenePhoto
:
tru
e
}
},
onLoad
(
option
)
{
...
...
@@ -187,10 +190,25 @@
uni
.
hideTabBar
()
this
.
takeStatus
=
true
},
closeTake
()
{
closeTake
(
img
)
{
console
.
log
(
img
)
this
.
takeStatus
=
false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if
(
img
){
// 拍照完成
this
.
$refs
.
uToast
.
show
({
title
:
'签到成功'
,
type
:
'success'
,
url
:
'pages/order/detail'
,
params
:
{
id
:
1
}
})
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
'异常签到失败,请先按要求拍照'
,
type
:
'waning'
})
}
},
loadOrderDetail
()
{
// 获取工单详情
let
self
=
this
...
...
@@ -198,10 +216,10 @@
var
data
=
{
'orderId'
:
self
.
orderId
};
self
.
$u
.
api
.
orderDetail
(
data
).
then
((
res
)
=>
{
self
.
$u
.
api
.
orderDetail
(
data
,
self
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
.
list
[
0
]
)
self
.
order
=
res
.
data
.
list
[
0
]
console
.
log
(
"==="
,
res
.
data
)
self
.
order
=
res
.
data
this
.
getCurrentBtn
()
// self.order.operationType = "accept"
// }else{
...
...
src/pages/order/index.vue
View file @
5c376c83
...
...
@@ -51,11 +51,10 @@
pageSize
:
10
,
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
:
{
0
:
'waitAccept'
,
1
:
'waitAppointment'
,
2
:
'waitCheckIn'
,
3
:
'waitFinish'
,
4
:
'exception'
,
0
:
'waitAppointment'
,
1
:
'waitCheckIn'
,
2
:
'waitFinish'
,
3
:
'exception'
,
5
:
'finish'
},
orderList
:
[],
...
...
@@ -145,7 +144,7 @@
// 页面数据
getOrderList
(
index
)
{
// 状态处理
this
.
pageNumber
+=
1
//
this.pageNumber += 1
var
param
=
{
pageNumber
:
this
.
pageNumber
,
pageSize
:
this
.
pageSize
,
...
...
src/pages/photo/list.vue
View file @
5c376c83
...
...
@@ -4,30 +4,34 @@
<view
class=
"topView"
>
<view
:class=
"['topItemView',
{'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)"
v-for="(item,ikey) in dataList" :key="ikey">
<text
:class=
"['ph-lst-top-index',
{'active':activeTop===ikey}]">
{{
ikey
+
1
}}
</text>
<text
class=
"topItemTitle"
>
{{
item
.
type
}}
</text>
</view>
</view>
<view
class=
"rightView"
>
<view
class=
"right-view-title"
>
拍照项有:
</view>
<template
v-for=
"(item,ikey) in rightList"
>
<view
class=
"rightItemView"
@
click=
"
rightItemClick
(item,ikey)"
:key=
"ikey"
>
<view
:class=
"['rightContentView',
{'active':item.image
List
[0]}]">
<view
class=
"rightItemView"
@
click=
"
take
(item,ikey)"
:key=
"ikey"
>
<view
:class=
"['rightContentView',
{'active':item.image
s
[0]}]">
<text
class=
"ph-lst-item-index"
>
{{
ikey
+
1
}}
</text>
<text
class=
""
>
{{
item
.
name
}}
</text>
<image
class=
"ph-list-item-arrow"
src=
"/static/photo/arrow.png"
></image>
<!--
<text
class=
"rightContent u-m-t-14 u-m-l-30 u-p-b-30"
>
{{
item
.
describe
}}
</text>
-->
</view>
<view
class=
"rightImageView"
v-if=
"item.image
List
.length > 0"
>
<image
class=
"rightImage"
v-for=
"(image, index) in item.image
List
.slice(0 , 10)"
:src=
"image"
<view
class=
"rightImageView"
v-if=
"item.image
s
.length > 0"
>
<image
class=
"rightImage"
v-for=
"(image, index) in item.image
s
.slice(0 , 10)"
:src=
"image"
:key=
"index"
@
click
.
stop=
"handleClickImage(item, index)"
mode=
"aspectFill"
></image>
</view>
</view>
</
template
>
<u-button
v-if=
"activeTop + 1 === dataList.length"
class=
"ph-list-button"
type=
"error"
shape=
"circle"
:disabled=
"buttonDisabled"
:custom-style=
"buttonStyle"
@
click=
"isPopShow = true"
>
一键清空展示图片
</u-button>
<take-photo
type=
"test"
v-if=
"takeStatus"
:currentItem=
"currentItemDate"
@
close=
"closeTake"
></take-photo>
<!-- <u-button v-if="activeTop + 1 === dataList.length" class="ph-list-button" type="error" shape="circle"
:disabled="buttonDisabled" :custom-style="buttonStyle" @click="isPopShow = true">一键清空展示图片</u-button> -->
</view>
<u-popup
border-radius=
"10"
v-model=
"isPopShow"
safe-area-inset-bottom
mode=
"center"
width=
"690rpx"
<!-- <u-popup border-radius="10" v-model="isPopShow" safe-area-inset-bottom mode="center" width="690rpx"
height="600rpx">
<view class="ph-list-pop-title">
<text>是否一键清空系统展示的图片?</text>
...
...
@@ -44,14 +48,20 @@
确定
</u-button>
</view>
</u-popup>
</u-popup>
-->
</view>
</template>
<
script
>
import
takePhoto
from
'@/components/take/index.vue'
export
default
{
components
:
{
'take-photo'
:
takePhoto
},
data
()
{
return
{
takeStatus
:
false
,
currentItemDate
:{},
topList
:
[],
activeTop
:
0
,
leftList
:
[],
...
...
@@ -60,9 +70,11 @@
systemId
:
''
,
brand
:
''
,
brandId
:
''
,
orderId
:
''
,
dataList
:
[],
loading
:
true
,
isPopShow
:
false
isPopShow
:
false
,
userWatermark
:{}
}
},
onLoad
(
e
)
{
...
...
@@ -70,14 +82,21 @@
if
(
e
&&
e
.
brandId
)
{
this
.
brandId
=
e
.
brandId
}
if
(
e
&&
e
.
brand
)
{
this
.
brand
=
e
.
brand
uni
.
setNavigationBarTitle
({
title
:
this
.
brand
});
uni
.
setNavigationBarTitle
({
title
:
"郭小清"
});
// if (e && e.brand) {
// this.brand = e.brand!==undefined?e.brand:"郭小清"
// uni.setNavigationBarTitle({
// title: this.brand
// });
// }
if
(
e
&&
e
.
orderId
)
{
this
.
orderId
=
e
.
orderId
}
if
(
e
&&
e
.
systemId
)
{
this
.
systemId
=
e
.
systemId
...
...
@@ -86,8 +105,8 @@
if
(
e
&&
e
.
classifyId
)
{
this
.
classifyId
=
e
.
classifyId
}
this
.
getListData
()
// this.getListData()
this
.
getListData
New
()
},
...
...
@@ -108,7 +127,6 @@
}
}
}
return
true
},
customStyleCancel
()
{
...
...
@@ -127,7 +145,6 @@
}
}
},
methods
:
{
getListData
:
function
()
{
this
.
loading
=
true
...
...
@@ -149,17 +166,60 @@
}
}
})
},
handleData
:
function
(
result
)
{
getListDataNew
()
{
this
.
loading
=
true
let
self
=
this
var
data
=
{
partnerCompanyId
:
this
.
systemId
,
orderId
:
this
.
orderId
,
categoryId
:
this
.
classifyId
,
brandId
:
this
.
brandId
};
self
.
$u
.
api
.
orderStandard
(
data
).
then
((
res
)
=>
{
this
.
loading
=
false
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
if
(
res
.
data
&&
res
.
data
.
length
>
0
){
let
dataList
=
[]
var
flag
=
false
;
res
.
data
.
forEach
(
item
=>
{
if
(
dataList
.
length
===
0
){
var
dataItem
=
{
type
:
''
,
list
:[]}
dataItem
.
type
=
item
.
type
dataItem
.
list
.
push
(
item
)
dataList
.
push
(
dataItem
)
}
else
{
dataList
.
forEach
(
dataListItem
=>
{
if
(
dataListItem
.
type
===
item
.
type
){
dataListItem
.
list
.
push
(
item
)
flag
=
true
return
false
;
}
else
{
flag
=
false
}
})
if
(
!
flag
){
var
dataItem
=
{
type
:
''
,
list
:[]}
dataItem
.
type
=
item
.
type
dataItem
.
list
.
push
(
item
)
dataList
.
push
(
dataItem
)
}
}
})
this
.
handleData
(
dataList
)
}
}
else
{
console
.
log
(
res
.
code
.
message
)
}
});
},
handleData
:
function
(
result
)
{
this
.
activeTop
=
0
const
globalData
=
getApp
().
globalData
globalData
.
photo
.
productList
=
result
this
.
dataList
=
result
if
(
result
.
length
>
0
)
{
var
item
=
result
[
0
]
globalData
.
photo
.
waterSetting
=
item
.
userWatermark
globalData
.
photo
.
waterSetting
=
this
.
userWatermark
this
.
rightList
=
item
.
list
}
},
...
...
@@ -176,7 +236,6 @@
duration
:
0
});
},
// 点击图片
handleClickImage
(
item
,
index
)
{
uni
.
previewImage
({
...
...
@@ -184,7 +243,6 @@
current
:
index
})
},
//右侧点击
rightItemClick
:
function
(
item
,
ikey
)
{
const
photo
=
getApp
().
globalData
.
photo
...
...
@@ -196,7 +254,6 @@
url
:
'/pages/photo/take'
})
},
// 清除图片
handleClickSure
:
function
()
{
this
.
$u
.
cloudApi
.
cleanImage
({
...
...
@@ -207,6 +264,42 @@
this
.
getListData
()
}
})
},
take
(
item
,
ikey
)
{
this
.
currentItemDate
=
item
uni
.
hideTabBar
()
this
.
takeStatus
=
true
},
closeTake
(
img
)
{
console
.
log
(
img
)
if
(
img
!==
undefined
){
// step1 添加图片
this
.
currentItemDate
.
images
.
push
(
img
)
// step2 保存图片
var
data
=
{
type
:
this
.
currentItemDate
.
type
,
images
:
this
.
currentItemDate
.
images
,
fieldsName
:
this
.
currentItemDate
.
fieldName
}
this
.
$u
.
api
.
saveImage
(
data
,
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
}
else
{
console
.
log
(
"保存图片异常"
,
res
.
data
.
message
)
}
});
}
this
.
takeStatus
=
false
},
getWatermark
(){
this
.
$u
.
api
.
getWatermark
(
data
,
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
this
.
userWatermark
=
res
.
data
}
else
{
console
.
log
(
"获取水印备注异常"
,
res
.
data
.
message
)
}
});
}
}
}
...
...
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