Merge remote-tracking branch 'origin/master' into release/0811

# Conflicts:
#	src/views/ebiz/agentEenter/AgentEenterBasicInfor.vue
This commit is contained in:
阳华祥
2020-08-11 14:03:27 +08:00
4 changed files with 105 additions and 49 deletions

View File

@@ -0,0 +1,11 @@
export default function getBankCode(data, bankName) {
if (bankName) {
let list = data.filter(item => {
return item.bankName == bankName
})
console.log(list[0].code, 'list[0].code')
if (list[0].code) {
return list[0].code
}
}
}

View File

@@ -1,7 +1,12 @@
import { getBankList } from '@/api/ebiz/sale/sale'
export default function getBankName(data, code) {
if (code) {
return data.filter(item => {
let list = data.filter(item => {
return item.code == code
})[0].bankName
})
console.log(list[0].bankName)
if (list[0].bankName) {
return list[0].bankName
}
}
}

View File

@@ -0,0 +1,28 @@
import { getBankList } from '@/api/ebiz/sale/sale'
const myMixin = {
data() {
return {
bankList: [] //银行名称列表
}
},
methods: {
getBankList() {
let data = {
operateType: this.operateType
}
getBankList(data).then(res => {
if (res.result == '0') {
this.bankList = res.content
this.bankList1 = res.content
} else {
this.$toast(res.resultMessage)
}
})
}
},
created() {
console.log('1111111111111')
this.getBankList()
}
}
export default myMixin

View File

