From 0ac2d43fce4d74f6eea5a51a2e16af4e6a536c7c Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 14 八月 2024 14:19:24 +0800
Subject: [PATCH] 11

---
 src/views/project/fundcheck/performanceCheck/index.vue |  307 ++++++++++++++++----------------------------------
 1 files changed, 99 insertions(+), 208 deletions(-)

diff --git a/src/views/project/fundcheck/performanceCheck/index.vue b/src/views/project/fundcheck/performanceCheck/index.vue
index 15110dd..041d2d3 100644
--- a/src/views/project/fundcheck/performanceCheck/index.vue
+++ b/src/views/project/fundcheck/performanceCheck/index.vue
@@ -1,225 +1,101 @@
 <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="120px">
       <el-row align="left">
         <el-col :span="5">
-          <el-form-item label="缁忓姙浜�" prop="name">
-            <el-input
-              v-model="queryParams.name"
-              placeholder="璇疯緭鍏ョ粡鍔炰汉"
-              clearable
-              size="small"
-              @keyup.enter.native="flowconclusion"
-            />
-          </el-form-item>
-        </el-col>
-        <el-col :span="7">
-          <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"
-              @keyup.enter.native="flowconclusion"
-            />
-          </el-form-item>
-        </el-col>
-
-        <el-col :span="5">
-          <el-form-item label="瀹℃壒鐘舵��" prop="CHECKFLAG" style="float: left">
-            <el-select
-              v-model="queryParams.CHECKFLAG"
-              placeholder="璇烽�夋嫨"
-              style="width: 100%"
-            >
-              <el-option
-                v-for="item in checkFlagOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
+          <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="CHECKFLAG" style="float: left">
+            <el-select v-model="queryParams.CHECKFLAG" placeholder="璇烽�夋嫨" style="width: 100%">
+              <el-option v-for="item in checkFlagOptions" :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="name">
+            <el-input v-model="queryParams.name" placeholder="璇疯緭鍏ョ粡鍔炰汉" clearable size="small"
+              @keyup.enter.native="flowconclusion" />
+          </el-form-item>
+        </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 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="4">
+        <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
-            >
+            <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>
           </div>
         </el-col>
       </el-row>
     </el-form>
     <el-form ref="infoform" label-width="100px">
       <el-row>
-        <el-table
-          v-loading="loading"
-          border
-          :data="donateconsolationfundList"
-          @selection-change="handleSelectionChange"
-        >
-          <el-table-column
-            label="鐢宠鏃ユ湡"
-            width="180"
-            align="center"
-            prop="createTime"
-          >
+        <el-table v-loading="loading" border :data="donateconsolationfundList" @selection-change="handleSelectionChange">
+          <el-table-column type="selection" width="45"> </el-table-column>
+          <el-table-column label="涓◣璁$畻鎯呭喌" align="center" prop="recordstatus" width="200">
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
+              <dict-tag :options="dict.type.sys_tax" :value="scope.row.istax" />
             </template>
           </el-table-column>
-          <el-table-column
-            label="缁忓姙浜�"
-            align="center"
-            prop="username"
-            width="150px"
-          />
-          <el-table-column
-            label="鐢宠閲戦"
-            align="center"
-            prop="pretaxcost"
-            width="200px"
-          />
-          <el-table-column
-            label="缁╂晥绫诲瀷"
-            width="150"
-            align="center"
-            prop="Performancetype"
-          >
+          <el-table-column label="鐢宠鏃ユ湡" width="180" align="center" prop="applyTime">
             <template slot-scope="scope">
