diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 5d08faa3..52e60f2d 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -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(); + }); + } } diff --git a/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.html b/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.html new file mode 100644 index 00000000..e81d3a51 --- /dev/null +++ b/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.html @@ -0,0 +1,36 @@ + + + +
{{ i.shipperAppUserName }}
+
+ +
{{ i.driverName }} / {{ i.driverPhone }} / {{ i.carNo }}
+
+ +
{{ i.payeeName }} / {{ i.payeePhone }}
+
+ +

+ +

+
+ 已选择 {{ index }} 项,运费:{{ List }},附加费:{{ ATTPrice }} +
+ + + diff --git a/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts b/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts new file mode 100644 index 00000000..8f134a18 --- /dev/null +++ b/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts @@ -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); + } +} diff --git a/src/app/routes/order-management/order-management.module.ts b/src/app/routes/order-management/order-management.module.ts index 205156ee..8d59ea15 100644 --- a/src/app/routes/order-management/order-management.module.ts +++ b/src/app/routes/order-management/order-management.module.ts @@ -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[] = [ OrderManagementComplaintDetailComponent, OrderManagementReceiptsAuditComponent, orderManagementVoucherViewComponent, - OrderManagementComplianceAuditComponent + OrderManagementComplianceAuditComponent, + OneCarOrderCancelConfirmComponent ]; @NgModule({ diff --git a/src/app/routes/order-management/services/order-management.service.ts b/src/app/routes/order-management/services/order-management.service.ts index 0a8de122..b91989d7 100644 --- a/src/app/routes/order-management/services/order-management.service.ts +++ b/src/app/routes/order-management/services/order-management.service.ts @@ -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 }; diff --git a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html index f9868f1b..aa318b9c 100644 --- a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html @@ -1,7 +1,7 @@