|
@@ -127,6 +127,9 @@ export default {
|
|
|
{ label: '付费类型', key: 'service_type', filter: 'orderServiceType', span: 3},
|
|
|
{ label: '升级内容', key: 'supServiceIds', span: 3, condition: (product) => product.service_type === 3 },
|
|
|
{ label: '产品规格', key: 'productName', span: 3},
|
|
|
+ { label: '报告份数', key: 'reportNumber', span: 1, condition: (product) => this.reportType.includes(product.product_type)},
|
|
|
+ { label: '剑鱼币个数', key: 'coinCount', span: 1, condition: (product) => product.product_type && product.product_type === '剑鱼币'},
|
|
|
+ { label: '购买产品', key: 'buyProductName', span: 1, condition: (product) => product.product_type && product.product_type === '结构化数据'},
|
|
|
{ label: '服务列表', key: 'bigServiceNames', span: 1, condition: (product) => product.productName && product.productName.includes('自定义') && product.product_code === 'dyh001'},
|
|
|
{ label: '数据条数', key: 'data_count', span: 1, condition: (product) => product.data_count && product.data_count !== '-'},
|
|
|
{ label: '有效周期', key: 'validity_period', span: 1, condition: (product) => product.validity_period && product.validity_period !== '-' },
|
|
@@ -212,7 +215,10 @@ export default {
|
|
|
computed: {
|
|
|
...mapState({
|
|
|
orderDetail: state => state.order.orderDetail
|
|
|
- })
|
|
|
+ }),
|
|
|
+ reportType() {
|
|
|
+ return ['数据报告', '业主采购分析报告下载包', '企业中标分析报告下载包', '市场分析定制报告下载包', '采购单位画像包', '附件下载包']
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.beforeInit();
|
|
@@ -246,6 +252,9 @@ export default {
|
|
|
);
|
|
|
const supExplanation = parsedFilter.supExplanation
|
|
|
const dataCount = this.buildDataCount(product, parsedFilter);
|
|
|
+ const reportNumber = this.buildReportNumber(product, parsedFilter);
|
|
|
+ const coinCount = this.buildCoinCount(product, parsedFilter);
|
|
|
+ const buyProductName = this.buildBuyProductName(product, parsedFilter);
|
|
|
const subAccountCount = this.buildSubAccountCount(product, parsedFilter);
|
|
|
// 仅产品为会员服务时,才计算主账号数量
|
|
|
const mainAccountCount = product.attribute === 1 ? '1个' : '-';
|
|
@@ -300,6 +309,9 @@ export default {
|
|
|
filter: parsedFilter,
|
|
|
rate,
|
|
|
productName,
|
|
|
+ reportNumber,
|
|
|
+ coinCount,
|
|
|
+ buyProductName,
|
|
|
validity_period: validityPeriod,
|
|
|
data_count: dataCount,
|
|
|
subAccountCount,
|
|
@@ -480,17 +492,56 @@ export default {
|
|
|
return true;
|
|
|
},
|
|
|
buildDataCount(product, parsedFilter) {
|
|
|
- const { pNum, give_cycle } = parsedFilter;
|
|
|
- const totalNums = Number(pNum) + (Number(give_cycle) || 0);
|
|
|
+ const { num, give_cycle } = parsedFilter;
|
|
|
+ const totalNums = Number(num) + (Number(give_cycle) || 0);
|
|
|
const { product_type } = product;
|
|
|
const includeProductType = ['数据流量包', '历史数据', '结构化数据']
|
|
|
if(includeProductType.includes(product_type) && totalNums) {
|
|
|
- return `付费${pNum || 0}条,赠送${give_cycle || 0}条,合计<span class="color_main">${totalNums}</span>条`;
|
|
|
+ return `付费${num || 0}条,赠送${give_cycle || 0}条,合计<span class="color_main">${totalNums}</span>条`;
|
|
|
} else {
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ buildReportNumber(product, parsedFilter) {
|
|
|
+ const { num } = parsedFilter;
|
|
|
+ const { product_type } = product;
|
|
|
+ const includeProductType = this.reportType
|
|
|
+ if(includeProductType.includes(product_type) && num) {
|
|
|
+ return `${num || 0}份`;
|
|
|
+ } else {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ buildCoinCount(product, parsedFilter) {
|
|
|
+ const { num } = parsedFilter;
|
|
|
+ const { product_type } = product;
|
|
|
+ const includeProductType = ['剑鱼币']
|
|
|
+ if(includeProductType.includes(product_type) && num) {
|
|
|
+ return `${num || 0}个`;
|
|
|
+ } else {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ buildBuyProductName(product, parsedFilter) {
|
|
|
+ const { product: buy_product } = parsedFilter;
|
|
|
+ const { product_type } = product;
|
|
|
+ const includeProductType = ['结构化数据']
|
|
|
+ if(includeProductType.includes(product_type) && buy_product) {
|
|
|
+ return this.buyStatus(buy_product) || '-';
|
|
|
+ } else {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ buyStatus(val) {
|
|
|
+ if (val == '1') {
|
|
|
+ return '增量数据'
|
|
|
+ } else if (val == '2') {
|
|
|
+ return '历史数据'
|
|
|
+ } else if (val == '3') {
|
|
|
+ return '增量+历史数据'
|
|
|
+ }
|
|
|
+ },
|
|
|
calculateValidityPeriod(parsedFilter, product) {
|
|
|
const { buy_cycle, buy_type, give_cycle, give_type, validYear, activity_give_cycle, activity_give_type } = parsedFilter;
|
|
|
const { product_type, returned_open } = product;
|