From 4c70b785d9ecdd6fbb5e0e324eed9b3222401465 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期二, 11 八月 2026 22:12:21 +0800
Subject: [PATCH] 放开报销单修改删除下载权限

---
 src/views/project/fundcheck/ethicalExpertFeeCheck/index.vue |  130 +++++++++++++++++++++++++++----------------
 1 files changed, 81 insertions(+), 49 deletions(-)

diff --git a/src/views/project/fundcheck/ethicalExpertFeeCheck/index.vue b/src/views/project/fundcheck/ethicalExpertFeeCheck/index.vue
index f684502..d882563 100644
--- a/src/views/project/fundcheck/ethicalExpertFeeCheck/index.vue
+++ b/src/views/project/fundcheck/ethicalExpertFeeCheck/index.vue
@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
       <el-row>
         <el-col :span="5">
           <el-form-item label="鎹愮尞妗堜緥" prop="donorname" style="float: left">
@@ -41,9 +41,9 @@
         </el-col>
         <el-col :span="8">
           <el-form-item label="鐢宠鏃ユ湡" prop="applyTime">
-            <el-date-picker format="yyyy-MM-dd" @change="selectapplication" value-format="yyyy-MM-dd" v-model="applyTime"
-              type="daterange" range-separator="鑷�" start-placeholder="鐢宠寮�濮嬫棩鏈�" end-placeholder="鐢宠缁撴潫鏃ユ湡"
-              @keyup.enter.native="flowconclusion">
+            <el-date-picker format="yyyy-MM-dd" @change="selectapplication" value-format="yyyy-MM-dd"
+              v-model="applyTime" type="daterange" range-separator="鑷�" start-placeholder="鐢宠寮�濮嬫棩鏈�"
+              end-placeholder="鐢宠缁撴潫鏃ユ湡" @keyup.enter.native="flowconclusion">
             </el-date-picker>
           </el-form-item>
         </el-col>
