fix bug
This commit is contained in:
		| @ -6,6 +6,7 @@ import { ShipperBaseService } from '@shared'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { of } from 'rxjs'; | ||||
| import { map } from 'rxjs/operators'; | ||||
| import { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component'; | ||||
| import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component'; | ||||
| import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component'; | ||||
| import { VehicleModifyCaptainComponent } from '../../modal/vehicle/modify-captain/modify-captain.component'; | ||||
| @ -447,6 +448,12 @@ resourceStatus: any; | ||||
|             iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3', | ||||
|             acl: { ability: ['ORDER-VEHICLE-modificationOrder'] }, | ||||
|           }, | ||||
|           { | ||||
|             text: '申请退款 ', | ||||
|             click: (_record) => this.applyRefund(_record), | ||||
|             iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3', | ||||
|             acl: { ability: ['ORDER-VEHICLE-modificationOrder'] }, | ||||
|           }, | ||||
|           { | ||||
|             text: '查看轨迹 ', | ||||
|             click: (_record) => this.cancellation(_record), | ||||
| @ -835,4 +842,21 @@ resourceStatus: any; | ||||
|   changeOrder(value: any) { | ||||
|     this.router.navigate(['order-management/vehicle-detailChange', value.id]); | ||||
|   } | ||||
|     /** | ||||
|    *取消待确认 | ||||
|    */ | ||||
|    applyRefund(item: any) { | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '取消待确认', | ||||
|       nzContent: OneCarOrderCancelConfirmComponent, | ||||
|       nzComponentParams: { | ||||
|         i: item | ||||
|       }, | ||||
|       nzFooter: null | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe(() => { | ||||
|       this.resetSF; | ||||
|       this.st.load(); | ||||
|     }); | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -0,0 +1,36 @@ | ||||
| <!-- | ||||
|  * @Description  :  | ||||
|  * @Version      : 1.0 | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-02-22 13:53:29 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-02-22 14:25:40 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\cancel-confirm\\cancel-confirm.component.html | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
| --> | ||||
| <sv-container col="1"> | ||||
|   <sv label="货主"> | ||||
|     <div>{{ i.shipperAppUserName }}</div> | ||||
|   </sv> | ||||
|   <sv label="司机"> | ||||
|     <div>{{ i.driverName }} / {{ i.driverPhone }} / {{ i.carNo }}</div> | ||||
|   </sv> | ||||
|   <sv label="收款人"> | ||||
|     <div>{{ i.payeeName }} / {{ i.payeePhone }}</div> | ||||
|   </sv> | ||||
|   <sv label="退款金额"> | ||||
|     <p *ngFor="let data of i?.mybidDetailInfo; let index = index"> | ||||
|       <label *ngIf="data?.paymentStatus == 3"> | ||||
|         <span>{{data?.expenseName}}</span> | ||||
|         <span>{{ data.price | number: '0.2-2' }}</span> | ||||
|       </label> | ||||
|     </p> | ||||
|   </sv> | ||||
|   <sv label=""> 已选择 {{ index }} 项,运费:{{ List }},附加费:{{ ATTPrice }} </sv> | ||||
| </sv-container> | ||||
| <sf #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)">确认</button> | ||||
| </div> | ||||
| @ -0,0 +1,113 @@ | ||||
| /* | ||||
|  * @Description  :  | ||||
|  * @Version      : 1.0 | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-02-22 13:53:29 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-02-22 14:25:39 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\cancel-confirm\\cancel-confirm.component.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { | ||||
|   SFComponent, | ||||
|   SFCustomWidgetSchema, | ||||
|   SFNumberWidgetSchema, | ||||
|   SFRadioWidgetSchema, | ||||
|   SFSchema, | ||||
|   SFTextareaWidgetSchema, | ||||
|   SFUISchema | ||||
| } from '@delon/form'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | ||||
| import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { OrderManagementService } from '../../../services/order-management.service'; | ||||
|  | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-order-management-cancel-confirm', | ||||
|   templateUrl: './cancel-confirm.component.html' | ||||
| }) | ||||
| export class OneCarOrderCancelConfirmComponent implements OnInit { | ||||
|   i: any; | ||||
|   index: any; | ||||
|   ATTPrice: any; | ||||
|   List: any; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   schema: SFSchema = {}; | ||||
|   ui: SFUISchema = {}; | ||||
|   constructor( | ||||
|     private modalRef: NzModalRef, | ||||
|     private modal: NzModalService, | ||||
|     private msgSrv: NzMessageService, | ||||
|     public service: OrderManagementService | ||||
|   ) {} | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     console.log(this.i); | ||||
|     this.initSF(); | ||||
|     this.initData() | ||||
|    | ||||
|   } | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         remarks: { | ||||
|           type: 'string', | ||||
|           title: '备注', | ||||
|           maxLength: 50, | ||||
|           ui: { | ||||
|             widget: 'textarea', | ||||
|             autosize: { minRows: 6, maxRows: 6 } | ||||
|           } as SFTextareaWidgetSchema | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 100, | ||||
|         grid: { span: 20 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|   initData() { | ||||
|     let indexId = 0 | ||||
|     let index = 0 | ||||
|     this.i?.mybidDetailInfo.forEach((ele: any) => { | ||||
|       if (ele?.paymentStatus == 3) { | ||||
|         indexId += 1; | ||||
|         index += ele?.price; | ||||
|       } | ||||
|       if (ele.expenseCode === '"ATT"'){ | ||||
|         if(ele?.paymentStatus == 3) { | ||||
|           this.ATTPrice = ele.price; | ||||
|         } else { | ||||
|           this.ATTPrice = 0; | ||||
|         } | ||||
|       } | ||||
|     }); | ||||
|     this.index = indexId | ||||
|     this.List = index | ||||
|     console.log(this.index) | ||||
|     console.log(this.List) | ||||
|   } | ||||
|   save(value: any): void { | ||||
|     if (!this.sf.value.remarks) { | ||||
|       this.service.msgSrv.error('请填写备注信息!'); | ||||
|       return; | ||||
|     } | ||||
|     const params = { id: this.i?.id, ...this.sf.value, agree: '1' }; | ||||
|     // this.service.request(this.service.$api_cancelOrderConfirmed, params).subscribe(res => { | ||||
|     //   if (res) { | ||||
|     //     this.service.msgSrv.success('操作成功!'); | ||||
|     //     this.modalRef.close(true); | ||||
|     //   } else { | ||||
|     //     this.service.msgSrv.error(res.msg); | ||||
|     //   } | ||||
|     // }); | ||||
|   } | ||||
|  | ||||
|   close(): void { | ||||
|         this.modalRef.close(true); | ||||
|   } | ||||
| } | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-01-06 09:24:00 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-01-21 17:14:17 | ||||
|  * @LastEditTime : 2022-02-22 13:55:06 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\order-management.module.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -27,6 +27,7 @@ import { OrderManagementVehicleComponent } from './components/vehicle/vehicle.co | ||||
| import { orderManagementVoucherViewComponent } from './modal/audit/voucher-view/voucher-view.component'; | ||||
| import { ConfirReceiptComponent } from './modal/bulk/confir-receipt/confir-receipt.component'; | ||||
| import { UpdateFreightComponent } from './modal/bulk/update-freight/update-freight.component'; | ||||
| import { OneCarOrderCancelConfirmComponent } from './modal/vehicle/cancel-confirm/cancel-confirm.component'; | ||||
| import { OneCarOrderCancelComponent } from './modal/vehicle/cancel/cancel.component'; | ||||
| import { VehicleConfirReceiptComponent } from './modal/vehicle/confir-receipt/confir-receipt.component'; | ||||
| import { VehicleFreightPeopleComponent } from './modal/vehicle/freight-people/freight-people.component'; | ||||
| @ -60,7 +61,8 @@ const COMPONENTS: Type<void>[] = [ | ||||
|   OrderManagementComplaintDetailComponent, | ||||
|   OrderManagementReceiptsAuditComponent, | ||||
|   orderManagementVoucherViewComponent, | ||||
|   OrderManagementComplianceAuditComponent | ||||
|   OrderManagementComplianceAuditComponent, | ||||
|   OneCarOrderCancelConfirmComponent | ||||
| ]; | ||||
|  | ||||
| @NgModule({ | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2021-12-03 15:31:52 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-02-22 10:12:14 | ||||
|  * @LastEditTime : 2022-02-22 14:04:05 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -151,6 +151,11 @@ export class OrderManagementService extends ShipperBaseService { | ||||
|  | ||||
|  | ||||
|  | ||||
|     // 获取订单退款申请表 | ||||
|   public $api_billRefundApplication_get = '/api/fcc/billRefundApplication/get'; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|   getDictByKey(dictKey: string) { | ||||
|     const params = { dictKey: dictKey }; | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-03 15:31:52 | ||||
|  * @LastEditTime : 2022-02-21 20:12:17 | ||||
|  * @LastEditTime : 2022-02-22 14:30:29 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\bulk-detail\\bulk-detail.component.html | ||||
| @ -152,7 +152,7 @@ | ||||
|       totalObj?.price - attObj?.price | currency | ||||
|     }},附加运费{{ attObj?.price | currency}},附加费率{{ (attObj?.price / totalObj?.price) * 100 | number: '0.2-2' }}%) | ||||
|   </div> | ||||
|   <div>收款人:{{ i?.payee?.name }}/{{ i?.payee?.phone }}/{{ i?.payee?.payeeId }}</div> | ||||
|   <div>收款人:{{ i?.payee?.name }}/{{ i?.payee?.phone }}/{{ i?.payee?.idNo }}</div> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card nzTitle="附件信息" #distannce4> | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-03 15:31:52 | ||||
|  * @LastEditTime : 2022-02-21 20:11:32 | ||||
|  * @LastEditTime : 2022-02-22 14:30:18 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle-detail\\vehicle-detail.component.html | ||||
| @ -139,7 +139,7 @@ | ||||
|   <div> | ||||
|     总计:<span style="color: #da001b; font-size: 18px">{{ i?.freight | currency: '¥' }}</span> | ||||
|   </div> | ||||
|   <div>收款人:{{ i?.payee?.name }}/{{ i?.payee?.phone }}/{{ i?.payee?.payeeId }}</div> | ||||
|   <div>收款人:{{ i?.payee?.name }}/{{ i?.payee?.phone }}/{{ i?.payee?.idNo }}</div> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card nzTitle="附件信息" #distannce4> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user