|
@@ -26,7 +26,7 @@ function columnsNature12(rechargeTrendHandle: (data: any) => void): { label: str
|
|
|
}
|
|
|
|
|
|
// 买量付费趋势
|
|
|
- const buyC = Array(29).fill('').map((_item: string, index: number) => {
|
|
|
+ const buyC = Array(90).fill('').map((_item: string, index: number) => {
|
|
|
let field = `buyAmountD${index + 1}Trend`
|
|
|
let data = {
|
|
|
title: `D${index + 1}(买)`,
|
|
@@ -72,9 +72,55 @@ function columnsNature12(rechargeTrendHandle: (data: any) => void): { label: str
|
|
|
return data
|
|
|
})
|
|
|
|
|
|
+ const buyM = [4, 5, 6, 7, 8, 9, 10, 11, 12].map((index, num) => {
|
|
|
+ let field = `buyAmountM${index}Trend`
|
|
|
+ let data = {
|
|
|
+ title: `M${index}(买)`,
|
|
|
+ dataIndex: `M${index}Buy`,
|
|
|
+ label: "买量付费趋势",
|
|
|
+ align: "center",
|
|
|
+ width: 110,
|
|
|
+ render: (a: any, b: any) => {
|
|
|
+ let date1 = moment()
|
|
|
+ if (b?.costDate === '总计') {
|
|
|
+ if (b?.beginDay) {
|
|
|
+ date1 = moment(b?.beginDay)
|
|
|
+ } else {
|
|
|
+ date1 = moment()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ date1 = moment(b.costDate)
|
|
|
+ }
|
|
|
+ let dt = moment()
|
|
|
+ let day = dt.diff(date1, 'day');
|
|
|
+ let fieldData = getFieldDta()
|
|
|
+ if (fieldData?.length > 0 && index * 30 <= day) {
|
|
|
+ let data: any = {}
|
|
|
+ let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
+ switch (fieldData[0].type) {
|
|
|
+ case '付费趋势':
|
|
|
+ if (b?.[field]) {
|
|
|
+ data = b?.[field]
|
|
|
+ return <div className={style.dbox}>
|
|
|
+ {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
+ {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
+ {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
+ {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
+ {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ },
|
|
|
+ }
|
|
|
+ return data
|
|
|
+ })
|
|
|
+
|
|
|
let natureDefaultStart = 14
|
|
|
// 自然量
|
|
|
- const natureC = Array(29).fill('').map((_item: string, index: number) => {
|
|
|
+ const natureC = Array(90).fill('').map((_item: string, index: number) => {
|
|
|
let field = `natureAmountD${index + 1}Trend`
|
|
|
let data = {
|
|
|
title: `D${index + 1}(自)`,
|
|
@@ -117,14 +163,59 @@ function columnsNature12(rechargeTrendHandle: (data: any) => void): { label: str
|
|
|
return '--'
|
|
|
},
|
|
|
}
|
|
|
- if (index < 29) {
|
|
|
- data['default'] = natureDefaultStart + index
|
|
|
+ data['default'] = natureDefaultStart + index
|
|
|
+ return data
|
|
|
+ })
|
|
|
+
|
|
|
+ const natureM = [4, 5, 6, 7, 8, 9, 10, 11, 12].map((index, num) => {
|
|
|
+ let field = `natureAmountM${index}Trend`
|
|
|
+ let data = {
|
|
|
+ title: `M${index}(自)`,
|
|
|
+ dataIndex: `M${index}Nature`,
|
|
|
+ label: "自然量付费趋势",
|
|
|
+ align: "center",
|
|
|
+ width: 110,
|
|
|
+ render: (a: any, b: any) => {
|
|
|
+ let date1 = moment()
|
|
|
+ if (b?.costDate === '总计') {
|
|
|
+ if (b?.beginDay) {
|
|
|
+ date1 = moment(b?.beginDay)
|
|
|
+ } else {
|
|
|
+ date1 = moment()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ date1 = moment(b.costDate)
|
|
|
+ }
|
|
|
+ let dt = moment()
|
|
|
+ let day = dt.diff(date1, 'day');
|
|
|
+ let fieldData = getFieldDta()
|
|
|
+ if (fieldData?.length > 0 && index * 30 <= day) {
|
|
|
+ let data: any = {}
|
|
|
+ let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
+ switch (fieldData[0].type) {
|
|
|
+ case '付费趋势':
|
|
|
+ if (b?.[field]) {
|
|
|
+ data = b?.[field]
|
|
|
+ return <div className={style.dbox}>
|
|
|
+ {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
+ {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
+ {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
+ {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
+ {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ },
|
|
|
}
|
|
|
+ data['default'] = natureDefaultStart + 90 + num
|
|
|
return data
|
|
|
})
|
|
|
|
|
|
// 总付费趋势
|
|
|
- const zC = Array(29).fill('').map((_item: string, index: number) => {
|
|
|
+ const zC = Array(90).fill('').map((_item: string, index: number) => {
|
|
|
let field = `amountD${index + 1}Trend`
|
|
|
let data = {
|
|
|
title: `D${index + 1}(总)`,
|
|
@@ -169,6 +260,51 @@ function columnsNature12(rechargeTrendHandle: (data: any) => void): { label: str
|
|
|
}
|
|
|
return data
|
|
|
})
|
|
|
+ const zM = [4, 5, 6, 7, 8, 9, 10, 11, 12].map((index, num) => {
|
|
|
+ let field = `amountM${index}Trend`
|
|
|
+ let data = {
|
|
|
+ title: `M${index}(总)`,
|
|
|
+ dataIndex: `M${index}`,
|
|
|
+ label: "总付费趋势",
|
|
|
+ align: "center",
|
|
|
+ width: 110,
|
|
|
+ render: (a: any, b: any) => {
|
|
|
+ let date1 = moment()
|
|
|
+ if (b?.costDate === '总计') {
|
|
|
+ if (b?.beginDay) {
|
|
|
+ date1 = moment(b?.beginDay)
|
|
|
+ } else {
|
|
|
+ date1 = moment()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ date1 = moment(b.costDate)
|
|
|
+ }
|
|
|
+ let dt = moment()
|
|
|
+ let day = dt.diff(date1, 'day');
|
|
|
+ let fieldData = getFieldDta()
|
|
|
+ if (fieldData?.length > 0 && index * 30 <= day) {
|
|
|
+ let data: any = {}
|
|
|
+ let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
+ switch (fieldData[0].type) {
|
|
|
+ case '付费趋势':
|
|
|
+ if (b?.[field]) {
|
|
|
+ data = b?.[field]
|
|
|
+ return <div className={style.dbox}>
|
|
|
+ {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
+ {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
+ {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
+ {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
+ {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ },
|
|
|
+ }
|
|
|
+ return data
|
|
|
+ })
|
|
|
|
|
|
|
|
|
|
|
@@ -650,169 +786,9 @@ function columnsNature12(rechargeTrendHandle: (data: any) => void): { label: str
|
|
|
},
|
|
|
label: '买量付费趋势',
|
|
|
data: [
|
|
|
- ...buyC
|
|
|
- ,
|
|
|
+ ...buyC,
|
|
|
+ ...buyM,
|
|
|
{
|
|
|
- title: "D30(买)",
|
|
|
- dataIndex: "D30Buy",
|
|
|
- label: "买量付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 30 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.buyAmountM1Trend) {
|
|
|
- data = b?.buyAmountM1Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
- title: "M2(买)",
|
|
|
- dataIndex: "M2Buy",
|
|
|
- label: "买量付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 60 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.buyAmountM2Trend) {
|
|
|
- data = b?.buyAmountM2Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
- title: "M3(买)",
|
|
|
- dataIndex: "M3Buy",
|
|
|
- label: "买量付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 90 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.buyAmountM3Trend) {
|
|
|
- data = b?.buyAmountM3Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
- title: "M6(买)",
|
|
|
- dataIndex: "M6Buy",
|
|
|
- label: "买量付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 180 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.buyAmountM6Trend) {
|
|
|
- data = b?.buyAmountM6Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
title: "总(买)",
|
|
|
dataIndex: "totalBuy",
|
|
|
label: "买量付费趋势",
|
|
@@ -846,173 +822,14 @@ function columnsNature12(rechargeTrendHandle: (data: any) => void): { label: str
|
|
|
label: '自然量付费趋势',
|
|
|
data: [
|
|
|
...natureC,
|
|
|
+ ...natureM,
|
|
|
{
|
|
|
- title: "D30(自)",
|
|
|
- dataIndex: "D30Nature",
|
|
|
- label: "自然量付费趋势",
|
|
|
- align: "center",
|
|
|
- default: 43,
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 30 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.natureAmountM1Trend) {
|
|
|
- data = b?.natureAmountM1Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
- title: "M2(自)",
|
|
|
- dataIndex: "M2Nature",
|
|
|
- label: "自然量付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 60 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.natureAmountM2Trend) {
|
|
|
- data = b?.natureAmountM2Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
- title: "M3(自)",
|
|
|
- dataIndex: "M3Nature",
|
|
|
- label: "自然量付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 90 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.natureAmountM3Trend) {
|
|
|
- data = b?.natureAmountM3Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
- title: "M6(自)",
|
|
|
- dataIndex: "M6Nature",
|
|
|
- label: "自然量付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 180 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.natureAmountM6Trend) {
|
|
|
- data = b?.natureAmountM6Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
title: "总(自)",
|
|
|
dataIndex: "totalNature",
|
|
|
label: "自然量付费趋势",
|
|
|
align: "center",
|
|
|
width: 110,
|
|
|
+ default: 113,
|
|
|
render: (a: any, b: any) => {
|
|
|
let fieldData = getFieldDta()
|
|
|
if (fieldData?.length > 0) {
|
|
@@ -1040,168 +857,9 @@ function columnsNature12(rechargeTrendHandle: (data: any) => void): { label: str
|
|
|
{
|
|
|
label: '总付费趋势',
|
|
|
data: [
|
|
|
- ...zC
|
|
|
- , {
|
|
|
- title: "D30(总)",
|
|
|
- dataIndex: "D30",
|
|
|
- label: "总付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 30 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.amountM1Trend) {
|
|
|
- data = b?.amountM1Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
- title: "M2(总)",
|
|
|
- dataIndex: "M2",
|
|
|
- label: "总付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 60 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.amountM2Trend) {
|
|
|
- data = b?.amountM2Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
- title: "M3(总)",
|
|
|
- dataIndex: "M3",
|
|
|
- label: "总付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 90 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.amountM3Trend) {
|
|
|
- data = b?.amountM3Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
- title: "M6(总)",
|
|
|
- dataIndex: "M6",
|
|
|
- label: "总付费趋势",
|
|
|
- align: "center",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.costDate === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b?.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.costDate)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 180 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (b?.amountM6Trend) {
|
|
|
- data = b?.amountM6Trend
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
- }, {
|
|
|
+ ...zC,
|
|
|
+ ...zM,
|
|
|
+ {
|
|
|
title: "总(总)",
|
|
|
dataIndex: "total",
|
|
|
label: "总付费趋势",
|
|
@@ -1238,7 +896,7 @@ function columnsNature12(rechargeTrendHandle: (data: any) => void): { label: str
|
|
|
title: '操作',
|
|
|
dataIndex: 'cz',
|
|
|
label: '操作',
|
|
|
- default: 44,
|
|
|
+ default: 114,
|
|
|
align: 'center',
|
|
|
width: 75,
|
|
|
render: (a: number, b: any) => {
|