From f64155f6ad27c50451bb7d4a15f553bc72ead7de Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期五, 12 九月 2025 14:35:26 +0800
Subject: [PATCH] 年龄计算相关
---
src/views/project/fund/performanceApply/index.vue | 354 ++++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 267 insertions(+), 87 deletions(-)
diff --git a/src/views/project/fund/performanceApply/index.vue b/src/views/project/fund/performanceApply/index.vue
index 28974f8..349ee31 100644
--- a/src/views/project/fund/performanceApply/index.vue
+++ b/src/views/project/fund/performanceApply/index.vue
@@ -1,104 +1,246 @@
<!-- -->
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="70px">
+ <el-form
+ :model="queryParams"
+ ref="queryForm"
+ :inline="true"
+ label-width="70px"
+ >
<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="handleQuery" />
- </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-form-item>
- </el-col>
- <el-col :span="7">
- <el-form-item label="鐢宠鏃ユ湡" prop="createTime">
- <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>
- </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-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-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="鎹愮尞鑰�" prop="name">
- <el-input v-model="queryParams.donorname" placeholder="璇疯緭鍏ユ崘鐚�呭鍚�" clearable size="small"
- @keyup.enter.native="handleQuery" />
+ <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-form-item>
</el-col>
- <el-col :span="4">
- <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 :span="5">
+ <el-form-item label="缁忓姙浜�" prop="name">
+ <el-input
+ v-model="queryParams.name"
+ placeholder="璇疯緭鍏ョ粡鍔炰汉"
+ clearable
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ </el-col>
+ </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="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-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="createTime" 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.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="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>
@@ -271,8 +413,20 @@
.then(() => {
//鏌ユ壘鏄惁瀛樺湪鐧昏瀹屾垚璁板綍
//鍒ゆ柇鏄惁瀛樺湪涓婃姤璁板綍
- row.recordstatus = 0;var currenttime = new Date();
- row.createTime = 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({
@@ -353,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(() => {
@@ -373,7 +527,7 @@
this.getList();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
})
- .catch(() => { });
+ .catch(() => {});
},
/** 鏌ヨ鍒楄〃 */
@@ -385,27 +539,41 @@
console.log(11);
this.loading = false;
this.donateconsolationfundList = response.rows;
+ this.total=response.total;
});
},
// 鎹愮尞鑰呭尰瀛︾粺璁℃墦鍗�
dayin2(id) {
getdownloadYX(id).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);
});
- }
});
},
@@ -435,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瀹炰緥锛�
@@ -443,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