|
@@ -147,7 +147,7 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="费用金额" width="135px">
|
|
<el-table-column label="费用金额" width="135px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input size="small" :id="'upam'+scope.$index" v-model="scope.row.amount" @change="shiqu(scope.row.amount)" @keyup.native="restrictNumber('upam'+scope.$index)"></el-input>
|
|
|
|
|
|
+ <el-input size="small" :id="'upam'+scope.$index" v-model="scope.row.amount" @input="zhi(scope.$index)" @change="shiqu(scope.row.amount)" @keyup.native="restrictNumber('upam'+scope.$index)"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="invoiceNo" label="发票号" width="135px">
|
|
<el-table-column prop="invoiceNo" label="发票号" width="135px">
|
|
@@ -157,12 +157,12 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="税率%" width="135px">
|
|
<el-table-column label="税率%" width="135px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input size="small" v-model="scope.row.taxPercent"></el-input>
|
|
|
|
|
|
+ <el-input size="small" type= "number" v-model="scope.row.taxPercent" @input="zhi(scope.$index)"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="税额" width="135px">
|
|
<el-table-column label="税额" width="135px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input size="small" v-model="scope.row.taxValue"></el-input>
|
|
|
|
|
|
+ <el-input size="small" v-model="scope.row.taxValue" @input="zhis(scope.$index)"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="备注" width="135px">
|
|
<el-table-column label="备注" width="135px">
|
|
@@ -894,6 +894,18 @@ export default {
|
|
this.ParticularsList.totalAmount = this.ParticularsList.invoiceList.reduce((prev, next) => {
|
|
this.ParticularsList.totalAmount = this.ParticularsList.invoiceList.reduce((prev, next) => {
|
|
return prev + parseFloat(next.amount)
|
|
return prev + parseFloat(next.amount)
|
|
}, 0)
|
|
}, 0)
|
|
|
|
+ },
|
|
|
|
+ zhi(e) {
|
|
|
|
+ var i = e
|
|
|
|
+ if(this.invoiceList[i].amount == null || this.invoiceList[i].amount == 'null' || this.invoiceList[i].taxPercent == null || this.invoiceList[i].taxPercent == 'null') {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.invoiceList[i].taxValue = this.invoiceList[i].amount * this.invoiceList[i].taxPercent / 100
|
|
|
|
+ this.invoiceList[i].taxValue = this.invoiceList[i].taxValue.toFixed(2)
|
|
|
|
+ },
|
|
|
|
+ zhis(e) {
|
|
|
|
+ var i = e
|
|
|
|
+ this.invoiceList[i].taxValue = this.invoiceList[i].taxValue.toFixed(2)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
};
|
|
};
|