From f5183ebe60eada8f9768a08b15f03331c9654757 Mon Sep 17 00:00:00 2001
From: wanghx
Date: Mon, 15 Jan 2024 10:45:46 +0800
Subject: [PATCH] =?UTF-8?q?feat()=EF=BC=9A=E5=85=A8=E5=B1=80=E5=AF=BC?=
=?UTF-8?q?=E5=87=BA=E7=BB=9F=E4=B8=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../FinancialReport/BookReport/loadable.jsx | 4 +--
.../FinancialReport/OperationReport/loadable.jsx | 26 +++++++++++++---
.../ParkingIncomeReport/loadable.jsx | 27 ++++++++++++++---
.../FinancialReport/PaySummaryReport/loadable.jsx | 25 +++++++++++++---
.../OrderInquiry/ParkingOrderInquiry/index.jsx | 1 +
src/pages/FinancialMgm/PayRecordTotal/loadable.jsx | 25 ++++++++++++----
.../FinancialMgm/SettleBill/PayRepeat/loadable.jsx | 35 ++++++++++++++++------
.../CallbackSuggestion/loadable.jsx | 28 +++++++++++++----
.../CustomerServieMgm/ComplainManage/index.scss | 5 ++++
.../CustomerServieMgm/ComplainManage/loadable.jsx | 26 ++++++++++++----
.../CouponMgm/WriteOffDetail/loadable.jsx | 30 ++++++++++++++++---
.../CouponMgm/WriteOffStat/loadable.jsx | 33 ++++++++++++++++----
.../ParkingCard/ParkingCardOrder/loadable.jsx | 25 ++++++++++++----
.../Staggered/StaggeredOrder/loadable.jsx | 28 +++++++++++++----
.../Staggered/StaggeredStat/loadable.jsx | 28 +++++++++++++----
.../OutParkingArrearsOrders/loadable.jsx | 1 +
.../OutBusinessRecord/OutPayOrders/loadable.jsx | 1 +
.../OutRoadMgm/OutSegmentMgm/OutSegment/index.scss | 1 +
.../OutSegmentMgm/OutSegment/loadable.jsx | 24 +++++++++++++--
19 files changed, 308 insertions(+), 65 deletions(-)
diff --git a/src/pages/FinancialMgm/FinancialReport/BookReport/loadable.jsx b/src/pages/FinancialMgm/FinancialReport/BookReport/loadable.jsx
index 22997df..056d45c 100644
--- a/src/pages/FinancialMgm/FinancialReport/BookReport/loadable.jsx
+++ b/src/pages/FinancialMgm/FinancialReport/BookReport/loadable.jsx
@@ -740,14 +740,14 @@ function BookReport() {
共查询到 {Data?.total || 0}条数据
- {
// Data?.total && setFormDatas({ ...FormData });
}}
>
导出
-
+ */}
{
+ const ReportPaySummaryReport = (start, end) => {
ajax.ElectInvoice.getOperationReport({
...FormDatas,
+ start: start,
+ end: end,
area: FormDatas?.area?.length
? FormDatas?.area[FormDatas.area.length - 1]
: "",
@@ -604,8 +608,10 @@ function OperationReport() {
(res) => {
if (parseInt(res?.status) === 20000) {
Daownload(res?.data?.url);
+ exportRef.current.handleCancel()
} else {
message.error(res?.message);
+ exportRef.current.handleError()
}
},
(err) => {
@@ -1014,7 +1020,7 @@ function OperationReport() {
共查询到 {Data?.total || 0}条数据
- {
Data?.total && ReportPaySummaryReport();
@@ -1022,7 +1028,19 @@ function OperationReport() {
}}
>
导出
-
+ */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={Data?.total}
+ imgno={false}
+ postdata={{
+ formData: FormData
+ }}
+ isTableModule={true}
+ onOk={ReportPaySummaryReport}
+ />
{
+ const ReportPaySummaryReport = (start, end) => {
ajax.ElectInvoice.getParkingIncomeReport({
...FormDatas,
+ start: start,
+ end: end,
area: FormDatas?.area?.length
? FormDatas?.area[FormDatas.area.length - 1]
: "",
@@ -546,8 +551,10 @@ function ParkingIncomeReport() {
(res) => {
if (parseInt(res?.status) === 20000) {
Daownload(res?.data?.url);
+ exportRef.current.handleCancel()
} else {
message.error(res?.message);
+ exportRef.current.handleError()
}
},
(err) => {
@@ -930,7 +937,7 @@ function ParkingIncomeReport() {
共查询到 {Data?.total || 0}条数据
- {
Data?.total && ReportPaySummaryReport();
@@ -938,7 +945,19 @@ function ParkingIncomeReport() {
}}
>
导出
-
+ */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={Data?.total}
+ imgno={false}
+ postdata={{
+ formData: FormData
+ }}
+ isTableModule={true}
+ onOk={ReportPaySummaryReport}
+ />
{
+ const ReportPaySummaryReport = (start, end) => {
ajax.ElectInvoice.ReportPaySummaryReport({
...FormDatas,
+ start: start,
+ end: end,
...DateFormt(FormDatas.type),
type: TimeChange().str,
}).then(
(res) => {
if (parseInt(res?.status) === 20000) {
Daownload(res?.data?.url);
+ exportRef.current.handleCancel()
} else {
message.error(res?.message);
+ exportRef.current.handleError()
}
},
(err) => {
@@ -687,7 +692,7 @@ function PaySummaryReport() {
共查询到 {Data?.total || 0}条数据
- {
Data?.total && ReportPaySummaryReport();
@@ -695,7 +700,19 @@ function PaySummaryReport() {
}}
>
导出
-
+ */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={Data?.total}
+ imgno={false}
+ postdata={{
+ formData: FormData
+ }}
+ isTableModule={true}
+ onOk={ReportPaySummaryReport}
+ />
diff --git a/src/pages/FinancialMgm/PayRecordTotal/loadable.jsx b/src/pages/FinancialMgm/PayRecordTotal/loadable.jsx
index 6525450..7d47f49 100644
--- a/src/pages/FinancialMgm/PayRecordTotal/loadable.jsx
+++ b/src/pages/FinancialMgm/PayRecordTotal/loadable.jsx
@@ -1,5 +1,5 @@
-import React, { useState, useEffect } from "react";
-import { ResultFlowResult } from "@/components";
+import React, { useState, useEffect, useRef } from "react";
+import { ResultFlowResult, ExportBtnNew } from "@/components";
import { Select, Input, Button, Table, message, Pagination, DatePicker, Tooltip } from "antd";
import { useSessionStorageState } from "ahooks";
import { dictionary } from "@/config/common";
@@ -62,6 +62,7 @@ function PayRecordTotal(props) {
value: {
}
})
+ const exportRef = useRef(null)
useEffect(() => {
if (sessionTabList && Object.values(sessionTabList).length > 0) {
setFormData({
@@ -280,7 +281,7 @@ function PayRecordTotal(props) {
};
// 导出
- const handleExport = () => {
+ const handleExport = (start, end) => {
if (resultData.list?.length > 0) {
let { pn, page_size, ...params } = defaultParams;
ajax.getPayRecordTotalListExport(params).then(
@@ -289,8 +290,10 @@ function PayRecordTotal(props) {
//window.location.href = res.data?.url
window.open(res.data?.url)
message.success(res?.message);
+ exportRef.current.handleCancel()
} else {
message.error(res?.message);
+ exportRef.current.handleError()
}
},
(err) => {
@@ -439,9 +442,21 @@ function PayRecordTotal(props) {
条结果
- */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={resultData.total}
+ imgno={false}
+ postdata={{
+ formData: formData
+ }}
+ isTableModule={true}
+ onOk={handleExport}
+ />
{
+ const ReportPaySummaryReport = (start, end) => {
ajax.ElectInvoice.ReportPayRepeat({
...FormDatas,
+ start: start,
+ end: end
}).then(
(res) => {
if (parseInt(res?.status) === 20000) {
Daownload(res?.data?.url);
+ exportRef.current.handleCancel()
} else {
message.error(res?.message);
+ exportRef.current.handleError()
}
},
(err) => {
@@ -872,14 +877,26 @@ function PayRepeat() {
共查询到 {Data?.total || 0}条数据
{FormData.type == 1 ? (
- {
- Data?.total && ReportPaySummaryReport();
+ // {
+ // Data?.total && ReportPaySummaryReport();
+ // }}
+ // >
+ // 导出
+ //
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={Data?.total}
+ imgno={false}
+ postdata={{
+ formData: FormData
}}
- >
- 导出
-
+ isTableModule={true}
+ onOk={ReportPaySummaryReport}
+ />
) : (
""
)}
diff --git a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx
index 24a5e7b..fac1251 100644
--- a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx
+++ b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx
@@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect } from "react";
-import { ResultFlowResult, QuickMenu } from "@/components"
+import { ResultFlowResult, QuickMenu, ExportBtnNew } from "@/components"
import { Select, Button, Table, message, Pagination, Input, Modal, Image, DatePicker, Space, Upload } from 'antd'
import {
pageSizeOptions
@@ -36,6 +36,7 @@ function CallbackSuggestion(props) {
const [imgVisible, setImgVisible] = useState(false)
const [orderVisible, setOrderVisible] = useState(false)
const [evidenceVisible, setEvidenceVisible] = useState(false)
+ const exportRef = useRef(null)
//物品型号
const handleAdviseType = (value) => {
@@ -515,12 +516,17 @@ function CallbackSuggestion(props) {
}
}
- const exportData = () => {
+ const exportData = (start, end) => {
let data = {
- ...formData
+ ...formData,
+ start: start,
+ end: end
}
ajax.exportDataList(data).then(res => {
window.open(res.data.export_url)
+ exportRef.current.handleCancel()
+ }).catch(err => {
+ exportRef.current.handleError()
})
}
const checkPic = () => {
@@ -644,9 +650,21 @@ function CallbackSuggestion(props) {
共检索到{resultData.total_records}条结果
- { exportData() }}>
+ {/* { exportData() }}>
导出
-
+ */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={resultData.total_records}
+ imgno={false}
+ postdata={{
+ formData: formData
+ }}
+ isTableModule={true}
+ onOk={exportData}
+ />
{
- let data = { ...holdData, ...pageInfo };
+ const exportData = (start, end) => {
+ let data = { ...holdData, ...pageInfo, start: start, end: end };
ajax.getComplainExport(data).then((res) => {
if (res?.data?.url) {
window.open(res.data.url);
+ exportRef.current.handleCancel()
} else {
message.error("导出异常");
+ exportRef.current.handleError()
}
});
};
@@ -1548,14 +1552,26 @@ function ComplainManage(props) {
>
设置
- {
exportData();
}}
>
导出
-
+ */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={resultData.total}
+ imgno={false}
+ postdata={{
+ formData: formData
+ }}
+ isTableModule={true}
+ onOk={exportData}
+ />
{
+ const exportData=(start, end)=>{
let data={
- ...formData
+ ...formData,
+ start: start,
+ end: end
}
ajax.handleOffExport(data).then(res => {
window.open(res.data.url)
+ exportRef.current.handleCancel()
+ }).catch(err => {
+ exportRef.current.handleError()
})
}
+ const handleExport = (start, end) => {
+ exportData(start, end)
+ }
+
useEffect(()=>{
// getOffList()
getCouponOptions()
@@ -357,7 +367,19 @@ function WriteOffDetail() {
{resultData.total}
条结果
- 导出
+ {/* 导出 */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={resultData.total}
+ imgno={false}
+ postdata={{
+ formData: formData
+ }}
+ isTableModule={true}
+ onOk={handleExport}
+ />
{
+ exportData(start, end)
+ }
+
//切换分页
const changePn = (pn, length) => {
if (lastFormData.size === length) {
@@ -141,12 +147,17 @@ function WriteOffStat(props) {
}
//导出
- const exportData=()=>{
+ const exportData=(start, end)=>{
let data={
- ...formData
+ ...formData,
+ start: start,
+ end: end
}
ajax.handleCountExport(data).then(res => {
window.open(res.data.url)
+ exportRef.current.handleCancel()
+ }).catch(err => {
+ exportRef.current.handleError()
})
}
@@ -225,9 +236,21 @@ function WriteOffStat(props) {
共检索到{resultData.total}条结果
- { exportData() }}>
+ {/* { exportData() }}>
导出
-
+ */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={resultData.total}
+ imgno={false}
+ postdata={{
+ formData: formData
+ }}
+ isTableModule={true}
+ onOk={handleExport}
+ />
diff --git a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx
index 56154a1..997e48b 100644
--- a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx
+++ b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx
@@ -3,7 +3,7 @@ import { Select, Input, Popconfirm,Button, Table, message, DatePicker, Paginatio
import {
pageSizeOptions
} from '@/config/character.config.js'
-import { ResultFlowResult } from "@/components"
+import { ResultFlowResult, ExportBtnNew } from "@/components"
import { SearchOutlined, PlusOutlined,VerticalAlignBottomOutlined } from '@ant-design/icons';
import moment from 'moment'
import { useSetState,} from 'ahooks';
@@ -156,6 +156,7 @@ function ParkingCardOrder() {
})
const [lastFormData, setLastFormData] = useState(formData)
+ const exportRef = useRef(null)
const lastFormDataRef = useRef(formData)
@@ -292,17 +293,19 @@ function ParkingCardOrder() {
};
// 导出
- const ReportPaySummaryReport = () => {
+ const ReportPaySummaryReport = (start, end) => {
if(!resultData.total){
message.warning("暂无数据")
return
}
- ajax.exportOrder(formData).then(res => {
+ ajax.exportOrder({...formData, start: start, end: end}).then(res => {
if (parseInt(res?.status) === 20000){
Donwload(res.data?.url)
+ exportRef.current.handleCancel()
}
else {
message.error(res?.message);
+ exportRef.current.handleError()
}
}).catch(e =>
console.log(e))
@@ -675,14 +678,26 @@ function ParkingCardOrder() {
style={{width:110}}>
添加
- { ReportPaySummaryReport()}}
// style={{background:"#fff",color:'#59b7ff',height:'100%'}}
>
导出
-
+ */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={resultData.total}
+ imgno={false}
+ postdata={{
+ formData: formData
+ }}
+ isTableModule={true}
+ onOk={ReportPaySummaryReport}
+ />
diff --git a/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/loadable.jsx b/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/loadable.jsx
index bafa9d2..cc9bf43 100644
--- a/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/loadable.jsx
+++ b/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/loadable.jsx
@@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect } from "react";
-import { ResultFlowResult } from "@/components"
+import { ResultFlowResult, ExportBtnNew } from "@/components"
import { Select, Input, Button, Table, message, TreeSelect, Pagination, DatePicker, Cascader, Popover, Modal } from 'antd'
import {
pageSizeOptions
@@ -37,6 +37,7 @@ function StaggeredOrder(props) {
const [lastFormData, setLastFormData] = useState(formData)
const lastFormDataRef = useRef(formData)
const [editVisible, setEditVisible] = useState(false)
+ const exportRef = useRef(null)
//停车场名称
@@ -69,12 +70,17 @@ function StaggeredOrder(props) {
}
//导出
- const exportData = () => {
+ const exportData = (start, end) => {
let data = {
- ...formData
+ ...formData,
+ start: start,
+ end: end
}
ajax.getExportOrder(data).then(res => {
window.open(res.data.url)
+ exportRef.current.handleCancel()
+ }).catch(err => {
+ exportRef.current.handleError()
})
}
//列表
@@ -355,9 +361,21 @@ function StaggeredOrder(props) {
共检索到{resultData.total_records}条结果
- { exportData() }}>
+ {/* { exportData() }}>
导出
-
+ */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={resultData.total_records}
+ imgno={false}
+ postdata={{
+ formData: formData
+ }}
+ isTableModule={true}
+ onOk={exportData}
+ />
{
@@ -50,12 +51,17 @@ function StaggeredStat(props) {
};
//导出
- const exportData = () => {
+ const exportData = (start, end) => {
let data = {
- ...formData
+ ...formData,
+ start: start,
+ end: end
}
ajax.getStaggeredStatExport(data).then(res => {
window.open(res.data.url)
+ exportRef.current.handleCancel()
+ }).catch(err => {
+ exportRef.current.handleError()
})
}
//列表
@@ -233,9 +239,21 @@ function StaggeredStat(props) {
共检索到{resultData.total_records}条结果
- { exportData() }}>
+ {/* { exportData() }}>
导出
-
+ */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={resultData.total_records}
+ imgno={false}
+ postdata={{
+ formData: formData
+ }}
+ isTableModule={true}
+ onOk={exportData}
+ />
>
diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/index.scss b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/index.scss
index 5936f86..226d76f 100644
--- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/index.scss
+++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/index.scss
@@ -20,6 +20,7 @@ $color-primary: var(--color-primary);
height: 100%;
.header-button {
+ display: flex;
button {
margin: 0 3px;
}
diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx
index a7cb763..bb1c50a 100644
--- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx
+++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx
@@ -26,7 +26,7 @@ import {
useUpdate,
} from "ahooks";
import ajax from "@/services";
-import { TableModule, ResultFlow } from "@/components";
+import { TableModule, ResultFlow, ExportBtnNew } from "@/components";
import Detail from "./Detail";
import AddParking from "./AddParking";
import "./index.scss";
@@ -216,6 +216,7 @@ function OutSegment() {
pn: 1,
page_size: 15,
});
+ const exportRef = useRef(null);
const tableRef = useRef(null);
const [appraise, setAppraise] = useState({})
const [loading, setLoading] = useState(false);
@@ -394,12 +395,14 @@ function OutSegment() {
}
}, [formData])
// 导出
- const handleExport = () => {
+ const handleExport = (start, end) => {
if (tableData.length > 0) {
let values = searchForm.getFieldsValue();
let end = values.area?.length > 0 ? values.area.slice(-1) : null;
let params = {
...values,
+ start: start,
+ end: end,
//area_id: values.area?.length > 0 ? end : areaId,
area_id: sessionTabList?.area,
};
@@ -410,12 +413,15 @@ function OutSegment() {
(res) => {
if (res) {
window.open(res.data.export_url)
+ tableRef.current.handleCancel()
} else {
message.error(res?.message);
+ tableRef.current.handleError()
}
},
(err) => {
console.log(err);
+ tableRef.current.handleError()
}
);
} else {
@@ -614,7 +620,19 @@ function OutSegment() {
>
评价批量配置
- 导出
+ {/* 导出 */}
+ 导出}
+ modalType="noImg"
+ ref={exportRef}
+ totalRecords={total}
+ imgno={false}
+ postdata={{
+ formData: formData
+ }}
+ isTableModule={true}
+ onOk={handleExport}
+ />