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
188113e5
Commit
188113e5
authored
Jun 04, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完工页接口
parent
bad4185a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
111 deletions
+98
-111
.env.dev.js
.env.dev.js
+3
-3
order.js
src/common/api/order.js
+7
-1
complete.vue
src/pages/order/complete.vue
+87
-107
detail.vue
src/pages/order/detail.vue
+1
-0
No files found.
.env.dev.js
View file @
188113e5
...
@@ -5,11 +5,11 @@ const UNI_APP = {
...
@@ -5,11 +5,11 @@ const UNI_APP = {
// banshou: 'https://m.banshou.com', //扳手app
// banshou: 'https://m.banshou.com', //扳手app
},
},
systemUrl
:
{
systemUrl
:
{
apiUrl
:
'http://192.168.
1.22
'
,
//java端域名请求头
apiUrl
:
'http://192.168.
0.62:37080
'
,
//java端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
},
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
argoDebugMode
:
1
argoDebugMode
:
1
}
}
module
.
exports
=
UNI_APP
;
module
.
exports
=
UNI_APP
;
src/common/api/order.js
View file @
188113e5
...
@@ -119,6 +119,11 @@ let orderApiFun = function(vm){
...
@@ -119,6 +119,11 @@ let orderApiFun = function(vm){
*/
*/
let
getCompleteConfigAndData
=
async
(
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/info'
);
let
getCompleteConfigAndData
=
async
(
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/info'
);
/**
* 完工项阶段下一步
*/
let
completeNextStep
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/nextStep'
,
params
);
/**
/**
* 查询措施
* 查询措施
*/
*/
...
@@ -212,7 +217,8 @@ let orderApiFun = function(vm){
...
@@ -212,7 +217,8 @@ let orderApiFun = function(vm){
workerApplyPay
,
workerApplyPay
,
allowLogin
,
allowLogin
,
otherUser
,
otherUser
,
checkAddCustomer
checkAddCustomer
,
completeNextStep
}
}
return
orderApi
return
orderApi
}
}
...
...
src/pages/order/complete.vue
View file @
188113e5
...
@@ -116,6 +116,33 @@
...
@@ -116,6 +116,33 @@
import
Detail
from
"@/components/order/detail.vue"
import
Detail
from
"@/components/order/detail.vue"
// import XhRadio from '@/components/createCom/XhRadio.vue'
// import XhRadio from '@/components/createCom/XhRadio.vue'
// 表单类型map
const
formType
=
new
Map
([
[
'text'
,
[
'textarea'
,
'input'
]],
[
'password'
,
[
'password'
,
'input'
]],
[
'textarea'
,
[
'input'
,
'digit'
]],
[
'number'
,
[
'input'
,
'digit'
]],
[
'decimal'
,
[
'input'
,
'digit'
]],
[
'double'
,
[
'input'
,
'digit'
]],
[
'integer'
,
[
'input'
,
'digit'
]],
[
'string'
,
[
'input'
,
'text'
]],
[
'multiinput'
,
[
'multiinput'
,
'text'
]],
[
'select'
,
[
'select'
,
'text'
]],
[
'specifications'
,
[
'select'
,
'text'
]],
[
'radio'
,
[
'radio'
,
'text'
]],
[
'checkbox'
,
[
'checkbox'
,
'text'
]],
[
'file'
,
[
'file'
,
'text'
]],
[
'photos'
,
[
'file'
,
'text'
]],
[
'location'
,
[
'location'
,
'text'
]],
[
'scan'
,
[
'scan'
,
'text'
]],
[
'machine_code'
,
[
'scan'
,
'text'
]],
[
'service_measures'
,
[
'servicemeasure'
,
'text'
]],
[
'time'
,
[
'time'
,
'text'
]],
[
'date'
,
[
'time'
,
'text'
]],
[
'form'
,
[
'form'
,
'text'
]],
[
'label'
,
[
'label'
,
'text'
]],
])
/**
/**
* modal 弹窗校验
* modal 弹窗校验
* @description 用于校验下一步的动作
* @description 用于校验下一步的动作
...
@@ -153,10 +180,10 @@
...
@@ -153,10 +180,10 @@
action
:
'nextAction'
,
action
:
'nextAction'
,
}
}
}
}
if
(
name
===
'
勘察信息
'
)
{
// 勘察
if
(
name
===
'
partnerInspectItem
'
)
{
// 勘察
if
(
!
pass
)
return
handerProgrom
.
perfect
if
(
!
pass
)
return
handerProgrom
.
perfect
return
type
===
'01'
?
handerProgrom
.
next
:
handerProgrom
.
appointment
return
type
===
'01'
?
handerProgrom
.
next
:
handerProgrom
.
appointment
}
else
if
(
name
===
'
安装信息
'
)
{
// 安装
}
else
if
(
name
===
'
partnerInstallItem
'
)
{
// 安装
let
hander
=
''
let
hander
=
''
switch
(
type
){
switch
(
type
){
case
'01'
:
// 安装完成
case
'01'
:
// 安装完成
...
@@ -226,6 +253,7 @@
...
@@ -226,6 +253,7 @@
takeStatus
:
false
,
takeStatus
:
false
,
currentItemDate
:{},
currentItemDate
:{},
photoItem
:
{},
photoItem
:
{},
maintainStep
:
'partnerInspectItem'
,
// showTab: true,
// showTab: true,
}
}
},
},
...
@@ -252,15 +280,13 @@
...
@@ -252,15 +280,13 @@
onLoad
(
option
)
{
onLoad
(
option
)
{
getApp
().
trackPage
(
'订单完工信息页'
)
getApp
().
trackPage
(
'订单完工信息页'
)
if
(
option
)
{
if
(
option
)
{
if
(
option
.
pageIndex
)
{
this
.
maintainStep
=
option
.
maintainStep
this
.
tabIndex
=
option
.
pageIndex
this
.
orderId
=
option
.
orderId
}
this
.
categoryId
=
option
.
categoryId
this
.
orderId
=
option
.
orderId
this
.
orderServiceType
=
decodeURIComponent
(
option
.
orderServiceType
)
this
.
categoryId
=
option
.
categoryId
this
.
inGuaranteePeriod
=
option
.
inGuaranteePeriod
this
.
orderServiceType
=
decodeURIComponent
(
option
.
orderServiceType
)
this
.
partnerCompanyId
=
option
.
partnerCompanyId
this
.
inGuaranteePeriod
=
option
.
inGuaranteePeriod
this
.
auditResultsId
=
option
.
auditResultsId
this
.
partnerCompanyId
=
option
.
partnerCompanyId
this
.
auditResultsId
=
option
.
auditResultsId
// this.showTab =item.partnerCompanyName == '挚达充电桩'
// this.showTab =item.partnerCompanyName == '挚达充电桩'
}
else
{
}
else
{
...
@@ -328,93 +354,23 @@
...
@@ -328,93 +354,23 @@
}
}
},
},
initData
(
res
)
{
initData
(
res
)
{
for
(
var
item
of
res
.
data
.
config
)
{
const
list
=
res
.
data
.
config
.
sort
((
a
,
b
)
=>
a
.
order
-
b
.
order
)
for
(
var
i
of
item
.
items
)
{
list
.
forEach
((
item
,
index
)
=>
{
for
(
var
d
of
i
.
items
)
{
if
(
this
.
maintainStep
===
item
.
panelFieldsName
)
this
.
tabIndex
=
index
var
inputType
=
'text'
item
.
items
.
forEach
(
v
=>
{
var
formType
=
''
v
.
items
.
forEach
(
d
=>
{
var
type
=
d
.
fieldsType
.
toLocaleLowerCase
()
const
type
=
d
.
fieldsType
.
toLocaleLowerCase
()
switch
(
type
)
{
const
formMap
=
formType
.
get
(
type
)
case
'text'
:
d
.
formType
=
formMap
[
0
]
inputType
=
'textarea'
d
.
inputType
=
formMap
[
1
]
formType
=
'input'
break
case
'password'
:
inputType
=
'password'
formType
=
'input'
break
case
'textarea'
:
case
'number'
:
case
'decimal'
:
case
'double'
:
case
'integer'
:
formType
=
'input'
inputType
=
'digit'
break
case
'string'
:
formType
=
'input'
,
inputType
=
'text'
break
case
'multiinput'
:
formType
=
'multiinput'
inputType
=
'text'
break
;
case
'select'
:
case
'specifications'
:
formType
=
'select'
inputType
=
'text'
break
case
'radio'
:
formType
=
'radio'
inputType
=
'text'
break
case
'checkbox'
:
formType
=
'checkbox'
inputType
=
'text'
break
case
'file'
:
case
'photos'
:
formType
=
'file'
inputType
=
'text'
break
case
'location'
:
formType
=
'location'
inputType
=
'text'
break
case
'scan'
:
case
'machine_code'
:
formType
=
'scan'
inputType
=
'text'
break
case
'service_measures'
:
formType
=
'servicemeasure'
inputType
=
'text'
break
case
'time'
:
case
'date'
:
formType
=
'time'
inputType
=
'text'
break
case
'form'
:
formType
=
'form'
inputType
=
'text'
break
case
'label'
:
formType
=
'label'
inputType
=
'text'
break
}
d
.
formType
=
formType
d
.
inputType
=
inputType
if
(
d
.
fieldsId
==
200
&&
res
.
data
.
value
)
{
if
(
d
.
fieldsId
==
200
&&
res
.
data
.
value
)
{
d
.
required
=
res
.
data
.
value
[
'paymentMethodsType'
]
!=
'03'
d
.
required
=
res
.
data
.
value
[
'paymentMethodsType'
]
!=
'03'
}
}
}
})
}
})
}
})
let
list
=
res
.
data
.
config
this
.
list
=
list
.
length
>
1
?
[
list
[
1
],
list
[
2
],
list
[
0
]]
:
list
this
.
list
=
list
// this.showTab = this.list.length > 1
// this.showTab = this.list.length > 1
this
.
form
=
res
.
data
.
value
||
{}
this
.
form
=
res
.
data
.
value
||
{}
this
.
current
=
0
this
.
current
=
0
...
@@ -525,14 +481,18 @@
...
@@ -525,14 +481,18 @@
this
.
locationCompleteItem
(
this
.
waitHandlerPanelIndex
,
this
.
waitHandlerGroupIndex
,
this
.
waitHandlerEleIndex
)
this
.
locationCompleteItem
(
this
.
waitHandlerPanelIndex
,
this
.
waitHandlerGroupIndex
,
this
.
waitHandlerEleIndex
)
},
},
// 去预约
// 去预约
appointment
()
{
async
appointment
()
{
uni
.
reLaunch
({
const
save
=
await
this
.
nextStepSaveData
()
url
:
`/pages/order/detail?id=
${
this
.
orderId
}
`
if
(
save
)
{
})
uni
.
reLaunch
({
url
:
`/pages/order/detail?id=
${
this
.
orderId
}
`
})
}
},
},
// 下一步
// 下一步动作
nextAction
()
{
async
nextAction
()
{
if
(
this
.
tabIndex
<
this
.
list
.
length
-
1
)
{
const
save
=
await
this
.
nextStepSaveData
()
if
(
this
.
tabIndex
<
this
.
list
.
length
-
1
&&
save
)
{
this
.
tabIndex
++
this
.
tabIndex
++
this
.
arr
=
[]
this
.
arr
=
[]
this
.
scrollRightTop
=
0
this
.
scrollRightTop
=
0
...
@@ -545,14 +505,15 @@
...
@@ -545,14 +505,15 @@
})
})
}
}
},
},
// 下一步弹窗处理
nextStep
()
{
nextStep
()
{
this
.
pass
=
this
.
checkCompleteItem
()
this
.
pass
=
this
.
checkCompleteItem
()
const
name
=
this
.
list
[
this
.
tabIndex
].
panelName
const
name
=
this
.
list
[
this
.
tabIndex
].
panel
Fields
Name
const
type
=
name
===
'
勘察信息
'
?
this
.
form
.
inspectConclusionType
:
this
.
form
.
constructionConclusionType
const
type
=
name
===
'
partnerInspectItem
'
?
this
.
form
.
inspectConclusionType
:
this
.
form
.
constructionConclusionType
const
submit
=
this
.
tabIndex
===
this
.
list
.
length
-
1
const
submit
=
this
.
tabIndex
===
this
.
list
.
length
-
1
const
result
=
actions
(
name
,
this
.
pass
,
type
,
submit
)
const
result
=
actions
(
name
,
this
.
pass
,
type
,
submit
)
console
.
log
(
"result"
,
result
)
this
.
completeCheck
.
status
=
true
this
.
completeCheck
.
status
=
true
this
.
completeCheck
.
confirmText
=
result
.
confirmText
this
.
completeCheck
.
confirmText
=
result
.
confirmText
this
.
completeCheck
.
action
=
result
.
action
this
.
completeCheck
.
action
=
result
.
action
...
@@ -562,6 +523,25 @@
...
@@ -562,6 +523,25 @@
}
}
},
},
// 下一步数据保存
nextStepSaveData
()
{
const
params
=
{
maintainFields
:
this
.
handleSaveData
(),
currentStep
:
this
.
list
[
this
.
tabIndex
].
panelFieldsName
,
nextStep
:
this
.
list
[
this
.
tabIndex
+
1
].
panelFieldsName
,
}
return
this
.
$u
.
api
.
completeNextStep
(
params
,
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
return
Promise
.
resolve
(
true
)
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
,
type
:
'error'
,
})
return
Promise
.
resolve
(
false
)
}
})
},
tabsChange
(
index
){
tabsChange
(
index
){
this
.
tabIndex
=
index
this
.
tabIndex
=
index
this
.
arr
=
[]
this
.
arr
=
[]
...
@@ -573,7 +553,7 @@
...
@@ -573,7 +553,7 @@
})
})
},
},
locationCompleteItem
(
panelIndex
,
groupIndex
,
eleIndex
){
// 页面定位到某一项
locationCompleteItem
(
panelIndex
,
groupIndex
,
eleIndex
){
// 页面定位到某一项
this
.
getMenuItemTop
()
this
.
getMenuItemTop
()
this
.
tabIndex
=
panelIndex
this
.
tabIndex
=
panelIndex
this
.
arr
=
[]
this
.
arr
=
[]
this
.
scrollRightTop
=
0
;
this
.
scrollRightTop
=
0
;
...
...
src/pages/order/detail.vue
View file @
188113e5
...
@@ -635,6 +635,7 @@
...
@@ -635,6 +635,7 @@
+
"&inGuaranteePeriod="
+
this
.
order
.
inGuaranteePeriod
+
"&inGuaranteePeriod="
+
this
.
order
.
inGuaranteePeriod
+
"&partnerCompanyId="
+
this
.
order
.
partnerCompanyId
+
"&partnerCompanyId="
+
this
.
order
.
partnerCompanyId
+
'&partnerCompanyName='
+
this
.
order
.
partnerCompanyName
+
'&partnerCompanyName='
+
this
.
order
.
partnerCompanyName
+
'&maintainStep='
+
this
.
order
.
maintainStep
})
})
},
},
rejectOrder
()
{
// 拒单
rejectOrder
()
{
// 拒单
...
...
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