Commit 71610a0f by liangjianmin

feat(orderTrack): add contract functionality in goods detail component

- Introduced a new method for adding contracts in the goods detail component.
- Enhanced the existing contract download functionality to ensure proper handling of PDF files.
- Improved code clarity by adjusting variable declarations for better readability.
parent 2c599ace
Showing with 5 additions and 1 deletions
......@@ -410,6 +410,10 @@
});
}
},
// 新增合同
addContract() {
},
//下载猎芯合同
downloadContract() {
let pdf_url = ""
......@@ -424,7 +428,7 @@
}
this.$http('get', pdf_url, { id: this.$route.query.purchase_id }, true, 'blob').then(res => {
// 包装成 Blob 对象
const blob = new Blob([res], { type: 'application/pdf' });
let blob = new Blob([res], { type: 'application/pdf' });
// 创建 URL 对象
let pdfUrl = window.URL.createObjectURL(blob);
window.open(pdfUrl, '_blank');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment