财务统计上月数据现在是真实的

main
wuyize 2023-01-09 11:39:53 +08:00
parent 439d924a03
commit abe3bc4af0
2 changed files with 13 additions and 6 deletions

View File

@ -112,6 +112,8 @@ function FormModal(props: any) {
const [invoice, setInvoice] = useState({}) const [invoice, setInvoice] = useState({})
const [formItems, setFormItems] = useState(undefined) const [formItems, setFormItems] = useState(undefined)
const [form] = Form.useForm(); const [form] = Form.useForm();
const [messageApi, contextHolder] = message.useMessage();
useEffect(() => { useEffect(() => {
//setOpen(props.open) //setOpen(props.open)
console.log(props.invoiceIdentifyResponse) console.log(props.invoiceIdentifyResponse)
@ -150,6 +152,10 @@ function FormModal(props: any) {
}).catch(function (error) { }).catch(function (error) {
console.log(error) console.log(error)
setLoading(false) setLoading(false)
messageApi.open({
type: 'error',
content: error.response.data.msg,
});
}) })
} }
@ -247,6 +253,7 @@ function FormModal(props: any) {
<TextArea/> <TextArea/>
</Form.Item> </Form.Item>
</Form> </Form>
{contextHolder}
</Modal> </Modal>
) )
} }

View File

@ -157,13 +157,13 @@ function StatView() {
}).then(response => { }).then(response => {
const statResponse: StatResponse = response.data const statResponse: StatResponse = response.data
setReimbursementAmount(statResponse.reimbursementAllTotalAmount / 100.) setReimbursementAmount(statResponse.reimbursementAllTotalAmount / 100.)
setReimbursementAmountTrend(13.74) // setReimbursementAmountTrend(13.74)
/*setReimbursementAmountTrend( setReimbursementAmountTrend(
(statResponse.reimbursementAllTotalAmount - statResponse.lastAllTotalAmount) / statResponse.lastAllTotalAmount)*/ (statResponse.reimbursementAllTotalAmount - statResponse.lastAllTotalAmount) / statResponse.lastAllTotalAmount)
setReimbursementAdditionalAmount(statResponse.reimbursementAdditionalTotalAmount / 100.) setReimbursementAdditionalAmount(statResponse.reimbursementAdditionalTotalAmount / 100.)
setReimbursementAdditionalAmountTrend(-5.31) // setReimbursementAdditionalAmountTrend(-5.31)
/* setReimbursementAdditionalAmountTrend( setReimbursementAdditionalAmountTrend(
(statResponse.reimbursementAdditionalTotalAmount - statResponse.lastAdditionalTotalAmount) / statResponse.lastAdditionalTotalAmount)*/ (statResponse.reimbursementAdditionalTotalAmount - statResponse.lastAdditionalTotalAmount) / statResponse.lastAdditionalTotalAmount)
setAmounts([statResponse.invoiceLaunchCount, statResponse.reimbursementLaunchCount]) setAmounts([statResponse.invoiceLaunchCount, statResponse.reimbursementLaunchCount])
setInvoiceKinds(statResponse.invoiceKindsStats.map((item) => { setInvoiceKinds(statResponse.invoiceKindsStats.map((item) => {