fix bug
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-01-18 09:51:21
|
* @Date : 2022-01-18 09:51:21
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-31 14:02:38
|
* @LastEditTime : 2022-04-01 14:41:31
|
||||||
* @FilePath : \\tms-obc-web\\proxy.conf.js
|
* @FilePath : \\tms-obc-web\\proxy.conf.js
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -28,4 +28,14 @@ module.exports = {
|
|||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
logLevel: 'debug'
|
logLevel: 'debug'
|
||||||
},
|
},
|
||||||
|
'//sascs': {
|
||||||
|
target: {
|
||||||
|
host: 'sascs-tj-tms-test.obs.cn-south-1.myhuaweicloud.com',
|
||||||
|
protocol: 'https:',
|
||||||
|
port: 443
|
||||||
|
},
|
||||||
|
secure: false,
|
||||||
|
changeOrigin: true,
|
||||||
|
logLevel: 'debug'
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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.auditStatus == '1',
|
iif: item => item.auditStatus == '1' && !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.auditStatus == '1',
|
iif: item => item.auditStatus == '1' && !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.auditStatus == '1',
|
iif: item => item.auditStatus == '1' && !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.auditStatus == '2',
|
iif: item => item.loadingLadingBillFilePath,
|
||||||
acl: { ability: ['ORDER-RECEIPTS-view'] },
|
acl: { ability: ['ORDER-RECEIPTS-view'] },
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@ -544,23 +544,14 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
|||||||
nzTitle: `<b>已选择${this.selectedRows.length}条订单,确认批量生成电子单据吗?</b>`,
|
nzTitle: `<b>已选择${this.selectedRows.length}条订单,确认批量生成电子单据吗?</b>`,
|
||||||
nzContent: `<b>确认后单据不可修改,请谨慎操作。</b>`,
|
nzContent: `<b>确认后单据不可修改,请谨慎操作。</b>`,
|
||||||
nzOnOk: () =>
|
nzOnOk: () =>
|
||||||
// this.service.request(this.service.$api_get_cancelAnOrder, { ids: params }).subscribe(res => {
|
{
|
||||||
// if (res === true) {
|
this.service.downloadFile(this.service.$api_createBillTakeGoods,params)
|
||||||
// this.service.msgSrv.success('操作成功!');
|
this.service.downloadFile(this.service.$api_createBillDischargeGoods,params)
|
||||||
// this.st?.reload(1);
|
this.service.msgSrv.success('生成成功!');
|
||||||
// this.getGoodsSourceStatistical();
|
this.st?.reload()
|
||||||
// this.initST();
|
|
||||||
// }
|
|
||||||
// this.st?.reload(1);
|
|
||||||
// this.getGoodsSourceStatistical();
|
// this.getGoodsSourceStatistical();
|
||||||
// })
|
}
|
||||||
{
|
})
|
||||||
this.service.downloadFile(this.service.$api_createBillTakeGoods,params)
|
|
||||||
|
|
||||||
|
|
||||||
this.service.downloadFile(this.service.$api_createBillDischargeGoods,params)}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
// 获取所属项目
|
// 获取所属项目
|
||||||
getRegionCode(regionCode: any) {
|
getRegionCode(regionCode: any) {
|
||||||
|
|||||||
@ -4,23 +4,20 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-15 13:17:42
|
* @Date : 2021-12-15 13:17:42
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-02-21 20:25:47
|
* @LastEditTime : 2022-04-01 14:27:47
|
||||||
* @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.
|
||||||
-->
|
-->
|
||||||
<div class="sfBox" [ngClass]="Status !== 1 ? 'hideBtn' : ''">
|
<div class="sfBox" [ngClass]="Status !== 1 ? 'hideBtn' : ''">
|
||||||
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="formData" button="none">
|
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="formData" button="none">
|
||||||
<ng-template sf-template="weight" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="no0" let-me let-ui="ui" let-schema="schema">
|
||||||
<div style="display: flex">
|
<div style="color: #1890FF" >
|
||||||
<nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
<!-- <a [href]="loadPDF" (click)="openlaod(me)">电子装货单</a> -->
|
||||||
<div class="left_btn">吨</div>
|
<div (click)="openlaod(me)">电子装货单</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template sf-template="volume" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="no6" let-me let-ui="ui" let-schema="schema">
|
||||||
<div style="display: flex">
|
<div style="color: #1890FF">电子卸货单</div>
|
||||||
<nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
|
||||||
<div class="left_btn">方</div>
|
|
||||||
</div>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</sf>
|
</sf>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -30,6 +30,7 @@ import { OrderManagementService } from '../../../services/order-management.servi
|
|||||||
export class orderManagementVoucherViewComponent implements OnInit {
|
export class orderManagementVoucherViewComponent implements OnInit {
|
||||||
record: any = {};
|
record: any = {};
|
||||||
i: any;
|
i: any;
|
||||||
|
loadPDF: string = '';
|
||||||
formData: any;
|
formData: any;
|
||||||
Status: any;
|
Status: any;
|
||||||
data: any ={
|
data: any ={
|
||||||
@ -52,6 +53,7 @@ export class orderManagementVoucherViewComponent implements OnInit {
|
|||||||
if(this.Status == 1) {
|
if(this.Status == 1) {
|
||||||
|
|
||||||
this.schema = {
|
this.schema = {
|
||||||
|
|
||||||
properties: {
|
properties: {
|
||||||
loadingLadingBillFilePath: {
|
loadingLadingBillFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -217,9 +219,15 @@ export class orderManagementVoucherViewComponent implements OnInit {
|
|||||||
required: ['loadingLadingBillFilePath', 'loadingPeopleVehiclesGoodsFilePath','unloadingLadingBillFilePath','unloadingPeopleVehiclesGoodsFilePath' ]
|
required: ['loadingLadingBillFilePath', 'loadingPeopleVehiclesGoodsFilePath','unloadingLadingBillFilePath','unloadingPeopleVehiclesGoodsFilePath' ]
|
||||||
};
|
};
|
||||||
}else {
|
}else {
|
||||||
console.log('只读')
|
|
||||||
this.schema = {
|
this.schema = {
|
||||||
properties: {
|
properties: {
|
||||||
|
no0: {
|
||||||
|
type: 'string',
|
||||||
|
title: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
},
|
||||||
|
},
|
||||||
loadingLadingBillFilePath: {
|
loadingLadingBillFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '装货凭证',
|
title: '装货凭证',
|
||||||
@ -298,6 +306,7 @@ export class orderManagementVoucherViewComponent implements OnInit {
|
|||||||
listType: 'picture-card',
|
listType: 'picture-card',
|
||||||
} as SFUploadWidgetSchema,
|
} as SFUploadWidgetSchema,
|
||||||
},
|
},
|
||||||
|
|
||||||
no4: {
|
no4: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
@ -306,6 +315,13 @@ export class orderManagementVoucherViewComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式',
|
default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式',
|
||||||
},
|
},
|
||||||
|
no6: {
|
||||||
|
type: 'string',
|
||||||
|
title: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
},
|
||||||
|
},
|
||||||
unloadingLadingBillFilePath: {
|
unloadingLadingBillFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '卸货凭证',
|
title: '卸货凭证',
|
||||||
@ -486,5 +502,41 @@ export class orderManagementVoucherViewComponent implements OnInit {
|
|||||||
close(): void {
|
close(): void {
|
||||||
this.modal.destroy(true);
|
this.modal.destroy(true);
|
||||||
}
|
}
|
||||||
|
openlaod(value: any) {
|
||||||
|
"https://sascs-tj-tms-test.obs.cn-south-1.myhuaweicloud.com:443/854be85a81d4471ebeb9cda464dcc5eb.pdf"
|
||||||
|
let url: any = 'https://sascs-tj-tms-test.obs.cn-south-1.myhuaweicloud.com:443/854be85a81d4471ebeb9cda464dcc5eb.pdf';
|
||||||
|
const xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('GET', url, true);
|
||||||
|
xhr.responseType = 'blob';
|
||||||
|
//xhr.setRequestHeader('Authorization', 'Basic a2VybWl0Omtlcm1pdA==');
|
||||||
|
xhr.onload = () => {
|
||||||
|
if (xhr.status === 200) {
|
||||||
|
// 获取文件blob数据并保存
|
||||||
|
var fileName = this.getFileName(url);
|
||||||
|
console.log(xhr.response);
|
||||||
|
|
||||||
|
// saveAs(xhr.response, fileName);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xhr.send();
|
||||||
|
// const disp = res.headers.get('Content-Disposition');
|
||||||
|
// const blob = new Blob([res.body], { type: 'text/plain;charset=utf-8' });
|
||||||
|
// const url = window.URL.createObjectURL(blob);
|
||||||
|
// const a = document.createElement('a');
|
||||||
|
// const fileName = disp.split(';')[1].split('=')[1];
|
||||||
|
// a.href = url;
|
||||||
|
// a.download = decodeURI(fileName);
|
||||||
|
// a.click();
|
||||||
|
// window.URL.revokeObjectURL(url);
|
||||||
|
// console.log(value?.loadingLadingBillFilePath);
|
||||||
|
// this.loadPDF = value?.loadingLadingBillFilePath;
|
||||||
|
}
|
||||||
|
getFileName(url:any)
|
||||||
|
{
|
||||||
|
var num = url.lastIndexOf('/')+1
|
||||||
|
var fileName = url.substring(num)
|
||||||
|
//把参数和文件名分割开
|
||||||
|
fileName = decodeURI(fileName.split("?")[0]);
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user