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/fund/performanceApply/index.vue |  281 +++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 227 insertions(+), 54 deletions(-)

diff --git a/src/views/project/fund/performanceApply/index.vue b/src/views/project/fund/performanceApply/index.vue
index dd9ac12..349ee31 100644
--- a/src/views/project/fund/performanceApply/index.vue
+++ b/src/views/project/fund/performanceApply/index.vue
@@ -1,98 +1,246 @@
 <!--  -->
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="70px">
-      <el-row align="left">           
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      label-width="70px"
+    >
+      <el-row align="left">
         <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-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="money" style="float: left">
-            <el-input v-model="queryParams.money" placeholder="璇疯緭鍏ョ敵璇蜂汉閲戦" clearable size="small"
-              @keyup.enter.native="handleQuery" />
+            <el-input
+              v-model="queryParams.money"
+              placeholder="璇疯緭鍏ョ敵璇蜂汉閲戦"
+              clearable
+              size="small"
+              @keyup.enter.native="handleQuery"
+            />
           </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="handleQuery" />
+            <el-input
+              v-model="queryParams.name"
+              placeholder="璇疯緭鍏ョ粡鍔炰汉"
+              clearable
+              size="small"
+              @keyup.enter.native="handleQuery"
+            />
           </el-form-item>
         </el-col>
       </el-row>
-      <el-row>       
+      <el-row>
         <el-col :span="7">
           <el-form-item label="鐢宠鏃ユ湡" prop="applyTime">
-            <el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="value1" type="daterange" @blur="onpick"
-              range-separator="鑷�" start-placeholder="鎶ラ攢鐢宠寮�濮嬫棩鏈�" end-placeholder="鎶ラ攢鐢宠缁撴潫鏃ユ湡"
-              @keyup.enter.native="handleQuery">
+            <el-date-picker
+              format="yyyy-MM-dd"
+              value-format="yyyy-MM-dd"
+              v-model="queryParams.value1"
+              type="daterange"
+              range-separator="鑷�"
+              start-placeholder="鎶ラ攢鐢宠寮�濮嬫棩鏈�"
+              end-placeholder="鎶ラ攢鐢宠缁撴潫鏃ユ湡"
+              @keyup.enter.native="handleQuery"
+            >
             </el-date-picker>
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</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="handleQuery"
+            >鎼滅储</el-button
+          >
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+            >閲嶇疆</el-button
+          >
         </el-col>
       </el-row>
     </el-form>
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">鏂板</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          >鏂板</el-button
+        >
         <!-- v-hasPermi="['project:medicalfund:add']" -->
       </el-col>
       <el-col :span="1.5">
-        <el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading"
-          @click="handleExport">瀵煎嚭</el-button>
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          >瀵煎嚭</el-button
+        >
       </el-col>
       <!-- v-hasPermi="['project:medicalfund:export']" -->
       <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
     </el-row>
-    <el-table v-loading="loading" border :data="donateconsolationfundList">
-      <el-table-column label="鐢宠鏃ユ湡" align="center" prop="applyTime" width="180px">
+    <el-table
+      v-loading="loading"
+      border
+      :data="donateconsolationfundList"
+      :row-class-name="rowClassName"
+    >
+      <el-table-column
+        label="鐢宠鏃ユ湡"
+        align="center"
+        prop="applyTime"
+        width="180px"
+      >
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.applyTime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="鐢宠浜�" align="center" prop="username" width="150px" />
-      <el-table-column label="鐢宠閲戦" align="center" prop="pretaxcost" width="150px" />
+      <el-table-column
+        label="鐢宠浜�"
+        align="center"
+        prop="username"
+        width="150px"
+      />
+      <el-table-column
+        label="鐢宠閲戦"
+        align="center"
+        prop="pretaxcost"
+        width="150px"
+      />
 
-      <el-table-column label="瀹℃牳鐘舵��" width="150" align="center" prop="recordstatus">
+      <el-table-column
+        label="瀹℃牳鐘舵��"
+        width="150"
+        align="center"
+        prop="recordstatus"
+      >
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_recordstatus" :value="scope.row.recordstatus" />
+          <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">
+      <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" />
+          <dict-tag
+            :options="dict.type.sys_stage_type"
+            :value="scope.row.checkstatus"
+          />
         </template>
       </el-table-column>
-      <el-table-column label="缁╂晥绫诲瀷" width="150" align="center" prop="performancetype">
+      <el-table-column
+        label="缁╂晥绫诲瀷"
+        width="150"
+        align="center"
+        prop="performancetype"
+      >
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_performance_type" :value="scope.row.performancetype" />
+          <dict-tag
+            :options="dict.type.sys_performance_type"
+            :value="scope.row.performancetype"
+          />
         </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="280px">
+      <el-table-column
+        label="鎿嶄綔"
+        fixed="right"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="280px"
+      >
         <template slot-scope="scope">
-          <el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text"
-            icon="el-icon-edit" @click="handleup(scope.row)">涓婃姤</el-button>
-          <el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text"
-            icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:medicalfund:edit']">淇敼</el-button>
+          <el-button
+            v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleup(scope.row)"
+            >涓婃姤</el-button
+          >
+          <el-button
+            v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['project:medicalfund:edit']"
+            >淇敼</el-button
+          >
 
