|
@@ -71,7 +71,9 @@
|
|
|
<van-field label="费用金额(含税):" v-model="item.amount" type="number" @input="costCount"></van-field>
|
|
|
<van-field label="发票号:" v-model="item.invoiceNo"></van-field>
|
|
|
<van-field label="税率%:" v-model="item.taxPercent"></van-field>
|
|
|
- <van-field label="税额:" v-model="item.taxValue"></van-field>
|
|
|
+ <van-field label="税额:" readonly>
|
|
|
+ <template #input>¥{{getTaxValue(item.amount,item.taxPercent)}}</template>
|
|
|
+ </van-field>
|
|
|
<van-field label="备注:" v-model="item.remark" autosize></van-field>
|
|
|
<van-field label="报销凭证:" @click="invoiceIndex = index" clickable>
|
|
|
<template #input>
|
|
@@ -301,6 +303,11 @@ export default {
|
|
|
let mon = date.getMonth() + 1
|
|
|
return `${date.getFullYear()}-${mon<10?'0'+mon:mon}-${date.getDate()<10?'0'+date.getDate():date.getDate()}`;
|
|
|
},
|
|
|
+ getTaxValue(amount,percent){
|
|
|
+ let per = percent / 100
|
|
|
+ let amo = amount / (1 + per)*per
|
|
|
+ return amo.toFixed(2)
|
|
|
+ },
|
|
|
activeChange(){
|
|
|
sessionStorage.setItem('page',JSON.stringify(this.active))
|
|
|
if(this.active == 1){
|
|
@@ -410,6 +417,9 @@ export default {
|
|
|
this.$toast.fail('请添加发票')
|
|
|
return
|
|
|
}
|
|
|
+ for(let i in this.invoiceList){
|
|
|
+ this.invoiceList[i].taxValue = this.getTaxValue(this.invoiceList[i].amount,this.invoiceList[i].taxPercent)
|
|
|
+ }
|
|
|
this.editForm.items = JSON.stringify(this.invoiceList)
|
|
|
this.editForm.totalAmount = this.totalCost
|
|
|
// 获取新的票据编号
|
|
@@ -589,12 +599,12 @@ export default {
|
|
|
}
|
|
|
.list_collapse{
|
|
|
.collapse_label_l{
|
|
|
- width: 60%;
|
|
|
+ width: 50%;
|
|
|
padding: 4px;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.collapse_label_r{
|
|
|
- width: 40%;
|
|
|
+ width: 50%;
|
|
|
padding: 4px;
|
|
|
display: inline-block;
|
|
|
.waiting {
|