Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
		| @ -411,7 +411,6 @@ export class InvoiceRequestedComponent implements OnInit { | ||||
|     ]); | ||||
|   } | ||||
|   selectChange(e: any) { | ||||
|     console.log(e); | ||||
|     this.resourceStatus = e; | ||||
|     this.initST(); | ||||
|     setTimeout(() => { | ||||
|  | ||||
| @ -38,12 +38,10 @@ export class PrintOrderModalComponent implements OnInit { | ||||
|   } | ||||
|  | ||||
|   sure() { | ||||
|     console.log(this.data); | ||||
|     if (this.type === 1) { | ||||
|       this.service.request(this.service.$api_create_express, this.vatappcodes).subscribe(res => { | ||||
|         if (res) { | ||||
|           this.service.msgSrv.success('操作成功'); | ||||
|           this.modal.destroy(true); | ||||
|           this.getPDF(res); | ||||
|         } | ||||
|       }); | ||||
|     } else { | ||||
| @ -63,13 +61,41 @@ export class PrintOrderModalComponent implements OnInit { | ||||
|       delete this.data.scontactInfo.id; | ||||
|       this.service.request(this.service.$api_get_order_summary, params).subscribe(res => { | ||||
|         if (res) { | ||||
|           this.service.msgSrv.success('操作成功'); | ||||
|           this.modal.destroy(true); | ||||
|           this.reviewPDF(res); | ||||
|         } | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   getPDF(ids: Array<string>) { | ||||
|     this.service.request(this.service.$api_get_print_pdf, ids).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('操作成功'); | ||||
|         this.modal.destroy(true); | ||||
|         this.reviewPDF(res); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   reviewPDF(url: string) { | ||||
|     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(); | ||||
|   } | ||||
|  | ||||
|   close() { | ||||
|     this.modal.destroy(); | ||||
|   } | ||||
|  | ||||
| @ -33,6 +33,8 @@ export class TicketService extends ShipperBaseService { | ||||
|   $api_create_express = '/api/fcc/ficoExpressH/save'; | ||||
|   // 获取汇总下单 | ||||
|   $api_get_order_summary = '/api/fcc/ficoExpressH/summaryOrder'; | ||||
|   // 打印快递面单 | ||||
|   $api_get_print_pdf = '/api/fcc/ficoExpressH/printData'; | ||||
|  | ||||
|   // 已开发票查询 | ||||
|   $api_get_invoice_page = '/api/fcc/ficoVatinvH/list/page'; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user