| | |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-form-item label="申请日期" prop="applyTime"> |
| | | <el-date-picker style="width: 100%" v-model="form.applyTime" :disabled="true" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="申请日期"> |
| | | <el-date-picker style="width: 100%" v-model="form.applyTime" :disabled="true" type="date" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" placeholder="申请日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | ); |
| | | } |
| | | } |
| | | }" clearable size="small" style="width: 100%" v-model="scope.row.starttime" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="开始日期" @blur="getallowance(scope.row)"> |
| | | }" clearable size="small" style="width: 100%" v-model="scope.row.starttime" type="date" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" placeholder="开始日期" @blur="getallowance(scope.row)"> |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | ); |
| | | } |
| | | } |
| | | }" clearable size="small" style="width: 100%" v-model="scope.row.endtime" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="结束日期" @blur="getallowance(scope.row)"> |
| | | }" clearable size="small" style="width: 100%" v-model="scope.row.endtime" type="date" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" placeholder="结束日期" @blur="getallowance(scope.row)"> |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </template> </el-table-column><el-table-column prop="paiddate" slot="" label="打款日期" fixed align="center" |
| | | width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="打款日期" :disabled="true" |
| | | <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" placeholder="打款日期" :disabled="true" |
| | | @blur="getallowance(scope.row)"> |
| | | </el-date-picker> |
| | | </template> |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="checksubmit" v-if="dialogType == 'edit'">保 存</el-button> |
| | | <el-button type="primary" :loading="checkSubmitLoading" :disabled="checkSubmitLoading" @click="checksubmit" v-if="dialogType == 'edit'">保 存</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { setItem, grtItem, removeItem } from "@/utils/storage.js"; |
| | | import { moneySum } from "@/utils/money"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | ], |
| | | data() { |
| | | return { |
| | | checkSubmitLoading: false, |
| | | checkObj: { |
| | | flowlevelone: null, |
| | | flowconclusion: null, |
| | |
| | | }, |
| | | |
| | | checksubmit() { |
| | | if (this.checkSubmitLoading) return; |
| | | let checkfundobj = { |
| | | flowconclusion: this.checkObj.flowlevelone, |
| | | flowcontent: this.checkObj.flowconclusion, |
| | |
| | | return; |
| | | } |
| | | |
| | | this.checkSubmitLoading = true; |
| | | checkfund(checkfundobj).then(res => { |
| | | this.checkSubmitLoading = false; |
| | | if (res.code == 200) { |
| | | this.reset(); |
| | | this.open = false; |
| | |
| | | this.$modal.msgSuccess("审核完成!"); |
| | | } else { |
| | | this.open = false; |
| | | if (res.msg) { |
| | | this.$modal.msgError("操作失误"); |
| | | } else { |
| | | this.$modal.msgError(res.msg); |
| | | } |
| | | this.$modal.msgError(res.msg || "操作失败"); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | }); |
| | | }, |
| | | |
| | | //计算费用合计 |
| | | //计算费用合计(金额一律走精确运算,禁止 parseFloat 累加) |
| | | sumTotalFee(scope) { |
| | | let allSum = 0; |
| | | try { |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | let totalFee = 0; |
| | | const row = this.rbDetails[i]; |
| | | //计算当前报销内容费用合计 |
| | | if (!isNaN(parseFloat(this.rbDetails[i].trafficexpense))) { |
| | | totalFee += parseFloat(this.rbDetails[i].trafficexpense); |
| | | } |
| | | if (!isNaN(parseFloat(this.rbDetails[i].cityfee))) { |
| | | totalFee += parseFloat(this.rbDetails[i].cityfee); |
| | | } |
| | | if (!isNaN(parseFloat(this.rbDetails[i].hotelexpense))) { |
| | | totalFee += parseFloat(this.rbDetails[i].hotelexpense); |
| | | } |
| | | if (!isNaN(parseFloat(this.rbDetails[i].otherexpense))) { |
| | | totalFee += parseFloat(this.rbDetails[i].otherexpense); |
| | | } |
| | | if (!isNaN(parseFloat(this.rbDetails[i].foodexpenses))) { |
| | | totalFee += parseFloat(this.rbDetails[i].foodexpenses); |
| | | } |
| | | if (!isNaN(parseFloat(this.rbDetails[i].foodallowance))) { |
| | | totalFee += parseFloat(this.rbDetails[i].foodallowance); |
| | | } |
| | | if (!isNaN(parseFloat(this.rbDetails[i].otherfeeamount))) { |
| | | totalFee += parseFloat(this.rbDetails[i].otherfeeamount); |
| | | } |
| | | this.rbDetails[i].total = parseFloat(totalFee).toFixed(2); |
| | | this.$set(this.rbDetails, scope.$index, this.rbDetails[i]); |
| | | if (!isNaN(parseFloat(this.rbDetails[i].total))) { |
| | | allSum += parseFloat(this.rbDetails[i].total); |
| | | } |
| | | const totalFee = moneySum([ |
| | | row.trafficexpense, |
| | | row.cityfee, |
| | | row.hotelexpense, |
| | | row.otherexpense, |
| | | row.foodexpenses, |
| | | row.foodallowance, |
| | | row.otherfeeamount |
| | | ]); |
| | | row.total = totalFee.toFixed(2); |
| | | this.$set(this.rbDetails, scope.$index, row); |
| | | } |
| | | this.form.amountrequested = allSum.toFixed(2); |
| | | this.form.amountrequested = moneySum(this.rbDetails, "total").toFixed(2); |
| | | this.form.bigstrmoney = this.convertCurrency(this.form.amountrequested); |
| | | } catch { } |
| | | }, |