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
11891ecd
Commit
11891ecd
authored
Apr 30, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完工校验弹窗
parent
fafdd87f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
21 deletions
+85
-21
complete.vue
src/pages/order/complete.vue
+85
-21
No files found.
src/pages/order/complete.vue
View file @
11891ecd
<
template
>
<
template
>
<view
class=
"com-content"
>
<view
class=
"com-content"
>
<complete-check
:show=
"completeCheckStatus"
:list-data=
"completeCheckResult"
@
close=
"closeCheckResult"
@
handle-problem=
"handerProgrom"
></complete-check>
<view
class=
"u-wrap"
v-if=
"!takeStatus"
>
<view
class=
"u-wrap"
v-if=
"!takeStatus"
>
<u-navbar
:background=
"
{background: '#2272FF'}" back-icon-color="#fff" :title-size="26" title-color="#fff" :border-bottom="false" title="完工信息">
</u-navbar>
<u-navbar
:background=
"
{background: '#2272FF'}" back-icon-color="#fff" :title-size="26" title-color="#fff" :border-bottom="false" title="完工信息">
</u-navbar>
<u-tabs-swiper
ref=
"tabs"
:current=
"tabIndex"
name=
"panelName"
:list=
"list"
@
change=
"tabsChange"
:is-scroll=
"false"
bg-color=
"#2272FF"
inactive-color=
"#a6c6ff"
active-color=
"#fff"
height=
"120"
></u-tabs-swiper>
<u-tabs-swiper
ref=
"tabs"
:current=
"tabIndex"
name=
"panelName"
:list=
"list"
@
change=
"tabsChange"
:is-scroll=
"false"
bg-color=
"#2272FF"
inactive-color=
"#a6c6ff"
active-color=
"#fff"
height=
"120"
></u-tabs-swiper>
...
@@ -60,8 +61,8 @@
...
@@ -60,8 +61,8 @@
@
value-change=
"fieldValueChange"
>
@
value-change=
"fieldValueChange"
>
</xh-picker>
</xh-picker>
<xh-service-measure
v-else-if=
"typeToComponentType(item.fieldsType)==='servicemeasure'"
<xh-service-measure
v-else-if=
"typeToComponentType(item.fieldsType)==='servicemeasure'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:orderId=
"orderId"
:categoryId=
"categoryId"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:orderId=
"orderId"
:categoryId=
"categoryId"
:orderServiceType=
"orderServiceType"
:specificationId=
"form['specificationId'] || 0"
:value=
"form[item.fieldsName]"
:orderServiceType=
"orderServiceType"
:specificationId=
"form['specificationId'] || 0"
:value=
"form[item.fieldsName]"
@
value-change=
"fieldValueChange"
>
@
value-change=
"fieldValueChange"
>
</xh-service-measure>
</xh-service-measure>
<xh-time
v-else-if=
"typeToComponentType(item.fieldsType)==='time'"
<xh-time
v-else-if=
"typeToComponentType(item.fieldsType)==='time'"
...
@@ -161,7 +162,12 @@
...
@@ -161,7 +162,12 @@
submitBtnStatus
:
false
,
submitBtnStatus
:
false
,
takeStatus
:
false
,
takeStatus
:
false
,
fileIndex
:
null
,
fileIndex
:
null
,
files
:
[]
files
:
[],
completeCheckStatus
:
false
,
completeCheckResult
:
[],
waitHandlerPanelIndex
:
0
,
waitHandlerGroupIndex
:
0
,
waitHandlerEleIndex
:
0
,
}
}
},
},
components
:
{
components
:
{
...
@@ -286,17 +292,75 @@
...
@@ -286,17 +292,75 @@
}
}
})
})
},
},
checkCompleteItem
(){
let
self
=
this
let
checkResult
=
[]
let
pass
=
true
let
first
=
true
self
.
list
.
forEach
((
panel
,
panelIndex
)
=>
{
let
panelResult
=
{
label
:
panel
.
panelName
,
submitted
:
0
,
required
:
0
,
pass
:
true
}
panel
.
items
.
forEach
((
group
,
groupIndex
)
=>
{
group
.
items
.
forEach
((
ele
,
eleIndex
)
=>
{
if
(
ele
.
required
){
panelResult
.
required
++
let
value
=
self
.
form
[
ele
.
fieldsName
]
if
(
value
&&!
Array
.
isArray
(
value
)){
panelResult
.
submitted
++
}
else
if
(
value
&&
Array
.
isArray
(
value
)
&&
value
.
length
>
0
){
panelResult
.
submitted
++
}
else
if
(
first
){
// 记录第一个 为空 并且需要必填的项 用于定位
first
=
false
self
.
waitHandlerPanelIndex
=
panelIndex
self
.
waitHandlerGroupIndex
=
groupIndex
self
.
waitHandlerEleIndex
=
eleIndex
}
}
})
})
panelResult
.
pass
=
panelResult
.
required
<=
panelResult
.
submitted
pass
=
pass
&&
panelResult
.
pass
checkResult
.
push
(
panelResult
)
})
console
.
log
(
checkResult
)
self
.
completeCheckResult
=
checkResult
return
pass
},
closeCheckResult
(){
// 检查结果窗口取消回调
this
.
completeCheckStatus
=
false
},
handerProgrom
(){
// 检查结果窗口 去处理回调 定位到缺失的项
this
.
completeCheckStatus
=
false
this
.
locationCompleteItem
(
this
.
waitHandlerPanelIndex
,
this
.
waitHandlerGroupIndex
,
this
.
waitHandlerEleIndex
)
},
locationCompleteItem
(
panelIndex
,
groupIndex
,
eleIndex
){
// 页面定位到某一项
this
.
tabIndex
=
panelIndex
this
.
arr
=
[]
this
.
scrollRightTop
=
0
;
this
.
current
=
0
;
this
.
$nextTick
(
function
()
{
this
.
swichMenu
(
groupIndex
)
})
},
orderFinish
(){
orderFinish
(){
let
self
=
this
let
self
=
this
if
(
self
.
inGuaranteePeriod
===
'Y'
){
let
pass
=
this
.
checkCompleteItem
()
self
.
$u
.
api
.
inOrderFinish
(
self
.
orderId
).
then
((
res
)
=>
{
if
(
!
pass
){
console
.
log
(
res
)
self
.
completeCheckStatus
=
true
})
}
else
{
}
else
{
console
.
log
(
"完工"
);
self
.
$u
.
api
.
outOrderFinish
({
customerPayType
:
'CASH'
},
self
.
orderId
).
then
((
res
)
=>
{
self
.
completeCheckStatus
=
true
console
.
log
(
res
)
if
(
self
.
inGuaranteePeriod
===
'Y'
){
})
self
.
$u
.
api
.
inOrderFinish
(
self
.
orderId
).
then
((
res
)
=>
{
}
console
.
log
(
res
)
self
.
completeCheckStatus
=
true
})
}
else
{
self
.
$u
.
api
.
outOrderFinish
({
customerPayType
:
'CASH'
},
self
.
orderId
).
then
((
res
)
=>
{
console
.
log
(
res
)
self
.
completeCheckStatus
=
true
})
}
}
},
},
getTakeStatus
(
event
)
{
getTakeStatus
(
event
)
{
this
.
takeStatus
=
event
.
status
this
.
takeStatus
=
event
.
status
...
@@ -307,7 +371,7 @@
...
@@ -307,7 +371,7 @@
this
.
tabIndex
=
index
this
.
tabIndex
=
index
this
.
arr
=
[]
this
.
arr
=
[]
this
.
scrollRightTop
=
0
;
this
.
scrollRightTop
=
0
;
this
.
current
=
0
;
this
.
current
=
0
;
this
.
leftMenuStatus
(
0
)
this
.
leftMenuStatus
(
0
)
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
this
.
getMenuItemTop
()
this
.
getMenuItemTop
()
...
@@ -587,7 +651,7 @@
...
@@ -587,7 +651,7 @@
.u-tab-view
{
.u-tab-view
{
width
:
200rpx
;
width
:
200rpx
;
height
:
100%
;
height
:
100%
;
border
:
4rpx
solid
#F4F5F7
;
border
:
4rpx
solid
#F4F5F7
;
}
}
...
@@ -666,11 +730,11 @@
...
@@ -666,11 +730,11 @@
height
:
120rpx
;
height
:
120rpx
;
}
}
/*提交按钮*/
/*提交按钮*/
.btn-bottom
{
.btn-bottom
{
border
:
2rpx
solid
#F4F5F7
;
border
:
2rpx
solid
#F4F5F7
;
}
}
.btn-wrap
{
.btn-wrap
{
width
:
100%
;
width
:
100%
;
padding
:
20rpx
0
44rpx
0
;
padding
:
20rpx
0
44rpx
0
;
...
@@ -678,7 +742,7 @@
...
@@ -678,7 +742,7 @@
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
}
}
.btn-save
{
.btn-save
{
color
:
#FFFFFF
;
color
:
#FFFFFF
;
background-color
:
#2272FF
;
background-color
:
#2272FF
;
...
...
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