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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
134 additions
and
77 deletions
src/views/beforeSale/editEquity.vue
src/views/beforeSale/editEquity.vue
View file @
9380eb6
...
...
@@ -1172,57 +1172,81 @@ export default {
this
.
vailGlassPackage
(
item
,
index
)
// 套餐商品包含的权益商品数据
const
parentArr
=
this
.
productList
.
concat
(
this
.
productList
)?.
filter
(
v
=>
v
.
parentId
&&
v
.
parentId
==
item
.
parentId
)
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
)
if
(
parentArr
?.
length
)
{
const
customAttr
=
{
attributeGroup
:
'planId'
,
attributeName
:
'planId'
}
if
(
parentArr
.
length
)
{
if
(
e
)
{
const
parentCodes
=
parentArr
.
map
(
v
=>
v
.
packageCode
)
this
.
checkCodeList
.
push
(...
parentCodes
)
this
.
packageCodeList
.
push
(...
parentCodes
)
this
.
curSelectPro
.
push
(...
parentCodes
)
parentArr
.
forEach
(
v
=>
{
const
_haveTableTarget
=
v
?.
groupAttributeList
.
find
(
item
=>
item
.
attributeDesc
==
'轮胎参数'
)
if
(
_haveTableTarget
&&
!
this
.
TDOTableData
[
v
.
idName
])
{
this
.
$set
(
this
.
TDOTableData
,
v
.
packageCode
,
JSON
.
parse
(
JSON
.
stringify
(
TDO_OBJ
)))
}
})
}
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
packageCodeList
=
Array
.
from
(
new
Set
(
this
.
packageCodeList
)
)
this
.
curSelectPro
=
Array
.
from
(
new
Set
(
this
.
curSelectPro
))
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
key
],
item
,
a
ttr
)
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
,
customA
ttr
)
}
})
}
if
(
item
.
idName
==
'crash'
)
{
const
customAttr
=
{
attributeGroup
:
'planId'
,
attributeName
:
'planId'
}
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
'planId'
],
item
,
customAttr
)
}
}
else
{
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
packageCodeList
=
this
.
packageCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
if
(
parentArr
?.
length
)
{
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
packageCodeList
=
Array
.
from
(
new
Set
(
this
.
packageCodeList
))
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
))
}
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
key
],
item
,
attr
)
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
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
key
],
item
,
attr
)
}
})
}
if
(
item
.
idName
==
'crash'
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
'planId'
],
item
,
customAttr
)
}
}
else
{
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
packageCodeList
=
this
.
packageCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
key
],
item
,
attr
)
}
})
}
}
}
let
hasRefitFlagList
=
this
.
allProdList
.
filter
(
item
=>
this
.
packageCodeList
.
includes
(
item
.
packageCode
))
this
.
refitFormObj
.
autoFlag
=
!!
hasRefitFlagList
?.
find
(
item
=>
item
.
qsFlag
)
...
...
@@ -1231,65 +1255,96 @@ export default {
// isDel 删除选中的
// 套餐商品包含的权益商品数据
const
parentArr
=
this
.
customProductList
.
concat
(
this
.
productList
)?.
filter
(
v
=>
v
.
parentId
&&
v
.
parentId
==
item
.
parentId
)
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
)
if
(
parentArr
?.
length
)
{
const
customAttr
=
{
attributeGroup
:
'planId'
,
attributeName
:
'planId'
}
if
(
parentArr
?.
length
)
{
if
(
e
)
{
const
parentCodes
=
parentArr
.
map
(
v
=>
v
.
packageCode
)
this
.
checkCodeList
.
push
(...
parentCodes
)
this
.
autoPackageCodeList
.
push
(...
parentCodes
)
this
.
curSelectCustomPro
.
push
(...
parentCodes
)
parentArr
.
forEach
(
v
=>
{
const
_haveTableTarget
=
v
?.
groupAttributeList
.
find
(
item
=>
item
.
attributeDesc
==
'轮胎参数'
)
if
(
_haveTableTarget
&&
!
this
.
TDOTableData
[
v
.
idName
])
{
this
.
$set
(
this
.
TDOTableData
,
v
.
packageCode
,
JSON
.
parse
(
JSON
.
stringify
(
TDO_OBJ
)))
}
})
}
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
autoPackageCodeList
=
Array
.
from
(
new
Set
(
this
.
autoPackageCodeList
))
this
.
curSelectCustomPro
=
Array
.
from
(
new
Set
(
this
.
curSelectCustomPro
))
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
key
],
item
,
attr
)
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
}
})
}
const
customAttr
=
{
attributeGroup
:
'planId'
,
attributeName
:
'planId'
}
this
.
commonPart
(
this
.
productModal
[
`vip
${
item
.
packageCode
}
`
][
'planId'
],
item
,
customAttr
)
if
(
item
.
printType
==
2
)
{
this
.
showUploadInfo
=
true
}
}
else
{
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
autoPackageCodeList
=
this
.
autoPackageCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
if
(
isDel
)
{
this
.
curSelectCustomPro
=
this
.
curSelectCustomPro
.
filter
(
t
=>
t
!=
item
.
packageCode
)
}
if
(
parentArr
?.
length
)
{
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
autoPackageCodeList
=
Array
.
from
(
new
Set
(
this
.
autoPackageCodeList
))
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
))
}
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
key
],
item
,
attr
)
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
}
})
}
if
(
item
.
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
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
key
],
item
,
attr
)
}
})
}
this
.
commonPart
(
this
.
productModal
[
`vip
${
item
.
packageCode
}
`
][
'planId'
],
item
,
customAttr
)
if
(
item
.
printType
==
2
)
{
this
.
showUploadInfo
=
true
}
}
else
{
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
autoPackageCodeList
=
this
.
autoPackageCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
if
(
isDel
)
{
this
.
curSelectCustomPro
=
this
.
curSelectCustomPro
.
filter
(
t
=>
t
!=
item
.
packageCode
)
}
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
key
],
item
,
attr
)
}
})
}
if
(
item
.
printType
==
2
)
{
this
.
showUploadInfo
=
false
}
}
}
let
hasRefitFlagList
=
this
.
allProdList
.
filter
(
item
=>
this
.
autoPackageCodeList
.
includes
(
item
.
packageCode
))
...
...
@@ -1995,7 +2050,9 @@ export default {
...
el
,
packageCode
:
item
.
packageCode
,
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