|
@@ -238,9 +238,29 @@ export default {
|
|
|
align: 'center',
|
|
|
fixed: 'left',
|
|
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
|
+ let mkInfo = '无'
|
|
|
+ if (row.promotionRule.gateFlag === '1') {
|
|
|
+ if (row.promotionRule.gateType === 'RATIO_AMOUNT') {
|
|
|
+ mkInfo = `购买门槛产品金额${row.promotionRule.gateValue ? (row.promotionRule.gateValue * 100).toFixed(2) : '0.00'}%作为配额`
|
|
|
+ } else if (row.promotionRule.gateType === 'MIN_AMOUNT') {
|
|
|
+ mkInfo = `购买门槛产品满最低金额${this.toThousands(row.promotionRule.gateValue)}元,不限制配额`
|
|
|
+ } else {
|
|
|
+ if (row.promotionRule.promotionRuleType != 'PROMO_PROD') {
|
|
|
+ mkInfo = `购买满${this.toThousands(row.promotionRule.gateValue)}元门槛产品,可使用 ${this.toThousands(row.promotionRule.quotaAmount)}元配额,采购规则中的正价商品`
|
|
|
+ } else {
|
|
|
+ mkInfo = `购买每满${row.promotionRule.gateUnit === 'YUAN' ? this.toThousands(row.promotionRule.gateValue) : row.promotionRule.gateValue}${row.promotionRule.gateUnit === 'YUAN' ? '元' : '个'}门槛产品,可采购${row.promotionRule.quotaAmount}个特价产品`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return (<div style="width:100%;display:flex;justify-content: space-between;" title={row[column.field]} onClick={() => _this.showDesc(row)}>
|
|
|
- <div class="table-link-text" title={row.promotionTitle + '(' + row[column.field] + ')'}>
|
|
|
- <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{row[column.field]}</span>
|
|
|
+ <div class="table-link-text">
|
|
|
+ <a-popover title={row.promotionTitle + '(' + row[column.field] + ')'}>
|
|
|
+ <template slot="content">
|
|
|
+ <strong>规则门槛:</strong><div>{mkInfo}</div>
|
|
|
+ <strong>规则:</strong><div domPropsInnerHTML={row.promotionRule.ruleInfo}></div>
|
|
|
+ </template>
|
|
|
+ <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{row[column.field]}</span>
|
|
|
+ </a-popover>
|
|
|
</div>
|
|
|
<div style="position:absolute;right:0;">
|
|
|
{row.promotionRule.stackFlag == 1 ? <a-badge count="叠" numberStyle={{ backgroundColor: '#00aa00', marginLeft: '2px', zoom: '0.7' }}/> : ''}
|