Commit 0233900d2bd7d100863e54a81734d3c7a04ac6a0

Authored by zhongnanhuang
1 parent a2cdaefa

feat: update 单位、单位联系人搜索下拉框

src/pages/Order/components/FinancialDrawer.tsx
@@ -147,13 +147,13 @@ export default ({ @@ -147,13 +147,13 @@ export default ({
147 width="lg" 147 width="lg"
148 label="是否完全开票" 148 label="是否完全开票"
149 options={[ 149 options={[
150 - { label: '部分开票', value: 'PARTIAL_INVOICING' },  
151 { label: '完全开票', value: 'COMPLETE_INVOICING' }, 150 { label: '完全开票', value: 'COMPLETE_INVOICING' },
  151 + { label: '部分开票', value: 'PARTIAL_INVOICING' },
152 ]} 152 ]}
153 // disabled={mainInfoDisbled} 153 // disabled={mainInfoDisbled}
154 initialValue={ 154 initialValue={
155 subOrders[0]?.afterInvoicingStatus === 'APPLY_FOR_INVOICING' 155 subOrders[0]?.afterInvoicingStatus === 'APPLY_FOR_INVOICING'
156 - ? 'PARTIAL_INVOICING' 156 + ? 'COMPLETE_INVOICING'
157 : subOrders[0]?.afterInvoicingStatus 157 : subOrders[0]?.afterInvoicingStatus
158 } 158 }
159 rules={[{ required: true, message: '是否完全开票必填' }]} 159 rules={[{ required: true, message: '是否完全开票必填' }]}
src/pages/Order/constant.ts
  1 +import { postServiceOrderQueryCustomerInformation } from '@/services';
1 import { enumToProTableEnumValue } from '@/utils'; 2 import { enumToProTableEnumValue } from '@/utils';
2 3
3 export const COMFIR_RECEIPT_IMAGES_NUMBER = 3; 4 export const COMFIR_RECEIPT_IMAGES_NUMBER = 3;
@@ -263,14 +264,51 @@ export const MAIN_ORDER_COLUMNS = [ @@ -263,14 +264,51 @@ export const MAIN_ORDER_COLUMNS = [
263 { 264 {
264 title: '单位', 265 title: '单位',
265 dataIndex: 'institution', 266 dataIndex: 'institution',
266 - valueType: 'text', 267 + valueType: 'select',
267 hideInTable: true, 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 title: '单位联系人', 288 title: '单位联系人',
271 dataIndex: 'institutionContactName', 289 dataIndex: 'institutionContactName',
272 - valueType: 'text', 290 + valueType: 'select',
273 hideInTable: true, 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 title: '收货人地址', 314 title: '收货人地址',
src/services/definition.ts
@@ -757,6 +757,24 @@ export interface QueryAnnexDto { @@ -757,6 +757,24 @@ export interface QueryAnnexDto {
757 subId?: number; 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 export interface QueryHistoryRecordDto { 778 export interface QueryHistoryRecordDto {
761 /** 779 /**
762 * @description 780 * @description
@@ -845,6 +863,11 @@ export interface View { @@ -845,6 +863,11 @@ export interface View {
845 export interface Dto { 863 export interface Dto {
846 /** 864 /**
847 * @description 865 * @description
  866 + * 发起开票后的开票状态
  867 + */
  868 + afterInvoicingStatus?: string;
  869 + /**
  870 + * @description
848 * 收款时间 871 * 收款时间
849 * @format date-time 872 * @format date-time
850 * @example 873 * @example
src/services/request.ts
@@ -26,6 +26,7 @@ import type { @@ -26,6 +26,7 @@ import type {
26 DictionaryQueryVO, 26 DictionaryQueryVO,
27 DictionaryVO, 27 DictionaryVO,
28 Dto, 28 Dto,
  29 + ModelAndView,
29 OrderAddVO, 30 OrderAddVO,
30 OrderAuditLogQueryVO, 31 OrderAuditLogQueryVO,
31 OrderBaseInfoQueryVO, 32 OrderBaseInfoQueryVO,
@@ -39,6 +40,7 @@ import type { @@ -39,6 +40,7 @@ import type {
39 ProcurePrintDto, 40 ProcurePrintDto,
40 ProductInformationDto, 41 ProductInformationDto,
41 QueryAnnexDto, 42 QueryAnnexDto,
  43 + QueryCustomerInformationDto,
42 QueryHistoryRecordDto, 44 QueryHistoryRecordDto,
43 QueryMainOrderDto, 45 QueryMainOrderDto,
44 QueryReportFormsDto, 46 QueryReportFormsDto,
@@ -224,9 +226,7 @@ export interface GetErrorResponse { @@ -224,9 +226,7 @@ export interface GetErrorResponse {
224 * @description 226 * @description
225 * OK 227 * OK
226 */ 228 */
227 - 200: {  
228 - [propertyName: string]: any;  
229 - }; 229 + 200: ModelAndView;
230 /** 230 /**
231 * @description 231 * @description
232 * Unauthorized 232 * Unauthorized
@@ -247,9 +247,9 @@ export interface GetErrorResponse { @@ -247,9 +247,9 @@ export interface GetErrorResponse {
247 export type GetErrorResponseSuccess = GetErrorResponse[200]; 247 export type GetErrorResponseSuccess = GetErrorResponse[200];
248 /** 248 /**
249 * @description 249 * @description
250 - * error 250 + * errorHtml
251 * @tags basic-error-controller 251 * @tags basic-error-controller
252 - * @produces * 252 + * @produces text/html
253 */ 253 */
254 export const getError = /* #__PURE__ */ (() => { 254 export const getError = /* #__PURE__ */ (() => {
255 const method = 'get'; 255 const method = 'get';
@@ -273,9 +273,7 @@ export interface PutErrorResponse { @@ -273,9 +273,7 @@ export interface PutErrorResponse {
273 * @description 273 * @description
274 * OK 274 * OK
275 */ 275 */
276 - 200: {  
277 - [propertyName: string]: any;  
278 - }; 276 + 200: ModelAndView;
279 /** 277 /**
280 * @description 278 * @description
281 * Created 279 * Created
@@ -301,9 +299,9 @@ export interface PutErrorResponse { @@ -301,9 +299,9 @@ export interface PutErrorResponse {
301 export type PutErrorResponseSuccess = PutErrorResponse[200]; 299 export type PutErrorResponseSuccess = PutErrorResponse[200];
302 /** 300 /**
303 * @description 301 * @description
304 - * error 302 + * errorHtml
305 * @tags basic-error-controller 303 * @tags basic-error-controller
306 - * @produces * 304 + * @produces text/html
307 * @consumes application/json 305 * @consumes application/json
308 */ 306 */
309 export const putError = /* #__PURE__ */ (() => { 307 export const putError = /* #__PURE__ */ (() => {
@@ -328,9 +326,7 @@ export interface PostErrorResponse { @@ -328,9 +326,7 @@ export interface PostErrorResponse {
328 * @description 326 * @description
329 * OK 327 * OK
330 */ 328 */
331 - 200: {  
332 - [propertyName: string]: any;  
333 - }; 329 + 200: ModelAndView;
334 /** 330 /**
335 * @description 331 * @description
336 * Created 332 * Created
@@ -356,9 +352,9 @@ export interface PostErrorResponse { @@ -356,9 +352,9 @@ export interface PostErrorResponse {
356 export type PostErrorResponseSuccess = PostErrorResponse[200]; 352 export type PostErrorResponseSuccess = PostErrorResponse[200];
357 /** 353 /**
358 * @description 354 * @description
359 - * error 355 + * errorHtml
360 * @tags basic-error-controller 356 * @tags basic-error-controller
361 - * @produces * 357 + * @produces text/html
362 * @consumes application/json 358 * @consumes application/json
363 */ 359 */
364 export const postError = /* #__PURE__ */ (() => { 360 export const postError = /* #__PURE__ */ (() => {
@@ -383,9 +379,7 @@ export interface DeleteErrorResponse { @@ -383,9 +379,7 @@ export interface DeleteErrorResponse {
383 * @description 379 * @description
384 * OK 380 * OK
385 */ 381 */
386 - 200: {  
387 - [propertyName: string]: any;  
388 - }; 382 + 200: ModelAndView;
389 /** 383 /**
390 * @description 384 * @description
391 * No Content 385 * No Content
@@ -406,9 +400,9 @@ export interface DeleteErrorResponse { @@ -406,9 +400,9 @@ export interface DeleteErrorResponse {
406 export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; 400 export type DeleteErrorResponseSuccess = DeleteErrorResponse[200];
407 /** 401 /**
408 * @description 402 * @description
409 - * error 403 + * errorHtml
410 * @tags basic-error-controller 404 * @tags basic-error-controller
411 - * @produces * 405 + * @produces text/html
412 */ 406 */
413 export const deleteError = /* #__PURE__ */ (() => { 407 export const deleteError = /* #__PURE__ */ (() => {
414 const method = 'delete'; 408 const method = 'delete';
@@ -432,9 +426,7 @@ export interface OptionsErrorResponse { @@ -432,9 +426,7 @@ export interface OptionsErrorResponse {
432 * @description 426 * @description
433 * OK 427 * OK
434 */ 428 */
435 - 200: {  
436 - [propertyName: string]: any;  
437 - }; 429 + 200: ModelAndView;
438 /** 430 /**
439 * @description 431 * @description
440 * No Content 432 * No Content
@@ -455,9 +447,9 @@ export interface OptionsErrorResponse { @@ -455,9 +447,9 @@ export interface OptionsErrorResponse {
455 export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; 447 export type OptionsErrorResponseSuccess = OptionsErrorResponse[200];
456 /** 448 /**
457 * @description 449 * @description
458 - * error 450 + * errorHtml
459 * @tags basic-error-controller 451 * @tags basic-error-controller
460 - * @produces * 452 + * @produces text/html
461 * @consumes application/json 453 * @consumes application/json
462 */ 454 */
463 export const optionsError = /* #__PURE__ */ (() => { 455 export const optionsError = /* #__PURE__ */ (() => {
@@ -482,9 +474,7 @@ export interface HeadErrorResponse { @@ -482,9 +474,7 @@ export interface HeadErrorResponse {
482 * @description 474 * @description
483 * OK 475 * OK
484 */ 476 */
485 - 200: {  
486 - [propertyName: string]: any;  
487 - }; 477 + 200: ModelAndView;
488 /** 478 /**
489 * @description 479 * @description
490 * No Content 480 * No Content
@@ -505,9 +495,9 @@ export interface HeadErrorResponse { @@ -505,9 +495,9 @@ export interface HeadErrorResponse {
505 export type HeadErrorResponseSuccess = HeadErrorResponse[200]; 495 export type HeadErrorResponseSuccess = HeadErrorResponse[200];
506 /** 496 /**
507 * @description 497 * @description
508 - * error 498 + * errorHtml
509 * @tags basic-error-controller 499 * @tags basic-error-controller
510 - * @produces * 500 + * @produces text/html
511 * @consumes application/json 501 * @consumes application/json
512 */ 502 */
513 export const headError = /* #__PURE__ */ (() => { 503 export const headError = /* #__PURE__ */ (() => {
@@ -532,9 +522,7 @@ export interface PatchErrorResponse { @@ -532,9 +522,7 @@ export interface PatchErrorResponse {
532 * @description 522 * @description
533 * OK 523 * OK
534 */ 524 */
535 - 200: {  
536 - [propertyName: string]: any;  
537 - }; 525 + 200: ModelAndView;
538 /** 526 /**
539 * @description 527 * @description
540 * No Content 528 * No Content
@@ -555,9 +543,9 @@ export interface PatchErrorResponse { @@ -555,9 +543,9 @@ export interface PatchErrorResponse {
555 export type PatchErrorResponseSuccess = PatchErrorResponse[200]; 543 export type PatchErrorResponseSuccess = PatchErrorResponse[200];
556 /** 544 /**
557 * @description 545 * @description
558 - * error 546 + * errorHtml
559 * @tags basic-error-controller 547 * @tags basic-error-controller
560 - * @produces * 548 + * @produces text/html
561 * @consumes application/json 549 * @consumes application/json
562 */ 550 */
563 export const patchError = /* #__PURE__ */ (() => { 551 export const patchError = /* #__PURE__ */ (() => {
@@ -6733,6 +6721,77 @@ export const getServiceOrderProvideToken = /* #__PURE__ */ (() => { @@ -6733,6 +6721,77 @@ export const getServiceOrderProvideToken = /* #__PURE__ */ (() => {
6733 return request; 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 /** @description request parameter type for postServiceOrderQueryCustomerNameInformation */ 6795 /** @description request parameter type for postServiceOrderQueryCustomerNameInformation */
6737 export interface PostServiceOrderQueryCustomerNameInformationOption { 6796 export interface PostServiceOrderQueryCustomerNameInformationOption {
6738 /** 6797 /**