Commit bf328dd10ca04875c8610679fa2a2fc12caccc86

Authored by zhongnanhuang
1 parent b9d40c58

feat: update 指标修改

src/pages/Order/components/FinancialEditDrawer.tsx
... ... @@ -8,10 +8,15 @@ export default ({ subOrders, setVisible, onClose }) => {
8 8 const subOrderIds = subOrders?.map((subOrder) => {
9 9 return subOrder?.id;
10 10 });
11   - const [form] = Form.useForm<{ collectMoneyTime: string; subIds: [] }>();
  11 + const [form] = Form.useForm<{
  12 + collectMoneyTime: string;
  13 + subIds: [];
  14 + financialReceiptIssuanceTime: string;
  15 + }>();
12 16 return (
13 17 <DrawerForm<{
14 18 collectMoneyTime: string;
  19 + financialReceiptIssuanceTime: string;
15 20 subIds: [];
16 21 }>
17 22 open
... ... @@ -35,6 +40,9 @@ export default ({ subOrders, setVisible, onClose }) =&gt; {
35 40 data: {
36 41 subIds: subOrderIds,
37 42 collectMoneyTime: form.getFieldValue('collectMoneyTime'),
  43 + financialReceiptIssuanceTime: form.getFieldValue(
  44 + 'financialReceiptIssuanceTime',
  45 + ),
38 46 },
39 47 });
40 48 if (res.result === RESPONSE_CODE.SUCCESS) {
... ... @@ -47,10 +55,18 @@ export default ({ subOrders, setVisible, onClose }) =&gt; {
47 55 }}
48 56 >
49 57 <ProFormDatePicker
  58 + key="financialReceiptIssuanceTime"
  59 + width="lg"
  60 + name="financialReceiptIssuanceTime"
  61 + rules={[{ required: true, message: '收据时间必填' }]}
  62 + label="开收据时间"
  63 + />
  64 + <ProFormDatePicker
50 65 key="collectMoneyTime"
51 66 width="lg"
52 67 name="collectMoneyTime"
53 68 label="收款时间"
  69 + rules={[{ required: true, message: '收款时间必填' }]}
54 70 />
55 71 </DrawerForm>
56 72 );
... ...
src/pages/OrderReport/components/OrderStatisticCard.tsx
1 1 import { RESPONSE_CODE } from '@/constants/enum';
2 2 import { postServiceOrderUpdateReportFormsTarget } from '@/services';
3 3 import Icon, { EditTwoTone } from '@ant-design/icons';
4   -import { ModalForm, ProCard, ProFormDigit } from '@ant-design/pro-components';
  4 +import {
  5 + ModalForm,
  6 + ProCard,
  7 + ProFormDatePicker,
  8 + ProFormDigit,
  9 +} from '@ant-design/pro-components';
