| | |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.name" |
| | | :disabled="true" |
| | | placeholder="受体姓氏" |
| | | /> |
| | | </template> |
| | |
| | | import Li_area_select from "@/components/Address"; |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { moneySum, moneyRound } from "@/utils/money"; |
| | | import debounce from "lodash/debounce"; |
| | | export default { |
| | | components: { |
| | |
| | | submitForm: debounce(function(data) { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | //校验、费用合计 |
| | | 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); |
| | | } |
| | | 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); |
| | | this.form.chargeamount = moneyRound( |
| | | moneySum(this.donorchargeorgans, "organcharge") |
| | | ).toFixed(2); |
| | | this.form.chargeamounted = moneyRound( |
| | | moneySum(this.donorchargeorgans, "amount") |
| | | ).toFixed(2); |
| | | } catch {} |
| | | |
| | | //保存 |
| | |
| | | }); |
| | | }, 500), |
| | | |
| | | //计算费用合计 |
| | | //计算费用合计(金额一律走精确运算) |
| | | chargeSum() { |
| | | let ChargeSum = 0; |
| | | let ChargeamountSum = 0; |
| | | |
| | | //费用合计 |
| | | try { |
| | | for (let i = 0; i < this.donorchargeorgans.length; i++) { |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) { |
| | | ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) { |
| | | ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount); |
| | | } |
| | | } |
| | | |
| | | this.form.chargeamount = ChargeSum.toFixed(2); |
| | | this.form.chargeamounted = ChargeamountSum.toFixed(2); |
| | | this.form.chargeamount = moneyRound( |
| | | moneySum(this.donorchargeorgans, "organcharge") |
| | | ).toFixed(2); |
| | | this.form.chargeamounted = moneyRound( |
| | | moneySum(this.donorchargeorgans, "amount") |
| | | ).toFixed(2); |
| | | } catch {} |
| | | }, |
| | | |
| | |
| | | "organname", |
| | | "caseno", |
| | | "amounttime", |
| | | "organcharge", |
| | | "name", |
| | | "hospitalname", |
| | | "organtime", |
| | | "remark" |
| | | "remark", |
| | | 'organchargedesc' |
| | | ]; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | |
| | | text-align: center; |
| | | } |
| | | } |
| | | ::v-deep .el-input.is-disabled .el-input__inner { |
| | | background-color: #F5F7FA; |
| | | border-color: #dfe4ed; |
| | | color: #000000; |
| | | cursor: not-allowed; |
| | | } |
| | | |
| | | ::v-deep .el-input--medium .el-input__inner { |
| | | height: 36px; |