Commit 6f84726726a480405cf92566129c7e75e7adeed2
1 parent
bd6b5f8c
feat: update
Showing
9 changed files
with
353 additions
and
146 deletions
src/pages/Order/index.tsx
... | ... | @@ -158,11 +158,31 @@ const OrderPage = () => { |
158 | 158 | // window.addEventListener('resize', resize); |
159 | 159 | // }); |
160 | 160 | |
161 | - const onCheckboxChange = (itemKey: never) => { | |
162 | - const newSelectedItems = selectedItems.includes(itemKey) | |
163 | - ? selectedItems.filter((key) => key !== itemKey) | |
164 | - : [...selectedItems, itemKey]; | |
165 | - | |
161 | + const onCheckboxChange = (record: never) => { | |
162 | + let newSelectedItems = []; | |
163 | + if (selectedItems.includes(record.id)) { | |
164 | + newSelectedItems = selectedItems.filter((key) => key !== record.id); | |
165 | + setSelectedRowKeys([]); | |
166 | + setSelectedRowObj({ | |
167 | + ...setSelectedRowObj, | |
168 | + [record.id]: [], | |
169 | + }); | |
170 | + selectedRowObj[record.id] = []; | |
171 | + setSelectedRows([]); | |
172 | + } else { | |
173 | + newSelectedItems = [...selectedItems, record.id]; | |
174 | + //子订单全部自动选中 | |
175 | + let subIds = record.subOrderInformationLists?.map((item) => { | |
176 | + return item.id; | |
177 | + }); | |
178 | + setSelectedRowKeys(subIds); | |
179 | + setSelectedRowObj({ | |
180 | + ...setSelectedRowObj, | |
181 | + [record.id]: record.subOrderInformationLists, | |
182 | + }); | |
183 | + selectedRowObj[record.id] = record.subOrderInformationLists; | |
184 | + setSelectedRows(record.subOrderInformationLists); | |
185 | + } | |
166 | 186 | setSelectedItems(newSelectedItems); |
167 | 187 | }; |
168 | 188 | const handleTableExpand = (mainOrderIds: any) => { |
... | ... | @@ -592,7 +612,7 @@ const OrderPage = () => { |
592 | 612 | <Flex> |
593 | 613 | <Flex> |
594 | 614 | <Checkbox |
595 | - onChange={() => onCheckboxChange(record.id)} | |
615 | + onChange={() => onCheckboxChange(record)} | |
596 | 616 | checked={selectedItems.includes(record.id)} |
597 | 617 | > |
598 | 618 | <Space split={<Divider type="vertical" />}> |
... | ... | @@ -610,7 +630,7 @@ const OrderPage = () => { |
610 | 630 | </div> |
611 | 631 | <div |
612 | 632 | title={record.institution} |
613 | - className="whitespace-no-wrap overflow-hidden overflow-ellipsis max-w-[256px]" | |
633 | + className="whitespace-no-wrap overflow-hidden overflow-ellipsis max-w-[150px]" | |
614 | 634 | > |
615 | 635 | <span className="text-[#8C8C8C]">单位:</span> |
616 | 636 | <span className="text-slate-700">{record.institution}</span> | ... | ... |
src/pages/OrderReport/components/OrderDualAxes.tsx
1 | 1 | import { DualAxes } from '@ant-design/charts'; |
2 | 2 | |
3 | -const OrderDualAxes = () => { | |
4 | - const uvBillData = [ | |
5 | - { | |
6 | - time: '2019-03', | |
7 | - value: 300, | |
8 | - type: '指标', | |
9 | - }, | |
10 | - { | |
11 | - time: '2019-04', | |
12 | - value: 300, | |
13 | - type: '指标', | |
14 | - }, | |
15 | - { | |
16 | - time: '2019-05', | |
17 | - value: 300, | |
18 | - type: '指标', | |
19 | - }, | |
20 | - { | |
21 | - time: '2019-06', | |
22 | - value: 300, | |
23 | - type: '指标', | |
24 | - }, | |
25 | - { | |
26 | - time: '2019-07', | |
27 | - value: 300, | |
28 | - type: '指标', | |
29 | - }, | |
30 | - { | |
31 | - time: '2019-03', | |
32 | - value: 220, | |
33 | - type: '营业额', | |
34 | - }, | |
35 | - { | |
36 | - time: '2019-04', | |
37 | - value: 300, | |
38 | - type: '营业额', | |
39 | - }, | |
40 | - { | |
41 | - time: '2019-05', | |
42 | - value: 250, | |
43 | - type: '营业额', | |
44 | - }, | |
45 | - { | |
46 | - time: '2019-06', | |
47 | - value: 220, | |
48 | - type: '营业额', | |
49 | - }, | |
50 | - { | |
51 | - time: '2019-07', | |
52 | - value: 362, | |
53 | - type: '营业额', | |
54 | - }, | |
55 | - ]; | |
56 | - const transformData = [ | |
57 | - { | |
58 | - time: '2019-03', | |
59 | - count: 800, | |
60 | - name: '订单量', | |
61 | - }, | |
62 | - { | |
63 | - time: '2019-04', | |
64 | - count: 600, | |
65 | - name: '订单量', | |
66 | - }, | |
67 | - { | |
68 | - time: '2019-05', | |
69 | - count: 400, | |
70 | - name: '订单量', | |
71 | - }, | |
72 | - { | |
73 | - time: '2019-06', | |
74 | - count: 380, | |
75 | - name: '订单量', | |
76 | - }, | |
77 | - { | |
78 | - time: '2019-07', | |
79 | - count: 220, | |
80 | - name: '订单量', | |
81 | - }, | |
82 | - ]; | |
3 | +const OrderDualAxes = ({ data }) => { | |
83 | 4 | const config = { |
84 | - data: [uvBillData, transformData], | |
85 | - xField: 'time', | |
86 | - yField: ['value', 'count'], | |
5 | + data: [ | |
6 | + data.targetAndTotalPaymentDtoList === undefined | |
7 | + ? [] | |
8 | + : data.targetAndTotalPaymentDtoList, | |
9 | + data.orderNumberDtoList === undefined ? [] : data.orderNumberDtoList, | |
10 | + ], | |
11 | + xField: 'curTime', | |
12 | + yField: ['curDayTotalPayment', 'curDayTotalOrderNumber'], | |
87 | 13 | geometryOptions: [ |
88 | 14 | { |
89 | 15 | geometry: 'line', | ... | ... |
src/pages/OrderReport/components/OrderStatisticCard.tsx
... | ... | @@ -3,7 +3,7 @@ import { ProCard } from '@ant-design/pro-components'; |
3 | 3 | import { Flex, InputNumber } from 'antd'; |
4 | 4 | import { useState } from 'react'; |
5 | 5 | |
6 | -export default () => { | |
6 | +export default ({ data }) => { | |
7 | 7 | const [edit, setEdit] = useState(false); |
8 | 8 | |
9 | 9 | const UpBig = () => ( |
... | ... | @@ -85,14 +85,18 @@ export default () => { |
85 | 85 | <Flex> |
86 | 86 | <Flex align="center"> |
87 | 87 | <span className="text-base pr-1">{unit}</span> |
88 | - <div> | |
88 | + <div className={editable ? 'w-[120px]' : ''}> | |
89 | 89 | {editable ? ( |
90 | 90 | edit ? ( |
91 | - <InputNumber placeholder="请输入指标(¥)" size="small" /> | |
91 | + <InputNumber | |
92 | + placeholder="请输入指标(¥)" | |
93 | + width={200} | |
94 | + max={100000000} | |
95 | + /> | |
92 | 96 | ) : ( |
93 | 97 | <span className="text-2xl"> |
94 | 98 | {content} |
95 | - {editable ? <span className="text-xs pl-1">每月</span> : ''} | |
99 | + {editable ? <span className="text-xs px-1">每月</span> : ''} | |
96 | 100 | </span> |
97 | 101 | ) |
98 | 102 | ) : ( |
... | ... | @@ -111,13 +115,14 @@ export default () => { |
111 | 115 | {editable ? ( |
112 | 116 | edit ? ( |
113 | 117 | <CheckCircleTwoTone |
114 | - width={200} | |
118 | + style={{ fontSize: '20px', paddingLeft: '5px' }} | |
115 | 119 | onClick={() => { |
116 | 120 | setEdit(false); |
117 | 121 | }} |
118 | 122 | /> |
119 | 123 | ) : ( |
120 | 124 | <EditTwoTone |
125 | + style={{ fontSize: '20px' }} | |
121 | 126 | onClick={() => { |
122 | 127 | setEdit(true); |
123 | 128 | }} |
... | ... | @@ -145,7 +150,7 @@ export default () => { |
145 | 150 | > |
146 | 151 | <CardContent |
147 | 152 | unit="¥" |
148 | - content={2332222} | |
153 | + content={data.totalPayment} | |
149 | 154 | sameMonthPercentageChange={20} |
150 | 155 | /> |
151 | 156 | </ProCard> |
... | ... | @@ -154,28 +159,39 @@ export default () => { |
154 | 159 | title={<CardTitle title={'指标'} />} |
155 | 160 | bordered |
156 | 161 | > |
157 | - <CardContent unit="¥" content={50000} editable={true} /> | |
162 | + <CardContent unit="¥" content={data.target} editable={true} /> | |
158 | 163 | </ProCard> |
159 | 164 | <ProCard |
160 | 165 | className="order-statictis-card" |
161 | 166 | title={<CardTitle title={'总订单量'} />} |
162 | 167 | bordered |
163 | 168 | > |
164 | - <CardContent unit="单" content={2212} sameMonthPercentageChange={-15} /> | |
169 | + <CardContent | |
170 | + unit="单" | |
171 | + content={data.totalOrderNumber} | |
172 | + sameMonthPercentageChange={-15} | |
173 | + /> | |
174 | + </ProCard> | |
175 | + <ProCard | |
176 | + className="order-statictis-card" | |
177 | + title={<CardTitle title={'总子订单量'} />} | |
178 | + bordered | |
179 | + > | |
180 | + <CardContent unit="单" content={data.subTotalOrderNumber} /> | |
165 | 181 | </ProCard> |
166 | 182 | <ProCard |
167 | 183 | className="order-statictis-card" |
168 | 184 | title={<CardTitle title={'未审核订单'} />} |
169 | 185 | bordered |
170 | 186 | > |
171 | - <CardContent unit="¥" content={2212} /> | |
187 | + <CardContent unit="单" content={data.unCheckOrderNumber} /> | |
172 | 188 | </ProCard> |
173 | 189 | <ProCard |
174 | 190 | className="order-statictis-card" |
175 | 191 | title={<CardTitle title={'未发货订单'} />} |
176 | 192 | bordered |
177 | 193 | > |
178 | - <CardContent unit="¥" content={212} /> | |
194 | + <CardContent unit="单" content={data.unSendOrderNumber} /> | |
179 | 195 | </ProCard> |
180 | 196 | </ProCard> |
181 | 197 | ); | ... | ... |
src/pages/OrderReport/components/OrderStatisticSearch.tsx deleted
100644 → 0
1 | -import { | |
2 | - ProFormDatePicker, | |
3 | - ProFormText, | |
4 | - QueryFilter, | |
5 | -} from '@ant-design/pro-components'; | |
6 | - | |
7 | -const OrderStatisticSearch = () => { | |
8 | - return ( | |
9 | - <QueryFilter defaultCollapsed split className="!p-0"> | |
10 | - <ProFormText name="name" label="应用名称" /> | |
11 | - <ProFormDatePicker name="createDate" label="创建时间" /> | |
12 | - </QueryFilter> | |
13 | - ); | |
14 | -}; | |
15 | - | |
16 | -export default OrderStatisticSearch; |
src/pages/OrderReport/index.less
... | ... | @@ -5,3 +5,14 @@ |
5 | 5 | .order-statictis-card { |
6 | 6 | height: 100%; |
7 | 7 | } |
8 | + | |
9 | +//将报表卡片的extra左边内容调到适中位置 | |
10 | +#order-dual-axes-card .ant-pro-card-extra { | |
11 | + width: 60%; | |
12 | + max-height: 24px; | |
13 | +} | |
14 | + | |
15 | +//报表卡片中tabs作为单选项,去掉多余的margin | |
16 | +#order-dual-axes-card .ant-tabs-nav { | |
17 | + margin: 0; | |
18 | +} | ... | ... |
src/pages/OrderReport/index.tsx
1 | +import { postServiceOrderQueryReportFormsInformation } from '@/services'; | |
2 | +import { enumToSelect } from '@/utils'; | |
1 | 3 | import { EllipsisOutlined } from '@ant-design/icons'; |
2 | -import { PageContainer, ProCard } from '@ant-design/pro-components'; | |
3 | -import { Avatar, Button, Dropdown, Space, Tag } from 'antd'; | |
4 | +import { | |
5 | + PageContainer, | |
6 | + ProCard, | |
7 | + ProFormSelect, | |
8 | + QueryFilter, | |
9 | +} from '@ant-design/pro-components'; | |
10 | +import { history } from '@umijs/max'; | |
11 | +import { | |
12 | + Avatar, | |
13 | + Button, | |
14 | + Dropdown, | |
15 | + Flex, | |
16 | + Form, | |
17 | + Space, | |
18 | + Spin, | |
19 | + Tabs, | |
20 | + TabsProps, | |
21 | + Tag, | |
22 | +} from 'antd'; | |
23 | +import { useEffect, useState } from 'react'; | |
24 | +import { | |
25 | + PRODUCT_BELONG_DEPARTMENT_OPTIONS, | |
26 | + SALES_CODE_OPTIONS, | |
27 | +} from '../Order/constant'; | |
4 | 28 | import OrderDualAxes from './components/OrderDualAxes'; |
5 | 29 | import OrderStatisticCard from './components/OrderStatisticCard'; |
6 | -import OrderStatisticSearch from './components/OrderStatisticSearch'; | |
7 | 30 | import './index.less'; |
8 | 31 | const userInfo = JSON.parse(localStorage.getItem('userInfo')); |
9 | 32 | |
10 | 33 | const OrderReportPage = () => { |
34 | + const [form] = Form.useForm<{ | |
35 | + salesCode: ''; | |
36 | + productBelongBusiness: ''; | |
37 | + dateRange: ''; | |
38 | + }>(); | |
39 | + const [statisticData, setStatisticData] = useState([]); | |
40 | + const [loading, setLoading] = useState(false); | |
41 | + const onChange = (key: string) => { | |
42 | + console.log(key); | |
43 | + }; | |
44 | + | |
45 | + /** | |
46 | + * 加载页面数据 | |
47 | + */ | |
48 | + const loadData = async () => { | |
49 | + setLoading(true); | |
50 | + let body = { | |
51 | + statisticsMethod: '', | |
52 | + salesCode: form.getFieldValue('salesCode'), | |
53 | + productBelongBusiness: form.getFieldValue('productBelongBusiness'), | |
54 | + // beginTime:"", | |
55 | + // endTime:"" | |
56 | + }; | |
57 | + | |
58 | + // if(form.getFieldValue("dateRange")!==undefined){ | |
59 | + // body.beginTime=formatDate(form.getFieldValue("dateRange")[0]), | |
60 | + // body.endTime=formatDate(form.getFieldValue("dateRange")[1]) | |
61 | + // } | |
62 | + body.statisticsMethod = 'MONTH_STATISTICS'; | |
63 | + const { data } = await postServiceOrderQueryReportFormsInformation({ | |
64 | + data: body, | |
65 | + }); | |
66 | + setStatisticData(data); | |
67 | + setLoading(false); | |
68 | + }; | |
69 | + | |
70 | + useEffect(() => { | |
71 | + loadData(); | |
72 | + }, []); | |
73 | + | |
74 | + const items: TabsProps['items'] = [ | |
75 | + { | |
76 | + key: 'MONTH_STATISTICS', | |
77 | + label: '本月统计', | |
78 | + children: '', | |
79 | + }, | |
80 | + { | |
81 | + key: 'YEAR_STATISTICS', | |
82 | + label: '本年统计', | |
83 | + children: '', | |
84 | + }, | |
85 | + ]; | |
11 | 86 | return ( |
12 | 87 | <PageContainer |
13 | - className="order-page-container" | |
14 | 88 | header={{ |
15 | 89 | title: '订单汇总', |
16 | 90 | extra: [ |
... | ... | @@ -46,13 +120,57 @@ const OrderReportPage = () => { |
46 | 120 | }} |
47 | 121 | > |
48 | 122 | <Space direction="vertical" size="middle" className="flex"> |
49 | - <OrderStatisticCard /> | |
123 | + <Spin spinning={loading}> | |
124 | + <OrderStatisticCard data={statisticData} /> | |
125 | + </Spin> | |
126 | + | |
50 | 127 | <ProCard tooltip="这是提示" bordered> |
51 | - <OrderStatisticSearch /> | |
128 | + <QueryFilter | |
129 | + split | |
130 | + className="!p-0 order-statistic-search" | |
131 | + labelWidth="auto" | |
132 | + form={form} | |
133 | + onFinish={async () => { | |
134 | + loadData(); | |
135 | + return true; | |
136 | + }} | |
137 | + > | |
138 | + <ProFormSelect | |
139 | + name="salesCode" | |
140 | + key="salesCode" | |
141 | + showSearch | |
142 | + label="销售代表" | |
143 | + placeholder="请输入销售代表" | |
144 | + options={SALES_CODE_OPTIONS} | |
145 | + /> | |
146 | + <ProFormSelect | |
147 | + key="productBelongBusiness" | |
148 | + placeholder="请输入所属事业部" | |
149 | + name="productBelongBusiness" | |
150 | + label="所属事业部" | |
151 | + options={enumToSelect(PRODUCT_BELONG_DEPARTMENT_OPTIONS)} | |
152 | + /> | |
153 | + {/* <ProFormDateRangePicker | |
154 | + key="dateRange" | |
155 | + name="dateRange" | |
156 | + label="时间" | |
157 | + /> */} | |
158 | + </QueryFilter> | |
52 | 159 | </ProCard> |
53 | 160 | |
54 | - <ProCard title="带卡片阴影" extra="extra" tooltip="这是提示" bordered> | |
55 | - <OrderDualAxes /> | |
161 | + <ProCard | |
162 | + id="order-dual-axes-card" | |
163 | + title="统计图表" | |
164 | + extra={ | |
165 | + <Flex> | |
166 | + <Tabs defaultActiveKey="1" items={items} onChange={onChange} /> | |
167 | + </Flex> | |
168 | + } | |
169 | + bordered | |
170 | + > | |
171 | + <Spin spinning={loading}> | |
172 | + <OrderDualAxes data={statisticData} /> | |
173 | + </Spin> | |
56 | 174 | </ProCard> |
57 | 175 | </Space> |
58 | 176 | </PageContainer> | ... | ... |
src/services/definition.ts
... | ... | @@ -730,6 +730,40 @@ export interface QueryMainOrderDto { |
730 | 730 | customerName?: string; |
731 | 731 | } |
732 | 732 | |
733 | +export interface QueryReportFormsDto { | |
734 | + /** | |
735 | + * @description | |
736 | + * 开始时间 | |
737 | + * @format date-time | |
738 | + * @example | |
739 | + * 2023-12-10 12:55:55 | |
740 | + */ | |
741 | + beginTime?: string; | |
742 | + /** | |
743 | + * @description | |
744 | + * 结束时间 | |
745 | + * @format date-time | |
746 | + * @example | |
747 | + * 2023-12-10 12:55:55 | |
748 | + */ | |
749 | + endTime?: string; | |
750 | + /** | |
751 | + * @description | |
752 | + * 所属部门 | |
753 | + */ | |
754 | + productBelongBusiness?: string; | |
755 | + /** | |
756 | + * @description | |
757 | + * 销售代表 | |
758 | + */ | |
759 | + salesCode?: string; | |
760 | + /** | |
761 | + * @description | |
762 | + * 统计方式 | |
763 | + */ | |
764 | + statisticsMethod?: string; | |
765 | +} | |
766 | + | |
733 | 767 | export interface ResetPwdVO { |
734 | 768 | /** @format int64 */ |
735 | 769 | userId?: number; | ... | ... |
src/services/request.ts
... | ... | @@ -26,7 +26,6 @@ import type { |
26 | 26 | DictionaryQueryVO, |
27 | 27 | DictionaryVO, |
28 | 28 | Dto, |
29 | - ModelAndView, | |
30 | 29 | OrderAddVO, |
31 | 30 | OrderAuditLogQueryVO, |
32 | 31 | OrderBaseInfoQueryVO, |
... | ... | @@ -39,6 +38,7 @@ import type { |
39 | 38 | QueryAnnexDto, |
40 | 39 | QueryHistoryRecordDto, |
41 | 40 | QueryMainOrderDto, |
41 | + QueryReportFormsDto, | |
42 | 42 | ResetPwdVO, |
43 | 43 | ServerResult, |
44 | 44 | SysLogQueryVO, |
... | ... | @@ -221,7 +221,9 @@ export interface GetErrorResponse { |
221 | 221 | * @description |
222 | 222 | * OK |
223 | 223 | */ |
224 | - 200: ModelAndView; | |
224 | + 200: { | |
225 | + [propertyName: string]: any; | |
226 | + }; | |
225 | 227 | /** |
226 | 228 | * @description |
227 | 229 | * Unauthorized |
... | ... | @@ -242,9 +244,9 @@ export interface GetErrorResponse { |
242 | 244 | export type GetErrorResponseSuccess = GetErrorResponse[200]; |
243 | 245 | /** |
244 | 246 | * @description |
245 | - * errorHtml | |
247 | + * error | |
246 | 248 | * @tags basic-error-controller |
247 | - * @produces text/html | |
249 | + * @produces * | |
248 | 250 | */ |
249 | 251 | export const getError = /* #__PURE__ */ (() => { |
250 | 252 | const method = 'get'; |
... | ... | @@ -268,7 +270,9 @@ export interface PutErrorResponse { |
268 | 270 | * @description |
269 | 271 | * OK |
270 | 272 | */ |
271 | - 200: ModelAndView; | |
273 | + 200: { | |
274 | + [propertyName: string]: any; | |
275 | + }; | |
272 | 276 | /** |
273 | 277 | * @description |
274 | 278 | * Created |
... | ... | @@ -294,9 +298,9 @@ export interface PutErrorResponse { |
294 | 298 | export type PutErrorResponseSuccess = PutErrorResponse[200]; |
295 | 299 | /** |
296 | 300 | * @description |
297 | - * errorHtml | |
301 | + * error | |
298 | 302 | * @tags basic-error-controller |
299 | - * @produces text/html | |
303 | + * @produces * | |
300 | 304 | * @consumes application/json |
301 | 305 | */ |
302 | 306 | export const putError = /* #__PURE__ */ (() => { |
... | ... | @@ -321,7 +325,9 @@ export interface PostErrorResponse { |
321 | 325 | * @description |
322 | 326 | * OK |
323 | 327 | */ |
324 | - 200: ModelAndView; | |
328 | + 200: { | |
329 | + [propertyName: string]: any; | |
330 | + }; | |
325 | 331 | /** |
326 | 332 | * @description |
327 | 333 | * Created |
... | ... | @@ -347,9 +353,9 @@ export interface PostErrorResponse { |
347 | 353 | export type PostErrorResponseSuccess = PostErrorResponse[200]; |
348 | 354 | /** |
349 | 355 | * @description |
350 | - * errorHtml | |
356 | + * error | |
351 | 357 | * @tags basic-error-controller |
352 | - * @produces text/html | |
358 | + * @produces * | |
353 | 359 | * @consumes application/json |
354 | 360 | */ |
355 | 361 | export const postError = /* #__PURE__ */ (() => { |
... | ... | @@ -374,7 +380,9 @@ export interface DeleteErrorResponse { |
374 | 380 | * @description |
375 | 381 | * OK |
376 | 382 | */ |
377 | - 200: ModelAndView; | |
383 | + 200: { | |
384 | + [propertyName: string]: any; | |
385 | + }; | |
378 | 386 | /** |
379 | 387 | * @description |
380 | 388 | * No Content |
... | ... | @@ -395,9 +403,9 @@ export interface DeleteErrorResponse { |
395 | 403 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; |
396 | 404 | /** |
397 | 405 | * @description |
398 | - * errorHtml | |
406 | + * error | |
399 | 407 | * @tags basic-error-controller |
400 | - * @produces text/html | |
408 | + * @produces * | |
401 | 409 | */ |
402 | 410 | export const deleteError = /* #__PURE__ */ (() => { |
403 | 411 | const method = 'delete'; |
... | ... | @@ -421,7 +429,9 @@ export interface OptionsErrorResponse { |
421 | 429 | * @description |
422 | 430 | * OK |
423 | 431 | */ |
424 | - 200: ModelAndView; | |
432 | + 200: { | |
433 | + [propertyName: string]: any; | |
434 | + }; | |
425 | 435 | /** |
426 | 436 | * @description |
427 | 437 | * No Content |
... | ... | @@ -442,9 +452,9 @@ export interface OptionsErrorResponse { |
442 | 452 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; |
443 | 453 | /** |
444 | 454 | * @description |
445 | - * errorHtml | |
455 | + * error | |
446 | 456 | * @tags basic-error-controller |
447 | - * @produces text/html | |
457 | + * @produces * | |
448 | 458 | * @consumes application/json |
449 | 459 | */ |
450 | 460 | export const optionsError = /* #__PURE__ */ (() => { |
... | ... | @@ -469,7 +479,9 @@ export interface HeadErrorResponse { |
469 | 479 | * @description |
470 | 480 | * OK |
471 | 481 | */ |
472 | - 200: ModelAndView; | |
482 | + 200: { | |
483 | + [propertyName: string]: any; | |
484 | + }; | |
473 | 485 | /** |
474 | 486 | * @description |
475 | 487 | * No Content |
... | ... | @@ -490,9 +502,9 @@ export interface HeadErrorResponse { |
490 | 502 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; |
491 | 503 | /** |
492 | 504 | * @description |
493 | - * errorHtml | |
505 | + * error | |
494 | 506 | * @tags basic-error-controller |
495 | - * @produces text/html | |
507 | + * @produces * | |
496 | 508 | * @consumes application/json |
497 | 509 | */ |
498 | 510 | export const headError = /* #__PURE__ */ (() => { |
... | ... | @@ -517,7 +529,9 @@ export interface PatchErrorResponse { |
517 | 529 | * @description |
518 | 530 | * OK |
519 | 531 | */ |
520 | - 200: ModelAndView; | |
532 | + 200: { | |
533 | + [propertyName: string]: any; | |
534 | + }; | |
521 | 535 | /** |
522 | 536 | * @description |
523 | 537 | * No Content |
... | ... | @@ -538,9 +552,9 @@ export interface PatchErrorResponse { |
538 | 552 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; |
539 | 553 | /** |
540 | 554 | * @description |
541 | - * errorHtml | |
555 | + * error | |
542 | 556 | * @tags basic-error-controller |
543 | - * @produces text/html | |
557 | + * @produces * | |
544 | 558 | * @consumes application/json |
545 | 559 | */ |
546 | 560 | export const patchError = /* #__PURE__ */ (() => { |
... | ... | @@ -6219,6 +6233,78 @@ export const postServiceOrderQueryProductInformation = /* #__PURE__ */ (() => { |
6219 | 6233 | return request; |
6220 | 6234 | })(); |
6221 | 6235 | |
6236 | +/** @description request parameter type for postServiceOrderQueryReportFormsInformation */ | |
6237 | +export interface PostServiceOrderQueryReportFormsInformationOption { | |
6238 | + /** | |
6239 | + * @description | |
6240 | + * dto | |
6241 | + */ | |
6242 | + body: { | |
6243 | + /** | |
6244 | + @description | |
6245 | + dto */ | |
6246 | + dto: QueryReportFormsDto; | |
6247 | + }; | |
6248 | +} | |
6249 | + | |
6250 | +/** @description response type for postServiceOrderQueryReportFormsInformation */ | |
6251 | +export interface PostServiceOrderQueryReportFormsInformationResponse { | |
6252 | + /** | |
6253 | + * @description | |
6254 | + * OK | |
6255 | + */ | |
6256 | + 200: ServerResult; | |
6257 | + /** | |
6258 | + * @description | |
6259 | + * Created | |
6260 | + */ | |
6261 | + 201: any; | |
6262 | + /** | |
6263 | + * @description | |
6264 | + * Unauthorized | |
6265 | + */ | |
6266 | + 401: any; | |
6267 | + /** | |
6268 | + * @description | |
6269 | + * Forbidden | |
6270 | + */ | |
6271 | + 403: any; | |
6272 | + /** | |
6273 | + * @description | |
6274 | + * Not Found | |
6275 | + */ | |
6276 | + 404: any; | |
6277 | +} | |
6278 | + | |
6279 | +export type PostServiceOrderQueryReportFormsInformationResponseSuccess = | |
6280 | + PostServiceOrderQueryReportFormsInformationResponse[200]; | |
6281 | +/** | |
6282 | + * @description | |
6283 | + * 查询报表 | |
6284 | + * @tags 内部订单 | |
6285 | + * @produces * | |
6286 | + * @consumes application/json | |
6287 | + */ | |
6288 | +export const postServiceOrderQueryReportFormsInformation = | |
6289 | + /* #__PURE__ */ (() => { | |
6290 | + const method = 'post'; | |
6291 | + const url = '/service/order/queryReportFormsInformation'; | |
6292 | + function request( | |
6293 | + option: PostServiceOrderQueryReportFormsInformationOption, | |
6294 | + ): Promise<PostServiceOrderQueryReportFormsInformationResponseSuccess> { | |
6295 | + return requester(request.url, { | |
6296 | + method: request.method, | |
6297 | + ...option, | |
6298 | + }) as unknown as Promise<PostServiceOrderQueryReportFormsInformationResponseSuccess>; | |
6299 | + } | |
6300 | + | |
6301 | + /** http method */ | |
6302 | + request.method = method; | |
6303 | + /** request url */ | |
6304 | + request.url = url; | |
6305 | + return request; | |
6306 | + })(); | |
6307 | + | |
6222 | 6308 | /** @description request parameter type for postServiceOrderQueryServiceOrder */ |
6223 | 6309 | export interface PostServiceOrderQueryServiceOrderOption { |
6224 | 6310 | /** | ... | ... |
src/utils/index.ts
... | ... | @@ -55,6 +55,17 @@ function formatDateTime(inputDateTime: string) { |
55 | 55 | return formattedDateTime; |
56 | 56 | } |
57 | 57 | |
58 | +function formatdate(inputDateTime: string) { | |
59 | + const parsedDateTime = new Date(inputDateTime); | |
60 | + | |
61 | + const year = parsedDateTime.getFullYear(); | |
62 | + const month = String(parsedDateTime.getMonth() + 1).padStart(2, '0'); | |
63 | + const day = String(parsedDateTime.getDate()).padStart(2, '0'); | |
64 | + | |
65 | + const formattedDate = `${year}-${month}-${day}`; | |
66 | + return formattedDate; | |
67 | +} | |
68 | + | |
58 | 69 | function formatSalesCode(salesCode: any) { |
59 | 70 | let newSalesCode = salesCode; |
60 | 71 | if (newSalesCode.indexOf('_')) { |
... | ... | @@ -143,6 +154,7 @@ export { |
143 | 154 | enumValueToLabel, |
144 | 155 | formatDateTime, |
145 | 156 | formatSalesCode, |
157 | + formatdate, | |
146 | 158 | getAliYunOSSFileNameFromUrl, |
147 | 159 | getUserInfo, |
148 | 160 | }; | ... | ... |