-          <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row)">鏌ョ湅</el-button>
-          <el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text"
-            icon="el-icon-delete" @click="handleDelete(scope.row)"
-            v-hasPermi="['project:medicalfund:delete']">鍒犻櫎</el-button>
-          <el-button size="mini" type="text" icon="el-icon-download" @click="mixExport(scope.row.id)"
-            v-hasPermi="['project:medicalfund:download']">涓嬭浇</el-button>
-          <el-button size="mini" type="text" icon="el-icon-edit" @click="duplicationfn(scope.row)">澶嶅埗</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleDetail(scope.row)"
+            >鏌ョ湅</el-button
+          >
+          <el-button
+            v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
+            size="mini"
+            type="text"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['project:medicalfund:delete']"
+            ><span class="button-delete"
+              ><i class="el-icon-delete"></i>鍒犻櫎</span
+            ></el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-download"
+            @click="mixExport(scope.row.id)"
+            v-hasPermi="['project:medicalfund:download']"
+            >涓嬭浇</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="duplicationfn(scope.row)"
+            >澶嶅埗</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
   </div>
 </template>
 
@@ -265,8 +413,20 @@
         .then(() => {
           //鏌ユ壘鏄惁瀛樺湪鐧昏瀹屾垚璁板綍
           //鍒ゆ柇鏄惁瀛樺湪涓婃姤璁板綍
-          row.recordstatus = 0; var currenttime = new Date();
-          row.applyTime = currenttime.getFullYear() + "-" + (currenttime.getMonth() + 1) + "-" + currenttime.getDate() + " " + currenttime.getHours() + ":" + currenttime.getMinutes() + ":" + currenttime.getSeconds();
+          row.recordstatus = 0;
+          var currenttime = new Date();
+          row.applyTime =
+            currenttime.getFullYear() +
+            "-" +
+            (currenttime.getMonth() + 1) +
+            "-" +
+            currenttime.getDate() +
+            " " +
+            currenttime.getHours() +
+            ":" +
+            currenttime.getMinutes() +
+            ":" +
+            currenttime.getSeconds();
           updateFund(row).then(response => {
             if (response.code == 200) {
               this.$message({
@@ -347,14 +507,14 @@
           this.$download.name(response.msg);
           this.exportLoading = false;
         })
-        .catch(() => { });
+        .catch(() => {});
     },
 
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$modal
         .confirm("鏄惁纭鍒犻櫎璇ヨ褰曪紵")
-        .then(function () {
+        .then(function() {
           return delFund(ids);
         })
         .then(() => {
@@ -367,7 +527,7 @@
           this.getList();
           this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
         })
-        .catch(() => { });
+        .catch(() => {});
     },
 
     /** 鏌ヨ鍒楄〃 */
@@ -379,6 +539,7 @@
         console.log(11);
         this.loading = false;
         this.donateconsolationfundList = response.rows;
+        this.total=response.total;
       });
     },
     // 鎹愮尞鑰呭尰瀛︾粺璁℃墦鍗�
@@ -407,7 +568,7 @@
             console.log(url);
             const link = document.createElement("a");
             link.href = url;
-            const name=fileUrl["downloadName"]
+            const name = fileUrl["downloadName"];
             link.setAttribute("download", name); // 鏇挎崲file.pdf涓哄疄闄呯殑鏂囦欢鍚�
             document.body.appendChild(link);
             link.click();
@@ -442,6 +603,12 @@
     mixExport(id) {
       this.dayin2(id);
       //this.totaldayin(id);
+    },
+    rowClassName({ row, column, rowIndex, columnIndex }) {
+      if (row.recordstatus == -1 && row.backflowlevel != null) {
+        return "error-row";
+      }
+      return "";
     }
   },
   //鐢熷懡鍛ㄦ湡 - 鍒涘缓瀹屾垚锛堝彲浠ヨ闂綋鍓峵his瀹炰緥锛�
@@ -450,17 +617,23 @@
   },
 
   //鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
-  mounted() { },
+  mounted() {},
 
-  beforeCreate() { }, //鐢熷懡鍛ㄦ湡 - 鍒涘缓涔嬪墠
-  beforeMount() { }, //鐢熷懡鍛ㄦ湡 - 鎸傝浇涔嬪墠
-  beforeUpdate() { }, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪墠
-  updated() { }, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪悗
-  beforeDestroy() { }, //鐢熷懡鍛ㄦ湡 - 閿�姣佷箣鍓�
-  destroyed() { }, //鐢熷懡鍛ㄦ湡 - 閿�姣佸畬鎴�
-  activated() { } //濡傛灉椤甸潰鏈塳eep-alive缂撳瓨鍔熻兘锛岃繖涓嚱鏁颁細瑙﹀彂
+  beforeCreate() {}, //鐢熷懡鍛ㄦ湡 - 鍒涘缓涔嬪墠
+  beforeMount() {}, //鐢熷懡鍛ㄦ湡 - 鎸傝浇涔嬪墠
+  beforeUpdate() {}, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪墠
+  updated() {}, //鐢熷懡鍛ㄦ湡 - 鏇存柊涔嬪悗
+  beforeDestroy() {}, //鐢熷懡鍛ㄦ湡 - 閿�姣佷箣鍓�
+  destroyed() {}, //鐢熷懡鍛ㄦ湡 - 閿�姣佸畬鎴�
+  activated() {} //濡傛灉椤甸潰鏈塳eep-alive缂撳瓨鍔熻兘锛岃繖涓嚱鏁颁細瑙﹀彂
 };
 </script>
-<style scoped>
+<style lang="scss" scoped>
 /* @import url(); 寮曞叆鍏叡css绫� */
+.button-delete {
+  color: rgb(236, 69, 69);
+}
+::v-deep.el-table .error-row {
+  background: #fcebeb;
+}
 </style>

--
Gitblit v1.9.3