Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Lingzi
2022-04-06 11:22:02 +08:00
2 changed files with 26 additions and 22 deletions

View File

@ -20,17 +20,7 @@ module.exports = {
// }
'//api': {
target: {
host: 'tms-api-dev.eascs.com',
protocol: 'https:',
port: 443
},
secure: false,
changeOrigin: true,
logLevel: 'debug'
},
'//sascs': {
target: {
host: 'sascs-tj-tms-dev.obs.cn-south-1.myhuaweicloud.com',
host: 'tms-api-test.eascs.com',
protocol: 'https:',
port: 443
},

View File

@ -62,7 +62,7 @@ export class FreightAccountService extends ShipperBaseService {
// 查询订单退款申请表
$api_get_refund_record_page = '/api/fcc/billRefundApplication/list/page';
// 同意退款
$api_agree_refund_record= '/api/fcc/billRefundApplication/agreeRefund';
$api_agree_refund_record = '/api/fcc/billRefundApplication/agreeRefund';
// 不同意退款
$api_disagree_refund_record = '/api/fcc/billRefundApplication/disagreeRefund';
// 重新发起
@ -122,6 +122,7 @@ export class FreightAccountService extends ShipperBaseService {
// 下载银行回单请求
$api_download_receipt_apply = '/api/fcc/spd/callback/receiptApply';
$api_download_receipt_apply_byte = '/api/fcc/spd/callback/receiptApplyByte';
// 查询预收款余额
$api_get_advance_collection_page = '/api/fcc/ficoYskBla/list/page';
@ -137,12 +138,25 @@ export class FreightAccountService extends ShipperBaseService {
}
getReceiptUrl(url: string, params: any) {
const { bankType, snglFlgCd } = params;
if (url) {
this.reviewPDF(url);
if (params?.bankType === '1') {
window.open(params?.receiptUrl);
} else if (params?.bankType === '2') {
this.exportFile({ bankType, receiptUrl: url, bankSerialNumber: snglFlgCd }, this.$api_download_receipt_apply_byte);
}
} else {
this.request(this.$api_download_receipt_apply, { ...params }).subscribe(res => {
if (res?.receiptUrl) {
this.reviewPDF(res.receiptUrl);
if (bankType === '1') {
window.open(res?.receiptUrl);
} else if (bankType === '2') {
this.downloadFile(this.$api_download_receipt_apply_byte, {
bankType,
receiptUrl: res.receiptUrl,
bankSerialNumber: snglFlgCd
});
}
} else {
this.msgSrv.warning(res.statusMsg || '获取回单失败');
}
@ -163,7 +177,7 @@ export class FreightAccountService extends ShipperBaseService {
const a = document.createElement('a');
document.body.appendChild(a);
a.href = objectUrl;
a.download = '回单.pdf';
a.download = `回单.pdf`;
if (isIE) {
// 兼容IE11无法触发下载的问题
(navigator as any).msSaveBlob(url, a.download);