From bc6b0ef9baad60e38a2d7022de2f16cc59bcb3c2 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 21 Mar 2022 17:31:30 +0800 Subject: [PATCH 01/17] fix bug --- .../routes/order-management/components/risk/risk.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index f863f622..298417a5 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -234,9 +234,9 @@ export class OrderManagementRiskComponent implements OnInit { }, { title: '申诉状态', - width: '100px', + width: '180px', className: 'text-left', - index: 'representationsStatus' + index: 'representationsStatusLabel' }, { title: '货源编号', From 4ba7269e6fcda52ddd14521f33b07c2274798925 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 21 Mar 2022 17:33:38 +0800 Subject: [PATCH 02/17] fix bug --- .../routes/order-management/components/risk/risk.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index 298417a5..a15c8233 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -476,7 +476,7 @@ export class OrderManagementRiskComponent implements OnInit { */ audit(item?: any) { if (item) { - this.auditId = item.id; + this.auditId = item.billCode; this.initSTAudit(1); this.isVisibleRE = true; } else { From cd48729a4bfd6c694ae6d8f450c342d8ec5399d2 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 21 Mar 2022 18:01:23 +0800 Subject: [PATCH 03/17] fix bug --- .../routes/vehicle/components/audit/detail/detail.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.ts b/src/app/routes/vehicle/components/audit/detail/detail.component.ts index 4f6cb471..d870e234 100644 --- a/src/app/routes/vehicle/components/audit/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/audit/detail/detail.component.ts @@ -119,6 +119,7 @@ export class VehicleComponentsAuditDetailComponent implements OnInit, OnDestroy nzContent: this.redectModal, nzOnOk: () => { if (!this.approvalOpinion) { + this.service.msgSrv.error('请填写备注!') return false; } this.adjuctUser( From 9c979430763bee8fba9344d6ddf0e917cc7dff4c Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 22 Mar 2022 09:22:45 +0800 Subject: [PATCH 04/17] edit --- .../components/vehicle/vehicle.component.html | 135 ++-- .../components/vehicle/vehicle.component.less | 114 ++- .../components/vehicle/vehicle.component.ts | 733 +++++++++--------- src/app/shared/shared-zorro.module.ts | 4 +- src/styles.less | 61 +- 5 files changed, 564 insertions(+), 483 deletions(-) diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.html b/src/app/routes/order-management/components/vehicle/vehicle.component.html index 792b0d3b..375247a6 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.html @@ -10,29 +10,15 @@ --> - + -
- -
- -
-
- +
+
-
+ --> - + @@ -54,18 +40,11 @@ -
- + + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"> {{ item.billCode }}
@@ -97,8 +76,9 @@
- {{ data.expenseName }}:{{ data.price | currency }} - 待申请 + {{ data.expenseName }}:{{ data.price | currency }} + 待申请 已支付 已拒绝 申请中 @@ -124,20 +104,18 @@
+ - + - + [res]="{ reName: { list: 'data', total: 'data.total' } }"> {{ index + 1 }} @@ -149,31 +127,23 @@ - + - + {{ item.amountBeforeChange | currency }} - ¥{{ item.amountchangeValue | number: '0.2-2' }} + ¥{{ item.amountchangeValue | number: '0.2-2' + }} {{ item.amountAfterChange | currency }} -
变更原因:{{ ViewCause?.changeCause }}
-
拒绝原因:{{ ViewCause?.refuseCause }}
+
变更原因:{{ ViewCause?.changeCause }}
+
拒绝原因:{{ ViewCause?.refuseCause }}
注:附加费依据调整后的运输费用重新计算
@@ -182,7 +152,8 @@
- + @@ -208,32 +179,42 @@ + + +
+ +
+ +
+ + +
+
+
+
- - - - + + + +
-
已选择{{ selectedRows?.length || 0 }}条订单,确认批量签收吗? +
已选择{{ + selectedRows?.length || 0 }}条订单,确认批量签收吗?
签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。
- + \ No newline at end of file diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.less b/src/app/routes/order-management/components/vehicle/vehicle.component.less index ee086ec9..9dcf1b3c 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.less +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.less @@ -1,5 +1,117 @@ :host { - p{ + p { margin-bottom: 0 } + + ::ng-deep { + // .ant-table-content { + // transform: scaleY(-1); + + // table { + // transform: inherit + // } + // } + + .page-header { + border : 0; + padding: 8px 8px 0; + + .ant-breadcrumb { + margin-bottom: 8px; + } + } + + nz-range-picker { + width: 100%; + } + + nz-card { + margin: -24px -24px 0; + + .ant-tabs-nav { + margin: 0; + } + } + + // .footer-page { + // position : fixed; + // bottom : 0px; + // width : calc(100% - 300px); + // right : 48px; + // background-color: #ffffff; + // height : 56px; + // } + + // nz-pagination { + // position: fixed; + // bottom : 0px; + // width : 800px; + // right : 48px; + // z-index : 999; + // } + .ant-tabs-tab { + padding: 12px 0px; + margin : 0 0 0 16px; + } + + .ant-table-body { + border-bottom: 1px solid #f0f0f0; + } + + .search-box { + .ant-card-body { + padding-bottom: 18px; + } + } + + .content-box { + .ant-card-body { + padding: 0px; + } + } + + .ant-table-pagination.ant-pagination { + margin: 8px; + } + + .ant-table-thead>tr>th, + .ant-table-tbody>tr>td, + .ant-table tfoot>tr>th, + .ant-table tfoot>tr>td { + padding: 8px; + } + + .ant-table.ant-table-bordered>.ant-table-container { + border-top: 0; + } + + .ant-pagination-item { + min-width : 24px; + height : 24px; + line-height: 21px; + } + + .ant-pagination-total-text { + height : 24px; + line-height: 24px; + } + + .ant-pagination-prev, + .ant-pagination-next, + .ant-pagination-jump-prev, + .ant-pagination-jump-next { + min-width : 24px; + height : 24px; + line-height: 21px; + } + + .ant-select-single:not(.ant-select-customize-input) .ant-select-selector { + height: 24px; + } + + .ant-select-single .ant-select-selector .ant-select-selection-item, + .ant-select-single .ant-select-selector .ant-select-selection-placeholder { + line-height: 21px; + } + } } \ No newline at end of file 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 f4866cae..7fd8f1e8 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -4,8 +4,8 @@ import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, 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 { fromEvent, of } from 'rxjs'; +import { debounceTime, 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'; @@ -15,11 +15,10 @@ import { VehicleUpdateFreightComponent } from '../../modal/vehicle/update-freigh import { OneCarOrderViewtrackComponent } from '../../modal/vehicle/view-track/view-track.component'; import { OrderManagementService } from '../../services/order-management.service'; - @Component({ selector: 'app-supply-management-vehicle', templateUrl: './vehicle.component.html', - styleUrls: ['./vehicle.component.less'] + styleUrls: ['./vehicle.component.less', '../../../commom/less/expend-but.less'] }) export class OrderManagementVehicleComponent implements OnInit { ui: SFUISchema = {}; @@ -29,9 +28,9 @@ export class OrderManagementVehicleComponent implements OnInit { isVisibleEvaluate = false; isVisible = false; loading: boolean = true; - changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录 - changeViewId: any; // 查看运费变更记录id - 用于查看 - ViewCause: any; // 变更运费查看数据 + changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录 + changeViewId: any; // 查看运费变更记录id - 用于查看 + ViewCause: any; // 变更运费查看数据 shipList: any; // 货主评价 数据 diverList: any; // 司机评价 数据 _$expand = false; @@ -45,39 +44,42 @@ export class OrderManagementVehicleComponent implements OnInit { columnsFloatView: STColumn[] = []; datass: any = [ { - one: '1', - two: '1', - three: '1', - id: 1 - }, + one: '1', + two: '1', + three: '1', + id: 1 + }, { - one: '2', - two: '2', - three: '2', - id: 2 - }, -]; -tabs = { - cancelQuantity: 0, - receivedQuantity: 0, - stayQuantity: 0, - signQuantity: 0, - compolatelQuantity: 0, - GoingQuantity: 0, - totalCount: 0 -}; -resourceStatus: any; + one: '2', + two: '2', + three: '2', + id: 2 + } + ]; + tabs = { + cancelQuantity: 0, + receivedQuantity: 0, + stayQuantity: 0, + signQuantity: 0, + compolatelQuantity: 0, + GoingQuantity: 0, + totalCount: 0 + }; + resourceStatus: any; + + scrollY = '400px'; + visible = false; constructor( public service: OrderManagementService, private modal: NzModalService, public shipperservice: ShipperBaseService, public router: Router, - public ar: ActivatedRoute, - ) { } + public ar: ActivatedRoute + ) {} /** - * 查询参数 - */ + * 查询参数 + */ get changeParams() { return { id: this.changeId @@ -89,26 +91,26 @@ resourceStatus: any; }; } get reqParams() { - const a:any = {}; - if(this.resourceStatus) { + const a: any = {}; + if (this.resourceStatus) { a.billStatus = this.resourceStatus; - } + } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '', - }, - }; + end: this.sf?.value?.createTime?.[1] || '' + } + }; } beforeReq = (requestOptions: STRequestOptions) => { - const a:any = {}; - if(this.resourceStatus) { + const a: any = {}; + if (this.resourceStatus) { a.billStatus = this.resourceStatus; - } + } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; if (this.sf) { @@ -117,34 +119,59 @@ resourceStatus: any; ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '', - }, + end: this.sf?.value?.createTime?.[1] || '' + } }); } this.loading = true; return requestOptions; }; afterRes = (data: any[], rawData?: any) => { - console.log(data) - this.loading = false + console.log(data); + this.loading = false; return data.map(item => ({ ...item, - disabled: item.billStatus == '6' + disabled: item.billStatus == '6' })); }; get selectedRows() { - return this.st?.list.filter((item) => item.checked) || []; + return this.st?.list.filter(item => item.checked) || []; } ngOnInit(): void { - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); this.initSF(); this.initST(); this.initSTFloat(); this.initSTFloatView(); + + setTimeout(() => { + this.getScrollY(); + }, 100); + fromEvent(window, 'resize') + .pipe(debounceTime(100)) + .subscribe(event => { + this.getScrollY(); + }); } + + getScrollY() { + const windowHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight); + const header = document.getElementsByTagName('layout-pro-header')?.[0]; + const headerWrapper = document.getElementsByTagName('page-header-wrapper')?.[0]; + if (windowHeight && header && headerWrapper) { + let scrollY = windowHeight - header.clientHeight - headerWrapper.clientHeight - 35 - 47 + const tabset = document.getElementsByTagName('nz-tabset')?.[0]; + if (tabset) { + scrollY -= tabset.clientHeight; + } + this.scrollY = scrollY + 'px'; + console.log(scrollY); + } + } + search() { - this.st?.load(1); - this.getGoodsSourceStatistical() + this.st?.load(1); + this.getGoodsSourceStatistical(); } getGoodsSourceStatistical() { this.tabs = { @@ -157,35 +184,35 @@ resourceStatus: any; totalCount: 0 }; const params: any = Object.assign({}, this.reqParams || {}); - delete params.billStatus - this.service.request(this.service.$api_statisticalStatus,params).subscribe(res => { + delete params.billStatus; + this.service.request(this.service.$api_statisticalStatus, params).subscribe(res => { if (res) { let totalCount = 0; - res.forEach((element: any) => { - if(element.billStatusLabel === '待发车') { - this.tabs.stayQuantity = element.quantity - } else if (element.billStatusLabel === '待接单') { - this.tabs.receivedQuantity = element.quantity - } else if (element.billStatusLabel === '运输中') { - this.tabs.GoingQuantity = element.quantity - } else if (element.billStatusLabel === '待签收') { - this.tabs.signQuantity = element.quantity - } else if (element.billStatusLabel === '已完成') { - this.tabs.compolatelQuantity = element.quantity - } else if (element.billStatusLabel === '已取消') { - this.tabs.cancelQuantity = element.quantity - } - totalCount += element.quantity - }); - this.tabs.totalCount = totalCount + res.forEach((element: any) => { + if (element.billStatusLabel === '待发车') { + this.tabs.stayQuantity = element.quantity; + } else if (element.billStatusLabel === '待接单') { + this.tabs.receivedQuantity = element.quantity; + } else if (element.billStatusLabel === '运输中') { + this.tabs.GoingQuantity = element.quantity; + } else if (element.billStatusLabel === '待签收') { + this.tabs.signQuantity = element.quantity; + } else if (element.billStatusLabel === '已完成') { + this.tabs.compolatelQuantity = element.quantity; + } else if (element.billStatusLabel === '已取消') { + this.tabs.cancelQuantity = element.quantity; + } + totalCount += element.quantity; + }); + this.tabs.totalCount = totalCount; } - }) + }); } /** - * 初始化查询表单 - */ - initSF() { + * 初始化查询表单 + */ + initSF() { this.schema = { properties: { _$expand: { type: 'boolean', ui: { hidden: true } }, @@ -193,8 +220,8 @@ resourceStatus: any; type: 'string', title: '订单号', ui: { - placeholder: '最多100个单号,空号隔开', - } + placeholder: '最多100个单号,空号隔开' + } }, resourceCode: { type: 'string', @@ -210,11 +237,11 @@ resourceStatus: any; searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - let str =q.replace(/^\s+|\s+$/g,""); + let str = q.replace(/^\s+|\s+$/g, ''); if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: str}) - .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) + .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { return of([]); @@ -223,76 +250,50 @@ resourceStatus: any; change: (q: any) => { this.getRegionCode(q); } - } as SFSelectWidgetSchema, + } as SFSelectWidgetSchema }, enterpriseProjectId: { type: 'string', title: '所属项目', ui: { widget: 'select', - placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - }, + placeholder: '请选择' } as SFSelectWidgetSchema }, loadingPlace: { type: 'string', title: '装货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + ui: {} }, dischargePlace: { type: 'string', title: '卸货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + ui: {} }, driverName: { title: '承运司机', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + ui: {} }, carNo: { title: '车牌号', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + ui: {} }, carCaptainName: { title: '车队长', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value, - }, - } - }, + ui: {} + }, paymentStatus: { title: '支付状态', type: 'string', ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, - visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFSelectWidgetSchema, + containsAllLable: true + } as SFSelectWidgetSchema }, createTime: { title: '创建时间', @@ -300,10 +301,7 @@ resourceStatus: any; ui: { widget: 'date', mode: 'range', - format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, riskStatus: { @@ -316,11 +314,8 @@ resourceStatus: any; ], ui: { widget: 'select', - placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value, - }, - }, + placeholder: '请选择' + } }, enterpriseInfoId: { type: 'string', @@ -328,12 +323,9 @@ resourceStatus: any; ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value, - }, allowClear: true, - asyncData: () => this.shipperservice.getNetworkFreightForwarder(), - }, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } }, // goodsNameId: { // type: 'string', @@ -362,16 +354,13 @@ resourceStatus: any; ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLable: true, - visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFSelectWidgetSchema, - }, + containsAllLable: true + } as SFSelectWidgetSchema + } }, type: 'object' }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 24, gutter: 4 } } }; } /** @@ -379,7 +368,7 @@ resourceStatus: any; */ initST() { this.columns = [ - { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, + { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, { title: '订单号', width: '200px', @@ -391,7 +380,7 @@ resourceStatus: any; title: '运费明细', width: '250px', className: 'text-right', - render: 'mybidDetailInfo', + render: 'mybidDetailInfo' }, { title: '录单员', render: 'createUserName', width: '200px', className: 'text-left' }, { title: '网络货运人', index: 'enterpriseInfoName', width: '250px', className: 'text-left' }, @@ -410,7 +399,8 @@ resourceStatus: any; className: 'text-left', width: '170px', render: 'goodsName' - }, { + }, + { title: '承运司机', className: 'text-left', width: '250px', @@ -420,7 +410,7 @@ resourceStatus: any; title: '收款人', className: 'text-left', render: 'payeeName', - width: '180px', + width: '180px' }, { title: '装卸货时间', @@ -432,7 +422,7 @@ resourceStatus: any; title: '创建时间', className: 'text-left', index: 'createTime', - width: '170px', + width: '170px' }, { title: '操作', @@ -440,65 +430,68 @@ resourceStatus: any; width: '130px', className: 'text-center block-td', buttons: [ - { text: '运费变更记录', - click: (_record) => this.OpenPrice(_record), - iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6', - acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] }, - }, - { - text: '查看详情', - click: (item: any) => { - this.router.navigate(['./vehicle-detail', item.id], { relativeTo: this.ar }); - }, - acl: { ability: ['USERCENTER-FREIGHT-USER-view'] }, + click: _record => this.OpenPrice(_record), + iif: item => + item.billStatus == '4' || + item.billStatus == '5' || + item.billStatus == '2' || + item.billStatus == '3' || + item.billStatus == '6', + acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] } }, + // { + // text: '查看详情', + // click: (item: any) => { + // this.router.navigate(['./vehicle-detail', item.id], { relativeTo: this.ar }); + // }, + // acl: { ability: ['USERCENTER-FREIGHT-USER-view'] } + // }, { text: '查看评价', - click: (_record) => this.viewEvaluate(_record), + click: _record => this.viewEvaluate(_record), iif: item => item.billStatus == '5', - acl: { ability: ['ORDER-VEHICLE-evaluation'] }, + acl: { ability: ['ORDER-VEHICLE-evaluation'] } }, { text: '变更运费', - click: (_record) => this.updateFreight(_record), + click: _record => this.updateFreight(_record), iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2', - acl: { ability: ['ORDER-VEHICLE-FreightChangeWholeDetail'] }, + acl: { ability: ['ORDER-VEHICLE-FreightChangeWholeDetail'] } }, { text: '确认签收', - click: (_record) => this.confirmReceipt(_record), + click: _record => this.confirmReceipt(_record), iif: item => item.billStatus == '4', - acl: { ability: ['ORDER-VEHICLE-signWholeOrder'] }, + acl: { ability: ['ORDER-VEHICLE-signWholeOrder'] } }, { text: '取消订单', - click: (_record) => this.cancellation(_record), - iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus !== '2', - acl: { ability: ['ORDER-VEHICLE-cancelAnOrder'] }, + click: _record => this.cancellation(_record), + iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus !== '2', + acl: { ability: ['ORDER-VEHICLE-cancelAnOrder'] } }, { text: '修改订单', - click: (_record) => this.changeOrder(_record), + click: _record => this.changeOrder(_record), iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3', - acl: { ability: ['ORDER-VEHICLE-modificationOrder'] }, + acl: { ability: ['ORDER-VEHICLE-modificationOrder'] } }, { text: '申请退款', - click: (_record) => this.applyRefund(_record), + click: _record => this.applyRefund(_record), iif: item => item.isApplyForRefund, - acl: { ability: ['ORDER-VEHICLE-modificationOrder'] }, + acl: { ability: ['ORDER-VEHICLE-modificationOrder'] } }, { text: '查看轨迹', - click: (_record) => this.viewTrack(_record), - iif: item => item.billStatus !== '1' && item.billStatus !== '6', + click: _record => this.viewTrack(_record), + iif: item => item.billStatus !== '1' && item.billStatus !== '6' // acl: { ability: ['VEHICLE-LIST-view'] }, - }, - - ], - }, + } + ] + } ]; } initSTFloat() { @@ -518,7 +511,7 @@ resourceStatus: any; className: 'text-center', index: 'applyUserName' }, - { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, + { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, { title: '操作', fixed: 'right', @@ -526,15 +519,15 @@ resourceStatus: any; buttons: [ { text: '查看', - click: (_record) => this.FloatView(_record), + click: _record => this.FloatView(_record) }, { text: '撤销', - click: (_record) => this.revoke(_record), - iif: item => item.handleStatus === '1' || item.handleStatus === 1, - }, - ], - }, + click: _record => this.revoke(_record), + iif: item => item.handleStatus === '1' || item.handleStatus === 1 + } + ] + } ]; } initSTFloatView() { @@ -552,39 +545,31 @@ resourceStatus: any; index: 'amountAfterChange', render: 'amountAfterChange' }, - { title: '变更值', - index: 'amountchangeValue', - render: 'amountchangeValue', - width: '120px', - className: 'text-center' }, - { title: '变更后', - index: 'amountBeforeChange', - render: 'amountBeforeChange', - width: '120px', - className: 'text-center' } + { title: '变更值', index: 'amountchangeValue', render: 'amountchangeValue', width: '120px', className: 'text-center' }, + { title: '变更后', index: 'amountBeforeChange', render: 'amountBeforeChange', width: '120px', className: 'text-center' } ]; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) + ) ) - ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); -} + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 查询字段个数 */ @@ -592,14 +577,14 @@ resourceStatus: any; return Object.keys(this.schema?.properties || {}).length; } /** - * 伸缩查询条件 - */ + * 伸缩查询条件 + */ expandToggle(): void { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } tabChange(item: any) { - console.log(item) + console.log(item); } /** * 重置表单 @@ -618,85 +603,81 @@ resourceStatus: any; /** * 导入货源 */ - importGoodsSource() { + importGoodsSource() {} + audit(item: any) {} - } - audit(item: any) { - } - - /* + /* * 审核关闭弹窗 view: 1 浮动费用: 0 查看评价: 3 */ handleCancel(type: string) { - console.log(type) - if(type === '0') { - this.isVisible = false - } else if(type === '1') { - this.isVisibleView = false - } else if(type === '2') { - this.isVisibleEvaluate = false + console.log(type); + if (type === '0') { + this.isVisible = false; + } else if (type === '1') { + this.isVisibleView = false; + } else if (type === '2') { + this.isVisibleEvaluate = false; } } OpenPrice(value: any) { this.changeId = value.id; - this.isVisible = true + this.isVisible = true; } - /** - * 浮动费用查看 - */ + /** + * 浮动费用查看 + */ FloatView(item: any) { - console.log(item) + console.log(item); this.changeViewId = item.id; - this.service.request(this.service.$api_getChangeRecordWholeDetail, {id: this.changeViewId}).subscribe((res) => { + this.service.request(this.service.$api_getChangeRecordWholeDetail, { id: this.changeViewId }).subscribe(res => { this.ViewCause = res; - }) - this.isVisibleView = true + }); + this.isVisibleView = true; } - /** - *查看评价 - */ + /** + *查看评价 + */ viewEvaluate(item: any) { - console.log(item) - this.isVisibleEvaluate = true + console.log(item); + this.isVisibleEvaluate = true; const params = { businessCode: item.billCode, - evaluateUserId: item.shipperAppUserId, - } + evaluateUserId: item.shipperAppUserId + }; const params2 = { businessCode: item.billCode, - evaluateUserId: item.shipperAppUserId, - } + evaluateUserId: item.shipperAppUserId + }; this.service.request(this.service.$api_getBillEvaluateByShipper, params).subscribe(res => { - console.log(res) - this.shipList = res.evaluateInfos - + console.log(res); + this.shipList = res.evaluateInfos; }); this.service.request(this.service.$api_getBillEvaluateDriverByShipper, params2).subscribe(res => { - console.log(res) - this.diverList = res.evaluateInfos + console.log(res); + this.diverList = res.evaluateInfos; }); } - /** + /** *变更运费 */ - updateFreight(item: any) { - console.log(item?.isFreightChangeApplication) + updateFreight(item: any) { + console.log(item?.isFreightChangeApplication); this.service.request(this.service.$api_get_getFreightChangeWholeDetail, { id: item.id }).subscribe(data => { if (data) { const modal = this.modal.create({ nzTitle: '变更运费', nzWidth: 580, nzContent: VehicleUpdateFreightComponent, - nzComponentParams: { data: { ...data, id: item.id,isFreightChangeApplication: item?.isFreightChangeApplication } }, - nzFooter: null, + nzComponentParams: { data: { ...data, id: item.id, isFreightChangeApplication: item?.isFreightChangeApplication } }, + nzFooter: null }); - modal.afterClose.subscribe((res: Boolean) => { - if(res) { + modal.afterClose.subscribe((res: Boolean) => { + if (res) { this.st.load(); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } }); } @@ -705,33 +686,33 @@ resourceStatus: any; /** *修改附加费率 */ - modifyRate() { + modifyRate() { let params: any[] = []; this.selectedRows.forEach(item => { params.push(item.id); }); - if(params.length === 0) { - this.service.msgSrv.error('请先选择订单!') - return + if (params.length === 0) { + this.service.msgSrv.error('请先选择订单!'); + return; } - const modal = this.modal.create({ - nzTitle: '修改附加费率', - nzWidth: 600, - nzContent: VehicleModifyRateComponent, - nzComponentParams: { data: { ids: params } }, - nzFooter: null, - }); - modal.afterClose.subscribe((result) => { - if (result) { - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); + const modal = this.modal.create({ + nzTitle: '修改附加费率', + nzWidth: 600, + nzContent: VehicleModifyRateComponent, + nzComponentParams: { data: { ids: params } }, + nzFooter: null + }); + modal.afterClose.subscribe(result => { + if (result) { + this.st.load(1); + this.getGoodsSourceStatistical(); + } + }); } - /** + /** *修改网络货运人 */ - modifyFreightPeople() { + modifyFreightPeople() { let params: any[] = []; this.selectedRows.forEach(item => { params.push(item.id); @@ -740,63 +721,63 @@ resourceStatus: any; this.selectedRows.forEach(item => { params2.push(item.enterpriseInfoId); }); - if(params.length === 0) { - this.service.msgSrv.error('请先选择订单!') - return + if (params.length === 0) { + this.service.msgSrv.error('请先选择订单!'); + return; } - const modal = this.modal.create({ - nzTitle: '修改网络货运人', - nzWidth: 600, - nzContent: VehicleFreightPeopleComponent, - nzComponentParams: { data: { ids: params, enterpriseInfoIds: params2, } }, - nzFooter: null, - }); - modal.afterClose.subscribe((result) => { - if (result) { - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); + const modal = this.modal.create({ + nzTitle: '修改网络货运人', + nzWidth: 600, + nzContent: VehicleFreightPeopleComponent, + nzComponentParams: { data: { ids: params, enterpriseInfoIds: params2 } }, + nzFooter: null + }); + modal.afterClose.subscribe(result => { + if (result) { + this.st.load(1); + this.getGoodsSourceStatistical(); + } + }); } - /** + /** *修改网络货运人 */ - modifycaptain() { + modifycaptain() { let params: any[] = []; this.selectedRows.forEach(item => { params.push(item.id); }); - if(params.length === 0) { - this.service.msgSrv.error('请先选择订单!') - return + if (params.length === 0) { + this.service.msgSrv.error('请先选择订单!'); + return; } - const modal = this.modal.create({ - nzTitle: '修改车队长', - nzWidth: 900, - nzContent: VehicleModifyCaptainComponent, - nzComponentParams: { data: { ids: params, } }, - nzFooter: null, - // nzOnOk: sin => { - // this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('变更运费成功'); - // modal.destroy(); - // this.st.reload(); - // } - // }); - // return false; - // } - }); - modal.afterClose.subscribe((result) => { - if (result) { - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); + const modal = this.modal.create({ + nzTitle: '修改车队长', + nzWidth: 900, + nzContent: VehicleModifyCaptainComponent, + nzComponentParams: { data: { ids: params } }, + nzFooter: null + // nzOnOk: sin => { + // this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { + // if (res) { + // this.service.msgSrv.success('变更运费成功'); + // modal.destroy(); + // this.st.reload(); + // } + // }); + // return false; + // } + }); + modal.afterClose.subscribe(result => { + if (result) { + this.st.load(1); + this.getGoodsSourceStatistical(); + } + }); } - + // *确认签收 - + confirmReceipt(item: any) { const modalRef = this.modal.create({ nzTitle: '确认签收', @@ -809,67 +790,67 @@ resourceStatus: any; nzFooter: null }); } - revoke(item: any) { - this.modal.confirm({ - nzTitle: '是否确定立即撤销费用变更!', - nzOnOk: () => - this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id}).subscribe((res) => { - console.log(res) - if(res) { - this.service.msgSrv.success('撤销成功!') - this.stFloat.reload() + revoke(item: any) { + this.modal.confirm({ + nzTitle: '是否确定立即撤销费用变更!', + nzOnOk: () => + this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe(res => { + console.log(res); + if (res) { + this.service.msgSrv.success('撤销成功!'); + this.stFloat.reload(); } }) - }); + }); + } + // 取消订单 + cancellation(item: any) { + // api_get_cancelAnOrder + this.modal.confirm({ + nzTitle: '确定取消该订单吗?', + nzContent: `取消后无法恢复,请确认`, + nzOnOk: () => + this.service.request(this.service.$api_get_cancelAnOrder, { id: item.id }).subscribe(res => { + if (res === true) { + this.service.msgSrv.success('操作成功!'); + this.st.load(1); + this.getGoodsSourceStatistical(); + this.initST(); + } + }) + }); + } + userAction() { + let params: any[] = []; + if (this.selectedRows.length <= 0) { + this.service.msgSrv.warning('请选择需要签收的订单!'); + return; } - // 取消订单 - cancellation(item: any) { - // api_get_cancelAnOrder - this.modal.confirm({ - nzTitle: '确定取消该订单吗?', - nzContent: `取消后无法恢复,请确认`, - nzOnOk: () => - this.service.request(this.service.$api_get_cancelAnOrder, {id: item.id}).subscribe((res) => { - if (res === true) { - this.service.msgSrv.success('操作成功!'); - this.st.load(1); - this.getGoodsSourceStatistical() - this.initST(); - } - }), - }) - } - userAction() { - let params: any[] = []; - if (this.selectedRows.length <= 0) { - this.service.msgSrv.warning("请选择需要签收的订单!") - return; + let flag = true; + this.selectedRows.forEach(item => { + if (item.billStatus !== '4') { + this.service.msgSrv.warning('存在非待签收状态订单,无法签收!'); + flag = false; } - let flag = true; - this.selectedRows.forEach(item => { - if(item.billStatus !=='4'){ - this.service.msgSrv.warning("存在非待签收状态订单,无法签收!") - flag = false; - } - params.push(item.id); - }); - if(!flag) return; - this.service.request(this.service.$api_get_batchSignWholeOrder, params).subscribe(res => { - if (res) { - console.log(res); - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); - } - // 修改订单 + params.push(item.id); + }); + if (!flag) return; + this.service.request(this.service.$api_get_batchSignWholeOrder, params).subscribe(res => { + if (res) { + console.log(res); + this.st.load(1); + this.getGoodsSourceStatistical(); + } + }); + } + // 修改订单 changeOrder(value: any) { this.router.navigate(['order-management/vehicle-detailChange', value.id]); } - /** + /** *申请退款 */ - applyRefund(item: any) { + applyRefund(item: any) { const modalRef = this.modal.create({ nzTitle: '申请退款', nzContent: OneCarOrderCancelConfirmComponent, @@ -880,27 +861,27 @@ resourceStatus: any; nzFooter: null }); modalRef.afterClose.subscribe((res: boolean) => { - if(res) { + if (res) { this.resetSF; this.st.load(); } }); } - /** + /** *查看轨迹 */ - viewTrack(item: any) { + viewTrack(item: any) { const modalRef = this.modal.create({ nzTitle: '查看轨迹', nzContent: OneCarOrderViewtrackComponent, nzWidth: '800px', nzComponentParams: { - i: item, + i: item }, nzFooter: null }); modalRef.afterClose.subscribe((res: boolean) => { - if(res) { + if (res) { } }); } diff --git a/src/app/shared/shared-zorro.module.ts b/src/app/shared/shared-zorro.module.ts index 2682add7..da706a62 100644 --- a/src/app/shared/shared-zorro.module.ts +++ b/src/app/shared/shared-zorro.module.ts @@ -47,6 +47,7 @@ import { NzAffixModule } from 'ng-zorro-antd/affix'; import { NzTypographyModule } from 'ng-zorro-antd/typography'; import { NzSwitchModule } from 'ng-zorro-antd/switch'; import { NzImageModule } from 'ng-zorro-antd/image'; +import { NzDrawerModule } from 'ng-zorro-antd/drawer'; export const SHARED_ZORRO_MODULES = [ NzButtonModule, NzGridModule, @@ -87,5 +88,6 @@ export const SHARED_ZORRO_MODULES = [ NzAffixModule, NzTypographyModule, NzSwitchModule, - NzImageModule + NzImageModule, + NzDrawerModule ]; diff --git a/src/styles.less b/src/styles.less index 7053b07c..fada8239 100644 --- a/src/styles.less +++ b/src/styles.less @@ -7,59 +7,64 @@ @import './styles/theme'; .icon { - width : 18px; - fill : currentColor; - overflow : hidden; - font-size: 18px !important; - color : #ffffff; - margin-right: 10px; + width : 18px; + fill : currentColor; + overflow : hidden; + font-size : 18px !important; + color : #ffffff; + margin-right: 10px; } @layout-gutter: 8px; /* 全局滚动条美化 */ *::-webkit-scrollbar { - width : (@layout-gutter); - height: (@layout-gutter); + width : (@layout-gutter); + height: (@layout-gutter); } *::-webkit-scrollbar-thumb { - background : #d9d9d9; - cursor : pointer; - border-radius: (@layout-gutter) / 2; + background : #d9d9d9; + cursor : pointer; + border-radius: (@layout-gutter) / 2; } /* 全局隐藏input-number上下箭头 谷歌*/ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { - -webkit-appearance: none; + -webkit-appearance: none; } /* 全局隐藏input-number上下箭头 火狐*/ input[type="number"] { - -moz-appearance: textfield; + -moz-appearance: textfield; } .alain-pro__sider-logo { - padding-left: 12px; + padding-left: 12px; } .break-word-all { - word-break: break-all; - word-wrap : break-word; + word-break: break-all; + word-wrap : break-word; } + st { - .block-td { - .ant-divider-vertical { - display: none; - margin: 0; - border-left: none; - } - - st-td { - span>a { - display: block; - } + .block-td { + .ant-divider-vertical { + display : none; + margin : 0; + border-left: none; + } + + st-td { + span>a { + display: block; } } - } \ No newline at end of file + } +} + +nz-range-picker { + width: 100%; +} \ No newline at end of file From a78db667e6727618d01c93ff5a1680d6abdcf169 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 22 Mar 2022 09:26:23 +0800 Subject: [PATCH 05/17] edit --- .../components/transaction-flow/transaction-flow.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.ts b/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.ts index a2bbd47c..46af35d3 100644 --- a/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.ts +++ b/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.ts @@ -151,7 +151,7 @@ export class TransactionFlowComponent { }, default: '' }, - orderS2n2221: { + enterpriseName: { type: 'string', title: '账户名称', ui: { @@ -213,7 +213,7 @@ export class TransactionFlowComponent { private initST(): STColumn[] { return [ { title: '交易时间', index: 'createTime', width: 180 }, - { title: '流水号', index: 'transactionNumber', width: 170 }, + { title: '流水号', index: 'transactionNumber', width: 180 }, { title: '交易类型', index: 'tradeTypeLabel', width: 120 }, { title: '关联单号', index: 'businessNumber', width: 150 }, { title: '账户类型', index: 'accountTypeLabel', width: 130 }, From 73eb4801383158dedd0ffbdfabfab9a7c970556d Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 22 Mar 2022 09:42:33 +0800 Subject: [PATCH 06/17] fix bug --- .../order-management/components/risk/risk.component.html | 4 ++-- .../routes/order-management/components/risk/risk.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/routes/order-management/components/risk/risk.component.html b/src/app/routes/order-management/components/risk/risk.component.html index fd61afec..00a56cc6 100644 --- a/src/app/routes/order-management/components/risk/risk.component.html +++ b/src/app/routes/order-management/components/risk/risk.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-21 15:09:10 + * @LastEditTime : 2022-03-22 09:42:03 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\risk\\risk.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -92,7 +92,7 @@

货物名称:{{ i?.goodsName }}

重量/体积:{{ i?.weight }}吨/{{ i?.volume }}方

-

车型/车长:{{ i?.carModel }}/ {{ i?.carLength }}

+

车型/车长:{{ i?.carModelLabel }}/ {{ i?.carLengthLabel }}

diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index a15c8233..7c8d3ae5 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -279,7 +279,7 @@ export class OrderManagementRiskComponent implements OnInit { { title: '货物信息', className: 'text-left', - width: '200px', + width: '250px', render: 'goodsInfoVOList' }, { From 6ba71ef342c956f51e8cb0fc10b13787800e3c17 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 22 Mar 2022 10:05:39 +0800 Subject: [PATCH 07/17] fix bug --- .../freight/freight-config/freight-config.component.ts | 1 + .../dynamic-setting-modal.component.ts | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts index e4aa738f..1f605413 100644 --- a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts +++ b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts @@ -70,6 +70,7 @@ export class FreightConfigComponent implements OnInit { nzWidth: 900, nzComponentParams: { extendType: '2', + spareBusinessId: item.networkTransporter, businessId: item.id, formatTypeList: (item: any[]) => [ ...item, diff --git a/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts b/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts index 426e0ddb..0de00c17 100644 --- a/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts +++ b/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-10 16:06:17 * @LastEditors : Shiming - * @LastEditTime : 2022-02-17 13:28:39 + * @LastEditTime : 2022-03-22 10:05:15 * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-modal\\dynamic-setting-modal.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -34,6 +34,8 @@ export class DynamicSettingModalComponent implements OnInit { @Input() extendType!: string; @Input() + spareBusinessId!: string; + @Input() businessId!: string; @Input() configvalue!: string; @@ -54,7 +56,8 @@ export class DynamicSettingModalComponent implements OnInit { .request('/api/mdc/pbc/sysConfigItemExtend/getSysConfigExtend', { configFullKey: this.configFullKey, extendType: this.extendType, - businessId: this.businessId + businessId: this.businessId, + spareBusinessId: this.spareBusinessId, }) .pipe( map((res: Array) => { From 41b5ba41b08d9646b8a708ad2ed94c9cc84a555c Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 22 Mar 2022 10:26:19 +0800 Subject: [PATCH 08/17] edit --- .../payment-record.component.ts | 2 +- .../bulk-detail-change.component.html | 2 +- .../bulk-detail/bulk-detail.component.html | 2 +- .../vehicle-detail-change.component.html | 2 +- .../vehicle-detail.component.html | 2 +- .../view-track/view-track.component.html | 2 +- .../bulk-detail/bulk-detail.component.html | 2 +- .../vehicle-detail.component.html | 2 +- .../amap-path-simplifier.component.ts | 153 ++++++++---------- .../shared/components/amap/amap.service.ts | 52 ++++++ 10 files changed, 131 insertions(+), 90 deletions(-) diff --git a/src/app/routes/financial-management/components/payment-record/payment-record.component.ts b/src/app/routes/financial-management/components/payment-record/payment-record.component.ts index 2e32718b..a41bc6e4 100644 --- a/src/app/routes/financial-management/components/payment-record/payment-record.component.ts +++ b/src/app/routes/financial-management/components/payment-record/payment-record.component.ts @@ -82,7 +82,7 @@ export class PaymentRecordComponent implements OnInit { hidden: true } }, - orderSn: { + orderPaymentCode: { type: 'string', title: '支付编号', ui: { diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html index 4a204913..e65eb5c0 100644 --- a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html @@ -348,7 +348,7 @@
- +
diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html index f1fc2836..81f7dc0c 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html @@ -212,7 +212,7 @@
- +
diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html index bd8aed4e..0554935e 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html @@ -322,7 +322,7 @@
- +
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 5f2cc64f..fd15143d 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 @@ -218,7 +218,7 @@
- +
diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html index c7c4dbbd..1d27458b 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html @@ -16,7 +16,7 @@
- +
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 13710e4c..3c566dc6 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 @@ -236,7 +236,7 @@
- +
diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html index 0395a748..d143b547 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html @@ -216,7 +216,7 @@
- +
diff --git a/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts b/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts index 928a066f..b358e178 100644 --- a/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts +++ b/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts @@ -3,6 +3,7 @@ import { Component, Input, OnChanges, OnInit, Output, SimpleChanges, EventEmitte import { amapConf } from '@conf/amap.config'; import { throwError } from 'rxjs'; import { BaseService } from 'src/app/shared/services'; +import { InfoItem, MapList, PathList, POI } from '../amap.service'; declare var AMap: any; declare var AMapUI: any; declare var Loca: any; @@ -21,41 +22,49 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy infoWindow: any; markerList: any; SimpleMarker: any; + // 简单路径信息 @Input() - pathList: any = []; + mapList: MapList[] = []; + // 完整路线图信息 + @Input() + pathList: PathList[] = []; + // 当前选中路线图下标 @Input() selectedIndex = 0; + // 标点数组 + @Input() + pois: POI[] = []; + private _pois: any = []; + @Input() mapWidth = '800px'; - @Input() MapList: any; @Input() mapHeight = '500px'; @Output() readonly clcikPointEvent = new EventEmitter(); - @Input() - pois: any = []; - private _pois: any = []; - constructor(public service: BaseService) {} ngOnChanges(changes: SimpleChanges): void { + // 路线图变更: 设置路线图, 指定路线图 if (changes?.pathList?.currentValue && this?.pathSimplifierIns) { this.setData(changes.pathList?.currentValue); this.setPathIndex(this.selectedIndex); } - if (changes?.MapList?.currentValue && this?.pathSimplifierIns && changes.MapList?.currentValue.length > 0) { - // console.log(this.MapList); + // 路径信息变更: 更新路线图, 设置路线图, 指定路线图, 获取终点地址信息并标点 + if (changes?.mapList?.currentValue && this?.pathSimplifierIns && changes.mapList?.currentValue.length > 0) { + // console.log(this.mapList); this.pathList = [ { name: '路线1', - points: changes.MapList?.currentValue + points: changes.mapList?.currentValue } ]; this.setData(this.pathList); this.setPathIndex(this.selectedIndex); - this.getPoiByPositon(this.MapList[this.MapList?.length - 1]?.lnglat); + this.getPoiByPositon(this.mapList[this.mapList?.length - 1]?.lnglat); } + // 标点列表变更: 更新标点数据, 绘画标点 if (changes?.pois?.currentValue) { // console.log(this.pois); this._pois = changes?.pois?.currentValue; @@ -68,11 +77,13 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy this.mapInit(); } ngOnDestroy(): void { + // 销毁地图数据 if (this.aMap) { this.aMap.destroy(); } } + /** 地图初始化 */ mapInit() { AMapLoader.load({ key: CONFIG.key, @@ -94,14 +105,15 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy }); this.aMap.on('complete', () => { + // this.service.msgSrv.info('地图加载完成 !'); // 信息窗口 this.infoWindow = new AMap.InfoWindow({ offset: new AMap.Pixel(0, -40) }); + // 初始化定位工具 this.geocoder = new AMap.Geocoder({ - radius: 1000 //范围,默认:500 + radius: 500 //范围,默认:500 }); - // this.service.msgSrv.info('地图加载完成 !'); this.pathInit(); this.setPOIS(); }); @@ -111,34 +123,20 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy }); } + /** 初始化路径工具 */ pathInit() { this.pathSimplifierIns = new AMapUI.PathSimplifier({ zIndex: 100, //autoSetFitView:false, - map: this.aMap, //所属的地图实例 - - getPath: function (pathData: any, pathIndex: any) { - var points = pathData.points, - lnglatList = []; - - for (var i = 0, len = points?.length; i < len; i++) { - lnglatList.push(points[i].lnglat); - } - - return lnglatList; - }, - getHoverTitle: function (pathData: any, pathIndex: any, pointIndex: any) { - if (pointIndex >= 0) { - //point - return `${pathData.name},${pathData.points[pointIndex].name}`; - } - return ''; - }, + map: this.aMap, + // 重组路径数据 + getPath: (pathData: PathList, pathIndex: number) => pathData.points.map(points => points.lnglat), + // 鼠标悬浮事件 + getHoverTitle: (pathData: PathList, pathIndex: number, pointIndex: number) => '', renderOptions: { - renderAllPointsIfNumberBelow: 10 //绘制路线节点,如不需要可设置为-1 + renderAllPointsIfNumberBelow: 20 //绘制路线节点,如不需要可设置为-1 } }); - (window as any).pathSimplifierIns = this.pathSimplifierIns; this.setData(this.pathList); if (this.pathList.length > 0) { @@ -147,26 +145,39 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy this.pathSimplifierIns.on('pointClick', (e: any, info: any) => { this.clcikPointEvent.emit({ e, info }); - console.log(`Click: ${info.pathData.points[info.pointIndex].name}`); + // 弹出信息窗口 + if (info) { + this.geocoder.getAddress(info.pathData.points[info.pointIndex].lnglat, (status: any, result: any) => { + if (status === 'complete' && result.info === 'OK') { + // result中对应详细地理坐标信息 + this.selectedPOI({ + position: info.pathData.points[info.pointIndex].lnglat, + content: ` +