|
|
@@ -1,5 +1,6 @@
|
|
|
import BasicTable from '@/components/Table'
|
|
|
import consts from '@/consts'
|
|
|
+import { priceMapToName, PriceType } from '@/enums'
|
|
|
import { querySoftInvoiceTrendsList } from '@/services/statistic'
|
|
|
import { disabledDate } from '@/utils/utils'
|
|
|
import { DualAxes } from '@ant-design/charts'
|
|
|
@@ -14,7 +15,7 @@ const InvoiceTrends = () => {
|
|
|
params: {
|
|
|
optionType: 'singleStaff',
|
|
|
dataIds: [],
|
|
|
- priceType: 'invoice',
|
|
|
+ priceType: PriceType.INVOICE,
|
|
|
startMonth: dayjs(new Date())
|
|
|
},
|
|
|
chart: []
|
|
|
@@ -128,7 +129,7 @@ const InvoiceTrends = () => {
|
|
|
appendPadding: [0, 24, 12, 24],
|
|
|
meta: {
|
|
|
price: {
|
|
|
- alias: '当月开票金额(元)'
|
|
|
+ alias: `当月${priceMapToName[state.params.priceType]}金额(元)`
|
|
|
},
|
|
|
ring: {
|
|
|
alias: '环比增长(%)',
|
|
|
@@ -155,7 +156,9 @@ const InvoiceTrends = () => {
|
|
|
position: 'top',
|
|
|
itemName: {
|
|
|
formatter: (_, item) => {
|
|
|
- return item.value === 'price' ? '当月开票金额(元)' : '环比增长(%)'
|
|
|
+ return item.value === 'price'
|
|
|
+ ? `当月${priceMapToName[state.params.priceType]}金额(元)`
|
|
|
+ : '环比增长(%)'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -204,9 +207,9 @@ const InvoiceTrends = () => {
|
|
|
<Select
|
|
|
defaultValue="invoice"
|
|
|
options={[
|
|
|
- { label: '发票', value: 'invoice' },
|
|
|
- { label: '收款', value: 'receivables' },
|
|
|
- { label: '入账', value: 'credit' }
|
|
|
+ { label: '发票', value: PriceType.INVOICE },
|
|
|
+ { label: '收款', value: PriceType.RECEIVABLES },
|
|
|
+ { label: '入账', value: PriceType.CREDIT }
|
|
|
]}
|
|
|
placeholder="请选择发票类型"
|
|
|
onChange={e => setState({ ...state, params: { ...state.params, priceType: e } })}
|