Commit 0233900d2bd7d100863e54a81734d3c7a04ac6a0
1 parent
a2cdaefa
feat: update 单位、单位联系人搜索下拉框
Showing
4 changed files
with
159 additions
and
39 deletions
src/pages/Order/components/FinancialDrawer.tsx
... | ... | @@ -147,13 +147,13 @@ export default ({ |
147 | 147 | width="lg" |
148 | 148 | label="是否完全开票" |
149 | 149 | options={[ |
150 | - { label: '部分开票', value: 'PARTIAL_INVOICING' }, | |
151 | 150 | { label: '完全开票', value: 'COMPLETE_INVOICING' }, |
151 | + { label: '部分开票', value: 'PARTIAL_INVOICING' }, | |
152 | 152 | ]} |
153 | 153 | // disabled={mainInfoDisbled} |
154 | 154 | initialValue={ |
155 | 155 | subOrders[0]?.afterInvoicingStatus === 'APPLY_FOR_INVOICING' |
156 | - ? 'PARTIAL_INVOICING' | |
156 | + ? 'COMPLETE_INVOICING' | |
157 | 157 | : subOrders[0]?.afterInvoicingStatus |
158 | 158 | } |
159 | 159 | rules={[{ required: true, message: '是否完全开票必填' }]} | ... | ... |
src/pages/Order/constant.ts
1 | +import { postServiceOrderQueryCustomerInformation } from '@/services'; | |
1 | 2 | import { enumToProTableEnumValue } from '@/utils'; |
2 | 3 | |
3 | 4 | export const COMFIR_RECEIPT_IMAGES_NUMBER = 3; |
... | ... | @@ -263,14 +264,51 @@ export const MAIN_ORDER_COLUMNS = [ |
263 | 264 | { |
264 | 265 | title: '单位', |
265 | 266 | dataIndex: 'institution', |
266 | - valueType: 'text', | |
267 | + valueType: 'select', | |
267 | 268 | hideInTable: true, |
269 | + fieldProps: { | |
270 | + showSearch: true, | |
271 | + }, | |
272 | + request: async (value, { params }) => { | |
273 | + const keywords = value.keyWords; | |
274 | + const { data } = await postServiceOrderQueryCustomerInformation({ | |
275 | + data: { name: 'institution', institution: keywords }, | |
276 | + params: params, | |
277 | + }); | |
278 | + let options = data.map((c: any) => { | |
279 | + return { | |
280 | + label: c.orderValue, | |
281 | + value: c.orderValue, | |
282 | + }; | |
283 | + }); | |
284 | + return options; | |
285 | + }, | |
268 | 286 | }, |
269 | 287 | { |
270 | 288 | title: '单位联系人', |
271 | 289 | dataIndex: 'institutionContactName', |
272 | - valueType: 'text', | |
290 | + valueType: 'select', | |
273 | 291 | hideInTable: true, |
292 | + fieldProps: { | |
293 | + showSearch: true, | |
294 | + }, | |
295 | + request: async (value, { params }) => { | |
296 | + const keywords = value.keyWords; | |
297 | + const { data } = await postServiceOrderQueryCustomerInformation({ | |
298 | + data: { | |
299 | + name: 'institutionContactName', | |
300 | + institutionContactName: keywords, | |
301 | + }, | |
302 | + params: params, | |
303 | + }); | |
304 | + let options = data.map((c: any) => { | |
305 | + return { | |
306 | + label: c.orderValue, | |
307 | + value: c.orderValue, | |
308 | + }; | |
309 | + }); | |
310 | + return options; | |
311 | + }, | |
274 | 312 | }, |
275 | 313 | { |
276 | 314 | title: '收货人地址', | ... | ... |
src/services/definition.ts
... | ... | @@ -757,6 +757,24 @@ export interface QueryAnnexDto { |
757 | 757 | subId?: number; |
758 | 758 | } |
759 | 759 | |
760 | +export interface QueryCustomerInformationDto { | |
761 | + /** | |
762 | + * @description | |
763 | + * 单位 | |
764 | + */ | |
765 | + institution?: string; | |
766 | + /** | |
767 | + * @description | |
768 | + * 单位联系人 | |
769 | + */ | |
770 | + institutionContactName?: string; | |
771 | + /** | |
772 | + * @description | |
773 | + * 名称 | |
774 | + */ | |
775 | + name?: string; | |
776 | +} | |
777 | + | |
760 | 778 | export interface QueryHistoryRecordDto { |
761 | 779 | /** |
762 | 780 | * @description |
... | ... | @@ -845,6 +863,11 @@ export interface View { |
845 | 863 | export interface Dto { |
846 | 864 | /** |
847 | 865 | * @description |
866 | + * 发起开票后的开票状态 | |
867 | + */ | |
868 | + afterInvoicingStatus?: string; | |
869 | + /** | |
870 | + * @description | |
848 | 871 | * 收款时间 |
849 | 872 | * @format date-time |
850 | 873 | * @example | ... | ... |
src/services/request.ts
... | ... | @@ -26,6 +26,7 @@ import type { |
26 | 26 | DictionaryQueryVO, |
27 | 27 | DictionaryVO, |
28 | 28 | Dto, |
29 | + ModelAndView, | |
29 | 30 | OrderAddVO, |
30 | 31 | OrderAuditLogQueryVO, |
31 | 32 | OrderBaseInfoQueryVO, |
... | ... | @@ -39,6 +40,7 @@ import type { |
39 | 40 | ProcurePrintDto, |
40 | 41 | ProductInformationDto, |
41 | 42 | QueryAnnexDto, |
43 | + QueryCustomerInformationDto, | |
42 | 44 | QueryHistoryRecordDto, |
43 | 45 | QueryMainOrderDto, |
44 | 46 | QueryReportFormsDto, |
... | ... | @@ -224,9 +226,7 @@ export interface GetErrorResponse { |
224 | 226 | * @description |
225 | 227 | * OK |
226 | 228 | */ |
227 | - 200: { | |
228 | - [propertyName: string]: any; | |
229 | - }; | |
229 | + 200: ModelAndView; | |
230 | 230 | /** |
231 | 231 | * @description |
232 | 232 | * Unauthorized |
... | ... | @@ -247,9 +247,9 @@ export interface GetErrorResponse { |
247 | 247 | export type GetErrorResponseSuccess = GetErrorResponse[200]; |
248 | 248 | /** |
249 | 249 | * @description |
250 | - * error | |
250 | + * errorHtml | |
251 | 251 | * @tags basic-error-controller |
252 | - * @produces * | |
252 | + * @produces text/html | |
253 | 253 | */ |
254 | 254 | export const getError = /* #__PURE__ */ (() => { |
255 | 255 | const method = 'get'; |
... | ... | @@ -273,9 +273,7 @@ export interface PutErrorResponse { |
273 | 273 | * @description |
274 | 274 | * OK |
275 | 275 | */ |
276 | - 200: { | |
277 | - [propertyName: string]: any; | |
278 | - }; | |
276 | + 200: ModelAndView; | |
279 | 277 | /** |
280 | 278 | * @description |
281 | 279 | * Created |
... | ... | @@ -301,9 +299,9 @@ export interface PutErrorResponse { |
301 | 299 | export type PutErrorResponseSuccess = PutErrorResponse[200]; |
302 | 300 | /** |
303 | 301 | * @description |
304 | - * error | |
302 | + * errorHtml | |
305 | 303 | * @tags basic-error-controller |
306 | - * @produces * | |
304 | + * @produces text/html | |
307 | 305 | * @consumes application/json |
308 | 306 | */ |
309 | 307 | export const putError = /* #__PURE__ */ (() => { |
... | ... | @@ -328,9 +326,7 @@ export interface PostErrorResponse { |
328 | 326 | * @description |
329 | 327 | * OK |
330 | 328 | */ |
331 | - 200: { | |
332 | - [propertyName: string]: any; | |
333 | - }; | |
329 | + 200: ModelAndView; | |
334 | 330 | /** |
335 | 331 | * @description |
336 | 332 | * Created |
... | ... | @@ -356,9 +352,9 @@ export interface PostErrorResponse { |
356 | 352 | export type PostErrorResponseSuccess = PostErrorResponse[200]; |
357 | 353 | /** |
358 | 354 | * @description |
359 | - * error | |
355 | + * errorHtml | |
360 | 356 | * @tags basic-error-controller |
361 | - * @produces * | |
357 | + * @produces text/html | |
362 | 358 | * @consumes application/json |
363 | 359 | */ |
364 | 360 | export const postError = /* #__PURE__ */ (() => { |
... | ... | @@ -383,9 +379,7 @@ export interface DeleteErrorResponse { |
383 | 379 | * @description |
384 | 380 | * OK |
385 | 381 | */ |
386 | - 200: { | |
387 | - [propertyName: string]: any; | |
388 | - }; | |
382 | + 200: ModelAndView; | |
389 | 383 | /** |
390 | 384 | * @description |
391 | 385 | * No Content |
... | ... | @@ -406,9 +400,9 @@ export interface DeleteErrorResponse { |
406 | 400 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; |
407 | 401 | /** |
408 | 402 | * @description |
409 | - * error | |
403 | + * errorHtml | |
410 | 404 | * @tags basic-error-controller |
411 | - * @produces * | |
405 | + * @produces text/html | |
412 | 406 | */ |
413 | 407 | export const deleteError = /* #__PURE__ */ (() => { |
414 | 408 | const method = 'delete'; |
... | ... | @@ -432,9 +426,7 @@ export interface OptionsErrorResponse { |
432 | 426 | * @description |
433 | 427 | * OK |
434 | 428 | */ |
435 | - 200: { | |
436 | - [propertyName: string]: any; | |
437 | - }; | |
429 | + 200: ModelAndView; | |
438 | 430 | /** |
439 | 431 | * @description |
440 | 432 | * No Content |
... | ... | @@ -455,9 +447,9 @@ export interface OptionsErrorResponse { |
455 | 447 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; |
456 | 448 | /** |
457 | 449 | * @description |
458 | - * error | |
450 | + * errorHtml | |
459 | 451 | * @tags basic-error-controller |
460 | - * @produces * | |
452 | + * @produces text/html | |
461 | 453 | * @consumes application/json |
462 | 454 | */ |
463 | 455 | export const optionsError = /* #__PURE__ */ (() => { |
... | ... | @@ -482,9 +474,7 @@ export interface HeadErrorResponse { |
482 | 474 | * @description |
483 | 475 | * OK |
484 | 476 | */ |
485 | - 200: { | |
486 | - [propertyName: string]: any; | |
487 | - }; | |
477 | + 200: ModelAndView; | |
488 | 478 | /** |
489 | 479 | * @description |
490 | 480 | * No Content |
... | ... | @@ -505,9 +495,9 @@ export interface HeadErrorResponse { |
505 | 495 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; |
506 | 496 | /** |
507 | 497 | * @description |
508 | - * error | |
498 | + * errorHtml | |
509 | 499 | * @tags basic-error-controller |
510 | - * @produces * | |
500 | + * @produces text/html | |
511 | 501 | * @consumes application/json |
512 | 502 | */ |
513 | 503 | export const headError = /* #__PURE__ */ (() => { |
... | ... | @@ -532,9 +522,7 @@ export interface PatchErrorResponse { |
532 | 522 | * @description |
533 | 523 | * OK |
534 | 524 | */ |
535 | - 200: { | |
536 | - [propertyName: string]: any; | |
537 | - }; | |
525 | + 200: ModelAndView; | |
538 | 526 | /** |
539 | 527 | * @description |
540 | 528 | * No Content |
... | ... | @@ -555,9 +543,9 @@ export interface PatchErrorResponse { |
555 | 543 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; |
556 | 544 | /** |
557 | 545 | * @description |
558 | - * error | |
546 | + * errorHtml | |
559 | 547 | * @tags basic-error-controller |
560 | - * @produces * | |
548 | + * @produces text/html | |
561 | 549 | * @consumes application/json |
562 | 550 | */ |
563 | 551 | export const patchError = /* #__PURE__ */ (() => { |
... | ... | @@ -6733,6 +6721,77 @@ export const getServiceOrderProvideToken = /* #__PURE__ */ (() => { |
6733 | 6721 | return request; |
6734 | 6722 | })(); |
6735 | 6723 | |
6724 | +/** @description request parameter type for postServiceOrderQueryCustomerInformation */ | |
6725 | +export interface PostServiceOrderQueryCustomerInformationOption { | |
6726 | + /** | |
6727 | + * @description | |
6728 | + * dto | |
6729 | + */ | |
6730 | + body: { | |
6731 | + /** | |
6732 | + @description | |
6733 | + dto */ | |
6734 | + dto: QueryCustomerInformationDto; | |
6735 | + }; | |
6736 | +} | |
6737 | + | |
6738 | +/** @description response type for postServiceOrderQueryCustomerInformation */ | |
6739 | +export interface PostServiceOrderQueryCustomerInformationResponse { | |
6740 | + /** | |
6741 | + * @description | |
6742 | + * OK | |
6743 | + */ | |
6744 | + 200: ServerResult; | |
6745 | + /** | |
6746 | + * @description | |
6747 | + * Created | |
6748 | + */ | |
6749 | + 201: any; | |
6750 | + /** | |
6751 | + * @description | |
6752 | + * Unauthorized | |
6753 | + */ | |
6754 | + 401: any; | |
6755 | + /** | |
6756 | + * @description | |
6757 | + * Forbidden | |
6758 | + */ | |
6759 | + 403: any; | |
6760 | + /** | |
6761 | + * @description | |
6762 | + * Not Found | |
6763 | + */ | |
6764 | + 404: any; | |
6765 | +} | |
6766 | + | |
6767 | +export type PostServiceOrderQueryCustomerInformationResponseSuccess = | |
6768 | + PostServiceOrderQueryCustomerInformationResponse[200]; | |
6769 | +/** | |
6770 | + * @description | |
6771 | + * 查询收货人信息 | |
6772 | + * @tags 内部订单 | |
6773 | + * @produces * | |
6774 | + * @consumes application/json | |
6775 | + */ | |
6776 | +export const postServiceOrderQueryCustomerInformation = /* #__PURE__ */ (() => { | |
6777 | + const method = 'post'; | |
6778 | + const url = '/service/order/queryCustomerInformation'; | |
6779 | + function request( | |
6780 | + option: PostServiceOrderQueryCustomerInformationOption, | |
6781 | + ): Promise<PostServiceOrderQueryCustomerInformationResponseSuccess> { | |
6782 | + return requester(request.url, { | |
6783 | + method: request.method, | |
6784 | + ...option, | |
6785 | + }) as unknown as Promise<PostServiceOrderQueryCustomerInformationResponseSuccess>; | |
6786 | + } | |
6787 | + | |
6788 | + /** http method */ | |
6789 | + request.method = method; | |
6790 | + /** request url */ | |
6791 | + request.url = url; | |
6792 | + return request; | |
6793 | +})(); | |
6794 | + | |
6736 | 6795 | /** @description request parameter type for postServiceOrderQueryCustomerNameInformation */ |
6737 | 6796 | export interface PostServiceOrderQueryCustomerNameInformationOption { |
6738 | 6797 | /** | ... | ... |