上传设置接口对接
This commit is contained in:
		| @ -1,5 +1,5 @@ | |||||||
| import { Component, OnInit } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
| import { SFSchema, SFUISchema } from '@delon/form'; | import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; | ||||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||||
| import { ReportingService } from '../../services/reporting.service'; | import { ReportingService } from '../../services/reporting.service'; | ||||||
|  |  | ||||||
| @ -8,8 +8,9 @@ import { ReportingService } from '../../services/reporting.service'; | |||||||
|   templateUrl: './upload-setting.component.html', |   templateUrl: './upload-setting.component.html', | ||||||
| }) | }) | ||||||
| export class DatatableReportingUploadSettingComponent implements OnInit { | export class DatatableReportingUploadSettingComponent implements OnInit { | ||||||
|  |   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||||
|   record: any = {}; |   record: any = {}; | ||||||
|   i: any = {}; |   i: any; | ||||||
|   schema!: SFSchema; |   schema!: SFSchema; | ||||||
|   ui!: SFUISchema; |   ui!: SFUISchema; | ||||||
|  |  | ||||||
| @ -20,7 +21,7 @@ export class DatatableReportingUploadSettingComponent implements OnInit { | |||||||
|  |  | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|     this.initSF(); |     this.initSF(); | ||||||
|     // this.loadData(); |     this.loadData(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
| @ -29,17 +30,17 @@ export class DatatableReportingUploadSettingComponent implements OnInit { | |||||||
|   initSF() { |   initSF() { | ||||||
|     this.schema = { |     this.schema = { | ||||||
|       properties: { |       properties: { | ||||||
|         no: { |         orderPushType: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '订单数据', |           title: '订单数据', | ||||||
|           enum: [ |           enum: [ | ||||||
|             { |             { | ||||||
|               label: '手动上传', |               label: '手动上传', | ||||||
|               value: '1' |               value: 1 | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|               label: '自动上传', |               label: '自动上传', | ||||||
|               value: '2' |               value: 2 | ||||||
|             } |             } | ||||||
|           ], |           ], | ||||||
|           description: '开启自动上传后,订单将在支付完成且风险单校验通过后自动上传', |           description: '开启自动上传后,订单将在支付完成且风险单校验通过后自动上传', | ||||||
| @ -48,17 +49,17 @@ export class DatatableReportingUploadSettingComponent implements OnInit { | |||||||
|  |  | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         owner: { |         capitalPushType: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '资金数据', |           title: '资金数据', | ||||||
|           enum: [ |           enum: [ | ||||||
|             { |             { | ||||||
|               label: '手动上传', |               label: '手动上传', | ||||||
|               value: '1' |               value: 1 | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|               label: '自动上传', |               label: '自动上传', | ||||||
|               value: '2' |               value: 2 | ||||||
|             } |             } | ||||||
|           ], |           ], | ||||||
|           description: '开启自动上传后,订单将在支付完成且风险单校验通过后自动上传', |           description: '开启自动上传后,订单将在支付完成且风险单校验通过后自动上传', | ||||||
| @ -68,7 +69,7 @@ export class DatatableReportingUploadSettingComponent implements OnInit { | |||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|       }, |       }, | ||||||
|       required: ['owner', 'no'], |       required: ['orderPushType', 'capitalPushType'], | ||||||
|     } |     } | ||||||
|     this.ui = { |     this.ui = { | ||||||
|       '*': { |       '*': { | ||||||
| @ -85,7 +86,6 @@ export class DatatableReportingUploadSettingComponent implements OnInit { | |||||||
|     this.service.request(this.service.$api_get_upload_setting, {}).subscribe(res => { |     this.service.request(this.service.$api_get_upload_setting, {}).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|         this.i = res; |         this.i = res; | ||||||
|  |  | ||||||
|       } |       } | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
| @ -95,12 +95,13 @@ export class DatatableReportingUploadSettingComponent implements OnInit { | |||||||
|    * @param value |    * @param value | ||||||
|    */ |    */ | ||||||
|   save(value: any): void { |   save(value: any): void { | ||||||
|     this.service.request(this.service.$api_upload_setting_save, { ...value }).subscribe(res => { |     if (this.sf?.valid) | ||||||
|       if (res) { |       this.service.request(this.service.$api_upload_setting_save, { ...value }).subscribe(res => { | ||||||
|         this.service.msgSrv.success('保存成功'); |         if (res) { | ||||||
|         this.modal.close(true); |           this.service.msgSrv.success('保存成功'); | ||||||
|       } |           this.modal.close(true); | ||||||
|     }) |         } | ||||||
|  |       }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   close(): void { |   close(): void { | ||||||
|  | |||||||
| @ -9,8 +9,8 @@ export class ReportingService extends BaseService { | |||||||
|   $api_get_order_reporting_page = `/api/sdc/regulation/list/page`; // 订单上报列表 |   $api_get_order_reporting_page = `/api/sdc/regulation/list/page`; // 订单上报列表 | ||||||
|   $api_recall_reporting = ``; // 撤回 |   $api_recall_reporting = ``; // 撤回 | ||||||
|   $api_async_export_order_reporting_list = ``; // 导出订单上报 |   $api_async_export_order_reporting_list = ``; // 导出订单上报 | ||||||
|   $api_get_upload_setting = ``; // 修改上传设置 |   $api_get_upload_setting = `/api/sdc/regulation/getPushConfig`; // 获取上传设置 | ||||||
|   $api_upload_setting_save = ``; // 修改上传设置 |   $api_upload_setting_save = `/api/sdc/regulation/setPushConfig`; // 保存上传设置 | ||||||
|  |  | ||||||
|   $api_get_fund_reporting_page = `/api/fcc/fundUploadHead/list/page`; // 资金上报列表 |   $api_get_fund_reporting_page = `/api/fcc/fundUploadHead/list/page`; // 资金上报列表 | ||||||
|   $api_fund_reporting_upload = `/api/fcc/fundUploadHead/uploadFundNumber`; // 资金批量上传 |   $api_fund_reporting_upload = `/api/fcc/fundUploadHead/uploadFundNumber`; // 资金批量上传 | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user