5 10 import { Flex, Form, message } from 'antd';
6 11 import { useState } from 'react';
7 12  
... ... @@ -11,6 +16,7 @@ export default ({ data, statisticsMethod, reFreshData }) =&gt; {
11 16 statisticsMethod: string;
12 17 target: number;
13 18 daysOfMonth: number;
  19 + month: string;
14 20 }>();
15 21 const [targetValue, setTargetValue] = useState(0);
16 22  
... ... @@ -103,12 +109,12 @@ export default ({ data, statisticsMethod, reFreshData }) =&gt; {
103 109 <Flex vertical>
104 110 <Flex>
105 111 <Flex align="center">
106   - <span className="text-base pr-1">{unit}</span>
  112 + <span className="pr-1 text-base">{unit}</span>
107 113 <div style={{ width: 'max-content', display: 'flex' }}>
108 114 <span className="text-2xl">
109 115 {content}
110 116 {editable ? (
111   - <span className="text-xs pl-1">
  117 + <span className="pl-1 text-xs">
112 118 {statisticsMethod === 'YEAR_STATISTICS' ? '每年' : '每月'}
113 119 </span>
114 120 ) : (
... ... @@ -140,7 +146,7 @@ export default ({ data, statisticsMethod, reFreshData }) =&gt; {
140 146 ) : (
141 147 <span className="text-2xl">
142 148 {content}
143   - {editable ? <span className="text-xs px-1">每月</span> : ''}
  149 + {editable ? <span className="px-1 text-xs">每月</span> : ''}
144 150 </span>
145 151 )
146 152 ) : (
... ... @@ -150,7 +156,7 @@ export default ({ data, statisticsMethod, reFreshData }) =&gt; {
150 156 {!editable ? (
151 157 <span className="text-2xl">
152 158 {content}
153   - {editable ? <span className="text-xs pl-1">每月</span> : ''}
  159 + {editable ? <span className="pl-1 text-xs">每月</span> : ''}
154 160 </span>
155 161 ) : (
156 162 ''
... ... @@ -265,6 +271,7 @@ export default ({ data, statisticsMethod, reFreshData }) =&gt; {
265 271 statisticsMethod: string;
266 272 target: number;
267 273 daysOfMonth: number;
  274 + month: string;
268 275 }>
269 276 title="编辑指标"
270 277 width={500}
... ... @@ -296,6 +303,17 @@ export default ({ data, statisticsMethod, reFreshData }) =&gt; {
296 303 placeholder="请输入指标"
297 304 rules={[{ required: true, message: '指标必填' }]}
298 305 />
  306 + <ProFormDatePicker
  307 + width="md"
  308 + name="month"
  309 + fieldProps={{
  310 + picker: 'month',
  311 + format: 'YYYY-MM',
  312 + }}
  313 + label="日期"
  314 + placeholder="请输入日期"
  315 + rules={[{ required: true, message: '日期必填' }]}
  316 + />
299 317  
300 318 {statisticsMethod === 'MONTH_STATISTICS' ? (
301 319 <ProFormDigit
... ...
src/services/definition.ts
... ... @@ -300,6 +300,7 @@ export interface AdminUserVO {
300 300 id?: number;
301 301 isAdmin?: boolean;
302 302 nickName?: string;
  303 + parentName?: string;
303 304 password?: string;
304 305 phone?: string;
305 306 /** @format date-time */
... ... @@ -894,16 +895,6 @@ export interface View {
894 895 contentType?: string;
895 896 }
896 897  
897   -export interface YearMonth {
898   - leapYear?: boolean;
899   - /** @format int32 */
900   - month?: number;
901   - /** @format int32 */
902   - monthValue?: number;
903   - /** @format int32 */
904   - year?: number;
905   -}
906   -
907 898 export interface Dto {
908 899 /**
909 900 * @description
... ...
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,
... ... @@ -229,7 +228,9 @@ export interface GetErrorResponse {
229 228 * @description
230 229 * OK
231 230 */
232   - 200: ModelAndView;
  231 + 200: {
  232 + [propertyName: string]: any;
  233 + };
233 234 /**
234 235 * @description
235 236 * Unauthorized
... ... @@ -250,9 +251,9 @@ export interface GetErrorResponse {
250 251 export type GetErrorResponseSuccess = GetErrorResponse[200];
251 252 /**
252 253 * @description
253   - * errorHtml
  254 + * error
254 255 * @tags basic-error-controller
255   - * @produces text/html
  256 + * @produces *
256 257 */
257 258 export const getError = /* #__PURE__ */ (() => {
258 259 const method = 'get';
... ... @@ -276,7 +277,9 @@ export interface PutErrorResponse {
276 277 * @description
277 278 * OK
278 279 */
279   - 200: ModelAndView;
  280 + 200: {
  281 + [propertyName: string]: any;
  282 + };
280 283 /**
281 284 * @description
282 285 * Created
... ... @@ -302,9 +305,9 @@ export interface PutErrorResponse {
302 305 export type PutErrorResponseSuccess = PutErrorResponse[200];
303 306 /**
304 307 * @description
305   - * errorHtml
  308 + * error
306 309 * @tags basic-error-controller
307   - * @produces text/html
  310 + * @produces *
308 311 * @consumes application/json
309 312 */
310 313 export const putError = /* #__PURE__ */ (() => {
... ... @@ -329,7 +332,9 @@ export interface PostErrorResponse {
329 332 * @description
330 333 * OK
331 334 */
332   - 200: ModelAndView;
  335 + 200: {
  336 + [propertyName: string]: any;
  337 + };
333 338 /**
334 339 * @description
335 340 * Created
... ... @@ -355,9 +360,9 @@ export interface PostErrorResponse {
355 360 export type PostErrorResponseSuccess = PostErrorResponse[200];
356 361 /**
357 362 * @description
358   - * errorHtml
  363 + * error
359 364 * @tags basic-error-controller
360   - * @produces text/html
  365 + * @produces *
361 366 * @consumes application/json
362 367 */
363 368 export const postError = /* #__PURE__ */ (() => {
... ... @@ -382,7 +387,9 @@ export interface DeleteErrorResponse {
382 387 * @description
383 388 * OK
384 389 */
385   - 200: ModelAndView;
  390 + 200: {
  391 + [propertyName: string]: any;
  392 + };
386 393 /**
387 394 * @description
388 395 * No Content
... ... @@ -403,9 +410,9 @@ export interface DeleteErrorResponse {
403 410 export type DeleteErrorResponseSuccess = DeleteErrorResponse[200];
404 411 /**
405 412 * @description
406   - * errorHtml
  413 + * error
407 414 * @tags basic-error-controller
408   - * @produces text/html
  415 + * @produces *
409 416 */
410 417 export const deleteError = /* #__PURE__ */ (() => {
411 418 const method = 'delete';
... ... @@ -429,7 +436,9 @@ export interface OptionsErrorResponse {
429 436 * @description
430 437 * OK
431 438 */
432   - 200: ModelAndView;
  439 + 200: {
  440 + [propertyName: string]: any;
  441 + };
433 442 /**
434 443 * @description
435 444 * No Content
... ... @@ -450,9 +459,9 @@ export interface OptionsErrorResponse {
450 459 export type OptionsErrorResponseSuccess = OptionsErrorResponse[200];
451 460 /**
452 461 * @description
453   - * errorHtml
  462 + * error
454 463 * @tags basic-error-controller
455   - * @produces text/html
  464 + * @produces *
456 465 * @consumes application/json
457 466 */
458 467 export const optionsError = /* #__PURE__ */ (() => {
... ... @@ -477,7 +486,9 @@ export interface HeadErrorResponse {
477 486 * @description
478 487 * OK
479 488 */
480   - 200: ModelAndView;
  489 + 200: {
  490 + [propertyName: string]: any;
  491 + };
481 492 /**
482 493 * @description
483 494 * No Content
... ... @@ -498,9 +509,9 @@ export interface HeadErrorResponse {
498 509 export type HeadErrorResponseSuccess = HeadErrorResponse[200];
499 510 /**
500 511 * @description
501   - * errorHtml
  512 + * error
502 513 * @tags basic-error-controller
503   - * @produces text/html
  514 + * @produces *
504 515 * @consumes application/json
505 516 */
506 517 export const headError = /* #__PURE__ */ (() => {
... ... @@ -525,7 +536,9 @@ export interface PatchErrorResponse {
525 536 * @description
526 537 * OK
527 538 */
528   - 200: ModelAndView;
  539 + 200: {
  540 + [propertyName: string]: any;
  541 + };
529 542 /**
530 543 * @description
531 544 * No Content
... ... @@ -546,9 +559,9 @@ export interface PatchErrorResponse {
546 559 export type PatchErrorResponseSuccess = PatchErrorResponse[200];
547 560 /**
548 561 * @description
549   - * errorHtml
  562 + * error
550 563 * @tags basic-error-controller
551   - * @produces text/html
  564 + * @produces *
552 565 * @consumes application/json
553 566 */
554 567 export const patchError = /* #__PURE__ */ (() => {
... ... @@ -7063,6 +7076,60 @@ export const postServiceOrderQueryAfterSalesInfoSnapshot =
7063 7076 return request;
7064 7077 })();
7065 7078  
  7079 +/** @description response type for postServiceOrderQueryAnnualTarget */
  7080 +export interface PostServiceOrderQueryAnnualTargetResponse {
  7081 + /**
  7082 + * @description
  7083 + * OK
  7084 + */
  7085 + 200: ServerResult;
  7086 + /**
  7087 + * @description
  7088 + * Created
  7089 + */
  7090 + 201: any;
  7091 + /**
  7092 + * @description
  7093 + * Unauthorized
  7094 + */
  7095 + 401: any;
  7096 + /**
  7097 + * @description
  7098 + * Forbidden
  7099 + */
  7100 + 403: any;
  7101 + /**
  7102 + * @description
  7103 + * Not Found
  7104 + */
  7105 + 404: any;
  7106 +}
  7107 +
  7108 +export type PostServiceOrderQueryAnnualTargetResponseSuccess =
  7109 + PostServiceOrderQueryAnnualTargetResponse[200];
  7110 +/**
  7111 + * @description
  7112 + * 查询年度指标
  7113 + * @tags 内部订单
  7114 + * @produces *
  7115 + * @consumes application/json
  7116 + */
  7117 +export const postServiceOrderQueryAnnualTarget = /* #__PURE__ */ (() => {
  7118 + const method = 'post';
  7119 + const url = '/service/order/queryAnnualTarget';
  7120 + function request(): Promise<PostServiceOrderQueryAnnualTargetResponseSuccess> {
  7121 + return requester(request.url, {
  7122 + method: request.method,
  7123 + }) as unknown as Promise<PostServiceOrderQueryAnnualTargetResponseSuccess>;
  7124 + }
  7125 +
  7126 + /** http method */
  7127 + request.method = method;
  7128 + /** request url */
  7129 + request.url = url;
  7130 + return request;
  7131 +})();
  7132 +
7066 7133 /** @description request parameter type for postServiceOrderQueryCustomerInformation */
7067 7134 export interface PostServiceOrderQueryCustomerInformationOption {
7068 7135 /**
... ... @@ -7758,6 +7825,60 @@ export const postServiceOrderSupplierSendOrder = /* #__PURE__ */ (() =&gt; {
7758 7825 return request;
7759 7826 })();
7760 7827  
  7828 +/** @description response type for postServiceOrderTest */
  7829 +export interface PostServiceOrderTestResponse {
  7830 + /**
  7831 + * @description
  7832 + * OK
  7833 + */
  7834 + 200: ServerResult;
  7835 + /**
  7836 + * @description
  7837 + * Created
  7838 + */
  7839 + 201: any;
  7840 + /**
  7841 + * @description
  7842 + * Unauthorized
  7843 + */
  7844 + 401: any;
  7845 + /**
  7846 + * @description
  7847 + * Forbidden
  7848 + */
  7849 + 403: any;
  7850 + /**
  7851 + * @description
  7852 + * Not Found
  7853 + */
  7854 + 404: any;
  7855 +}
  7856 +
  7857 +export type PostServiceOrderTestResponseSuccess =
  7858 + PostServiceOrderTestResponse[200];
  7859 +/**
  7860 + * @description
  7861 + * 测试
  7862 + * @tags 内部订单
  7863 + * @produces *
  7864 + * @consumes application/json
  7865 + */
  7866 +export const postServiceOrderTest = /* #__PURE__ */ (() => {
  7867 + const method = 'post';
  7868 + const url = '/service/order/test';
  7869 + function request(): Promise<PostServiceOrderTestResponseSuccess> {
  7870 + return requester(request.url, {
  7871 + method: request.method,
  7872 + }) as unknown as Promise<PostServiceOrderTestResponseSuccess>;
  7873 + }
  7874 +
  7875 + /** http method */
  7876 + request.method = method;
  7877 + /** request url */
  7878 + request.url = url;
  7879 + return request;
  7880 +})();
  7881 +
7761 7882 /** @description request parameter type for postServiceOrderUpdateAnnex */
7762 7883 export interface PostServiceOrderUpdateAnnexOption {
7763 7884 /**
... ...