edit
This commit is contained in:
		| @ -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(); | ||||
|   } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user