fix bug
This commit is contained in:
		| @ -88,6 +88,8 @@ export class OrderManagementBulkComponent implements OnInit { | ||||
|     } | ||||
|     const params: any = Object.assign({}, this.sf?.value || {}); | ||||
|     delete params._$expand; | ||||
|     console.log(params); | ||||
|  | ||||
|     if (this.sf) { | ||||
|       Object.assign(requestOptions.body, { | ||||
|         ...a, | ||||
|  | ||||
| @ -29,6 +29,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme | ||||
|   isVisibleEvaluate = false; | ||||
|   isVisible = false; | ||||
|   loading: boolean = true; | ||||
|   paramsList: any; | ||||
|   changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录 | ||||
|   changeViewId: any; // 查看运费变更记录id - 用于查看 | ||||
|   ViewCause: any; // 变更运费查看数据 | ||||
| @ -102,31 +103,26 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme | ||||
|     return { | ||||
|       ...a, | ||||
|       ...params, | ||||
|       createTime: { | ||||
|         start: this.sf?.value?.createTime?.[0] || '', | ||||
|         end: this.sf?.value?.createTime?.[1] || '' | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
|     const a: any = {}; | ||||
|     if (this.resourceStatus) { | ||||
|       a.billStatus = this.resourceStatus; | ||||
|       Object.assign(requestOptions.body, { | ||||
|         ...a | ||||
|       }); | ||||
|       // Object.assign(requestOptions.body, { | ||||
|       //   ...a | ||||
|       // }); | ||||
|     } | ||||
|     const params: any = Object.assign({}, this.sf?.value || {}); | ||||
|      | ||||
|     const params: any = Object.assign({}, this.sf?.value || this.paramsList); | ||||
|     console.log(this.sf?.value); | ||||
|     console.log(this.paramsList); | ||||
|     delete params._$expand; | ||||
|     if (this.sf) { | ||||
|     this.paramsList = params | ||||
|       Object.assign(requestOptions.body, { | ||||
|         ...params, | ||||
|         createTime: { | ||||
|           start: this.sf?.value?.createTime?.[0] || '', | ||||
|           end: this.sf?.value?.createTime?.[1] || '' | ||||
|         } | ||||
|         ...a, | ||||
|         ...this.paramsList, | ||||
|       }); | ||||
|     } | ||||
|     this.loading = true; | ||||
|     return requestOptions; | ||||
|   }; | ||||
| @ -282,14 +278,19 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme | ||||
|             containsAllLable: true | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         // createTime: { | ||||
|         //   title: '创建时间', | ||||
|         //   type: 'string', | ||||
|         //   ui: { | ||||
|         //     widget: 'date', | ||||
|         //     mode: 'range', | ||||
|         //     format: 'yyyy-MM-dd' | ||||
|         //   } as SFDateWidgetSchema | ||||
|         // }, | ||||
|         createTime: { | ||||
|           title: '创建时间', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'date', | ||||
|             mode: 'range', | ||||
|             format: 'yyyy-MM-dd' | ||||
|           } as SFDateWidgetSchema | ||||
|           title: '创建时间', | ||||
|           ui: { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd' } as SFDateWidgetSchema, | ||||
|         }, | ||||
|         riskStatus: { | ||||
|           type: 'string', | ||||
| @ -578,7 +579,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme | ||||
|     this.resourceStatus = e; | ||||
|     this.initST(); | ||||
|     setTimeout(() => { | ||||
|       this.st.load(1); | ||||
|       this.st.load(); | ||||
|     }, 500); | ||||
|   } | ||||
|   /** | ||||
|  | ||||
| @ -61,6 +61,7 @@ import { BannerComponentsAddComponent } from './knowledge/banner/components/add/ | ||||
| import { PersonalPartnerDetailComponent } from './partner-list/components/personal-partner-detail/personal-partner-detail.component'; | ||||
| import { ParterAdviceFeedbackListComponent } from './advice-feedback/components/list/list.component'; | ||||
| import { ParterAdviceFeedbackDetailComponent } from './advice-feedback/components/feedback-detail/feedback-detail.component'; | ||||
| import { ParterRebateManageMentAddPartnerListComponent } from './rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component'; | ||||
|  | ||||
| const COMPONENTS: any[] = [ | ||||
|   PartnerBusinessStatisticsIndexComponent, | ||||
| @ -111,7 +112,8 @@ const COMPONENTS: any[] = [ | ||||
|   BannerComponentsAddComponent, | ||||
|   PersonalPartnerDetailComponent, | ||||
|   ParterAdviceFeedbackListComponent, | ||||
|   ParterAdviceFeedbackDetailComponent | ||||
|   ParterAdviceFeedbackDetailComponent, | ||||
|   ParterRebateManageMentAddPartnerListComponent | ||||
| ]; | ||||
|  | ||||
| @NgModule({ | ||||
|  | ||||
| @ -0,0 +1,38 @@ | ||||
| <nz-card> | ||||
|   <div nz-row nzGutter="8"> | ||||
|     <!-- 查询字段小于或等于3个时,不显示伸缩按钮 --> | ||||
|     <div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4"> | ||||
|       <sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [disabled]="!sf?.valid" [loading]="false" | ||||
|         (formSubmit)="search()" (formReset)="resetSF()"></sf> | ||||
|     </div> | ||||
|  | ||||
|     <!-- 查询字段大于3个时,根据展开状态调整布局 --> | ||||
|     <ng-container *ngIf="queryFieldCount > 4"> | ||||
|       <div nz-col [nzSpan]="_$expand ? 24 : 18"> | ||||
|         <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> | ||||
|       </div> | ||||
|       <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand"> | ||||
|         <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="false" (click)="search()" acl | ||||
|           [acl-ability]="['AbnormalAppear-serach']">查询</button> | ||||
|         <button nz-button (click)="resetSF()" acl [acl-ability]="['AbnormalAppear-reset']">重置</button> | ||||
|         <button nz-button nzType="link" (click)="expandToggle()"> | ||||
|           {{ !_$expand ? '展开' : '收起' }} | ||||
|           <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||
|         </button> | ||||
|       </div> | ||||
|     </ng-container> | ||||
|   </div> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card class="content-box"> | ||||
|       <st #st [data]="service.$api_get_rebateConfig" [columns]="columns" | ||||
|         [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||
|         [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||
|         [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false" | ||||
|         [scroll]="{ x: '2000px' }"> | ||||
|       </st> | ||||
|   <ng-template #extraTemplate> | ||||
|     <button *ngIf="selectedIndex===0" (click)="batchReply()" nz-button nzType="primary" acl | ||||
|       [acl-ability]="['AbnormalAppear-batchReply']">批量回复</button> | ||||
|   </ng-template> | ||||
| </nz-card> | ||||
| @ -0,0 +1,20 @@ | ||||
| :host::ng-deep{ | ||||
|     .search-box{ | ||||
|         .ant-card-body{ | ||||
|             padding-bottom: 18px; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     .content-box{ | ||||
|         .ant-card-body{ | ||||
|             padding-top: 14px; | ||||
|         } | ||||
|     } | ||||
|     .imgBox { | ||||
|         display: flex; | ||||
|         img { | ||||
|             width: 60px !important;  | ||||
|         } | ||||
|     } | ||||
|  | ||||
| } | ||||
| @ -0,0 +1,220 @@ | ||||
| import { Component, OnInit, ViewChild, Type } from '@angular/core'; | ||||
| import { STComponent, STColumn, STChange } from '@delon/abc/st'; | ||||
| import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | ||||
| import { ShipperBaseService } from '@shared'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { of } from 'rxjs'; | ||||
| import { map } from 'rxjs/operators'; | ||||
| import { RebateManagementService } from '../../../services/rebate-management.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-add-partnerlist', | ||||
|   templateUrl: './add-partnerlist.component.html', | ||||
|   styleUrls: ['./add-partnerlist.component.less'] | ||||
| }) | ||||
| export class ParterRebateManageMentAddPartnerListComponent implements OnInit { | ||||
|   @ViewChild('st', { static: true }) | ||||
|   st!: STComponent; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   ui: SFUISchema = {}; | ||||
|   i: any; | ||||
|   schema: SFSchema = {}; | ||||
|   addSchema: SFSchema = {}; | ||||
|   _$expand = false; | ||||
|   editText = ''; | ||||
|   formData: any; | ||||
|   isVisible = false; | ||||
|   edit = false; | ||||
|   editId = false; | ||||
|   selectedIndex = 0; | ||||
|  | ||||
|  | ||||
|  | ||||
|   columns: STColumn[] = [ | ||||
|     { title: '', type: 'checkbox', width: '50px', className: 'text-center' }, | ||||
|     { title: '异常编号', index: 'exceptionCode', width: '140px', className: 'text-left', }, | ||||
|     { title: '订单号', index: 'billCode', width: '160px', className: 'text-left', }, | ||||
|     { title: '装货地', index: 'loadingAddressArr', width: '220px', className: 'text-left', }, | ||||
|     { title: '卸货地', index: 'unloadingAddressArr', width: '220px', className: 'text-left', }, | ||||
|     { title: '承运司机', index: 'driver', width: '180px', className: 'text-left', }, | ||||
|     { title: '异常信息', index: 'exceptionContent', width: '100px', className: 'text-left', }, | ||||
|     { title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '150px', className: 'text-left', }, | ||||
|     { title: '上报时间', index: 'createTime', width: '140px', className: 'text-left', }, | ||||
|     { | ||||
|       title: '操作', index: 'createTime', width: '90px', className: 'text-left', | ||||
|       buttons: [ | ||||
|         { | ||||
|           text: '回复', | ||||
|           click: _record => this.reply(_record), | ||||
|           acl: { ability: ['AbnormalAppear-reply'] } | ||||
|         }, | ||||
|       ] | ||||
|     }, | ||||
|   ]; | ||||
|   columns2: STColumn[] = [ | ||||
|     { title: '异常编号', index: 'exceptionCode', width: '140px', className: 'text-left' }, | ||||
|     { title: '订单号', index: 'billCode', width: '160px', className: 'text-left' }, | ||||
|     { title: '装货地', index: 'loadingAddressArr', width: '220px', className: 'text-left' }, | ||||
|     { title: '卸货地', index: 'unloadingAddressArr', width: '220px', className: 'text-left' }, | ||||
|     { title: '承运司机', index: 'driver', width: '180px', className: 'text-left' }, | ||||
|     { title: '异常信息', index: 'exceptionContent', width: '100px', className: 'text-left' }, | ||||
|     { title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '150px', className: 'text-left' }, | ||||
|     { title: '上报时间', index: 'createTime', width: '140px', className: 'text-left' }, | ||||
|     { title: '回复内容', index: 'replyContent', width: '150px', className: 'text-left' }, | ||||
|     { title: '回复人', index: 'replyAppUserName', width: '90px', className: 'text-left' }, | ||||
|     { title: '回复时间', index: 'replyTime', width: '140px', className: 'text-left' }, | ||||
|   ]; | ||||
|  | ||||
|   get reqParams() { | ||||
|     let params: any = { ...this.sf?.value }; | ||||
|     if (params.reportingTime) { | ||||
|       const reportingTime = { start: this.sf?.value?.reportingTime?.[0], end: this.sf?.value?.reportingTime?.[1] } | ||||
|       params.reportingTime = reportingTime; | ||||
|     } | ||||
|     return params; | ||||
|   } | ||||
|  | ||||
|   get selectedRows() { | ||||
|     return this.st?.list.filter(item => item.checked) || []; | ||||
|   } | ||||
|  | ||||
|   constructor( | ||||
|     public service: RebateManagementService, | ||||
|     private nzModalService: NzModalService, | ||||
|     public shipperSrv: ShipperBaseService, | ||||
|     private modal: NzModalService, | ||||
|  | ||||
|   ) { } | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     this.initSF() | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|   * 伸缩查询条件 | ||||
|   */ | ||||
|   expandToggle(): void { | ||||
|     this._$expand = !this._$expand; | ||||
|     this.sf?.setValue('/_$expand', this._$expand); | ||||
|   } | ||||
|   /** | ||||
|  * 查询字段个数 | ||||
|  */ | ||||
|   get queryFieldCount(): number { | ||||
|     return Object.keys(this.schema?.properties || {}).length; | ||||
|   } | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         _$expand: { type: 'boolean', ui: { hidden: true } }, | ||||
|         exceptionCode: { | ||||
|           type: 'string', | ||||
|           title: '异常编号', | ||||
|           ui: { placeholder: '请输入' } | ||||
|         }, | ||||
|         billCode: { | ||||
|           type: 'string', | ||||
|           title: '订单号', | ||||
|           ui: { | ||||
|             placeholder: '最多100个订单,空号隔开', | ||||
|           } | ||||
|         }, | ||||
|         exceptionType: { | ||||
|           title: '异常类型', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             containsAllLabel: true, | ||||
|             params: { dictKey: 'exception:report:type' }, | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         driverName: { | ||||
|           title: '承运司机', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         carNo: { | ||||
|           title: '车牌号', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         reportingTime: { | ||||
|           title: '上报时间', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'date', | ||||
|             mode: 'range', | ||||
|             format: 'yyyy-MM-dd', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value | ||||
|             } | ||||
|           } as SFDateWidgetSchema | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|     this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; | ||||
|   } | ||||
|  | ||||
|   search() { | ||||
|     if (this.selectedIndex === 0) { | ||||
|       this.st?.load(1) | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   selectedIndexChange(event: any) { | ||||
|     if (this.selectedIndex === 0) { | ||||
|       this.st?.load(1) | ||||
|     } | ||||
|   } | ||||
|   /** | ||||
|    * 重置表单 | ||||
|    */ | ||||
|   resetSF() { | ||||
|     this.sf.reset(); | ||||
|   } | ||||
|   // 回复操作 | ||||
|   reply(item: any) { | ||||
|     // const modalRef = this.modal.create({ | ||||
|     //   nzTitle: '回复', | ||||
|     //   nzWidth: 700, | ||||
|     //   nzContent: AbnormalReplyComponent, | ||||
|     //   nzComponentParams: { | ||||
|     //     i: item | ||||
|     //   }, | ||||
|     //   nzFooter: null | ||||
|     // }); | ||||
|     // modalRef.afterClose.subscribe((res) => { | ||||
|     //   if (res) { | ||||
|     //     this.resetSF; | ||||
|     //     this.st.load(); | ||||
|     //   } | ||||
|     // }); | ||||
|   } | ||||
|   // 批量回复操作 | ||||
|   batchReply() { | ||||
|     // if (this.selectedRows.length === 0) { | ||||
|     //   this.service.msgSrv.warning('请勾选数据!') | ||||
|     //   return; | ||||
|     // } | ||||
|     // const modalRef = this.modal.create({ | ||||
|     //   nzTitle: '批量回复', | ||||
|     //   nzContent: AbnormalreplyBatchComponent, | ||||
|     //   nzComponentParams: { | ||||
|     //     selectedRows: this.selectedRows | ||||
|     //   }, | ||||
|     //   nzFooter: null | ||||
|     // }); | ||||
|     // modalRef.afterClose.subscribe(() => { | ||||
|     //   this.resetSF; | ||||
|     //   this.st.load(); | ||||
|     // }); | ||||
|   } | ||||
| } | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-02-24 20:09:49 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-21 13:53:31 | ||||
|  * @LastEditTime : 2022-03-28 15:39:27 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
| --> | ||||
| @ -33,7 +33,7 @@ | ||||
|       <nz-option nzValue="jack" nzLabel="Jack"></nz-option> | ||||
|       <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option> | ||||
|     </nz-select> | ||||
|       <span >添加</span> | ||||
|       <span (click)="add()">添加</span> | ||||
|   </sv> | ||||
|      <sv label="优先级" col="1"> | ||||
|     <nz-select ngModel="lucy" style="max-width: 400px; min-width: 200px;"> | ||||
| @ -49,6 +49,17 @@ | ||||
|     <textarea style="max-width: 400px; min-width: 200px;" rows="4" nz-input [(ngModel)]="inputValue"></textarea> | ||||
|   </sv> | ||||
|  </sv-container> | ||||
|  | ||||
|   <div> | ||||
|     <button>返回</button> | ||||
|     <button>提交</button> | ||||
|   </div> | ||||
|  </div> | ||||
| </nz-card> | ||||
| <nz-card> | ||||
|   <div class="align-center"> | ||||
|     <button nz-button nzType="primary" (click)="goBack()">取消</button> | ||||
|     <button  nz-button nzType="primary" style="margin-left: 48px" (click)="submit()" | ||||
|     acl  [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交</button | ||||
|     > | ||||
|   </div> | ||||
| </nz-card> | ||||
|  | ||||
| @ -1,10 +1,10 @@ | ||||
| /* | ||||
|  * @Description  :  | ||||
|  * @Description  : | ||||
|  * @Version      : 1.0 | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-03-21 09:26:45 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-21 13:44:34 | ||||
|  * @LastEditTime : 2022-03-28 14:45:41 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -16,6 +16,7 @@ import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/fo | ||||
| import { processSingleSort, ShipperBaseService } from '@shared'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { RebateManagementService } from '../../../services/rebate-management.service'; | ||||
| import { ParterRebateManageMentAddPartnerListComponent } from '../add-partnerlist/add-partnerlist.component'; | ||||
| @Component({ | ||||
|   selector: 'app-parter-channel-rebate-management-add', | ||||
|   styleUrls: ['./add.component.less'], | ||||
| @ -26,7 +27,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { | ||||
|   toFixedValue: Number = 2; | ||||
|   radioValue = 'A'; | ||||
|   precision = 2; | ||||
|   inputValue= ''; | ||||
|   inputValue = ''; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   schema1!: SFSchema; | ||||
|   constructor( | ||||
| @ -34,7 +35,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { | ||||
|     public ar: ActivatedRoute, | ||||
|     public service: RebateManagementService, | ||||
|     private modal: NzModalService, | ||||
|     public shipperservice: ShipperBaseService, | ||||
|     public shipperservice: ShipperBaseService | ||||
|   ) {} | ||||
|   initSF(data?: any) { | ||||
|     this.schema1 = { | ||||
| @ -55,6 +56,28 @@ export class ParterRebateManageMentAddComponent implements OnInit { | ||||
|     }; | ||||
|   } | ||||
|   ngOnInit() { | ||||
|     this.initSF() | ||||
|     this.initSF(); | ||||
|   } | ||||
|   submit() {} | ||||
|   goBack() { | ||||
|     window.history.go(-1); | ||||
|   } | ||||
|   /** | ||||
|    *申请退款 | ||||
|    */ | ||||
|    add(item?: any) { | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '申请退款', | ||||
|       nzContent: ParterRebateManageMentAddPartnerListComponent, | ||||
|       nzComponentParams: { | ||||
|         i: item, | ||||
|       }, | ||||
|       nzFooter: null | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe((res: boolean) => { | ||||
|       if (res) { | ||||
|    | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user