Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -1,7 +1,10 @@
|
|||||||
nz-select-top-control {
|
|
||||||
height: 65px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
cdk-virtual-scroll-viewport {
|
app-print-order-modal{
|
||||||
height: 100px !important;
|
nz-select-top-control {
|
||||||
|
height: 65px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
cdk-virtual-scroll-viewport {
|
||||||
|
height: 100px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -40,8 +40,11 @@ export class PrintOrderModalComponent implements OnInit {
|
|||||||
sure() {
|
sure() {
|
||||||
if (this.type === 1) {
|
if (this.type === 1) {
|
||||||
this.service.request(this.service.$api_create_express, this.vatappcodes).subscribe(res => {
|
this.service.request(this.service.$api_create_express, this.vatappcodes).subscribe(res => {
|
||||||
if (res) {
|
if (res?.length > 0) {
|
||||||
this.getPDF(res);
|
this.getPDF(res);
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.warning('请到快递信息页面打印');
|
||||||
|
this.modal.destroy(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -60,8 +63,11 @@ export class PrintOrderModalComponent implements OnInit {
|
|||||||
delete this.data.scontactInfo.shipperId;
|
delete this.data.scontactInfo.shipperId;
|
||||||
delete this.data.scontactInfo.id;
|
delete this.data.scontactInfo.id;
|
||||||
this.service.request(this.service.$api_get_order_summary, params).subscribe(res => {
|
this.service.request(this.service.$api_get_order_summary, params).subscribe(res => {
|
||||||
if (res) {
|
if (res?.length > 0) {
|
||||||
this.reviewPDF(res);
|
this.reviewPDF(res);
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.warning('请到快递信息页面打印');
|
||||||
|
this.modal.destroy(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -69,15 +75,21 @@ export class PrintOrderModalComponent implements OnInit {
|
|||||||
|
|
||||||
getPDF(ids: Array<string>) {
|
getPDF(ids: Array<string>) {
|
||||||
this.service.request(this.service.$api_get_print_pdf, ids).subscribe(res => {
|
this.service.request(this.service.$api_get_print_pdf, ids).subscribe(res => {
|
||||||
if (res) {
|
if (res?.pdfUrl) {
|
||||||
this.service.msgSrv.success('操作成功');
|
this.service.msgSrv.success('操作成功');
|
||||||
this.modal.destroy(true);
|
this.modal.destroy(true);
|
||||||
this.reviewPDF(res);
|
this.reviewPDF(res.pdfUrl);
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.warning('下载失败');
|
||||||
|
this.modal.destroy(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
reviewPDF(url: string) {
|
reviewPDF(url: string) {
|
||||||
|
if (!url) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const uA = window.navigator.userAgent; // 判断浏览器内核
|
const uA = window.navigator.userAgent; // 判断浏览器内核
|
||||||
const isIE =
|
const isIE =
|
||||||
/msie\s|trident\/|edge\//i.test(uA) &&
|
/msie\s|trident\/|edge\//i.test(uA) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user