From fd743bd70ef2a967f149752d4166449ad4e95609 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Mar 2022 11:23:03 +0800 Subject: [PATCH 1/6] fix bug --- .../order-management/components/bulk/bulk.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index b1322e21..0cb9371f 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -467,10 +467,10 @@ export class OrderManagementBulkComponent implements OnInit { width: '180px', className: 'text-left', format: (item: any) => - `${item.goodsName}/ - ${item.goodsWeight || '0'}吨/ - ${item.goodsVolume || '0'}方/ - ${item.goodsNumber || '0'}件` + `${item?.goodsName}/ + ${item?.weight || '0'}吨/ + ${item?.volume || '0'}方/ + ${item?.goodsNumber || '0'}件` }, { title: '运费单价', From 1c6c75d05d49238d44c7928f7e179fa7b34643f4 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Mar 2022 13:47:46 +0800 Subject: [PATCH 2/6] fix bug --- .../list/carauth/carauth.component.ts | 83 +++++++++++++++++-- 1 file changed, 74 insertions(+), 9 deletions(-) diff --git a/src/app/routes/vehicle/components/list/carauth/carauth.component.ts b/src/app/routes/vehicle/components/list/carauth/carauth.component.ts index bbd91cfb..245f172c 100644 --- a/src/app/routes/vehicle/components/list/carauth/carauth.component.ts +++ b/src/app/routes/vehicle/components/list/carauth/carauth.component.ts @@ -102,7 +102,7 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', title: '车头照照片', ui: { - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -118,6 +118,19 @@ export class CarSettleCarauthComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + console.log(args); + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/carFrontPhotoWatermark', avatar); this.detailData.carFrontPhoto = args.file.response.data.fullFilePath } }, @@ -129,11 +142,15 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); return; } + console.log(_fileList) + observer.next(isLt2M); observer.complete(); }); }, - previewFile: (file: NzUploadFile) => of(file.url), + // previewFile: (file: NzUploadFile) => of( + // file?.response?.data?.fullFilePath + // ), } }, carNo: { @@ -215,7 +232,7 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', title: '挂靠协议', ui: { - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -231,6 +248,18 @@ export class CarSettleCarauthComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/carProtocalWatermark', avatar); this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath } }, @@ -277,7 +306,7 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', title: '行驶证首页照片', ui: { - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -293,6 +322,18 @@ export class CarSettleCarauthComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/certificatePhotoFrontWatermark', avatar); this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath this.checkCarCard(args.file.response.data.fullFilePath, 'front'); } else { @@ -311,7 +352,7 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - previewFile: (file: NzUploadFile) => of(file.url), + // previewFile: (file: NzUploadFile) => of(file.url), } }, tipsB: { @@ -326,7 +367,7 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', title: '行驶证副页照片', ui: { - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -342,6 +383,18 @@ export class CarSettleCarauthComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/certificatePhotoBackWatermark', avatar); this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath this.checkCarCard(args.file.response.data.fullFilePath, 'back'); } else { @@ -360,7 +413,7 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - previewFile: (file: NzUploadFile) => of(file.url), + // previewFile: (file: NzUploadFile) => of(file.url), } }, driverLicenseRegisterTime: { @@ -444,7 +497,7 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', title: '道运证照片', ui: { - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -460,6 +513,18 @@ export class CarSettleCarauthComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/roadTransportPhotoWatermark', avatar); this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath this.checkTransCard(args.file.response.data.fullFilePath); } else { @@ -478,7 +543,7 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - previewFile: (file: NzUploadFile) => of(file.url), + // previewFile: (file: NzUploadFile) => of(file.url), } }, roadImg: { From e2c8bfde55fd5ad6d6ef01975e910b5926486218 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Mar 2022 14:02:23 +0800 Subject: [PATCH 3/6] fix bug --- .../add-driver/add-driver.component.ts | 28 ++++- .../add-driver/add-driver.component.html | 12 +- .../add-driver/add-driver.component.less | 12 +- .../driver/add-driver/add-driver.component.ts | 113 ++++++++++++++++-- 4 files changed, 149 insertions(+), 16 deletions(-) diff --git a/src/app/routes/supply-management/components/add-driver/add-driver.component.ts b/src/app/routes/supply-management/components/add-driver/add-driver.component.ts index 95552850..18c09240 100644 --- a/src/app/routes/supply-management/components/add-driver/add-driver.component.ts +++ b/src/app/routes/supply-management/components/add-driver/add-driver.component.ts @@ -92,7 +92,7 @@ export class CarAddDriverComponent implements OnInit { title: '', ui: { offsetControl: 6, - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -108,6 +108,18 @@ export class CarAddDriverComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/certificatePhotoFrontWatermark', avatar); this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0); } else { @@ -142,7 +154,7 @@ export class CarAddDriverComponent implements OnInit { title: '', ui: { offsetControl: 6, - action: apiConf.fileUpload, + action: apiConf.waterFileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, @@ -158,6 +170,18 @@ export class CarAddDriverComponent implements OnInit { listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { + const avatar = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: args.file.response.data.fullFileWatermarkPath, + response: { + url: args.file.response.data.fullFileWatermarkPath, + }, + }, + ]; + this.sf?.setValue('/certificatePhotoBackWatermark', avatar); this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0); } else { diff --git a/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.html b/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.html index 46d3ed3f..e5021ee6 100644 --- a/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.html +++ b/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.html @@ -23,12 +23,16 @@ - + + + + - + + + + - - +
+ +
+ + + +
+ +
+
+ + + +
+
+ + + + + + + + + + diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component.less b/src/app/routes/partner/rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component.less new file mode 100644 index 00000000..e87948ce --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component.less @@ -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; + } + } + +} \ No newline at end of file diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component.ts new file mode 100644 index 00000000..6e7c094b --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component.ts @@ -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(); + // }); + } +} diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index 9dc5b6f9..1256170c 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -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 @@ -   添加 +   添加    @@ -49,6 +49,17 @@ - +
+ + +
+ +
+ + +
+
diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index 3edd7ef2..3821b57f 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -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) { + + } + }); } } From cb50d0c36b57574aa345a1d5d8ae355d001b2dd3 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Mar 2022 16:03:35 +0800 Subject: [PATCH 6/6] fix bug --- .../components/vehicle/vehicle.component.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 0bcc6731..37d2336c 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -98,7 +98,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme if (this.resourceStatus) { a.billStatus = this.resourceStatus; } - const params: any = Object.assign({}, this.sf?.value || {}); + const params: any = Object.assign({}, this.sf?.value || this.paramsList); delete params._$expand; return { ...a, @@ -109,14 +109,8 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme const a: any = {}; if (this.resourceStatus) { a.billStatus = this.resourceStatus; - // Object.assign(requestOptions.body, { - // ...a - // }); } - const params: any = Object.assign({}, this.sf?.value || this.paramsList); - console.log(this.sf?.value); - console.log(this.paramsList); delete params._$expand; this.paramsList = params Object.assign(requestOptions.body, {