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 816be5a7..f69ffb9d 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 @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-06 20:20:26 * @LastEditors : Shiming - * @LastEditTime : 2022-03-29 14:30:11 + * @LastEditTime : 2022-04-11 22:31:18 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -127,13 +127,13 @@ export class OrderManagementBulkeDetailComponent implements OnInit { agreement(value: any) { if(value ==='1'){ this.modalTitle = '附件信息'; - this.modalcontent = this.i?.contractContent?.contractContent; - + // this.modalcontent = this.i?.contractContent?.contractContent; + this.service.reviewPDF(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/routes/order-management/services/order-management.service.ts b/src/app/routes/order-management/services/order-management.service.ts index 13e8bb1d..607a26a9 100644 --- a/src/app/routes/order-management/services/order-management.service.ts +++ b/src/app/routes/order-management/services/order-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 15:31:52 * @LastEditors : Shiming - * @LastEditTime : 2022-04-11 14:35:08 + * @LastEditTime : 2022-04-11 22:29:34 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -244,4 +244,25 @@ export class OrderManagementService extends ShipperBaseService { constructor(public injector: Injector) { super(injector); } + public reviewPDF(url: string) { + 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(); + } } diff --git a/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts b/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts index 6a71e343..bb3aae92 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts +++ b/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts @@ -38,7 +38,7 @@ export class ETCInvoicedListComponent implements OnInit { nzTitle: '运单交易明细', nzContent: TransactionDetailsComponent, nzWidth: 900, - nzComponentParams: { data: [] }, + nzComponentParams: { data: item }, nzOnOk: com => { console.log(com.selectedData); }, @@ -147,8 +147,8 @@ export class ETCInvoicedListComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '运单号', index: 'wayBillCode' }, - { title: '订单号', index: 'billCode' }, + { title: '运单号', index: 'wayBillCode',width: 200 }, + { title: '订单号', index: 'billCode',width: 200 }, { title: '开票状态', index: 'invoicingStatus', @@ -157,12 +157,12 @@ export class ETCInvoicedListComponent implements OnInit { width: 120 }, { title: '订单类型', index: 'billTypeLabel', width: 120 }, - { title: '装货地', index: 'loadingPlace' }, - { title: '卸货地', index: 'dischargePlace' }, - { title: '司机信息', render: 'call1No' }, - { title: '车辆信息', render: 'call12No' }, - { title: '托运人', index: 'shipperAppUserName' }, - { title: '网络货运人', index: 'enterpriseInfoName' }, + { title: '装货地', index: 'loadingPlace',width: 200 }, + { title: '卸货地', index: 'dischargePlace' ,width: 200}, + { title: '司机信息', render: 'call1No' ,width: 200}, + { title: '车辆信息', render: 'call12No',width: 200 }, + { title: '托运人', index: 'shipperAppUserName',width: 200 }, + { title: '网络货运人', index: 'enterpriseInfoName' ,width: 200}, { title: '开票金额', index: 'invoicingAmount', @@ -179,10 +179,11 @@ export class ETCInvoicedListComponent implements OnInit { className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.invoicingNumber }) } }, - { title: '申请时间', index: 'orderReceivingTime', type: 'date' }, + { title: '申请时间', index: 'orderReceivingTime', type: 'date',width: 200 }, { title: '操作', className: 'text-center', + width: 120, buttons: [ { text: '交易明细', diff --git a/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.html b/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.html index 2dbe9ec4..c5ec8500 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.html +++ b/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.html @@ -1,16 +1,32 @@ +