Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-services
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e793f7b6
authored
Sep 08, 2023
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
370396e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
72 deletions
src/views/beforeSale/editEquity.vue
src/views/beforeSale/editEquity.vue
View file @
e793f7b
...
...
@@ -1331,7 +1331,7 @@ export default {
}
}
else
if
(
e
.
attributeName
===
'gearbox'
)
{
e
.
optionList
=
this
.
gearboxOptions
}
else
if
(
e
.
attributeName
===
'vehicle_nature'
)
{
}
else
if
(
e
.
attributeName
===
'vehicle_nature'
)
{
e
.
optionList
=
this
.
operationalOptions
this
.
$set
(
this
.
productModal
[
item
.
idName
],
`
${
e
.
attributeName
}
`
,
e
.
optionList
[
0
].
value
)
}
...
...
@@ -1912,82 +1912,87 @@ export default {
}
},
handleConfirm
()
{
this
.
vaildGlassParams
()
const
vaidObj
=
this
.
equityRadio
==
1
?
this
.
formatProduct
:
this
.
autoFormatProduct
const
isEmptyObj
=
JSON
.
stringify
(
vaidObj
)
==
'{}'
if
(
isEmptyObj
)
{
this
.
$message
({
message
:
'请选择产品信息'
,
type
:
'error'
})
return
}
if
(
this
.
submit
)
{
return
true
}
this
.
submit
=
true
var
list
=
[
'Car'
,
'Brand'
,
'User'
,
'Shop'
,
'Other'
]
var
flag
=
true
var
errorObjList
=
[]
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
this
.
$refs
[
'editFormRef'
+
list
[
i
]])
{
var
pRef
=
this
.
$refs
[
'editFormRef'
+
list
[
i
]]
pRef
.
$refs
[
'editChildRef'
+
list
[
i
]].
validate
((
valid
,
errorObj
)
=>
{
!
valid
&&
errorObjList
.
push
(
errorObj
)
flag
&&
(
flag
=
valid
)
})
try
{
this
.
vaildGlassParams
()
const
vaidObj
=
this
.
equityRadio
==
1
?
this
.
formatProduct
:
this
.
autoFormatProduct
const
isEmptyObj
=
JSON
.
stringify
(
vaidObj
)
==
'{}'
if
(
isEmptyObj
)
{
this
.
$message
({
message
:
'请选择产品信息'
,
type
:
'error'
})
return
}
}
if
(
!
flag
)
{
this
.
whereToGo
(
Object
.
keys
(
errorObjList
[
0
])[
0
])
this
.
submit
=
false
return
true
}
var
params
=
this
.
getParams
()
delete
params
.
attributes
params
.
operationType
=
1
if
([
2
,
3
,
4
].
includes
(
this
.
routeInfo
.
addOrEdit
))
{
if
(
this
.
routeInfo
.
addOrEdit
==
4
&&
this
.
editForm
.
orderStatus
!=
3
)
{
params
.
contractNo
=
''
}
else
{
params
.
contractNo
=
this
.
routeInfo
.
contractNo
if
(
this
.
submit
)
{
return
true
}
this
.
submit
=
true
var
list
=
[
'Car'
,
'Brand'
,
'User'
,
'Shop'
,
'Other'
]
var
flag
=
true
var
errorObjList
=
[]
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
this
.
$refs
[
'editFormRef'
+
list
[
i
]])
{
var
pRef
=
this
.
$refs
[
'editFormRef'
+
list
[
i
]]
pRef
.
$refs
[
'editChildRef'
+
list
[
i
]].
validate
((
valid
,
errorObj
)
=>
{
!
valid
&&
errorObjList
.
push
(
errorObj
)
flag
&&
(
flag
=
valid
)
})
}
}
}
else
{
params
.
contractNo
=
''
}
const
productflag
=
this
.
vaidProduct
()
if
(
productflag
)
{
return
}
params
=
{
...
params
,
...
vaidObj
}
if
(
this
.
showUploadInfo
)
{
const
_check
=
this
.
checkAttachmentList
()
if
(
_check
)
{
if
(
!
flag
)
{
this
.
whereToGo
(
Object
.
keys
(
errorObjList
[
0
])[
0
])
this
.
submit
=
false
this
.
$message
({
message
:
'请补充全部资料'
,
type
:
'error'
})
return
return
true
}
params
.
attachmentList
=
this
.
attachmentList
||
[]
}
params
.
attachmentList
=
params
.
attachmentList
||
[]
this
.
$apis
.
beforeSale
.
checkOrderApi
({
vin
:
this
.
editForm
.
vehicle
.
vin
,
contractNo
:
this
.
routeInfo
.
contractNo
||
''
}).
then
(
res
=>
{
if
(
res
.
code
==
'0'
)
{
this
.
updateEquity
(
params
)
var
params
=
this
.
getParams
()
delete
params
.
attributes
params
.
operationType
=
1
if
([
2
,
3
,
4
].
includes
(
this
.
routeInfo
.
addOrEdit
))
{
if
(
this
.
routeInfo
.
addOrEdit
==
4
&&
this
.
editForm
.
orderStatus
!=
3
)
{
params
.
contractNo
=
''
}
else
{
params
.
contractNo
=
this
.
routeInfo
.
contractNo
}
}
else
{
this
.
submit
=
false
this
.
$confirm
(
res
.
message
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
this
.
submit
=
true
this
.
updateEquity
(
params
)
}
}
})
params
.
contractNo
=
''
}
})
const
productflag
=
this
.
vaidProduct
()
if
(
productflag
)
{
return
}
params
=
{
...
params
,
...
vaidObj
}
if
(
this
.
showUploadInfo
)
{
const
_check
=
this
.
checkAttachmentList
()
if
(
_check
)
{
this
.
submit
=
false
this
.
$message
({
message
:
'请补充全部资料'
,
type
:
'error'
})
return
}
params
.
attachmentList
=
this
.
attachmentList
||
[]
}
params
.
attachmentList
=
params
.
attachmentList
||
[]
this
.
$apis
.
beforeSale
.
checkOrderApi
({
vin
:
this
.
editForm
.
vehicle
.
vin
,
contractNo
:
this
.
routeInfo
.
contractNo
||
''
}).
then
(
res
=>
{
if
(
res
.
code
==
'0'
)
{
this
.
updateEquity
(
params
)
}
else
{
this
.
submit
=
false
this
.
$confirm
(
res
.
message
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
this
.
submit
=
true
this
.
updateEquity
(
params
)
}
}
})
}
})
}
catch
(
error
)
{
console
.
log
(
error
)
this
.
submit
=
false
}
},
handleReset
()
{
this
.
editForm
=
{
...
...
@@ -2056,9 +2061,12 @@ export default {
let
_code
=
[],
_typeCode
=
[
'YB0001'
,
'YB0002'
,
'YB0003'
,
'YB0004'
],
flag
=
false
if
((
!
this
.
attachmentList
||
!
this
.
attachmentList
.
length
)
&&
this
.
attachmentListQuery
.
length
)
{
if
((
!
this
.
attachmentList
||
!
this
.
attachmentList
.
length
)
&&
this
.
attachmentListQuery
.
length
)
{
this
.
attachmentList
=
this
.
attachmentListQuery
||
[]
}
if
(
!
this
.
attachmentList
)
{
this
.
attachmentList
=
[]
}
this
.
attachmentList
.
forEach
(
el
=>
{
if
(
_typeCode
.
includes
(
el
.
attachmentCode
))
{
_code
.
push
(
el
.
attachmentCode
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment