【修改】到账开票各阶段 税率 税额 未税金额回显

This commit is contained in:
fengachen
2022-11-10 14:15:19 +08:00
parent ac1b185e55
commit 0923766b1a
3 changed files with 99 additions and 7 deletions
@@ -26,7 +26,7 @@
<a-col :span="12">
<div class="stage">
<div class="stage-title">税率</div>
<div class="stage-content stage-content-money">{{ item.taxRate }}</div>
<div class="stage-content stage-content-money">{{initRateDictText(item.taxRate)}}</div>
</div>
</a-col>
<a-col :span="12">
@@ -95,6 +95,7 @@ import ArriveModule from './ArriveModule'
import {amountReceivedList, revokeIncome} from '../../../../api/incomePaymentsApi'
import PreviewImgModal from '../../../../components/PreviewImgModal'
import PreviewFile from '../../../../components/jero/PreviewFile.vue'
import {ajaxGetDictItems} from '@api/api'
export default {
name: 'ArriveStageModule',
@@ -125,7 +126,8 @@ export default {
confirmLoading: false,
form: this.$form.createForm(this),
// 阶段列表,用于循环展示阶段信息
stageList: []
stageList: [],
rateList:[],
}
},
watch: {
@@ -135,12 +137,32 @@ export default {
}
}
},
created() {
this.getRateList()
},
methods: {
/**
* 获取税率 字典
* */
getRateList(){
ajaxGetDictItems('rate').then(res => {
if(res.success){
this.rateList = res.result
}
})
},
// 回显税率
initRateDictText(rate) {
let result
let resultArr = this.rateList.filter(e => e.value === rate)
result = resultArr.length > 0 ? resultArr[0].title :''
return result
},
/**
* 撤销
* */
handleRevoke(record) {
console.log('撤销')
let that = this
this.$confirm({
title: '确认撤销',
@@ -23,6 +23,12 @@
<div class="stage-content">{{ item.amountReceived }}</div>
</div>
</a-col>
<a-col :span="6">
<div class="stage">
<div class="stage-title">税率</div>
<div class="stage-content">{{ initRateDictText(item.taxRate) }}</div>
</div>
</a-col>
<a-col :span="6">
<div class="stage">
<div class="stage-title">税额</div>
@@ -69,7 +75,8 @@
<script>
import ConfirmModule from './ConfirmModule'
import {getPayConfirmList, payBillList} from '../../../../api/incomePaymentsApi'
import {getPayConfirmList} from '../../../../api/incomePaymentsApi'
import {ajaxGetDictItems} from '@api/api'
export default {
name: 'InvoicingStageModule',
@@ -97,7 +104,8 @@ export default {
confirmLoading: false,
form: this.$form.createForm(this),
// 阶段列表,用于循环展示阶段信息
stageList: []
stageList: [],
rateList:[],
}
},
watch: {
@@ -110,7 +118,27 @@ export default {
}
}
},
created() {
this.getRateList()
},
methods: {
/**
* 获取税率 字典
* */
getRateList(){
ajaxGetDictItems('rate').then(res => {
if(res.success){
this.rateList = res.result
}
})
},
// 回显税率
initRateDictText(rate) {
let result
let resultArr = this.rateList.filter(e => e.value === rate)
result = resultArr.length > 0 ? resultArr[0].title :''
return result
},
// 显示数据的相关方法
show(record) {
console.log(record)
@@ -130,7 +158,7 @@ export default {
},
open() {
// this.visible = true
console.log(this.projectId, "________projectId________")
console.log(this.projectId, '________projectId________')
this.loadData()
},
close() {
@@ -28,6 +28,26 @@
<div class="stage-content stage-content-money">{{ item.invoiceAmount }}</div>
</div>
</a-col>
<a-col :span="6">
<div class="stage">
<div class="stage-title">税率</div>
<div class="stage-content stage-content-money">{{ initRateDictText(item.taxRate) }}</div>
</div>
</a-col>
<a-col :span="6">
<div class="stage">
<div class="stage-title">税额</div>
<div class="stage-content stage-content-money">{{ item.tax }}</div>
</div>
</a-col>
<a-col :span="6">
<div class="stage">
<div class="stage-title">未税金额</div>
<div class="stage-content stage-content-money">{{ item.noTaxAmount }}</div>
</div>
</a-col>
<a-col :span="6">
<div class="stage">
<div class="stage-title">开票号</div>
@@ -69,6 +89,7 @@
<script>
import InvoicingModule from './InvoicingModule'
import { payBillList } from '../../../../api/incomePaymentsApi'
import {ajaxGetDictItems} from '@api/api'
export default {
name: 'InvoicingStageModule',
@@ -96,7 +117,8 @@ export default {
confirmLoading: false,
form: this.$form.createForm(this),
// 阶段列表,用于循环展示阶段信息
stageList: []
stageList: [],
rateList:[],
}
},
watch: {
@@ -109,7 +131,27 @@ export default {
}
}
},
created() {
this.getRateList()
},
methods: {
/**
* 获取税率 字典
* */
getRateList(){
ajaxGetDictItems('rate').then(res => {
if(res.success){
this.rateList = res.result
}
})
},
// 回显税率
initRateDictText(rate) {
let result
let resultArr = this.rateList.filter(e => e.value === rate)
result = resultArr.length > 0 ? resultArr[0].title :''
return result
},
handleAdd() {
this.$refs.invoicingModal.title = '添加阶段'
this.$refs.invoicingModal.add()