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
ef4f9e56
Commit
ef4f9e56
authored
Aug 13, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 完工-核销配件顺序调整
parent
d8ac4e2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
18 deletions
+28
-18
complete.vue
src/pages/order/complete.vue
+28
-18
No files found.
src/pages/order/complete.vue
View file @
ef4f9e56
...
@@ -945,23 +945,30 @@ export default {
...
@@ -945,23 +945,30 @@ export default {
},
},
// 提交配件信息
// 提交配件信息
submitParts
()
{
submitParts
()
{
if
(
this
.
form
.
orderSpareParts
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
orderSpareParts
=
JSON
.
parse
(
this
.
form
.
orderSpareParts
)
if
(
this
.
form
.
orderSpareParts
)
{
const
lists
=
orderSpareParts
.
filter
((
v
)
=>
v
.
quantity
>
0
)
const
orderSpareParts
=
JSON
.
parse
(
this
.
form
.
orderSpareParts
)
const
params
=
{
const
lists
=
orderSpareParts
.
filter
((
v
)
=>
v
.
quantity
>
0
)
workOrderId
:
this
.
orderId
,
const
params
=
{
applyType
:
'10'
,
workOrderId
:
this
.
orderId
,
parts
:
lists
?
JSON
.
stringify
(
lists
)
:
''
,
applyType
:
'10'
,
}
parts
:
lists
?
JSON
.
stringify
(
lists
)
:
''
,
this
.
$u
.
api
.
createParts
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
!==
200
)
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
data
,
type
:
'error'
,
})
}
}
})
this
.
$u
.
api
.
createParts
(
params
).
then
((
res
)
=>
{
}
if
(
res
.
code
!==
200
)
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
data
,
type
:
'error'
,
})
resolve
(
false
)
}
resolve
(
true
)
})
}
else
{
resolve
(
true
)
}
})
},
},
// 提交订单
// 提交订单
orderFinish
()
{
orderFinish
()
{
...
@@ -972,10 +979,13 @@ export default {
...
@@ -972,10 +979,13 @@ export default {
mobile
:
this
.
vuex_user
.
mobile
,
mobile
:
this
.
vuex_user
.
mobile
,
orderId
:
Number
(
this
.
orderId
),
orderId
:
Number
(
this
.
orderId
),
})
})
this
.
$u
.
api
.
saveCompleteData
(
param
,
this
.
orderId
).
then
((
res
)
=>
{
this
.
$u
.
api
.
saveCompleteData
(
param
,
this
.
orderId
).
then
(
async
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
//完工项信息保存成功再次完工工单
//完工项信息保存成功再次完工工单
if
(
!
this
.
exception
)
this
.
submitParts
()
if
(
!
this
.
exception
)
{
// 核销配件
const
submitPart
=
await
this
.
submitParts
()
if
(
!
submitPart
)
return
}
if
(
this
.
inGuaranteePeriod
===
'Y'
)
{
if
(
this
.
inGuaranteePeriod
===
'Y'
)
{
this
.
$u
.
api
.
inOrderFinish
(
this
.
orderId
).
then
((
res
)
=>
{
this
.
$u
.
api
.
inOrderFinish
(
this
.
orderId
).
then
((
res
)
=>
{
...
...
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