|
@@ -35,18 +35,31 @@ export class BigMemberParamsGroup extends Parameters {
|
|
|
|
|
|
const comboId = this.getComboId(commonParams.product_code)
|
|
const comboId = this.getComboId(commonParams.product_code)
|
|
const commonFilter = getCommonFilterParams({ pageForm, productForm })
|
|
const commonFilter = getCommonFilterParams({ pageForm, productForm })
|
|
|
|
+
|
|
|
|
+ const relateOrdersServiceList = productForm.selectedRelatedOrder?.serviceList
|
|
|
|
+
|
|
|
|
+ // 由于套餐升级自定义过程中,serviceList组件可能会造成套餐特定id丢失(serviceList是自定义选择,隐藏了套餐id的选项,不会回显套餐id)
|
|
|
|
+ // 所以,所有id需要结合关联订单中的id
|
|
|
|
+ let allServiceList = productForm.serviceList
|
|
|
|
+ const originServiceList = relateOrdersServiceList
|
|
|
|
+ let supServiceIds = []
|
|
|
|
+ if (Array.isArray(relateOrdersServiceList)) {
|
|
|
|
+ allServiceList = allServiceList.concat(originServiceList)
|
|
|
|
+ allServiceList = [...new Set(allServiceList)]
|
|
|
|
+ supServiceIds = allServiceList.filter(item => !relateOrdersServiceList.includes(item)) // 对比以前的,新增的id
|
|
|
|
+ }
|
|
|
|
+
|
|
const filter = {
|
|
const filter = {
|
|
...commonFilter,
|
|
...commonFilter,
|
|
comboId,
|
|
comboId,
|
|
- serviceIds: productForm.serviceList, // 当前所有选择的id
|
|
|
|
|
|
+ serviceIds: allServiceList, // 当前所有选择的id
|
|
// 大会员个人版也可开通子账号,getCommonFilterParams中个人版没有加上的,此处要加上
|
|
// 大会员个人版也可开通子账号,getCommonFilterParams中个人版没有加上的,此处要加上
|
|
buyAccountCount: productForm.subAccountNumbers?.payCount,
|
|
buyAccountCount: productForm.subAccountNumbers?.payCount,
|
|
giftAccountCount: productForm.subAccountNumbers?.freeCount
|
|
giftAccountCount: productForm.subAccountNumbers?.freeCount
|
|
}
|
|
}
|
|
|
|
|
|
- const relateOrdersServiceList = productForm.selectedRelatedOrder?.serviceList
|
|
|
|
- if (Array.isArray(relateOrdersServiceList)) {
|
|
|
|
- filter.supServiceIds = filter.serviceIds.filter(item => !relateOrdersServiceList.includes(item)) // 对比以前的,新增的id
|
|
|
|
|
|
+ if (supServiceIds.length > 0) {
|
|
|
|
+ filter.supServiceIds = supServiceIds // 对比以前的,新增的id
|
|
}
|
|
}
|
|
|
|
|
|
p.filter = filter
|
|
p.filter = filter
|