细节优化
This commit is contained in:
@@ -174,9 +174,10 @@ const DownloadBill: React.FC = () => {
|
||||
setShowFilterPopup(false);
|
||||
};
|
||||
const handleDownloadBill = async () => {
|
||||
const { start, end } = dateRange;
|
||||
if (!start || !end) return;
|
||||
try {
|
||||
const { transaction_sub_type } = load_transactions_params;
|
||||
const { start, end } = dateRange;
|
||||
const date_range = [start, end];
|
||||
const res = await httpService.post("/wallet/download_bill", { transaction_sub_type, date_range });
|
||||
const { fileUrl, fileName } = res.data;
|
||||
@@ -297,7 +298,7 @@ const DownloadBill: React.FC = () => {
|
||||
>
|
||||
下载记录
|
||||
</Text>
|
||||
<Button className="download_button" onClick={handleDownloadBill}>
|
||||
<Button className={`download_button ${!dateRange.start ? 'disabled' : ''}`} onClick={handleDownloadBill}>
|
||||
下载
|
||||
</Button>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user