| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-form-item label="应收金额" prop="chargeamount"> |
| | | <el-input v-model="form.chargeamount" placeholder="请输入应收金额" :disabled="true" /> |
| | | <el-col :span="10"> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | |
| | | <el-input v-model="form.chargeamounted" placeholder="请输入实收金额" :disabled="true" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请输入备注" /> |
| | | <el-col :span="5"> |
| | | <el-form-item label="应收金额" prop="chargeamount"> |
| | | <el-input v-model="form.chargeamount" placeholder="请输入应收金额" :disabled="true" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="移植时间"> |
| | | </el-date-picker> </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" align="center" label="备注"> |
| | | <el-table-column prop="organchargedesc" align="center" label="备注"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.remark" placeholder="备注" /> |
| | | <el-input v-model="scope.row.organchargedesc" placeholder="备注" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import Treeselect from "@riophae/vue-treeselect"; |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | | import { regionDataPlus, CodeToText } from "element-china-area-data"; |
| | | import { getDonorcharge, addDonorcharge, updateDonorcharge, listDonorchargeorgan, getDonorchargeorgan, delDonorchargeorgan, addDonorchargeorgan, updateDonorchargeorgan, exportDonorchargeorgan } from "@/api/project/donorcharge"; |
| | | import { listDonatebaseinfo } from "@/api/project/donatebaseinfo"; |
| | | import { getDonorcharge, addDonorcharge, updateDonorcharge } from "@/api/project/donorcharge"; |
| | | import { listDonorchargeorgan, delDonorchargeorgan, saveDonorchargeorgan } from "@/api/project/donorcharge"; |
| | | import { listDonatecomporgan } from "@/api/project/donatecompletioninfo"; |
| | | import { listOrgancharge } from "@/api/project/organcharge"; |
| | | import Li_area_select from "@/components/Address"; |
| | |
| | | userprofile: {}, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 列表参数 |
| | | table: {}, |
| | | reimbursementList: [], |
| | | |
| | | // 表单校验 |
| | |
| | | this.$refs["table"].doLayout(); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | destroyed() { |
| | | window.removeEventListener("beforeunload", e => this.beforeunloadFn(e)); |
| | | }, //生命周期 - 销毁完成 |
| | |
| | | this.operationType = this.$route.query.operation; |
| | | this.curId = this.$route.query.id; |
| | | this.curCase = this.$route.query.data; |
| | | console.log("this.$route.query",this.$route.query); |
| | | console.log("this.$route.query", this.$route.query); |
| | | |
| | | if (this.operationType == "add") { |
| | | this.title = "新建案例器官费用表"; |
| | |
| | | handleUpdate() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "修改捐献案例器官费用表"; |
| | | |
| | | getDonorcharge(this.curId).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "修改捐献案例器官费用表"; |
| | | console.log("getDonorcharge", response); |
| | | |
| | | //器官费用信息 |
| | | this.organParams.donorchargeid = this.curId; |
| | | console.log("this.organParams", this.organParams); |
| | | listDonorchargeorgan(this.organParams).then(res => { |
| | | console.log("listDonorchargeorgan", res); |
| | | this.donorchargeorgans = res.rows; |
| | | if (this.donorchargeorgans.length > 0) { |
| | | } else { |
| | |
| | | submitForm: debounce(function (data) { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateDonorcharge(this.form).then(response => { |
| | | if (response.code == 200) { |
| | | this.$modal.msgSuccess("保存成功!"); |
| | | //校验、费用合计 |
| | | let ChargeSum = 0; |
| | | let ChargeamountSum = 0; |
| | | let organname=""; |
| | | |
| | | try { |
| | | for (let i = 0; i < this.donorchargeorgans.length; i++) { |
| | | organname += this.donorchargeorgans[i].organname+","; |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) { |
| | | ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge); |
| | | } |
| | | this.open = false; |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) { |
| | | ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount); |
| | | } |
| | | } |
| | | this.form.donateorgan = organname.substring(0,organname.lastIndexOf(",")); |
| | | this.form.chargeamount = ChargeSum.toFixed(2); |
| | | this.form.chargeamounted = ChargeamountSum.toFixed(2); |
| | | } catch { } |
| | | |
| | | //保存 |
| | | if (this.form.id != null) { |
| | | for (let k = 0; k < this.donorchargeorgans.length; k++) { |
| | | this.donorchargeorgans[k].donorchargeID = this.form.id; |
| | | } |
| | | |
| | | updateDonorcharge(this.form).then(res1 => { |
| | | if (res1.code == 200) { |
| | | saveDonorchargeorgan(this.donorchargeorgans).then(res2 => { |
| | | if (res2.code == 200) { |
| | | this.$modal.msgSuccess("保存成功!"); |
| | | this.open = false; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | addDonorcharge(this.form).then(response => { |
| | | if (response.code == 200) { |
| | | console.log(response); |
| | | this.$modal.msgSuccess("保存成功!"); |
| | | console.log("addDonorcharge", response); |
| | | //保存前校验数据 |
| | | for (let k = 0; k < this.donorchargeorgans.length; k++) { |
| | | this.donorchargeorgans[k].donorchargeid = response.data.id; |
| | | } |
| | | saveDonorchargeorgan(this.donorchargeorgans).then(res2 => { |
| | | if (res2.code == 200) { |
| | | this.$modal.msgSuccess("保存成功!"); |
| | | this.open = false; |
| | | } |
| | | }); |
| | | } |
| | | this.open = false; |
| | | }); |
| | | } |
| | | } |
| | |
| | | }, 500), |
| | | |
| | | //计算费用合计 |
| | | sumTotalFee() { |
| | | let allSum = 0; |
| | | chargeSum() { |
| | | let ChargeSum = 0; |
| | | let ChargeamountSum = 0; |
| | | |
| | | //捐献者家属费用 |
| | | if (!isNaN(parseFloat(this.form.donoramount))) { |
| | | allSum += parseFloat(this.form.donoramount); |
| | | } |
| | | |
| | | //报销明细费用 |
| | | //费用合计 |
| | | try { |
| | | for (let i = 0; i < this.donorchargeorgans.length; i++) { |
| | | /* |
| | | let totalFee = 0; |
| | | //计算当前报销内容费用合计 |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].total))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].total); |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) { |
| | | ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].cityfee))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].cityfee); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].hotelexpense))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].hotelexpense); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].otherexpense))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].otherexpense); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].foodexpenses))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].foodexpenses); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].foodallowance))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].foodallowance); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].otherfeeamount))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].otherfeeamount); |
| | | } |
| | | this.donorchargeorgans[i].total = parseFloat(totalFee).toFixed(2); |
| | | this.$set(this.donorchargeorgans, i, this.donorchargeorgans[i]); |
| | | */ |
| | | |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].total))) { |
| | | allSum += parseFloat(this.donorchargeorgans[i].total); |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) { |
| | | ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount); |
| | | } |
| | | } |
| | | |
| | | this.form.amountrequested = allSum.toFixed(2); |
| | | this.form.chargeamount = ChargeSum.toFixed(2); |
| | | this.form.chargeamounted = ChargeamountSum.toFixed(2); |
| | | } catch { } |
| | | }, |
| | | |