Commit a87bca53 authored by linxin's avatar linxin

fix

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