表根据后端列表显示
后端有一个列表。传入列表是发票列表。我在2个不同的选项卡中显示这些发票,如付费和未付款。付费发票的“状态3”。付费发票的“状态6”。有时没有出色的发票。在这种情况下,我想删除未付费发票表,并用通知消息替换。
付款info.js
在这里您可以看到两个不同的选项卡
<TabPanel value={value} index={0} >
<PaymentTable variant="edit" paymentList={paymentInfoData} value={value} collectionMethod={collectionMethod} />
<div className={hiddenControlButtonClass}>
<AS.Button variant="outlined" onClick={handlePayment}>
Continue
</AS.Button>
</div>
</TabPanel>
<TabPanel value={value} index={1}>
<PaymentTable variant="read" paymentList={paymentInfoData} value={value} />
</TabPanel>
payment-table.js
props.paymentlist.policyinstallmentdtolist =项目
if (props.value === 0 && item.status !== '3') { ... //unpaid bills
}
if (props.value === 0 && !props.paymentInfoData?.policyInstallmentDtoList?.some((e) => e['status'] === '6')) {
return (
<div>You do not have any outstanding invoices</div>
);
} // I tried to print a message if there is no unpaid invoice by navigating the incoming list here.
if (props.value === 1 && item.status === '3') { ... //paid invoice
}
它缩写了如何打印消息?
如果没有未付费发票,
There is a list from the backend. The incoming list is the invoices list. I show these invoices in 2 different tabs as paid and unpaid. "status 3" of paid invoices. "status 6" of paid invoices. Sometimes there are no outstanding invoices. In this case, I want to remove the unpaid invoices table and replace it with a notification message.
payment-info.js
Here you can see two different tabs
<TabPanel value={value} index={0} >
<PaymentTable variant="edit" paymentList={paymentInfoData} value={value} collectionMethod={collectionMethod} />
<div className={hiddenControlButtonClass}>
<AS.Button variant="outlined" onClick={handlePayment}>
Continue
</AS.Button>
</div>
</TabPanel>
<TabPanel value={value} index={1}>
<PaymentTable variant="read" paymentList={paymentInfoData} value={value} />
</TabPanel>
payment-table.js
props.paymentList.policyInstallmentDtoList = item
if (props.value === 0 && item.status !== '3') { ... //unpaid bills
}
if (props.value === 0 && !props.paymentInfoData?.policyInstallmentDtoList?.some((e) => e['status'] === '6')) {
return (
<div>You do not have any outstanding invoices</div>
);
} // I tried to print a message if there is no unpaid invoice by navigating the incoming list here.
if (props.value === 1 && item.status === '3') { ... //paid invoice
}
Since there are too many lines in if blocks, I wrote it abbreviated
How do I print the message if there is no unpaid invoice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论