Commit d1027ece84ad2f0a5e9307609e903ec2043f52bc
1 parent
ef98ebab
chore(release): 调整导入模板下载功能并优化发票相关组件
- 将 ClientImportModal 组件中的 orderExport函数改为 downloadFile 函数 - 修改 Invoice 页面常量,将开票日期和收款时间的值类型改为 dateRange - 隐藏 Invoice 页面中的收款时间字段在搜索中的显示
Showing
2 changed files
with
10 additions
and
4 deletions
src/pages/Client/Client/Components/ClientImportModal.tsx
1 | 1 | import { RESPONSE_CODE } from '@/constants/enum'; |
2 | -import { orderExport } from '@/services/order'; | |
2 | +import { downloadFile } from '@/services/order'; | |
3 | 3 | import { blobToJson } from '@/utils'; |
4 | 4 | import { ModalForm, ProFormUploadDragger } from '@ant-design/pro-components'; |
5 | 5 | import { Button, Form, message } from 'antd'; |
... | ... | @@ -15,7 +15,7 @@ export default ({ reloadTable }) => { |
15 | 15 | content: '正在导入...', |
16 | 16 | duration: 0, |
17 | 17 | }); |
18 | - orderExport( | |
18 | + downloadFile( | |
19 | 19 | '/api/admin/client/downloadImportTemplate', |
20 | 20 | '客户导入模板.xlsx', |
21 | 21 | 'post', | ... | ... |
src/pages/Invoice/constant.tsx
... | ... | @@ -181,8 +181,7 @@ export const INVOICE_COLUMNS = [ |
181 | 181 | }, |
182 | 182 | { |
183 | 183 | title: '开票日期', |
184 | - dataIndex: 'invoicingTime', | |
185 | - valueType: 'date', | |
184 | + valueType: 'dateRange', | |
186 | 185 | width: 150, |
187 | 186 | hideInTable: true, |
188 | 187 | search: { |
... | ... | @@ -200,6 +199,13 @@ export const INVOICE_COLUMNS = [ |
200 | 199 | title: '收款时间', |
201 | 200 | dataIndex: 'collectionTime', |
202 | 201 | valueType: 'date', |
202 | + hideInSearch: true, | |
203 | + width: 200, | |
204 | + }, | |
205 | + { | |
206 | + title: '收款时间', | |
207 | + valueType: 'dateRange', | |
208 | + hideInTable: true, | |
203 | 209 | width: 200, |
204 | 210 | search: { |
205 | 211 | transform: (value) => { | ... | ... |