| | |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="scope.row.amounttime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="date" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="实收时间" |
| | | > |
| | | </el-date-picker> |
| | |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="scope.row.organtime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="date" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="移植时间" |
| | | > |
| | | </el-date-picker> |
| | |
| | | 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 {} |
| | | }, |
| | | |