feat: 多页面功能优化与新增

This commit is contained in:
2026-05-30 18:00:01 +08:00
parent 6a5220ad78
commit 9af5284ff3
10 changed files with 172 additions and 36 deletions

View File

@@ -478,8 +478,9 @@ export default {
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.target = '_blank';
a.href = url;
a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);

View File

@@ -476,8 +476,9 @@ export default {
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.target = '_blank';
a.href = url;
a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);

View File

@@ -478,8 +478,9 @@ export default {
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.target = '_blank';
a.href = url;
a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);

View File

@@ -35,7 +35,8 @@
</div>
<div class="header-right">
<span class="label">订单号</span>
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.orderId ? localWaybill.orderCode : localWaybill.principalPhone }}</div>
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.orderId ?
localWaybill.orderCode : localWaybill.principalPhone }}</div>
</div>
<div class="header-right">
<span class="label">合同号</span>
@@ -475,16 +476,14 @@ export default {
const blob = new Blob([pdfBytes], { type: 'application/pdf' });
const url = URL.createObjectURL(blob);
const win = window.open(url, '_blank');
if (!win) {
this.$message.error('打印失败,请检查浏览器设置');
// const a = document.createElement('a');
// a.href = url;
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`;
// document.body.appendChild(a);
// a.click();
// document.body.removeChild(a);
}
const a = document.createElement('a');
a.target = '_blank';
a.href = url;
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
},
async exportExcel() {
try {

View File

@@ -477,8 +477,9 @@ export default {
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.target = '_blank';
a.href = url;
a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);

View File

@@ -476,8 +476,9 @@ export default {
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.target = '_blank';
a.href = url;
a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);