|
@@ -66,6 +66,12 @@
|
|
|
<div v-else-if="item.key === 'mainAccountCount'">
|
|
|
<span v-html="getValidityPeriodHtml(product, item)"></span>
|
|
|
</div>
|
|
|
+ <div v-else-if="item.key ==='data_count'">
|
|
|
+ <span v-html="getValidityPeriodHtml(product, item)"></span>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="item.key ==='productName'">
|
|
|
+ <span v-html="getValidityPeriodHtml(product, item)"></span>
|
|
|
+ </div>
|
|
|
<div v-else-if="item.key ==='rate'">
|
|
|
{{ item.label }}:
|
|
|
<span :class="{'no_open_root': product.original_price === 0}">{{ getFilteredValue(product[item.key], item.filter) || '-' }}</span>
|
|
@@ -479,9 +485,8 @@ export default {
|
|
|
...this.sortTableText(t),
|
|
|
}
|
|
|
})
|
|
|
- const productName = product.product_type === '数据报告' ? parsedFilter.report_name : product.productName;
|
|
|
+ const productName = this.buildProductName(product, parsedFilter)
|
|
|
const email = product.product_type === '数据报告' ? parsedFilter.email : '';
|
|
|
-
|
|
|
const newProduct = {
|
|
|
...product,
|
|
|
filter: parsedFilter,
|
|
@@ -556,6 +561,33 @@ export default {
|
|
|
}
|
|
|
return RETURN_BOOL[product] || false;
|
|
|
},
|
|
|
+ buildProductName(product, parsedFilter) {
|
|
|
+ let productName = '';
|
|
|
+ const type = product.product_type
|
|
|
+ if(type === '数据报告') {
|
|
|
+ productName = parsedFilter.report_name;
|
|
|
+ } else if( type === 'VIP订阅' || type === '省份订阅包') {
|
|
|
+ const addAreaCount = parsedFilter.addAreaCount || 0;
|
|
|
+ if(addAreaCount) {
|
|
|
+ const addAreaCountText = addAreaCount > 1 ? `<span style="color:#f74e29">(此次增购${addAreaCount}个省)</span>` : '';
|
|
|
+ productName = `${product.productName}${addAreaCountText}`;
|
|
|
+ } else {
|
|
|
+ productName = product.productName;
|
|
|
+ }
|
|
|
+ } else if(type === '物业|采购意向+最新采购') {
|
|
|
+ const areaCount = parsedFilter.areaCount || 0;
|
|
|
+ if(areaCount) {
|
|
|
+ productName = `${areaCount}个省份`
|
|
|
+ } else {
|
|
|
+ productName = '全国';
|
|
|
+ }
|
|
|
+ } else if(type === '中标必听课') {
|
|
|
+ productName = parsedFilter?.s_name || product.productName;
|
|
|
+ } else {
|
|
|
+ productName = product.productName;
|
|
|
+ }
|
|
|
+ return productName
|
|
|
+ },
|
|
|
buildSupServiceIds(parfilter) {
|
|
|
const { supServiceIds, buyAccountCount, giftAccountCount } = parfilter
|
|
|
const upgradeContent = []
|
|
@@ -592,12 +624,18 @@ export default {
|
|
|
// 不同的值组成的数组
|
|
|
differentValues = serviceIds.filter(value => !supServiceIds.includes(value));
|
|
|
const differentValuesArr = differentValues.map(id => parseInt(id));
|
|
|
+ if(differentValuesArr.length === 0) {
|
|
|
+ console.warn('differentValuesArr为空')
|
|
|
+ }
|
|
|
const baseServiceIdsArr = serviceListRef.calcAlreadyBuyServiceNamesArr(differentValuesArr);
|
|
|
const baseServiceData = Array.isArray(baseServiceIdsArr)? baseServiceIdsArr.join('、') : ''
|
|
|
// 补充服务
|
|
|
// 相同的值组成的数组
|
|
|
sameValues = supServiceIds.filter(value => serviceIds.includes(value));
|
|
|
const supServiceIdsArr = sameValues.map(id => parseInt(id));
|
|
|
+ if(supServiceIdsArr.length === 0) {
|
|
|
+ console.warn('supServiceIdsArr为空')
|
|
|
+ }
|
|
|
const resSupServiceIdsArr = serviceListRef.calcAlreadyBuyServiceNamesArr(supServiceIdsArr);
|
|
|
// 如果resSupServiceData中包含基础服务+企业管理,需要去掉, buy_subject为1时,去掉企业管理
|
|
|
const baseServiceIndex = resSupServiceIdsArr.findIndex(item =>
|
|
@@ -614,6 +652,9 @@ export default {
|
|
|
const serviceStr = `${supplement};【原已购服务】:${baseServiceData}${hasBigServiceNames}`
|
|
|
resolve(serviceStr);
|
|
|
} else {
|
|
|
+ if(numericServiceIds.length === 0) {
|
|
|
+ console.warn('numericServiceIds为空')
|
|
|
+ }
|
|
|
const res = serviceListRef.calcAlreadyBuyServiceNamesArr(numericServiceIds);
|
|
|
const serviceData = Array.isArray(res) ? res.join('、') + hasBigServiceNames : '';
|
|
|
resolve(serviceData);
|
|
@@ -720,12 +761,11 @@ export default {
|
|
|
const totalNums = Number(pNum) + (Number(give_cycle) || 0);
|
|
|
const { product_type } = product;
|
|
|
const includeProductType = ['数据流量包', '历史数据', '结构化数据']
|
|
|
- if(includeProductType.includes(product_type)) {
|
|
|
- return `${totalNums}条`;
|
|
|
+ if(includeProductType.includes(product_type) && totalNums) {
|
|
|
+ return `付费${pNum || 0}条,赠送${give_cycle || 0}条,合计<span class="color_main">${totalNums}</span>条`;
|
|
|
} else {
|
|
|
return '';
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
buildReportNumber(product, parsedFilter) {
|
|
|
const { num } = parsedFilter;
|