承租方修改
This commit is contained in:
parent
a215c91c87
commit
0427e23fbf
|
|
@ -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) => {
|
const confirmFail = async (item: any) => {
|
||||||
ElMessageBox.confirm('是否确定取消订单?', {
|
ElMessageBox.confirm('是否确定取消订单?', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|
@ -1454,10 +1477,12 @@ const pickUpCodeForm = reactive<any>({
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<div style="display: flex; justify-content: flex-end; margin-bottom: 10px">
|
<div style="display: flex; justify-content: flex-end; margin-bottom: 10px">
|
||||||
<span class="dialog-footer">
|
<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 type="primary" @click="dialogFormVisibleSettleWord = false"
|
||||||
>关 闭</el-button
|
>关 闭</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="downloadContract" type="success"> 下载 </el-button>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="mmm" style="height: 600px"></div>
|
<div id="mmm" style="height: 600px"></div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue