From 075fa637dc739cb912b91de1cc30e85c92e5afab Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 11 Apr 2022 20:17:32 +0800 Subject: [PATCH] edit --- .../print-order-modal.component.ts | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/app/routes/ticket-management/components/invoice-requested/print-order-modal/print-order-modal.component.ts b/src/app/routes/ticket-management/components/invoice-requested/print-order-modal/print-order-modal.component.ts index 49e4d2a7..d317dd77 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/print-order-modal/print-order-modal.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/print-order-modal/print-order-modal.component.ts @@ -39,12 +39,14 @@ export class PrintOrderModalComponent implements OnInit { sure() { if (this.type === 1) { - this.service.request(this.service.$api_create_express, this.vatappcodes).subscribe(res => { - if (res?.length > 0) { - this.getPDF(res); - } else { - this.service.msgSrv.warning('请到快递信息页面打印'); - this.modal.destroy(true); + this.service.request(this.service.$api_create_express + '?_allow_badcode=true', this.vatappcodes).subscribe(res => { + if (res.status === 200) { + if (res?.data?.length > 0) { + this.getPDF(res.data); + } else { + this.service.msgSrv.warning('请到快递信息页面打印'); + this.modal.destroy(true); + } } }); } else { @@ -62,12 +64,14 @@ export class PrintOrderModalComponent implements OnInit { delete this.data.scontactInfo.ltdId; delete this.data.scontactInfo.shipperId; delete this.data.scontactInfo.id; - this.service.request(this.service.$api_get_order_summary, params).subscribe(res => { - if (res?.length > 0) { - this.service.reviewPDF(res); - } else { - this.service.msgSrv.warning('请到快递信息页面打印'); - this.modal.destroy(true); + this.service.request(this.service.$api_get_order_summary + '?_allow_badcode=true', params).subscribe(res => { + if (res.status === 200) { + if (res?.data?.length > 0) { + this.service.reviewPDF(res?.data); + } else { + this.service.msgSrv.warning('请到快递信息页面打印'); + this.modal.destroy(true); + } } }); } @@ -86,8 +90,6 @@ export class PrintOrderModalComponent implements OnInit { }); } - - close() { this.modal.destroy(); }