This commit is contained in:
wangshiming
2022-04-01 16:00:39 +08:00
parent 45d96c1dbd
commit 5f06aaf4a4
3 changed files with 18 additions and 12 deletions

View File

@ -397,25 +397,25 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
{ {
text: '生成电子单据', text: '生成电子单据',
click: _record => this.generate(_record, 2), click: _record => this.generate(_record, 2),
iif: item => !item.loadingLadingBillFilePath, iif: item => !item?.loadingLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }, acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] },
}, },
{ {
text: '通过', text: '通过',
click: _record => this.sign(_record), click: _record => this.sign(_record),
iif: item => !item.loadingLadingBillFilePath, iif: item => !item?.loadingLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }, acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] },
}, },
{ {
text: '修改', text: '修改',
click: _record => this.modification(_record), click: _record => this.modification(_record),
iif: item => !item.loadingLadingBillFilePath, iif: item => !item?.loadingLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }, acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] },
}, },
{ {
text: '查看凭证', text: '查看凭证',
click: _record => this.generate(_record, 3), click: _record => this.generate(_record, 3),
iif: item => item.loadingLadingBillFilePath, iif: item => item?.loadingLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-view'] }, acl: { ability: ['ORDER-RECEIPTS-view'] },
}, },
] ]
@ -491,8 +491,10 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
nzFooter: null nzFooter: null
}); });
modalRef.afterClose.subscribe((result: any) => { modalRef.afterClose.subscribe((result: any) => {
this.st.load(1); if(result) {
this.getGoodsSourceStatistical() this.st.load();
this.getGoodsSourceStatistical()
}
}); });
} }
// 通过 // 通过

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-15 13:17:42 * @Date : 2021-12-15 13:17:42
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-04-01 15:28:44 * @LastEditTime : 2022-04-01 15:48:01
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\audit\\voucher-view\\voucher-view.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\audit\\voucher-view\\voucher-view.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->

View File

@ -438,7 +438,7 @@ export class orderManagementVoucherViewComponent implements OnInit {
}) })
} }
sure() { sure() {
const params = [this.i.id]; const params = [this.i?.id];
this.service.downloadFile(this.service.$api_createBillTakeGoods,params) this.service.downloadFile(this.service.$api_createBillTakeGoods,params)
this.service.downloadFile(this.service.$api_createBillDischargeGoods,params) this.service.downloadFile(this.service.$api_createBillDischargeGoods,params)
this.service.msgSrv.success('生成电子单据成功!') this.service.msgSrv.success('生成电子单据成功!')
@ -505,14 +505,18 @@ export class orderManagementVoucherViewComponent implements OnInit {
openlaod(value: any) { openlaod(value: any) {
if(value === 1) { if(value === 1) {
const a = document.createElement('a'); const a = document.createElement('a');
console.log(this.datas?.loadingLadingBillFilePath);
a.href = this.datas?.loadingLadingBillFilePath; a.href = this.datas?.loadingLadingBillFilePath;
a.click(); document.body.appendChild(a);
console.log(document.body.contains(a))
a.click(); //点击下载
document.body.removeChild(a); //下载完成移除元素
} else { } else {
const a = document.createElement('a'); const a = document.createElement('a');
console.log(this.datas?.loadingPeopleVehiclesGoodsFilePath);
a.href = this.datas?.loadingPeopleVehiclesGoodsFilePath; a.href = this.datas?.loadingPeopleVehiclesGoodsFilePath;
a.click(); document.body.appendChild(a);
console.log(document.body.contains(a))
a.click(); //点击下载
document.body.removeChild(a); //下载完成移除元素
} }
} }