@@ -118,7 +118,16 @@
<van-field v-model="userInfo.address" label="联系地址" name="联系地址" placeholder="请输入" v-validate="'required'" required clearable />
<!-- <van-field v-model="userInfo.zip" label="邮政编码" name="邮政编码" placeholder="请输入" v-validate="'required|zipCode'" required clearable /> -->
<van-field v-model="userInfo.zip" label="邮政编码" name="邮政编码" placeholder="请输入" v-validate="'zipCode'" clearable />
<van-field :value="userInfo.bankName" label="开户银行" name="开户银行" v-validate="'required'" required readonly />
<van-field
placeholder="请选择"
@click="islistShow = true"
v-model="bankName"
label="开户银行"
name="开户银行"
v-validate="'required'"
required
readonly
/>
<!-- @click="focus"
right-icon="arrow"
data-vv-name="开户银行" -->
@@ -263,12 +272,7 @@
<van-popup v-model="isScan" style="height:100vh" position="bottom">
<BankCardScan :scanShow="isScan" @getScanInfo="getBankCardInfo" :clear="isClear"></BankCardScan>
</van-popup>
<!-- 开户银行选择 -->
<van-popup v-model="show" position="bottom" style="height:400px">
<van-list>
<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-popup>
<!-- 二次输入银行卡号校验弹出 -->
<van-dialog id="card" v-model="checkShow" show-cancel-button @confirm="bankCodeConfirm(bankCode)">
<p class="p10 fs16 text-center green mt5">请再次输入银行卡号</p>
@@ -277,6 +281,8 @@
</van-cell-group>
<p class="fs14 mt5 ml5">是否确认提交一旦提交在人管审批之前无法再次进行修改</p>
</van-dialog>
<!--开户银行选择-->
<SelectBankName :inputShow="inputShow" :listShow.sync="islistShow" :operateType="'enter_bank_type'" @getBank="getBank"></SelectBankName>
</div>
</template>
<script>
@@ -291,10 +297,15 @@ import idNoCheck from '@/assets/js/utils/idNoCheck'
// import DataDictionary from '@/assets/js/utils/data-dictionary'
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
import { getBankList } from '@/api/ebiz/sale/sale'
import RsTop from '@/components/ebiz/agentEenter/RsTop'
import { saveOrUpdateInfo, agentAll } from '@/api/ebiz/agentEenter/agentEenter.js'
import { idToData } from '@/views/ebiz/customer/js/verification'
import SelectBankName from '@/components/ebiz/account/SelectBankName'
import getBankName from '@/components/ebiz/account/getBankName'
import getBankCode from '@/components/ebiz/account/getBankCode'
import { getBankList } from '@/api/ebiz/sale/sale'
import MinXin from '@/components/ebiz/account/mixins'
import {
selectComp,
// appCallBack,
@@ -311,7 +322,9 @@ import {
export default {
name: 'insuredInfo',
mixins: MinXin,
components: {
SelectBankName, //开户银行弹窗
[SelectRadio.name]: SelectRadio,
[FieldDatePicter.name]: FieldDatePicter,
[OccupationPicker.name]: OccupationPicker,
@@ -332,15 +345,16 @@ export default {
},
data() {
return {
inputShow: false, //模糊查询功能
islistShow: false, //选择银行弹窗
bankList: [], //银行名称列表
code: '',
bankName: '', //银行名称
bankCode: '', //二次输入的银行卡号
checkShow: false, //银行卡校验弹框是否显示 false-不显示 true-显示
isScan: false, //是否显示证件扫描组件
//是否清空
isClear: false,
// 银行列表弹框
show: false,
// 银行卡列表
bankList: [],
sexRadio: [
{
label: '男',
@@ -405,7 +419,7 @@ export default {
address: '', //现住址
bankProvince: '', // 开户省
bankCity: '', // 开户市
bankName: '工商银行', // 开户银行
bankName: '', // 开户银行
// 银行卡号
bankCode: '',
rgtAddress: '', //户口所在地
@@ -436,15 +450,36 @@ export default {
}
}
},
created() {
this.getBankList()
},
mounted() {
// 筛选按钮的点击事件
// window.appCallBack = this.appCallBack
window.appCallBack = this.appCallBack
this.agentAll()
// // 获取银行卡
// this.getBankList()
},
methods: {
// 获取银行卡列表
getBankList() {
let data = {
operateType: 'enter_bank_type'
}
getBankList(data).then(res => {
if (res.result == '0') {
this.bankList = res.content
this.bankList1 = res.content
} else {
this.$toast(res.resultMessage)
}
})
},
getBank(bank) {
//获取银行名称
this.bankName = bank.bankName
this.code = bank.code
},
//获取推荐人信息
agentAll() {
let data = {
@@ -468,39 +503,15 @@ export default {
this.userInfo.age = idToData(this.userInfo.idNo).age
this.userInfo.sex = idToData(this.userInfo.idNo).sex
}
this.userInfo.bankName = '工商银行'
if (this.userInfo.bankName) {
this.bankName = getBankName(this.bankList, this.userInfo.bankName)
}
this.userInfo.nationality = 'CHN'
}
})
},
// 获取银行卡列表
getBankList() {
let self = this
let data = {
operateType: 'enter_bank_type'
}
getBankList(data).then(res => {
if (res.result == '0') {
console.log('银行卡列表', res.content)
self.bankList = res.content
} else {
this.$toast(res.resultMessage)
}
})
},
// 选择银行卡
clickList(item, bankCode) {
console.log('英航卡', item, bankCode)
// let that = this
// that.userInfo.bankName = item
// // that.userInfo.bankCode = bankCode
// that.show = false
},
// 获取银行列表的focus
focus() {
let that = this
that.show = true
},
//监听名字变化
nameChange(name) {
this.userInfo.name = name
@@ -562,9 +573,10 @@ export default {
if (this.userInfo.name != this.userInfo.accountName) {
return this.$toast('姓名与开户名要一致')
}
if (this.userInfo.bankName == '工商银行') {
this.userInfo.bankName = '102'
}
// if (this.userInfo.bankName == '工商银行') {
// this.userInfo.bankName = '102'
// }
this.userInfo.bankName = getBankCode(this.bankList, this.bankName)
if (
//学历为初中、小学、其他、文盲阻断入司
Number(this.userInfo.degree) == 13 ||