update
This commit is contained in:
parent
d7338647f1
commit
f3703b1f81
@ -12,6 +12,7 @@ import useRequest from "@ahooksjs/use-request";
|
|||||||
import { handleGetEndaccountHisList, handleGetServiceShopList } from "../service";
|
import { handleGetEndaccountHisList, handleGetServiceShopList } from "../service";
|
||||||
import { getFieldEnumTreeNoSession } from "@/services/options";
|
import { getFieldEnumTreeNoSession } from "@/services/options";
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
|
|
||||||
|
|
||||||
const HistoricalAccounting: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const HistoricalAccounting: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
@ -413,27 +414,29 @@ const HistoricalAccounting: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
}}
|
}}
|
||||||
toolbar={{
|
toolbar={{
|
||||||
actions: [
|
actions: [
|
||||||
<span style={{ visibility: 'hidden' }}>
|
// <span style={{ visibility: 'hidden' }}>
|
||||||
<ReactHTMLTableToExcel
|
// <ReactHTMLTableToExcel
|
||||||
buttonText={'导出excel'}
|
// buttonText={'导出excel'}
|
||||||
ref={downloadBtnRef}
|
// ref={downloadBtnRef}
|
||||||
table="table-to-xls-HistoricalAccounting"
|
// table="table-to-xls-HistoricalAccounting"
|
||||||
filename={`历史账期导出表${searchParams?.StartDate}-${searchParams?.EndDate}`}
|
// filename={`历史账期导出表${searchParams?.StartDate}-${searchParams?.EndDate}`}
|
||||||
sheet="sheet1"
|
// sheet="sheet1"
|
||||||
/>
|
// />
|
||||||
</span>,
|
// </span>,
|
||||||
<Button
|
<Button
|
||||||
key="new"
|
key="new"
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
if (reqDetailList && reqDetailList.length > 0) {
|
if (reqDetailList && reqDetailList.length > 0) {
|
||||||
setShowLoading(true)
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
setTimeout(() => {
|
reqDetailList,
|
||||||
setShowExportTable(true)
|
`历史账期导出表${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
||||||
setTimeout(() => {
|
{
|
||||||
exportTable(e)
|
footerMaker: currentUser?.Name,
|
||||||
}, 100)
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
}, 100)
|
footerStatsTime: `${searchParams?.StartDate}-${searchParams?.EndDate}`
|
||||||
|
}
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -934,6 +934,9 @@ const InventoryCategory: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
`进销存类别报表${searchParams?.InventoryTime ? searchParams?.InventoryTime.split('-')[1] : ""}`,
|
`进销存类别报表${searchParams?.InventoryTime ? searchParams?.InventoryTime.split('-')[1] : ""}`,
|
||||||
{
|
{
|
||||||
topTitle: `进销存类别报表`, // 顶部大标题
|
topTitle: `进销存类别报表`, // 顶部大标题
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1103,6 +1103,9 @@ const InventoryDetails: React.FC<{ currentUser: CurrentUser, isComponents?: any,
|
|||||||
{
|
{
|
||||||
topTitle: `${currentShopInfo?.SERVERPART_NAME}${currentShopInfo?.SHOPNAME}进销存报表`, // 顶部大标题
|
topTitle: `${currentShopInfo?.SERVERPART_NAME}${currentShopInfo?.SHOPNAME}进销存报表`, // 顶部大标题
|
||||||
infoRowLeft: `统计方式:按成本结算(${currentDataType === '1' ? '含税' : '除税'})`,//左侧文字
|
infoRowLeft: `统计方式:按成本结算(${currentDataType === '1' ? '含税' : '除税'})`,//左侧文字
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -521,6 +521,9 @@ const inventoryInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
`库存信息统计表`,
|
`库存信息统计表`,
|
||||||
{
|
{
|
||||||
topTitle: `库存信息统计表`, // 顶部大标题
|
topTitle: `库存信息统计表`, // 顶部大标题
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import Draggable from "react-draggable";
|
|||||||
import InventoryDetails from "../InventoryDetails";
|
import InventoryDetails from "../InventoryDetails";
|
||||||
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
import { formatTreeData } from "@/utils/format";
|
import { formatTreeData } from "@/utils/format";
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
const oneProductMultipleSizes: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const oneProductMultipleSizes: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
@ -979,6 +979,9 @@ const oneProductMultipleSizes: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
`一品多码统计表`,
|
`一品多码统计表`,
|
||||||
{
|
{
|
||||||
topTitle: `一品多码统计表`, // 顶部大标题
|
topTitle: `一品多码统计表`, // 顶部大标题
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -589,6 +589,9 @@ const purchaseReceiving: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
`入库退货统计表${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
`入库退货统计表${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
||||||
{
|
{
|
||||||
topTitle: `入库退货统计表`, // 顶部大标题
|
topTitle: `入库退货统计表`, // 顶部大标题
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.StartDate}-${searchParams?.EndDate}`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -367,6 +367,9 @@ const returnProcess: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
`退货流程统计${searchParams?.CREATEDATE_Start}-${searchParams?.CREATEDATE_End}`,
|
`退货流程统计${searchParams?.CREATEDATE_Start}-${searchParams?.CREATEDATE_End}`,
|
||||||
{
|
{
|
||||||
topTitle: `退货流程统计表`, // 顶部大标题
|
topTitle: `退货流程统计表`, // 顶部大标题
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import { handleNewGetSERVERPARTDetail } from "@/pages/newDataAnalysis/service";
|
|||||||
import { handleGetCASHWORKERDetail, handleGetServerpartShopList, handleSynchroCASHWORKER } from "@/pages/newDataAnalysis/serviceAreaPersonnel/service";
|
import { handleGetCASHWORKERDetail, handleGetServerpartShopList, handleSynchroCASHWORKER } from "@/pages/newDataAnalysis/serviceAreaPersonnel/service";
|
||||||
import { formatTreeData } from "@/utils/format";
|
import { formatTreeData } from "@/utils/format";
|
||||||
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
const servicePartAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const servicePartAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
@ -345,9 +345,11 @@ const servicePartAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`服务区稽核人员管理统计`,
|
`服务区稽核人员管理统计`,
|
||||||
// {
|
{
|
||||||
// topTitle: `库存信息统计表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -473,6 +473,9 @@ const shopProcurement: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
`商品入库统计表${searchParams?.RECEIVECENTER_DATE_Start}-${searchParams?.RECEIVECENTER_DATE_End}`,
|
`商品入库统计表${searchParams?.RECEIVECENTER_DATE_Start}-${searchParams?.RECEIVECENTER_DATE_End}`,
|
||||||
{
|
{
|
||||||
topTitle: `商品入库统计表`, // 顶部大标题
|
topTitle: `商品入库统计表`, // 顶部大标题
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import { handleAddUpdate, handleDelete, handleGetBrandList } from "./service";
|
|||||||
import { getList as handleGetTradeList } from '../BusinessTrade/service'
|
import { getList as handleGetTradeList } from '../BusinessTrade/service'
|
||||||
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
import { formatTreeData } from "@/utils/format";
|
import { formatTreeData } from "@/utils/format";
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
const operatingBrand: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const operatingBrand: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
@ -445,7 +445,9 @@ const operatingBrand: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
reqDetailList,
|
reqDetailList,
|
||||||
`经营品牌列表`,
|
`经营品牌列表`,
|
||||||
{
|
{
|
||||||
// topTitle: `退货流程统计表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -328,9 +328,11 @@ const serviceArea: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`服务区门店统计表`,
|
`服务区门店统计表`,
|
||||||
// {
|
{
|
||||||
// topTitle: `库存信息统计表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -20,7 +20,7 @@ import session from "@/utils/session";
|
|||||||
import { formatTreeData } from "@/utils/format";
|
import { formatTreeData } from "@/utils/format";
|
||||||
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
import { handleNewGetSERVERPARTDetail } from "../service";
|
import { handleNewGetSERVERPARTDetail } from "../service";
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
@ -344,9 +344,11 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`服务区人员管理统计`,
|
`服务区人员管理统计`,
|
||||||
// {
|
{
|
||||||
// topTitle: `库存信息统计表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -1129,6 +1129,9 @@ const RevenueSummaryTable: React.FC<{ currentUser?: CurrentUser }> = (props) =>
|
|||||||
`营收汇总报表${searchParamsTime?.StartDate}-${searchParamsTime?.EndDate}`,
|
`营收汇总报表${searchParamsTime?.StartDate}-${searchParamsTime?.EndDate}`,
|
||||||
{
|
{
|
||||||
// topTitle: `营收汇总报表`, // 顶部大标题
|
// topTitle: `营收汇总报表`, // 顶部大标题
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParamsTime?.StartDate}-${searchParamsTime?.EndDate}`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -469,9 +469,11 @@ const personSellReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`服务区收银员报表${searchParams?.SELL_ENDDATE_Start}-${searchParams?.SELL_ENDDATE_End}`,
|
`服务区收银员报表${searchParams?.SELL_ENDDATE_Start}-${searchParams?.SELL_ENDDATE_End}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `单品销售排行统计`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.SELL_ENDDATE_Start}-${searchParams?.SELL_ENDDATE_End}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -84,7 +84,7 @@ const revenueQOQReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
title: '服务区名称',
|
title: '服务区名称',
|
||||||
width: 170,
|
width: 250,
|
||||||
dataIndex: 'Name',
|
dataIndex: 'Name',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@ -605,9 +605,11 @@ const revenueQOQReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`销售同/环比分析表_${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
`销售同/环比分析表_${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `历史销售单品报表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.StartDate}-${searchParams?.EndDate}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -684,9 +684,11 @@ const revenueYOYQOQReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`销售同环比分析_${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
`销售同环比分析_${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `历史销售单品报表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.StartDate}-${searchParams?.EndDate}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -386,9 +386,11 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
|||||||
reqDetailList,
|
reqDetailList,
|
||||||
// `销售流水查询${searchParams?.SELLMASTER_DATE}`,
|
// `销售流水查询${searchParams?.SELLMASTER_DATE}`,
|
||||||
`销售流水查询${searchParams?.SELLMASTER_DATE_Start}-${searchParams?.SELLMASTER_DATE_End}`,
|
`销售流水查询${searchParams?.SELLMASTER_DATE_Start}-${searchParams?.SELLMASTER_DATE_End}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `单品销售排行统计`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.SELLMASTER_DATE_Start}-${searchParams?.SELLMASTER_DATE_End}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -415,6 +415,9 @@ const saleHisReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
`历史销售单品报表${searchParams?.StartTime}-${searchParams?.EndTime}`,
|
`历史销售单品报表${searchParams?.StartTime}-${searchParams?.EndTime}`,
|
||||||
{
|
{
|
||||||
topTitle: `历史销售单品报表`, // 顶部大标题
|
topTitle: `历史销售单品报表`, // 顶部大标题
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.StartTime}-${searchParams?.EndTime}`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -439,9 +439,12 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`商品销售排名${searchParams?.startDate}-${searchParams?.endDate}`,
|
`商品销售排名${searchParams?.startDate}-${searchParams?.endDate}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `单品销售排行统计`, // 顶部大标题
|
// topTitle: `单品销售排行统计`, // 顶部大标题
|
||||||
// }
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.startDate}-${searchParams?.endDate}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -477,6 +477,9 @@ const saleReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
`单品统计报表${searchParams?.StartTime}-${searchParams?.EndTime}`,
|
`单品统计报表${searchParams?.StartTime}-${searchParams?.EndTime}`,
|
||||||
{
|
{
|
||||||
topTitle: `单品统计报表`, // 顶部大标题
|
topTitle: `单品统计报表`, // 顶部大标题
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.StartTime}-${searchParams?.EndTime}`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -382,9 +382,12 @@ const saleTypeHisReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`类别统计报表${searchParams?.startDate}-${searchParams?.endDate}`,
|
`类别统计报表${searchParams?.startDate}-${searchParams?.endDate}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `历史销售单品报表`, // 顶部大标题
|
// topTitle: `历史销售单品报表`, // 顶部大标题
|
||||||
// }
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.startDate}-${searchParams?.endDate}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -398,7 +398,9 @@ const saleReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
reqDetailList,
|
reqDetailList,
|
||||||
`销售类别报表${searchParams?.startDate}-${searchParams?.endDate}`,
|
`销售类别报表${searchParams?.startDate}-${searchParams?.endDate}`,
|
||||||
{
|
{
|
||||||
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
// topTitle: `营收汇总报表`, // 顶部大标题
|
// topTitle: `营收汇总报表`, // 顶部大标题
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -589,9 +589,12 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`客单交易分析${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
`客单交易分析${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `历史销售单品报表`, // 顶部大标题
|
// topTitle: `历史销售单品报表`, // 顶部大标题
|
||||||
// }
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.StartDate}-${searchParams?.EndDate}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -201,7 +201,7 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const req = {
|
const req = {
|
||||||
ProvinceCode: currentUser?.ProvinceCode,
|
ProvinceCode: currentUser?.ProvinceCode,
|
||||||
ServerpartId: id,
|
ServerpartId: id,
|
||||||
ShowWholePower: true
|
// ShowWholePower: true
|
||||||
}
|
}
|
||||||
const data = await handleGetServerpartShopDDL(req)
|
const data = await handleGetServerpartShopDDL(req)
|
||||||
console.log('data', data)
|
console.log('data', data)
|
||||||
@ -323,7 +323,7 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} otherFun={(info: any) => {
|
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} otherFun={(info: any) => {
|
||||||
const selectedIds = info.checkedNodes.filter(n => n?.type === 1)
|
const selectedIds = info.checkedNodes.filter(n => n?.type === 1)
|
||||||
if (selectedIds.map(n => n?.value)?.toString().indexOf(',') === -1) {
|
if (selectedIds.map(n => n?.value)?.toString().indexOf(',') === -1) {
|
||||||
handleGetShopList(selectedIds)
|
handleGetShopList(selectedIds.map(n => n?.value)?.toString() || '')
|
||||||
} else {
|
} else {
|
||||||
setServerpartShopObj({})
|
setServerpartShopObj({})
|
||||||
}
|
}
|
||||||
@ -399,9 +399,11 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`销售金额异常${searchParams?.Start_Date}-${searchParams?.End_Date}`,
|
`销售金额异常${searchParams?.Start_Date}-${searchParams?.End_Date}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `库存信息统计表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import moment from "moment";
|
|||||||
import { handleGetABNORMALAUDITList } from "@/pages/reports/audit/abnormalAudit/service";
|
import { handleGetABNORMALAUDITList } from "@/pages/reports/audit/abnormalAudit/service";
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
import LeftSelectTree from "../../settlementAccount/component/leftSelectTree";
|
import LeftSelectTree from "../../settlementAccount/component/leftSelectTree";
|
||||||
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
|
|
||||||
|
|
||||||
const abnormalAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const abnormalAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
@ -331,27 +332,29 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
}}
|
}}
|
||||||
toolbar={{
|
toolbar={{
|
||||||
actions: [
|
actions: [
|
||||||
<span style={{ visibility: 'hidden' }}>
|
// <span style={{ visibility: 'hidden' }}>
|
||||||
<ReactHTMLTableToExcel
|
// <ReactHTMLTableToExcel
|
||||||
buttonText={'导出excel'}
|
// buttonText={'导出excel'}
|
||||||
ref={downloadBtnRef}
|
// ref={downloadBtnRef}
|
||||||
table="table-to-xls-abnormalAudit"
|
// table="table-to-xls-abnormalAudit"
|
||||||
filename={`单品销售排行统计${searchParams?.CHECK_STARTDATE_SEARCH}-${searchParams?.CHECK_ENDDATE_SEARCH}`}
|
// filename={`单品销售排行统计${searchParams?.CHECK_STARTDATE_SEARCH}-${searchParams?.CHECK_ENDDATE_SEARCH}`}
|
||||||
sheet="sheet1"
|
// sheet="sheet1"
|
||||||
/>
|
// />
|
||||||
</span>,
|
// </span>,
|
||||||
<Button
|
<Button
|
||||||
key="new"
|
key="new"
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
if (reqDetailList && reqDetailList.length > 0) {
|
if (reqDetailList && reqDetailList.length > 0) {
|
||||||
setShowLoading(true)
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
setTimeout(() => {
|
reqDetailList,
|
||||||
setShowExportTable(true)
|
`单品销售排行统计${searchParams?.CHECK_STARTDATE_SEARCH}-${searchParams?.CHECK_ENDDATE_SEARCH}`,
|
||||||
setTimeout(() => {
|
{
|
||||||
exportTable(e)
|
footerMaker: currentUser?.Name,
|
||||||
}, 100)
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
}, 100)
|
footerStatsTime: `${searchParams?.CHECK_STARTDATE_SEARCH}-${searchParams?.CHECK_ENDDATE_SEARCH}`
|
||||||
|
}
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -216,7 +216,7 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const req = {
|
const req = {
|
||||||
ProvinceCode: currentUser?.ProvinceCode,
|
ProvinceCode: currentUser?.ProvinceCode,
|
||||||
ServerpartId: id,
|
ServerpartId: id,
|
||||||
ShowWholePower: true
|
// ShowWholePower: true
|
||||||
}
|
}
|
||||||
const data = await handleGetServerpartShopDDL(req)
|
const data = await handleGetServerpartShopDDL(req)
|
||||||
const obj: any = {}
|
const obj: any = {}
|
||||||
@ -333,7 +333,7 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} otherFun={(info: any) => {
|
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} otherFun={(info: any) => {
|
||||||
const selectedIds = info.checkedNodes.filter(n => n?.type === 1)
|
const selectedIds = info.checkedNodes.filter(n => n?.type === 1)
|
||||||
if (selectedIds.map(n => n?.value)?.toString().indexOf(',') === -1) {
|
if (selectedIds.map(n => n?.value)?.toString().indexOf(',') === -1) {
|
||||||
handleGetShopList(selectedIds)
|
handleGetShopList(selectedIds.map(n => n?.value)?.toString() || '')
|
||||||
} else {
|
} else {
|
||||||
setServerpartShopObj({})
|
setServerpartShopObj({})
|
||||||
}
|
}
|
||||||
@ -405,9 +405,11 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`稽核联动查询表${searchParams?.Start_Date}-${searchParams?.End_Date}`,
|
`稽核联动查询表${searchParams?.Start_Date}-${searchParams?.End_Date}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `库存信息统计表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.Start_Date}-${searchParams?.End_Date}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -435,9 +435,11 @@ const abnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`单品统计报表${searchParams?.startDate}-${searchParams?.endDate}`,
|
`单品统计报表${searchParams?.startDate}-${searchParams?.endDate}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `进销存类别报表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -201,8 +201,10 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const req = {
|
const req = {
|
||||||
ProvinceCode: currentUser?.ProvinceCode,
|
ProvinceCode: currentUser?.ProvinceCode,
|
||||||
ServerpartId: id,
|
ServerpartId: id,
|
||||||
ShowWholePower: true
|
// ShowWholePower: true
|
||||||
}
|
}
|
||||||
|
console.log('reqreqreqreq', req);
|
||||||
|
|
||||||
const data = await handleGetServerpartShopDDL(req)
|
const data = await handleGetServerpartShopDDL(req)
|
||||||
console.log('data', data)
|
console.log('data', data)
|
||||||
const obj: any = {}
|
const obj: any = {}
|
||||||
@ -323,7 +325,7 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} otherFun={(info: any) => {
|
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} otherFun={(info: any) => {
|
||||||
const selectedIds = info.checkedNodes.filter(n => n?.type === 1)
|
const selectedIds = info.checkedNodes.filter(n => n?.type === 1)
|
||||||
if (selectedIds.map(n => n?.value)?.toString().indexOf(',') === -1) {
|
if (selectedIds.map(n => n?.value)?.toString().indexOf(',') === -1) {
|
||||||
handleGetShopList(selectedIds)
|
handleGetShopList(selectedIds.map(n => n?.value)?.toString() || '')
|
||||||
} else {
|
} else {
|
||||||
setServerpartShopObj({})
|
setServerpartShopObj({})
|
||||||
}
|
}
|
||||||
@ -400,9 +402,11 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`销售过程异常${searchParams?.Start_Date}-${searchParams?.End_Date}`,
|
`销售过程异常${searchParams?.Start_Date}-${searchParams?.End_Date}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `库存信息统计表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -581,9 +581,11 @@ const checkAccountReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`稽核情况汇总表${searchParams?.startDate}-${searchParams?.endDate}`,
|
`稽核情况汇总表${searchParams?.startDate}-${searchParams?.endDate}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `进销存类别报表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.startDate}-${searchParams?.endDate}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -412,9 +412,11 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`现场稽核管理${searchParams?.Start_Date}-${searchParams?.End_Date}`,
|
`现场稽核管理${searchParams?.Start_Date}-${searchParams?.End_Date}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `进销存类别报表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.Start_Date}-${searchParams?.End_Date}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -1,20 +1,20 @@
|
|||||||
// 结账数据管理
|
// 结账数据管理
|
||||||
import React, {useEffect, useRef, useState} from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
import type {CurrentUser} from "@/models/user";
|
import type { CurrentUser } from "@/models/user";
|
||||||
import {connect} from "umi";
|
import { connect } from "umi";
|
||||||
import type {ConnectState} from "@/models/connect";
|
import type { ConnectState } from "@/models/connect";
|
||||||
import {PageContainer} from "@ant-design/pro-layout";
|
import { PageContainer } from "@ant-design/pro-layout";
|
||||||
import ProTable from "@ant-design/pro-table";
|
import ProTable from "@ant-design/pro-table";
|
||||||
import {getEndaccountPhoto, getServerpartOption, handleGetShopTypeTree} from "@/pages/DataVerification/list/service";
|
import { getEndaccountPhoto, getServerpartOption, handleGetShopTypeTree } from "@/pages/DataVerification/list/service";
|
||||||
import {handleGetAccountList, handleGetServiceShopList, submitEndaccountState} from "@/pages/DataVerification/service";
|
import { handleGetAccountList, handleGetServiceShopList, submitEndaccountState } from "@/pages/DataVerification/service";
|
||||||
import './list.less'
|
import './list.less'
|
||||||
import {Button, DatePicker, Select, Drawer, message,Menu} from "antd";
|
import { Button, DatePicker, Select, Drawer, message, Menu } from "antd";
|
||||||
import ProCard from "@ant-design/pro-card";
|
import ProCard from "@ant-design/pro-card";
|
||||||
import useRequest from "@ahooksjs/use-request";
|
import useRequest from "@ahooksjs/use-request";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import CheckDetail from "./components/checkDetail";
|
import CheckDetail from "./components/checkDetail";
|
||||||
import {getServerpartTree, handleCallLogs} from "@/services/options";
|
import { getServerpartTree, handleCallLogs } from "@/services/options";
|
||||||
import {MenuFoldOutlined} from "@ant-design/icons";
|
import { MenuFoldOutlined } from "@ant-design/icons";
|
||||||
import SubMenu from "antd/lib/menu/SubMenu";
|
import SubMenu from "antd/lib/menu/SubMenu";
|
||||||
|
|
||||||
|
|
||||||
@ -22,31 +22,31 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
// 详情的ref
|
// 详情的ref
|
||||||
const checkDetail = useRef()
|
const checkDetail = useRef()
|
||||||
// 表格数组
|
// 表格数组
|
||||||
const [tableData,setTableData] = useState<any>()
|
const [tableData, setTableData] = useState<any>()
|
||||||
// 选择的服务区
|
// 选择的服务区
|
||||||
const [selectServicePartId,setSelectServicePartId] = useState<any>()
|
const [selectServicePartId, setSelectServicePartId] = useState<any>()
|
||||||
// 门店列表
|
// 门店列表
|
||||||
const [shopList,setShopList] = useState<any>()
|
const [shopList, setShopList] = useState<any>()
|
||||||
// 选择的门店列表
|
// 选择的门店列表
|
||||||
const [selectShopId,setSelectShopId] = useState<any>('')
|
const [selectShopId, setSelectShopId] = useState<any>('')
|
||||||
// 处理状态
|
// 处理状态
|
||||||
const [selectState,setSelectState] = useState<any>(3)
|
const [selectState, setSelectState] = useState<any>(3)
|
||||||
// 异常类型
|
// 异常类型
|
||||||
const [errorType,setErrorType] = useState<any>('')
|
const [errorType, setErrorType] = useState<any>('')
|
||||||
// 经营模式
|
// 经营模式
|
||||||
const [managerModal,setManagerModal] = useState<any>('')
|
const [managerModal, setManagerModal] = useState<any>('')
|
||||||
// 查询时间
|
// 查询时间
|
||||||
const [selectTime,setSelectTime] = useState<any>([moment().subtract(1, 'day'),moment().subtract(1, 'day')])
|
const [selectTime, setSelectTime] = useState<any>([moment().subtract(1, 'day'), moment().subtract(1, 'day')])
|
||||||
// 表格的加载效果
|
// 表格的加载效果
|
||||||
const [tableLoading,setTableLoading] = useState<boolean>(false)
|
const [tableLoading, setTableLoading] = useState<boolean>(false)
|
||||||
// 显示抽屉
|
// 显示抽屉
|
||||||
const [showDrawer,setShowDrawer] = useState<boolean>(false)
|
const [showDrawer, setShowDrawer] = useState<boolean>(false)
|
||||||
// 点击 或者双击的当前行数据
|
// 点击 或者双击的当前行数据
|
||||||
const [currentRow,setCurrentRow] = useState<any>()
|
const [currentRow, setCurrentRow] = useState<any>()
|
||||||
// 根据子组件是否出现加载框来判断按钮是否禁用
|
// 根据子组件是否出现加载框来判断按钮是否禁用
|
||||||
const [showDisable,setShowDisable] = useState<boolean>(false)
|
const [showDisable, setShowDisable] = useState<boolean>(false)
|
||||||
const [collapsible, setCollapsible] = useState<boolean>(false)
|
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||||
const [treeView,setTreeView] = useState<any>()
|
const [treeView, setTreeView] = useState<any>()
|
||||||
// 加载服务区树
|
// 加载服务区树
|
||||||
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
||||||
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
||||||
@ -95,86 +95,86 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
title: '处理状态',
|
title: '处理状态',
|
||||||
width: 90,
|
width: 90,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render:(_,record)=>{
|
render: (_, record) => {
|
||||||
return <span
|
return <span
|
||||||
style={{
|
style={{
|
||||||
color:record.Treatment_MarkState===0 || record.Treatment_MarkState===3?'#ff6600':'#000000'
|
color: record.Treatment_MarkState === 0 || record.Treatment_MarkState === 3 ? '#ff6600' : '#000000'
|
||||||
}}
|
}}
|
||||||
>{record.Treatment_MarkState===0?'待处理':
|
>{record.Treatment_MarkState === 0 ? '待处理' :
|
||||||
record.Treatment_MarkState===1?'待审核':
|
record.Treatment_MarkState === 1 ? '待审核' :
|
||||||
record.Treatment_MarkState===2?'已审结':
|
record.Treatment_MarkState === 2 ? '已审结' :
|
||||||
record.Treatment_MarkState===3?'主任复核':
|
record.Treatment_MarkState === 3 ? '主任复核' :
|
||||||
record.Treatment_MarkState===4?'主任审结':''}</span>
|
record.Treatment_MarkState === 4 ? '主任审结' : ''}</span>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'Serverpart_Name',
|
dataIndex: 'Serverpart_Name',
|
||||||
title: '服务区名称',
|
title: '服务区名称',
|
||||||
ellipsis:true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'ServerpartShop_Name',
|
dataIndex: 'ServerpartShop_Name',
|
||||||
title: '门店名称',
|
title: '门店名称',
|
||||||
valueType:'select',
|
valueType: 'select',
|
||||||
ellipsis:true,
|
ellipsis: true,
|
||||||
width:250,
|
width: 250,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'Description_Info',
|
dataIndex: 'Description_Info',
|
||||||
title: '日结校验',
|
title: '日结校验',
|
||||||
width:600,
|
width: 600,
|
||||||
ellipsis:true,
|
ellipsis: true,
|
||||||
hideInSearch:true,
|
hideInSearch: true,
|
||||||
render:(_,record)=>{
|
render: (_, record) => {
|
||||||
return <div style={{width:'600px',whiteSpace:'nowrap',textOverflow:'ellipsis',overflow:'hidden'}}>{
|
return <div style={{ width: '600px', whiteSpace: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden' }}>{
|
||||||
`${record?.Description_Staff?`${record?.Description_Staff.split('【')[0]}:`:''} ${record?.Description_Info} ${record?.Approved_Staff?`|${record?.Approved_Staff}:`:''} ${record?.Approved_Info}`
|
`${record?.Description_Staff ? `${record?.Description_Staff.split('【')[0]}:` : ''} ${record?.Description_Info} ${record?.Approved_Staff ? `|${record?.Approved_Staff}:` : ''} ${record?.Approved_Info}`
|
||||||
}</div>
|
}</div>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'TotalSell_Amount',
|
dataIndex: 'TotalSell_Amount',
|
||||||
title: '总销售额',
|
title: '总销售额',
|
||||||
width:100,
|
width: 100,
|
||||||
align: 'right',
|
align: 'right',
|
||||||
hideInSearch:true,
|
hideInSearch: true,
|
||||||
render:(_,record)=>{
|
render: (_, record) => {
|
||||||
return <span>{fmoney(record.TotalSell_Amount,2)}</span>
|
return <span>{fmoney(record.TotalSell_Amount, 2)}</span>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'Difference_Amount',
|
dataIndex: 'Difference_Amount',
|
||||||
title: '长短款',
|
title: '长短款',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
width:80,
|
width: 80,
|
||||||
hideInSearch:true,
|
hideInSearch: true,
|
||||||
render:(_,record)=>{
|
render: (_, record) => {
|
||||||
return <span style={{color:Number(record.Difference_Amount)>0?'green':Number(record.Difference_Amount)<0?'red':''}}>{fmoney(record.Difference_Amount,2)}</span>
|
return <span style={{ color: Number(record.Difference_Amount) > 0 ? 'green' : Number(record.Difference_Amount) < 0 ? 'red' : '' }}>{fmoney(record.Difference_Amount, 2)}</span>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'Revenue_Amount',
|
dataIndex: 'Revenue_Amount',
|
||||||
title: '实收金额',
|
title: '实收金额',
|
||||||
width:100,
|
width: 100,
|
||||||
align: 'right',
|
align: 'right',
|
||||||
hideInSearch:true,
|
hideInSearch: true,
|
||||||
render:(_,record)=>{
|
render: (_, record) => {
|
||||||
return <span>{fmoney(record.Revenue_Amount,2)}</span>
|
return <span>{fmoney(record.Revenue_Amount, 2)}</span>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'Endaccount_EndDate',
|
dataIndex: 'Endaccount_EndDate',
|
||||||
title: '结账日期',
|
title: '结账日期',
|
||||||
width:200,
|
width: 200,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
// 请求服务区的列表的方法 且去掉第一个 的列表数据
|
// 请求服务区的列表的方法 且去掉第一个 的列表数据
|
||||||
const { loading, data: serviceList } = useRequest(async ()=>{
|
const { loading, data: serviceList } = useRequest(async () => {
|
||||||
const options = await getServerpartOption()
|
const options = await getServerpartOption()
|
||||||
const list: any = []
|
const list: any = []
|
||||||
if (options && options.length>0){
|
if (options && options.length > 0) {
|
||||||
options.forEach((item: any)=>{
|
options.forEach((item: any) => {
|
||||||
if (item.value!==424){
|
if (item.value !== 424) {
|
||||||
list.push(item)
|
list.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -183,7 +183,7 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
return list
|
return list
|
||||||
})
|
})
|
||||||
// 请求表格数据
|
// 请求表格数据
|
||||||
const handleGetTableList = async ()=>{
|
const handleGetTableList = async () => {
|
||||||
setTableLoading(true)
|
setTableLoading(true)
|
||||||
const req = {
|
const req = {
|
||||||
ServerpartIds: selectServicePartId,
|
ServerpartIds: selectServicePartId,
|
||||||
@ -192,24 +192,24 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
EndDate: moment(selectTime[1]).format('YYYY-MM-DD'),
|
EndDate: moment(selectTime[1]).format('YYYY-MM-DD'),
|
||||||
// TreatmentMarkState:selectState,
|
// TreatmentMarkState:selectState,
|
||||||
ExceptionState: 2,
|
ExceptionState: 2,
|
||||||
EndaccountState:1,
|
EndaccountState: 1,
|
||||||
PageSize:999999
|
PageSize: 999999
|
||||||
}
|
}
|
||||||
handleCallLogs()
|
handleCallLogs()
|
||||||
const data = await handleGetAccountList(req)
|
const data = await handleGetAccountList(req)
|
||||||
if (data && data.List && data.List.length>0){
|
if (data && data.List && data.List.length > 0) {
|
||||||
const list = []
|
const list = []
|
||||||
data.List.forEach((item: any,index: number)=>{
|
data.List.forEach((item: any, index: number) => {
|
||||||
item.key = index + 1
|
item.key = index + 1
|
||||||
list.push(item)
|
list.push(item)
|
||||||
})
|
})
|
||||||
setTableData(list)
|
setTableData(list)
|
||||||
}else{
|
} else {
|
||||||
setTableData([])
|
setTableData([])
|
||||||
}
|
}
|
||||||
setTableLoading(false)
|
setTableLoading(false)
|
||||||
}
|
}
|
||||||
const handleChangeShowDisable = (type: boolean)=>{
|
const handleChangeShowDisable = (type: boolean) => {
|
||||||
setShowDisable(type)
|
setShowDisable(type)
|
||||||
}
|
}
|
||||||
const getMenuDom = (data: any[], callback: (item: any) => void) => {
|
const getMenuDom = (data: any[], callback: (item: any) => void) => {
|
||||||
@ -241,21 +241,21 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
// 主任复核
|
// 主任复核
|
||||||
// type 0是财务驳回 2是财务审核 3是主任复核
|
// type 0是财务驳回 2是财务审核 3是主任复核
|
||||||
// desc 是点击审核驳回会出现的必填项
|
// desc 是点击审核驳回会出现的必填项
|
||||||
const handleSubmitEndaccountState = async (type: number,desc: string)=>{
|
const handleSubmitEndaccountState = async (type: number, desc: string) => {
|
||||||
const req = {
|
const req = {
|
||||||
TreatmentMarkState: type,
|
TreatmentMarkState: type,
|
||||||
EndaccountId:currentRow?.Endaccount_Id,
|
EndaccountId: currentRow?.Endaccount_Id,
|
||||||
RevenueAmount:currentRow?.Revenue_Amount,
|
RevenueAmount: currentRow?.Revenue_Amount,
|
||||||
DescriptionStaff:currentUser?.Name,
|
DescriptionStaff: currentUser?.Name,
|
||||||
DescriptionInfo:desc,
|
DescriptionInfo: desc,
|
||||||
DescriptionDate:moment().format('YYYY-MM-DD HH:mm:ss')
|
DescriptionDate: moment().format('YYYY-MM-DD HH:mm:ss')
|
||||||
}
|
}
|
||||||
const data = await submitEndaccountState(req)
|
const data = await submitEndaccountState(req)
|
||||||
if (data.Result_Code===100){
|
if (data.Result_Code === 100) {
|
||||||
message.success(data.Result_Desc)
|
message.success(data.Result_Desc)
|
||||||
setShowDrawer(false);
|
setShowDrawer(false);
|
||||||
handleGetTableList()
|
handleGetTableList()
|
||||||
}else{
|
} else {
|
||||||
message.error(data.Result_Desc)
|
message.error(data.Result_Desc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -267,21 +267,23 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
if (type === '1') {
|
if (type === '1') {
|
||||||
setCurrenMenu(value)
|
setCurrenMenu(value)
|
||||||
handleGetShopList(value)
|
handleGetShopList(value)
|
||||||
} else{
|
} else {
|
||||||
setCurrenMenu('')
|
setCurrenMenu('')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拿到该服务区下的门店列表
|
// 拿到该服务区下的门店列表
|
||||||
const handleGetShopList = async (e: any)=>{
|
const handleGetShopList = async (e: any) => {
|
||||||
setSelectServicePartId(e)
|
setSelectServicePartId(e)
|
||||||
const req = {
|
const req = {
|
||||||
ProvinceCode: currentUser?.USER_PROVINCE,
|
ProvinceCode: currentUser?.ProvinceCode,
|
||||||
ServerpartId: e,
|
ServerpartId: e,
|
||||||
ShowWholePower: true
|
// ShowWholePower: true
|
||||||
}
|
}
|
||||||
const data = await handleGetServiceShopList(req)
|
const data = await handleGetServiceShopList(req)
|
||||||
setSelectShopId(null)
|
setSelectShopId(null)
|
||||||
|
console.log('data.Listdata.Listdata.Listdata.List', data.List);
|
||||||
|
|
||||||
setShopList(data.List)
|
setShopList(data.List)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,14 +297,14 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
title: '',
|
title: '',
|
||||||
breadcrumb: {},
|
breadcrumb: {},
|
||||||
}}>
|
}}>
|
||||||
<div style={{backgroundColor: '#fff', display: 'flex'}}>
|
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||||
<ProCard
|
<ProCard
|
||||||
style={{width:!collapsible ? "300px" : "60px"}}
|
style={{ width: !collapsible ? "300px" : "60px" }}
|
||||||
className="pageTable-leftnav"
|
className="pageTable-leftnav"
|
||||||
bodyStyle={{padding: 0, paddingTop: 20, paddingLeft: 20,width:!collapsible ? "300px" : "60px"}}
|
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? "300px" : "60px" }}
|
||||||
extra={<MenuFoldOutlined onClick={() => {
|
extra={<MenuFoldOutlined onClick={() => {
|
||||||
setCollapsible(!collapsible)
|
setCollapsible(!collapsible)
|
||||||
}}/>}
|
}} />}
|
||||||
colSpan={!collapsible ? "300px" : "60px"}
|
colSpan={!collapsible ? "300px" : "60px"}
|
||||||
title={!collapsible ? "请选择服务区" : ""}
|
title={!collapsible ? "请选择服务区" : ""}
|
||||||
headerBordered
|
headerBordered
|
||||||
@ -354,7 +356,7 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
<div className={'searchItem'}>
|
<div className={'searchItem'}>
|
||||||
<span className={'searchLabel'}>门店:</span>
|
<span className={'searchLabel'}>门店:</span>
|
||||||
<Select
|
<Select
|
||||||
style={{minWidth: '150px'}}
|
style={{ minWidth: '150px' }}
|
||||||
value={selectShopId}
|
value={selectShopId}
|
||||||
allowClear
|
allowClear
|
||||||
options={shopList}
|
options={shopList}
|
||||||
@ -402,14 +404,14 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
<div className={'searchItem'}>
|
<div className={'searchItem'}>
|
||||||
<span className={'searchLabel'}>经营模式:</span>
|
<span className={'searchLabel'}>经营模式:</span>
|
||||||
<Select
|
<Select
|
||||||
style={{minWidth: '100px'}}
|
style={{ minWidth: '100px' }}
|
||||||
value={managerModal}
|
value={managerModal}
|
||||||
allowClear
|
allowClear
|
||||||
options={[{label: '全部', value: ''},
|
options={[{ label: '全部', value: '' },
|
||||||
{label: '业主自营', value: 1000},
|
{ label: '业主自营', value: 1000 },
|
||||||
{label: '合作经营', value: 2000},
|
{ label: '合作经营', value: 2000 },
|
||||||
{label: '固定租金', value: 3000},
|
{ label: '固定租金', value: 3000 },
|
||||||
{label: '临时展销', value: 4000}
|
{ label: '临时展销', value: 4000 }
|
||||||
]}
|
]}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setManagerModal(e)
|
setManagerModal(e)
|
||||||
@ -427,7 +429,7 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={'searchBoxRight'}>
|
<div className={'searchBoxRight'}>
|
||||||
<Button style={{marginRight: '8px'}} onClick={async () => {
|
<Button style={{ marginRight: '8px' }} onClick={async () => {
|
||||||
setTableLoading(true)
|
setTableLoading(true)
|
||||||
setSelectServicePartId(null)
|
setSelectServicePartId(null)
|
||||||
setSelectShopId(null)
|
setSelectShopId(null)
|
||||||
@ -467,8 +469,8 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
search={false}
|
search={false}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={tableData}
|
dataSource={tableData}
|
||||||
pagination={{pageSize: 20}}
|
pagination={{ pageSize: 20 }}
|
||||||
scroll={{y: 'calc(100vh - 460px)'}}
|
scroll={{ y: 'calc(100vh - 460px)' }}
|
||||||
onRow={(record) => {
|
onRow={(record) => {
|
||||||
return {
|
return {
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
@ -486,20 +488,20 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
width={'60%'}
|
width={'60%'}
|
||||||
visible={showDrawer}
|
visible={showDrawer}
|
||||||
closable={false}
|
closable={false}
|
||||||
bodyStyle={{padding: 0}}
|
bodyStyle={{ padding: 0 }}
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
setShowDrawer(false);
|
setShowDrawer(false);
|
||||||
}}
|
}}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
footer={
|
footer={
|
||||||
currentRow?.Treatment_MarkState === 3 ?
|
currentRow?.Treatment_MarkState === 3 ?
|
||||||
<div style={{width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between'}}>
|
<div style={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||||
<Button disabled={showDisable} danger onClick={() => {
|
<Button disabled={showDisable} danger onClick={() => {
|
||||||
// 调用子组件里面的方法
|
// 调用子组件里面的方法
|
||||||
checkDetail.current?.handleEndaccountPhoto()
|
checkDetail.current?.handleEndaccountPhoto()
|
||||||
}}>查看单据</Button>
|
}}>查看单据</Button>
|
||||||
<div style={{display: 'flex', justifyContent: 'flex-end'}}>
|
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||||
<Button disabled={showDisable} style={{marginRight: '8px'}} type={'primary'} onClick={() => {
|
<Button disabled={showDisable} style={{ marginRight: '8px' }} type={'primary'} onClick={() => {
|
||||||
// 进行表单校验 校验通过之后调用保存的审核方法
|
// 进行表单校验 校验通过之后调用保存的审核方法
|
||||||
checkDetail.current.formRef.current?.validateFields().then(res => {
|
checkDetail.current.formRef.current?.validateFields().then(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
@ -516,7 +518,7 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<CheckDetail onRef={checkDetail} currentRow={currentRow} currentUser={currentUser}
|
<CheckDetail onRef={checkDetail} currentRow={currentRow} currentUser={currentUser}
|
||||||
handleChangeShowDisable={handleChangeShowDisable}/>
|
handleChangeShowDisable={handleChangeShowDisable} />
|
||||||
</Drawer>
|
</Drawer>
|
||||||
</PageContainer>
|
</PageContainer>
|
||||||
)
|
)
|
||||||
@ -524,6 +526,6 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
|
|||||||
|
|
||||||
export default connect(({
|
export default connect(({
|
||||||
user
|
user
|
||||||
}: ConnectState) => ({
|
}: ConnectState) => ({
|
||||||
currentUser: user?.currentUser
|
currentUser: user?.currentUser
|
||||||
}))(List);
|
}))(List);
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import * as numeral from "numeral";
|
|||||||
import ProDescriptions from "@ant-design/pro-descriptions";
|
import ProDescriptions from "@ant-design/pro-descriptions";
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
import LeftSelectTree from "../../settlementAccount/component/leftSelectTree";
|
import LeftSelectTree from "../../settlementAccount/component/leftSelectTree";
|
||||||
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
|
|
||||||
|
|
||||||
const curDailyReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const curDailyReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
@ -415,27 +416,36 @@ const curDailyReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
}}
|
}}
|
||||||
toolbar={{
|
toolbar={{
|
||||||
actions: [
|
actions: [
|
||||||
<span style={{ visibility: 'hidden' }}>
|
// <span style={{ visibility: 'hidden' }}>
|
||||||
<ReactHTMLTableToExcel
|
// <ReactHTMLTableToExcel
|
||||||
buttonText={'导出excel'}
|
// buttonText={'导出excel'}
|
||||||
ref={downloadBtnRef}
|
// ref={downloadBtnRef}
|
||||||
table="table-to-xls-curDailyReport"
|
// table="table-to-xls-curDailyReport"
|
||||||
filename={`当日营收报表${moment().format('YYYY-MM-DD')}`}
|
// filename={`当日营收报表${moment().format('YYYY-MM-DD')}`}
|
||||||
sheet="sheet1"
|
// sheet="sheet1"
|
||||||
/>
|
// />
|
||||||
</span>,
|
// </span>,
|
||||||
<Button
|
<Button
|
||||||
key="new"
|
key="new"
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
if (reqDetailList && reqDetailList.length > 0) {
|
if (reqDetailList && reqDetailList.length > 0) {
|
||||||
setShowLoading(true)
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
setTimeout(() => {
|
reqDetailList,
|
||||||
setShowExportTable(true)
|
`当日营收报表${moment().format('YYYY-MM-DD')}`,
|
||||||
setTimeout(() => {
|
{
|
||||||
exportTable(e)
|
footerMaker: currentUser?.Name,
|
||||||
}, 100)
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
}, 100)
|
footerStatsTime: `${moment().format('YYYY-MM-DD')}`
|
||||||
|
}
|
||||||
|
)
|
||||||
|
// setShowLoading(true)
|
||||||
|
// setTimeout(() => {
|
||||||
|
// setShowExportTable(true)
|
||||||
|
// setTimeout(() => {
|
||||||
|
// exportTable(e)
|
||||||
|
// }, 100)
|
||||||
|
// }, 100)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
}
|
}
|
||||||
@ -454,7 +464,7 @@ const curDailyReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
return <div style={{ paddingLeft: 30, paddingBottom: 0 }}>
|
return <div style={{ paddingLeft: 30, paddingBottom: 0 }}>
|
||||||
<ProDescriptions column={2} className="commity-sale-description" labelStyle={{ color: "#00000073" }}>
|
<ProDescriptions column={2} className="commity-sale-description" labelStyle={{ color: "#00000073" }}>
|
||||||
<ProDescriptions.Item label="今日营收合计" valueType="money" contentStyle={{ color: 'orangered' }}>{Current_SellAmountSum || '0.00'}</ProDescriptions.Item>
|
<ProDescriptions.Item label="今日营收合计" valueType="money" contentStyle={{ color: 'orangered' }}>{Current_SellAmountSum || '0.00'}</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="统计时间">{`${moment().format('YYYY/MM/DD 0:00:00')}至${moment().format('YYYY/MM/DD HH:mm:ss')}`}</ProDescriptions.Item>
|
<ProDescriptions.Item label="统计时间">{`${ moment().format('YYYY/MM/DD 0:00:00') }至${ moment().format('YYYY/MM/DD HH:mm:ss') }`}</ProDescriptions.Item>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import moment from "moment";
|
|||||||
import * as numeral from "numeral";
|
import * as numeral from "numeral";
|
||||||
import ProDescriptions from "@ant-design/pro-descriptions";
|
import ProDescriptions from "@ant-design/pro-descriptions";
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
|
|
||||||
|
|
||||||
const curVerify: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const curVerify: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
@ -399,13 +400,15 @@ const curVerify: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
type="primary"
|
type="primary"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
if (reqDetailList && reqDetailList.length > 0) {
|
if (reqDetailList && reqDetailList.length > 0) {
|
||||||
setShowLoading(true)
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
setTimeout(() => {
|
reqDetailList,
|
||||||
setShowExportTable(true)
|
`实时稽查校验表${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
||||||
setTimeout(() => {
|
{
|
||||||
exportTable(e)
|
footerMaker: currentUser?.Name,
|
||||||
}, 100)
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
}, 100)
|
footerStatsTime: `${searchParams?.StartDate}-${searchParams?.EndDate}`
|
||||||
|
}
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import AuditDetail from "@/pages/DataVerification/list/components/auditDetail";
|
|||||||
import upload from '@/assets/upload.png'
|
import upload from '@/assets/upload.png'
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
import LeftSelectTree from "../../settlementAccount/component/leftSelectTree";
|
import LeftSelectTree from "../../settlementAccount/component/leftSelectTree";
|
||||||
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
|
|
||||||
|
|
||||||
const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
@ -401,13 +402,15 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
type="primary"
|
type="primary"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
if (reqDetailList && reqDetailList.length > 0) {
|
if (reqDetailList && reqDetailList.length > 0) {
|
||||||
setShowLoading(true)
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
setTimeout(() => {
|
reqDetailList,
|
||||||
setShowExportTable(true)
|
`现场稽核反馈表${searchParams?.CHECK_STARTDATE}-${searchParams?.CHECK_ENDDATE}`,
|
||||||
setTimeout(() => {
|
{
|
||||||
exportTable(e)
|
footerMaker: currentUser?.Name,
|
||||||
}, 100)
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
}, 100)
|
footerStatsTime: `${searchParams?.CHECK_STARTDATE}-${searchParams?.CHECK_ENDDATE}`
|
||||||
|
}
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -441,9 +441,11 @@ const spAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`异常稽查报表${searchParams?.startDate}-${searchParams?.endDate}`,
|
`异常稽查报表${searchParams?.startDate}-${searchParams?.endDate}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `进销存类别报表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.startDate}-${searchParams?.endDate}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -356,9 +356,11 @@ const specialReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`特殊行为占比${searchParams?.startDate}-${searchParams?.endDate}`,
|
`特殊行为占比${searchParams?.startDate}-${searchParams?.endDate}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `进销存类别报表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.startDate}-${searchParams?.endDate}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -483,9 +483,12 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`商品信息查询表`,
|
`商品信息查询表`,
|
||||||
// {
|
{
|
||||||
// topTitle: `库存信息统计表`, // 顶部大标题
|
// topTitle: `库存信息统计表`, // 顶部大标题
|
||||||
// }
|
footerMaker: currentUser?.Name,
|
||||||
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import PageTitleBox from "@/components/PageTitleBox";
|
|||||||
import session from "@/utils/session";
|
import session from "@/utils/session";
|
||||||
import { formatTreeData } from "@/utils/format";
|
import { formatTreeData } from "@/utils/format";
|
||||||
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
|
|
||||||
const hotkeyset: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const hotkeyset: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
@ -431,9 +432,11 @@ const hotkeyset: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`商品快捷键管理报表`,
|
`商品快捷键管理报表`,
|
||||||
// {
|
{
|
||||||
// topTitle: `库存信息统计表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: ""
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -389,9 +389,11 @@ const shopCommodity: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
exportXlsxFromProColumnsExcelJS(columns,
|
exportXlsxFromProColumnsExcelJS(columns,
|
||||||
reqDetailList,
|
reqDetailList,
|
||||||
`门店商品查询${searchParams?.OperateDate_Start}-${searchParams?.OperateDate_End}`,
|
`门店商品查询${searchParams?.OperateDate_Start}-${searchParams?.OperateDate_End}`,
|
||||||
// {
|
{
|
||||||
// topTitle: `库存信息统计表`, // 顶部大标题
|
footerMaker: currentUser?.Name,
|
||||||
// }
|
footerMakerTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
footerStatsTime: `${searchParams?.OperateDate_Start}-${searchParams?.OperateDate_End}`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error('暂无数据可导出!')
|
message.error('暂无数据可导出!')
|
||||||
|
|||||||
@ -185,11 +185,16 @@ export async function exportXlsxFromProColumnsExcelJS(
|
|||||||
options?: {
|
options?: {
|
||||||
sheetName?: string;
|
sheetName?: string;
|
||||||
chunkSize?: number;
|
chunkSize?: number;
|
||||||
topTitle?: string; // 顶部大标题(整表合并 + 居中)
|
topTitle?: string;
|
||||||
infoRowLeft?: string; // 标题下插入的左侧文字
|
infoRowLeft?: string;
|
||||||
infoRowRight?: string; // 标题下插入的右侧文字(右对齐)
|
infoRowRight?: string;
|
||||||
freezeHeader?: boolean; // 冻结到哪一行(自动计算)
|
freezeHeader?: boolean; // 已保留但默认不再生效(不触发冻结)
|
||||||
childrenKey?: string;
|
childrenKey?: string;
|
||||||
|
|
||||||
|
// 底部信息
|
||||||
|
footerMaker?: any;
|
||||||
|
footerMakerTime?: any;
|
||||||
|
footerStatsTime?: any;
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
const {
|
const {
|
||||||
@ -198,11 +203,14 @@ export async function exportXlsxFromProColumnsExcelJS(
|
|||||||
topTitle,
|
topTitle,
|
||||||
infoRowLeft,
|
infoRowLeft,
|
||||||
infoRowRight,
|
infoRowRight,
|
||||||
freezeHeader = true,
|
// 为兼容外部调用保留字段,但默认不做冻结以满足你的要求
|
||||||
|
freezeHeader = false,
|
||||||
childrenKey = 'children',
|
childrenKey = 'children',
|
||||||
|
footerMaker,
|
||||||
|
footerMakerTime,
|
||||||
|
footerStatsTime,
|
||||||
} = options || {};
|
} = options || {};
|
||||||
|
|
||||||
// === 新增:拍平树形数据 ===
|
|
||||||
const flatData = flattenTree<any>(Array.isArray(dataSource) ? dataSource : [], childrenKey);
|
const flatData = flattenTree<any>(Array.isArray(dataSource) ? dataSource : [], childrenKey);
|
||||||
|
|
||||||
const columns = pruneHiddenColumns(rawColumns);
|
const columns = pruneHiddenColumns(rawColumns);
|
||||||
@ -219,18 +227,16 @@ export async function exportXlsxFromProColumnsExcelJS(
|
|||||||
const totalSheets = Math.max(1, Math.ceil(total / chunkSize));
|
const totalSheets = Math.max(1, Math.ceil(total / chunkSize));
|
||||||
|
|
||||||
for (let si = 0; si < totalSheets; si++) {
|
for (let si = 0; si < totalSheets; si++) {
|
||||||
const ws = wb.addWorksheet(totalSheets === 1 ? sheetName : `${sheetName}_${si + 1}`, {
|
// 注意:不再传 views 配置,避免任何默认冻结
|
||||||
views: [{ state: 'frozen' }],
|
const ws = wb.addWorksheet(totalSheets === 1 ? sheetName : `${sheetName}_${si + 1}`);
|
||||||
});
|
|
||||||
|
|
||||||
// 1) 顶部大标题(可选)
|
|
||||||
let currentRowIndex = 1;
|
let currentRowIndex = 1;
|
||||||
|
|
||||||
|
// 顶部标题
|
||||||
if (topTitle) {
|
if (topTitle) {
|
||||||
const row = ws.getRow(currentRowIndex);
|
const row = ws.getRow(currentRowIndex);
|
||||||
// 写入一个单元格,再合并整行
|
|
||||||
row.getCell(1).value = topTitle;
|
row.getCell(1).value = topTitle;
|
||||||
ws.mergeCells(currentRowIndex, 1, currentRowIndex, columnCount);
|
ws.mergeCells(currentRowIndex, 1, currentRowIndex, columnCount);
|
||||||
// 居中 + 加粗 + 较大字号
|
|
||||||
const cell = ws.getCell(currentRowIndex, 1);
|
const cell = ws.getCell(currentRowIndex, 1);
|
||||||
cell.alignment = { horizontal: 'center', vertical: 'middle' };
|
cell.alignment = { horizontal: 'center', vertical: 'middle' };
|
||||||
cell.font = { bold: true, size: 14 };
|
cell.font = { bold: true, size: 14 };
|
||||||
@ -238,10 +244,9 @@ export async function exportXlsxFromProColumnsExcelJS(
|
|||||||
currentRowIndex += 1;
|
currentRowIndex += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2) 信息行(可选,左右结构)
|
// 信息行
|
||||||
if (infoRowLeft != null || infoRowRight != null) {
|
if (infoRowLeft != null || infoRowRight != null) {
|
||||||
const row = ws.getRow(currentRowIndex);
|
const row = ws.getRow(currentRowIndex);
|
||||||
// 左侧:合并 1..(columnCount/2),左对齐
|
|
||||||
const split = Math.max(1, Math.floor(columnCount / 2));
|
const split = Math.max(1, Math.floor(columnCount / 2));
|
||||||
if (infoRowLeft != null) {
|
if (infoRowLeft != null) {
|
||||||
row.getCell(1).value = infoRowLeft;
|
row.getCell(1).value = infoRowLeft;
|
||||||
@ -250,7 +255,6 @@ export async function exportXlsxFromProColumnsExcelJS(
|
|||||||
leftCell.alignment = { horizontal: 'left', vertical: 'middle' };
|
leftCell.alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
leftCell.font = { size: 11 };
|
leftCell.font = { size: 11 };
|
||||||
}
|
}
|
||||||
// 右侧:合并 (split+1)..columnCount,右对齐
|
|
||||||
if (infoRowRight != null) {
|
if (infoRowRight != null) {
|
||||||
row.getCell(split + 1).value = infoRowRight;
|
row.getCell(split + 1).value = infoRowRight;
|
||||||
ws.mergeCells(currentRowIndex, split + 1, currentRowIndex, columnCount);
|
ws.mergeCells(currentRowIndex, split + 1, currentRowIndex, columnCount);
|
||||||
@ -262,7 +266,7 @@ export async function exportXlsxFromProColumnsExcelJS(
|
|||||||
currentRowIndex += 1;
|
currentRowIndex += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3) 多级表头(全部居中 + 加粗)
|
// 表头(保持原有样式与合并)
|
||||||
const headerStartRow = currentRowIndex;
|
const headerStartRow = currentRowIndex;
|
||||||
headerAOA.forEach((r, idx) => {
|
headerAOA.forEach((r, idx) => {
|
||||||
const row = ws.getRow(headerStartRow + idx);
|
const row = ws.getRow(headerStartRow + idx);
|
||||||
@ -274,13 +278,12 @@ export async function exportXlsxFromProColumnsExcelJS(
|
|||||||
});
|
});
|
||||||
row.height = 18;
|
row.height = 18;
|
||||||
});
|
});
|
||||||
// 应用表头合并
|
|
||||||
merges.forEach(m => {
|
merges.forEach(m => {
|
||||||
ws.mergeCells(headerStartRow + (m.r1 - 1), m.c1, headerStartRow + (m.r2 - 1), m.c2);
|
ws.mergeCells(headerStartRow + (m.r1 - 1), m.c1, headerStartRow + (m.r2 - 1), m.c2);
|
||||||
});
|
});
|
||||||
currentRowIndex += headerAOA.length;
|
currentRowIndex += headerAOA.length;
|
||||||
|
|
||||||
// 4) 数据(从 currentRowIndex 开始)
|
// 数据区
|
||||||
const start = si * chunkSize;
|
const start = si * chunkSize;
|
||||||
const end = Math.min(start + chunkSize, total);
|
const end = Math.min(start + chunkSize, total);
|
||||||
const batch = flatData.slice(start, end);
|
const batch = flatData.slice(start, end);
|
||||||
@ -290,19 +293,14 @@ export async function exportXlsxFromProColumnsExcelJS(
|
|||||||
const row = ws.getRow(currentRowIndex + i);
|
const row = ws.getRow(currentRowIndex + i);
|
||||||
leafCols.forEach((col, j) => {
|
leafCols.forEach((col, j) => {
|
||||||
const cell = row.getCell(j + 1);
|
const cell = row.getCell(j + 1);
|
||||||
// 这里 rowIndex 仍然传全局行号 start + i,序号列会自动正确
|
const v = getCellValue(col, rec, start + i);
|
||||||
cell.value = getCellValue(col, rec, start + i);
|
cell.value = v;
|
||||||
|
if (col.align) cell.alignment = { horizontal: col.align, vertical: 'middle' };
|
||||||
// 设置单元格对齐方式
|
|
||||||
if (col.align) {
|
|
||||||
cell.alignment = { horizontal: col.align, vertical: 'middle' };
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
// 适度让出主线程:ExcelJS 是纯 JS,通常也很稳;如需进一步优化可用 setTimeout 分批
|
|
||||||
}
|
}
|
||||||
currentRowIndex += batch.length;
|
currentRowIndex += batch.length;
|
||||||
|
|
||||||
// 5) 列宽:基于表头 + 采样数据估算
|
// 列宽估算
|
||||||
const sampleRows = Math.min(batch.length, 200);
|
const sampleRows = Math.min(batch.length, 200);
|
||||||
for (let c = 1; c <= columnCount; c++) {
|
for (let c = 1; c <= columnCount; c++) {
|
||||||
const headerMax = Math.max(...headerAOA.map(r => estimateWidth(r[c - 1])));
|
const headerMax = Math.max(...headerAOA.map(r => estimateWidth(r[c - 1])));
|
||||||
@ -314,20 +312,66 @@ export async function exportXlsxFromProColumnsExcelJS(
|
|||||||
ws.getColumn(c).width = Math.max(headerMax, dataMax);
|
ws.getColumn(c).width = Math.max(headerMax, dataMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6) 冻结窗格:冻结到(标题 + 信息行 + 表头)这一行的下一行
|
// 注意:不再对 ws.views 进行任何设置(避免冻结表头)
|
||||||
if (freezeHeader) {
|
// if (freezeHeader) { ... } // 已移除
|
||||||
// const freezeRow = (topTitle ? 1 : 0) + (infoRowLeft != null || infoRowRight != null ? 1 : 0) + headerAOA.length;
|
|
||||||
// ws.views = [{ state: 'frozen', ySplit: freezeRow }];
|
// 底部三项(同一行 + 平均分列 + 直接显示“标题:值”)
|
||||||
|
if (footerMaker != null || footerMakerTime != null || footerStatsTime != null) {
|
||||||
|
currentRowIndex += 1;
|
||||||
|
const footerRow = ws.getRow(currentRowIndex);
|
||||||
|
|
||||||
|
const items = [
|
||||||
|
`制单人员:${footerMaker ?? ''}`,
|
||||||
|
`制单时间:${footerMakerTime ?? ''}`,
|
||||||
|
`统计时间:${footerStatsTime ?? ''}`,
|
||||||
|
];
|
||||||
|
|
||||||
|
const groups = 3;
|
||||||
|
const base = Math.floor(columnCount / groups);
|
||||||
|
let remainder = columnCount - base * groups;
|
||||||
|
const sizes: number[] = [];
|
||||||
|
for (let g = 0; g < groups; g++) {
|
||||||
|
sizes.push(base + (remainder > 0 ? 1 : 0));
|
||||||
|
if (remainder > 0) remainder -= 1;
|
||||||
|
}
|
||||||
|
if (columnCount < groups) {
|
||||||
|
for (let g = 0; g < groups; g++) sizes[g] = 0;
|
||||||
|
for (let k = 0; k < columnCount; k++) sizes[k] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
let colCursor = 1;
|
||||||
|
for (let g = 0; g < groups; g++) {
|
||||||
|
const segSize = sizes[g];
|
||||||
|
if (segSize <= 0) continue;
|
||||||
|
const startCol = colCursor;
|
||||||
|
const endCol = colCursor + segSize - 1;
|
||||||
|
|
||||||
|
if (endCol > startCol) ws.mergeCells(currentRowIndex, startCol, currentRowIndex, endCol);
|
||||||
|
|
||||||
|
const cell = footerRow.getCell(startCol);
|
||||||
|
cell.value = items[g];
|
||||||
|
cell.alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
|
cell.font = { size: 11 };
|
||||||
|
|
||||||
|
colCursor += segSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
footerRow.height = 18;
|
||||||
|
currentRowIndex += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成并下载(浏览器环境)
|
// 生成并触发下载
|
||||||
const buf = await wb.xlsx.writeBuffer();
|
const buf = await wb.xlsx.writeBuffer();
|
||||||
const blob = new Blob([buf], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
const blob = new Blob([buf], {
|
||||||
|
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
|
});
|
||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = `${filename}.xlsx`;
|
a.download = `${filename || sheetName}.xlsx`;
|
||||||
a.click();
|
a.click();
|
||||||
URL.revokeObjectURL(url);
|
setTimeout(() => URL.revokeObjectURL(url), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user