|
@@ -96,10 +96,6 @@ const renderContent = (value, row, index) => {
|
|
|
children: text,
|
|
|
attrs: {}
|
|
|
}
|
|
|
-
|
|
|
- if (row.category == 'a') {
|
|
|
- obj.attrs.colSpan = 0
|
|
|
- }
|
|
|
return obj
|
|
|
}
|
|
|
export default {
|
|
@@ -141,6 +137,8 @@ export default {
|
|
|
// 计算表格序号
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
data[i].no = i + 1
|
|
|
+ data[i].grossMargin = data[i].grossMargin ? data[i].grossMargin + '%' : ''
|
|
|
+ data[i].promoRatio = data[i].promoRatio ? data[i].promoRatio + '%' : ''
|
|
|
ret.push(data[i])
|
|
|
if (data[i].category.indexOf('合计') >= 0) {
|
|
|
ret.push({ no: 'hj-' + data[i].no, 'category': 'a' })
|
|
@@ -170,26 +168,20 @@ export default {
|
|
|
const arr = [
|
|
|
{ title: '类别',
|
|
|
dataIndex: 'category',
|
|
|
- width: '15%',
|
|
|
+ width: '25%',
|
|
|
align: 'center',
|
|
|
customRender: (text, row, index) => {
|
|
|
if (row.category != 'a') {
|
|
|
return row.category.indexOf('合计') < 0 ? <a-button type="link" class="button-default">{text}</a-button> : (<a-button type="link" class="button-default" style="font-weight:bold;">{text}</a-button>)
|
|
|
}
|
|
|
- return {
|
|
|
- children: <span style="display:block;height:6px;background:#fff;"></span>,
|
|
|
- attrs: {
|
|
|
- colSpan: 8
|
|
|
- }
|
|
|
- }
|
|
|
} },
|
|
|
{ title: '成本', dataIndex: 'cost', width: '10%', align: 'right', customRender: renderContent },
|
|
|
{ title: '销售额', dataIndex: 'amount', width: '10%', align: 'right', customRender: renderContent },
|
|
|
{ title: '毛利', dataIndex: 'gross', width: '10%', align: 'right', customRender: renderContent },
|
|
|
- { title: '毛利率', dataIndex: 'grossMargin', width: '10%', align: 'right', customRender: renderContent },
|
|
|
+ { title: '毛利率', dataIndex: 'grossMargin', width: '10%', align: 'center', customRender: renderContent },
|
|
|
{ title: '促销费用', dataIndex: 'promo', width: '10%', align: 'right', customRender: renderContent },
|
|
|
- { title: '减促销费用的毛利', dataIndex: 'removePromoGross', width: '15%', align: 'right', customRender: renderContent },
|
|
|
- { title: '促销费用占比', dataIndex: 'promoRatio', width: '15%', align: 'right', customRender: renderContent }
|
|
|
+ { title: '减促销费用的毛利', dataIndex: 'removePromoGross', width: '10%', align: 'right', customRender: renderContent },
|
|
|
+ { title: '促销费用占比', dataIndex: 'promoRatio', width: '10%', align: 'center', customRender: renderContent }
|
|
|
]
|
|
|
return arr
|
|
|
}
|
|
@@ -298,12 +290,14 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less">
|
|
|
- .regionTypeBusinessReportList-wrap{
|
|
|
- tr.garyBg-row{
|
|
|
+ .sTable{
|
|
|
+ .garyBg-row{
|
|
|
td{
|
|
|
- background: #ffaa00;
|
|
|
+ background: #f6f6f6!important;
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+ .regionTypeBusinessReportList-wrap{
|
|
|
.monthBox{
|
|
|
width: 100%;
|
|
|
/deep/.ant-calendar-picker-icon{
|