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 9380eb66
authored
Oct 14, 2024
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
权益提单兼容套餐开发
1 parent
89bdb3e8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
36 deletions
src/views/beforeSale/editEquity.vue
src/views/beforeSale/editEquity.vue
View file @
9380eb6
...
@@ -1172,27 +1172,60 @@ export default {
...
@@ -1172,27 +1172,60 @@ export default {
this
.
vailGlassPackage
(
item
,
index
)
this
.
vailGlassPackage
(
item
,
index
)
// 套餐商品包含的权益商品数据
// 套餐商品包含的权益商品数据
const
parentArr
=
this
.
productList
.
concat
(
this
.
productList
)?.
filter
(
v
=>
v
.
parentId
&&
v
.
parentId
==
item
.
parentId
)
const
parentArr
=
this
.
productList
.
concat
(
this
.
productList
)?.
filter
(
v
=>
v
.
parentId
&&
v
.
parentId
==
item
.
parentId
)
if
(
e
)
{
const
customAttr
=
{
const
_haveTableTarget
=
item
?.
groupAttributeList
.
find
(
item
=>
item
.
attributeDesc
==
'轮胎参数'
)
attributeGroup
:
'planId'
,
if
(
_haveTableTarget
&&
!
this
.
TDOTableData
[
item
.
idName
])
{
attributeName
:
'planId'
this
.
$set
(
this
.
TDOTableData
,
item
.
packageCode
,
JSON
.
parse
(
JSON
.
stringify
(
TDO_OBJ
)))
}
}
this
.
checkCodeList
.
push
(
item
.
packageCode
)
if
(
parentArr
.
length
)
{
this
.
packageCodeList
.
push
(
item
.
packageCode
)
if
(
e
)
{
if
(
parentArr
?.
length
)
{
const
parentCodes
=
parentArr
.
map
(
v
=>
v
.
packageCode
)
const
parentCodes
=
parentArr
.
map
(
v
=>
v
.
packageCode
)
this
.
checkCodeList
.
push
(...
parentCodes
)
this
.
checkCodeList
.
push
(...
parentCodes
)
this
.
packageCodeList
.
push
(...
parentCodes
)
this
.
packageCodeList
.
push
(...
parentCodes
)
this
.
curSelectPro
.
push
(...
parentCodes
)
this
.
curSelectPro
.
push
(...
parentCodes
)
parentArr
.
forEach
(
v
=>
{
parentArr
.
forEach
(
v
=>
{
const
_haveTableTarget
=
v
?.
groupAttributeList
.
find
(
item
=>
item
.
attributeDesc
==
'轮胎参数'
)
if
(
_haveTableTarget
&&
!
this
.
TDOTableData
[
v
.
idName
])
{
if
(
_haveTableTarget
&&
!
this
.
TDOTableData
[
v
.
idName
])
{
this
.
$set
(
this
.
TDOTableData
,
v
.
packageCode
,
JSON
.
parse
(
JSON
.
stringify
(
TDO_OBJ
)))
this
.
$set
(
this
.
TDOTableData
,
v
.
packageCode
,
JSON
.
parse
(
JSON
.
stringify
(
TDO_OBJ
)))
}
}
for
(
let
key
in
this
.
productModal
[
v
.
idName
])
{
v
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
v
.
idName
][
key
],
v
,
attr
)
}
})
})
}
}
if
(
v
.
idName
==
'crash'
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
'planId'
],
item
,
customAttr
)
}
})
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
packageCodeList
=
Array
.
from
(
new
Set
(
this
.
packageCodeList
))
this
.
packageCodeList
=
Array
.
from
(
new
Set
(
this
.
packageCodeList
))
this
.
curSelectPro
=
Array
.
from
(
new
Set
(
this
.
curSelectPro
))
this
.
curSelectPro
=
Array
.
from
(
new
Set
(
this
.
curSelectPro
))
}
else
{
const
codesToRemove
=
new
Set
(
parentArr
.
map
(
v
=>
v
.
packageCode
))
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
this
.
packageCodeList
=
this
.
packageCodeList
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
this
.
curSelectPro
=
this
.
curSelectPro
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
parentArr
.
forEach
(
v
=>
{
for
(
let
key
in
this
.
productModal
[
v
.
idName
])
{
v
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
v
.
idName
][
key
],
v
,
attr
)
}
})
}
})
}
}
else
{
if
(
e
)
{
const
_haveTableTarget
=
item
?.
groupAttributeList
.
find
(
item
=>
item
.
attributeDesc
==
'轮胎参数'
)
if
(
_haveTableTarget
&&
!
this
.
TDOTableData
[
item
.
idName
])
{
this
.
$set
(
this
.
TDOTableData
,
item
.
packageCode
,
JSON
.
parse
(
JSON
.
stringify
(
TDO_OBJ
)))
}
this
.
checkCodeList
.
push
(
item
.
packageCode
)
this
.
packageCodeList
.
push
(
item
.
packageCode
)
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
packageCodeList
=
Array
.
from
(
new
Set
(
this
.
packageCodeList
))
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
if
(
attr
.
attributeName
==
key
)
{
...
@@ -1201,21 +1234,11 @@ export default {
...
@@ -1201,21 +1234,11 @@ export default {
})
})
}
}
if
(
item
.
idName
==
'crash'
)
{
if
(
item
.
idName
==
'crash'
)
{
const
customAttr
=
{
attributeGroup
:
'planId'
,
attributeName
:
'planId'
}
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
'planId'
],
item
,
customAttr
)
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
'planId'
],
item
,
customAttr
)
}
}
}
else
{
}
else
{
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
packageCodeList
=
this
.
packageCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
packageCodeList
=
this
.
packageCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
if
(
parentArr
?.
length
)
{
const
codesToRemove
=
new
Set
(
parentArr
.
map
(
v
=>
v
.
packageCode
))
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
this
.
packageCodeList
=
this
.
packageCodeList
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
this
.
curSelectPro
=
this
.
curSelectPro
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
}
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
if
(
attr
.
attributeName
==
key
)
{
...
@@ -1224,6 +1247,7 @@ export default {
...
@@ -1224,6 +1247,7 @@ export default {
})
})
}
}
}
}
}
let
hasRefitFlagList
=
this
.
allProdList
.
filter
(
item
=>
this
.
packageCodeList
.
includes
(
item
.
packageCode
))
let
hasRefitFlagList
=
this
.
allProdList
.
filter
(
item
=>
this
.
packageCodeList
.
includes
(
item
.
packageCode
))
this
.
refitFormObj
.
autoFlag
=
!!
hasRefitFlagList
?.
find
(
item
=>
item
.
qsFlag
)
this
.
refitFormObj
.
autoFlag
=
!!
hasRefitFlagList
?.
find
(
item
=>
item
.
qsFlag
)
},
},
...
@@ -1231,29 +1255,69 @@ export default {
...
@@ -1231,29 +1255,69 @@ export default {
// isDel 删除选中的
// isDel 删除选中的
// 套餐商品包含的权益商品数据
// 套餐商品包含的权益商品数据
const
parentArr
=
this
.
customProductList
.
concat
(
this
.
productList
)?.
filter
(
v
=>
v
.
parentId
&&
v
.
parentId
==
item
.
parentId
)
const
parentArr
=
this
.
customProductList
.
concat
(
this
.
productList
)?.
filter
(
v
=>
v
.
parentId
&&
v
.
parentId
==
item
.
parentId
)
if
(
e
)
{
const
customAttr
=
{
// this.checkCodeList = []
attributeGroup
:
'planId'
,
// this.autoPackageCodeList = []
attributeName
:
'planId'
const
_haveTableTarget
=
item
?.
groupAttributeList
.
find
(
item
=>
item
.
attributeDesc
==
'轮胎参数'
)
if
(
_haveTableTarget
&&
!
this
.
TDOTableData
[
item
.
idName
])
{
this
.
$set
(
this
.
TDOTableData
,
item
.
packageCode
,
JSON
.
parse
(
JSON
.
stringify
(
TDO_OBJ
)))
}
}
this
.
checkCodeList
.
push
(
item
.
packageCode
)
this
.
autoPackageCodeList
.
push
(
item
.
packageCode
)
if
(
parentArr
?.
length
)
{
if
(
parentArr
?.
length
)
{
if
(
e
)
{
const
parentCodes
=
parentArr
.
map
(
v
=>
v
.
packageCode
)
const
parentCodes
=
parentArr
.
map
(
v
=>
v
.
packageCode
)
this
.
checkCodeList
.
push
(...
parentCodes
)
this
.
checkCodeList
.
push
(...
parentCodes
)
this
.
autoPackageCodeList
.
push
(...
parentCodes
)
this
.
autoPackageCodeList
.
push
(...
parentCodes
)
this
.
curSelectCustomPro
.
push
(...
parentCodes
)
this
.
curSelectCustomPro
.
push
(...
parentCodes
)
parentArr
.
forEach
(
v
=>
{
parentArr
.
forEach
(
v
=>
{
const
_haveTableTarget
=
v
?.
groupAttributeList
.
find
(
item
=>
item
.
attributeDesc
==
'轮胎参数'
)
if
(
_haveTableTarget
&&
!
this
.
TDOTableData
[
v
.
idName
])
{
if
(
_haveTableTarget
&&
!
this
.
TDOTableData
[
v
.
idName
])
{
this
.
$set
(
this
.
TDOTableData
,
v
.
packageCode
,
JSON
.
parse
(
JSON
.
stringify
(
TDO_OBJ
)))
this
.
$set
(
this
.
TDOTableData
,
v
.
packageCode
,
JSON
.
parse
(
JSON
.
stringify
(
TDO_OBJ
)))
}
}
for
(
let
key
in
this
.
productModal
[
v
.
idName
])
{
v
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
v
.
idName
][
key
],
v
,
attr
)
}
})
})
}
}
this
.
commonPart
(
this
.
productModal
[
`vip
${
v
.
packageCode
}
`
][
'planId'
],
v
,
customAttr
)
if
(
v
.
printType
==
2
)
{
this
.
showUploadInfo
=
true
}
})
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
autoPackageCodeList
=
Array
.
from
(
new
Set
(
this
.
autoPackageCodeList
))
this
.
autoPackageCodeList
=
Array
.
from
(
new
Set
(
this
.
autoPackageCodeList
))
this
.
curSelectCustomPro
=
Array
.
from
(
new
Set
(
this
.
curSelectCustomPro
))
this
.
curSelectCustomPro
=
Array
.
from
(
new
Set
(
this
.
curSelectCustomPro
))
}
else
{
const
codesToRemove
=
new
Set
(
parentArr
.
map
(
v
=>
v
.
packageCode
))
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
this
.
autoPackageCodeList
=
this
.
autoPackageCodeList
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
this
.
curSelectCustomPro
=
this
.
curSelectCustomPro
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
parentArr
.
forEach
(
v
=>
{
if
(
isDel
)
{
this
.
curSelectCustomPro
=
this
.
curSelectCustomPro
.
filter
(
t
=>
t
!=
v
.
packageCode
)
}
for
(
let
key
in
this
.
productModal
[
v
.
idName
])
{
v
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
v
.
idName
][
key
],
v
,
attr
)
}
})
}
if
(
v
.
printType
==
2
)
{
this
.
showUploadInfo
=
false
}
})
}
}
else
{
if
(
e
)
{
// this.checkCodeList = []
// this.autoPackageCodeList = []
const
_haveTableTarget
=
item
?.
groupAttributeList
.
find
(
item
=>
item
.
attributeDesc
==
'轮胎参数'
)
if
(
_haveTableTarget
&&
!
this
.
TDOTableData
[
item
.
idName
])
{
this
.
$set
(
this
.
TDOTableData
,
item
.
packageCode
,
JSON
.
parse
(
JSON
.
stringify
(
TDO_OBJ
)))
}
this
.
checkCodeList
.
push
(
item
.
packageCode
)
this
.
autoPackageCodeList
.
push
(
item
.
packageCode
)
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
autoPackageCodeList
=
Array
.
from
(
new
Set
(
this
.
autoPackageCodeList
))
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
if
(
attr
.
attributeName
==
key
)
{
...
@@ -1261,10 +1325,6 @@ export default {
...
@@ -1261,10 +1325,6 @@ export default {
}
}
})
})
}
}
const
customAttr
=
{
attributeGroup
:
'planId'
,
attributeName
:
'planId'
}
this
.
commonPart
(
this
.
productModal
[
`vip
${
item
.
packageCode
}
`
][
'planId'
],
item
,
customAttr
)
this
.
commonPart
(
this
.
productModal
[
`vip
${
item
.
packageCode
}
`
][
'planId'
],
item
,
customAttr
)
if
(
item
.
printType
==
2
)
{
if
(
item
.
printType
==
2
)
{
this
.
showUploadInfo
=
true
this
.
showUploadInfo
=
true
...
@@ -1275,12 +1335,6 @@ export default {
...
@@ -1275,12 +1335,6 @@ export default {
if
(
isDel
)
{
if
(
isDel
)
{
this
.
curSelectCustomPro
=
this
.
curSelectCustomPro
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
curSelectCustomPro
=
this
.
curSelectCustomPro
.
filter
(
t
=>
t
!=
item
.
packageCode
)
}
}
if
(
parentArr
?.
length
)
{
const
codesToRemove
=
new
Set
(
parentArr
.
map
(
v
=>
v
.
packageCode
))
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
this
.
autoPackageCodeList
=
this
.
autoPackageCodeList
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
this
.
curSelectCustomPro
=
this
.
curSelectCustomPro
.
filter
(
t
=>
!
codesToRemove
.
has
(
t
))
}
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
if
(
attr
.
attributeName
==
key
)
{
...
@@ -1292,6 +1346,7 @@ export default {
...
@@ -1292,6 +1346,7 @@ export default {
this
.
showUploadInfo
=
false
this
.
showUploadInfo
=
false
}
}
}
}
}
let
hasRefitFlagList
=
this
.
allProdList
.
filter
(
item
=>
this
.
autoPackageCodeList
.
includes
(
item
.
packageCode
))
let
hasRefitFlagList
=
this
.
allProdList
.
filter
(
item
=>
this
.
autoPackageCodeList
.
includes
(
item
.
packageCode
))
this
.
refitFormObj
.
customFlag
=
!!
hasRefitFlagList
?.
find
(
item
=>
item
.
qsFlag
)
this
.
refitFormObj
.
customFlag
=
!!
hasRefitFlagList
?.
find
(
item
=>
item
.
qsFlag
)
},
},
...
@@ -1995,7 +2050,9 @@ export default {
...
@@ -1995,7 +2050,9 @@ export default {
...
el
,
...
el
,
packageCode
:
item
.
packageCode
,
packageCode
:
item
.
packageCode
,
contractNo
:
item
.
contractNo
,
contractNo
:
item
.
contractNo
,
printType
:
item
.
printType
printType
:
item
.
printType
,
parentId
:
item
.
parentId
,
parentName
:
item
.
parentName
})
})
})
})
})
})
...
...
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