车辆对接
This commit is contained in:
		| @ -0,0 +1,14 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-15 13:17:42 | ||||
|  * @LastEditTime: 2021-12-29 15:12:09 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\update-freight\update-freight.component.html | ||||
| --> | ||||
| <nz-alert nzType="info" [nzMessage]="'已选择' + data?.ids?.length + '已选择条订单'" nzShowIcon></nz-alert> | ||||
| <sf style="margin-top: 15px;" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf> | ||||
| <div class="modal-footer"> | ||||
|   <button nz-button type="button" (click)="close()">关闭</button> | ||||
|   <button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="sf.valid">确定</button> | ||||
| </div> | ||||
| @ -0,0 +1,7 @@ | ||||
|     .left_btn { | ||||
|          width: 50px; | ||||
|         height: 32px;  | ||||
|          padding-left: 8px; | ||||
|          line-height:32px;  | ||||
|          background-color: #d7d7d7; | ||||
|     } | ||||
| @ -0,0 +1,81 @@ | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-14 14:03:07 | ||||
|  * @LastEditTime: 2021-12-29 17:02:54 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts | ||||
|  */ | ||||
| import { Component, Input, OnInit, ViewChild } from '@angular/core'; | ||||
| import { | ||||
|   SFComponent, SFSchema, SFUISchema | ||||
| } from '@delon/form'; | ||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
| import { OrderManagementService } from '../../../services/order-management.service'; | ||||
| import { ShipperBaseService } from './../../../../../shared/services/business/shipper-base.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-order-management-vehicle-freight-people', | ||||
|   templateUrl: './freight-people.component.html', | ||||
|   styleUrls: ['./freight-people.component.less'] | ||||
| }) | ||||
| export class VehicleFreightPeopleComponent implements OnInit { | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   schema: SFSchema = {}; | ||||
|   ui: SFUISchema = {}; | ||||
|  | ||||
|   aggreechecked = false; | ||||
|  | ||||
|   @Input() | ||||
|   data: any; | ||||
|  | ||||
|   constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService, private service2: ShipperBaseService) {} | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     console.log(this.data) | ||||
|     this.initSF(this.data); | ||||
|   } | ||||
|   initSF(data: any) { | ||||
|     this.schema = { | ||||
|       enterpriseInfoName: { | ||||
|         type: 'string', | ||||
|         title: '网络货运人', | ||||
|         ui: { | ||||
|           widget: 'select', | ||||
|           placeholder: '请选择', | ||||
|           visibleIf: { | ||||
|             _$expand: (value: boolean) => value, | ||||
|           }, | ||||
|           allowClear: true, | ||||
|           asyncData: () => this.service2.getNetworkFreightForwarder(), | ||||
|         }, | ||||
|       }, | ||||
|       required: ['enterpriseInfoName'] | ||||
|     }; | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 100, | ||||
|         grid: { span: 16 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   save(value: any): void { | ||||
|   | ||||
|     const params = { | ||||
|     }; | ||||
|  | ||||
|     this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => { | ||||
|       if (res) { | ||||
|         this.modal.destroy(); | ||||
|         this.service.msgSrv.success('变更运费成功'); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   close(): void { | ||||
|     this.modal.destroy(); | ||||
|   } | ||||
|  | ||||
| } | ||||
| @ -0,0 +1,14 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-15 13:17:42 | ||||
|  * @LastEditTime: 2021-12-29 15:12:09 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\update-freight\update-freight.component.html | ||||
| --> | ||||
| <nz-alert nzType="info" [nzMessage]="'已选择' + data?.ids?.length + '已选择条订单'" nzShowIcon></nz-alert> | ||||
| <sf style="margin-top: 15px;" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf> | ||||
| <div class="modal-footer"> | ||||
|   <button nz-button type="button" (click)="close()">关闭</button> | ||||
|   <button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="sf.valid">确定</button> | ||||
| </div> | ||||
| @ -0,0 +1,7 @@ | ||||
|     .left_btn { | ||||
|          width: 50px; | ||||
|         height: 32px;  | ||||
|          padding-left: 8px; | ||||
|          line-height:32px;  | ||||
|          background-color: #d7d7d7; | ||||
|     } | ||||
| @ -0,0 +1,92 @@ | ||||
| import { preloaderFinished } from '@delon/theme'; | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-14 14:03:07 | ||||
|  * @LastEditTime: 2021-12-29 15:02:47 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts | ||||
|  */ | ||||
| import { Component, Input, OnInit, ViewChild } from '@angular/core'; | ||||
| import { | ||||
|   SFComponent, | ||||
|   SFCustomWidgetSchema, | ||||
|   SFNumberWidgetSchema, | ||||
|   SFRadioWidgetSchema, | ||||
|   SFSchema, | ||||
|   SFSelectWidgetSchema, | ||||
|   SFTextareaWidgetSchema, | ||||
|   SFUISchema | ||||
| } from '@delon/form'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
| import { OrderManagementService } from '../../../services/order-management.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-order-management-vehicle-modify-rate', | ||||
|   templateUrl: './modify-rate.component.html', | ||||
|   styleUrls: ['./modify-rate.component.less'] | ||||
| }) | ||||
| export class VehicleModifyRateComponent implements OnInit { | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   schema: SFSchema = {}; | ||||
|   ui: SFUISchema = {}; | ||||
|  | ||||
|   aggreechecked = false; | ||||
|  | ||||
|   @Input() | ||||
|   data: any; | ||||
|  | ||||
|   constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {} | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     console.log(this.data) | ||||
|     this.initSF(this.data); | ||||
|   } | ||||
|   initSF(data: any) { | ||||
|     const info = { | ||||
|       prePay: data.list?.filter((item: any) => item.costCode === 'PRE')[0], | ||||
|       toPay: data.list?.filter((item: any) => item.costCode === 'RECE')[0], | ||||
|       receiptPay: data.list?.filter((item: any) => item.costCode === 'BACK')[0] | ||||
|     }; | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         prePay: { | ||||
|           type: 'number', | ||||
|           title: '附加费率', | ||||
|           ui: { | ||||
|             unit: '%', | ||||
|             widgetWidth: 200, | ||||
|             precision: 2, | ||||
|           } as SFNumberWidgetSchema | ||||
|         }, | ||||
|       }, | ||||
|       required: ['prePay'] | ||||
|     }; | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 100, | ||||
|         grid: { span: 16 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   save(value: any): void { | ||||
|   | ||||
|     const params = { | ||||
|     }; | ||||
|  | ||||
|     this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => { | ||||
|       if (res) { | ||||
|         this.modal.destroy(); | ||||
|         this.service.msgSrv.success('变更运费成功'); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   close(): void { | ||||
|     this.modal.destroy(); | ||||
|   } | ||||
|  | ||||
| } | ||||
| @ -1,3 +1,11 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-15 13:17:42 | ||||
|  * @LastEditTime: 2021-12-29 14:48:31 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\update-freight\update-freight.component.html | ||||
| --> | ||||
| <sf #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf> | ||||
| <nz-divider></nz-divider> | ||||
| <div> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user