From c2486044121750d274d40aac2e65b47d4c25b5c9 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 22 四月 2024 18:08:15 +0800
Subject: [PATCH] 11
---
src/views/project/fundcheck/officeExpenseCheck/index.vue | 105 ++++++++++++++++++++++++++++------------------------
1 files changed, 57 insertions(+), 48 deletions(-)
diff --git a/src/views/project/fundcheck/officeExpenseCheck/index.vue b/src/views/project/fundcheck/officeExpenseCheck/index.vue
index a63cf7a..c70309e 100644
--- a/src/views/project/fundcheck/officeExpenseCheck/index.vue
+++ b/src/views/project/fundcheck/officeExpenseCheck/index.vue
@@ -2,24 +2,18 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
<el-row align="left">
- <el-col :span="8">
- <el-form-item label="鐢宠鏃ユ湡" prop="createTime">
- <el-date-picker format="yyyy-MM-dd" @change="selectapplication" value-format="yyyy-MM-dd" v-model="createTime"
- type="daterange" range-separator="鑷�" start-placeholder="鐢宠寮�濮嬫棩鏈�" end-placeholder="鐢宠缁撴潫鏃ユ湡"
- @keyup.enter.native="flowconclusion">
- </el-date-picker>
- </el-form-item>
- </el-col>
<el-col :span="5">
- <el-form-item label="閲戦" prop="money" style="float: left">
- <el-input v-model="queryParams.money" placeholder="璇疯緭鍏ョ敵璇蜂汉閲戦" clearable size="small"
+ <el-form-item label="鎹愮尞妗堜緥" prop="donorname" style="float: left">
+ <el-input v-model="queryParams.donorname" placeholder="璇疯緭鍏ョ敵璇蜂汉鎹愮尞鑰�" clearable size="small"
@keyup.enter.native="flowconclusion" />
</el-form-item>
</el-col>
<el-col :span="5">
- <el-form-item label="缁忓姙浜�" prop="APPLICANT" style="float: left">
- <el-input v-model="queryParams.APPLICANT" placeholder="璇疯緭鍏ョ敵璇蜂汉濮撳悕" clearable size="small"
- @keyup.enter.native="flowconclusion" />
+ <el-form-item label-width="120px" label="棰勫鐘舵��" prop="checkstatus" style="float: left">
+ <el-select v-model="queryParams.checkstatus" placeholder="璇烽�夋嫨" style="width: 100%">
+ <el-option v-for="item in checkmaterials" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
</el-form-item>
</el-col>
<el-col :span="5">
@@ -30,27 +24,29 @@
</el-select>
</el-form-item>
</el-col>
- <!-- <el-col :span="6">
- <el-button type="primary" icon="el-icon-search" size="mini" @click="flowconclusion">鎼滅储</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
- </el-col> -->
- </el-row>
- <el-row>
<el-col :span="5">
- <el-form-item label-width="120px" label="鐢宠鏉愭枡鐘舵��" prop="checkstatus" style="float: left">
- <el-select v-model="queryParams.checkstatus" placeholder="璇烽�夋嫨" style="width: 100%">
- <el-option v-for="item in checkmaterials" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="鎹愮尞鑰�" prop="donorname" style="float: left">
- <el-input v-model="queryParams.donorname" placeholder="璇疯緭鍏ョ敵璇蜂汉鎹愮尞鑰�" clearable size="small"
+ <el-form-item label="缁忓姙浜�" prop="APPLICANT" style="float: left">
+ <el-input v-model="queryParams.APPLICANT" placeholder="璇疯緭鍏ョ敵璇蜂汉濮撳悕" clearable size="small"
@keyup.enter.native="flowconclusion" />
</el-form-item>
</el-col>
- <el-col :span="4">
+ </el-row>
+ <el-row>
+ <el-col :span="5">
+ <el-form-item label="鎶ラ攢閲戦" prop="money" style="float: left">
+ <el-input v-model="queryParams.money" placeholder="璇疯緭鍏ョ敵璇蜂汉閲戦" clearable size="small"
+ @keyup.enter.native="flowconclusion" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鐢宠鏃ユ湡" prop="createTime">
+ <el-date-picker format="yyyy-MM-dd" @change="selectapplication" value-format="yyyy-MM-dd" v-model="createTime"
+ type="daterange" range-separator="鑷�" start-placeholder="鐢宠寮�濮嬫棩鏈�" end-placeholder="鐢宠缁撴潫鏃ユ湡"
+ @keyup.enter.native="flowconclusion">
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
<div style="margin-bottom: 15px;">
<el-button type="primary" icon="el-icon-search" size="mini" @click="flowconclusion">鎼滅储</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
@@ -72,9 +68,9 @@
-->
<el-table-column label="鎶ラ攢鍗曞彿" align="center" prop="bh" width="150px" />
- <el-table-column label="鐢宠鏃ユ湡" width="180" align="center" prop="createTime">
+ <el-table-column label="鐢宠鏃ユ湡" width="180" align="center" prop="applyTime">
<template slot-scope="scope">
- <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
+ <span>{{ parseTime(scope.row.applyTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="鐢宠閲戦" align="center" prop="pretaxcost" width="200px" />
@@ -777,23 +773,36 @@
totaldayin(e) {
// const id =this.row.id
- getdownloadBX(e).then(res => {
- if (res.downloadUrl) {
- var fileUrl = res;
- //鑾峰彇褰撳墠缃戝潃
- var urlBase = process.env.VUE_APP_BASE_API;
- var curWWWPath = window.document.location.href;
- var pos = curWWWPath.indexOf(window.document.location.pathname);
- // 鍒涘缓a鏍囩
- var aEle = document.createElement("a");
- aEle.href =
- curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
- aEle.click();
- this.$alert("涓嬭浇鎴愬姛", "鎻愮ず", {
- confirmButtonText: "纭畾",
- type: "success"
+ getdownloadLW(e).then(res => {
+ var fileUrl = res;
+ //鑾峰彇褰撳墠缃戝潃
+ var urlBase = process.env.VUE_APP_BASE_API;
+ var curWWWPath = window.document.location.href;
+ var pos = curWWWPath.indexOf(window.document.location.pathname);
+ // 鍒涘缓a鏍囩
+ var aEle = document.createElement("a");
+ aEle.href =
+ curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
+ console.log(aEle.href);
+ // 娣诲姞Authorization澶撮儴
+ fetch(aEle.href, {
+ headers: this.headers
+ })
+ .then(response => {
+ // 灏嗘枃浠朵笅杞介摼鎺ヤ綔涓篵lob瀵硅薄杩涜涓嬭浇
+ return response.blob();
+ })
+ .then(blob => {
+ const url = window.URL.createObjectURL(new Blob([blob]));
+ console.log(url);
+ const link = document.createElement("a");
+ link.href = url;
+ const name=fileUrl["downloadName"]
+ link.setAttribute("download", name); // 鏇挎崲file.pdf涓哄疄闄呯殑鏂囦欢鍚�
+ document.body.appendChild(link);
+ link.click();
+ link.parentNode.removeChild(link);
});
- }
});
},
--
Gitblit v1.9.3