From 740d7317d4a053643d77652384397783005f75f0 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 7 Mar 2022 10:43:36 +0800 Subject: [PATCH] fix bug --- .../vehicle-detail.component.html | 6 +- .../driver/captain/add/add.component.ts | 61 +++++++++++-------- 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index bbd4b5ca..4e5150a6 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 16:28:37 + * @LastEditTime : 2022-03-04 17:48:27 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -46,6 +46,10 @@ {{ i?.goodsResource?.serviceTypeLabel }} {{ i?.createUserName || i?.goodsResource?.createUserName }} /{{ i?.createUserPhone || i?.goodsResource?.createUserPhone }} {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} + {{ i?.wayBillCode }} + {{ i?.resourceCode }} + {{ i?.wayBillId }} + {{ i?.goodsResource?.dispatchName }} diff --git a/src/app/routes/usercenter/components/driver/captain/add/add.component.ts b/src/app/routes/usercenter/components/driver/captain/add/add.component.ts index 4a1a8378..9614dfa3 100644 --- a/src/app/routes/usercenter/components/driver/captain/add/add.component.ts +++ b/src/app/routes/usercenter/components/driver/captain/add/add.component.ts @@ -4,8 +4,9 @@ import { SFComponent, SFSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/ import { _HttpClient } from '@delon/theme'; import { EAEnvironmentService } from '@shared'; import { NzModalRef } from 'ng-zorro-antd/modal'; -import { Observable, Observer } from 'rxjs'; +import { Observable, Observer, Subject } from 'rxjs'; import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service'; +import { debounceTime } from 'rxjs/operators'; @Component({ @@ -21,6 +22,7 @@ export class CtcCaptatinAddComponent implements OnInit { schema!: SFSchema; ui!: SFUISchema; readFlag = false; + changeSub = new Subject(); detailData: any = { bankCardNo: '', bankName: '', @@ -45,6 +47,7 @@ export class CtcCaptatinAddComponent implements OnInit { ngOnInit(): void { this.initData() this.initSF(); + this.changeEndKmAction(); } initData() { if (this.i && this.i.id) { @@ -352,31 +355,39 @@ export class CtcCaptatinAddComponent implements OnInit { close(): void { this.modal.destroy(); } - sure() { - const params: any = { - bankCardNo: this.sf.value.bankCardNo, - bankName: this.sf.value.bankName, - mobile: this.sf.value.mobile, - remark: this.sf.value.remark, - identityInfoDTO: { - certificatePhotoBackWatermark: this.sf.value?.certificatePhotoBackWatermark?.data?.fullFilePath || this.sf.value?.certificatePhotoBackWatermark, - certificatePhotoFrontWatermark: this.sf.value?.certificatePhotoFrontWatermark?.data?.fullFilePath ||this.sf.value?.certificatePhotoFrontWatermark, - certificatePhotoFront: this.detailData.certificatePhotoFront, - certificatePhotoBack: this.detailData.certificatePhotoBack, - certificateNumber: this.sf.value.certificateNumber, - name: this.sf.value.name, - } - } - if (this.i.id) { - params.id = this.i.id - } - delete params.showName - this.service.request(this.service.$api_saveCaptainr_new, params).subscribe(res => { + changeEndKmAction() { + this.changeSub.pipe(debounceTime(500)).subscribe((res: string) => { if (res) { - this.service.msgSrv.success('保存成功') - this.modal.close(true) + console.log('44444') + console.log(res) + const params: any = { + bankCardNo: this.sf.value.bankCardNo, + bankName: this.sf.value.bankName, + mobile: this.sf.value.mobile, + remark: this.sf.value.remark, + identityInfoDTO: { + certificatePhotoBackWatermark: this.sf.value?.certificatePhotoBackWatermark?.data?.fullFilePath || this.sf.value?.certificatePhotoBackWatermark, + certificatePhotoFrontWatermark: this.sf.value?.certificatePhotoFrontWatermark?.data?.fullFilePath ||this.sf.value?.certificatePhotoFrontWatermark, + certificatePhotoFront: this.detailData.certificatePhotoFront, + certificatePhotoBack: this.detailData.certificatePhotoBack, + certificateNumber: this.sf.value.certificateNumber, + name: this.sf.value.name, + } + } + if (this.i.id) { + params.id = this.i.id + } + delete params.showName + this.service.request(this.service.$api_saveCaptainr_new, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('保存成功') + this.modal.close(true) + } + }) } - }) - + }); + } + sure() { + this.changeSub.next('500'); } }