From 220df936f2626175cb010ba46113b9e835f4ac68 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 10:57:04 +0800 Subject: [PATCH 01/54] edit --- .../components/etc-blacklist/etc-blacklist.component.ts | 2 +- .../invoice-requested/invoice-requested.component.html | 4 ++-- .../invoice-requested/invoice-requested.component.ts | 5 +++++ src/app/routes/ticket-management/services/ticket.service.ts | 4 +++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/app/routes/ticket-management/components/etc-blacklist/etc-blacklist.component.ts b/src/app/routes/ticket-management/components/etc-blacklist/etc-blacklist.component.ts index a899ade5..381bb9db 100644 --- a/src/app/routes/ticket-management/components/etc-blacklist/etc-blacklist.component.ts +++ b/src/app/routes/ticket-management/components/etc-blacklist/etc-blacklist.component.ts @@ -237,7 +237,7 @@ export class ETCBlacklistComponent implements OnInit { } }, params5: { - title: '司机姓名', + title: '车辆所有人', type: 'string', ui: { placeholder: '请输入', diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html index 1f5cb96d..8b2f989e 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html @@ -20,7 +20,7 @@
- +
- + \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts index c58695a6..37898646 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts @@ -302,6 +302,11 @@ export class InvoiceRequestedComponent { this.sf?.setValue('/expand', this._$expand); } + // 导出 + exprot() { + this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_invoice_requested_page); + } + private initSF(): SFSchema { return { properties: { diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index a095e26e..f8f17ed0 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -17,6 +17,8 @@ export class TicketService extends ShipperBaseService { // 运营端查询发票申请记录 $api_get_invoice_requested_page = '/api/fcc/ficoVatappH/queryOperateVatappHList'; + // 导出发票申请记录 + $api_export_invoice_requested_page = '/api/fcc/ficoVatappH/reportOperateVatappHList'; // 获取开票申请订单明细头部信息 $api_get_invoice_requested_header_detail = '/api/fcc/ficoVatappBill/getDetailHeadByVatappHId'; // 货主/运营端获取开票申请订单明细 @@ -74,7 +76,7 @@ export class TicketService extends ShipperBaseService { // 获取分票发票抬头开票申请订单明细 $api_get_invoice_order_detail = '/api/fcc/ficoVatappBill/getDetailByVatinvHId'; // 货主/运营端获取开票申请订单明细导出 - $api_export_invoice_order_detail = '/api/fcc/ficoVatappBill/reportDetailByVatapp'; + $api_export_invoice_order_detail = '/api/fcc/ficoVatappBill/reportDetailByVatinvHId'; // 获取分票发票抬头开票申请费用明细 $api_get_invoice_cost_detail = '/api/fcc/ficoVatappFee/getDetailByVatinvHId'; // 获取分票发票明细 From 434142d600ba3594b43fbc8f70df768ca8b95cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Tue, 12 Apr 2022 13:32:36 +0800 Subject: [PATCH 02/54] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order-reporting.component.html | 4 ++-- .../order-reporting/order-reporting.component.ts | 16 ++++++++++++++++ .../services/order-management.service.ts | 12 ++++++------ .../order-reporting/order-reporting.component.ts | 11 +++++------ 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.html b/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.html index df751a97..be7285cc 100644 --- a/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.html +++ b/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.html @@ -49,10 +49,10 @@ - {{item?.billCode}} + {{item?.billCode}} - {{item?.wayBillCode}} + {{item?.wayBillCode}} diff --git a/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts b/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts index af13dbb0..69d0bf0f 100644 --- a/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts +++ b/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts @@ -594,4 +594,20 @@ export class DatatableOrderReportingComponent implements OnInit { } } + routeToOrder(item: any) { + if (item.billType === '1') { + this.router.navigate(['/order-management/vehicle/vehicle-detail/' + item.orderId]); + } else { + this.router.navigate(['/order-management/bulk/bulk-detail/' + item.orderId]); + } + } + + routeTowaybill(item: any) { + if (item.billType === '1') { + this.router.navigate(['/waybill-management/vehicle/vehicle-detail/' + item.waybillId]); + } else { + this.router.navigate(['/waybill-management/bulk/bulk-detail/' + item.waybillId]); + } + } + } 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 13e8bb1d..7fac1441 100644 --- a/src/app/routes/order-management/services/order-management.service.ts +++ b/src/app/routes/order-management/services/order-management.service.ts @@ -52,7 +52,7 @@ export class OrderManagementService extends ShipperBaseService { // 订单申请撤销 $api_get_revokeChangeRecord = `/api/sdc/billFreightChangeApplication/revokeChangeRecord`; // 运费变更申请-整车 - $api_get_insertFreightChangeWhole = `/api/sdc/billFreightChangeApplication/insertFreightChangeWhole`; + $api_get_insertFreightChangeWhole = `/api/sdc/billFreightChangeApplication/insertOperateFreightChangeWhole`; // 取消订单 $api_get_cancelAnOrder = `/api/sdc/billOperate/cancelAnOrder`; // 批量签收整车订单 @@ -92,7 +92,7 @@ export class OrderManagementService extends ShipperBaseService { //运费变更申请计算费用-整车 $api_getWholeSurchargeDetail = `/api/sdc/billFreightChangeApplication/getWholeSurchargeDetail`; //运费变更申请-大宗 - $api_change_bulk = `/api/sdc/billFreightChangeApplication/insertFreightChangeBulk`; + $api_change_bulk = `/api/sdc/billFreightChangeApplication/insertOperateFreightChangeBulk`; // 删除装卸货信息 $api_delete_Wholedeletebatch = `/api/sdc/unLoadingPlace/deletebatch`; // 修改-大宗订单 @@ -197,13 +197,13 @@ export class OrderManagementService extends ShipperBaseService { // 异步导出风险单导出 $api_get_asyncExportRiskBillList = `/api/sdc/billRiskOperate/asyncExportRiskBillList`; // 异步导出合规抽查导出 - $api_get_asyncExportSpotCheckList= `/api/sdc/BillComplianceSpotCheck/asyncExportSpotCheckList`; + $api_get_asyncExportSpotCheckList = `/api/sdc/BillComplianceSpotCheck/asyncExportSpotCheckList`; // 异步导出单据审核导出 - $api_get_asyncExportExamineBillList= `/api/sdc/billExamine/asyncExportExamineBillList`; + $api_get_asyncExportExamineBillList = `/api/sdc/billExamine/asyncExportExamineBillList`; // 异步导出单据审核导出 - $api_abnormalWarning_asyncExport= `/api/sdc/abnormalWarning/asyncExport`; + $api_abnormalWarning_asyncExport = `/api/sdc/abnormalWarning/asyncExport`; // 异步导出投诉管理导出 - $api_asyncExportComplaintListDrv= `/api/sdc/complaint/operate/asyncExportComplaintListDrv`; + $api_asyncExportComplaintListDrv = `/api/sdc/complaint/operate/asyncExportComplaintListDrv`; /** * 根据企业ID,获取企业历史网络货运人 * @returns diff --git a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts index e11afb2a..2cf91aeb 100644 --- a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts +++ b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts @@ -119,7 +119,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { 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 }) @@ -129,7 +129,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { return of([]); } }, - + } as SFSelectWidgetSchema }, driverName: { @@ -262,7 +262,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { { title: '货主名称', index: 'shipperName', className: 'text-center', width: '180px' }, { title: '货主纳税人识别号', index: 'shipperProvinceCode', className: 'text-center', width: '180px' }, { title: '录单时间', index: 'billCreateTime', className: 'text-center', width: '250px' }, - { title: '接单时间', index: 'wayBillCreateTime', className: 'text-center', width: '200px' }, + { title: '接单时间', index: 'wayBillCreateTime', className: 'text-center', width: '200px' }, { title: '发车时间', index: 'loadTime', className: 'text-center', width: '200px' }, { title: '到车时间', index: 'unloadTime', className: 'text-center', width: '150px' }, { title: '结束时间', index: 'payeeName', className: 'text-center', width: '150px' }, @@ -308,7 +308,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { nzOkText: '确定', nzCancelText: '取消', nzOnOk: () => { - this.service.request(this.service.$api_get_recessionTaxOrder,params).subscribe((res: any) => { + this.service.request(this.service.$api_get_recessionTaxOrder, params).subscribe((res: any) => { if (res) { this.service.msgSrv.success('撤销成功'); this.search(); @@ -371,7 +371,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { selectChange(item: any) { console.log(item); - + this.selectedIndex = item?.value || ''; setTimeout(() => { this.st.load(); @@ -499,5 +499,4 @@ export class TaxManagementOrderReportingComponent implements OnInit { }) } - } From 1a5a6473c7da8aab93d84c78028e946148d6a2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Tue, 12 Apr 2022 13:47:08 +0800 Subject: [PATCH 03/54] =?UTF-8?q?=E8=B5=84=E9=87=91=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fund-reporting.component.html | 4 ++-- .../fund-reporting/fund-reporting.component.ts | 17 +++++++++++++++++ .../order-reporting.component.ts | 10 ++++++---- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.html b/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.html index 32f56a3b..d48b1b26 100644 --- a/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.html +++ b/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.html @@ -37,10 +37,10 @@ {{item?.verifyStatusLabel}} - {{item?.orderCode}} + {{item?.orderCode}} - {{item?.wayBillCode}} + {{item?.wayBillCode}}
{{item?.tolalAmount | currency }}
diff --git a/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts b/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts index 1b75e714..d73b3fb2 100644 --- a/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts +++ b/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts @@ -465,6 +465,23 @@ export class DatatableFundReportingComponent implements OnInit { } } + routeToOrder(item: any) { + if (item.orderType === '1') { + window.open(location.origin + `/#/order-management/vehicle/vehicle-detail/${item.orderId}`); + } else { + window.open(location.origin + `/#/order-management/bulk/bulk-detail/${item.orderId}`); + } + } + + routeTowaybill(item: any) { + if (item.orderType === '1') { + window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.waybillId}`); + + } else { + window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.waybillId}`); + + } + } } diff --git a/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts b/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts index 69d0bf0f..0de0aa39 100644 --- a/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts +++ b/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts @@ -596,17 +596,19 @@ export class DatatableOrderReportingComponent implements OnInit { routeToOrder(item: any) { if (item.billType === '1') { - this.router.navigate(['/order-management/vehicle/vehicle-detail/' + item.orderId]); + window.open(location.origin + `/#/order-management/vehicle/vehicle-detail/${item.orderId}`); } else { - this.router.navigate(['/order-management/bulk/bulk-detail/' + item.orderId]); + window.open(location.origin + `/#/order-management/bulk/bulk-detail/${item.orderId}`); } } routeTowaybill(item: any) { if (item.billType === '1') { - this.router.navigate(['/waybill-management/vehicle/vehicle-detail/' + item.waybillId]); + window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.waybillId}`); + } else { - this.router.navigate(['/waybill-management/bulk/bulk-detail/' + item.waybillId]); + window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.waybillId}`); + } } From 1e7d839973441608e5d289c71ae1f4aacc86c5f8 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 15:44:07 +0800 Subject: [PATCH 04/54] edit --- .../individual-income.component.html | 2 +- .../individual-income.component.ts | 21 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.html b/src/app/routes/tax-management/components/individual-income/individual-income.component.html index dedb0881..56db2766 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.html +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.html @@ -36,7 +36,7 @@ + [req]="{ process: beforeReq }" [page]="{}" [loading]="service.http.loading" (change)="stChange($event)"> diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts index c55b07de..15583442 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { STChange, STColumn, STComponent, STData } from '@delon/abc/st'; +import { STChange, STColumn, STComponent, STData, 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'; @@ -32,16 +32,15 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { constructor(public service: TaxManagementService) {} - /** - * 查询参数 - */ - get reqParams() { - const params = Object.assign({}, this.sf?.value || {}, { - declareStatus: this.selectedIndex - }); - delete params._$expand; - return { ...params }; - } + beforeReq = (requestOptions: STRequestOptions) => { + Object.assign(requestOptions.body, { declareStatus: this.selectedIndex }); + if (this.sf) { + Object.assign(requestOptions.body, { ...this.sf.value }); + delete requestOptions.body._$expand; + } + this.selectedRows = []; + return requestOptions; + }; stChange(e: STChange): void { switch (e.type) { From dcd5a839c109b1d7e69be2fbf50e1a198ee0a767 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 16:10:57 +0800 Subject: [PATCH 05/54] edit --- .../components/abnormal-warning/abnormal-warning.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.ts b/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.ts index 29a61f01..70043520 100644 --- a/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.ts +++ b/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.ts @@ -180,7 +180,7 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { } } }, - carNos: { + carNo: { title: '车牌号', type: 'string', ui: { From 0aa3af32cd70c00afea4417cc7900c860f3582da Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 16:36:16 +0800 Subject: [PATCH 06/54] edit --- .../amap/amap-path-simplifier/amap-path-simplifier.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1c810c67..efa030e9 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 @@ -287,7 +287,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy * @param infoItem */ selectedPOI(infoItem: InfoItem) { - this.infoWindow.setContent(infoItem.content || `地址:
${infoItem.title}
`); + this.infoWindow.setContent(infoItem.content || `地址:
${infoItem.title}
`); this.infoWindow.open(this.aMap, infoItem.position); this.infoWindow.setPosition(infoItem.position); // 地图定位居中 From 7178081da817092f72679a57532148e73c1bc942 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 16:40:26 +0800 Subject: [PATCH 07/54] edit --- .../invoice-requested-detail.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts index 401e2a10..7700b77c 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts @@ -177,7 +177,7 @@ export class InvoiceRequestedDetailComponent implements OnInit { } routeToOrder(item: any) { - if (item.billType === 1) { + if (item.billType === '1') { this.router.navigate(['/order-management/vehicle/vehicle-detail/' + item.billHId]); } else { this.router.navigate(['/order-management/bulk/bulk-detail/' + item.billHId]); From 82217dfc7b519115cc27d05a1fcee2c193621683 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 16:58:00 +0800 Subject: [PATCH 08/54] edit --- .../release-publish.component.ts | 114 +++++++++--------- 1 file changed, 59 insertions(+), 55 deletions(-) diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 4b8b2798..5a261ff0 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -436,13 +436,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { map((res: any) => { return [...res]; }) - ) + ); }, change: (tag: any, org: any) => { - if(tag === '3'){ + if (tag === '3') { this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insuranceRate', null); - }else { + } else { this.getInsurersPrice(tag); } } @@ -455,7 +455,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '0' } - } , + } }, type2: { type: 'string', @@ -468,7 +468,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { insurancePremium: { type: 'string', title: '服务包费用', - readOnly:true, + readOnly: true, ui: { visibleIf: { insuranceType: (value: string) => value !== '3' } } @@ -495,9 +495,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit { widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '1' } } - }, + } }, - required: [ 'insurancePremium'] + required: ['insurancePremium'] }; this.ui5 = { '*': { @@ -562,8 +562,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit { receiptUserPhone: { type: 'string', title: '联系电话', + format: 'mobile', maxLength: 11, ui: { + errors: { + format: '请输入正确联系电话格式' + }, visibleIf: { receiptType: value => value === '2' } @@ -955,8 +959,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ...this.sf6.value, expenseDTOList: expenseList, paymentDays: this.sf7.value.paymentDays, - subtotal :this.sf7.value.subtotal, - total:this.sf7.value.total, + subtotal: this.sf7.value.subtotal, + total: this.sf7.value.total, estimatedKilometers: this.totalDistance, estimatedTravelTime: this.totalTime, insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, @@ -999,42 +1003,42 @@ export class SupplyManagementReleasePublishComponent implements OnInit { nzContent: AmapPoiPickerComponent, nzWidth: 900, nzOnOk: item => { - if(item?.poi) { - const poi = item.poi; - const locList = poi.pois; - switch (type) { - case 'start': - this.startInfo[index].detailedAddress = poi.formattedAddress; - this.startInfo[index].longitude = locList[0]; - this.startInfo[index].latitude = locList[1]; - this.startInfo[index].province = poi.addressComponent.province; - this.startInfo[index].city = poi.addressComponent.city; - this.startInfo[index].area = poi.addressComponent.district; - break; - case 'end': - this.endInfo[index].detailedAddress = poi.formattedAddress; - this.endInfo[index].longitude = locList[0]; - this.endInfo[index].latitude = locList[1]; - this.endInfo[index].province = poi.addressComponent.province; - this.endInfo[index].city = poi.addressComponent.city; - this.endInfo[index].area = poi.addressComponent.district; - break; - default: - break; + if (item?.poi) { + const poi = item.poi; + const locList = poi.pois; + switch (type) { + case 'start': + this.startInfo[index].detailedAddress = poi.formattedAddress; + this.startInfo[index].longitude = locList[0]; + this.startInfo[index].latitude = locList[1]; + this.startInfo[index].province = poi.addressComponent.province; + this.startInfo[index].city = poi.addressComponent.city; + this.startInfo[index].area = poi.addressComponent.district; + break; + case 'end': + this.endInfo[index].detailedAddress = poi.formattedAddress; + this.endInfo[index].longitude = locList[0]; + this.endInfo[index].latitude = locList[1]; + this.endInfo[index].province = poi.addressComponent.province; + this.endInfo[index].city = poi.addressComponent.city; + this.endInfo[index].area = poi.addressComponent.district; + break; + default: + break; + } + // 计算里程,时间 + if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) { + this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { + this.totalDistance = res.distance; + this.totalTime = res.time; + this.getInsurersPrice(); // 计算保费金额 + }); + } + return true; + } else { + this.service.msgSrv.warning('请重新手动选择地址!'); + return false; } - // 计算里程,时间 - if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) { - this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { - this.totalDistance = res.distance; - this.totalTime = res.time; - this.getInsurersPrice(); // 计算保费金额 - }); - } - return true - } else { - this.service.msgSrv.warning('请重新手动选择地址!') - return false - } } }); } @@ -1193,7 +1197,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) { console.log(insuranceType); console.log(this.totalDistance); - if (insuranceType !== '3' && this.totalDistance > 0) { + if (insuranceType !== '3' && this.totalDistance > 0) { const params = { insuranceType, goodsValue: this.sf4.value.goodsValue, @@ -1210,14 +1214,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit { }); } } - // 运费信息价格变更 - priceChange(event:any, i:any){ - i.setValue(event); - if(event>=99999){ - this.modalService.warning({ - nzTitle: '可输入的最大金额为99999元', - }); - } - this.payChange() - } + // 运费信息价格变更 + priceChange(event: any, i: any) { + i.setValue(event); + if (event >= 99999) { + this.modalService.warning({ + nzTitle: '可输入的最大金额为99999元' + }); + } + this.payChange(); + } } From 2cff827e3f1d4e1812b26a283b2fb24b469a408d Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 17:06:27 +0800 Subject: [PATCH 09/54] edit --- .../contract-list.component.html | 13 ++-- .../bulk-detail/bulk-detail.component.ts | 3 +- .../vehicle-detail.component.ts | 26 +++---- src/app/shared/services/core/base.service.ts | 68 ++++++++++--------- 4 files changed, 58 insertions(+), 52 deletions(-) diff --git a/src/app/routes/contract-management/components/contract-list/contract-list.component.html b/src/app/routes/contract-management/components/contract-list/contract-list.component.html index 2c054c6a..0876e5cf 100644 --- a/src/app/routes/contract-management/components/contract-list/contract-list.component.html +++ b/src/app/routes/contract-management/components/contract-list/contract-list.component.html @@ -30,7 +30,7 @@
+ (click)="st?.load(1)" acl [acl-ability]="['CONTRACT-INDEX-searchDetail']">查询
- + - {{ item?.contractCode }} + {{ item?.contractCode }} + - - + + diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts index f69ffb9d..5bd52254 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts @@ -128,7 +128,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit { if(value ==='1'){ this.modalTitle = '附件信息'; // this.modalcontent = this.i?.contractContent?.contractContent; - this.service.reviewPDF(this.i?.contractContent?.contractFilePath) + // this.service.reviewPDF(this.i?.contractContent?.contractFilePath) + this.service.openURL(this.i?.contractContent?.contractFilePath); }else if(value === '2'){ this.modalTitle = '补充协议'; this.modalcontent = this.i?.supplementContent?.contractContent; diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts index 099775a6..2b7a6718 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts @@ -24,7 +24,7 @@ import { OrderManagementService } from '../../services/order-management.service' export class OrderManagementVehicleDetailComponent implements OnInit { id = this.route.snapshot.params.id; modalcontent: any; - modalTitle:string = ''; + modalTitle: string = ''; trajectory = 'car'; mapList: any[] = []; //地图点位数据组 pois: any[] = []; @@ -55,7 +55,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit { { title: '支付状态', className: 'text-center', - index: 'paymentStatusLabel', + index: 'paymentStatusLabel' } ]; constructor( @@ -97,15 +97,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit { }); this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => { if (res) { - console.log('风险详情') - console.log(res) - this.abnormalList = res + console.log('风险详情'); + console.log(res); + this.abnormalList = res; } }); this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => { if (res) { - console.log('异常预警') - console.log(res) + console.log('异常预警'); + console.log(res); } }); } @@ -132,15 +132,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit { this.router.navigate(['order-management/vehicle-detailChange', this.id]); } agreement(value: any) { - if(value ==='1'){ - this.modalTitle = '附件信息'; - this.modalcontent = this.i?.contractContent?.contractContent; - - }else if(value === '2'){ + if (value === '1') { + // this.modalTitle = '附件信息'; + // this.modalcontent = this.i?.contractContent?.contractContent; + this.service.openURL(this.i?.contractContent?.contractFilePath); + } else if (value === '2') { this.modalTitle = '补充协议'; this.modalcontent = this.i?.supplementContent?.contractContent; + this.isVisible = true; } - this.isVisible = true; } handleCancel() { this.isVisible = false; diff --git a/src/app/shared/services/core/base.service.ts b/src/app/shared/services/core/base.service.ts index 210b97ed..d7785d97 100644 --- a/src/app/shared/services/core/base.service.ts +++ b/src/app/shared/services/core/base.service.ts @@ -34,7 +34,7 @@ import { IBase } from '../../interfaces'; import { EAFileUtil } from '../../utils'; @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class BaseService implements IBase { // 新增实例接口地址 @@ -94,7 +94,7 @@ export class BaseService implements IBase { parameter: any = {}, method: 'POST' | 'GET', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Observable { if (paramType === 'FORM') { parameter = this.getFormData(parameter); @@ -104,7 +104,7 @@ export class BaseService implements IBase { return this.http .request(method, url, { body: paramInBody ? parameter : null, - params: paramInBody ? null : parameter, + params: paramInBody ? null : parameter }) .pipe( map((res: any) => { @@ -122,7 +122,7 @@ export class BaseService implements IBase { this.msgSrv.warning(res.msg); return allowBadCode ? res : null; } - }), + }) ); } @@ -144,7 +144,7 @@ export class BaseService implements IBase { parameter: any = {}, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Observable { return this.httpRequest(url, parameter, method, paramInBody, paramType); } @@ -154,7 +154,7 @@ export class BaseService implements IBase { parameter: any = {}, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Promise { return this.request(url, parameter, method, paramInBody, paramType).toPromise(); } @@ -165,7 +165,7 @@ export class BaseService implements IBase { url: string = this.$api_add_one, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Observable { return this.request(url, parameter, method, paramInBody, paramType); } @@ -175,7 +175,7 @@ export class BaseService implements IBase { url: string = this.$api_add_one, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Promise { return this.addOne(parameter, url, method, paramInBody, paramType).toPromise(); } @@ -185,7 +185,7 @@ export class BaseService implements IBase { url: string = this.$api_add_many, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Observable { return this.request(url, parameter, method, paramInBody, paramType); } @@ -195,7 +195,7 @@ export class BaseService implements IBase { url: string = this.$api_add_many, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Promise { return this.addMany(parameter, url, method, paramInBody, paramType).toPromise(); } @@ -206,7 +206,7 @@ export class BaseService implements IBase { url: string = this.$api_del_one, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Observable { return this.request(url, parameter, method, paramInBody, paramType); } @@ -216,7 +216,7 @@ export class BaseService implements IBase { url: string = this.$api_del_one, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Promise { return this.delOne(parameter, url, method, paramInBody, paramType).toPromise(); } @@ -226,7 +226,7 @@ export class BaseService implements IBase { url: string = this.$api_del_many, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Observable { return this.request(url, parameter, method, paramInBody, paramType); } @@ -236,7 +236,7 @@ export class BaseService implements IBase { url: string = this.$api_del_many, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Promise { return this.delMany(parameter, url, method, paramInBody, paramType).toPromise(); } @@ -247,7 +247,7 @@ export class BaseService implements IBase { url: string = this.$api_edit_one, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Observable { return this.request(url, parameter, method, paramInBody, paramType); } @@ -257,7 +257,7 @@ export class BaseService implements IBase { url: string = this.$api_edit_one, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Promise { return this.updateOne(parameter, url, method, paramInBody, paramType).toPromise(); } @@ -267,7 +267,7 @@ export class BaseService implements IBase { url: string = this.$api_edit_many, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Observable { return this.request(url, parameter, method, paramInBody, paramType); } @@ -277,7 +277,7 @@ export class BaseService implements IBase { url: string = this.$api_edit_many, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Promise { return this.updateMany(parameter, url, method, paramInBody, paramType).toPromise(); } @@ -290,7 +290,7 @@ export class BaseService implements IBase { url: string = this.$api_get_one, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Observable { return this.request(url, parameter, method, paramInBody, paramType); } @@ -300,7 +300,7 @@ export class BaseService implements IBase { url: string = this.$api_get_one, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Promise { return this.getOne(parameter, url, method, paramInBody, paramType).toPromise(); } @@ -313,12 +313,12 @@ export class BaseService implements IBase { url: string = this.$api_get_many, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Observable { return this.httpRequest(url, parameter, method, paramInBody, paramType).pipe( - map((res) => { + map(res => { return (res as any[]) || []; - }), + }) ); } @@ -327,7 +327,7 @@ export class BaseService implements IBase { url: string = this.$api_get_many, method: 'POST' | 'GET' = 'POST', paramInBody: boolean = true, - paramType: 'JSON' | 'FORM' = 'JSON', + paramType: 'JSON' | 'FORM' = 'JSON' ): Promise { return this.getMany(parameter, url, method, paramInBody, paramType).toPromise(); } @@ -352,19 +352,19 @@ export class BaseService implements IBase { paramInBody: boolean = true, paramType: 'JSON' | 'FORM' = 'JSON', allowBadCode: boolean = true, - async: boolean = true, + async: boolean = true ): Observable | Promise { if (allowBadCode) { url += `?_allow_badcode=true`; } const response = this.httpRequest(url, parameter, method, paramInBody, paramType).pipe( - tap((res) => { + tap(res => { if (res.success) { this.msgSrv.success(`创建下载任务成功,请前往下载任务列表下载您的文件!`); window.open('#/download'); } return res; - }), + }) ); return async ? response.toPromise() : response; } @@ -396,11 +396,15 @@ export class BaseService implements IBase { this.msgSrv.warning(m.msg); return false; } - }), + }) ) .toPromise(); } + openURL(url: string) { + window.open(url); + } + /** * 直接下载文件 */ @@ -464,19 +468,19 @@ export class BaseService implements IBase { */ getDict(key: string): Observable { return this.http.post(this.$api_get_dict, { dict: key }).pipe( - map((res) => { + map(res => { if (res.success === true) { return res.data.map((r: any) => { return { label: r.itemValue, - value: r.itemKey, + value: r.itemKey }; }); } else { this.msgSrv.warning(`获取取字典【${key}】时发生错误:${res.msg || '未知错误!'}`); return []; } - }), + }) ); } @@ -508,7 +512,7 @@ export class BaseService implements IBase { if (paramsIndex > -1) { const paramsStr = url.substr(paramsIndex + 1); const params = paramsStr.split('&'); - const keyMap = params.find((e) => e.includes(paramName)); + const keyMap = params.find(e => e.includes(paramName)); const value = keyMap ? keyMap.split('=')[1] : ''; return value; } From 1544de55625a31fea8a127413e93fb9beceb133b Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 17:33:06 +0800 Subject: [PATCH 10/54] edit --- .../contract-template-frame.component.html | 3 +- .../contract-template-partner.component.html | 3 +- .../services/freight-account.service.ts | 35 ++++++++-------- .../services/insurance-management.service.ts | 42 +++++++++---------- .../services/order-management.service.ts | 34 +++++++-------- .../services/ticket.service.ts | 33 ++++++++------- 6 files changed, 76 insertions(+), 74 deletions(-) diff --git a/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html index ff37b3f7..7246f2c3 100644 --- a/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html +++ b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html @@ -75,7 +75,8 @@ [loading]="false" > - {{ item.templateName }} + {{ item.templateName }} + 货主 diff --git a/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html index 1ecef42c..235be94d 100644 --- a/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html +++ b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html @@ -75,7 +75,8 @@ [loading]="false" > - {{ item.templateName }} + {{ item.templateName }} + diff --git a/src/app/routes/financial-management/services/freight-account.service.ts b/src/app/routes/financial-management/services/freight-account.service.ts index bbb7d5ee..bb736bb5 100644 --- a/src/app/routes/financial-management/services/freight-account.service.ts +++ b/src/app/routes/financial-management/services/freight-account.service.ts @@ -137,8 +137,6 @@ export class FreightAccountService extends ShipperBaseService { // 根据预收款ID获取核销信息明细 $api_get_advance_collection_hrxiao = '/api/fcc/ficoAhxH/getAhxHByYskblaId'; - - // 运营导出充值信息 充值记录导出 $api_get_exportPageByOperator = '/api/fcc/rechargeInfo/exportPageByOperator'; // 运营端导出交易流水明细 @@ -205,21 +203,22 @@ export class FreightAccountService extends ShipperBaseService { if (!url) { return; } - const uA = window.navigator.userAgent; // 判断浏览器内核 - const isIE = - /msie\s|trident\/|edge\//i.test(uA) && - !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); - const objectUrl = url; - const a = document.createElement('a'); - document.body.appendChild(a); - a.href = objectUrl; - a.download = `回单.pdf`; - if (isIE) { - // 兼容IE11无法触发下载的问题 - (navigator as any).msSaveBlob(url, a.download); - } else { - a.click(); - } - a.remove(); + this.openURL(url); + // const uA = window.navigator.userAgent; // 判断浏览器内核 + // const isIE = + // /msie\s|trident\/|edge\//i.test(uA) && + // !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); + // const objectUrl = url; + // const a = document.createElement('a'); + // document.body.appendChild(a); + // a.href = objectUrl; + // a.download = `回单.pdf`; + // if (isIE) { + // // 兼容IE11无法触发下载的问题 + // (navigator as any).msSaveBlob(url, a.download); + // } else { + // a.click(); + // } + // a.remove(); } } diff --git a/src/app/routes/insurance-management/services/insurance-management.service.ts b/src/app/routes/insurance-management/services/insurance-management.service.ts index a8b8b13b..0482f606 100644 --- a/src/app/routes/insurance-management/services/insurance-management.service.ts +++ b/src/app/routes/insurance-management/services/insurance-management.service.ts @@ -19,12 +19,11 @@ import { map } from 'rxjs/operators'; export class InsuranceManagementService extends ShipperBaseService { // 获取货主企业列表 public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList'; - // 查询保险费信息表 + // 查询保险费信息表 public $api_premiumInfo_list = '/api/sdc/premiumInfo/list/page'; - // 统计保险单状态数量 + // 统计保险单状态数量 public $api_listStatisticalStatus = '/api/sdc/premiumInfo/listStatisticalStatus'; - // 保险费公司认证 $api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`; // 退保费 @@ -36,24 +35,25 @@ export class InsuranceManagementService extends ShipperBaseService { if (!url) { return; } - const uA = window.navigator.userAgent; // 判断浏览器内核 - const isIE = - /msie\s|trident\/|edge\//i.test(uA) && - !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); - const objectUrl = url; - const a = document.createElement('a'); - document.body.appendChild(a); - console.log('5555'); - - a.href = objectUrl; - a.download = '保单.pdf'; - if (isIE) { - // 兼容IE11无法触发下载的问题 - (navigator as any).msSaveBlob(url, a.download); - } else { - a.click(); - } - a.remove(); + this.openURL(url); + // const uA = window.navigator.userAgent; // 判断浏览器内核 + // const isIE = + // /msie\s|trident\/|edge\//i.test(uA) && + // !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); + // const objectUrl = url; + // const a = document.createElement('a'); + // document.body.appendChild(a); + // console.log('5555'); + + // a.href = objectUrl; + // a.download = '保单.pdf'; + // if (isIE) { + // // 兼容IE11无法触发下载的问题 + // (navigator as any).msSaveBlob(url, a.download); + // } else { + // a.click(); + // } + // a.remove(); } constructor(public injector: Injector) { 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 364b7cae..ea53eff2 100644 --- a/src/app/routes/order-management/services/order-management.service.ts +++ b/src/app/routes/order-management/services/order-management.service.ts @@ -189,7 +189,6 @@ export class OrderManagementService extends ShipperBaseService { // 查询异常预警表 $api_get_abnormalWarning = `/api/sdc/abnormalWarning/list/page`; - // 异步导出运营后台大宗订单列表 $api_get_asyncExportBulkList = `/api/sdc/billOperate/asyncExportBulkList`; // 异步导出运营后台整车订单列表 @@ -248,21 +247,22 @@ export class OrderManagementService extends ShipperBaseService { if (!url) { return; } - const uA = window.navigator.userAgent; // 判断浏览器内核 - const isIE = - /msie\s|trident\/|edge\//i.test(uA) && - !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); - const objectUrl = url; - const a = document.createElement('a'); - document.body.appendChild(a); - a.href = objectUrl; - a.download = '附件.pdf'; - if (isIE) { - // 兼容IE11无法触发下载的问题 - (navigator as any).msSaveBlob(url, a.download); - } else { - a.click(); - } - a.remove(); + this.openURL(url); + // const uA = window.navigator.userAgent; // 判断浏览器内核 + // const isIE = + // /msie\s|trident\/|edge\//i.test(uA) && + // !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); + // const objectUrl = url; + // const a = document.createElement('a'); + // document.body.appendChild(a); + // a.href = objectUrl; + // a.download = '附件.pdf'; + // if (isIE) { + // // 兼容IE11无法触发下载的问题 + // (navigator as any).msSaveBlob(url, a.download); + // } else { + // a.click(); + // } + // a.remove(); } } diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index f8f17ed0..df5dd9d9 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -151,21 +151,22 @@ export class TicketService extends ShipperBaseService { if (!url) { return; } - const uA = window.navigator.userAgent; // 判断浏览器内核 - const isIE = - /msie\s|trident\/|edge\//i.test(uA) && - !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); - const objectUrl = url; - const a = document.createElement('a'); - document.body.appendChild(a); - a.href = objectUrl; - a.download = '面单.pdf'; - if (isIE) { - // 兼容IE11无法触发下载的问题 - (navigator as any).msSaveBlob(url, a.download); - } else { - a.click(); - } - a.remove(); + this.openURL(url); + // const uA = window.navigator.userAgent; // 判断浏览器内核 + // const isIE = + // /msie\s|trident\/|edge\//i.test(uA) && + // !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); + // const objectUrl = url; + // const a = document.createElement('a'); + // document.body.appendChild(a); + // a.href = objectUrl; + // a.download = '面单.pdf'; + // if (isIE) { + // // 兼容IE11无法触发下载的问题 + // (navigator as any).msSaveBlob(url, a.download); + // } else { + // a.click(); + // } + // a.remove(); } } From 9422e97eb6203ff11606edf8f82a7de8a08b8269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Tue, 12 Apr 2022 19:45:37 +0800 Subject: [PATCH 11/54] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-frame.component.ts | 60 ++++++------- .../bulk-publish/bulk-publish.component.ts | 89 +++++++++++-------- .../onecar-publish.component.ts | 66 ++++++++------ .../services/supply-management.service.ts | 3 + 4 files changed, 126 insertions(+), 92 deletions(-) diff --git a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts index 517ec984..0a13f444 100644 --- a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts +++ b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts @@ -33,37 +33,37 @@ export class ContractManagementFrameComponent implements OnInit { private router: Router, public shipperservice: ShipperBaseService, private datePipe: DatePipe, - ) {} + ) { } ngOnInit(): void { this.initST(); this.initSF(); } - /** - * 查询参数 - */ - get reqParams() { - const params = { - ...this.sf?.value, - } - delete params.signTime; - delete params._$expand; - if(this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { - params.signTime = { - start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'), - end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'), - } - } - if(this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { - params.effectiveEndTime = { - start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'), - end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'), - } - } - return { - ...params - }; + /** +* 查询参数 +*/ + get reqParams() { + const params = { + ...this.sf?.value, } + delete params.signTime; + delete params._$expand; + if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { + params.signTime = { + start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'), + end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'), + } + } + if (this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { + params.effectiveEndTime = { + start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'), + end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'), + } + } + return { + ...params + }; + } /** * 初始化数据列表 */ @@ -91,7 +91,7 @@ export class ContractManagementFrameComponent implements OnInit { title: '合同名称', width: '100px', className: 'text-center', - index: 'templateName' + index: 'contractName' }, { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, { title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' }, @@ -157,7 +157,7 @@ export class ContractManagementFrameComponent implements OnInit { widget: 'dict-select', containsAllLable: true, params: { dictKey: 'contract:type' }, - containAllLable:true, + containAllLable: true, } as SFSelectWidgetSchema, }, enterpriseInfoId: { @@ -210,7 +210,7 @@ export class ContractManagementFrameComponent implements OnInit { widget: 'dict-select', containsAllLable: true, params: { dictKey: 'esign:flow:status' }, - containAllLable:true, + containAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -238,9 +238,9 @@ export class ContractManagementFrameComponent implements OnInit { } } - approval(): void {} + approval(): void { } - add(): void {} + add(): void { } routeTo(item: any) { this.router.navigate(['/ticket/invoice-requested-detail/1']); diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index 722bb487..bc5f0bf6 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -271,6 +271,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit { errors: { required: '请填写货物名称' }, visibleIf: { goodsTypeName: (value: any) => value && value === '其它' + }, + blur: (value: any) => { + this.checkGoodsName(); } } } @@ -583,7 +586,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } subStartInfo(event: any, index: number, id?: any) { if (id) { - this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {}); + this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { }); } this.startInfo.splice(index, 1); this.validateForm1.removeControl(`loadAddress${index}`); @@ -611,7 +614,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } subEndInfo(event: any, index: number, id?: any) { if (id) { - this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {}); + this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { }); } this.endInfo.splice(index, 1); this.validateForm1.removeControl(`unloadAddress${index}`); @@ -838,43 +841,43 @@ export class SupplyManagementBulkPublishComponent implements OnInit { nzContent: AmapPoiPickerComponent, nzWidth: 900, nzOnOk: item => { - if(item?.poi) { - const poi = item.poi; - const locList = poi.location.toString().split(','); - switch (type) { - case 'start': - this.startInfo[index].detailedAddress = poi.district + poi.name; - this.startInfo[index].longitude = locList[0]; - this.startInfo[index].latitude = locList[1]; - this.startInfo[index].province = poi.cityInfo.province; - this.startInfo[index].city = poi.cityInfo.city; - this.startInfo[index].area = poi.cityInfo.district; - this.startInfo[index].address = poi.name; - break; - case 'end': - this.endInfo[index].detailedAddress = poi.district + poi.name; - this.endInfo[index].longitude = locList[0]; - this.endInfo[index].latitude = locList[1]; - this.endInfo[index].province = poi.cityInfo.province; - this.endInfo[index].city = poi.cityInfo.city; - this.endInfo[index].area = poi.cityInfo.district; - this.endInfo[index].address = poi.name; - break; - default: - break; - } + if (item?.poi) { + const poi = item.poi; + const locList = poi.location.toString().split(','); + switch (type) { + case 'start': + this.startInfo[index].detailedAddress = poi.district + poi.name; + this.startInfo[index].longitude = locList[0]; + this.startInfo[index].latitude = locList[1]; + this.startInfo[index].province = poi.cityInfo.province; + this.startInfo[index].city = poi.cityInfo.city; + this.startInfo[index].area = poi.cityInfo.district; + this.startInfo[index].address = poi.name; + break; + case 'end': + this.endInfo[index].detailedAddress = poi.district + poi.name; + this.endInfo[index].longitude = locList[0]; + this.endInfo[index].latitude = locList[1]; + this.endInfo[index].province = poi.cityInfo.province; + this.endInfo[index].city = poi.cityInfo.city; + this.endInfo[index].area = poi.cityInfo.district; + this.endInfo[index].address = poi.name; + break; + default: + break; + } - if (this.startInfo[0]?.area && this.endInfo[0]?.area) { - this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { - this.totalDistance = res.distance; - this.totalTime = res.time; - }); + if (this.startInfo[0]?.area && this.endInfo[0]?.area) { + this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { + this.totalDistance = res.distance; + this.totalTime = res.time; + }); + } + return true + } else { + this.service.msgSrv.warning('请重新手动选择地址!') + return false } - return true - } else { - this.service.msgSrv.warning('请重新手动选择地址!') - return false - } } }); } @@ -1127,4 +1130,16 @@ export class SupplyManagementBulkPublishComponent implements OnInit { }; }); } + checkGoodsName() { + this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => { + if (res === false) { + const modalRef = this.modalService.error({ + nzTitle: '货物名称含有违禁词,请重新输入!', + }); + modalRef.afterClose.subscribe(result => { + // this.sf3.setValue('/goodsName1', null); + }); + } + }); + } } diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index 107e87f5..84d2dba4 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -323,6 +323,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { errors: { required: '请填写货物名称' }, visibleIf: { goodsTypeName: (value: any) => value && value === '其它' + }, + blur: (value: any) => { + this.checkGoodsName(); } } } @@ -465,10 +468,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ) }, change: (tag: any, org: any) => { - if(tag === '3'){ + if (tag === '3') { this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insuranceRate', null); - }else { + } else { this.getInsurersPrice(tag); } } @@ -481,7 +484,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ui: { widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '0' } - } , + }, }, type2: { type: 'string', @@ -494,7 +497,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { insurancePremium: { type: 'string', title: '服务包费用', - readOnly:true, + readOnly: true, ui: { visibleIf: { insuranceType: (value: string) => value !== '3' } } @@ -523,7 +526,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } }, }, - required: [ 'insurancePremium'] + required: ['insurancePremium'] }; this.ui5 = { '*': { @@ -733,7 +736,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.service .request( this.service.$api_getAdditionalRate + - `?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'` + `?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'` ) .subscribe(res => { if (res) { @@ -986,9 +989,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ]; // 运费信息 const expenseList = [ - { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' ,resourceId: this.sf7data?.PREresourceId || '' }, - { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' ,resourceId: this.sf7data?.RECEresourceId || ''}, - { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' ,resourceId: this.sf7data?.BACKresourceId || ''} + { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '', resourceId: this.sf7data?.PREresourceId || '' }, + { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '', resourceId: this.sf7data?.RECEresourceId || '' }, + { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '', resourceId: this.sf7data?.BACKresourceId || '' } ]; // 从“再下一单”过来,将所有的子参数内的id都删除 if (this.PageStatus === '整车下一单') { @@ -1017,8 +1020,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { paymentDays: this.sf7.value.paymentDays, estimatedKilometers: this.totalDistance, estimatedTravelTime: this.totalTime, - subtotal :this.sf7.value.subtotal, - total:this.sf7.value.total, + subtotal: this.sf7.value.subtotal, + total: this.sf7.value.total, insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, goodsValue: this.sf4.value.goodsValue }; @@ -1081,7 +1084,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { nzWidth: 900, nzOnOk: item => { console.log(item); - if(item?.poi) { + if (item?.poi) { const poi = item.poi; const locList = poi.pois; switch (type) { @@ -1106,7 +1109,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { default: break; } - + if (this.startInfo[0]?.area && this.endInfo[0]?.area) { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { this.totalDistance = res.distance; @@ -1114,10 +1117,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.getInsurersPrice(); // 计算保费金额 }); } - return true + return true } else { this.service.msgSrv.warning('请重新手动选择地址!') - return false + return false } } }); @@ -1155,7 +1158,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.totalDistance = res?.estimatedKilometers; this.totalTime = res?.estimatedTravelTime; this.sf1data = { - resourceCode:res?.resourceCode || '', + resourceCode: res?.resourceCode || '', enterpriseInfoName: res?.enterpriseInfoName, enterpriseInfoId: res?.enterpriseInfoId, dispatchPhone: res?.dispatchPhone, @@ -1423,7 +1426,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { // 计算保价费金额 getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { console.log(this.totalDistance); - if (insuranceType !== '3' && this.totalDistance > 0) { + if (insuranceType !== '3' && this.totalDistance > 0) { const params = { insuranceType, goodsValue: this.sf4.value.goodsValue, @@ -1440,14 +1443,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { }); } } - // 运费信息价格变更 - priceChange(event:any, i:any){ - i.setValue(event); - if(event>=99999){ - this.modalService.warning({ - nzTitle: '可输入的最大金额为99999元', + // 运费信息价格变更 + priceChange(event: any, i: any) { + i.setValue(event); + if (event >= 99999) { + this.modalService.warning({ + nzTitle: '可输入的最大金额为99999元', + }); + } + this.payChange() + } + + checkGoodsName() { + this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => { + if (res === false) { + const modalRef = this.modalService.error({ + nzTitle: '货物名称含有违禁词,请重新输入!', + }); + modalRef.afterClose.subscribe(result => { + // this.sf3.setValue('/goodsName1', null); }); } - this.payChange() - } + }); + } } diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index 10cbc648..f2680cc9 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -180,6 +180,9 @@ export class SupplyManagementService extends BaseService { // 发送邀请司机短信 $api_send_msg_code = `/api/mdc/pbc/smsSend/sendInviteDriver`; + // 校验货物名称是否合规 + $api_checkGoodsName = '/api/sdc/goodsResourceShipper/checkGoodsName'; + getDictByKey(dictKey: string) { const params = { dictKey: dictKey }; return this.request(this.$api_getDictValue, params); From 16f34a9d14c12c80703e0addf28f2921af26ea6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Tue, 12 Apr 2022 20:16:05 +0800 Subject: [PATCH 12/54] =?UTF-8?q?=E8=B5=84=E9=87=91=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/fund-reporting/fund-reporting.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts b/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts index d73b3fb2..1157fdd7 100644 --- a/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts +++ b/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts @@ -475,10 +475,10 @@ export class DatatableFundReportingComponent implements OnInit { routeTowaybill(item: any) { if (item.orderType === '1') { - window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.waybillId}`); + window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.wayBillId}`); } else { - window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.waybillId}`); + window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.wayBillId}`); } } From 859da91facab9ea2fab06e6cd364c519f9abc983 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 20:36:42 +0800 Subject: [PATCH 13/54] edit --- proxy.conf.js | 2 +- .../vehicle-detail.component.ts | 11 ++- .../verify-result/verify-result.component.ts | 4 +- .../amap-path-simplifier.component.ts | 68 +++++++++++++------ .../shared/components/amap/amap.service.ts | 4 ++ 5 files changed, 64 insertions(+), 25 deletions(-) diff --git a/proxy.conf.js b/proxy.conf.js index e6de13f2..396f43cd 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -20,7 +20,7 @@ module.exports = { // } '//api': { target: { - host: 'tms-api-test.eascs.com', + host: 'tms-api.yunduoxing.com', protocol: 'https:', port: 443 }, diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts index 2b7a6718..65e3a2a4 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts @@ -77,16 +77,18 @@ export class OrderManagementVehicleDetailComponent implements OnInit { this.i = res; this.pois = [ { - markerLabel: '起', + markerLabel: '装', color: 'blue', position: [res.startingPoint.longitude, res.startingPoint.latitude], - title: res.startingPoint.detailedAddress + title: '发货地:' + res.startingPoint.detailedAddress, + time: '计划出发时间:' +res.loadPlanTime }, { markerLabel: '卸', color: 'red', position: [res.endPoint.longitude, res.endPoint.latitude], - title: res.endPoint.detailedAddress + title: '卸货地地:' + res.endPoint.detailedAddress, + time: '计划卸货时间:' + res.unloadPlanTime } ]; this.billExpenses = this.i?.billExpenseDetails?.filter( @@ -210,6 +212,9 @@ export class OrderManagementVehicleDetailComponent implements OnInit { } } getLocalTime(time: any) { + if (!time) { + return ''; + } return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); } } diff --git a/src/app/routes/tax-management/components/order-reporting/verify-result/verify-result.component.ts b/src/app/routes/tax-management/components/order-reporting/verify-result/verify-result.component.ts index ee390253..9bb45bcc 100644 --- a/src/app/routes/tax-management/components/order-reporting/verify-result/verify-result.component.ts +++ b/src/app/routes/tax-management/components/order-reporting/verify-result/verify-result.component.ts @@ -51,7 +51,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit { beforeReq = (requestOptions: STRequestOptions) => {let a: string = ''; switch (this.subjectType) { case '0': - a = this.record?.networkTransporter; + a = this.record?.networkTransporterId; break case '1': a = this.record?.shipperId; @@ -60,7 +60,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit { a = this.record?.driverId; break case '3': - a = this.record?.billId; + a = this.record?.wayBillId; break } Object.assign(requestOptions.body, { 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 efa030e9..f4fe1ecc 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 @@ -48,15 +48,18 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy @Output() readonly clcikPointEvent = new EventEmitter(); - constructor(public service: BaseService, private amapService: AmapService) {} + constructor(public service: BaseService, private amapService: AmapService) { + this.mapInit(); + } 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) { + if (changes?.mapList?.currentValue) { // console.log(this.mapList); this.pathList = [ { @@ -64,22 +67,30 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy points: changes.mapList?.currentValue } ]; - this.setData(this.pathList); - this.setPathIndex(this.selectedIndex); - this.getPoiByPositon(this.mapList[this.mapList?.length - 1]?.lnglat); + if (this?.pathSimplifierIns) { + this.setData(this.pathList); + if (changes.mapList?.currentValue.length > 0) { + this.setPathIndex(this.selectedIndex); + this.getPoiByPositon('起', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time)); + this.getPoiByPositon( + '终', + this.mapList[this.mapList?.length - 1]?.lnglat, + '时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time) + ); + } + } } // 标点列表变更: 更新标点数据, 绘画标点 if (changes?.pois?.currentValue) { - // console.log(this.pois); + console.log(changes?.pois?.currentValue); + this._pois = changes?.pois?.currentValue; if (this?.markerList && this._pois.length > 0) { this.markerList.render(this._pois); } } } - ngOnInit(): void { - this.mapInit(); - } + ngOnInit(): void {} ngOnDestroy(): void { // 销毁地图数据 if (this.aMap) { @@ -145,6 +156,12 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy if (this.pathList.length > 0) { this.setPathIndex(this.selectedIndex); + this.getPoiByPositon('起', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time)); + this.getPoiByPositon( + '终', + this.mapList[this.mapList?.length - 1]?.lnglat, + '时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time) + ); } this.pathSimplifierIns.on('pointClick', (e: any, info: any) => { @@ -179,12 +196,13 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy //返回数据项对应的Marker getMarker: (dataItem: POI, context: any, recycledMarker: any) => { //存在可回收利用的marker - if (recycledMarker) { - //直接更新内容返回 - recycledMarker.setIconLabel(context.id); - recycledMarker.setIconStyle(dataItem.color); - return recycledMarker; - } + // if (recycledMarker) { + // //直接更新内容返回 + // recycledMarker.setIconLabel(context.id); + // recycledMarker.setIconStyle(dataItem.color); + // return recycledMarker; + // } + this.SimpleMarker = SimpleMarker; //返回一个新的Marker return new SimpleMarker({ @@ -212,6 +230,8 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy }); if (this._pois?.length > 0) { + console.log(this._pois); + //展示该数据 this.markerList.render(this._pois); } @@ -241,7 +261,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy startNav() { this.navigator = this.pathSimplifierIns?.createPathNavigator(this.selectedIndex, { loop: true, //循环播放 - speed: 500000 * this.navSpeed //巡航速度,单位千米/小时 + speed: 50000 * this.navSpeed //巡航速度,单位千米/小时 }); this.navigator?.start(); } @@ -269,11 +289,14 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy } /** 根据标点经纬度获取地址信息 */ - getPoiByPositon(position: string[]) { + getPoiByPositon(label: string, position: string[], time: string) { this.geocoder.getAddress(position, (status: any, result: any) => { if (status === 'complete' && result.info === 'OK') { // result中对应详细地理坐标信息 - this._pois = [...this.pois, { markerLabel: '终', color: 'red', position: position, title: result.regeocode.formattedAddress }]; + this._pois = [ + ...this.pois, + { markerLabel: label, color: 'red', position, title: result.regeocode.formattedAddress, time } + ]; if (this.markerList) { this.markerList.render(this._pois); } @@ -287,7 +310,14 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy * @param infoItem */ selectedPOI(infoItem: InfoItem) { - this.infoWindow.setContent(infoItem.content || `地址:
${infoItem.title}
`); + this.infoWindow.setContent( + infoItem.content || + ` +
+ 东经:${infoItem.position?.[0]}, 北纬:${infoItem.position?.[1]}
+ ${infoItem.time} + ` + ); this.infoWindow.open(this.aMap, infoItem.position); this.infoWindow.setPosition(infoItem.position); // 地图定位居中 diff --git a/src/app/shared/components/amap/amap.service.ts b/src/app/shared/components/amap/amap.service.ts index f23f503d..6916ebdc 100644 --- a/src/app/shared/components/amap/amap.service.ts +++ b/src/app/shared/components/amap/amap.service.ts @@ -114,6 +114,9 @@ export class AmapService { } formatTime(time: string): string { + if (!time) { + return ''; + } return `${time.slice(0, 4)}-${time.slice(4, 6)}-${time.slice(6, 8)} ${time.slice(9, 11)}:${time.slice(11, 13)}:${time.slice(13, 15)}`; } } @@ -128,6 +131,7 @@ export interface POI { export interface InfoItem { title?: string; content?: string; + time?: string; position: string[]; } From f850722613dbe96862a4c294ce6f202b8031533f Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 20:56:58 +0800 Subject: [PATCH 14/54] edit --- .../bulk-detail-change.component.ts | 6 +- .../bulk-detail/bulk-detail.component.ts | 71 ++++++++++--------- .../vehicle-detail-change.component.ts | 6 +- .../vehicle-detail.component.ts | 3 +- .../view-track/view-track.component.ts | 6 +- .../bulk-detail/bulk-detail.component.ts | 6 +- .../vehicle-detail.component.ts | 6 +- .../amap-path-simplifier.component.ts | 18 ++--- 8 files changed, 68 insertions(+), 54 deletions(-) diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts index 450ff038..1810bbca 100644 --- a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts @@ -968,7 +968,8 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit { points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; @@ -991,7 +992,8 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit { points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts index 5bd52254..a03bad84 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts @@ -25,7 +25,7 @@ import format from 'date-fns/format'; styleUrls: ['./bulk-detail.component.less'] }) export class OrderManagementBulkeDetailComponent implements OnInit { - MapList: any[]=[]; + MapList: any[] = []; id = this.route.snapshot.params.id; billExpenses: any[] = []; //运费信息表格信息 pois: any[] = []; @@ -35,11 +35,11 @@ export class OrderManagementBulkeDetailComponent implements OnInit { totalObj: any; attObj: any; modalcontent: any; - modalTitle:string = ''; + modalTitle: string = ''; isVisible = false; logColumns2: STColumn[] = [ { title: '时间', index: 'vinOutTime' }, - { title: '地点', index: 'cityName' }, + { title: '地点', index: 'cityName' } ]; logColumns: STColumn[] = [ { title: '款项', index: 'expenseCodeLabel' }, @@ -62,20 +62,19 @@ export class OrderManagementBulkeDetailComponent implements OnInit { } ]; trajectory = 'car'; - mapList:any[] = []; //地图点位数据组 - addressItems:any[] = []; //打点地址数据组 + mapList: any[] = []; //地图点位数据组 + addressItems: any[] = []; //打点地址数据组 constructor( public route: ActivatedRoute, private msgSrv: NzMessageService, private service: OrderManagementService, private router: Router, private modal: NzModalService - ) { - } + ) {} ngOnInit(): void { console.log(this.route?.snapshot?.queryParams?.sts); - + this.initData(); this.getTrajectory(); } @@ -85,34 +84,36 @@ export class OrderManagementBulkeDetailComponent implements OnInit { if (res) { this.i = res; this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA'); - this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE"); + this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE'); this.pois = [ { - markerLabel: '起', + markerLabel: '装', color: 'blue', position: [res.startingPoint.longitude, res.startingPoint.latitude], - title: res.startingPoint.detailedAddress + title: '发货地:' + res.startingPoint.detailedAddress, + time: '计划出发时间:' + res.loadPlanTime }, { markerLabel: '卸', color: 'red', position: [res.endPoint.longitude, res.endPoint.latitude], - title: res.endPoint.detailedAddress + title: '卸货地地:' + res.endPoint.detailedAddress, + time: '计划卸货时间:' + res.unloadPlanTime } ]; } }); this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => { if (res) { - console.log('风险详情') - console.log(res) - this.abnormalList = res + console.log('风险详情'); + console.log(res); + this.abnormalList = res; } }); this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => { if (res) { - console.log('异常预警') - console.log(res) + console.log('异常预警'); + console.log(res); } }); } @@ -125,12 +126,12 @@ export class OrderManagementBulkeDetailComponent implements OnInit { this.router.navigate(['order-management/bulk-detailChange', this.id]); } agreement(value: any) { - if(value ==='1'){ + if (value === '1') { this.modalTitle = '附件信息'; // this.modalcontent = this.i?.contractContent?.contractContent; // this.service.reviewPDF(this.i?.contractContent?.contractFilePath) this.service.openURL(this.i?.contractContent?.contractFilePath); - }else if(value === '2'){ + } else if (value === '2') { this.modalTitle = '补充协议'; this.modalcontent = this.i?.supplementContent?.contractContent; this.isVisible = true; @@ -164,20 +165,21 @@ export class OrderManagementBulkeDetailComponent implements OnInit { } // 获取车辆轨迹 - getTrajectory(){ + getTrajectory() { this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { if (res) { const points = res.trackArray; - let list :any[] = []; + let list: any[] = []; points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; this.addressItems = res.cityArray; - if(this.addressItems && this.addressItems.length > 0){ + if (this.addressItems && this.addressItems.length > 0) { this.addressItems.forEach(item => { item.vinOutTime = this.getLocalTime(item.vinOutTime); }); @@ -186,21 +188,22 @@ export class OrderManagementBulkeDetailComponent implements OnInit { }); } - // 获取司机轨迹 - getDriverTrajectory(){ + // 获取司机轨迹 + getDriverTrajectory() { this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => { if (res) { const points = res.tracks; - let list :any[] = []; + let list: any[] = []; points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; this.addressItems = [...res.enclosureDataAppTrack]; - if(this.addressItems && this.addressItems.length > 0){ + if (this.addressItems && this.addressItems.length > 0) { this.addressItems.forEach(item => { item.vinOutTime = this.getLocalTime(item.gtm); item.cityName = item.appAdress; @@ -208,14 +211,14 @@ export class OrderManagementBulkeDetailComponent implements OnInit { } } }); - } - trajectoryChange(event:any){ - if(event ==='car'){ - this.getTrajectory() - }else if(event ==='driver'){ + } + trajectoryChange(event: any) { + if (event === 'car') { + this.getTrajectory(); + } else if (event === 'driver') { this.getDriverTrajectory(); } - } + } getLocalTime(time: any) { return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); } diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts index 0bc13d3a..ab686a33 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts @@ -923,7 +923,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; @@ -946,7 +947,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts index 65e3a2a4..ed73f379 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts @@ -190,7 +190,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit { points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts index 64dff652..a4c5b6a2 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts @@ -65,7 +65,8 @@ export class OneCarOrderViewtrackComponent implements OnInit { points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; @@ -88,7 +89,8 @@ export class OneCarOrderViewtrackComponent implements OnInit { points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; diff --git a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts index 375f357c..f6cf87c7 100644 --- a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts @@ -167,7 +167,8 @@ sureArrive(item: any) { points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; @@ -190,7 +191,8 @@ sureArrive(item: any) { points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts index 626eadc9..5a266b42 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts @@ -160,7 +160,8 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; @@ -183,7 +184,8 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; 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 f4fe1ecc..4bf4469b 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 @@ -71,9 +71,10 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy this.setData(this.pathList); if (changes.mapList?.currentValue.length > 0) { this.setPathIndex(this.selectedIndex); - this.getPoiByPositon('起', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time)); + this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time)); this.getPoiByPositon( '终', + 'red', this.mapList[this.mapList?.length - 1]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time) ); @@ -82,8 +83,6 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy } // 标点列表变更: 更新标点数据, 绘画标点 if (changes?.pois?.currentValue) { - console.log(changes?.pois?.currentValue); - this._pois = changes?.pois?.currentValue; if (this?.markerList && this._pois.length > 0) { this.markerList.render(this._pois); @@ -156,9 +155,10 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy if (this.pathList.length > 0) { this.setPathIndex(this.selectedIndex); - this.getPoiByPositon('起', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time)); + this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time)); this.getPoiByPositon( '终', + 'red', this.mapList[this.mapList?.length - 1]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time) ); @@ -176,6 +176,9 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy content: `