@@ -75,30 +75,30 @@
               <span>{{ parseTime(scope.row.applyTime, "{y}-{m}-{d}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="鐢宠閲戦" align="center" prop="pretaxcost" width="200px" />
-          <el-table-column label="缁忓姙浜�" align="center" prop="username" width="150px" />
-          <el-table-column label="鐢宠鏉愭枡鐘舵��" width="140" align="center" prop="checkFlag">
+          <el-table-column label="鐢宠閲戦" align="center" prop="pretaxcost" width="120px" />
+          <el-table-column label="缁忓姙浜�" align="center" prop="username" width="90px" />
+          <el-table-column label="鏉愭枡棰勫鐘舵��" width="140px" align="center" prop="checkFlag">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.sys_stage_type" :value="scope.row.checkstatus" />
             </template>
           </el-table-column>
-          <el-table-column label="瀹℃牳鐘舵��" align="center" prop="recordstatus" width="200">
+          <el-table-column label="瀹℃牳鐘舵��" align="center" prop="recordstatus" width="140px">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.sys_recordstatus" :value="scope.row.recordstatus" />
             </template>
           </el-table-column>
-          <el-table-column label="涓◣璁$畻鎯呭喌" align="center" prop="recordstatus" width="200">
+          <!-- <el-table-column label="涓◣璁$畻鎯呭喌" align="center" prop="recordstatus" width="120px">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.sys_tax" :value="scope.row.istax" />
             </template>
-          </el-table-column>
-          <el-table-column label="鎵�灞炵粍鍒�" align="center" prop="deptmentname" width="200px" />
-          <el-table-column label="缁勯暱" align="center" prop="managername" width="150px" />
-          <el-table-column label="鎹愮尞鑰�" align="center" prop="donorname" width="120px" />
+          </el-table-column> -->
+          <el-table-column label="鎵�灞炵粍鍒�" align="center" prop="deptmentname" width="140px" />
+          <el-table-column label="缁勯暱" align="center" prop="managername" width="90px" />
+          <el-table-column label="鎹愮尞鑰�" align="center" prop="donorname" width="90px" />
           <el-table-column label="澶囨敞" align="center" prop="remark" />
           <!--<el-table-column label="鎹愮尞缂栧彿" align="center" prop="donorno" />
           <el-table-column label="璐㈠姟瀹℃牳" align="center" prop="financechecher" width="140" />-->
-          <el-table-column label="鎿嶄綔" fixed="right" align="center" class-name="small-padding fixed-width" width="260px">
+          <el-table-column label="鎿嶄綔" fixed="right" align="center" class-name="small-padding fixed-width" width="200px">
             <template slot-scope="scope">
               <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.checkFlag == 0"
                 @click="handleDetail(scope.row)">璇︽儏</el-button>
@@ -106,7 +106,8 @@
               <el-button v-if="scope.row.checkFlag == 1" size="mini" type="text" icon="el-icon-edit"
                 @click="handleCheck(scope.row)">瀹℃牳</el-button>
               <!-- v-hasPermi="['project:donateconsolationfund:edit']" -->
-              <el-button size="mini" type="text" icon="el-icon-download" @click="dayin(scope.row.id)">涓嬭浇</el-button>
+              <el-button size="mini" type="text" icon="el-icon-download"
+                @click="totaldayin(scope.row.id)">涓嬭浇</el-button>
               <!-- <el-popover placement="right" width="400" trigger="click">
                 <el-table :data="gridData">
                   <el-table-column
@@ -137,8 +138,8 @@
           </el-table-column>
         </el-table>
 
-        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
-          @pagination="getlistbypower" />
+        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize" @pagination="getlistbypower" />
       </el-row>
     </el-form>
 
@@ -197,7 +198,8 @@
         </el-row>
 
         <el-row style="margin-top: 5px; margin-bottom: 5px">
-          <el-table :data="fundDetailArr" :summary-method="getSummaries" border highlight-current-row v-loading="loading">
+          <el-table :data="fundDetailArr" :summary-method="getSummaries" border highlight-current-row
+            v-loading="loading">
             <el-table-column prop="orderno" align="center" label="鎺掑簭" width="80">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.orderno" placeholder="鎺掑簭" />
@@ -230,17 +232,19 @@
               <template slot-scope="scope">
                 <el-select filterable allow-create ref="getReportname" default-first-option
                   @change="selectpersonmsg(scope.row)" v-model="scope.row.beneficiaryname" placeholder="璇烽�夋嫨">
-                  <el-option v-for="item in arrr3" :key="item.reportNo" :label="item.reportName" :value="item.reportName">
+                  <el-option v-for="item in arrr3" :key="item.reportNo" :label="item.reportName"
+                    :value="item.reportName">
                   </el-option>
                 </el-select>
               </template>
             </el-table-column>
             <el-table-column prop="amount" align="center" label="绋庡墠閲戦" width="150">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.amount" @blur="val => {
-                  sumTotalFee();
-                }
-                  " placeholder="绋庡墠閲戦" />
+                <el-input v-model="scope.row.amount" @blur="
+                  val => {
+                    sumTotalFee();
+                  }
+                " placeholder="绋庡墠閲戦" />
               </template>
             </el-table-column>
             <!-- <el-table-column
@@ -255,10 +259,11 @@
             </el-table-column> -->
             <el-table-column prop="taxedamount" align="center" label="绋庡悗閲戦" width="150">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.taxedamount" placeholder="绋庡悗閲戦" @blur="val => {
-                  sumTotalFee();
-                }
-                  " />
+                <el-input v-model="scope.row.taxedamount" placeholder="绋庡悗閲戦" @blur="
+                  val => {
+                    sumTotalFee();
+                  }
+                " />
               </template>
             </el-table-column>
             <el-table-column prop="unitno" align="center" label="鍗曚綅" width="180">
@@ -428,6 +433,8 @@
 import Li_area_select from "@/components/Address";
 import OrgSelecter from "@/views/project/components/orgselect";
 import { getUserProfile } from "@/api/system/user";
+import { getToken } from "@/utils/auth";
+
 // 瀵煎叆鏈湴瀛樺偍鐨勬柟娉�
 import { setItem, grtItem, removeItem } from "@/utils/storage.js";
 
@@ -509,6 +516,9 @@
       //鎹愮尞妗堜緥鍒楄〃鏁版嵁
       // donationCaseTableData:[],
       donatebaseinfoList: [],
+      headers: {
+        Authorization: "Bearer " + getToken()
+      },
       gridData: [
         {
           date: "2016-05-02",
@@ -555,7 +565,7 @@
         },
         {
           value: 2,
-          label: "瀹℃煡閫氳繃绛夊緟閭瘎绾歌川鏉愭枡"
+          label: "瀹℃煡閫氳繃绛夊緟绾歌川鏉愭枡"
         },
         {
           value: 3,
@@ -699,11 +709,20 @@
         return;
       }
       checkfund(checkfundobj).then(res => {
-        console.log("瀹℃牳璐圭敤", res);
-        this.dialogOpen = false;
-        this.reset();
-        this.$modal.msgSuccess("瀹℃牳瀹屾垚!");
-        this.getlistbypower();
+        if (res.code == 200) {
+          console.log("瀹℃牳璐圭敤", res);
+          this.dialogOpen = false;
+          this.reset();
+          this.$modal.msgSuccess("瀹℃牳瀹屾垚!");
+          this.getlistbypower();
+        } else {
+          this.dialogOpen = false;
+          if (res.msg) {
+            this.$modal.msgError("鎿嶄綔澶辫");
+          } else {
+            this.$modal.msgError(res.msg);
+          }
+        }
       });
     },
     getlistUser() {
@@ -746,22 +765,35 @@
     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"
+        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);
           });
-        }
       });
     },
 
@@ -1490,7 +1522,7 @@
         // this.defaultperson = response.data;
         // this.standardlevel = response.data.standardlevel;
         if (
-          response.data.userName === "001" ||
+          response.data.userName === "053" ||
           response.data.userName === "002" ||
           response.data.userName === "admin"
         ) {

--
Gitblit v1.9.3