Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 e9606252
authored
Jun 26, 2026
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
营销活动bug修复
1 parent
810d3af2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
46 deletions
src/views/marketingManagement/marketingActivity/addMarketingActivity.vue
src/views/marketingManagement/marketingActivity/components/packageList.vue
src/views/marketingManagement/marketingActivity/components/selectPackageDialog.vue
src/views/marketingManagement/marketingActivity/components/storeListDialog.vue
src/views/marketingManagement/marketingActivity/viewMarketingActivity.vue
src/views/marketingManagement/marketingActivity/addMarketingActivity.vue
View file @
e960625
...
@@ -416,8 +416,6 @@ export default {
...
@@ -416,8 +416,6 @@ export default {
this
.
directPackages
=
list
.
map
(
item
=>
({
this
.
directPackages
=
list
.
map
(
item
=>
({
...
item
,
...
item
,
productType
:
item
.
packageCode
?
0
:
1
,
productType
:
item
.
packageCode
?
0
:
1
,
// 套餐字段映射:优先使用 packageId(接口返回字段),其次 packageCode
packageId
:
item
.
packageId
||
item
.
packageCode
,
packageName
:
item
.
packageName
||
""
,
packageName
:
item
.
packageName
||
""
,
tabName
:
item
.
tabName
||
item
.
packageName
||
""
,
tabName
:
item
.
tabName
||
item
.
packageName
||
""
,
packageCode
:
item
.
packageCode
||
""
,
packageCode
:
item
.
packageCode
||
""
,
...
@@ -469,8 +467,6 @@ export default {
...
@@ -469,8 +467,6 @@ export default {
const
packages
=
(
series
.
packageList
||
[]).
map
(
item
=>
({
const
packages
=
(
series
.
packageList
||
[]).
map
(
item
=>
({
...
item
,
...
item
,
productType
:
0
,
productType
:
0
,
// 套餐字段映射:优先使用 packageId(接口返回字段),其次 packageCode
packageId
:
item
.
packageId
||
item
.
packageCode
,
packageName
:
item
.
packageName
||
""
,
packageName
:
item
.
packageName
||
""
,
tabName
:
item
.
tabName
||
""
,
tabName
:
item
.
tabName
||
""
,
packageCode
:
item
.
packageCode
||
""
,
packageCode
:
item
.
packageCode
||
""
,
...
@@ -644,10 +640,10 @@ export default {
...
@@ -644,10 +640,10 @@ export default {
const
currentPackages
=
this
.
seriesPackages
[
seriesId
]
||
[];
const
currentPackages
=
this
.
seriesPackages
[
seriesId
]
||
[];
this
.
tempSelectedItems
=
currentPackages
.
map
((
item
)
=>
{
this
.
tempSelectedItems
=
currentPackages
.
map
((
item
)
=>
{
if
(
item
.
productType
===
0
)
{
if
(
item
.
productType
===
0
)
{
// 套餐
:优先使用 packageId(来自选择弹窗接口数据),其次尝试 packageCode 或 code
// 套餐
return
{
return
{
...
item
,
...
item
,
package
Id
:
item
.
packageId
||
item
.
packageCode
||
item
.
c
ode
,
package
Code
:
item
.
packageC
ode
,
productType
:
0
,
productType
:
0
,
productName
:
item
.
packageName
||
item
.
productName
||
""
,
productName
:
item
.
packageName
||
item
.
productName
||
""
,
};
};
...
@@ -671,18 +667,18 @@ export default {
...
@@ -671,18 +667,18 @@ export default {
return
;
return
;
}
}
// 按车系模式:用 package
Id
/goodsCode 做唯一匹配,保留已编辑数据
// 按车系模式:用 package
Code
/goodsCode 做唯一匹配,保留已编辑数据
const
existingList
=
this
.
seriesPackages
[
this
.
currentSeriesId
]
||
[];
const
existingList
=
this
.
seriesPackages
[
this
.
currentSeriesId
]
||
[];
const
existingMap
=
{};
const
existingMap
=
{};
existingList
.
forEach
((
item
)
=>
{
existingList
.
forEach
((
item
)
=>
{
const
key
=
item
.
productType
==
0
?
(
item
.
package
Id
)
:
(
item
.
goodsCode
);
const
key
=
item
.
productType
==
0
?
(
item
.
package
Code
)
:
(
item
.
goodsCode
);
if
(
key
)
if
(
key
)
existingMap
[
key
]
=
item
;
existingMap
[
key
]
=
item
;
});
});
const
newList
=
selectedItems
.
map
((
item
)
=>
{
const
newList
=
selectedItems
.
map
((
item
)
=>
{
// 唯一匹配key:套餐用 package
Id
,商品用 goodsCode
// 唯一匹配key:套餐用 package
Code
,商品用 goodsCode
const
matchKey
=
item
.
productType
===
0
?
(
item
.
package
Id
)
:
item
.
goodsCode
;
const
matchKey
=
item
.
productType
===
0
?
(
item
.
package
Code
)
:
item
.
goodsCode
;
if
(
matchKey
&&
existingMap
[
matchKey
])
{
if
(
matchKey
&&
existingMap
[
matchKey
])
{
// 已存在:保留原有编辑数据,但同步最新门店数
// 已存在:保留原有编辑数据,但同步最新门店数
const
merged
=
{
...
existingMap
[
matchKey
]
};
const
merged
=
{
...
existingMap
[
matchKey
]
};
...
@@ -748,17 +744,17 @@ export default {
...
@@ -748,17 +744,17 @@ export default {
// 执行添加直接模式套餐/商品(公共逻辑)
// 执行添加直接模式套餐/商品(公共逻辑)
doAddDirectPackages
(
selectedItems
)
{
doAddDirectPackages
(
selectedItems
)
{
// 用 package
Id
/goodsCode 做唯一匹配,保留已编辑数据
// 用 package
Code
/goodsCode 做唯一匹配,保留已编辑数据
const
existingMap
=
{};
const
existingMap
=
{};
this
.
directPackages
.
forEach
((
item
)
=>
{
this
.
directPackages
.
forEach
((
item
)
=>
{
const
key
=
item
.
productType
===
0
?
(
item
.
package
Id
||
item
.
packageCode
||
item
.
code
)
:
(
item
.
goodsCode
||
item
.
c
ode
);
const
key
=
item
.
productType
===
0
?
(
item
.
package
Code
)
:
(
item
.
goodsC
ode
);
if
(
key
)
if
(
key
)
existingMap
[
key
]
=
item
;
existingMap
[
key
]
=
item
;
});
});
this
.
directPackages
=
selectedItems
.
map
((
item
)
=>
{
this
.
directPackages
=
selectedItems
.
map
((
item
)
=>
{
// 唯一匹配key:套餐用 package
Id
,商品用 goodsCode
// 唯一匹配key:套餐用 package
Code
,商品用 goodsCode
const
matchKey
=
item
.
productType
===
0
?
(
item
.
package
Id
||
item
.
package
Code
)
:
item
.
goodsCode
;
const
matchKey
=
item
.
productType
===
0
?
(
item
.
packageCode
)
:
item
.
goodsCode
;
if
(
matchKey
&&
existingMap
[
matchKey
])
{
if
(
matchKey
&&
existingMap
[
matchKey
])
{
// 已存在:保留原有编辑数据,但同步最新门店数
// 已存在:保留原有编辑数据,但同步最新门店数
const
merged
=
{
...
existingMap
[
matchKey
]
};
const
merged
=
{
...
existingMap
[
matchKey
]
};
...
@@ -1073,7 +1069,7 @@ export default {
...
@@ -1073,7 +1069,7 @@ export default {
productType
:
0
,
productType
:
0
,
productName
:
item
.
packageName
||
item
.
productName
,
productName
:
item
.
packageName
||
item
.
productName
,
productAlias
:
item
.
productAlias
,
productAlias
:
item
.
productAlias
,
packageCode
:
item
.
package
Id
,
packageCode
:
item
.
package
Code
,
sortOrder
:
i
+
1
,
sortOrder
:
i
+
1
,
tabName
:
item
.
tabName
,
tabName
:
item
.
tabName
,
tabDescription
:
item
.
tabDescription
,
tabDescription
:
item
.
tabDescription
,
...
@@ -1174,10 +1170,10 @@ export default {
...
@@ -1174,10 +1170,10 @@ export default {
return
;
return
;
}
}
this
.
currentSeriesId
=
""
;
// 标记为直接模式
this
.
currentSeriesId
=
""
;
// 标记为直接模式
// 提取原始标识字段用于弹窗回显,确保 package
Id
/goodsCode 字段存在
// 提取原始标识字段用于弹窗回显,确保 package
Code
/goodsCode 字段存在
this
.
tempSelectedItems
=
(
this
.
directPackages
||
[]).
map
((
item
)
=>
{
this
.
tempSelectedItems
=
(
this
.
directPackages
||
[]).
map
((
item
)
=>
{
if
(
item
.
productType
===
0
)
{
if
(
item
.
productType
===
0
)
{
return
{
...
item
,
productType
:
0
,
package
Id
:
item
.
packageId
||
item
.
packageCode
||
item
.
c
ode
,
productName
:
item
.
packageName
||
item
.
productName
||
""
};
return
{
...
item
,
productType
:
0
,
package
Code
:
item
.
packageC
ode
,
productName
:
item
.
packageName
||
item
.
productName
||
""
};
}
}
return
{
...
item
,
productType
:
1
,
goodsCode
:
item
.
goodsCode
||
item
.
code
,
productName
:
item
.
productName
||
""
};
return
{
...
item
,
productType
:
1
,
goodsCode
:
item
.
goodsCode
||
item
.
code
,
productName
:
item
.
productName
||
""
};
});
});
...
...
src/views/marketingManagement/marketingActivity/components/packageList.vue
View file @
e960625
...
@@ -54,14 +54,14 @@
...
@@ -54,14 +54,14 @@
<!-- 手风琴列表(Sortable 拖拽整个 item) -->
<!-- 手风琴列表(Sortable 拖拽整个 item) -->
<el-collapse
v-model=
"activeNames"
class=
"package-collapse"
>
<el-collapse
v-model=
"activeNames"
class=
"package-collapse"
>
<el-collapse-item
v-for=
"(pkg, index) in localList"
<el-collapse-item
v-for=
"(pkg, index) in localList"
:key=
"pkg.package
Id
"
:key=
"pkg.package
Code
"
class=
"package-item"
class=
"package-item"
:name=
"pkg.package
Id
"
>
:name=
"pkg.package
Code
"
>
<!-- 标题行:模拟表格的一行数据 -->
<!-- 标题行:模拟表格的一行数据 -->
<template
slot=
"title"
>
<template
slot=
"title"
>
<div
class=
"collapse-row"
<div
class=
"collapse-row"
:class=
"
{ 'is-expanded': activeNames.includes(pkg.package
Id
) }"
:class=
"
{ 'is-expanded': activeNames.includes(pkg.package
Code
) }"
@click.stop
@click.stop
@keydown.stop
@keydown.stop
@keyup.stop>
@keyup.stop>
...
@@ -70,8 +70,8 @@
...
@@ -70,8 +70,8 @@
</span>
</span>
<span
class=
"col col-index"
<span
class=
"col col-index"
style=
"cursor: pointer;"
style=
"cursor: pointer;"
@
click
.
stop=
"toggleExpand(pkg.package
Id
)"
>
@
click
.
stop=
"toggleExpand(pkg.package
Code
)"
>
<i
:class=
"[activeNames.includes(pkg.package
Id
) ? 'el-icon-arrow-down' : 'el-icon-arrow-right']"
></i>
<i
:class=
"[activeNames.includes(pkg.package
Code
) ? 'el-icon-arrow-down' : 'el-icon-arrow-right']"
></i>
{{
index
+
1
}}
{{
index
+
1
}}
</span>
</span>
<span
class=
"col col-name"
<span
class=
"col col-name"
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
size=
"mini"
size=
"mini"
:class=
"
{ 'is-error': pkg.tabNameError }"
:class=
"
{ 'is-error': pkg.tabNameError }"
@input="clearError(pkg, 'tabNameError')" />
@input="clearError(pkg, 'tabNameError')" />
<div
class=
"sub-text"
>
{{
pkg
.
package
Id
}}
</div>
<div
class=
"sub-text"
>
{{
pkg
.
package
Code
}}
</div>
</span>
</span>
<span
class=
"col col-tabDescription"
<span
class=
"col col-tabDescription"
@
keydown
.
stop
@
keydown
.
stop
...
@@ -223,7 +223,7 @@
...
@@ -223,7 +223,7 @@
</
template
>
</
template
>
<!-- 展开内容:子商品 div 模拟表格 -->
<!-- 展开内容:子商品 div 模拟表格 -->
<div
v-loading=
"packageLoadingMap[pkg.package
Id
]"
<div
v-loading=
"packageLoadingMap[pkg.package
Code
]"
class=
"collapse-content"
>
class=
"collapse-content"
>
<!-- 子商品表头 -->
<!-- 子商品表头 -->
<div
class=
"sub-table-header"
>
<div
class=
"sub-table-header"
>
...
@@ -325,35 +325,35 @@ export default {
...
@@ -325,35 +325,35 @@ export default {
* 切换套餐项展开/收起(只有点击箭头/排序号区域才触发)
* 切换套餐项展开/收起(只有点击箭头/排序号区域才触发)
* 展开时若套餐无子商品数据,自动请求接口获取
* 展开时若套餐无子商品数据,自动请求接口获取
*/
*/
toggleExpand
(
package
Id
)
{
toggleExpand
(
package
Code
)
{
const
idx
=
this
.
activeNames
.
indexOf
(
package
Id
);
const
idx
=
this
.
activeNames
.
indexOf
(
package
Code
);
if
(
idx
>
-
1
)
{
if
(
idx
>
-
1
)
{
this
.
activeNames
.
splice
(
idx
,
1
);
this
.
activeNames
.
splice
(
idx
,
1
);
}
else
{
}
else
{
this
.
activeNames
.
push
(
package
Id
);
this
.
activeNames
.
push
(
package
Code
);
// 展开时检查是否需要加载子商品
// 展开时检查是否需要加载子商品
this
.
loadPackageProducts
(
package
Id
);
this
.
loadPackageProducts
(
package
Code
);
}
}
},
},
/**
/**
* 加载套餐子商品数据(每次展开时调用,合并新旧数据保留用户输入)
* 加载套餐子商品数据(每次展开时调用,合并新旧数据保留用户输入)
*/
*/
loadPackageProducts
(
package
Id
)
{
loadPackageProducts
(
package
Code
)
{
const
idx
=
this
.
localList
.
findIndex
(
p
=>
p
.
package
Id
===
packageId
);
const
idx
=
this
.
localList
.
findIndex
(
p
=>
p
.
package
Code
===
packageCode
);
if
(
idx
<
0
)
if
(
idx
<
0
)
return
;
return
;
const
pkg
=
this
.
localList
[
idx
];
const
pkg
=
this
.
localList
[
idx
];
if
(
!
pkg
.
package
Id
)
if
(
!
pkg
.
package
Code
)
return
;
return
;
// 设置loading状态
// 设置loading状态
this
.
$set
(
this
.
packageLoadingMap
,
package
Id
,
true
);
this
.
$set
(
this
.
packageLoadingMap
,
package
Code
,
true
);
// 保存旧的子商品数据(用于合并)
// 保存旧的子商品数据(用于合并)
const
oldItems
=
pkg
.
packageItems
||
[];
const
oldItems
=
pkg
.
packageItems
||
[];
getGoodsDataByPackage
({
packageId
:
pkg
.
package
Id
}).
then
((
res
)
=>
{
getGoodsDataByPackage
({
packageId
:
pkg
.
package
Code
}).
then
((
res
)
=>
{
if
(
!
res
||
!
res
.
length
)
{
if
(
!
res
||
!
res
.
length
)
{
// 如果新数据为空,清空子商品列表
// 如果新数据为空,清空子商品列表
pkg
.
packageItems
=
[];
pkg
.
packageItems
=
[];
...
@@ -385,7 +385,7 @@ export default {
...
@@ -385,7 +385,7 @@ export default {
pkg
.
packageItems
=
mergedItems
;
pkg
.
packageItems
=
mergedItems
;
}).
finally
(()
=>
{
}).
finally
(()
=>
{
// 清除loading状态
// 清除loading状态
this
.
$set
(
this
.
packageLoadingMap
,
package
Id
,
false
);
this
.
$set
(
this
.
packageLoadingMap
,
package
Code
,
false
);
});
});
},
},
...
...
src/views/marketingManagement/marketingActivity/components/selectPackageDialog.vue
View file @
e960625
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
label=
"套餐ID"
label=
"套餐ID"
width=
"200"
>
width=
"200"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
emptyFilter
(
scope
.
row
.
package
Id
)
}}
{{
emptyFilter
(
scope
.
row
.
package
Code
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</template>
</template>
...
@@ -193,7 +193,7 @@
...
@@ -193,7 +193,7 @@
套餐 (
{{
packageItems
.
length
}}
)
套餐 (
{{
packageItems
.
length
}}
)
</div>
</div>
<div
v-for=
"(item, index) in packageItems"
<div
v-for=
"(item, index) in packageItems"
:key=
"`pkg_$
{item.package
Id
|| index}`"
:key=
"`pkg_$
{item.package
Code
|| index}`"
class="selected-item">
class="selected-item">
<div
class=
"item-info"
>
<div
class=
"item-info"
>
<div
class=
"item-name"
>
<div
class=
"item-name"
>
...
@@ -437,8 +437,9 @@ export default {
...
@@ -437,8 +437,9 @@ export default {
const
tabKey
=
isPackage
?
"package"
:
"product"
;
const
tabKey
=
isPackage
?
"package"
:
"product"
;
eventRequest
(
params
)
eventRequest
(
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
const
savedIds
=
(
this
.
selectedMap
[
tabKey
]
||
[]).
map
(
item
=>
(
isPackage
?
item
.
package
Id
:
item
.
goodsCode
));
const
savedIds
=
(
this
.
selectedMap
[
tabKey
]
||
[]).
map
(
item
=>
(
isPackage
?
item
.
package
Code
:
item
.
goodsCode
));
res
?.
list
?.
forEach
((
val
)
=>
{
res
?.
list
?.
forEach
((
val
)
=>
{
val
.
packageCode
=
val
.
packageId
;
val
.
productName
=
val
.
productName
||
val
.
packageName
;
val
.
productName
=
val
.
productName
||
val
.
packageName
;
val
.
upgradeProductId
=
val
.
productId
;
val
.
upgradeProductId
=
val
.
productId
;
});
});
...
@@ -448,7 +449,7 @@ export default {
...
@@ -448,7 +449,7 @@ export default {
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
this
.
$refs
.
tableRef
)
{
if
(
this
.
$refs
.
tableRef
)
{
this
.
tableData
.
forEach
((
row
)
=>
{
this
.
tableData
.
forEach
((
row
)
=>
{
if
(
savedIds
.
includes
(
isPackage
?
row
.
package
Id
:
row
.
goodsCode
))
{
if
(
savedIds
.
includes
(
isPackage
?
row
.
package
Code
:
row
.
goodsCode
))
{
this
.
$refs
.
tableRef
.
toggleRowSelection
(
row
,
true
);
this
.
$refs
.
tableRef
.
toggleRowSelection
(
row
,
true
);
}
}
});
});
...
@@ -489,7 +490,7 @@ export default {
...
@@ -489,7 +490,7 @@ export default {
return
;
return
;
}
}
const
isPackage
=
this
.
activeTab
===
"0"
;
const
isPackage
=
this
.
activeTab
===
"0"
;
const
idField
=
isPackage
?
"package
Id
"
:
"goodsCode"
;
const
idField
=
isPackage
?
"package
Code
"
:
"goodsCode"
;
const
tabKey
=
isPackage
?
"package"
:
"product"
;
const
tabKey
=
isPackage
?
"package"
:
"product"
;
// 当前页所有数据的 id 集合
// 当前页所有数据的 id 集合
const
currentPageIds
=
this
.
tableData
.
map
(
row
=>
row
[
idField
]);
const
currentPageIds
=
this
.
tableData
.
map
(
row
=>
row
[
idField
]);
...
@@ -511,13 +512,13 @@ export default {
...
@@ -511,13 +512,13 @@ export default {
// 移除已选项
// 移除已选项
handleRemoveItem
(
item
)
{
handleRemoveItem
(
item
)
{
const
tab
=
item
.
productType
===
0
?
"package"
:
"product"
;
const
tab
=
item
.
productType
===
0
?
"package"
:
"product"
;
const
idx
=
this
.
selectedMap
[
tab
].
findIndex
(
s
=>
tab
===
"package"
?
s
.
package
Id
===
item
.
packageId
:
s
.
goodsCode
===
item
.
goodsCode
);
const
idx
=
this
.
selectedMap
[
tab
].
findIndex
(
s
=>
tab
===
"package"
?
s
.
package
Code
===
item
.
packageCode
:
s
.
goodsCode
===
item
.
goodsCode
);
if
(
idx
===
-
1
)
if
(
idx
===
-
1
)
return
;
return
;
this
.
selectedMap
[
tab
].
splice
(
idx
,
1
);
this
.
selectedMap
[
tab
].
splice
(
idx
,
1
);
// 取消表格中的选中状态
// 取消表格中的选中状态
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
row
=
this
.
tableData
.
find
(
s
=>
tab
===
"package"
?
s
.
package
Id
===
item
.
packageId
:
s
.
goodsCode
===
item
.
goodsCode
);
const
row
=
this
.
tableData
.
find
(
s
=>
tab
===
"package"
?
s
.
package
Code
===
item
.
packageCode
:
s
.
goodsCode
===
item
.
goodsCode
);
if
(
row
&&
this
.
$refs
.
tableRef
)
{
if
(
row
&&
this
.
$refs
.
tableRef
)
{
this
.
$refs
.
tableRef
.
toggleRowSelection
(
row
,
false
);
this
.
$refs
.
tableRef
.
toggleRowSelection
(
row
,
false
);
}
}
...
...
src/views/marketingManagement/marketingActivity/components/storeListDialog.vue
View file @
e960625
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
getMerchantData
()
{
getMerchantData
()
{
const
params
=
{
const
params
=
{
goodsCode
:
this
.
storeRow
.
goodsCode
,
goodsCode
:
this
.
storeRow
.
goodsCode
,
packageCode
:
this
.
storeRow
.
package
Id
,
packageCode
:
this
.
storeRow
.
package
Code
,
activityId
:
this
.
storeRow
?.
activityId
,
activityId
:
this
.
storeRow
?.
activityId
,
merchantIds
:
this
.
merchantList
?.
map
((
val
)
=>
{
merchantIds
:
this
.
merchantList
?.
map
((
val
)
=>
{
return
val
.
merchantId
;
return
val
.
merchantId
;
...
...
src/views/marketingManagement/marketingActivity/viewMarketingActivity.vue
View file @
e960625
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
<div
class=
"card-content"
>
<div
class=
"card-content"
>
<!-- ========== 直接选择模式:套餐+商品都有时显示子tab ========== -->
<!-- ========== 直接选择模式:套餐+商品都有时显示子tab ========== -->
<
template
v-if=
"detailData.configMode === 'direct' && directSplit.packages
.length
&& directSplit.products.length"
>
<
template
v-if=
"detailData.configMode === 'direct' && directSplit.packages
&& directSplit.packages.length && directSplit.products
&& directSplit.products.length"
>
<el-tabs
v-model=
"directSubActiveTab"
class=
"sub-tabs direct-sub-tabs"
>
<el-tabs
v-model=
"directSubActiveTab"
class=
"sub-tabs direct-sub-tabs"
>
<el-tab-pane
name=
"direct_package"
>
<el-tab-pane
name=
"direct_package"
>
<template
#
label
>
<template
#
label
>
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
</template>
</template>
<!-- 直接模式:只有套餐或只有商品 -->
<!-- 直接模式:只有套餐或只有商品 -->
<
template
v-else-if=
"detailData.configMode === 'direct' && detailData.directPackages.length"
>
<
template
v-else-if=
"detailData.configMode === 'direct' && detailData.directPackages
&& detailData.directPackages
.length"
>
<MixedDetailTable
:list=
"detailData.directPackages"
/>
<MixedDetailTable
:list=
"detailData.directPackages"
/>
</
template
>
</
template
>
...
@@ -131,7 +131,7 @@
...
@@ -131,7 +131,7 @@
:name="String(series.carSeriesId)">
:name="String(series.carSeriesId)">
<!-- 该车系同时有套餐和商品:显示子tabs -->
<!-- 该车系同时有套餐和商品:显示子tabs -->
<template
v-if=
"series.packageList
.length
&& series.goodsList.length"
>
<template
v-if=
"series.packageList
&& series.packageList.length && series.goodsList
&& series.goodsList.length"
>
<el-tabs
class=
"sub-tabs"
:value=
"getSeriesSubTabId(series.carSeriesId)"
>
<el-tabs
class=
"sub-tabs"
:value=
"getSeriesSubTabId(series.carSeriesId)"
>
<el-tab-pane
:name=
"`package_$
{series.carSeriesId}`">
<el-tab-pane
:name=
"`package_$
{series.carSeriesId}`">
<template
#
label
>
<template
#
label
>
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
<!-- 该车系只有套餐或只有商品:单表展示 -->
<!-- 该车系只有套餐或只有商品:单表展示 -->
<
template
v-else
>
<
template
v-else
>
<MixedDetailTable
:list=
"series.packageList
.length ? series.packageList :
series.goodsList.length ? series.goodsList : []"
/>
<MixedDetailTable
:list=
"series.packageList
&& series.packageList.length ? series.packageList : series.goodsList &&
series.goodsList.length ? series.goodsList : []"
/>
</
template
>
</
template
>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
...
@@ -426,6 +426,7 @@ export default {
...
@@ -426,6 +426,7 @@ export default {
getActivityCarSeries
()
{
getActivityCarSeries
()
{
this
.
startLoading
();
this
.
startLoading
();
getMarketingActivityCarSeries
({
activityId
:
this
.
activityId
,
includeDetail
:
true
,
pageSize
:
999
}).
then
((
res
)
=>
{
getMarketingActivityCarSeries
({
activityId
:
this
.
activityId
,
includeDetail
:
true
,
pageSize
:
999
}).
then
((
res
)
=>
{
console
.
log
(
res
,
"222222"
);
this
.
activeSeriesId
=
String
(
res
?.[
0
]?.
carSeriesId
||
""
);
this
.
activeSeriesId
=
String
(
res
?.[
0
]?.
carSeriesId
||
""
);
this
.
detailData
.
seriesList
=
res
||
[];
this
.
detailData
.
seriesList
=
res
||
[];
}).
finally
(()
=>
this
.
endLoading
());
}).
finally
(()
=>
this
.
endLoading
());
...
...
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