<!-- -->
|
<template>
|
<div class="app-container">
|
<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-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-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-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="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="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>
|
<!-- 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-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">
|
<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="审核状态" width="150" align="center" prop="recordstatus">
|
<template slot-scope="scope">
|
<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="绩效类型" width="150" align="center" prop="performancetype">
|
<template slot-scope="scope">
|
<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">
|
<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 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>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
</template>
|
|
<script>
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
//例如:import 《组件名称》 from '《组件路径》';
|
import {
|
onelistFund,
|
listFund,
|
getFund,
|
delFund,
|
addFund,
|
updateFund,
|
getdownloadYX,
|
getdownloadBX
|
} from "@/api/project/fund";
|
import {
|
delFunddetail,
|
addFunddetail,
|
getownFundDetail
|
} from "@/api/project/funddetail";
|
|
import Li_area_select from "@/components/Address";
|
import OrgSelecter from "@/views/project/components/orgselect";
|
import { getToken } from "@/utils/auth";
|
|
export default {
|
//import引入的组件需要注入到对象中才能使用
|
components: {
|
Li_area_select,
|
OrgSelecter
|
},
|
name: "fundApply",
|
dicts: [
|
"sys_recordstatus",
|
"sys_OrganizationType",
|
"sys_DonationStatus",
|
"sys_depositbank",
|
"sys_FamilyRelation",
|
"sys_IDType",
|
"sys_ConsolationType",
|
"sys_fund_type",
|
"sys_finsubject",
|
"sys_financeitemtype",
|
"sys_expensetype",
|
"sys_performance_type",
|
"sys_stage_type"
|
],
|
data() {
|
//这里存放数据
|
return {
|
businesstype: "4",
|
// 遮罩层
|
loading: true,
|
// 导出遮罩层
|
exportLoading: false,
|
total: 0,
|
queryParams: {
|
organizationname: null,
|
organizationtype: null,
|
pageNum: 1,
|
pageSize: 10,
|
name: null,
|
idcardno: null,
|
residenceprovince: null,
|
residencecity: null,
|
residencetown: null,
|
recordstate: null,
|
treatmenthospitalname: null,
|
donorno: null,
|
reportername: null,
|
reporttime: null
|
},
|
checkFlagOptions: [
|
{
|
value: 0,
|
label: "已审批"
|
},
|
{
|
value: 1,
|
label: "待审批"
|
},
|
{
|
value: 2,
|
label: "全部"
|
}
|
],
|
fundQueryParam: {
|
infoid: null,
|
applytype: "5",
|
createBy: null,
|
organizationname: null,
|
organizationtype: null,
|
pageNum: 1,
|
pageSize: 10,
|
name: null,
|
idcardno: null,
|
residenceprovince: null,
|
residencecity: null,
|
residencetown: null,
|
recordstate: null,
|
treatmenthospitalname: null,
|
donorno: null,
|
reportername: null,
|
reporttime: null
|
},
|
// 表单参数
|
form: {},
|
//捐献案例列表数据
|
donatebaseinfoList: [],
|
//是否显示费用申请弹窗
|
dialogOpen: false,
|
//费用申请表单title
|
applyFormTitle: "",
|
|
// 捐献人道慰问金表格数据
|
donateconsolationfundList: [],
|
|
//明细记录
|
fundDetails: [],
|
|
// 弹出层标题
|
title: "",
|
itemArr: [],
|
//用户
|
userlist: [],
|
//银行账号
|
bankaccountlist: [],
|
//机构单位
|
unitList: [],
|
//费用类型数组
|
fundtypeArr: [],
|
defaultperson: {},
|
fundblock: [],
|
fundtypeArrAll: [],
|
dialogType: "edit",
|
|
detailInfoDialogShow: false,
|
detailInfoDialogShowType: "",
|
funddetailForm: {
|
beneficiaryname: null,
|
beneficiaryno: null,
|
unitno: null,
|
unitname: null,
|
index: null
|
},
|
|
//附件列表
|
fileList: [],
|
//上传附件路径
|
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload",
|
headers: {
|
Authorization: "Bearer " + getToken()
|
}
|
};
|
},
|
//监听属性 类似于data概念
|
computed: {},
|
//监控data中的数据变化
|
watch: {},
|
//方法集合
|
methods: {
|
handleup(row) {
|
console.log(row);
|
this.$confirm("是否确认将登记记录上报?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning"
|
})
|
.then(() => {
|
//查找是否存在登记完成记录
|
//判断是否存在上报记录
|
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({
|
type: "success",
|
message: "申请成功"
|
});
|
} else {
|
this.$message({
|
type: "error",
|
message: "申请失败"
|
});
|
}
|
this.loading = false;
|
});
|
})
|
.catch(() => {
|
this.$message({
|
type: "info",
|
message: "已取消申请"
|
});
|
});
|
},
|
/** 搜索按钮操作 */
|
handleQuery() {
|
this.queryParams.pageNum = 1;
|
this.getList();
|
},
|
/** 重置按钮操作 */
|
resetQuery() {
|
this.daterangeReporttime = [];
|
this.resetForm("queryForm");
|
this.handleQuery();
|
},
|
|
/** 新增按钮操作 */
|
handleAdd() {
|
this.$router.push({
|
path: "/finance/performancedetails/",
|
query: { id: 0, businessType: "5", operationType: "add" }
|
});
|
},
|
/** 修改按钮操作 */
|
handleUpdate(row) {
|
this.$router.push({
|
path: "/finance/performancedetails/",
|
query: { id: row.id, businessType: "5", operationType: "update" }
|
});
|
},
|
/** 复制按钮操作 */
|
duplicationfn(row) {
|
this.$router.push({
|
path: "/finance/performancedetails/",
|
query: {
|
id: row.id,
|
businessType: "5",
|
operationType: "copy"
|
}
|
});
|
},
|
|
/** 查看按钮操作 */
|
handleDetail(row) {
|
this.$router.push({
|
path: "/finance/performancedetails/",
|
query: { id: row.id, businessType: "5", operationType: "detail" }
|
});
|
},
|
/** 导出按钮操作 */
|
handleExport() {
|
const queryParams = this.queryParams;
|
this.$modal
|
.confirm("是否确认导出所有报销申请数据项?")
|
.then(() => {
|
this.exportLoading = true;
|
return exportReimbursement(queryParams);
|
})
|
.then(response => {
|
this.$download.name(response.msg);
|
this.exportLoading = false;
|
})
|
.catch(() => { });
|
},
|
|
handleDelete(row) {
|
const ids = row.id || this.ids;
|
this.$modal
|
.confirm("是否确认删除该记录?")
|
.then(function () {
|
return delFund(ids);
|
})
|
.then(() => {
|
getownFundDetail(ids).then(res => {
|
let listdetails = res.data;
|
for (let i = 0; i < listdetails.length; i++) {
|
delFunddetail(listdetails[i].id);
|
}
|
});
|
this.getList();
|
this.$modal.msgSuccess("删除成功");
|
})
|
.catch(() => { });
|
},
|
|
/** 查询列表 */
|
getList() {
|
this.loading = true;
|
this.queryParams.params = {};
|
console.log(21);
|
listFund(this.fundQueryParam).then(response => {
|
console.log(11);
|
this.loading = false;
|
this.donateconsolationfundList = response.rows;
|
});
|
},
|
// 捐献者医学统计打印
|
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"
|
});
|
}
|
});
|
},
|
|
//汇总打印
|
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"
|
});
|
}
|
});
|
},
|
// 下载按钮
|
mixExport(id) {
|
this.dayin2(id);
|
//this.totaldayin(id);
|
}
|
},
|
//生命周期 - 创建完成(可以访问当前this实例)
|
created() {
|
this.getList();
|
},
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
mounted() { },
|
|
beforeCreate() { }, //生命周期 - 创建之前
|
beforeMount() { }, //生命周期 - 挂载之前
|
beforeUpdate() { }, //生命周期 - 更新之前
|
updated() { }, //生命周期 - 更新之后
|
beforeDestroy() { }, //生命周期 - 销毁之前
|
destroyed() { }, //生命周期 - 销毁完成
|
activated() { } //如果页面有keep-alive缓存功能,这个函数会触发
|
};
|
</script>
|
<style scoped>
|
/* @import url(); 引入公共css类 */
|
</style>
|