Commit 0b4e31af authored by 786817560's avatar 786817560

'冲突'

parents 1c17ec20 78be234f
...@@ -153,21 +153,12 @@ vum.$vumPlatform.ready(function () { ...@@ -153,21 +153,12 @@ vum.$vumPlatform.ready(function () {
} }
}) })
/*if (window.history && window.history.pushState) {
// 往历史记录里面添加一条新的当前页面的url
history.pushState(null, null, document.URL)
// 给 popstate 绑定一个方法 监听页面刷新
window.addEventListener('popstate', function(){
hlsPopup.showLongCenter('请点击左上角返回按钮返回')
}, false) // false阻止默认事件
}*/
vum.$vumPlatform.registerBackButtonAction(function (e) { vum.$vumPlatform.registerBackButtonAction(function (e) {
// let vm = this // let vm = this
let time let time
let path = router.currentRoute.path let path = router.currentRoute.path
if (path === '/tab/home' || path === '/tab/allCar' || path === '/tab/message' || path === '/tab/my-info') { if (path === '/tab/home' || path === '/tab/message' || path === '/tab/my-info') {
// 进入主界面清除缓存 // 进入主界面清除缓存
if (backButtonPressedOnceToExit === true) { if (backButtonPressedOnceToExit === true) {
vum.Platform.exitApp() vum.Platform.exitApp()
......
...@@ -104,7 +104,11 @@ ...@@ -104,7 +104,11 @@
</item> </item>
<item> <item>
<div slot="name" class="font-color">手续费</div> <div slot="name" class="font-color">手续费</div>
<<<<<<< HEAD
<span slot="content">{{ info.lease_charge * info.product_num | currency }}</span> <span slot="content">{{ info.lease_charge * info.product_num | currency }}</span>
=======
<span slot="content">{{ parseFloat(info.lease_charge * info.product_num).toFixed(2) | currency }}</span>
>>>>>>> 78be234f93b98e3c02766de91b9efe39492c02fe
</item> </item>
<item> <item>
<div slot="name" class="font-color">保险押金</div> <div slot="name" class="font-color">保险押金</div>
...@@ -116,7 +120,11 @@ ...@@ -116,7 +120,11 @@
</item> </item>
<item> <item>
<div slot="name">首次付款合计</div> <div slot="name">首次付款合计</div>
<<<<<<< HEAD
<span slot="content">{{ info.first_pay | currency }}</span> <span slot="content">{{ info.first_pay | currency }}</span>
=======
<span slot="content">{{ parseFloat(info.first_pay).toFixed(2) | currency }}</span>
>>>>>>> 78be234f93b98e3c02766de91b9efe39492c02fe
</item> </item>
<item> <item>
<div slot="name" class="font-color">预计付款日</div> <div slot="name" class="font-color">预计付款日</div>
......
...@@ -58,7 +58,11 @@ ...@@ -58,7 +58,11 @@
</div> </div>
<div class="option"> <div class="option">
<p class="name">合同金额</p> <p class="name">合同金额</p>
<<<<<<< HEAD
<p class="normal money">{{ item.total_price|currency }}</p> <p class="normal money">{{ item.total_price|currency }}</p>
=======
<p class="normal money">{{ parseFloat(item.total_price).toFixed(2)|currency }}</p>
>>>>>>> 78be234f93b98e3c02766de91b9efe39492c02fe
<img src="@/assets/distributorSign/goDetails.png" alt=""> <img src="@/assets/distributorSign/goDetails.png" alt="">
</div> </div>
<div class="option"> <div class="option">
......
...@@ -31,7 +31,11 @@ ...@@ -31,7 +31,11 @@
<div class="top-detail"> <div class="top-detail">
<div class="left"> <div class="left">
<span class="line">手续费</span> <span class="line">手续费</span>
<<<<<<< HEAD
<span>{{ info.lease_charge * product_num |currency }}</span> <span>{{ info.lease_charge * product_num |currency }}</span>
=======
<span>{{ parseFloat(info.lease_charge * product_num).toFixed(2) |currency }}</span>
>>>>>>> 78be234f93b98e3c02766de91b9efe39492c02fe
</div> </div>
<div class="right"> <div class="right">
<span class="line">合同期数</span> <span class="line">合同期数</span>
......
...@@ -17,22 +17,22 @@ ...@@ -17,22 +17,22 @@
<img v-if="none" class="noData" src="@/assets/intoApproval/none.jpg" > <img v-if="none" class="noData" src="@/assets/intoApproval/none.jpg" >
<div v-if="dataNone" class="top-content"> <div v-if="dataNone" class="top-content">
<span class="top-tittle">总租金</span> <span class="top-tittle">总租金</span>
<span class="num">{{ info.total_rental_sum|NumFormat }}</span> <span class="num">{{ info.total_rental_sum|currency }}</span>
<div class="top-detail"> <div class="top-detail">
<div class="left"> <div class="left">
<span class="line">保证金</span> <span class="line">保证金</span>
<span>{{ info.deposit * product_num |NumFormat }}</span> <span>{{ info.deposit * product_num |currency }}</span>
</div> </div>
<div class="right"> <div class="right">
<span class="line">首付款</span> <span class="line">首付款</span>
<span>{{ info.down_payment * product_num |NumFormat }}</span> <span>{{ info.down_payment * product_num |currency }}</span>
</div> </div>
</div> </div>
<div class="clear" /> <div class="clear" />
<div class="top-detail"> <div class="top-detail">
<div class="left"> <div class="left">
<span class="line">手续费</span> <span class="line">手续费</span>
<span>{{ info.lease_charge * product_num |NumFormat }}</span> <span>{{ parseFloat(info.lease_charge * product_num).toFixed(2) |currency }}</span>
</div> </div>
<div class="right"> <div class="right">
<span class="line date-sum">合同期数</span> <span class="line date-sum">合同期数</span>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<td>{{ index+1 }}</td> <td>{{ index+1 }}</td>
<td>{{ item.due_date|timeFormat }}</td> <td>{{ item.due_date|timeFormat }}</td>
<td>租金</td> <td>租金</td>
<td>{{ item.rental * product_num |NumFormat }}</td> <td>{{ item.rental * product_num |currency }}</td>
</tr> </tr>
</table> </table>
</h-content> </h-content>
...@@ -68,29 +68,6 @@ ...@@ -68,29 +68,6 @@
<script> <script>
export default { export default {
filters: { filters: {
NumFormat: function (valueOrig) {
var value = parseFloat(valueOrig).toFixed(2)
if (!value) return '0.00'
var intPart = Number(value) | 0 // 获取整数部分
var intPartFormat = intPart
.toString()
.replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
var floatPart = '.00' // 预定义小数部分
var value2Array = value.split('.')
// =2表示数据有小数位
if (value2Array.length === 2) {
floatPart = value2Array[1].toString() // 拿到小数部分
if (floatPart.length === 1) {
// 补0,实际上用不着
return intPartFormat + '.' + floatPart + '0'
} else {
return intPartFormat + '.' + floatPart
}
} else {
return intPartFormat + floatPart
}
},
timeFormat: function (time) { timeFormat: function (time) {
var date = new Date(time) var date = new Date(time)
var y = date.getFullYear() var y = date.getFullYear()
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
</item> </item>
<item> <item>
<div slot="name">设备总价</div> <div slot="name">设备总价</div>
<span slot="content">{{ rentInfo.equip_price * rentInfo.product_num |NumFormat }}</span> <span slot="content">{{ rentInfo.equip_price * rentInfo.product_num |currency }}</span>
</item> </item>
<item> <item>
<div slot="name">融资金额</div> <div slot="name">融资金额</div>
<span slot="content">{{ rentInfo.finance_amount * rentInfo.product_num |NumFormat }}</span> <span slot="content">{{ rentInfo.finance_amount * rentInfo.product_num |currency }}</span>
</item> </item>
<item> <item>
<div slot="name">首付款</div> <div slot="name">首付款</div>
<span slot="content">{{ rentInfo.down_payment * rentInfo.product_num |NumFormat }}</span> <span slot="content">{{ rentInfo.down_payment * rentInfo.product_num |currency }}</span>
</item> </item>
<item> <item>
<div slot="name">保证金比例</div> <div slot="name">保证金比例</div>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</item> </item>
<item> <item>
<div slot="name">保证金</div> <div slot="name">保证金</div>
<span slot="content">{{ rentInfo.deposit * rentInfo.product_num |NumFormat }}</span> <span slot="content">{{ rentInfo.deposit * rentInfo.product_num |currency }}</span>
</item> </item>
<item> <item>
<div slot="name">手续费比例</div> <div slot="name">手续费比例</div>
...@@ -38,19 +38,19 @@ ...@@ -38,19 +38,19 @@
</item> </item>
<item> <item>
<div slot="name">手续费</div> <div slot="name">手续费</div>
<span slot="content">{{ rentInfo.lease_charge * rentInfo.product_num |NumFormat }}</span> <span slot="content">{{ parseFloat(rentInfo.lease_charge * rentInfo.product_num).toFixed(2) |currency }}</span>
</item> </item>
<item> <item>
<div slot="name">保险押金</div> <div slot="name">保险押金</div>
<span slot="content">{{ rentInfo.insurance_fee * rentInfo.product_num | NumFormat }}</span> <span slot="content">{{ rentInfo.insurance_fee * rentInfo.product_num | currency }}</span>
</item> </item>
<item> <item>
<div slot="name">GPS费用</div> <div slot="name">GPS费用</div>
<span slot="content">{{ rentInfo.gps_fee * rentInfo.product_num | NumFormat }}</span> <span slot="content">{{ rentInfo.gps_fee * rentInfo.product_num | currency }}</span>
</item> </item>
<item> <item>
<div slot="name">首次付款合计</div> <div slot="name">首次付款合计</div>
<span slot="content">{{ rentInfo.first_pay |NumFormat }}</span> <span slot="content">{{ parseFloat(rentInfo.first_pay).toFixed(2) |currency }}</span>
</item> </item>
<item> <item>
<div slot="name">预计付款日</div> <div slot="name">预计付款日</div>
...@@ -101,36 +101,20 @@ ...@@ -101,36 +101,20 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
filters: { filters: {
'NumFormat': function (valueOrig) { timeFormat: function (time) {
// if (!value) return '0.00'
var value = parseFloat(valueOrig).toFixed(2)
var intPart = Number(value) | 0 // 获取整数部分
var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
var floatPart = '.00' // 预定义小数部分
var value2Array = value.split('.')
// =2表示数据有小数位
if (value2Array.length === 2) {
floatPart = value2Array[1].toString() // 拿到小数部分
if (floatPart.length === 1) { // 补0,实际上用不着
return intPartFormat + '.' + floatPart + '0'
} else {
return intPartFormat + '.' + floatPart
}
} else {
return intPartFormat + floatPart
}
},
'timeFormat': function (time) {
if (time !== '') {
var date = new Date(time) var date = new Date(time)
var y = date.getFullYear() var y = date.getFullYear()
var m = date.getMonth() + 1 var m = date.getMonth() + 1
var d = date.getDate() var d = date.getDate()
return `${y}-${m}-${d}` if (m < 10) {
m = `0${m}`
}
if (d < 10) {
d = `0${d}`
} }
return `${y}-${m}-${d}`
}, },
}, },
props: { props: {
...@@ -139,7 +123,7 @@ ...@@ -139,7 +123,7 @@
default: '', default: '',
}, },
}, },
data() { data () {
return { return {
rentInfo: { rentInfo: {
finance_amount: '', finance_amount: '',
...@@ -164,20 +148,20 @@ ...@@ -164,20 +148,20 @@
}, },
} }
}, },
created() { created () {
this.getRent() this.getRent()
}, },
methods: { methods: {
changeRefund() { changeRefund () {
this.$router.push({ this.$router.push({
name: 'Refund', name: 'Refund',
params: { params: {
confirm_status: this.confirm_status, confirm_status: this.confirm_status,
product_num: this.rentInfo.product_num product_num: this.rentInfo.product_num,
}, },
}) })
}, },
getRent() { getRent () {
let vm = this let vm = this
let url = process.env.basePath + 'prj_lease_query' let url = process.env.basePath + 'prj_lease_query'
let param = { let param = {
...@@ -191,7 +175,7 @@ ...@@ -191,7 +175,7 @@
}) })
}, },
}, },
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
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