-              <dict-tag
-                :options="dict.type.sys_performance_type"
-                :value="scope.row.Performancetype"
-              />
+              <span>{{ parseTime(scope.row.applyTime, "{y}-{m}-{d}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            label="瀹℃牳鐘舵��"
-            align="center"
-            prop="recordstatus"
-            width="200"
-          >
+          <el-table-column label="缁忓姙浜�" align="center" prop="username" width="150px" />
+          <el-table-column label="鐢宠閲戦" align="center" prop="pretaxcost" width="200px" />
+          <el-table-column label="缁╂晥绫诲瀷" width="150" align="center" prop="Performancetype">
             <template slot-scope="scope">
-              <dict-tag
-                :options="dict.type.sys_recordstatus"
-                :value="scope.row.recordstatus"
-              />
+              <dict-tag :options="dict.type.sys_performance_type" :value="scope.row.Performancetype" />
             </template>
           </el-table-column>
-          <el-table-column
-            label="鐢宠鏉愭枡鐘舵��"
-            width="140"
-            align="center"
-            prop="checkstatus"
-          >
+          <el-table-column label="瀹℃牳鐘舵��" align="center" prop="recordstatus" width="200">
             <template slot-scope="scope">
-              <dict-tag
-                :options="dict.type.sys_stage_type"
-                :value="scope.row.checkstatus"
-              />
+              <dict-tag :options="dict.type.sys_recordstatus" :value="scope.row.recordstatus" />
+            </template>
+          </el-table-column>
+          <el-table-column label="鐢宠鏉愭枡鐘舵��" width="140" align="center" prop="checkstatus">
+            <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="remark" />
-          <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="260px">
             <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
-              >
+              <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.checkFlag == 0"
+                @click="handleDetail(scope.row)">璇︽儏</el-button>
 
-              <el-button
-                v-if="scope.row.checkFlag == 1"
-                size="mini"
-                type="text"
-                icon="el-icon-edit"
-                @click="handleCheck(scope.row)"
-                >瀹℃牳</el-button
-              >
+              <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="totaldayin(scope.row.id)"
-                v-hasPermi="['project:donateconsolationfund:download']"
-                >涓嬭浇</el-button
-              >
+              <el-button size="mini" type="text" icon="el-icon-download" @click="totaldayin(scope.row.id)"
+                v-hasPermi="['project:donateconsolationfund:download']">涓嬭浇</el-button>
             </template>
           </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>
   </div>
@@ -311,7 +187,9 @@
     "sys_finsubject",
     "sys_financeitemtype",
     "sys_consolationfundlevel",
-    "sys_stage_type"
+    "sys_stage_type",
+    "sys_performance_type",
+    "sys_tax"
   ],
   data() {
     return {
@@ -389,15 +267,15 @@
       checkmaterials: [
         {
           value: 1,
-          label: "寰呭鏍�"
+          label: "鏉愭枡寰呭鏍�"
         },
         {
           value: 2,
-          label: "瀹℃牳閫氳繃绛夊緟鏉愭枡"
+          label: "瀹℃煡閫氳繃绛夊緟閭瘎绾歌川鏉愭枡"
         },
         {
           value: 3,
-          label: "宸叉敹鍒版潗鏂�"
+          label: "宸叉敹鍒扮焊璐ㄦ潗鏂�"
         }
       ],
       // 鏌ヨ鍙傛暟
@@ -463,8 +341,8 @@
   },
 
   mounted() {
-    if (grtItem("officeExpenseCheck")) {
-      this.queryParams = grtItem("officeExpenseCheck");
+    if (grtItem("performanceCheck")) {
+      this.queryParams = grtItem("performanceCheck");
       this.queryParams.APPLICATIONBEGTIME = "";
       this.queryParams.APPLICATIONENDTIME = "";
     }
@@ -483,8 +361,8 @@
       // this.queryParams.params = {};
       console.log("this.queryParams", this.queryParams);
       listbypower(this.queryParams).then(res => {
-        removeItem("officeExpenseCheck");
-        setItem("officeExpenseCheck", this.queryParams);
+        removeItem("performanceCheck");
+        setItem("performanceCheck", this.queryParams);
         this.loading = false;
         let list = res.rows;
         this.total = res.total;
@@ -492,28 +370,41 @@
       });
     },
     getlistOrganization() {
-      listOrganization().then(res => {});
+      listOrganization().then(res => { });
     },
 
     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);
           });
-        }
       });
     },
 
@@ -527,7 +418,7 @@
         username = res.data.username;
         this.$modal
           .confirm('鏄惁纭閫氳繃"' + username + '"鐨勮垂鐢ㄧ敵璇凤紵')
-          .then(function() {
+          .then(function () {
             getFund(e).then(res => {
               let data = res.data;
               let financechecher = "宸插鏍�";
@@ -603,7 +494,7 @@
         infoid: infoid,
         count: this.idss
       };
-      listFunddetails(aaa).then(res => {});
+      listFunddetails(aaa).then(res => { });
     },
     getUsermsg() {
       getUserProfile().then(response => {

--
Gitblit v1.9.3