Commit c8b4a5d9 by liang ce

系统对账返回参数为空页面显示问题问题修复

parent a9d5e997
......@@ -28,8 +28,8 @@
充值金额
</div>
<div>
<p><label>现金:</label>¥{{systemReconciliationDetails.internalRechargeAmount}}</p>
<p><label>支付宝:</label>¥{{systemReconciliationDetails.externalRechargeAmount}}</p>
<p><label>现金:</label>¥{{systemReconciliationDetails.internalRechargeAmount || '0'}}</p>
<p><label>支付宝:</label>¥{{systemReconciliationDetails.externalRechargeAmount || '0'}}</p>
</div>
<div><p>共计:<span>¥{{ returnRechargeAmount() }}</span></p></div>
</div>
......@@ -38,7 +38,7 @@
发放津贴
</div>
<div>
<p v-for=" item in systemReconciliationDetails.subsidyCheck" :key="item.sceneType"><label>{{ item.sceneType }}</label>¥{{ item.amount }}</p>
<p v-for=" item in systemReconciliationDetails.subsidyCheck" :key="item.sceneType"><label>{{ item.sceneType === 'TRAVEL' ? '交通补助' : '餐补' }}</label>¥{{ item.amount || '0' }}</p>
</div>
<div><p>共计:<span>¥{{ returnSubsidyCheckTotal() }}</span></p></div>
</div>
......@@ -48,10 +48,10 @@
</div>
<div class="recordsBox">
<div v-for="item in systemReconciliationDetails.consumeCheck" :key="item.sceneType">
<div>{{ item.sceneType }}</div>
<div>{{ item.sceneType === 'TRAVEL' ? '交通消费' : '用餐消费' }}</div>
<div>
<p>现金:¥{{ item.realityAmount }}</p>
<p>津贴:¥{{ item.subsidyAmount }}</p>
<p>现金:¥{{ item.realityAmount || '0' }}</p>
<p>津贴:¥{{ item.subsidyAmount || '0' }}</p>
</div>
</div>
</div>
......@@ -126,42 +126,44 @@ export default {
if (this.systemReconciliationDetails.consumeCheck) {
if (str === 'realityAmount') {
this.systemReconciliationDetails.consumeCheck.map(item => {
totalNum = totalNum + parseFloat(item.realityAmount)
let realityAmountNum = item.realityAmount ? item.realityAmount : 0
totalNum = totalNum + parseFloat(realityAmountNum)
})
return totalNum.toFixed(2)
} else if (str === 'subsidyAmount') {
this.systemReconciliationDetails.consumeCheck.map(item => {
totalNum = totalNum + parseFloat(item.subsidyAmount)
let subsidyAmountNum = item.subsidyAmount ? item.subsidyAmount : 0
totalNum = totalNum + parseFloat(subsidyAmountNum)
})
return totalNum.toFixed(2)
} else if (str === 'total') {
this.systemReconciliationDetails.consumeCheck.map(item => {
totalNum = totalNum + parseFloat(item.orderAmount)
let orderAmountNum = item.orderAmount ? item.orderAmount : 0
totalNum = totalNum + parseFloat(orderAmountNum)
})
return totalNum.toFixed(2)
}
} else {
return ''
return '0.00'
}
},
returnSubsidyCheckTotal () {
let totalNum = 0
if (this.systemReconciliationDetails.subsidyCheck) {
this.systemReconciliationDetails.subsidyCheck.map(item => {
totalNum = totalNum + parseFloat(item.amount)
let amountNum = item.amount ? item.amount : 0
totalNum = totalNum + parseFloat(amountNum)
})
return totalNum.toFixed(2)
} else {
return ''
return '0.00'
}
},
returnRechargeAmount () {
if (this.systemReconciliationDetails.internalRechargeAmount) {
let totalNum = parseFloat(this.systemReconciliationDetails.internalRechargeAmount) + parseFloat(this.systemReconciliationDetails.externalRechargeAmount)
let internalRechargeAmount = this.systemReconciliationDetails.internalRechargeAmount || 0
let externalRechargeAmount = this.systemReconciliationDetails.externalRechargeAmount || 0
let totalNum = parseFloat(internalRechargeAmount) + parseFloat(externalRechargeAmount)
return totalNum.toFixed(2)
} else {
return ''
}
},
getAccountCheck () {
let SubsidyListData = this.$qs.stringify({
......@@ -169,7 +171,7 @@ export default {
endTime: this.endTime,
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/account/accountCheck?${SubsidyListData}`).then((res) => {
$http.get(`v1/account/accountCheck?${SubsidyListData}`).then((res) => {
console.log(res.data.data)
if (res.data.resultCode === '0') {
this.systemReconciliationDetails = res.data.data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment