mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-24 18:23:10 +08:00
Merge branch 'feature/50号文展业改动' into dev
This commit is contained in:
@@ -21,6 +21,18 @@
|
||||
data-vv-name="开户银行"
|
||||
/>
|
||||
</van-cell-group>
|
||||
<van-cell-group class="pl20 fs14">
|
||||
<van-field
|
||||
v-model="areaStr"
|
||||
label="开户银行省市"
|
||||
placeholder="请选择"
|
||||
required
|
||||
@click="isAreaListShow = true"
|
||||
readonly
|
||||
v-validate="'required'"
|
||||
data-vv-name="开户银行省市"
|
||||
/>
|
||||
</van-cell-group>
|
||||
<van-cell-group class="pl20 flex align-items-c">
|
||||
<van-field
|
||||
v-model="bankId"
|
||||
@@ -112,16 +124,20 @@
|
||||
<BankCardScan :scanShow="isScan" :clear="isClear" @getScanInfo="getBankCardInfo"></BankCardScan>
|
||||
<!--开户银行选择-->
|
||||
<SelectBankName :inputShow="inputShow" :listShow.sync="islistShow" :operateType="'bank_type'" @getBank="getBank"></SelectBankName>
|
||||
<van-popup position="bottom" v-model="isAreaListShow">
|
||||
<van-area title="省市区" :visible-item-count="4" :area-list="areaList" @confirm="setBankArea" @cancel="isAreaListShow = false" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Cell, CellGroup, Field, RadioGroup, Radio, Popup, List, Switch, Toast, SwitchCell, Icon } from 'vant'
|
||||
import { Cell, CellGroup, Field, RadioGroup, Radio, Popup, List, Switch, Toast, SwitchCell, Icon, Area } from 'vant'
|
||||
import { saveInformation, getOrderDetail, checkCard } from '@/api/ebiz/sale/sale'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
||||
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
||||
import SelectBankName from '@/components/ebiz/account/SelectBankName'
|
||||
import areaList from '@/assets/js/utils/area'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -166,11 +182,25 @@ export default {
|
||||
age: null,
|
||||
productNo: null,
|
||||
salePageFlag: '6',
|
||||
appntDTO: null
|
||||
appntDTO: null,
|
||||
areaList,
|
||||
isAreaListShow: false,
|
||||
accBankProvince: '',
|
||||
accBankCity: '',
|
||||
areaStr: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closePop(value) {
|
||||
setBankArea(areaInfo) {
|
||||
let province = areaInfo[0]
|
||||
let city = areaInfo[1]
|
||||
let county = areaInfo[2]
|
||||
this.accBankProvince = province.code
|
||||
this.accBankCity = city.code
|
||||
this.isAreaListShow = false
|
||||
this.areaStr = province.name + city.name + county.name
|
||||
},
|
||||
closePop() {
|
||||
//关闭选择银行弹窗
|
||||
this.islistShow = false
|
||||
},
|
||||
@@ -268,8 +298,7 @@ export default {
|
||||
},
|
||||
// 单选框选中
|
||||
clickRadio(val) {
|
||||
let that = this
|
||||
that.name = val
|
||||
this.name = val
|
||||
},
|
||||
// 下一步
|
||||
async next() {
|
||||
@@ -277,35 +306,33 @@ export default {
|
||||
this.$toast('本产品年龄大于65岁不能投保')
|
||||
return
|
||||
}
|
||||
let cardData = {}
|
||||
if (this.saleInsuredInfo.idNo) {
|
||||
cardData = {
|
||||
account: this.bankId,
|
||||
idNo: this.saleInsuredInfo.idNo,
|
||||
idType: this.saleInsuredInfo.idType,
|
||||
mobile: this.saleInsuredInfo.mobile,
|
||||
name: this.saleInsuredInfo.name
|
||||
}
|
||||
} else {
|
||||
cardData = {
|
||||
account: this.bankId,
|
||||
idNo: this.appntDTO.idNo,
|
||||
idType: this.appntDTO.idType,
|
||||
mobile: this.appntDTO.mobile,
|
||||
name: this.appntDTO.name
|
||||
}
|
||||
}
|
||||
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
let that = this
|
||||
let valid = await this.$validator.validate()
|
||||
// that.$validator.validate().then(valid => {
|
||||
if (valid === true) {
|
||||
if (valid) {
|
||||
let cardData = {}
|
||||
if (this.saleInsuredInfo.idNo) {
|
||||
cardData = {
|
||||
account: this.bankId,
|
||||
idNo: this.saleInsuredInfo.idNo,
|
||||
idType: this.saleInsuredInfo.idType,
|
||||
mobile: this.saleInsuredInfo.mobile,
|
||||
name: this.saleInsuredInfo.name
|
||||
}
|
||||
} else {
|
||||
cardData = {
|
||||
account: this.bankId,
|
||||
idNo: this.appntDTO.idNo,
|
||||
idType: this.appntDTO.idType,
|
||||
mobile: this.appntDTO.mobile,
|
||||
name: this.appntDTO.name
|
||||
}
|
||||
}
|
||||
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
let res = await checkCard(cardData)
|
||||
this.$toast.clear()
|
||||
if (res.result != '0') {
|
||||
@@ -323,16 +350,18 @@ export default {
|
||||
orderNo: window.localStorage.getItem('orderNo')
|
||||
},
|
||||
orderAccountDTO: {
|
||||
bankName: that.bank,
|
||||
bankCode: that.bankCode,
|
||||
bankName: this.bank,
|
||||
bankCode: this.bankCode,
|
||||
cvv2Code: '0',
|
||||
cardBookCode: that.bankId
|
||||
cardBookCode: this.bankId,
|
||||
accBankProvince: this.accBankProvince,
|
||||
accBankCity: this.accBankCity
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 垫付
|
||||
if (that.checked == true) {
|
||||
if (this.checked == true) {
|
||||
// 续保
|
||||
if (this.isChecked == true) {
|
||||
data = {
|
||||
@@ -343,14 +372,16 @@ export default {
|
||||
orderNo: window.localStorage.getItem('orderNo')
|
||||
},
|
||||
orderAccountDTO: {
|
||||
accountType: that.radio,
|
||||
accountName: that.name,
|
||||
bankName: that.bank,
|
||||
bankCode: that.bankCode,
|
||||
accountType: this.radio,
|
||||
accountName: this.name,
|
||||
bankName: this.bank,
|
||||
bankCode: this.bankCode,
|
||||
cardBookType: '1',
|
||||
cardBookCode: that.bankId,
|
||||
cardBookCode: this.bankId,
|
||||
isAutoPay: '0',
|
||||
isAutoRenewal: '0'
|
||||
isAutoRenewal: '0',
|
||||
accBankProvince: this.accBankProvince,
|
||||
accBankCity: this.accBankCity
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -364,14 +395,16 @@ export default {
|
||||
orderNo: window.localStorage.getItem('orderNo')
|
||||
},
|
||||
orderAccountDTO: {
|
||||
accountType: that.radio,
|
||||
accountName: that.name,
|
||||
bankName: that.bank,
|
||||
bankCode: that.bankCode,
|
||||
accountType: this.radio,
|
||||
accountName: this.name,
|
||||
bankName: this.bank,
|
||||
bankCode: this.bankCode,
|
||||
cardBookType: '1',
|
||||
cardBookCode: that.bankId,
|
||||
cardBookCode: this.bankId,
|
||||
isAutoPay: '0',
|
||||
isAutoRenewal: this.isRenew == '0' ? '1' : ''
|
||||
isAutoRenewal: this.isRenew == '0' ? '1' : '',
|
||||
accBankProvince: this.accBankProvince,
|
||||
accBankCity: this.accBankCity
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -387,14 +420,16 @@ export default {
|
||||
orderNo: window.localStorage.getItem('orderNo')
|
||||
},
|
||||
orderAccountDTO: {
|
||||
accountType: that.radio,
|
||||
accountName: that.name,
|
||||
bankName: that.bank,
|
||||
bankCode: that.bankCode,
|
||||
accountType: this.radio,
|
||||
accountName: this.name,
|
||||
bankName: this.bank,
|
||||
bankCode: this.bankCode,
|
||||
cardBookType: '1',
|
||||
cardBookCode: that.bankId,
|
||||
cardBookCode: this.bankId,
|
||||
isAutoPay: this.isAutoPay == '0' ? '1' : '',
|
||||
isAutoRenewal: '0'
|
||||
isAutoRenewal: '0',
|
||||
accBankProvince: this.accBankProvince,
|
||||
accBankCity: this.accBankCity
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -408,14 +443,16 @@ export default {
|
||||
orderNo: window.localStorage.getItem('orderNo')
|
||||
},
|
||||
orderAccountDTO: {
|
||||
accountType: that.radio,
|
||||
accountName: that.name,
|
||||
bankName: that.bank,
|
||||
bankCode: that.bankCode,
|
||||
accountType: this.radio,
|
||||
accountName: this.name,
|
||||
bankName: this.bank,
|
||||
bankCode: this.bankCode,
|
||||
cardBookType: '1',
|
||||
cardBookCode: that.bankId,
|
||||
cardBookCode: this.bankId,
|
||||
isAutoPay: this.isAutoPay == '0' ? '1' : '',
|
||||
isAutoRenewal: this.isRenew == '0' ? '1' : ''
|
||||
isAutoRenewal: this.isRenew == '0' ? '1' : '',
|
||||
accBankProvince: this.accBankProvince,
|
||||
accBankCity: this.accBankCity
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -424,9 +461,9 @@ export default {
|
||||
}
|
||||
saveInformation(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
window.localStorage.setItem('accountInformationRadio', that.radio)
|
||||
window.localStorage.setItem('accountInformationRadio', this.radio)
|
||||
|
||||
that.$jump({
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/attachmentManagement'
|
||||
@@ -436,13 +473,12 @@ export default {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$toast(res.resultMessage)
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$toast(that.errors.all()[0])
|
||||
this.$toast(this.errors.all()[0])
|
||||
}
|
||||
// })
|
||||
},
|
||||
handleRenew(v) {
|
||||
//大于65不能续保
|
||||
@@ -457,7 +493,6 @@ export default {
|
||||
async created() {
|
||||
let res = await getOrderDetail({ orderNo: localStorage.orderNo })
|
||||
|
||||
console.log(res)
|
||||
if (res.result == 0) {
|
||||
this.appntDTO = res.orderDTO.appntDTO
|
||||
|
||||
@@ -475,6 +510,8 @@ export default {
|
||||
this.bank = res.orderDTO.orderAccountDTO.bankName
|
||||
this.bankCode = res.orderDTO.orderAccountDTO.bankCode
|
||||
this.bankId = res.orderDTO.orderAccountDTO.cardBookCode
|
||||
this.accBankProvince = res.orderDTO.orderAccountDTO.accBankProvince
|
||||
this.accBankCity = res.orderDTO.orderAccountDTO.accBankCity
|
||||
localStorage.setItem('isAutoPay', res.orderDTO.orderAccountDTO.isAutoPay)
|
||||
localStorage.setItem('isAutoRenewal', res.orderDTO.orderAccountDTO.isAutoRenewal)
|
||||
localStorage.setItem('isRenew', res.orderDTO.orderAccountDTO.isRenew)
|
||||
@@ -490,19 +527,17 @@ export default {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
|
||||
let that = this
|
||||
|
||||
// 获取投被保险人是否同一个人
|
||||
if (localStorage.saleInsuredPersonInfo) {
|
||||
that.relationToAppnt = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo')).relationToAppnt
|
||||
this.relationToAppnt = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo')).relationToAppnt
|
||||
// 获取被保险人信息
|
||||
that.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
|
||||
this.saleInsuredPersonInfo = JSON.parse(window.localStorage.getItem('saleInsuredPersonInfo'))
|
||||
}
|
||||
if (localStorage.saleInsuredInfo) {
|
||||
// 获取投保人信息
|
||||
that.saleInsuredInfo = JSON.parse(window.localStorage.getItem('saleInsuredInfo'))
|
||||
this.saleInsuredInfo = JSON.parse(window.localStorage.getItem('saleInsuredInfo'))
|
||||
// 默认是投保人名字
|
||||
that.name = this.saleInsuredInfo.name
|
||||
this.name = this.saleInsuredInfo.name
|
||||
}
|
||||
|
||||
// 是否显示自动垫交
|
||||
@@ -514,8 +549,8 @@ export default {
|
||||
this.isChecked = localStorage.isForceRenew == '0' ? true : false
|
||||
},
|
||||
mounted() {
|
||||
document.body.style.backgroundColor = '#F5F5F5'
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
@@ -524,10 +559,6 @@ export default {
|
||||
// 筛选按钮的点击事件
|
||||
window.appCallBack = this.appCallBack
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
},
|
||||
computed: {
|
||||
listenChange() {
|
||||
const { bankId, bank } = this
|
||||
@@ -563,7 +594,8 @@ export default {
|
||||
BankCardScan,
|
||||
SelectBankName,
|
||||
[Icon.name]: Icon,
|
||||
[IndexBar.name]: IndexBar
|
||||
[IndexBar.name]: IndexBar,
|
||||
[Area.name]: Area
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user