Compare commits

..

No commits in common. "dev" and "master" have entirely different histories.
dev ... master

4 changed files with 150 additions and 262 deletions

View File

@ -1,7 +1,7 @@
import 'twin.macro'
export default function(props) {
return <div tw='' style={{marginTop: "20px", marginBottom: "12px",
return <div tw='' style={{marginTop: "20px", marginBottom: "20px",
border: '1px solid #ccc', borderRadius: '5px', display: "inline-block", width: '138px', height: '80px', ...(props.style || {}) }}>
<div style={{display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%'}}>
<div>

View File

@ -16,18 +16,26 @@ import TopContent from './components/TopContent';
// 核心代码
import { useSearchParams } from 'react-router-dom'
import {getRoundNumber} from "@/utils";
import 'twin.macro';
import {Meter04KvType} from "@/shared/model-park";
function getNestAmount(arr: string[] = []): string {
if (!arr.length) {
return "0"
}
return arr?.reduce((prev, next) => {
return getRoundNumber(Number(prev || 0) + Number(next || 0))
})
function getAmount(amount: string, loss: string, refund: string, price: string): string {
return `${
getRoundNumber(
Number(
getRoundNumber(
Number(
(Number(
(Number(amount) + Number(loss)
)
) -
Number(refund)
)
)
)
) * Number(price)
)}`
}
export const UserReport: FC = () => {
const [searchParams] = useSearchParams()
const tid = searchParams.get("tenement");
@ -75,165 +83,23 @@ export const UserReport: FC = () => {
const renderTable = useCallback(() => {
return data?.meters?.map((item, index) => {
// const finalAmount = Number(item?.overall?.amount || 0) + Number(item?.loss?.amount || 0) + Number(item?.publicAmount || 0)
const finalAmount = Number(item?.overall?.amount || 0) + Number(item?.loss?.amount || 0) + Number(item?.publicAmount || 0)
return (
<tr key={index}>
<td>{item?.meterNo}</td>
<td>{item?.address}</td>
{
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{outputWithPrecision(item?.startNumber, 2, '-')}</td> :
<td>
<div> {item?.startSharp} </div>
<div> {item?.startPeak} </div>
<div> {item?.startFlat} </div>
<div> {item?.startValley} </div>
</td>
}
{
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{outputWithPrecision(item?.endNumber, 2, '-')}</td> :
<td>
<div> {item?.endSharp} </div>
<div> {item?.endPeak} </div>
<div> {item?.endFlat} </div>
<div> {item?.endValley} </div>
</td>
}
<td>{outputWithPrecision(item?.ratio, 2, '-')}</td>
{
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{item?.refundAmount}</td> :
<td>
<div> {item?.refundSharp} </div>
<div> {item?.refundPeak} </div>
<div> {item?.refundFlat} </div>
<div> {item?.refundValley} </div>
</td>
}
{
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{item?.nestOverall}</td> :
<td>
<div> {item?.nestSharp} </div>
<div> {item?.nestPeak} </div>
<div> {item?.nestFlat} </div>
<div> {item?.nestValley} </div>
</td>
}
{
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{outputWithPrecision(item?.overall?.amount, 2, '-')}</td> :
<td>
<div> {item?.critical?.amount} </div>
<div> {item?.peak?.amount} </div>
<div> {item?.flat?.amount} </div>
<div> {item?.valley?.amount} </div>
</td>
}
<td>{outputWithPrecision(item?.startNumber, 2, '-')}</td>
<td>{outputWithPrecision(item?.endNumber, 2, '-')}</td>
<td>{outputWithPrecision(item?.displayRatio, 2, '-')}</td>
<td>{outputWithPrecision(item?.overall?.amount, 2, '-')}</td>
{/* <td>{outputWithPrecision(item?.finalTotal ? (1 / (1 - Number(item?.loss?.amount) / Number(item?.finalTotal)) - 1) * 100 : undefined, 2, '-')} %</td> */}
{
data?.tenement?.feeType === 3 ? null : (
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{outputWithPrecision(item?.loss?.amount, 2, '-')}</td> :
<td>
<div> {item?.lossSharp} </div>
<div> {item?.lossPeak} </div>
<div> {item?.lossFlat} </div>
<div> {item?.lossValley} </div>
</td>
)
}
{
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{outputWithPrecision(item?.publicAmount, 2, '-')}</td> :
<td>
<div> {item?.poolSharp || 0} </div>
<div> {item?.poolPeak || 0} </div>
<div> {item?.poolFlat || 0} </div>
<div> {item?.poolValley || 0} </div>
</td>
}
<td>{outputWithPrecision(item?.finalAmount, 2, '-')}</td>
<td>{outputWithPrecision(item?.loss?.amount, 2, '-')}</td>
<td>{outputWithPrecision(item?.publicAmount, 2, '-')}</td>
<td>{outputWithPrecision(finalAmount, 2, '-')}</td>
</tr>
)
})
}, [data?.meters, data?.park?.meter04kvType])
const renderTableSum = useCallback(() => {
if (data?.meters?.length < 2) {
return null;
}
return <tr key={data?.meters?.length + 1}>
<td> </td>
<td> - </td>
<td> - </td>
<td> - </td>
{
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{data?.comprehensive?.refundOverall}</td> :
<td>
<div> {data?.comprehensive?.refundSharp} </div>
<div> {data?.comprehensive?.refundPeak} </div>
<div> {data?.comprehensive?.refundFlat} </div>
<div> {data?.comprehensive?.refundValley} </div>
</td>
}
{
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{getNestAmount(data?.meters?.map(item => item?.nestOverall))}</td> :
<td>
<div> {getNestAmount(data?.meters?.map(item => item?.nestSharp))} </div>
<div> {getNestAmount(data?.meters?.map(item => item?.nestPeak))} </div>
<div> {getNestAmount(data?.meters?.map(item => item?.nestFlat))} </div>
<div> {getNestAmount(data?.meters?.map(item => item?.nestValley))} </div>
</td>
}
{
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{outputWithPrecision(data?.comprehensive?.consumption, 2, '-')}</td> :
<td>
<div> {data?.comprehensive?.sharpAmount} </div>
<div> {data?.comprehensive?.peakAmount} </div>
<div> {data?.comprehensive?.flatAmount} </div>
<div> {data?.comprehensive?.valleyAmount} </div>
</td>
}
{/* <td>{outputWithPrecision(item?.finalTotal ? (1 / (1 - Number(item?.loss?.amount) / Number(item?.finalTotal)) - 1) * 100 : undefined, 2, '-')} %</td> */}
{
data?.tenement?.feeType === 3 ? null : (
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{outputWithPrecision(data?.comprehensive?.lossAmount, 2, '-')}</td> :
<td>
<div> {data?.comprehensive?.lossSharp} </div>
<div> {data?.comprehensive?.lossPeak} </div>
<div> {data?.comprehensive?.lossFlat} </div>
<div> {data?.comprehensive?.lossValley} </div>
</td>
)
}
{
data?.park?.meter04kvType === Meter04KvType.DisableValley ?
<td>{outputWithPrecision(data?.comprehensive?.publicAmount, 2, '-')}</td> :
<td>
<div> {data?.comprehensive?.poolSharp || 0} </div>
<div> {data?.comprehensive?.poolPeak || 0} </div>
<div> {data?.comprehensive?.poolFlat || 0} </div>
<div> {data?.comprehensive?.poolValley || 0} </div>
</td>
}
<td>{outputWithPrecision(
`${(data?.park?.meter04kvType === 0 ? amount?.current : data?.comprehensive?.finalAmount) || 0}`, 2, '-')}</td>
</tr>
}, [data?.meters, data?.park?.meter04kvType, data?.comprehensive])
})
}, [data?.meters])
return (
<>
@ -243,20 +109,16 @@ export const UserReport: FC = () => {
td {
padding: 0.2cm
}
${
data?.park?.meter04kvType === Meter04KvType.DisableValley ? ` tr td:nth-child(1) {
width: 4.5cm;
}` : ` tr td:nth-child(1) {
width: 2cm;
}`
}
tr td:nth-child(2), tr td:nth-child(3), tr td:nth-child(4) {
width: 1.5cm;
tr td:nth-child(1) {
width: 3.5cm;
}
tr td:nth-child(5), tr td:nth-child(6), tr td:nth-child(7), tr td:nth-child(8), tr td:nth-child(9), tr td:nth-child(10) {
tr td:nth-child(2) {
width: 4.5cm;
}
tr td:nth-child(3), tr td:nth-child(4), tr td:nth-child(5) {
width: 1.8cm;
}
tr td:nth-child(6), tr td:nth-child(7), tr td:nth-child(8), tr td:nth-child(9) {
width: 2cm;
}
#content, .ant-col {
@ -353,13 +215,9 @@ export const UserReport: FC = () => {
<h4 tw='mt-1 mb-1'> </h4>
<div> {
outputWithPrecision(
`${Number((data?.park?.meter04kvType === 0 ? amount?.current : data?.comprehensive?.finalAmount) || 0)}`, 2, '-')} &nbsp;&nbsp;
`${Number(amount.current || 0)}`, 2, '-')} &nbsp;&nbsp;
</div>
</Card>
<Card style={{marginLeft: 20}}>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.total, 2, '-')} &nbsp;&nbsp;</div>
</Card>
</div>
<div tw='mt-3'>
@ -395,11 +253,11 @@ export const UserReport: FC = () => {
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.publicAmount, 2, '-')} &nbsp;&nbsp;</div>
</Card>
{/*<Unit> - </Unit>*/}
{/*<Card>*/}
{/* <h4 tw='mt-1 mb-1'> 退补电量: </h4>*/}
{/* <div> {outputWithPrecision(data?.comprehensive?.publicAmount, 2, '-')} &nbsp;&nbsp;千瓦时</div>*/}
{/*</Card>*/}
<Unit> - </Unit>
<Card>
<h4 tw='mt-1 mb-1'> 退 </h4>
<div> {outputWithPrecision(data?.comprehensive?.publicAmount, 2, '-')} &nbsp;&nbsp;</div>
</Card>
<Unit> </Unit><Unit> * </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
@ -408,19 +266,19 @@ export const UserReport: FC = () => {
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.basicPooled, 2, '-')} </div>
<div> {outputWithPrecision(data?.comprehensive?.basicPooled, 2, '-')} </div>
</Card>
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.adjustPooled, 2, '-')} </div>
</Card>
{/*<Unit> + </Unit>*/}
{/*<Card>*/}
{/* <h4 tw='mt-1 mb-1'> 调整电费: </h4>*/}
{/* <div> {outputWithPrecision(data?.comprehensive?.adjustPooled, 2, '-')} 元</div>*/}
{/*</Card>*/}
</div>
<div tw='flex flex-row items-center' style={{height: '100%', flex: 1}}>
<Unit> = </Unit>
<Card style={{height: 200}}>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.total, 2, '-')} </div>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.total, 2, '-')} </div>
</Card>
</div>
</div>
@ -433,7 +291,7 @@ export const UserReport: FC = () => {
<div tw='flex flex-row items-center flex-wrap'>
<Unit> </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.sharpAmount, 2, '-')} &nbsp;&nbsp;</div>
</Card>
{
@ -441,7 +299,7 @@ export const UserReport: FC = () => {
<>
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> 线 </h4>
<h4 tw='mt-1 mb-1'> 线 </h4>
<div> {outputWithPrecision(data?.comprehensive?.lossSharp, 2, '-')} &nbsp;&nbsp;</div>
</Card>
</>
@ -450,29 +308,34 @@ export const UserReport: FC = () => {
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.poolSharp || '0', 2, '-')} &nbsp;&nbsp;</div>
</Card>
{/*<Unit> - </Unit>*/}
{/*<Card>*/}
{/* <h4 tw='mt-1 mb-1'> 退补电量(尖): </h4>*/}
{/* <div> {outputWithPrecision(data?.comprehensive?.refundSharp, 2, '-')} &nbsp;&nbsp;千瓦时</div>*/}
{/*</Card>*/}
<Unit> - </Unit>
<Card>
<h4 tw='mt-1 mb-1'> 退 </h4>
<div> {outputWithPrecision(data?.comprehensive?.refundSharp, 2, '-')} &nbsp;&nbsp;</div>
</Card>
<Unit> </Unit><Unit> * </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.priceSharp, 6, '-')} &nbsp;&nbsp;/</div>
</Card>
<Unit> = </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.finalSharpFee, 2, '-')} &nbsp;&nbsp;</div>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(getAmount(
data?.comprehensive?.sharpAmount || "0",
data?.tenement?.feeType === 3 ? "0" : (data?.comprehensive?.lossSharp || "0"),
data?.comprehensive?.refundSharp || "0",
data?.comprehensive?.priceSharp || "0",
), 2, '-')} &nbsp;&nbsp;</div>
</Card>
</div>
<div tw='flex flex-row items-center flex-wrap'>
<Unit> </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.peakAmount, 2, '-')} &nbsp;&nbsp;</div>
</Card>
{
@ -480,7 +343,7 @@ export const UserReport: FC = () => {
<>
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> 线 </h4>
<h4 tw='mt-1 mb-1'> 线 </h4>
<div> {outputWithPrecision(data?.comprehensive?.lossPeak, 2, '-')} &nbsp;&nbsp;</div>
</Card>
</>
@ -489,29 +352,34 @@ export const UserReport: FC = () => {
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.poolPeak, 2, '-')} &nbsp;&nbsp;</div>
</Card>
{/*<Unit> - </Unit>*/}
{/*<Card>*/}
{/* <h4 tw='mt-1 mb-1'> 退补电量(峰): </h4>*/}
{/* <div> {outputWithPrecision(data?.comprehensive?.refundPeak, 2, '-')} &nbsp;&nbsp;千瓦时</div>*/}
{/*</Card>*/}
<Unit> - </Unit>
<Card>
<h4 tw='mt-1 mb-1'> 退 </h4>
<div> {outputWithPrecision(data?.comprehensive?.refundPeak, 2, '-')} &nbsp;&nbsp;</div>
</Card>
<Unit> </Unit><Unit> * </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.pricePeak, 6, '-')} &nbsp;&nbsp;/</div>
</Card>
<Unit> = </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.finalPeakFee, 2, '-')} &nbsp;&nbsp;</div>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(getAmount(
data?.comprehensive?.peakAmount || "0",
data?.tenement?.feeType === 3 ? "0" : (data?.comprehensive?.lossPeak || "0"),
data?.comprehensive?.refundPeak || "0",
data?.comprehensive?.pricePeak || "0",
), 2, '-')} &nbsp;&nbsp;</div>
</Card>
</div>
<div tw='flex flex-row items-center flex-wrap'>
<Unit> </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.flatAmount, 2, '-')} &nbsp;&nbsp;</div>
</Card>
{
@ -519,7 +387,7 @@ export const UserReport: FC = () => {
<>
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> 线 </h4>
<h4 tw='mt-1 mb-1'> 线 </h4>
<div> {outputWithPrecision(data?.comprehensive?.lossFlat, 2, '-')} &nbsp;&nbsp;</div>
</Card>
</>
@ -528,29 +396,34 @@ export const UserReport: FC = () => {
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.poolFlat, 2, '-')} &nbsp;&nbsp;</div>
</Card>
{/*<Unit> - </Unit>*/}
{/*<Card>*/}
{/* <h4 tw='mt-1 mb-1'> 退补电量(平): </h4>*/}
{/* <div> {outputWithPrecision(data?.comprehensive?.refundFlat, 2, '-')} &nbsp;&nbsp;千瓦时</div>*/}
{/*</Card>*/}
<Unit> - </Unit>
<Card>
<h4 tw='mt-1 mb-1'> 退 </h4>
<div> {outputWithPrecision(data?.comprehensive?.refundFlat, 2, '-')} &nbsp;&nbsp;</div>
</Card>
<Unit> </Unit><Unit> * </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.priceFlat, 6, '-')} &nbsp;&nbsp;/</div>
</Card>
<Unit> = </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.finalFlatFee, 2, '-')} &nbsp;&nbsp;</div>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(getAmount(
data?.comprehensive?.flatAmount || "0",
data?.tenement?.feeType === 3 ? "0" : (data?.comprehensive?.lossFlat || "0"),
data?.comprehensive?.refundFlat || "0",
data?.comprehensive?.priceFlat || "0",
), 2, '-')} &nbsp;&nbsp;</div>
</Card>
</div>
<div tw='flex flex-row items-center flex-wrap'>
<Unit> </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.valleyAmount, 2, '-')} &nbsp;&nbsp;</div>
</Card>
{
@ -558,7 +431,7 @@ export const UserReport: FC = () => {
<>
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> 线 </h4>
<h4 tw='mt-1 mb-1'> 线 </h4>
<div> {outputWithPrecision(data?.comprehensive?.lossValley, 2, '-')} &nbsp;&nbsp;</div>
</Card>
</>
@ -567,53 +440,74 @@ export const UserReport: FC = () => {
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.poolValley, 2, '-')} &nbsp;&nbsp;</div>
</Card>
{/*<Unit> - </Unit>*/}
{/*<Card>*/}
{/* <h4 tw='mt-1 mb-1'> 退补电量(谷): </h4>*/}
{/* <div> {outputWithPrecision(data?.comprehensive?.refundValley, 2, '-')} &nbsp;&nbsp;千瓦时</div>*/}
{/*</Card>*/}
<Unit> - </Unit>
<Card>
<h4 tw='mt-1 mb-1'> 退 </h4>
<div> {outputWithPrecision(data?.comprehensive?.refundValley, 2, '-')} &nbsp;&nbsp;</div>
</Card>
<Unit> </Unit><Unit> * </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.priceValley, 6, '-')} &nbsp;&nbsp;/</div>
</Card>
<Unit> = </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.finalValleyFee, 2, '-')} &nbsp;&nbsp;</div>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(getAmount(
data?.comprehensive?.valleyAmount || "0",
data?.tenement?.feeType === 3 ? "0" : (data?.comprehensive?.lossValley || "0"),
data?.comprehensive?.refundValley || "0",
data?.comprehensive?.priceValley || "0",
), 2, '-')} &nbsp;&nbsp;</div>
</Card>
</div>
<div tw='flex flex-row items-center flex-wrap'>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.finalSharpFee, 2, '-')}
</div>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(getAmount(
data?.comprehensive?.sharpAmount || "0",
data?.tenement?.feeType === 3 ? "0" : (data?.comprehensive?.lossSharp || "0"),
data?.comprehensive?.refundSharp || "0",
data?.comprehensive?.priceSharp || "0",
), 2, '-')} </div>
</Card>
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.finalPeakFee, 2, '-')}
</div>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(getAmount(
data?.comprehensive?.peakAmount || "0",
data?.tenement?.feeType === 3 ? "0" : (data?.comprehensive?.lossPeak || "0"),
data?.comprehensive?.refundPeak || "0",
data?.comprehensive?.pricePeak || "0",
), 2, '-')} </div>
</Card>
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.finalFlatFee, 2, '-')}
</div>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(getAmount(
data?.comprehensive?.flatAmount || "0",
data?.tenement?.feeType === 3 ? "0" : (data?.comprehensive?.lossFlat || "0"),
data?.comprehensive?.refundFlat || "0",
data?.comprehensive?.priceFlat || "0",
), 2, '-')}</div>
</Card>
<Unit> + </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.finalValleyFee, 2, '-')}
</div>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(getAmount(
data?.comprehensive?.valleyAmount || "0",
data?.tenement?.feeType === 3 ? "0" : (data?.comprehensive?.lossValley || "0"),
data?.comprehensive?.refundValley || "0",
data?.comprehensive?.priceValley || "0",
), 2, '-')}</div>
</Card>
<Unit> = </Unit>
<Card>
<h4 tw='mt-1 mb-1'> </h4>
<div> {outputWithPrecision(data?.comprehensive?.total, 2, '-')} &nbsp;&nbsp;</div>
<div> {outputWithPrecision(data?.comprehensive?.total, 2, '-')} &nbsp;&nbsp;</div>
</Card>
</div>
{/*<div tw='flex flex-row items-center' style={{height: '100%', flex: 1}}>*/}
@ -630,24 +524,17 @@ export const UserReport: FC = () => {
<div>
<div tw='mt-4'>
<span style={{marginLeft: 20}}>
=-*-退-
=+线+
</span>
<Divider tw='mt-2 mb-4 flex flex-col w-full'/>
</div>
<div tw="mt-3" style={{fontSize: 12}}>
<table border={1} width={"100%"} cellSpacing="0">
<thead>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>退</td>
<td></td>
<td></td>
{/* <td>线损占比</td> */}
{
@ -655,13 +542,13 @@ export const UserReport: FC = () => {
<td>线</td>
)
}
<td>退</td>
<td></td>
<td></td>
</tr>
</thead>
<tbody>
{renderTable()}
{renderTableSum()}
</tbody>
</table>
@ -673,6 +560,7 @@ export const UserReport: FC = () => {
</ContentArea>
</div>
</>
);

View File

@ -8,7 +8,7 @@ import { isNil } from 'ramda';
import { MaybeMapFactory } from '@/shared/foundation';
let engineCache: AxiosInstance | null = null;
export const baseUrl = '/api'
export const baseUrl = '/api3'
/**
* 使AJAX引擎
* @param forceUnauthorized

View File

@ -104,7 +104,7 @@ export default mode => {
})
],
envDir: './',
// publicDir: "/user-report",
publicDir: "/user-report",
base: './',
server: {
port: 3000,