Commit 19ca3d4642612130b92c3bc0d22f8337f871880d

Authored by 曾国涛
1 parent 4226626f

chore(release): 重构下载文件方法

- 将 orderExport 方法重命名为 downloadFile,以更准确地反映其功能
- 更新了多个页面和组件中对下载文件方法的调用
- 修改了部分接口和类型定义,以适应新的下载文件方法
src/pages/Client/Components/ClientImportModal.tsx
1 import { RESPONSE_CODE } from '@/constants/enum'; 1 import { RESPONSE_CODE } from '@/constants/enum';
2 -import { orderExport } from '@/services/order'; 2 +import { downloadFile } from '@/services/order';
3 import { blobToJson } from '@/utils'; 3 import { blobToJson } from '@/utils';
4 import { ModalForm, ProFormUploadDragger } from '@ant-design/pro-components'; 4 import { ModalForm, ProFormUploadDragger } from '@ant-design/pro-components';
5 import { Button, Form, message } from 'antd'; 5 import { Button, Form, message } from 'antd';
@@ -15,7 +15,7 @@ export default () => { @@ -15,7 +15,7 @@ export default () => {
15 content: '正在导入...', 15 content: '正在导入...',
16 duration: 0, 16 duration: 0,
17 }); 17 });
18 - orderExport( 18 + downloadFile(
19 '/api/admin/client/downloadImportTemplate', 19 '/api/admin/client/downloadImportTemplate',
20 '客户导入模板.xlsx', 20 '客户导入模板.xlsx',
21 'post', 21 'post',
src/pages/Client/index.tsx
@@ -8,7 +8,7 @@ import { @@ -8,7 +8,7 @@ import {
8 postServiceConstClientLevels, 8 postServiceConstClientLevels,
9 postServiceConstTradeStatus, 9 postServiceConstTradeStatus,
10 } from '@/services'; 10 } from '@/services';
11 -import { orderExport } from '@/services/order'; 11 +import { downloadFile } from '@/services/order';
12 import { enumToSelect } from '@/utils'; 12 import { enumToSelect } from '@/utils';
13 import type { ActionType } from '@ant-design/pro-components'; 13 import type { ActionType } from '@ant-design/pro-components';
14 import { ProTable } from '@ant-design/pro-components'; 14 import { ProTable } from '@ant-design/pro-components';
@@ -267,7 +267,7 @@ export default () => { @@ -267,7 +267,7 @@ export default () => {
267 content: '导出中...', 267 content: '导出中...',
268 duration: 0, 268 duration: 0,
269 }); 269 });
270 - orderExport( 270 + downloadFile(
271 '/api/admin/client/exportClients', 271 '/api/admin/client/exportClients',
272 '客户信息.xlsx', 272 '客户信息.xlsx',
273 'POST', 273 'POST',
src/pages/Instalment/components/title/title.tsx
@@ -3,7 +3,7 @@ import { @@ -3,7 +3,7 @@ import {
3 getOrderErpOrderStagesListAll, 3 getOrderErpOrderStagesListAll,
4 postOrderErpOrderStagesSearch, 4 postOrderErpOrderStagesSearch,
5 } from '@/services'; 5 } from '@/services';
6 -import { orderExport } from '@/services/order'; 6 +import { downloadFile } from '@/services/order';
7 import { VerticalAlignTopOutlined } from '@ant-design/icons'; 7 import { VerticalAlignTopOutlined } from '@ant-design/icons';
8 import type { ProColumns } from '@ant-design/pro-components'; 8 import type { ProColumns } from '@ant-design/pro-components';
9 import { ProTable } from '@ant-design/pro-components'; 9 import { ProTable } from '@ant-design/pro-components';
@@ -153,7 +153,7 @@ export default () => { @@ -153,7 +153,7 @@ export default () => {
153 153
154 async function toExport() { 154 async function toExport() {
155 // await getOrderErpOrderStagesExport() 155 // await getOrderErpOrderStagesExport()
156 - orderExport( 156 + downloadFile(
157 '/api/order/erp/orderStages/export', 157 '/api/order/erp/orderStages/export',
158 '分期订单.xlsx', 158 '分期订单.xlsx',
159 'get', 159 'get',
src/pages/Instalment/components/title/titletest.tsx
@@ -3,7 +3,7 @@ import { @@ -3,7 +3,7 @@ import {
3 getOrderErpOrderStagesListAll, 3 getOrderErpOrderStagesListAll,
4 postOrderErpOrderStagesSearch, 4 postOrderErpOrderStagesSearch,
5 } from '@/services'; 5 } from '@/services';
6 -import { orderExport } from '@/services/order'; 6 +import { downloadFile } from '@/services/order';
7 import { VerticalAlignTopOutlined } from '@ant-design/icons'; 7 import { VerticalAlignTopOutlined } from '@ant-design/icons';
8 import type { ProColumns } from '@ant-design/pro-components'; 8 import type { ProColumns } from '@ant-design/pro-components';
9 import { EditableProTable } from '@ant-design/pro-components'; 9 import { EditableProTable } from '@ant-design/pro-components';
@@ -192,7 +192,7 @@ export default () => { @@ -192,7 +192,7 @@ export default () => {
192 192
193 async function toExport() { 193 async function toExport() {
194 // await getOrderErpOrderStagesExport() 194 // await getOrderErpOrderStagesExport()
195 - orderExport( 195 + downloadFile(
196 '/api/order/erp/orderStages/export', 196 '/api/order/erp/orderStages/export',
197 '分期订单.xlsx', 197 '分期订单.xlsx',
198 'get', 198 'get',
src/pages/Invoice/Invoice/index.tsx
@@ -7,12 +7,13 @@ import InvoiceWriteOffModal from '@/pages/Invoice/Invoice/components/invoiceWrit @@ -7,12 +7,13 @@ import InvoiceWriteOffModal from '@/pages/Invoice/Invoice/components/invoiceWrit
7 import { INVOICE_COLUMNS } from '@/pages/Invoice/constant'; 7 import { INVOICE_COLUMNS } from '@/pages/Invoice/constant';
8 import { INVOCING_STATUS, PAYEE_OPTIONS } from '@/pages/Order/constant'; 8 import { INVOCING_STATUS, PAYEE_OPTIONS } from '@/pages/Order/constant';
9 import { 9 import {
  10 + postServiceInvoiceConfirmInvoice,
10 postServiceInvoiceDeleteInvoice, 11 postServiceInvoiceDeleteInvoice,
11 postServiceInvoiceGetWriteOffRecord, 12 postServiceInvoiceGetWriteOffRecord,
12 postServiceInvoiceModify, 13 postServiceInvoiceModify,
13 postServiceInvoiceQueryInvoice, 14 postServiceInvoiceQueryInvoice,
14 } from '@/services'; 15 } from '@/services';
15 -import { orderExport } from '@/services/order'; 16 +import { downloadFile } from '@/services/order';
16 import { enumValueToLabel, formatDateTime } from '@/utils'; 17 import { enumValueToLabel, formatDateTime } from '@/utils';
17 import { formatDate } from '@/utils/time'; 18 import { formatDate } from '@/utils/time';
18 import { ActionType, ProTable } from '@ant-design/pro-components'; 19 import { ActionType, ProTable } from '@ant-design/pro-components';
@@ -193,6 +194,25 @@ const InvoiceRecord = () => { @@ -193,6 +194,25 @@ const InvoiceRecord = () => {
193 />, 194 />,
194 ); 195 );
195 } 196 }
  197 + if (record.paths?.includes('confirmInvoice')) {
  198 + btns.push(
  199 + <ButtonConfirm
  200 + key="delete"
  201 + className="p-0"
  202 + title={'确认发票?'}
  203 + text="确认发票"
  204 + onConfirm={async () => {
  205 + let res = await postServiceInvoiceConfirmInvoice({
  206 + data: { invoiceIds: [record.id] },
  207 + });
  208 + if (res) {
  209 + message.success(res.message);
  210 + reloadInvoiceTable();
  211 + }
  212 + }}
  213 + />,
  214 + );
  215 + }
196 return btns; 216 return btns;
197 }, 217 },
198 }); 218 });
@@ -255,7 +275,7 @@ const InvoiceRecord = () =&gt; { @@ -255,7 +275,7 @@ const InvoiceRecord = () =&gt; {
255 content: '导出中...', 275 content: '导出中...',
256 duration: 0, 276 duration: 0,
257 }); 277 });
258 - orderExport( 278 + downloadFile(
259 '/api/service/invoice/exportInvoices', 279 '/api/service/invoice/exportInvoices',
260 '发票.xlsx', 280 '发票.xlsx',
261 'POST', 281 'POST',
src/pages/Invoice/InvoiceRecord/index.tsx
@@ -5,6 +5,7 @@ import { @@ -5,6 +5,7 @@ import {
5 postServiceBankStatementEditBankStatement, 5 postServiceBankStatementEditBankStatement,
6 postServiceConstAfterInvoicingInvoiceRecordStatus, 6 postServiceConstAfterInvoicingInvoiceRecordStatus,
7 postServiceConstInvoiceType, 7 postServiceConstInvoiceType,
  8 + postServiceInvoiceDownloadInvoice,
8 postServiceInvoiceInvoicing, 9 postServiceInvoiceInvoicing,
9 postServiceInvoiceQueryInvoiceRecordList, 10 postServiceInvoiceQueryInvoiceRecordList,
10 postServiceOrderQuerySalesCode, 11 postServiceOrderQuerySalesCode,
@@ -56,11 +57,13 @@ const InvoiceRecord = () =&gt; { @@ -56,11 +57,13 @@ const InvoiceRecord = () =&gt; {
56 duration: 0, 57 duration: 0,
57 }); 58 });
58 axios({ 59 axios({
59 - url: '/api/file/directDown', 60 + url: '/api/service/invoice/batchDown',
60 method: 'post', 61 method: 'post',
61 responseType: 'blob', 62 responseType: 'blob',
62 headers: { Authorization: localStorage.getItem('token') }, 63 headers: { Authorization: localStorage.getItem('token') },
63 - data: urls, 64 + data: {
  65 + invoiceRecordIds: urls,
  66 + },
64 }) 67 })
65 .then((response) => { 68 .then((response) => {
66 // 创建一个新的 Blob 对象,它包含了服务器响应的数据(即你的 Excel 文件) 69 // 创建一个新的 Blob 对象,它包含了服务器响应的数据(即你的 Excel 文件)
@@ -202,6 +205,12 @@ const InvoiceRecord = () =&gt; { @@ -202,6 +205,12 @@ const InvoiceRecord = () =&gt; {
202 ellipsis: true, 205 ellipsis: true,
203 }, 206 },
204 { 207 {
  208 + title: '发票下载次数',
  209 + dataIndex: 'downloadCount',
  210 + valueType: 'Text',
  211 + hideInSearch: true,
  212 + },
  213 + {
205 title: '失败原因', 214 title: '失败原因',
206 valueType: 'text', 215 valueType: 'text',
207 dataIndex: 'failureReason', 216 dataIndex: 'failureReason',
@@ -310,7 +319,15 @@ const InvoiceRecord = () =&gt; { @@ -310,7 +319,15 @@ const InvoiceRecord = () =&gt; {
310 <> 319 <>
311 {record.status === 'SUCCESS' && 320 {record.status === 'SUCCESS' &&
312 record.paths.includes('DOWNLOAD_INVOICE') && ( 321 record.paths.includes('DOWNLOAD_INVOICE') && (
313 - <a href={record.invoiceAddress} download> 322 + <a
  323 + href={record.invoiceAddress}
  324 + download
  325 + onClick={() => {
  326 + postServiceInvoiceDownloadInvoice({
  327 + data: record.id,
  328 + });
  329 + }}
  330 + >
314 下载发票 331 下载发票
315 </a> 332 </a>
316 )} 333 )}
@@ -447,10 +464,10 @@ const InvoiceRecord = () =&gt; { @@ -447,10 +464,10 @@ const InvoiceRecord = () =&gt; {
447 <Button 464 <Button
448 type={'primary'} 465 type={'primary'}
449 onClick={() => { 466 onClick={() => {
450 - const urls = selectedRows.map((item) => {  
451 - return item.invoiceAddress; 467 + const ids = selectedRows.map((item) => {
  468 + return item.id;
452 }); 469 });
453 - downloadImportTemplate(urls); 470 + downloadImportTemplate(ids);
454 }} 471 }}
455 disabled={selectedRowKeys.length === 0} 472 disabled={selectedRowKeys.length === 0}
456 > 473 >
src/pages/Invoice/InvoiceVerification/index.tsx
@@ -16,7 +16,7 @@ import { @@ -16,7 +16,7 @@ import {
16 postServiceBankStatementQueryBankStatement, 16 postServiceBankStatementQueryBankStatement,
17 postServiceInvoiceGetWriteOffRecord, 17 postServiceInvoiceGetWriteOffRecord,
18 } from '@/services'; 18 } from '@/services';
19 -import { orderExport } from '@/services/order'; 19 +import { downloadFile } from '@/services/order';
20 import { enumValueToLabel, formatDateTime } from '@/utils'; 20 import { enumValueToLabel, formatDateTime } from '@/utils';
21 import { formatDate } from '@/utils/time'; 21 import { formatDate } from '@/utils/time';
22 import { PlusOutlined } from '@ant-design/icons'; 22 import { PlusOutlined } from '@ant-design/icons';
@@ -241,7 +241,7 @@ const InvoiceRecord = () =&gt; { @@ -241,7 +241,7 @@ const InvoiceRecord = () =&gt; {
241 content: '导出中...', 241 content: '导出中...',
242 duration: 0, 242 duration: 0,
243 }); 243 });
244 - orderExport( 244 + downloadFile(
245 '/api/service/invoice/exportBankStatements', 245 '/api/service/invoice/exportBankStatements',
246 '银行流水.xlsx', 246 '银行流水.xlsx',
247 'POST', 247 'POST',
src/pages/Invoice/constant.tsx
@@ -146,6 +146,12 @@ export const INVOICE_COLUMNS = [ @@ -146,6 +146,12 @@ export const INVOICE_COLUMNS = [
146 width: 100, 146 width: 100,
147 }, 147 },
148 { 148 {
  149 + title: '来源',
  150 + dataIndex: 'createByName',
  151 + valueType: 'text',
  152 + width: 100,
  153 + },
  154 + {
149 title: '销售', 155 title: '销售',
150 dataIndex: 'sale', 156 dataIndex: 'sale',
151 valueType: 'text', 157 valueType: 'text',
@@ -178,6 +184,7 @@ export const INVOICE_COLUMNS = [ @@ -178,6 +184,7 @@ export const INVOICE_COLUMNS = [
178 dataIndex: 'invoicingTime', 184 dataIndex: 'invoicingTime',
179 valueType: 'date', 185 valueType: 'date',
180 width: 150, 186 width: 150,
  187 + hideInTable: true,
181 search: { 188 search: {
182 transform: (value) => { 189 transform: (value) => {
183 if (value) { 190 if (value) {
src/pages/Order/Order/components/ImportModal.tsx
1 import { RESPONSE_CODE } from '@/constants/enum'; 1 import { RESPONSE_CODE } from '@/constants/enum';
2 import { postServiceOrderImportExcel } from '@/services'; 2 import { postServiceOrderImportExcel } from '@/services';
3 -import { orderExport } from '@/services/order'; 3 +import { downloadFile } from '@/services/order';
4 import { UploadOutlined } from '@ant-design/icons'; 4 import { UploadOutlined } from '@ant-design/icons';
5 import { Button, Modal, Upload, message } from 'antd'; 5 import { Button, Modal, Upload, message } from 'antd';
6 import { RcFile, UploadFile, UploadProps } from 'antd/es/upload'; 6 import { RcFile, UploadFile, UploadProps } from 'antd/es/upload';
@@ -26,7 +26,7 @@ export default ({ onClose }) =&gt; { @@ -26,7 +26,7 @@ export default ({ onClose }) =&gt; {
26 }; 26 };
27 const downloadTemplate = async () => { 27 const downloadTemplate = async () => {
28 exportLoading('正在下载模板...'); 28 exportLoading('正在下载模板...');
29 - orderExport( 29 + downloadFile(
30 '/api/service/order/exportTemplate', 30 '/api/service/order/exportTemplate',
31 '订单.xlsx', 31 '订单.xlsx',
32 'post', 32 'post',
@@ -63,7 +63,7 @@ export default ({ onClose }) =&gt; { @@ -63,7 +63,7 @@ export default ({ onClose }) =&gt; {
63 } 63 }
64 //存在错误信息,下载错误信息模板 64 //存在错误信息,下载错误信息模板
65 exportLoading('正在下载错误信息...'); 65 exportLoading('正在下载错误信息...');
66 - orderExport( 66 + downloadFile(
67 '/api/service/order/errorExcelInformation', 67 '/api/service/order/errorExcelInformation',
68 '订单.xlsx', 68 '订单.xlsx',
69 'post', 69 'post',
src/pages/Order/Order/index.tsx
@@ -22,7 +22,7 @@ import { @@ -22,7 +22,7 @@ import {
22 postServiceOrderSalesConfirm, 22 postServiceOrderSalesConfirm,
23 postServiceOrderWarningOrderStatistics, 23 postServiceOrderWarningOrderStatistics,
24 } from '@/services'; 24 } from '@/services';
25 -import { orderExport } from '@/services/order'; 25 +import { downloadFile } from '@/services/order';
26 import { 26 import {
27 FloatAdd, 27 FloatAdd,
28 copyToClipboard, 28 copyToClipboard,
@@ -225,7 +225,7 @@ const OrderPage = () =&gt; { @@ -225,7 +225,7 @@ const OrderPage = () =&gt; {
225 ); 225 );
226 return [...subOrderSelectedMap.values()] 226 return [...subOrderSelectedMap.values()]
227 .flat() 227 .flat()
228 - .every((subItem) => subItem.paths.includes('applyInvoicing_old')); 228 + .every((subItem) => subItem.paths?.includes('applyInvoicing_old'));
229 }, [selectedSubOrderKeys]); 229 }, [selectedSubOrderKeys]);
230 230
231 console.log(JSON.stringify(userInfo)); 231 console.log(JSON.stringify(userInfo));
@@ -4228,7 +4228,7 @@ const OrderPage = () =&gt; { @@ -4228,7 +4228,7 @@ const OrderPage = () =&gt; {
4228 onClick: async () => { 4228 onClick: async () => {
4229 let body = { flag: 50, ...searchParams }; 4229 let body = { flag: 50, ...searchParams };
4230 exportLoading(); 4230 exportLoading();
4231 - orderExport( 4231 + downloadFile(
4232 '/api/service/order/export', 4232 '/api/service/order/export',
4233 '订单导出结果.xls', 4233 '订单导出结果.xls',
4234 'POST', 4234 'POST',
@@ -4247,7 +4247,7 @@ const OrderPage = () =&gt; { @@ -4247,7 +4247,7 @@ const OrderPage = () =&gt; {
4247 } 4247 }
4248 let body = { flag: 30, id: Array.from(mainOrderSelectedMap.keys()) }; 4248 let body = { flag: 30, id: Array.from(mainOrderSelectedMap.keys()) };
4249 exportLoading(); 4249 exportLoading();
4250 - orderExport( 4250 + downloadFile(
4251 '/api/service/order/export', 4251 '/api/service/order/export',
4252 '订单导出结果.xls', 4252 '订单导出结果.xls',
4253 'POST', 4253 'POST',
@@ -4262,7 +4262,7 @@ const OrderPage = () =&gt; { @@ -4262,7 +4262,7 @@ const OrderPage = () =&gt; {
4262 onClick: async () => { 4262 onClick: async () => {
4263 let body = { flag: 40, ids: [] }; 4263 let body = { flag: 40, ids: [] };
4264 exportLoading(); 4264 exportLoading();
4265 - orderExport( 4265 + downloadFile(
4266 '/api/service/order/export', 4266 '/api/service/order/export',
4267 '订单导出结果.xls', 4267 '订单导出结果.xls',
4268 'POST', 4268 'POST',
@@ -4277,7 +4277,7 @@ const OrderPage = () =&gt; { @@ -4277,7 +4277,7 @@ const OrderPage = () =&gt; {
4277 onClick: async () => { 4277 onClick: async () => {
4278 let body = { flag: 10, ids: [] }; 4278 let body = { flag: 10, ids: [] };
4279 exportLoading(); 4279 exportLoading();
4280 - orderExport( 4280 + downloadFile(
4281 '/api/service/order/export', 4281 '/api/service/order/export',
4282 '订单导出结果.xls', 4282 '订单导出结果.xls',
4283 'POST', 4283 'POST',
src/pages/Order/OrderWarning/components/ImportModal.tsx
1 import { RESPONSE_CODE } from '@/constants/enum'; 1 import { RESPONSE_CODE } from '@/constants/enum';
2 import { postServiceOrderImportExcel } from '@/services'; 2 import { postServiceOrderImportExcel } from '@/services';
3 -import { orderExport } from '@/services/order'; 3 +import { downloadFile } from '@/services/order';
4 import { UploadOutlined } from '@ant-design/icons'; 4 import { UploadOutlined } from '@ant-design/icons';
5 import { Button, Modal, Upload, message } from 'antd'; 5 import { Button, Modal, Upload, message } from 'antd';
6 import { RcFile, UploadFile, UploadProps } from 'antd/es/upload'; 6 import { RcFile, UploadFile, UploadProps } from 'antd/es/upload';
@@ -26,7 +26,7 @@ export default ({ onClose }) =&gt; { @@ -26,7 +26,7 @@ export default ({ onClose }) =&gt; {
26 }; 26 };
27 const downloadTemplate = async () => { 27 const downloadTemplate = async () => {
28 exportLoading('正在下载模板...'); 28 exportLoading('正在下载模板...');
29 - orderExport( 29 + downloadFile(
30 '/api/service/order/exportTemplate', 30 '/api/service/order/exportTemplate',
31 '订单.xlsx', 31 '订单.xlsx',
32 'post', 32 'post',
@@ -63,7 +63,7 @@ export default ({ onClose }) =&gt; { @@ -63,7 +63,7 @@ export default ({ onClose }) =&gt; {
63 } 63 }
64 //存在错误信息,下载错误信息模板 64 //存在错误信息,下载错误信息模板
65 exportLoading('正在下载错误信息...'); 65 exportLoading('正在下载错误信息...');
66 - orderExport( 66 + downloadFile(
67 '/api/service/order/errorExcelInformation', 67 '/api/service/order/errorExcelInformation',
68 '订单.xlsx', 68 '订单.xlsx',
69 'post', 69 'post',
src/pages/ResearchGroup/components/ImportModal.tsx
1 import { RESPONSE_CODE } from '@/constants/enum'; 1 import { RESPONSE_CODE } from '@/constants/enum';
2 import { postResearchGroupsImport } from '@/services'; 2 import { postResearchGroupsImport } from '@/services';
3 -import { orderExport } from '@/services/order'; 3 +import { downloadFile } from '@/services/order';
4 import { UploadOutlined } from '@ant-design/icons'; 4 import { UploadOutlined } from '@ant-design/icons';
5 import { Button, Modal, Upload, message } from 'antd'; 5 import { Button, Modal, Upload, message } from 'antd';
6 import { RcFile, UploadFile, UploadProps } from 'antd/es/upload'; 6 import { RcFile, UploadFile, UploadProps } from 'antd/es/upload';
@@ -26,7 +26,7 @@ export default ({ onClose }) =&gt; { @@ -26,7 +26,7 @@ export default ({ onClose }) =&gt; {
26 }; 26 };
27 const downloadTemplate = async () => { 27 const downloadTemplate = async () => {
28 exportLoading('正在下载模板...'); 28 exportLoading('正在下载模板...');
29 - orderExport( 29 + downloadFile(
30 '/api/research/groups/download/importTemplate', 30 '/api/research/groups/download/importTemplate',
31 '导入模板.xls', 31 '导入模板.xls',
32 'POST', 32 'POST',
src/pages/procure/index.tsx
@@ -10,7 +10,7 @@ import { @@ -10,7 +10,7 @@ import {
10 postServiceConstProcureReturnBills, 10 postServiceConstProcureReturnBills,
11 postServiceConstStores, 11 postServiceConstStores,
12 } from '@/services'; 12 } from '@/services';
13 -import { orderExport } from '@/services/order'; 13 +import { downloadFile } from '@/services/order';
14 import { enumToSelect } from '@/utils'; 14 import { enumToSelect } from '@/utils';
15 import type { ActionType, ProColumns } from '@ant-design/pro-components'; 15 import type { ActionType, ProColumns } from '@ant-design/pro-components';
16 import { ProTable } from '@ant-design/pro-components'; 16 import { ProTable } from '@ant-design/pro-components';
@@ -284,7 +284,7 @@ export default () =&gt; { @@ -284,7 +284,7 @@ export default () =&gt; {
284 content: '导出中...', 284 content: '导出中...',
285 duration: 0, 285 duration: 0,
286 }); 286 });
287 - orderExport( 287 + downloadFile(
288 '/api/procureReturnBill/export', 288 '/api/procureReturnBill/export',
289 '客户信息.xlsx', 289 '客户信息.xlsx',
290 'POST', 290 'POST',
src/services/definition.ts
@@ -749,6 +749,8 @@ export interface ApplyInvoiceDTO { @@ -749,6 +749,8 @@ export interface ApplyInvoiceDTO {
749 createByName?: string; 749 createByName?: string;
750 /** @format date-time */ 750 /** @format date-time */
751 createTime?: string; 751 createTime?: string;
  752 + /** @format int32 */
  753 + downloadCount?: number;
752 failureReason?: string; 754 failureReason?: string;
753 /** 755 /**
754 * @description 756 * @description
@@ -1126,6 +1128,18 @@ export interface CompanyInfoDto { @@ -1126,6 +1128,18 @@ export interface CompanyInfoDto {
1126 version?: number; 1128 version?: number;
1127 } 1129 }
1128 1130
  1131 +export interface ConfirmInvoiceDTO {
  1132 + createByName?: string;
  1133 + /** @format date-time */
  1134 + createTime?: string;
  1135 + invoiceIds?: Array<number>;
  1136 + logicDelete?: boolean;
  1137 + paths?: Array<string>;
  1138 + updateByName?: string;
  1139 + /** @format date-time */
  1140 + updateTime?: string;
  1141 +}
  1142 +
1129 export interface Contactperson { 1143 export interface Contactperson {
1130 birthday?: string; 1144 birthday?: string;
1131 contactAddress?: string; 1145 contactAddress?: string;
@@ -1399,6 +1413,10 @@ export interface InventoryMaterialStockReq { @@ -1399,6 +1413,10 @@ export interface InventoryMaterialStockReq {
1399 materialId?: string; 1413 materialId?: string;
1400 } 1414 }
1401 1415
  1416 +export interface InvoiceBatchDownloadDto {
  1417 + invoiceRecordIds?: Array<number>;
  1418 +}
  1419 +
1402 export interface InvoiceDto { 1420 export interface InvoiceDto {
1403 /** 1421 /**
1404 * @description 1422 * @description
@@ -1423,6 +1441,7 @@ export interface InvoiceDto { @@ -1423,6 +1441,7 @@ export interface InvoiceDto {
1423 */ 1441 */
1424 contacts?: string; 1442 contacts?: string;
1425 createByName?: string; 1443 createByName?: string;
  1444 + createByNameText?: string;
1426 /** @format date-time */ 1445 /** @format date-time */
1427 createTime?: string; 1446 createTime?: string;
1428 /** 1447 /**
@@ -1552,6 +1571,8 @@ export interface InvoiceRecordDTO { @@ -1552,6 +1571,8 @@ export interface InvoiceRecordDTO {
1552 createByName?: string; 1571 createByName?: string;
1553 /** @format date-time */ 1572 /** @format date-time */
1554 createTime?: string; 1573 createTime?: string;
  1574 + /** @format int32 */
  1575 + downloadCount?: number;
1555 failureReason?: string; 1576 failureReason?: string;
1556 /** 1577 /**
1557 * @description 1578 * @description
src/services/order.ts
1 import axios from 'axios'; 1 import axios from 'axios';
2 2
3 -export const orderExport = async ( 3 +export const downloadFile = async (
4 url: any = '', 4 url: any = '',
5 fileName: any = '', 5 fileName: any = '',
6 method: any = '', 6 method: any = '',
src/services/request.ts
@@ -42,6 +42,7 @@ import type { @@ -42,6 +42,7 @@ import type {
42 CommonAuditRequest, 42 CommonAuditRequest,
43 CompanyInfo, 43 CompanyInfo,
44 CompanyInfoDto, 44 CompanyInfoDto,
  45 + ConfirmInvoiceDTO,
45 CustomFieldRes, 46 CustomFieldRes,
46 CustomerCustomerListReq, 47 CustomerCustomerListReq,
47 CustomerDetailDto, 48 CustomerDetailDto,
@@ -54,6 +55,7 @@ import type { @@ -54,6 +55,7 @@ import type {
54 DistrictSearchDo, 55 DistrictSearchDo,
55 Dto, 56 Dto,
56 InventoryMaterialStockReq, 57 InventoryMaterialStockReq,
  58 + InvoiceBatchDownloadDto,
57 InvoiceDto, 59 InvoiceDto,
58 InvoiceRecordDTO, 60 InvoiceRecordDTO,
59 InvoiceRecordQueryRequest, 61 InvoiceRecordQueryRequest,
@@ -13965,6 +13967,77 @@ export const postServiceInvoiceApplyInvoice = /* #__PURE__ */ (() =&gt; { @@ -13965,6 +13967,77 @@ export const postServiceInvoiceApplyInvoice = /* #__PURE__ */ (() =&gt; {
13965 return request; 13967 return request;
13966 })(); 13968 })();
13967 13969
  13970 +/** @description request parameter type for postServiceInvoiceBatchDown */
  13971 +export interface PostServiceInvoiceBatchDownOption {
  13972 + /**
  13973 + * @description
  13974 + * dto
  13975 + */
  13976 + body: {
  13977 + /**
  13978 + @description
  13979 + dto */
  13980 + dto: InvoiceBatchDownloadDto;
  13981 + };
  13982 +}
  13983 +
  13984 +/** @description response type for postServiceInvoiceBatchDown */
  13985 +export interface PostServiceInvoiceBatchDownResponse {
  13986 + /**
  13987 + * @description
  13988 + * OK
  13989 + */
  13990 + 200: any;
  13991 + /**
  13992 + * @description
  13993 + * Created
  13994 + */
  13995 + 201: any;
  13996 + /**
  13997 + * @description
  13998 + * Unauthorized
  13999 + */
  14000 + 401: any;
  14001 + /**
  14002 + * @description
  14003 + * Forbidden
  14004 + */
  14005 + 403: any;
  14006 + /**
  14007 + * @description
  14008 + * Not Found
  14009 + */
  14010 + 404: any;
  14011 +}
  14012 +
  14013 +export type PostServiceInvoiceBatchDownResponseSuccess =
  14014 + PostServiceInvoiceBatchDownResponse[200];
  14015 +/**
  14016 + * @description
  14017 + * directDownFile
  14018 + * @tags 发票
  14019 + * @produces *
  14020 + * @consumes application/json
  14021 + */
  14022 +export const postServiceInvoiceBatchDown = /* #__PURE__ */ (() => {
  14023 + const method = 'post';
  14024 + const url = '/service/invoice/batchDown';
  14025 + function request(
  14026 + option: PostServiceInvoiceBatchDownOption,
  14027 + ): Promise<PostServiceInvoiceBatchDownResponseSuccess> {
  14028 + return requester(request.url, {
  14029 + method: request.method,
  14030 + ...option,
  14031 + }) as unknown as Promise<PostServiceInvoiceBatchDownResponseSuccess>;
  14032 + }
  14033 +
  14034 + /** http method */
  14035 + request.method = method;
  14036 + /** request url */
  14037 + request.url = url;
  14038 + return request;
  14039 +})();
  14040 +
13968 /** @description request parameter type for postServiceInvoiceCancelApply */ 14041 /** @description request parameter type for postServiceInvoiceCancelApply */
13969 export interface PostServiceInvoiceCancelApplyOption { 14042 export interface PostServiceInvoiceCancelApplyOption {
13970 /** 14043 /**
@@ -14179,6 +14252,77 @@ export const postServiceInvoiceCancelInvoiceRecord = /* #__PURE__ */ (() =&gt; { @@ -14179,6 +14252,77 @@ export const postServiceInvoiceCancelInvoiceRecord = /* #__PURE__ */ (() =&gt; {
14179 return request; 14252 return request;
14180 })(); 14253 })();
14181 14254
  14255 +/** @description request parameter type for postServiceInvoiceConfirmInvoice */
  14256 +export interface PostServiceInvoiceConfirmInvoiceOption {
  14257 + /**
  14258 + * @description
  14259 + * dto
  14260 + */
  14261 + body: {
  14262 + /**
  14263 + @description
  14264 + dto */
  14265 + dto: ConfirmInvoiceDTO;
  14266 + };
  14267 +}
  14268 +
  14269 +/** @description response type for postServiceInvoiceConfirmInvoice */
  14270 +export interface PostServiceInvoiceConfirmInvoiceResponse {
  14271 + /**
  14272 + * @description
  14273 + * OK
  14274 + */
  14275 + 200: ServerResult;
  14276 + /**
  14277 + * @description
  14278 + * Created
  14279 + */
  14280 + 201: any;
  14281 + /**
  14282 + * @description
  14283 + * Unauthorized
  14284 + */
  14285 + 401: any;
  14286 + /**
  14287 + * @description
  14288 + * Forbidden
  14289 + */
  14290 + 403: any;
  14291 + /**
  14292 + * @description
  14293 + * Not Found
  14294 + */
  14295 + 404: any;
  14296 +}
  14297 +
  14298 +export type PostServiceInvoiceConfirmInvoiceResponseSuccess =
  14299 + PostServiceInvoiceConfirmInvoiceResponse[200];
  14300 +/**
  14301 + * @description
  14302 + * 确认发票
  14303 + * @tags 发票
  14304 + * @produces *
  14305 + * @consumes application/json
  14306 + */
  14307 +export const postServiceInvoiceConfirmInvoice = /* #__PURE__ */ (() => {
  14308 + const method = 'post';
  14309 + const url = '/service/invoice/confirmInvoice';
  14310 + function request(
  14311 + option: PostServiceInvoiceConfirmInvoiceOption,
  14312 + ): Promise<PostServiceInvoiceConfirmInvoiceResponseSuccess> {
  14313 + return requester(request.url, {
  14314 + method: request.method,
  14315 + ...option,
  14316 + }) as unknown as Promise<PostServiceInvoiceConfirmInvoiceResponseSuccess>;
  14317 + }
  14318 +
  14319 + /** http method */
  14320 + request.method = method;
  14321 + /** request url */
  14322 + request.url = url;
  14323 + return request;
  14324 +})();
  14325 +
14182 /** @description request parameter type for postServiceInvoiceDealInvoicingResult */ 14326 /** @description request parameter type for postServiceInvoiceDealInvoicingResult */
14183 export interface PostServiceInvoiceDealInvoicingResultOption { 14327 export interface PostServiceInvoiceDealInvoicingResultOption {
14184 /** 14328 /**
@@ -14326,14 +14470,12 @@ export interface PostServiceInvoiceDownloadInvoiceOption { @@ -14326,14 +14470,12 @@ export interface PostServiceInvoiceDownloadInvoiceOption {
14326 /** 14470 /**
14327 * @description 14471 * @description
14328 * recodId 14472 * recodId
14329 - * @format int64  
14330 */ 14473 */
14331 - query?: { 14474 + body: {
14332 /** 14475 /**
14333 @description 14476 @description
14334 - recodId  
14335 - @format int64 */  
14336 - recodId?: number; 14477 + recodId */
  14478 + recodId: number;
14337 }; 14479 };
14338 } 14480 }
14339 14481
@@ -14379,7 +14521,7 @@ export const postServiceInvoiceDownloadInvoice = /* #__PURE__ */ (() =&gt; { @@ -14379,7 +14521,7 @@ export const postServiceInvoiceDownloadInvoice = /* #__PURE__ */ (() =&gt; {
14379 const method = 'post'; 14521 const method = 'post';
14380 const url = '/service/invoice/downloadInvoice'; 14522 const url = '/service/invoice/downloadInvoice';
14381 function request( 14523 function request(
14382 - option?: PostServiceInvoiceDownloadInvoiceOption, 14524 + option: PostServiceInvoiceDownloadInvoiceOption,
14383 ): Promise<PostServiceInvoiceDownloadInvoiceResponseSuccess> { 14525 ): Promise<PostServiceInvoiceDownloadInvoiceResponseSuccess> {
14384 return requester(request.url, { 14526 return requester(request.url, {
14385 method: request.method, 14527 method: request.method,