Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-appreciation
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 ba0bb9ae
authored
Jul 26, 2024
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
c488188b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
123 additions
and
116 deletions
src/views/beforeSale/editEquity.vue
src/views/beforeSale/editEquity.vue
View file @
ba0bb9a
...
...
@@ -55,7 +55,7 @@
<!-- 自选权益 -->
<div
v-if=
"equityRadio == '1'"
class=
"auto_widget"
>
<el-checkbox-group
v-model=
"curSelectPro"
:disabled=
"disabled ||
dataSourceDisable
"
>
<el-checkbox-group
v-model=
"curSelectPro"
:disabled=
"disabled ||
(dataSourceDisable && curSelectPro.length)
"
>
<div
v-for=
"(item, index) in productList"
:key=
"index"
class=
"product_wrapper"
>
<div>
<!-- <el-checkbox @change="changeCheckBox($event, item, index)" :disabled="item.disabled" :label="errGlassName&&item.idName=='glass'?item.packageName+`(${errGlassName})`:item.packageName"> -->
...
...
@@ -159,7 +159,7 @@
<!-- 定制权益 -->
<div
v-if=
"equityRadio == '2'"
class=
"auto_widget"
>
<el-checkbox-group
v-model=
"curSelectCustomPro"
:disabled=
"disabled ||
dataSourceDisable
"
>
<el-checkbox-group
v-model=
"curSelectCustomPro"
:disabled=
"disabled ||
(dataSourceDisable && curSelectCustomPro.length)
"
>
<div
v-for=
"(item, index) in customProductList"
:key=
"index"
class=
"product_wrapper"
>
<div>
<el-checkbox
@
change=
"changeRaido($event, item)"
:label=
"item.packageCode"
:disabled=
"item.disabled"
>
...
...
@@ -1715,6 +1715,9 @@ export default {
this
.
editForm
.
effectiveDate
=
new
Date
(
new
Date
().
setDate
(
new
Date
().
getDate
()
+
1
))
}
this
.
dataSourceDisable
=
res
.
dataSource
==
'car'
if
(
res
?.
vehicle
?.
invoicePrice
&&
this
.
editForm
.
orderStatus
!=
2
)
{
productArrData
=
this
.
packageToPrice
(
res
.
vehicle
.
invoicePrice
,
true
)
}
this
.
editForm
.
packageCode
&&
this
.
packageAttr
(
true
,
productArrData
,
res
)
const
spaItem
=
this
.
baseData
.
agreeList
.
find
(
item
=>
item
.
id
==
this
.
editForm
.
specialAppointId
)
if
(
spaItem
)
{
...
...
@@ -1772,8 +1775,8 @@ export default {
})
},
// 改建议价,实际销售价
packageToPrice
(
e
)
{
let
_price
=
e
?.
target
?.
value
||
''
packageToPrice
(
e
,
formDetail
)
{
let
_price
=
formDetail
?
e
:
e
?.
target
?.
value
||
''
if
(
_price
&&
this
.
editForm
.
orderStatus
!=
2
)
{
let
_list
=
[]
this
.
copyCustomProductList
.
forEach
(
item
=>
{
...
...
@@ -1784,6 +1787,7 @@ export default {
this
.
changeRaido
(
false
,
item
,
true
)
}
}
if
(
formDetail
)
return
_list
})
this
.
customProductList
=
_list
}
...
...
@@ -1806,131 +1810,134 @@ export default {
packCode
=
[]
detailInfo
.
attributes
.
forEach
(
item
=>
{
let
targetItem
=
productArrData
.
find
(
k
=>
k
.
packageCode
==
item
.
packageCode
)
if
(
targetItem
&&
item
.
parentId
)
{
targetItem
.
parentId
=
item
.
parentId
targetItem
.
parentName
=
item
.
parentName
}
const
defalutAttr
=
this
.
handleDefaultValue
(
targetItem
,
item
.
attributeDTOList
)
if
(
defalutAttr
.
length
)
{
item
.
attributeDTOList
=
this
.
handlerAttrSetValue
(
this
.
unique
(
defalutAttr
),
item
.
attributeDTOList
)
}
if
(
targetItem
.
packageType
==
1
)
{
this
.
equityRadio
=
2
this
.
curSelectCustomPro
.
push
(
targetItem
.
packageCode
)
this
.
curSelectCustomPro
=
Array
.
from
(
new
Set
(
this
.
curSelectCustomPro
))
item
.
attributeDTOList
.
forEach
(
a
=>
{
if
(
a
.
attributeName
.
includes
(
'price'
))
{
a
.
attributeValue
=
a
.
attributeValue
/
100
}
if
(
a
.
attributeName
==
'tireScale'
&&
a
.
sort
==
1
)
{
a
.
attributeName
=
'afterTireScale'
}
if
(
a
.
attributeName
==
'buy_car_type'
&&
a
.
attributeValue
==
1
)
{
this
.
compensationNameDisable
=
true
}
this
.
productModal
[
`vip
${
item
.
packageCode
}
`
][
a
.
attributeName
]
=
a
.
attributeValue
})
if
(
this
.
routeInfo
.
addOrEdit
==
3
||
this
.
routeInfo
.
addOrEdit
==
4
)
{
this
.
leftDisable
=
true
this
.
customProductList
.
map
(
c
=>
{
if
(
this
.
editForm
.
dataSource
!=
'car'
&&
this
.
editForm
.
orderStatus
==
4
)
{
this
.
dataSourceDisable
=
false
}
else
{
c
.
disabled
=
true
}
c
.
groupAttributeList
.
map
(
ele
=>
{
if
(
ele
.
attributeName
==
'service_period'
&&
this
.
routeInfo
.
addOrEdit
>
2
)
{
ele
.
disabled
=
true
}
if
(
ele
.
attributeName
==
'card'
)
{
ele
.
disabled
=
true
}
if
(
ele
.
attributeName
==
'effective_date'
&&
this
.
routeInfo
.
addOrEdit
==
3
)
{
ele
.
disabled
=
true
}
})
return
c
})
if
(
targetItem
){
if
(
targetItem
&&
item
.
parentId
)
{
targetItem
.
parentId
=
item
.
parentId
targetItem
.
parentName
=
item
.
parentName
}
if
(
this
.
routeInfo
.
addOrEdit
==
2
)
{
this
.
customProductList
.
map
(
c
=>
{
if
(
this
.
editForm
.
dataSource
==
'car'
)
{
c
.
disabled
=
true
}
else
{
this
.
dataSourceDisable
=
false
const
defalutAttr
=
this
.
handleDefaultValue
(
targetItem
,
item
.
attributeDTOList
)
if
(
defalutAttr
.
length
)
{
item
.
attributeDTOList
=
this
.
handlerAttrSetValue
(
this
.
unique
(
defalutAttr
),
item
.
attributeDTOList
)
}
if
(
targetItem
.
packageType
==
1
)
{
this
.
equityRadio
=
2
this
.
curSelectCustomPro
.
push
(
targetItem
.
packageCode
)
this
.
curSelectCustomPro
=
Array
.
from
(
new
Set
(
this
.
curSelectCustomPro
))
item
.
attributeDTOList
.
forEach
(
a
=>
{
if
(
a
.
attributeName
.
includes
(
'price'
))
{
a
.
attributeValue
=
a
.
attributeValue
/
100
}
if
(
a
.
attributeName
==
'tireScale'
&&
a
.
sort
==
1
)
{
a
.
attributeName
=
'afterTireScale'
}
c
.
groupAttributeList
.
map
(
ele
=>
{
if
(
ele
.
attributeName
==
'service_period'
&&
this
.
dataSourceDisable
)
{
ele
.
disabled
=
true
this
.
leftDisable
=
true
if
(
a
.
attributeName
==
'buy_car_type'
&&
a
.
attributeValue
==
1
)
{
this
.
compensationNameDisable
=
true
}
this
.
productModal
[
`vip
${
item
.
packageCode
}
`
][
a
.
attributeName
]
=
a
.
attributeValue
})
if
(
this
.
routeInfo
.
addOrEdit
==
3
||
this
.
routeInfo
.
addOrEdit
==
4
)
{
this
.
leftDisable
=
true
this
.
customProductList
.
map
(
c
=>
{
if
(
this
.
editForm
.
dataSource
!=
'car'
&&
this
.
editForm
.
orderStatus
==
4
)
{
this
.
dataSourceDisable
=
false
}
else
{
c
.
disabled
=
true
}
c
.
groupAttributeList
.
map
(
ele
=>
{
if
(
ele
.
attributeName
==
'service_period'
&&
this
.
routeInfo
.
addOrEdit
>
2
)
{
ele
.
disabled
=
true
}
if
(
ele
.
attributeName
==
'card'
)
{
ele
.
disabled
=
true
}
if
(
ele
.
attributeName
==
'effective_date'
&&
this
.
routeInfo
.
addOrEdit
==
3
)
{
ele
.
disabled
=
true
}
})
return
c
})
return
c
})
}
}
else
{
this
.
equityRadio
=
1
this
.
curSelectPro
.
push
(
targetItem
.
packageCode
)
this
.
curSelectPro
=
Array
.
from
(
new
Set
(
this
.
curSelectPro
))
item
.
attributeDTOList
.
forEach
(
b
=>
{
if
(
b
.
attributeName
.
includes
(
'price'
))
{
b
.
attributeValue
=
b
.
attributeValue
/
100
}
else
if
(
b
.
attributeName
==
'planId'
)
{
this
.
getCase
(
parseInt
(
b
.
attributeValue
))
}
if
(
b
.
attributeName
==
'tireScale'
&&
b
.
sort
==
1
)
{
b
.
attributeName
=
'afterTireScale'
}
if
(
b
.
attributeName
==
'buy_car_type'
&&
b
.
attributeValue
==
1
)
{
this
.
compensationNameDisable
=
true
if
(
this
.
routeInfo
.
addOrEdit
==
2
)
{
this
.
customProductList
.
map
(
c
=>
{
if
(
this
.
editForm
.
dataSource
==
'car'
)
{
c
.
disabled
=
true
}
else
{
this
.
dataSourceDisable
=
false
}
c
.
groupAttributeList
.
map
(
ele
=>
{
if
(
ele
.
attributeName
==
'service_period'
&&
this
.
dataSourceDisable
)
{
ele
.
disabled
=
true
this
.
leftDisable
=
true
}
})
return
c
})
}
this
.
productModal
[
targetItem
.
idName
][
b
.
attributeName
]
=
b
.
attributeValue
})
if
(
this
.
routeInfo
.
addOrEdit
==
3
||
this
.
routeInfo
.
addOrEdit
==
4
)
{
this
.
rightDisable
=
true
this
.
productList
.
map
(
d
=>
{
if
(
this
.
editForm
.
dataSource
!=
'car'
&&
this
.
editForm
.
orderStatus
==
4
)
{
this
.
dataSourceDisable
=
false
}
else
{
d
.
disabled
=
true
}
else
{
this
.
equityRadio
=
1
this
.
curSelectPro
.
push
(
targetItem
.
packageCode
)
this
.
curSelectPro
=
Array
.
from
(
new
Set
(
this
.
curSelectPro
))
item
.
attributeDTOList
.
forEach
(
b
=>
{
if
(
b
.
attributeName
.
includes
(
'price'
)
)
{
b
.
attributeValue
=
b
.
attributeValue
/
100
}
else
if
(
b
.
attributeName
==
'planId'
)
{
this
.
getCase
(
parseInt
(
b
.
attributeValue
))
}
d
.
groupAttributeList
.
map
(
elee
=>
{
if
(
elee
.
attributeName
==
'service_period'
&&
this
.
routeInfo
.
addOrEdit
>
2
)
{
elee
.
disabled
=
true
}
if
(
elee
.
attributeName
==
'card'
)
{
elee
.
disabled
=
true
}
if
(
elee
.
attributeName
==
'effective_date'
&&
this
.
routeInfo
.
addOrEdit
==
3
)
{
elee
.
disabled
=
true
}
if
(
elee
.
attributeName
==
'buy_car_type'
&&
elee
.
attributeValue
==
1
)
{
elee
.
disabled
=
true
if
(
b
.
attributeName
==
'tireScale'
&&
b
.
sort
==
1
)
{
b
.
attributeName
=
'afterTireScale'
}
if
(
b
.
attributeName
==
'buy_car_type'
&&
b
.
attributeValue
==
1
)
{
this
.
compensationNameDisable
=
true
}
this
.
productModal
[
targetItem
.
idName
][
b
.
attributeName
]
=
b
.
attributeValue
})
if
(
this
.
routeInfo
.
addOrEdit
==
3
||
this
.
routeInfo
.
addOrEdit
==
4
)
{
this
.
rightDisable
=
true
this
.
productList
.
map
(
d
=>
{
if
(
this
.
editForm
.
dataSource
!=
'car'
&&
this
.
editForm
.
orderStatus
==
4
)
{
this
.
dataSourceDisable
=
false
}
else
{
d
.
disabled
=
true
}
d
.
groupAttributeList
.
map
(
elee
=>
{
if
(
elee
.
attributeName
==
'service_period'
&&
this
.
routeInfo
.
addOrEdit
>
2
)
{
elee
.
disabled
=
true
}
if
(
elee
.
attributeName
==
'card'
)
{
elee
.
disabled
=
true
}
if
(
elee
.
attributeName
==
'effective_date'
&&
this
.
routeInfo
.
addOrEdit
==
3
)
{
elee
.
disabled
=
true
}
if
(
elee
.
attributeName
==
'buy_car_type'
&&
elee
.
attributeValue
==
1
)
{
elee
.
disabled
=
true
}
})
return
d
})
return
d
})
}
if
(
this
.
routeInfo
.
addOrEdit
==
2
)
{
this
.
productList
.
map
(
c
=>
{
if
(
this
.
editForm
.
dataSource
==
'car'
)
{
c
.
disabled
=
true
}
else
{
this
.
dataSourceDisable
=
false
}
c
.
groupAttributeList
.
map
(
ele
=>
{
if
(
ele
.
attributeName
==
'service_period'
&&
this
.
dataSourceDisable
)
{
ele
.
disabled
=
true
this
.
rightDisable
=
true
}
if
(
this
.
routeInfo
.
addOrEdit
==
2
)
{
this
.
productList
.
map
(
c
=>
{
if
(
this
.
editForm
.
dataSource
==
'car'
)
{
c
.
disabled
=
true
}
else
{
this
.
dataSourceDisable
=
false
}
c
.
groupAttributeList
.
map
(
ele
=>
{
if
(
ele
.
attributeName
==
'service_period'
&&
this
.
dataSourceDisable
)
{
ele
.
disabled
=
true
this
.
rightDisable
=
true
}
})
return
c
})
return
c
})
}
}
if
(
targetItem
.
printType
==
2
)
{
this
.
showUploadInfo
=
true
}
}
if
(
targetItem
.
printType
==
2
)
{
this
.
showUploadInfo
=
true
}
packCode
.
push
(
item
.
packageCode
)
const
_curProdTarget
=
this
.
allProdList
.
find
(
el
=>
el
.
packageCode
==
item
.
packageCode
)
...
...
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