[NEW]【自助入司流程优化】入司申请入司健康告知提交时,增加银行卡检验

This commit is contained in:
yuweiqi
2020-05-11 14:57:45 +08:00
parent 2930de9f0b
commit 9ddee12df5

View File

@@ -45,24 +45,16 @@
</div>
<van-button plain @click="allFalse" type="primary" class="w325 m20" size="danger">一键全无</van-button>
</div>
<van-dialog v-model="show" show-cancel-button @confirm="bankCodeConfirm(bankCode)">
<p class="p10 fs16 text-center green mt5">请再次输入银行卡号</p>
<van-cell-group class="flex align-items-c pr5 mb15">
<van-field label="银行卡号:" name="银行卡号" maxlength="19" v-model="bankCode" clearable />
</van-cell-group>
<p class="fs14 mt5 ml5">是否确认提交一旦提交在人管审批之前无法再次进行修改</p>
</van-dialog>
<div class="flex justify-content-s bottom-btn bg-white">
<van-button
class="bottom0 left0"
square
plain
type="danger"
v-no-more-click="1000"
@click="goBack"
size="large"
>上一步</van-button>
<van-button
class="bottom0 left0"
square
type="danger"
size="large"
@click="nextStep"
v-no-more-click="1000"
>提交信息</van-button>
<van-button class="bottom0 left0" square plain type="danger" v-no-more-click="1000" @click="goBack" size="large">上一步</van-button>
<van-button class="bottom0 left0" square type="danger" size="large" @click="nextStep" v-no-more-click="1000">提交信息</van-button>
</div>
</div>
</template>
@@ -70,18 +62,22 @@
<script>
import { Collapse, CollapseItem, RadioGroup, Radio, Field, CellGroup, Icon } from 'vant'
import RsTop from '@/components/ebiz/agentEenter/RsTop'
import { saveOrUpdateInfo, getImpart } from '@/api/ebiz/agentEenter/agentEenter'
import { saveOrUpdateInfo, getImpart, agentAll } from '@/api/ebiz/agentEenter/agentEenter'
export default {
data() {
return {
// 告知信息
impartDTOS: [],
isDisabled: false
isDisabled: false,
show: false, //银行卡校验弹框是否显示 false-不显示 true-显示
bankCode: '', //二次输入的银行卡号
initBankCode: '' //基本信息页首次填写的银行卡号
}
},
mounted() {
document.body.style.backgroundColor = '#fff'
this.getImpart()
this.agentAll()
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
@@ -104,6 +100,17 @@ export default {
}
})
},
//获取推荐人信息
agentAll() {
let data = {
// userModel: { mobile: 13000000000 } //线上去掉
}
agentAll(data).then(res => {
if (res.result == '0') {
this.initBankCode = res.content.ebizEnterCustomerDto.bankCode
}
})
},
//获取健康告知列表
getImpart() {
let that = this
@@ -136,8 +143,8 @@ export default {
if (localStorage.agentSex == 0) {
// //姓别为男不显示该题
// this.isDisabled = true
res.splice(7,1);
}
res.splice(7, 1)
}
// else {
// this.isDisabled = false
// }
@@ -197,71 +204,84 @@ export default {
}
}
},
bankCodeConfirm(val) {
if (val == this.initBankCode) {
this.save()
} else {
this.$toast('输入错误,请重新输入!')
this.bankCode = ''
}
},
// 下一步
nextStep() {
let that = this
that.$validator.validate().then(valid => {
if (valid) {
that.impartDTOS.map(item => {
item.impartId = item.impartCode //大题题号
item.impartRemark = ''
delete item.bigCode
if (item.itemDtoLst) {
item.itemDtoLst.map(itm => {
item.impartRemark = itm.impartRemark
itm.impartRemark = ''
})
}
if (item.impartType == '03') {
item.impartId = item.impartCode
if (item.itemDtoLst) {
item.itemDtoLst.map(itm => {
itm.impartId = item.impartCode
delete itm.smallCode
})
}
delete item.impartCode
}
if (item.impartRemark == undefined) {
item.impartRemark = ''
}
this.show = true //
} else {
this.$toast(this.$validator.errors.all()[0])
}
})
},
//保存提交信息
save() {
this.impartDTOS.map(item => {
item.impartId = item.impartCode //大题题号
item.impartRemark = ''
delete item.bigCode
if (item.itemDtoLst) {
item.itemDtoLst.map(itm => {
item.impartRemark = itm.impartRemark
itm.impartRemark = ''
})
that.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let params = {
entryType: 'CUSTOMER_ITEM',
ebizItemDtoLst: {}
// userModel: {
// //线上去掉
// mobile: '13000000000'
// }
}
if (item.impartType == '03') {
item.impartId = item.impartCode
if (item.itemDtoLst) {
item.itemDtoLst.map(itm => {
itm.impartId = item.impartCode
delete itm.smallCode
})
}
params.ebizItemDtoLst = that.impartDTOS
saveOrUpdateInfo(params).then(res => {
that.$toast.clear()
if (res.result == '0') {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/agentEenter/agentEenterBasicSuccess',
forbidSwipeBack: '1',
backToFirst: '1'
},
routerInfo: {
path: '/agentEenter/agentEenterBasicSuccess'
}
})
} else {
this.$toast(res.resultMessage)
delete item.impartCode
}
if (item.impartRemark == undefined) {
item.impartRemark = ''
}
})
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let params = {
entryType: 'CUSTOMER_ITEM',
ebizItemDtoLst: {}
// userModel: {
// //线上去掉
// mobile: '13000000000'
// }
}
params.ebizItemDtoLst = this.impartDTOS
saveOrUpdateInfo(params).then(res => {
this.$toast.clear()
if (res.result == '0') {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/agentEenter/agentEenterBasicSuccess',
forbidSwipeBack: '1',
backToFirst: '1'
},
routerInfo: {
path: '/agentEenter/agentEenterBasicSuccess'
}
})
} else {
this.$toast(this.$validator.errors.all()[0])
this.$toast(res.resultMessage)
}
})
}
@@ -288,16 +308,6 @@ export default {
color: #4a90e2;
}
}
/deep/ .van-field__label {
width: 70%;
}
/deep/ .van-cell__value {
margin-left: 20px;
}
/deep/.van-collapse-item__content {
padding: 0;
}
.allFalse {
position: fixed;
overflow: hidden;