| | |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="70px"> |
| | | <el-row align="left"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="姓名" prop="name"> |
| | | <el-input v-model="queryParams.name" placeholder="请输入姓名" clearable size="small" |
| | | <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-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
| | | v-hasPermi="['project:medicalfund:add']">创建申请单</el-button> |
| | | </el-col> |
| | | |
| | | <el-col :span="9"> |
| | | <el-form-item label="捐献编号"> |
| | | <el-input v-model="curCase.donorno" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <el-form-item label="姓名"> |
| | | <el-input v-model="curCase.name" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col> </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-table v-loading="loading" border :data="donateconsolationfundList"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="beneficiaryno" align="center" label="姓名" width="120" v-if="form.applytype != 3"> |
| | | <el-table-column prop="beneficiaryno" align="center" label="姓名" width="120" v-if="form.applytype=='1' || form.applytype=='2'"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" plain @click="ShowDetailDialog(scope, 'name')">{{ scope.row.beneficiaryname |
| | | }}</el-button> |
| | |
| | | data() { |
| | | //这里存放数据 |
| | | return { |
| | | currentApplyType: "3", |
| | | businesstype: "4", |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 导出遮罩层 |
| | |
| | | }, |
| | | |
| | | //捐献案例列表数据 |
| | | // donationCaseTableData:[], |
| | | donatebaseinfoList: [], |
| | | //当前选中捐献案例 |
| | | curCase: {}, |
| | | //是否显示费用申请弹窗 |
| | | dialogOpen: false, |
| | | // title: "", |
| | |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | /** 查询捐献人道慰问金列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | this.queryParams.params = {}; |
| | | if (null != this.daterangeReporttime && "" != this.daterangeReporttime) { |
| | | this.queryParams.params["beginReporttime"] = |
| | | this.daterangeReporttime[0]; |
| | | this.queryParams.params["endReporttime"] = this.daterangeReporttime[1]; |
| | | } |
| | | // this.queryParams.residencetown = this.$refs.areaSelect.getQu(); |
| | | listDonatebaseinfo(this.queryParams).then((response) => { |
| | | this.donatebaseinfoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | getBaseInfoList() { |
| | | this.loading = true; |
| | | listDonatebaseinfo(this.queryParams).then((response) => { |
| | | this.donatebaseinfoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.$router.push({ |
| | | path: "/finance/funddetail/", |
| | | query: { id: 0, pos: 2,routerparam:this.defaultperson } |
| | | path: "/finance/fundcontext/", |
| | | query: { id: 0, businessType: "4", operationtype: "add" } |
| | | }); |
| | | |
| | | this.istrue += 2; |
| | |
| | | this.title = "添加费用申请"; |
| | | this.dialogType = "edit"; |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.$router.push({ |
| | | path: "/finance/fundcontext/", |
| | | query: { id: row.id, businessType: "4", operationtype: "edit" } |
| | | }); |
| | | |
| | | |
| | | getfundList() { |
| | | this.loading = true; |
| | | this.isopen = 0; |
| | | this.reset(); |
| | | this.fundQueryParam.infoid = this.curCase.id; |
| | | this.queryParams.params = {}; |
| | | this.dialogType = "edit"; |
| | | this.dialogOpen = true; |
| | | this.title = "修改费用申请"; |
| | | |
| | | |
| | | const id = row.id || this.ids; |
| | | getFund(id).then((response) => { |
| | | this.form = response.data; |
| | | //附件处理 |
| | | this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : [] |
| | | |
| | | getownFundDetail(id).then(async (res) => { |
| | | this.fundDetails = res.data; |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | this.fundDetails[m].itemArr = []; |
| | | this.getItemArr(m, this.fundDetails[m]); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | /** 查看按钮操作 */ |
| | | handleDetail(row) { |
| | | this.$router.push({ |
| | | path: "/finance/fundcontext/", |
| | | query: { id: row.id, businessType: "4", operationtype: "detail" } |
| | | }); |
| | | |
| | | this.isopen = 0; |
| | | this.reset(); |
| | | this.queryParams.params = {}; |
| | | this.dialogOpen = true; |
| | | this.title = "查看费用申请"; |
| | | this.dialogType = "detail"; |
| | | const id = row.id || this.ids; |
| | | |
| | | getFund(id).then((response) => { |
| | | this.form = response.data; |
| | | let listFundflowparams = { |
| | | fundid: row.id, |
| | | fundtype: 4, |
| | | }; |
| | | //附件处理 |
| | | this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : [] |
| | | |
| | | listFundflow(listFundflowparams).then((res) => { |
| | | this.fundflowList = res.rows; |
| | | }); |
| | | getownFundDetail(id).then((res) => { |
| | | this.fundDetails = res.data; |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | this.fundDetails[m].itemArr = []; |
| | | this.getItemArr(m, this.fundDetails[m]); |
| | | this.fundDetails[m].fundblock = []; |
| | | this.fundDetails[m].fundblock.push({ |
| | | expense: this.fundDetails[m].expense, |
| | | expensedescribe: this.fundDetails[m].servicesscopename, |
| | | remark: this.fundDetails[m].servicesscope, |
| | | servicesscope: this.fundDetails[m].servicesscope, |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | 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(() => { }); |
| | | }, |
| | | |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | let formData = this.form; |
| | | for (let k = 0; k < this.fundDetails.length; k++) { |
| | | let tempDetail = this.fundDetails[k]; |
| | | if (tempDetail.itemid == null) { |
| | | this.$modal.msgWarning("请选择服务项目"); |
| | | return; |
| | | } |
| | | //判断单位 unitSel |
| | | // try { |
| | | // //获取服务项目明细 |
| | | // let unitIndex = this.bankaccountlist.findIndex( |
| | | // (item) => tempDetail.unitno == item.reportNo |
| | | // ); |
| | | // if (unitIndex > -1) { |
| | | // tempDetail.unitname = this.bankaccountlist[unitIndex].reportName; |
| | | // } else { |
| | | // tempDetail.unitname = tempDetail.unitno; |
| | | // } |
| | | // } catch { |
| | | // tempDetail.unitname = tempDetail.unitno; |
| | | // } |
| | | } |
| | | try { |
| | | this.form.unitname = this.$refs.orgSelecter.getOptionByValue( |
| | | this.form.unitno |
| | | ).organizationname; |
| | | } catch { |
| | | this.form.treatmenthospitalname = this.form.treatmenthospitalno; |
| | | } |
| | | this.loading = true; |
| | | //附件处理 |
| | | let list = this.fileList; |
| | | if (list.length > 0) { |
| | | this.form.annexbankcard = list.map(item => item.url).join(","); |
| | | } |
| | | |
| | | this.form.pretaxcost = parseFloat(this.form.amountrequested).toFixed( |
| | | 2 |
| | | ); |
| | | |
| | | if (this.form.id != null) { |
| | | updateFund(this.form).then((response) => { |
| | | this.dialogOpen = false; |
| | | this.getList(); |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.loading = false; |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | let tempData = this.fundDetails[m]; |
| | | let tempItemArr = tempData.itemArr; |
| | | tempData.fundid = formData.id; |
| | | //获取服务项目明细 |
| | | let itemIndex = tempItemArr.findIndex( |
| | | (item) => tempData.itemid == item.id |
| | | ); |
| | | if (itemIndex > -1) { |
| | | tempData.itemname = tempItemArr[itemIndex].itemName; |
| | | tempData.itemid = tempItemArr[itemIndex].id; |
| | | } |
| | | if (tempData.id > 0) { |
| | | updateFunddetail(tempData).then((response2) => { }); |
| | | } else { |
| | | addFunddetail(tempData).then((response2) => { }); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | //保存费用申请 |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | let tempData = this.fundDetails[m]; |
| | | let tempUtemArr = tempData.itemArr; |
| | | |
| | | //获取服务项目明细 |
| | | let itemIndex = tempUtemArr.findIndex( |
| | | (item) => tempData.itemid == item.id |
| | | ); |
| | | if (itemIndex > -1) { |
| | | tempData.itemname = tempUtemArr[itemIndex].itemName; |
| | | tempData.itemid = tempUtemArr[itemIndex].id; |
| | | } |
| | | //获取applytypename |
| | | let applytypeIndex = this.fundtypeArr.findIndex( |
| | | (item) => tempData.applytype == item.value |
| | | ); |
| | | if (applytypeIndex > -1) { |
| | | tempData.applytypename = this.fundtypeArr[applytypeIndex].label; |
| | | } |
| | | this.fundDetails[m] = tempData; |
| | | } |
| | | |
| | | this.form.serviceFunddetails = this.fundDetails; |
| | | addorupdateFund(this.form).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.loading = false; |
| | | } else { |
| | | this.$modal.msgError("新增失败:" + response.msg); |
| | | this.loading = false; |
| | | } |
| | | }); |
| | | |
| | | //关闭窗口 |
| | | this.loading = false; |
| | | this.dialogOpen = false; |
| | | this.getList(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 查询列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | this.queryParams.params = {}; |
| | | this.reset(); |
| | | listFund(this.fundQueryParam).then((response) => { |
| | | this.loading = false; |
| | | this.donateconsolationfundList = response.rows; |
| | | }); |
| | | }, |
| | | |
| | | getBaseInfoList() { |
| | | this.loading = true; |
| | | listDonatebaseinfo(this.queryParams).then((response) => { |
| | | this.donatebaseinfoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | // 取消按钮 |
| | | cancel() { |
| | |
| | | // }); |
| | | }, |
| | | |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | let formData = this.form; |
| | | for (let k = 0; k < this.fundDetails.length; k++) { |
| | | let tempDetail = this.fundDetails[k]; |
| | | if (tempDetail.itemid == null) { |
| | | this.$modal.msgWarning("请选择服务项目"); |
| | | return; |
| | | } |
| | | //判断单位 unitSel |
| | | // try { |
| | | // //获取服务项目明细 |
| | | // let unitIndex = this.bankaccountlist.findIndex( |
| | | // (item) => tempDetail.unitno == item.reportNo |
| | | // ); |
| | | // if (unitIndex > -1) { |
| | | // tempDetail.unitname = this.bankaccountlist[unitIndex].reportName; |
| | | // } else { |
| | | // tempDetail.unitname = tempDetail.unitno; |
| | | // } |
| | | // } catch { |
| | | // tempDetail.unitname = tempDetail.unitno; |
| | | // } |
| | | } |
| | | try { |
| | | this.form.unitname = this.$refs.orgSelecter.getOptionByValue( |
| | | this.form.unitno |
| | | ).organizationname; |
| | | } catch { |
| | | this.form.treatmenthospitalname = this.form.treatmenthospitalno; |
| | | } |
| | | this.loading = true; |
| | | //附件处理 |
| | | let list = this.fileList; |
| | | if (list.length > 0) { |
| | | this.form.annexbankcard = list.map(item => item.url).join(","); |
| | | } |
| | | |
| | | this.form.donorname = this.curCase.name; |
| | | this.form.pretaxcost = parseFloat(this.form.amountrequested).toFixed( |
| | | 2 |
| | | ); |
| | | |
| | | if (this.form.id != null) { |
| | | updateFund(this.form).then((response) => { |
| | | this.getfundList(); |
| | | |
| | | this.dialogOpen = false; |
| | | this.getList(); |
| | | this.selectDonotor(this.curCase); |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.loading = false; |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | let tempData = this.fundDetails[m]; |
| | | let tempItemArr = tempData.itemArr; |
| | | tempData.fundid = formData.id; |
| | | //获取服务项目明细 |
| | | let itemIndex = tempItemArr.findIndex( |
| | | (item) => tempData.itemid == item.id |
| | | ); |
| | | if (itemIndex > -1) { |
| | | tempData.itemname = tempItemArr[itemIndex].itemName; |
| | | tempData.itemid = tempItemArr[itemIndex].id; |
| | | } |
| | | if (tempData.id > 0) { |
| | | updateFunddetail(tempData).then((response2) => { }); |
| | | } else { |
| | | addFunddetail(tempData).then((response2) => { }); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | //保存费用申请 |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | let tempData = this.fundDetails[m]; |
| | | let tempUtemArr = tempData.itemArr; |
| | | |
| | | //获取服务项目明细 |
| | | let itemIndex = tempUtemArr.findIndex( |
| | | (item) => tempData.itemid == item.id |
| | | ); |
| | | if (itemIndex > -1) { |
| | | tempData.itemname = tempUtemArr[itemIndex].itemName; |
| | | tempData.itemid = tempUtemArr[itemIndex].id; |
| | | } |
| | | //获取applytypename |
| | | let applytypeIndex = this.fundtypeArr.findIndex( |
| | | (item) => tempData.applytype == item.value |
| | | ); |
| | | if (applytypeIndex > -1) { |
| | | tempData.applytypename = this.fundtypeArr[applytypeIndex].label; |
| | | } |
| | | this.fundDetails[m] = tempData; |
| | | } |
| | | |
| | | this.form.serviceFunddetails = this.fundDetails; |
| | | addorupdateFund(this.form).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.loading = false; |
| | | } else { |
| | | this.$modal.msgError("新增失败:" + response.msg); |
| | | this.loading = false; |
| | | } |
| | | }); |
| | | |
| | | //关闭窗口 |
| | | this.loading = false; |
| | | this.dialogOpen = false; |
| | | this.getList(); |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | getBankAccount() { |
| | | //获取银行账号列表,类型是机构 |
| | |
| | | }); |
| | | }, |
| | | |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.$router.push({ |
| | | path: "/finance/funddetail/", |
| | | query: { id: row.id, pos: 2 } |
| | | }); |
| | | |
| | | this.isopen = 0; |
| | | this.reset(); |
| | | this.queryParams.params = {}; |
| | | this.dialogType = "edit"; |
| | | this.dialogOpen = true; |
| | | this.title = "修改费用申请"; |
| | | |
| | | |
| | | const id = row.id || this.ids; |
| | | getFund(id).then((response) => { |
| | | this.form = response.data; |
| | | this.form.name = this.curCase.name; |
| | | //附件处理 |
| | | this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : [] |
| | | |
| | | getownFundDetail(id).then(async (res) => { |
| | | this.fundDetails = res.data; |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | this.fundDetails[m].itemArr = []; |
| | | this.getItemArr(m, this.fundDetails[m]); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | /** 查看按钮操作 */ |
| | | handleDetail(row) { |
| | | this.$router.push({ |
| | | path: "/finance/funddetail/", |
| | | query: { id: row.id, pos: 2 } |
| | | }); |
| | | |
| | | this.isopen = 0; |
| | | this.reset(); |
| | | this.queryParams.params = {}; |
| | | this.form.donorno = this.curCase.donorno; |
| | | this.form.infoid = this.curCase.id; |
| | | this.dialogOpen = true; |
| | | this.title = "查看费用申请"; |
| | | this.dialogType = "detail"; |
| | | const id = row.id || this.ids; |
| | | |
| | | getFund(id).then((response) => { |
| | | this.form = response.data; |
| | | this.form.name = this.curCase.name; |
| | | let listFundflowparams = { |
| | | fundid: row.id, |
| | | fundtype: 2, |
| | | }; |
| | | //附件处理 |
| | | this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : [] |
| | | |
| | | listFundflow(listFundflowparams).then((res) => { |
| | | this.fundflowList = res.rows; |
| | | }); |
| | | getownFundDetail(id).then((res) => { |
| | | this.fundDetails = res.data; |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | this.fundDetails[m].itemArr = []; |
| | | this.getItemArr(m, this.fundDetails[m]); |
| | | this.fundDetails[m].fundblock = []; |
| | | this.fundDetails[m].fundblock.push({ |
| | | expense: this.fundDetails[m].expense, |
| | | expensedescribe: this.fundDetails[m].servicesscopename, |
| | | remark: this.fundDetails[m].servicesscope, |
| | | servicesscope: this.fundDetails[m].servicesscope, |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | 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.getfundList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | |
| | | deleteRows(row, index, rows) { |
| | | this.$confirm("是否确认删除?", "提示", { |
| | |
| | | |
| | | //获取费用类型 |
| | | getCurFundType() { |
| | | getFundTypeAll(this.currentApplyType).then((res) => { |
| | | getFundTypeAll(this.businesstype).then((res) => { |
| | | let dataList = res.data; |
| | | this.fundtypeArrAll = dataList; |
| | | this.fundtypeArr = []; |
| | |
| | | |
| | | //生命周期 - 创建完成(可以访问当前this实例) |
| | | created() { |
| | | this.getList(); |
| | | this.getBaseInfoList(); |
| | | |
| | | this.getCurFundType(); |
| | | this.getlistUser(); |
| | | // this.getUnitList(); |
| | | this.getUnitList(); |
| | | this.getList(); |
| | | }, |
| | | |
| | | //生命周期 - 挂载完成(可以访问DOM元素) |