Commit 0ea5f6f6 authored by linxin's avatar linxin

修改支付渠道

parent 61e173c5
...@@ -359,6 +359,9 @@ export default { ...@@ -359,6 +359,9 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
Object.assign(vm.saveInfo, res.info) Object.assign(vm.saveInfo, res.info)
vm.productInfo.product_num = res.info.product_num
vm.productInfo.product_id = res.info.product_id
vm.productInfo.product_id_n = res.info.product_id_n
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="down"> <div class="down">
<div class="top"> <div class="top">
<img src="@/assets/payment/back.png" @click="show=false" > <img src="@/assets/payment/back.png" @click="show=false" >
<span>选择银行卡</span> <span>选择支付渠道</span>
</div> </div>
<scroll> <scroll>
<list-item :item-height="56" class="pay-way"> <list-item :item-height="56" class="pay-way">
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<span>手续费</span> <span>手续费</span>
<span>{{ serviceCharge |currency }}</span> <span>{{ serviceCharge |currency }}</span>
</div> </div>
<div class="info-item" @click="show=true"> <!-- <div class="info-item" @click="show=true">
<span>银行卡</span> <span>银行卡</span>
<span> <span>
<img :src="checkType.img" > <img :src="checkType.img" >
...@@ -108,7 +108,14 @@ ...@@ -108,7 +108,14 @@
<span v-if="sectctNong">({{ selectLast(checkType) }})</span> <span v-if="sectctNong">({{ selectLast(checkType) }})</span>
<img class="arrow" src="@/assets/payment/go.png" > <img class="arrow" src="@/assets/payment/go.png" >
</span> </span>
</div> </div> -->
<list-item :item-height="44">
<item :showArrow="true" @click.native="selectPayType">
<div slot="name">支付渠道</div>
<input
slot="content" v-model="payTypeObj.payType_n" readonly>
</item>
</list-item>
</div> </div>
<bottom-tab> <bottom-tab>
<tab-button class="foot" @click.native="checkPay">去支付</tab-button> <tab-button class="foot" @click.native="checkPay">去支付</tab-button>
...@@ -139,7 +146,14 @@ ...@@ -139,7 +146,14 @@
<span>手续费</span> <span>手续费</span>
<span>{{ serviceCharge }}</span> <span>{{ serviceCharge }}</span>
</div> </div>
<div class="info-item" @click="show=true"> <list-item :item-height="44">
<item :showArrow="true" @click.native="selectPayType">
<div slot="name">支付渠道</div>
<input
slot="content" v-model="payTypeObj.payType_n" readonly>
</item>
</list-item>
<!-- <div class="info-item" @click="show=true">
<span>银行卡</span> <span>银行卡</span>
<span> <span>
<img :src="checkType.img" > <img :src="checkType.img" >
...@@ -147,7 +161,7 @@ ...@@ -147,7 +161,7 @@
<span v-if="sectctNong">({{ selectLast(checkType) }})</span> <span v-if="sectctNong">({{ selectLast(checkType) }})</span>
<img class="arrow" src="@/assets/payment/go.png" > <img class="arrow" src="@/assets/payment/go.png" >
</span> </span>
</div> </div> -->
</div> </div>
</h-content> </h-content>
<bottom-tab> <bottom-tab>
...@@ -193,6 +207,11 @@ export default { ...@@ -193,6 +207,11 @@ export default {
bank_full_name: '', bank_full_name: '',
bank_account_num: '', bank_account_num: '',
}, },
payTypeList: [],
payTypeObj: {
payType: 'ABC_PAY',
payType_n: '农行支付',
},
confirm: false, confirm: false,
show: false, show: false,
showOutside: false, showOutside: false,
...@@ -215,9 +234,9 @@ export default { ...@@ -215,9 +234,9 @@ export default {
} }
}, },
text () { text () {
if (this.checkType.bank_full_name.indexOf('农业') !== -1) { if (this.payTypeObj.payType_n.indexOf('农行') !== -1) {
return 'K码/K令支付' return 'K码/K令支付'
} else if (this.checkType.bank_full_name.indexOf('农业') === -1) { } else if (this.payTypeObj.payType_n.indexOf('农行') === -1) {
return '银联支付' return '银联支付'
} }
}, },
...@@ -225,7 +244,7 @@ export default { ...@@ -225,7 +244,7 @@ export default {
return (this.money * (this.rate / 100)).toFixed(2) return (this.money * (this.rate / 100)).toFixed(2)
}, },
rate () { rate () {
return this.checkType.bank_full_name.indexOf('农业') !== -1 ? 0.0 : 0.18 return this.payTypeObj.payType_n.indexOf('农行') !== -1 ? 0.0 : 0.18
}, },
sumMoney () { sumMoney () {
return (parseFloat(this.serviceCharge) + parseFloat(this.money)).toFixed( return (parseFloat(this.serviceCharge) + parseFloat(this.money)).toFixed(
...@@ -246,6 +265,11 @@ export default { ...@@ -246,6 +265,11 @@ export default {
return notNong return notNong
}, },
}, },
watch: {
'payTypeObj.payType_n' () {
this.confirmToPay()
},
},
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
vm.confirm = false vm.confirm = false
...@@ -255,6 +279,7 @@ export default { ...@@ -255,6 +279,7 @@ export default {
vm.name = from.name vm.name = from.name
vm.getType() vm.getType()
vm.nongBank = [] vm.nongBank = []
vm.getPayType()
}) })
}, },
...@@ -262,6 +287,35 @@ export default { ...@@ -262,6 +287,35 @@ export default {
this.money = this.$route.params.money this.money = this.$route.params.money
}, },
methods: { methods: {
selectPayType (e) {
let vm = this
vm.hlsPopup.selectList({
list: vm.payTypeList,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.payTypeObj.payType = obj.bp_type
vm.payTypeObj.payType_n = obj.bp_type_n
},
})
},
getPayType () {
let vm = this
let url = process.env.basePath + 'payment_type_query'
let param = {}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.payTypeList = res.lists.map(item => {
return {
code: item.pay_type,
code_name: item.pay_type_name,
}
})
}
})
},
selectImg (e) { selectImg (e) {
if (e.bank_full_name.indexOf('建设') !== -1) { if (e.bank_full_name.indexOf('建设') !== -1) {
return js return js
...@@ -333,7 +387,7 @@ export default { ...@@ -333,7 +387,7 @@ export default {
order_id: vm.$route.params.order_id, order_id: vm.$route.params.order_id,
fee: vm.serviceCharge, fee: vm.serviceCharge,
bank_account_id: vm.bank_account_id, bank_account_id: vm.bank_account_id,
pay_type: vm.pay_type, pay_type: vm.payTypeObj.payType,
}, },
} }
hlsPopup.showLoading('请稍候') hlsPopup.showLoading('请稍候')
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="!isSuccess||!isFaild"> <div v-if="isShowpayInfo">
<div class="box-top"> <div class="box-top">
<img src="@/assets/payment/bank-title.png" > <img src="@/assets/payment/bank-title.png" >
</div> </div>
...@@ -114,6 +114,7 @@ export default { ...@@ -114,6 +114,7 @@ export default {
return { return {
name: '', name: '',
url: '', url: '',
showInfo: true, // 展示支付信息
text: this.$route.params.text, text: this.$route.params.text,
info: { info: {
order_number: '', order_number: '',
...@@ -143,6 +144,17 @@ export default { ...@@ -143,6 +144,17 @@ export default {
vm.getInfo() vm.getInfo()
}) })
}, },
computed: {
isShowpayInfo () {
if (this.isSuccess ^ this.isFaild == 0) {
debugger
return true
} else if (this.isSuccess ^ this.isFaild == 1) {
debugger
return false
}
},
},
methods: { methods: {
changePage () { changePage () {
this.$router.push({ this.$router.push({
......
...@@ -99,7 +99,13 @@ ...@@ -99,7 +99,13 @@
<span>手续费</span> <span>手续费</span>
<span>{{ serviceCharge |currency }}</span> <span>{{ serviceCharge |currency }}</span>
</div> </div>
<div class="info-item" @click="show=true"> <list-item :item-height="44">
<item :showArrow="true" @click.native="selectPayType">
<div slot="name">支付渠道</div>
<input
slot="content" v-model="payTypeObj.payType_n" readonly>
</item>
<!-- <div class="info-item" @click="show=true">
<span>银行卡</span> <span>银行卡</span>
<span> <span>
<img :src="checkType.img" > <img :src="checkType.img" >
...@@ -107,8 +113,8 @@ ...@@ -107,8 +113,8 @@
<span v-if="sectctNong">({{ selectLast(checkType) }})</span> <span v-if="sectctNong">({{ selectLast(checkType) }})</span>
<img class="arrow" src="@/assets/payment/go.png" > <img class="arrow" src="@/assets/payment/go.png" >
</span> </span>
</div> </div> -->
</div> </list-item></div>
<bottom-tab> <bottom-tab>
<tab-button class="footer" @click.native="checkPay">立即支付</tab-button> <tab-button class="footer" @click.native="checkPay">立即支付</tab-button>
</bottom-tab> </bottom-tab>
...@@ -139,7 +145,13 @@ ...@@ -139,7 +145,13 @@
<span>手续费</span> <span>手续费</span>
<span>{{ serviceCharge }}</span> <span>{{ serviceCharge }}</span>
</div> </div>
<div class="info-item" @click="show=true"> <list-item :item-height="44">
<item :showArrow="true" @click.native="selectPayType">
<div slot="name">支付渠道</div>
<input
slot="content" v-model="payTypeObj.payType_n" readonly>
</item>
<!-- <div class="info-item" @click="show=true">
<span>银行卡</span> <span>银行卡</span>
<span> <span>
<img :src="checkType.img" > <img :src="checkType.img" >
...@@ -147,8 +159,8 @@ ...@@ -147,8 +159,8 @@
<span v-if="sectctNong">({{ selectLast(checkType) }})</span> <span v-if="sectctNong">({{ selectLast(checkType) }})</span>
<img class="arrow" src="@/assets/payment/go.png" > <img class="arrow" src="@/assets/payment/go.png" >
</span> </span>
</div> </div> -->
</div> </list-item></div>
</h-content> </h-content>
<bottom-tab> <bottom-tab>
<tab-button class="footer" @click.native="affirm">确认订单</tab-button> <tab-button class="footer" @click.native="affirm">确认订单</tab-button>
...@@ -190,6 +202,11 @@ export default { ...@@ -190,6 +202,11 @@ export default {
bank_full_name: '', bank_full_name: '',
bank_account_num: '', bank_account_num: '',
}, },
payTypeList: [],
payTypeObj: {
payType: 'ABC_PAY',
payType_n: '农行支付',
},
confirm: false, confirm: false,
show: false, show: false,
downNum: false, downNum: false,
...@@ -211,9 +228,9 @@ export default { ...@@ -211,9 +228,9 @@ export default {
} }
}, },
text () { text () {
if (this.checkType.bank_full_name.indexOf('农业') !== -1) { if (this.payTypeObj.payType_n.indexOf('农行') !== -1) {
return 'K码/K令支付' return 'K码/K令支付'
} else if (this.checkType.bank_full_name.indexOf('农业') === -1) { } else if (this.payTypeObj.payType_n.indexOf('农行') === -1) {
return '银联支付' return '银联支付'
} }
}, },
...@@ -221,7 +238,7 @@ export default { ...@@ -221,7 +238,7 @@ export default {
return (this.money * (this.rate / 100)).toFixed(2) return (this.money * (this.rate / 100)).toFixed(2)
}, },
rate () { rate () {
return this.checkType.bank_full_name.indexOf('农业') !== -1 ? 0.00 : 0.18 return this.payTypeObj.payType_n.indexOf('农行') !== -1 ? 0.00 : 0.18
}, },
sumMoney () { sumMoney () {
return (parseFloat(this.serviceCharge) + parseFloat(this.money)).toFixed( return (parseFloat(this.serviceCharge) + parseFloat(this.money)).toFixed(
...@@ -250,10 +267,40 @@ export default { ...@@ -250,10 +267,40 @@ export default {
vm.money = vm.$route.params.sumMoney vm.money = vm.$route.params.sumMoney
} }
vm.getType() vm.getType()
vm.getPayType()
// vm.nongBank = [] // vm.nongBank = []
}) })
}, },
methods: { methods: {
selectPayType (e) {
let vm = this
vm.hlsPopup.selectList({
list: vm.payTypeList,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.payTypeObj.payType = obj.bp_type
vm.payTypeObj.payType_n = obj.bp_type_n
},
})
},
getPayType () {
let vm = this
let url = process.env.basePath + 'payment_type_query'
let param = {}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.payTypeList = res.lists.map(item => {
return {
code: item.pay_type,
code_name: item.pay_type_name,
}
})
}
})
},
affirm () { affirm () {
this.confirm = true this.confirm = true
this.confirmToPay() this.confirmToPay()
......
...@@ -240,7 +240,7 @@ export default new Router({ ...@@ -240,7 +240,7 @@ export default new Router({
{path: '/pay-entry', component: PayEntry, name: 'PayEntry', meta: {keepAlive: true}}, {path: '/pay-entry', component: PayEntry, name: 'PayEntry', meta: {keepAlive: true}},
{path: '/contract-record', component: ContractRecord, name: 'ContractRecord', meta: {keepAlive: true}}, {path: '/contract-record', component: ContractRecord, name: 'ContractRecord', meta: {keepAlive: true}},
// 款项支付 // 款项支付
{path: '/payment-pay-entry', component: PaymentPayEntry, name: 'PaymentPayEntry', meta: {keepAlive: false}}, {path: '/payment-pay-entry', component: PaymentPayEntry, name: 'PaymentPayEntry', meta: {keepAlive: true}},
{path: '/new-list', component: NewList, name: 'NewList', meta: {keepAlive: true}}, {path: '/new-list', component: NewList, name: 'NewList', meta: {keepAlive: true}},
{path: '/payment-contract-record', component: PaymentContractRecord, name: 'PaymentContractRecord', meta: {keepAlive: true}}, {path: '/payment-contract-record', component: PaymentContractRecord, name: 'PaymentContractRecord', meta: {keepAlive: true}},
// 保证金支付 // 保证金支付
......
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