Commit a87bca53 authored by linxin's avatar linxin

fix

parent 74e3c7dd
...@@ -62,7 +62,8 @@ ...@@ -62,7 +62,8 @@
export default { export default {
name: 'FinancDetails', name: 'FinancDetails',
filters: { filters: {
NumFormat: function (value) { NumFormat: function (valueOrig) {
var value = parseFloat(valueOrig).toFixed(2)
if (!value) return '0.00' if (!value) return '0.00'
var intPart = Number(value) | 0 // 获取整数部分 var intPart = Number(value) | 0 // 获取整数部分
var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断 var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
......
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
<script> <script>
export default { export default {
filters: { filters: {
NumFormat: function (value) { NumFormat: function (valueOrig) {
var value = parseFloat(valueOrig).toFixed(2)
if (!value) return '0.00' if (!value) return '0.00'
var intPart = Number(value) | 0 // 获取整数部分 var intPart = Number(value) | 0 // 获取整数部分
var intPartFormat = intPart var intPartFormat = intPart
...@@ -137,6 +138,7 @@ export default { ...@@ -137,6 +138,7 @@ export default {
hasButtom: confirmStatus, hasButtom: confirmStatus,
}, },
}) })
this.$router.go(-1)
}, },
getInfo () { getInfo () {
let vm = this let vm = this
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
</div> </div>
<h-content class="pay-content"> <h-content class="pay-content">
<section v-for="(item,index) in 2" :key="index" class="contract-item"> <section v-for="(item,index) in lists" :key="index" class="contract-item">
<div class="header"> <div class="header">
<img src="@/assets/payment/contract.png" alt=""> <img src="@/assets/payment/contract.png" alt="">
<p>合同号 &nbsp; {{ item.project_number }}</p> <p>合同号 &nbsp; {{ item.project_number }}</p>
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
watch: {}, watch: {},
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
// vm.getDetail() vm.getDetail()
}) })
}, },
activated () { activated () {
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
methods: { methods: {
getDetail () { getDetail () {
let vm = this let vm = this
let url = process.env.basePath + 'payment_con_list_query' let url = process.env.basePath + 'payment_prj_list_query'
let param = { let param = {
bp_id: vm.$route.params.bp_id, bp_id: vm.$route.params.bp_id,
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
</div> </div>
<bottom-tab> <bottom-tab>
<tab-button class="footer" @click.native="pay();toPayEntry(money)"> <tab-button class="footer" @click.native="pay">
&nbsp;&nbsp; &nbsp;&nbsp;
</tab-button> </tab-button>
</bottom-tab> </bottom-tab>
...@@ -47,6 +47,7 @@ export default { ...@@ -47,6 +47,7 @@ export default {
data () { data () {
return { return {
money: 0, money: 0,
default: 0,
} }
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
...@@ -68,12 +69,23 @@ export default { ...@@ -68,12 +69,23 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.money = res.info.down_payment vm.money = res.info.down_payment
vm.default = res.info.down_payment
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
}) })
}, },
pay () { pay () {
if (this.money > 0 && this.money <= this.default) {
this.payProtocol()
this.toPayEntry(this.money)
} else if (this.money > this.default) {
hlsPopup.showLongCenter('当前支付金额超出应还金额!')
} else if (this.money === 0) {
hlsPopup.showLongCenter('当前支付金额为0元,无需支付!')
}
},
payProtocol () {
let vm = this let vm = this
let url = process.env.basePath + 'create_order_0_amount' let url = process.env.basePath + 'create_order_0_amount'
let param = { let param = {
...@@ -104,7 +116,8 @@ export default { ...@@ -104,7 +116,8 @@ export default {
name: 'ContractRecord', name: 'ContractRecord',
params: { params: {
money, money,
bp_id: this.$route.params.bp_id, // bp_id: this.$route.params.bp_id,
bp_id: 7850,
}, },
}) })
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<h-view id="pay-entry" class="public-style"> <h-view id="pay-entry" class="public-style">
<h-header :proportion="[5,1,1]" class="bar-custom"> <h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn"> <div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()"> <img src="@/assets/userBind/arrow.png" @click="changePage">
<span>支付中心</span> <span>支付中心</span>
</div> </div>
</h-header> </h-header>
...@@ -75,6 +75,17 @@ export default { ...@@ -75,6 +75,17 @@ export default {
isSelect (way) { isSelect (way) {
this.select = way this.select = way
}, },
changePage () {
this.$router.replace(
{
name: 'FirstPay',
params: {
bp_id: this.$route.params.bp_id,
},
}
)
this.$router.go(-1)
},
}, },
} }
</script> </script>
......
...@@ -66,6 +66,7 @@ export default { ...@@ -66,6 +66,7 @@ export default {
isAGENT: this.$route.params.isAGENT, isAGENT: this.$route.params.isAGENT,
}, },
}) })
this.$router.go(-1)
}, },
toPayEntry (money) { toPayEntry (money) {
this.$router.push({ this.$router.push({
......
...@@ -851,7 +851,7 @@ export default { ...@@ -851,7 +851,7 @@ export default {
}, },
addRowsLive (e) { addRowsLive (e) {
let addNum = parseInt(e.length / 16) let addNum = parseInt(e.length / 16)
console.log(addNum) // console.log(this.$refs.myTestareaLive.offsetHeight)
if (addNum === 0) { if (addNum === 0) {
this.$refs.myTestareaLive.rows = 1 this.$refs.myTestareaLive.rows = 1
} else if (addNum >= addNum - 1 && addNum < addNum + 1) { } else if (addNum >= addNum - 1 && addNum < addNum + 1) {
......
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