| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="申请材料状态" prop="infoid"> |
| | | <el-form-item label="材料预审状态" prop="infoid"> |
| | | <el-select |
| | | v-model="form.checkstatus" |
| | | filterable |
| | | placeholder="请选择申请材料状态" |
| | | placeholder="请选择材料预审状态" |
| | | > |
| | | <el-option |
| | | v-for="item in baselisttages" |
| | |
| | | import Li_area_select from "@/components/Address"; |
| | | import OrgSelecter from "@/views/project/components/orgselect"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { moneySum, moneyAdd, moneySub, moneyRound } from "@/utils/money"; |
| | | import CustomImageViewer from "@/components/CustomImageViewer"; |
| | | |
| | | export default { |
| | |
| | | baselisttages: [ |
| | | { |
| | | id: 1, |
| | | name: "待申请材料" |
| | | name: "待审核" |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: "审核通过等待邮寄纸质材料" |
| | | name: "预审通过等待纸质材料" |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: "已收到报销材料" |
| | | name: "已收到纸质材料" |
| | | } |
| | | ], |
| | | PerformanceType: [ |
| | |
| | | } |
| | | }, |
| | | |
| | | //税前扣税算税后 |
| | | //税前扣税算税后(金额一律走精确运算) |
| | | chargeSum(row, type) { |
| | | let targetValue = 0; |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | if (!this.rbDetails[i].amount) { |
| | | this.rbDetails[i].amount = 0; |
| | |
| | | if (!this.rbDetails[i].taxamount) { |
| | | this.rbDetails[i].taxamount = 0; |
| | | } |
| | | this.rbDetails[i].taxedamount = ( |
| | | parseFloat(this.rbDetails[i].amount) - |
| | | parseFloat(this.rbDetails[i].taxamount) |
| | | //税前 - 扣税 = 税后(浮点相减会残留极小尾差,导致出现 -0.00) |
| | | this.rbDetails[i].taxedamount = moneySub( |
| | | this.rbDetails[i].amount, |
| | | this.rbDetails[i].taxamount |
| | | ).toFixed(2); |
| | | targetValue += parseFloat(this.rbDetails[i].amount); // 假设每个对象中的特定值存储在'specificValue'属性下 |
| | | console.log(this.rbDetails[i].taxedamount, "合计"); |
| | | } |
| | | console.log(targetValue, "合计"); |
| | | this.form.pretaxcost = targetValue; |
| | | //合计必须精确累加,否则会写入 form.pretaxcost 并落库 |
| | | this.form.pretaxcost = moneySum(this.rbDetails, "amount"); |
| | | }, |
| | | //税后扣税算税前 |
| | | //税后扣税算税前(金额一律走精确运算) |
| | | queenchargeSum(row, type) { |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | if (!this.rbDetails[i].amount) { |
| | |
| | | if (!this.rbDetails[i].taxamount) { |
| | | this.rbDetails[i].taxamount = 0; |
| | | } |
| | | this.rbDetails[i].amount = |
| | | parseFloat(this.rbDetails[i].taxamount) + |
| | | parseFloat(this.rbDetails[i].taxedamount); |
| | | //扣税 + 税后 = 税前(必须精确相加并归一化到 2 位,否则会残留长小数) |
| | | this.rbDetails[i].amount = moneyRound( |
| | | moneyAdd(this.rbDetails[i].taxamount, this.rbDetails[i].taxedamount) |
| | | ); |
| | | } |
| | | }, |
| | | |