| | |
| | | <el-card shadow="naver"> |
| | | <el-form ref="infoform" label-width="100px"> |
| | | <el-row :gutter="4" align="right" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
| | | v-hasPermi="['project:ethicalfund:add']">伦理审查专家费申请</el-button> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <el-form-item label="捐献编号"> |
| | | <el-input v-model="curCase.donorno" :disabled="true"></el-input> |
| | |
| | | <el-input v-model="curCase.name" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col> </el-col> |
| | | </el-row> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
| | | v-hasPermi="['project:ethicalfund:add']">新增申请单</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-table v-loading="loading" border :data="donateconsolationfundList"> |
| | |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="申请附件:" align="left" prop="annexbankcard"> |
| | | <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileList" multiple :limit="20" |
| | | :headers="headers" :on-success="(response, file, fileList) => |
| | | <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileList" multiple |
| | | :limit="20" :headers="headers" :on-success="(response, file, fileList) => |
| | | uploadSccess(response, file, fileList) |
| | | " :on-preview="downFile" :disabled='dialogType == "detail"' :on-error="handleUploadError" |
| | | :on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf"> |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | |
| | | //监听属性 类似于data概念 |
| | | computed: {}, |
| | | //监控data中的数据变化 |
| | | watch: {}, |
| | | //方法集合 |
| | | |
| | | //方法集合 |
| | | methods: { |
| | | ShowDetailDialog(spoce, showType) { |
| | | this.funddetailForm.index = spoce.$index; |
| | | this.funddetailForm.beneficiaryno = spoce.row.beneficiaryno; |
| | | this.funddetailForm.beneficiaryname = spoce.row.beneficiaryname; |
| | | this.funddetailForm.unitno = spoce.row.unitno; |
| | | this.funddetailForm.unitname = spoce.row.unitname; |
| | | this.detailInfoDialogShow = true; |
| | | this.detailInfoDialogShowType = showType; |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | ConfirmDetailDialog() { |
| | | let tempIndex = this.funddetailForm.index; |
| | | let tempName = this.funddetailForm.beneficiaryname; |
| | | let tempUnitname = this.funddetailForm.unitname; |
| | | let singleDetail = this.fundDetailArr[tempIndex]; |
| | | if (this.detailInfoDialogShowType == "name") { |
| | | this.personlist.map((res) => { |
| | | if (tempName == res.username) { |
| | | singleDetail.beneficiaryno = res.userno; |
| | | singleDetail.beneficiaryname = res.username; |
| | | singleDetail.bankcardno = res.bankcardno; |
| | | singleDetail.branchbankname = res.branchbankname; |
| | | singleDetail.depositbank = res.depositbank; |
| | | singleDetail.idcardno = res.idcardno; |
| | | singleDetail.phone = res.telephone; |
| | | singleDetail.title = res.title; |
| | | singleDetail.unitname = res.unitname; |
| | | singleDetail.unitno = parseInt(res.unitno); |
| | | } else { |
| | | singleDetail.beneficiaryname = tempName; |
| | | singleDetail.beneficiaryno = tempName; |
| | | |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.daterangeReporttime = []; |
| | | |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | if (this.curCase.id) { |
| | | this.$router.push({ |
| | | path: "/finance/applyDetail/", |
| | | query: { |
| | | id: 0, |
| | | businessType: "2", |
| | | operationType: "add", |
| | | curCase: this.curCase |
| | | } |
| | | }); |
| | | } else if (this.detailInfoDialogShowType == "unit") { |
| | | singleDetail.unitno = this.funddetailForm.unitno; |
| | | try { |
| | | let unitIndex = this.unitList.findIndex( |
| | | (item) => singleDetail.unitno == item.organizationid |
| | | ); |
| | | if (unitIndex > -1) { |
| | | singleDetail.unitname = this.unitList[unitIndex].organizationname; |
| | | } else { |
| | | singleDetail.unitname = singleDetail.unitno; |
| | | } |
| | | } catch { |
| | | singleDetail.unitname = singleDetail.unitno; |
| | | } |
| | | } else { |
| | | const h = this.$createElement; |
| | | this.$message({ |
| | | message: h("p", null, [h("span", null, "请在左边的捐献案例表选择需要操作的案例!")]), |
| | | }); |
| | | } |
| | | this.fundDetailArr[tempIndex] = singleDetail; |
| | | this.detailInfoDialogShow = false; |
| | | return; |
| | | |
| | | |
| | | if (this.curCase.id) { |
| | | this.istrue += 2; |
| | | this.reset(); |
| | | this.dialogOpen = true; |
| | | this.title = "添加费用申请"; |
| | | this.dialogType = "edit"; |
| | | this.queryParams.params = {}; |
| | | |
| | | this.form.infoid = this.curCase.id; |
| | | this.form.donorno = this.curCase.donorno; |
| | | this.form.donorname = this.curCase.name; |
| | | this.form.username = this.defaultperson.nickName; |
| | | this.form.userno = this.defaultperson.userName; |
| | | |
| | | this.form.deptmentname = this.defaultperson.dept.deptName; |
| | | this.form.deptmentno = this.defaultperson.dept.deptId; |
| | | this.form.managername = this.defaultperson.dept.leader; |
| | | // this.form.createTime = nowdate; |
| | | //this.open = true; |
| | | //this.initFundApplyForm(); |
| | | this.fundDetailArr = []; |
| | | this.fundflowList = []; |
| | | this.addRow(); |
| | | } else { |
| | | const h = this.$createElement; |
| | | this.$message({ |
| | | message: h("p", null, [h("span", null, "请先选择左方捐献案例 ")]), |
| | | }); |
| | | } |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.$router.push({ |
| | | path: "/finance/applyDetail/", |
| | | query: { |
| | | id: row.id, |
| | | businessType: "2", |
| | | operationType: "update", |
| | | curCase: this.curCase |
| | | } |
| | | }); |
| | | return; |
| | | |
| | | this.isopen = 0; |
| | | this.reset(); |
| | | this.queryParams.params = {}; |
| | | this.dialogOpen = true; |
| | | this.title = "修改费用申请"; |
| | | this.dialogType = "edit"; |
| | | |
| | | 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.fundDetailArr = res.data; |
| | | for (let m = 0; m < this.fundDetailArr.length; m++) { |
| | | this.fundDetailArr[m].itemArr = []; |
| | | this.getItemArr(m, this.fundDetailArr[m]); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | /** 查看按钮操作 */ |
| | | handleDetail(row) { |
| | | this.$router.push({ |
| | | path: "/finance/applyDetail/", |
| | | query: { |
| | | id: row.id, |
| | | businessType: "2", |
| | | operationType: "detail", |
| | | curCase: this.curCase |
| | | } |
| | | }); |
| | | return; |
| | | |
| | | 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: 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.fundDetailArr = res.data; |
| | | for (let m = 0; m < this.fundDetailArr.length; m++) { |
| | | this.fundDetailArr[m].itemArr = []; |
| | | this.getItemArr(m, this.fundDetailArr[m]); |
| | | this.fundDetailArr[m].fundblock = []; |
| | | this.fundDetailArr[m].fundblock.push({ |
| | | expense: this.fundDetailArr[m].expense, |
| | | expensedescribe: this.fundDetailArr[m].servicesscopename, |
| | | remark: this.fundDetailArr[m].servicesscope, |
| | | servicesscope: this.fundDetailArr[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(() => { }); |
| | | }, |
| | | /** 上报按钮操作 */ |
| | | handleup(row) { |
| | | this.$confirm("是否确认将登记记录上报?", "提示", { |
| | | confirmButtonText: "确定", |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | /** 导出按钮操作 */ |
| | | 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(() => { }); |
| | | }, |
| | | |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | let formData = this.form; |
| | | let totalPreTaxAmount = 0.0; |
| | | let totalAfterTaxAmount = 0.0; |
| | | let totalAmount = 0.0; |
| | | for (let k = 0; k < this.fundDetailArr.length; k++) { |
| | | let tempDetail = this.fundDetailArr[k]; |
| | | if (tempDetail.itemid == null) { |
| | | this.$modal.msgWarning("请选择服务项目"); |
| | | return; |
| | | } |
| | | //判断单位 unitSel |
| | | // try { |
| | | // //获取服务项目明细 |
| | | // let unitIndex = this.unitList.findIndex( |
| | | // (item) => tempDetail.unitno == item.organizationid |
| | | // ); |
| | | // if (unitIndex > -1) { |
| | | // tempDetail.unitname = this.unitList[unitIndex].organizationname; |
| | | // } |
| | | // else{ |
| | | // tempDetail.unitname = tempDetail.unitno; |
| | | // } |
| | | // } catch { |
| | | // tempDetail.unitname = tempDetail.unitno; |
| | | // } |
| | | if (!isNaN(parseFloat(tempDetail.amount))) { |
| | | totalPreTaxAmount += parseFloat(tempDetail.amount); |
| | | totalAmount += parseFloat(tempDetail.amount); |
| | | } |
| | | if (!isNaN(parseFloat(tempDetail.taxedamount))) { |
| | | totalAfterTaxAmount += parseFloat(tempDetail.taxedamount); |
| | | totalAmount += parseFloat(tempDetail.taxedamount); |
| | | } |
| | | } |
| | | try { |
| | | this.form.unitname = this.$refs.orgSelecter.getOptionByValue( |
| | | this.form.unitno |
| | | ).organizationname; |
| | | } catch { |
| | | this.form.treatmenthospitalname = this.form.treatmenthospitalno; |
| | | } |
| | | this.form.pretaxcost = parseFloat(totalPreTaxAmount).toFixed(2); |
| | | this.form.taxedcost = parseFloat(totalAfterTaxAmount).toFixed(2); |
| | | this.form.amountrequested = totalAmount.toFixed(2); |
| | | |
| | | this.loading = true; |
| | | //附件处理 |
| | | let list = this.fileList; |
| | | if (list.length > 0) { |
| | | this.form.annexbankcard = list.map(item => item.url).join(","); |
| | | } |
| | | |
| | | 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.fundDetailArr.length; m++) { |
| | | let tempData = this.fundDetailArr[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.fundDetailArr.length; m++) { |
| | | let tempData = this.fundDetailArr[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.fundDetailArr[m] = tempData; |
| | | } |
| | | |
| | | this.form.serviceFunddetails = this.fundDetailArr; |
| | | addorupdateFund(this.form).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.loading = false; |
| | | this.selectDonotor(this.curCase); |
| | | } else { |
| | | this.$modal.msgError("新增失败:" + response.msg); |
| | | this.loading = false; |
| | | } |
| | | }); |
| | | this.dialogOpen = false; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 取消按钮 */ |
| | | cancel() { |
| | | this.dialogOpen = false; |
| | | this.reset(); |
| | | }, |
| | | |
| | | |
| | | //获取所有用户列表 |
| | | getUsermsg() { |
| | | getUserProfile().then((response) => { |
| | | this.defaultperson = response.data; |
| | | this.standardlevel = response.data.standardlevel; |
| | | }); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.daterangeReporttime = []; |
| | | |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | /** 查询捐献人道慰问金列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | }); |
| | | }, |
| | | |
| | | //获取捐献案例列表 |
| | | getBaseInfoList() { |
| | | this.loading = true; |
| | | listDonatebaseinfo(this.queryParams).then((response) => { |
| | |
| | | }); |
| | | }, |
| | | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | if (this.curCase.id) { |
| | | this.istrue += 2; |
| | | this.reset(); |
| | | this.dialogOpen = true; |
| | | this.title = "添加费用申请"; |
| | | this.dialogType = "edit"; |
| | | this.queryParams.params = {}; |
| | | |
| | | this.form.infoid = this.curCase.id; |
| | | this.form.donorno = this.curCase.donorno; |
| | | this.form.donorname = this.curCase.name; |
| | | this.form.username = this.defaultperson.nickName; |
| | | this.form.userno = this.defaultperson.userName; |
| | | |
| | | this.form.deptmentname = this.defaultperson.dept.deptName; |
| | | this.form.deptmentno = this.defaultperson.dept.deptId; |
| | | this.form.managername = this.defaultperson.dept.leader; |
| | | // this.form.createTime = nowdate; |
| | | //this.open = true; |
| | | //this.initFundApplyForm(); |
| | | this.fundDetailArr = []; |
| | | this.fundflowList = []; |
| | | this.addRow(); |
| | | } else { |
| | | const h = this.$createElement; |
| | | this.$message({ |
| | | message: h("p", null, [h("span", null, "请先选择左方捐献案例 ")]), |
| | | }); |
| | | } |
| | | }, |
| | | //点击捐献案例列表触发方法 |
| | | selectDonotor(row, column, event) { |
| | | this.curCase = row; |
| | | this.getfundList(); |
| | | }, |
| | | |
| | | //获取案例专家费用申请单 |
| | | getfundList() { |
| | | this.loading = true; |
| | | this.reset(); |
| | |
| | | row.servicesscope = null; |
| | | row.servicesscopename = ""; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.dialogOpen = false; |
| | | this.reset(); |
| | | }, |
| | | |
| | | // 表单重置 |
| | |
| | | // }); |
| | | }, |
| | | |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | let formData = this.form; |
| | | let totalPreTaxAmount = 0.0; |
| | | let totalAfterTaxAmount = 0.0; |
| | | let totalAmount = 0.0; |
| | | for (let k = 0; k < this.fundDetailArr.length; k++) { |
| | | let tempDetail = this.fundDetailArr[k]; |
| | | if (tempDetail.itemid == null) { |
| | | this.$modal.msgWarning("请选择服务项目"); |
| | | return; |
| | | } |
| | | //判断单位 unitSel |
| | | // try { |
| | | // //获取服务项目明细 |
| | | // let unitIndex = this.unitList.findIndex( |
| | | // (item) => tempDetail.unitno == item.organizationid |
| | | // ); |
| | | // if (unitIndex > -1) { |
| | | // tempDetail.unitname = this.unitList[unitIndex].organizationname; |
| | | // } |
| | | // else{ |
| | | // tempDetail.unitname = tempDetail.unitno; |
| | | // } |
| | | // } catch { |
| | | // tempDetail.unitname = tempDetail.unitno; |
| | | // } |
| | | if (!isNaN(parseFloat(tempDetail.amount))) { |
| | | totalPreTaxAmount += parseFloat(tempDetail.amount); |
| | | totalAmount += parseFloat(tempDetail.amount); |
| | | } |
| | | if (!isNaN(parseFloat(tempDetail.taxedamount))) { |
| | | totalAfterTaxAmount += parseFloat(tempDetail.taxedamount); |
| | | totalAmount += parseFloat(tempDetail.taxedamount); |
| | | } |
| | | } |
| | | try { |
| | | this.form.unitname = this.$refs.orgSelecter.getOptionByValue( |
| | | this.form.unitno |
| | | ).organizationname; |
| | | } catch { |
| | | this.form.treatmenthospitalname = this.form.treatmenthospitalno; |
| | | } |
| | | this.form.pretaxcost = parseFloat(totalPreTaxAmount).toFixed(2); |
| | | this.form.taxedcost = parseFloat(totalAfterTaxAmount).toFixed(2); |
| | | this.form.amountrequested = totalAmount.toFixed(2); |
| | | |
| | | this.loading = true; |
| | | //附件处理 |
| | | let list = this.fileList; |
| | | if (list.length > 0) { |
| | | this.form.annexbankcard = list.map(item => item.url).join(","); |
| | | } |
| | | |
| | | 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.fundDetailArr.length; m++) { |
| | | let tempData = this.fundDetailArr[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.fundDetailArr.length; m++) { |
| | | let tempData = this.fundDetailArr[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.fundDetailArr[m] = tempData; |
| | | } |
| | | |
| | | this.form.serviceFunddetails = this.fundDetailArr; |
| | | addorupdateFund(this.form).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.loading = false; |
| | | this.selectDonotor(this.curCase); |
| | | } else { |
| | | this.$modal.msgError("新增失败:" + response.msg); |
| | | this.loading = false; |
| | | } |
| | | }); |
| | | this.dialogOpen = false; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | selectremark(row) { |
| | | this.fundblock.forEach((item, i) => { |
| | | if (item.expensedescribe === row.servicesscopename) { |
| | |
| | | }); |
| | | }, |
| | | |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.isopen = 0; |
| | | this.reset(); |
| | | this.queryParams.params = {}; |
| | | this.dialogOpen = true; |
| | | this.title = "修改费用申请"; |
| | | this.dialogType = "edit"; |
| | | |
| | | 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.fundDetailArr = res.data; |
| | | for (let m = 0; m < this.fundDetailArr.length; m++) { |
| | | this.fundDetailArr[m].itemArr = []; |
| | | this.getItemArr(m, this.fundDetailArr[m]); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | /** 查看按钮操作 */ |
| | | handleDetail(row) { |
| | | 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: 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.fundDetailArr = res.data; |
| | | for (let m = 0; m < this.fundDetailArr.length; m++) { |
| | | this.fundDetailArr[m].itemArr = []; |
| | | this.getItemArr(m, this.fundDetailArr[m]); |
| | | this.fundDetailArr[m].fundblock = []; |
| | | this.fundDetailArr[m].fundblock.push({ |
| | | expense: this.fundDetailArr[m].expense, |
| | | expensedescribe: this.fundDetailArr[m].servicesscopename, |
| | | remark: this.fundDetailArr[m].servicesscope, |
| | | servicesscope: this.fundDetailArr[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("是否确认删除?", "提示", { |
| | |
| | | }); |
| | | }, |
| | | |
| | | //汇总打印 |
| | | //下载打印 |
| | | totaldayin(e) { |
| | | // const id =this.row.id |
| | | getdownloadBX(e).then((res) => { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | selectReporters() { |
| | | //专家人员列表 |
| | | let arr = ["zzry"]; |
| | |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | getlistExternalperson() { |
| | | listExternalperson().then((res) => { |
| | | this.personlist = res.rows; |
| | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | getUnitList() { |
| | | listOrganization(3).then((response) => { |
| | | for (let i = 0; i < response.rows.length; i++) { |
| | | this.unitList.push({ |
| | | organizationid: response.rows[i].organizationid, |
| | | organizationname: response.rows[i].organizationname, |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | SearchItem(val, scope) { |
| | | let result = []; |
| | | if (val != "") { |
| | |
| | | //this.$set(this.fundDetailArr, rowindex, row); |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | getUnitList() { |
| | | listOrganization(3).then((response) => { |
| | | for (let i = 0; i < response.rows.length; i++) { |
| | | this.unitList.push({ |
| | | organizationid: response.rows[i].organizationid, |
| | | organizationname: response.rows[i].organizationname, |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | addAlls() { |
| | |
| | | a.href = url; |
| | | a.dispatchEvent(event); |
| | | }, |
| | | |
| | | ShowDetailDialog(spoce, showType) { |
| | | this.funddetailForm.index = spoce.$index; |
| | | this.funddetailForm.beneficiaryno = spoce.row.beneficiaryno; |
| | | this.funddetailForm.beneficiaryname = spoce.row.beneficiaryname; |
| | | this.funddetailForm.unitno = spoce.row.unitno; |
| | | this.funddetailForm.unitname = spoce.row.unitname; |
| | | this.detailInfoDialogShow = true; |
| | | this.detailInfoDialogShowType = showType; |
| | | }, |
| | | ConfirmDetailDialog() { |
| | | let tempIndex = this.funddetailForm.index; |
| | | let tempName = this.funddetailForm.beneficiaryname; |
| | | let tempUnitname = this.funddetailForm.unitname; |
| | | let singleDetail = this.fundDetailArr[tempIndex]; |
| | | if (this.detailInfoDialogShowType == "name") { |
| | | this.personlist.map((res) => { |
| | | if (tempName == res.username) { |
| | | singleDetail.beneficiaryno = res.userno; |
| | | singleDetail.beneficiaryname = res.username; |
| | | singleDetail.bankcardno = res.bankcardno; |
| | | singleDetail.branchbankname = res.branchbankname; |
| | | singleDetail.depositbank = res.depositbank; |
| | | singleDetail.idcardno = res.idcardno; |
| | | singleDetail.phone = res.telephone; |
| | | singleDetail.title = res.title; |
| | | singleDetail.unitname = res.unitname; |
| | | singleDetail.unitno = parseInt(res.unitno); |
| | | } else { |
| | | singleDetail.beneficiaryname = tempName; |
| | | singleDetail.beneficiaryno = tempName; |
| | | } |
| | | }); |
| | | } else if (this.detailInfoDialogShowType == "unit") { |
| | | singleDetail.unitno = this.funddetailForm.unitno; |
| | | try { |
| | | let unitIndex = this.unitList.findIndex( |
| | | (item) => singleDetail.unitno == item.organizationid |
| | | ); |
| | | if (unitIndex > -1) { |
| | | singleDetail.unitname = this.unitList[unitIndex].organizationname; |
| | | } else { |
| | | singleDetail.unitname = singleDetail.unitno; |
| | | } |
| | | } catch { |
| | | singleDetail.unitname = singleDetail.unitno; |
| | | } |
| | | } |
| | | this.fundDetailArr[tempIndex] = singleDetail; |
| | | this.detailInfoDialogShow = false; |
| | | }, |
| | | }, |
| | | |
| | | //生命周期 - 创建完成(可以访问当前this实例) |
| | | created() { |
| | | this.getUnitList(); |
| | |
| | | beforeDestroy() { }, //生命周期 - 销毁之前 |
| | | destroyed() { }, //生命周期 - 销毁完成 |
| | | activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发 |
| | | |
| | | }; |
| | | </script> |
| | | <style scoped> |