承租方修改

This commit is contained in:
syruan 2025-02-25 17:33:26 +08:00
parent a215c91c87
commit 0427e23fbf
1 changed files with 26 additions and 1 deletions

View File

@ -390,6 +390,29 @@ const downloadContract = () => {
// }
}
//
const downloadAnnex = async () => {
const baseUrl = window.location.origin;
const fileUrl = `${baseUrl}/contract-annex.docx`;
try {
const response = await fetch(fileUrl);
if (!response.ok) throw new Error('网络响应不正常');
const blob = await response.blob();
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.style.display = 'none';
a.href = url;
a.download = 'contract-annex.docx'; //
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
} catch (error) {
console.error('下载失败:', error);
}
}
const confirmFail = async (item: any) => {
ElMessageBox.confirm('是否确定取消订单?', {
confirmButtonText: '确定',
@ -1454,10 +1477,12 @@ const pickUpCodeForm = reactive<any>({
<!-- </div> -->
<div style="display: flex; justify-content: flex-end; margin-bottom: 10px">
<span class="dialog-footer">
<el-button @click="downloadAnnex" type="success"> 下载附件 </el-button>
<el-button @click="downloadContract" type="success"> 下载合同 </el-button>
<el-button type="primary" @click="dialogFormVisibleSettleWord = false"
> </el-button
>
<el-button @click="downloadContract" type="success"> 下载 </el-button>
</span>
</div>
<div id="mmm" style="height: 600px"></div>