mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-15 21:06:44 +08:00
Merge branch 'feature/GFRS-1036【待确定】微信支付-卡单微信支付' into release/0514
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
<van-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额" />
|
<van-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<!-- 银行卡支付开始 -->
|
<!-- 银行卡支付开始 -->
|
||||||
<div class="money">
|
<!-- <div class="money">
|
||||||
<div>
|
<div>
|
||||||
<img src="../../../assets/images/u10280.png" alt style="margin-top:-5px;margin-right:10px;" />
|
<img src="../../../assets/images/u10280.png" alt style="margin-top:-5px;margin-right:10px;" />
|
||||||
<span class="oi">银行卡支付</span>
|
<span class="oi">银行卡支付</span>
|
||||||
@@ -14,9 +14,26 @@
|
|||||||
<div class="i mr20">
|
<div class="i mr20">
|
||||||
<van-radio-group v-model="radio" class="flex justify-content-fe"><van-radio name="1"></van-radio></van-radio-group>
|
<van-radio-group v-model="radio" class="flex justify-content-fe"><van-radio name="1"></van-radio></van-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
<van-cell-group class="flex align-items-c">
|
||||||
|
<img :src="src" class="pl10" />
|
||||||
|
<van-cell title="银行卡支付" clickable>
|
||||||
|
<!-- <van-checkbox v-model="checked" class="flex justify-content-fe"></van-checkbox> -->
|
||||||
|
<van-radio-group v-model="radio" :disabled="noEdit" class="flex justify-content-fe">
|
||||||
|
<van-radio name=""></van-radio>
|
||||||
|
</van-radio-group>
|
||||||
|
</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
|
<van-cell-group class="flex align-items-c">
|
||||||
|
<img :src="vxSrc" class="vximg" />
|
||||||
|
<van-cell title="微信支付" clickable>
|
||||||
|
<van-radio-group v-model="radio" :disabled="noEdit" class="flex justify-content-fe">
|
||||||
|
<van-radio name="3" @click="vxVerify"></van-radio>
|
||||||
|
</van-radio-group>
|
||||||
|
</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
<!-- 银行卡支付结束 -->
|
<!-- 银行卡支付结束 -->
|
||||||
<van-cell-group>
|
<van-cell-group v-if="radio != '3'">
|
||||||
<van-field
|
<van-field
|
||||||
v-model="underWriteData.name"
|
v-model="underWriteData.name"
|
||||||
label="姓名"
|
label="姓名"
|
||||||
@@ -123,6 +140,10 @@
|
|||||||
<input name="S3Sign" type="hidden" v-model="payParam.S3Sign" />
|
<input name="S3Sign" type="hidden" v-model="payParam.S3Sign" />
|
||||||
</form>
|
</form>
|
||||||
<div class="bg-white bottom-btn"><van-button type="danger" size="large" @click="pay" v-no-more-click="1000">支付</van-button></div>
|
<div class="bg-white bottom-btn"><van-button type="danger" size="large" @click="pay" v-no-more-click="1000">支付</van-button></div>
|
||||||
|
<div class="bg-white bottom-btn" v-if="radio == '3' && !isWeixin">
|
||||||
|
<van-button type="danger" style="width: 50vw;height: 13vw" @click="pay" v-no-more-click="1000">支付</van-button>
|
||||||
|
<van-button type="danger" style="width: 50vw;height: 13vw" @click="share" v-no-more-click="1000">分享</van-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 银行卡扫描按钮 -->
|
<!-- 银行卡扫描按钮 -->
|
||||||
<van-popup v-model="isScan" style="height:100vh" position="bottom">
|
<van-popup v-model="isScan" style="height:100vh" position="bottom">
|
||||||
@@ -134,6 +155,8 @@
|
|||||||
<van-cell v-for="item in bankList" :key="item.code" :title="item.bankName" class="text-center" @click="clickList(item.bankName, item.code)" />
|
<van-cell v-for="item in bankList" :key="item.code" :title="item.bankName" class="text-center" @click="clickList(item.bankName, item.code)" />
|
||||||
</van-list>
|
</van-list>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
<!-- 分享到微信的页面loading -->
|
||||||
|
<Loading :isLoading="isLoading"></Loading>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -146,6 +169,7 @@ Vue.use(Button)
|
|||||||
import { acceptInsurance, getBankList, underWrite, getOrderDetail } from '@/api/ebiz/sale/sale'
|
import { acceptInsurance, getBankList, underWrite, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||||
import { saveOrUpdateAccount, getPayTemp } from '@/api/ebiz/cardList/cardList.js'
|
import { saveOrUpdateAccount, getPayTemp } from '@/api/ebiz/cardList/cardList.js'
|
||||||
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
||||||
|
import Loading from '@/components/ebiz/Loading'
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
export default {
|
export default {
|
||||||
name: 'pay',
|
name: 'pay',
|
||||||
@@ -157,10 +181,16 @@ export default {
|
|||||||
[List.name]: List,
|
[List.name]: List,
|
||||||
[Cell.name]: Cell,
|
[Cell.name]: Cell,
|
||||||
[RadioGroup.name]: RadioGroup,
|
[RadioGroup.name]: RadioGroup,
|
||||||
[Radio.name]: Radio
|
[Radio.name]: Radio,
|
||||||
|
Loading
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||||
return {
|
return {
|
||||||
|
// 银行卡支付图片地址
|
||||||
|
src: this.$assetsUrl + 'images/cardImg.png',
|
||||||
|
// 微信支付图片地址
|
||||||
|
vxSrc: this.$assetsUrl + 'images/vxImg.png',
|
||||||
// trialList: JSON.parse(localStorage.trialList),
|
// trialList: JSON.parse(localStorage.trialList),
|
||||||
// 核保数据
|
// 核保数据
|
||||||
orderStatus: '',
|
orderStatus: '',
|
||||||
@@ -171,7 +201,7 @@ export default {
|
|||||||
bankCode: '', //银行卡号
|
bankCode: '', //银行卡号
|
||||||
bankName: '' //开户银行
|
bankName: '' //开户银行
|
||||||
},
|
},
|
||||||
radio: '1',
|
radio: '3',
|
||||||
result: [],
|
result: [],
|
||||||
isScan: false, //是否显示证件扫描组件
|
isScan: false, //是否显示证件扫描组件
|
||||||
isClear: false, //是否清空
|
isClear: false, //是否清空
|
||||||
@@ -218,10 +248,32 @@ export default {
|
|||||||
},
|
},
|
||||||
gotPayParam: false, // 是否已正确获取支付参数,
|
gotPayParam: false, // 是否已正确获取支付参数,
|
||||||
payStatus: '', // 接口返回的支付状态
|
payStatus: '', // 接口返回的支付状态
|
||||||
noEdit: true
|
noEdit: true, //是否为编辑
|
||||||
|
isWeixin, // 是否为微信环境
|
||||||
|
isLoading: false // 分享到微信后的页面loading
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {},
|
created() {
|
||||||
|
if (this.isWeixin) {
|
||||||
|
this.radio = '3'
|
||||||
|
let token = this.$route.query.token
|
||||||
|
let orderNo = this.$route.query.orderNo
|
||||||
|
localStorage.token = token
|
||||||
|
localStorage.orderNo = orderNo
|
||||||
|
this.isLoading = true
|
||||||
|
this.$toast.loading({
|
||||||
|
duration: 0, // 持续展示 toast
|
||||||
|
forbidClick: true, // 禁用背景点击
|
||||||
|
loadingType: 'spinner',
|
||||||
|
message: '加载中……'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
this.pay()
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
// 再次支付 调详情 获取信息
|
||||||
|
this.getOrderDetail()
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
@@ -235,6 +287,9 @@ export default {
|
|||||||
// this.underWrite.orderAmount = this.trialList[0].prem
|
// this.underWrite.orderAmount = this.trialList[0].prem
|
||||||
document.body.style.backgroundColor = '#fff'
|
document.body.style.backgroundColor = '#fff'
|
||||||
window.appCallBack = this.appCallBack
|
window.appCallBack = this.appCallBack
|
||||||
|
|
||||||
|
// 不在微信环境下
|
||||||
|
// if (!this.isWeixin) {
|
||||||
// 获取银行卡
|
// 获取银行卡
|
||||||
this.getBankList()
|
this.getBankList()
|
||||||
// this.getOrderDetail()
|
// this.getOrderDetail()
|
||||||
@@ -246,11 +301,13 @@ export default {
|
|||||||
// } else {
|
// } else {
|
||||||
// 再次支付 调详情 获取信息
|
// 再次支付 调详情 获取信息
|
||||||
this.getOrderDetail()
|
this.getOrderDetail()
|
||||||
|
|
||||||
this.getPayTemp()
|
|
||||||
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
|
// this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
|
||||||
// }
|
// }
|
||||||
// console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
|
// console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
|
||||||
|
this.getPayTemp()
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
beforeRouteLeave(to, from, next) {
|
beforeRouteLeave(to, from, next) {
|
||||||
document.body.style.backgroundColor = ''
|
document.body.style.backgroundColor = ''
|
||||||
@@ -394,26 +451,48 @@ export default {
|
|||||||
console.log('getOrderDetail', res)
|
console.log('getOrderDetail', res)
|
||||||
if (res.result == '0') {
|
if (res.result == '0') {
|
||||||
this.orderStatus = res.orderDTO.orderInfoDTO.orderStatus
|
this.orderStatus = res.orderDTO.orderInfoDTO.orderStatus
|
||||||
|
try {
|
||||||
|
if (this.noEdit) {
|
||||||
|
if (res.orderDTO.paymentDTO.cardBookType == '3') {
|
||||||
|
this.radio = '3'
|
||||||
|
} else {
|
||||||
|
this.radio = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
//TODO handle the exception
|
||||||
|
}
|
||||||
this.$toast.clear()
|
this.$toast.clear()
|
||||||
console.log(res.orderDTO.orderAccountDTO.bankCode)
|
console.log(res.orderDTO.orderAccountDTO.bankCode)
|
||||||
this.underWriteData = {
|
this.underWriteData = {
|
||||||
appntName: res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName,
|
appntName: res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName,
|
||||||
name: res.orderDTO.appntDTO.name,
|
name: res.orderDTO.appntDTO.name,
|
||||||
bankCode: res.orderDTO.orderAccountDTO.cardBookCode,
|
// bankName: res.orderDTO.orderAccountDTO.bankCode,
|
||||||
bankName: res.orderDTO.orderAccountDTO.bankCode,
|
// bankCode: res.orderDTO.orderAccountDTO.cardBookCode,
|
||||||
cardBookCode: res.orderDTO.orderAccountDTO.cardBookCode,
|
// cardBookCode: res.orderDTO.orderAccountDTO.cardBookCode,
|
||||||
|
idType: res.orderDTO.appntDTO.idType,
|
||||||
orderAmount: res.orderDTO.orderInfoDTO.orderAmount,
|
orderAmount: res.orderDTO.orderInfoDTO.orderAmount,
|
||||||
orderNo: res.orderDTO.orderAccountDTO.orderNo,
|
orderNo: res.orderDTO.orderAccountDTO.orderNo,
|
||||||
result: '',
|
result: '',
|
||||||
resultMessage: '交易处理成功',
|
resultMessage: '交易处理成功',
|
||||||
uwResult: '02'
|
uwResult: '02'
|
||||||
}
|
}
|
||||||
this.bankListName = res.orderDTO.orderAccountDTO.bankName
|
// this.bankListName = res.orderDTO.orderAccountDTO.bankName
|
||||||
// window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData))
|
this.underWriteData.bankCode =
|
||||||
|
res.orderDTO.orderAccountDTO.cardBookCode !== null ? res.orderDTO.orderAccountDTO.cardBookCode : this.$route.query.bankCode
|
||||||
|
this.underWriteData.bankName = res.orderDTO.orderAccountDTO.bankCode !== null ? res.orderDTO.orderAccountDTO.bankCode : this.$route.query.bankName
|
||||||
|
this.underWriteData.cardBookCode =
|
||||||
|
res.orderDTO.orderAccountDTO.cardBookCode !== null ? res.orderDTO.orderAccountDTO.cardBookCode : this.$route.query.bankCode
|
||||||
|
this.bankListName = res.orderDTO.orderAccountDTO.bankName !== null ? res.orderDTO.orderAccountDTO.bankName : this.$route.query.bankListName
|
||||||
|
|
||||||
|
// if (this.isWeixin) {
|
||||||
|
// this.pay()
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
this.underWriteData = {
|
this.underWriteData = {
|
||||||
accountName: '',
|
accountName: '',
|
||||||
appntName: '',
|
appntName: '',
|
||||||
|
idType: '',
|
||||||
bankCode: '',
|
bankCode: '',
|
||||||
bankName: '',
|
bankName: '',
|
||||||
cardBookCode: '',
|
cardBookCode: '',
|
||||||
@@ -429,35 +508,35 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取支付信息
|
// 获取支付信息
|
||||||
async underWrite() {
|
// async underWrite() {
|
||||||
let data = {
|
// let data = {
|
||||||
platform: 'app',
|
// platform: 'app',
|
||||||
type: '1',
|
// type: '1',
|
||||||
orderDTO: {
|
// orderDTO: {
|
||||||
orderInfoDTO: {
|
// orderInfoDTO: {
|
||||||
orderNo: window.localStorage.getItem('orderNo')
|
// orderNo: window.localStorage.getItem('orderNo')
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return underWrite(data)
|
// return underWrite(data)
|
||||||
// .then(res => {
|
// // .then(res => {
|
||||||
// console.log(res);
|
// // console.log(res);
|
||||||
// if (res.result == '0') {
|
// // if (res.result == '0') {
|
||||||
// this.$toast.clear()
|
// // this.$toast.clear()
|
||||||
// if (res.uwResult == '33') {
|
// // if (res.uwResult == '33') {
|
||||||
// window.localStorage.setItem('uwResult', res.uwResult)
|
// // window.localStorage.setItem('uwResult', res.uwResult)
|
||||||
// window.localStorage.setItem('resultMessage', res.message)
|
// // window.localStorage.setItem('resultMessage', res.message)
|
||||||
// } else {
|
// // } else {
|
||||||
// window.localStorage.setItem('uwResult', res.uwResult)
|
// // window.localStorage.setItem('uwResult', res.uwResult)
|
||||||
// }
|
// // }
|
||||||
// this.underWriteData = res
|
// // this.underWriteData = res
|
||||||
// return true
|
// // return true
|
||||||
// } else {
|
// // } else {
|
||||||
// return false
|
// // return false
|
||||||
// this.$toast(res.resultMessage)
|
// // this.$toast(res.resultMessage)
|
||||||
// }
|
// // }
|
||||||
// })
|
// // })
|
||||||
},
|
// },
|
||||||
async pay() {
|
async pay() {
|
||||||
let valid = await this.$validator.validate()
|
let valid = await this.$validator.validate()
|
||||||
console.log(valid)
|
console.log(valid)
|
||||||
@@ -465,7 +544,6 @@ export default {
|
|||||||
console.log(this.$validator)
|
console.log(this.$validator)
|
||||||
return this.$toast(this.$validator.errors.all()[0])
|
return this.$toast(this.$validator.errors.all()[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (this.orderStatus) {
|
switch (this.orderStatus) {
|
||||||
case '56':
|
case '56':
|
||||||
case '57':
|
case '57':
|
||||||
@@ -486,7 +564,8 @@ export default {
|
|||||||
acceptInsurance() {
|
acceptInsurance() {
|
||||||
let data = {
|
let data = {
|
||||||
orderNo: window.localStorage.getItem('orderNo'),
|
orderNo: window.localStorage.getItem('orderNo'),
|
||||||
cardOrder: 'cardOrder'
|
cardOrder: 'cardOrder',
|
||||||
|
payType: this.radio
|
||||||
}
|
}
|
||||||
acceptInsurance(data).then(res => {
|
acceptInsurance(data).then(res => {
|
||||||
console.log('----取支付参数结果:', JSON.stringify(res))
|
console.log('----取支付参数结果:', JSON.stringify(res))
|
||||||
@@ -517,6 +596,9 @@ export default {
|
|||||||
window.localStorage.setItem('payStatus', res.payStatus)
|
window.localStorage.setItem('payStatus', res.payStatus)
|
||||||
window.localStorage.setItem('payInfo', JSON.stringify(res))
|
window.localStorage.setItem('payInfo', JSON.stringify(res))
|
||||||
this.underWriteData.bankListName = this.bankListName
|
this.underWriteData.bankListName = this.bankListName
|
||||||
|
if(this.radio == '3'){
|
||||||
|
this.underWriteData.bankCode = ''
|
||||||
|
}
|
||||||
localStorage['cardList-detail'] = JSON.stringify(this.underWriteData)
|
localStorage['cardList-detail'] = JSON.stringify(this.underWriteData)
|
||||||
let thisRef = this
|
let thisRef = this
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -529,44 +611,76 @@ export default {
|
|||||||
}, 100)
|
}, 100)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$toast.clear()
|
if (!this.isWeixin) {
|
||||||
|
this.$toast.clear()
|
||||||
|
} else {
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
this.$toast(res.resultMessage)
|
this.$toast(res.resultMessage)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 点击支付
|
// 点击支付
|
||||||
async payMent(flag) {
|
async payMent(flag) {
|
||||||
let data = {
|
if (this.radio == '') {
|
||||||
orderDTO: {
|
let data = {
|
||||||
orderInfoDTO: {
|
orderDTO: {
|
||||||
orderNo: window.localStorage.getItem('orderNo')
|
orderInfoDTO: {
|
||||||
},
|
orderNo: window.localStorage.getItem('orderNo')
|
||||||
orderAccountDTO: {
|
},
|
||||||
accountType: '0',
|
orderAccountDTO: {
|
||||||
accountName: this.underWriteData.name,
|
accountType: '0',
|
||||||
bankName: this.bankListName,
|
accountName: this.underWriteData.name,
|
||||||
bankCode: this.underWriteData.bankName,
|
bankName: this.bankListName,
|
||||||
cardBookType: '1',
|
bankCode: this.underWriteData.bankName,
|
||||||
cardBookCode: this.underWriteData.bankCode,
|
cardBookType: '1',
|
||||||
isAutoPay: '0',
|
cardBookCode: this.underWriteData.bankCode,
|
||||||
isAutoRenewal: '1'
|
isAutoPay: '0',
|
||||||
|
isAutoRenewal: '1'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
this.$toast.loading({
|
||||||
this.$toast.loading({
|
duration: 0, // 持续展示 toast
|
||||||
duration: 0, // 持续展示 toast
|
forbidClick: true, // 禁用背景点击
|
||||||
forbidClick: true, // 禁用背景点击
|
loadingType: 'spinner',
|
||||||
loadingType: 'spinner',
|
message: '加载中……'
|
||||||
message: '加载中……'
|
})
|
||||||
})
|
/*
|
||||||
/*
|
支付之前要先保存银行账户信息
|
||||||
支付之前要先保存银行账户信息
|
*/
|
||||||
*/
|
let res = await saveOrUpdateAccount(data)
|
||||||
let res = await saveOrUpdateAccount(data)
|
// .then(res => {
|
||||||
// .then(res => {
|
console.log('res', res)
|
||||||
console.log('res', res)
|
this.$toast.clear()
|
||||||
this.$toast.clear()
|
if (res.result == '0') {
|
||||||
if (res.result == '0') {
|
this.$toast.loading({
|
||||||
|
duration: 0, // 持续展示 toast
|
||||||
|
forbidClick: true, // 禁用背景点击
|
||||||
|
loadingType: 'spinner',
|
||||||
|
message: '加载中……'
|
||||||
|
})
|
||||||
|
|
||||||
|
// if (!flag) {
|
||||||
|
// let rs = await this.underWrite()
|
||||||
|
|
||||||
|
// if (rs.result != '0') {
|
||||||
|
// this.$toast.clear()
|
||||||
|
// return this.$toast(rs.resultMessage)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (rs.uwResult != '02') {
|
||||||
|
// return this.$toast(rs.message)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
this.acceptInsurance()
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
|
// })
|
||||||
|
} else {
|
||||||
this.$toast.loading({
|
this.$toast.loading({
|
||||||
duration: 0, // 持续展示 toast
|
duration: 0, // 持续展示 toast
|
||||||
forbidClick: true, // 禁用背景点击
|
forbidClick: true, // 禁用背景点击
|
||||||
@@ -574,24 +688,59 @@ export default {
|
|||||||
message: '加载中……'
|
message: '加载中……'
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!flag) {
|
// if (!flag) {
|
||||||
let rs = await this.underWrite()
|
// let rs = await this.underWrite()
|
||||||
|
|
||||||
if (rs.result != '0') {
|
// if (rs.result != '0') {
|
||||||
this.$toast.clear()
|
// this.$toast.clear()
|
||||||
return this.$toast(rs.resultMessage)
|
// return this.$toast(rs.resultMessage)
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (rs.uwResult != '02') {
|
// if (rs.uwResult != '02') {
|
||||||
return this.$toast(rs.message)
|
// return this.$toast(rs.message)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.acceptInsurance()
|
this.acceptInsurance()
|
||||||
} else {
|
|
||||||
this.$toast(res.resultMessage)
|
|
||||||
}
|
}
|
||||||
// })
|
},
|
||||||
|
// 选择微信支付校验身份证类型
|
||||||
|
vxVerify() {
|
||||||
|
if (this.underWriteData.idType != '1') {
|
||||||
|
this.$dialog
|
||||||
|
.confirm({
|
||||||
|
message: '证件类型不是身份证,无法使用微信支付',
|
||||||
|
showCancelButton: false
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.radio = ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async share() {
|
||||||
|
let valid = await this.$validator.validate()
|
||||||
|
console.log(valid)
|
||||||
|
if (true !== valid) {
|
||||||
|
console.log(this.$validator)
|
||||||
|
return this.$toast(this.$validator.errors.all()[0])
|
||||||
|
}
|
||||||
|
let shareName = this.underWriteData.name
|
||||||
|
localStorage.name = this.underWriteData.name
|
||||||
|
localStorage.bankName = this.underWriteData.bankName
|
||||||
|
localStorage.bankCode = this.underWriteData.bankCode
|
||||||
|
localStorage.bankListName = this.bankListName
|
||||||
|
console.log(this.underWriteData.bankName, this.underWriteData.bankCode, this.bankListName, this.underWriteData.name)
|
||||||
|
let url = location.origin + '/#/cardList/pay?orderNo=' + localStorage.orderNo + '&token=' + localStorage.token
|
||||||
|
console.log(url)
|
||||||
|
EWebBridge.webCallAppInJs('bridge', {
|
||||||
|
flag: 'share',
|
||||||
|
extra: {
|
||||||
|
title: `国富人寿卡单投保(${shareName})付款`,
|
||||||
|
content: '付款进行',
|
||||||
|
url: url,
|
||||||
|
img: this.$assetsUrl + 'images/logo.png'
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -602,36 +751,12 @@ export default {
|
|||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.oi {
|
|
||||||
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';
|
|
||||||
font-weight: 700;
|
|
||||||
font-style: normal;
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
.money {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
z-index: 100;
|
|
||||||
background: white;
|
|
||||||
height: 40px;
|
|
||||||
overflow: hidden;
|
|
||||||
> div:nth-of-type(1) {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
img {
|
.vximg {
|
||||||
width: 33px;
|
width: 23px;
|
||||||
height: 32px;
|
height: 23px;
|
||||||
}
|
padding-left: 13px;
|
||||||
span {
|
padding-right: 3px;
|
||||||
font-size: 14px;
|
box-sizing: content-box;
|
||||||
}
|
|
||||||
}
|
|
||||||
> div:nth-of-type(2) {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<van-cell-group v-if="payStatus == 1">
|
<van-cell-group v-if="payStatus == 1">
|
||||||
<van-cell title="产品名称" :value="card.appntName" />
|
<van-cell title="产品名称" :value="card.appntName" />
|
||||||
<van-cell title="支付金额" :value="`${payInfo.amnt}元` | moneyFormat" v-if="payInfo.amnt != ''" />
|
<van-cell title="支付金额" :value="`${payInfo.amnt}元` | moneyFormat" v-if="payInfo.amnt != ''" />
|
||||||
<van-cell title="卡号" :value="card.bankCode" />
|
<van-cell v-if="card.bankCode" title="卡号" :value="card.bankCode" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<!-- <div v-if="payStatus != '2' && payStatus != '1'" class=" p10 pb250 bg-white">
|
<!-- <div v-if="payStatus != '2' && payStatus != '1'" class=" p10 pb250 bg-white">
|
||||||
<span class="pt150 fs14"> 如有相关问题,请联系信息技术部运维人员</span>
|
<span class="pt150 fs14"> 如有相关问题,请联系信息技术部运维人员</span>
|
||||||
@@ -32,13 +32,24 @@
|
|||||||
<!-- <div class="bottom-btn bg-white" v-if="payStatus == '1' || payStatus == '4' || payStatus == '8'">
|
<!-- <div class="bottom-btn bg-white" v-if="payStatus == '1' || payStatus == '4' || payStatus == '8'">
|
||||||
<van-button type="danger" size="large" @click="next" v-no-more-click="1000">返回首页</van-button>
|
<van-button type="danger" size="large" @click="next" v-no-more-click="1000">返回首页</van-button>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="bottom-btn bg-white" v-if="payStatus == '1' || payStatus == '4' || payStatus == '8'">
|
<template v-if="!isWeixin">
|
||||||
<van-button type="danger" size="large" @click="next" v-no-more-click="1000">返回首页</van-button>
|
<div class="bottom-btn bg-white" v-if="payStatus == '1' || payStatus == '4' || payStatus == '8'">
|
||||||
</div>
|
<van-button type="danger" size="large" @click="next" v-no-more-click="1000">返回首页</van-button>
|
||||||
<div class="bottom-area bottom-btn flex" v-if="payStatus == '2' || payStatus == '9'">
|
</div>
|
||||||
<van-button class="m-btn w250" type="danger" size="normal" @click="rePayMent">重新支付</van-button>
|
<div class="bottom-area bottom-btn flex" v-if="payStatus == '2' || payStatus == '9'">
|
||||||
<van-button class="m-btn w250" type="danger" size="normal" @click="next">返回首页</van-button>
|
<van-button class="m-btn w250" type="danger" size="normal" @click="rePayMent">重新支付</van-button>
|
||||||
</div>
|
<van-button class="m-btn w250" type="danger" size="normal" @click="next">返回首页</van-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="bottom-btn bg-white" v-if="payStatus == '1' || payStatus == '4' || payStatus == '8'">
|
||||||
|
<van-button type="danger" size="large" @click="close" v-no-more-click="1000">返回</van-button>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-area bottom-btn flex" v-if="payStatus == '2' || payStatus == '9'">
|
||||||
|
<van-button class="m-btn w250" type="danger" size="normal" @click="rePayMent">重新支付</van-button>
|
||||||
|
<van-button class="m-btn w250" type="danger" size="normal" @click="next">返回</van-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<!-- <div class="bottom-area bottom-btn flex" v-if="payStatus == '9'">
|
<!-- <div class="bottom-area bottom-btn flex" v-if="payStatus == '9'">
|
||||||
<van-button class="m-btn w250" type="danger" size="normal" @click="rePayMent">重新支付</van-button>
|
<van-button class="m-btn w250" type="danger" size="normal" @click="rePayMent">重新支付</van-button>
|
||||||
<van-button class="m-btn w250" type="danger" size="normal" @click="changeCard">换卡支付</van-button>
|
<van-button class="m-btn w250" type="danger" size="normal" @click="changeCard">换卡支付</van-button>
|
||||||
@@ -56,7 +67,9 @@ import { Cell, CellGroup } from 'vant'
|
|||||||
import { getPayState } from '@/api/ebiz/sale/sale'
|
import { getPayState } from '@/api/ebiz/sale/sale'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||||
return {
|
return {
|
||||||
|
isWeixin,
|
||||||
// 保融收银台返回的支付流水号
|
// 保融收银台返回的支付流水号
|
||||||
paySeqNo: '',
|
paySeqNo: '',
|
||||||
// 接口返回数据前,不做页面渲染
|
// 接口返回数据前,不做页面渲染
|
||||||
@@ -158,6 +171,9 @@ export default {
|
|||||||
path: '/cardList/pay'
|
path: '/cardList/pay'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
close(){
|
||||||
|
WeixinJSBridge.call("closeWindow");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
@@ -270,6 +270,7 @@ import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
|
|||||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||||
import areaList from '@/assets/js/utils/area'
|
import areaList from '@/assets/js/utils/area'
|
||||||
import { saveOrUpdateCard } from '@/api/ebiz/cardList/cardList.js'
|
import { saveOrUpdateCard } from '@/api/ebiz/cardList/cardList.js'
|
||||||
|
import { underWrite } from '@/api/ebiz/sale/sale'
|
||||||
import utilsAge from '@/assets/js/utils/age'
|
import utilsAge from '@/assets/js/utils/age'
|
||||||
import getAreaName from '@/assets/js/utils/get-area-name'
|
import getAreaName from '@/assets/js/utils/get-area-name'
|
||||||
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
|
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
|
||||||
@@ -410,6 +411,45 @@ export default {
|
|||||||
this.allPrice = this.trialList[0].prem
|
this.allPrice = this.trialList[0].prem
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
underWrite(orderNo) {
|
||||||
|
let data = {
|
||||||
|
platform: 'app',
|
||||||
|
type: '1',
|
||||||
|
orderDTO: {
|
||||||
|
orderInfoDTO: {
|
||||||
|
orderNo: orderNo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
underWrite(data)
|
||||||
|
.then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.result == '0') {
|
||||||
|
this.$toast.clear()
|
||||||
|
if (res.uwResult == '33') {
|
||||||
|
window.localStorage.setItem('uwResult', res.uwResult)
|
||||||
|
window.localStorage.setItem('resultMessage', res.message)
|
||||||
|
} else {
|
||||||
|
window.localStorage.setItem('uwResult', res.uwResult)
|
||||||
|
}
|
||||||
|
this.underWriteData = res
|
||||||
|
this.$jump({
|
||||||
|
flag: 'h5',
|
||||||
|
extra: {
|
||||||
|
url: location.origin + `/#/cardList/pay`,
|
||||||
|
forbidSwipeBack: 1
|
||||||
|
},
|
||||||
|
routerInfo: {
|
||||||
|
path: `/cardList/pay`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
goDocu(url, name) {
|
goDocu(url, name) {
|
||||||
// let pdfUrl = //encodeURIComponent(url)
|
// let pdfUrl = //encodeURIComponent(url)
|
||||||
localStorage.setItem('cardListPDF', JSON.stringify({ documentUrl: url, title: name }))
|
localStorage.setItem('cardListPDF', JSON.stringify({ documentUrl: url, title: name }))
|
||||||
@@ -1016,7 +1056,7 @@ export default {
|
|||||||
|
|
||||||
let resultData = await saveOrUpdateCard(params)
|
let resultData = await saveOrUpdateCard(params)
|
||||||
if (resultData.result == 0) {
|
if (resultData.result == 0) {
|
||||||
console.log(' resultData.orderNo', resultData.content.object)
|
console.log('resultData.orderNo', resultData.content.object)
|
||||||
//存储被保人信息
|
//存储被保人信息
|
||||||
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||||
// localStorage.saleInsuredInfo = JSON.stringify({
|
// localStorage.saleInsuredInfo = JSON.stringify({
|
||||||
@@ -1030,17 +1070,10 @@ export default {
|
|||||||
// localStorage.saleInsuredInfo = JSON.stringify(this.userInfo)
|
// localStorage.saleInsuredInfo = JSON.stringify(this.userInfo)
|
||||||
// console.log(this.userInfo)
|
// console.log(this.userInfo)
|
||||||
|
|
||||||
localStorage.orderNo = resultData.content.object
|
let orderNo = localStorage.orderNo = resultData.content.object
|
||||||
this.$jump({
|
|
||||||
flag: 'h5',
|
this.underWrite(orderNo)
|
||||||
extra: {
|
|
||||||
url: location.origin + `/#/cardList/pay`,
|
|
||||||
forbidSwipeBack: 1
|
|
||||||
},
|
|
||||||
routerInfo: {
|
|
||||||
path: `/cardList/pay`
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
console.error(resultData.resultMessage)
|
console.error(resultData.resultMessage)
|
||||||
this.$toast(resultData.resultMessage)
|
this.$toast(resultData.resultMessage)
|
||||||
|
|||||||
Reference in New Issue
Block a user