[抖火客户端]

This commit is contained in:
2023-05-15 13:18:38 +08:00
commit d61dde8bd8
818 changed files with 142329 additions and 0 deletions

View File

@@ -0,0 +1,657 @@
<template>
<view class="content">
<view class="top">
<view class="base">
<view class="base-tab">
<view class="base-tab-item">
<image class="base-tab-img" src="/static/icon//bankIcon_01_active.png" mode="aspectFill"></image>
<view class="base-tab-cont">
<view class="base-tab-name">
银行信息
</view>
<view class="base-tab-tips">
待完善
</view>
</view>
</view>
<view class="base-tab-spot">
<text></text>
<text></text>
<text></text>
</view>
<view class="base-tab-item">
<image class="base-tab-img" src="/static/icon/bankIcon_02.png" mode="aspectFill"></image>
<view class="base-tab-cont">
<view class="base-tab-name">
其他信息
</view>
<view @click="nextStep" class="base-tab-tips">
去完善 >
</view>
</view>
</view>
</view>
<view class="white">
<view class="base-title">
<view class="base-name">
基本信息
</view>
<!-- <view class="base-number">
6/12
</view> -->
</view>
<view class="base-list">
<!-- items.type === 'text' || items.type === 'textarea' -->
<view class="base-block" :class="{baseAline : items.flex == 100, radioAline : items.type == 'radio'}" v-for="(items, itemsIndex) in backParams" :key="itemsIndex" v-if="items.pre_key != null ? isShowBlock(backParams, items): true">
<view class="base-block-name" v-if="items.label == 1">
<text>*</text>{{items.title}}
<image class="base-notesIcon" v-if="items.reason != ''" @click="seeTips('驳回原因', items.reason.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<!-- 单输入框 -->
<view class="base-block-write" v-if="items.type === 'price' || items.type === 'number' || items.type === 'text' || items.type === 'password' || items.type === 'mobile' || items.type === 'day'">
<mouldInput class="idcardAdd-input" :blur-value="items.value" :input-type="items.type" :input-key="items.key" @onValue="($event) => {items.value = $event}"></mouldInput>
</view>
<!-- 单选 -->
<!-- 单选 -->
<view class="idcardAdd-aline" v-if="items.type === 'radio'">
<radio-group @change="items.value = parseFloat($event.detail.value)">
<label class="idcardAdd-aline-write" v-for="(limitItem, limitIndex) in items.options" :key="limitIndex">
<radio :value="String(limitIndex)" :checked="items.value === limitIndex" color="#4e7bfe" style="transform:scale(.65)"/>
<text>{{limitItem}}</text>
</label>
</radio-group>
</view>
<!-- 多选 -->
<block v-if="items.type === 'checkbox'">
<mouldCheckbox :checkbox-list="items.options" :checkboxVlaue="items.value || []" @onCheckbox="($event) => {items.value = $event}"></mouldCheckbox>
</block>
<!-- 办卡城市 -->
<view class="base-block-write" v-if="items.type === 'city'">
<mouldInput class="idcardAdd-input" :blur-value="items.value" :input-type="items.type" :input-key="items.key" @onValue="($event) => {items.value = $event}"></mouldInput>
</view>
<!-- 描述 -->
<block v-if="items.label == 1">
<view class="base-block-textarea" v-if="items.type === 'textarea'">
<mouldText class="idcardAdd-depict-textarea" :blur-value="items.value" @onTextarea="($event) => {items.value = $event}"></mouldText>
</view>
</block>
<!-- 下拉框 -->
<view class="base-block-write" v-if="items.type === 'select'">
<mouldSelect class="idcardAdd-picker" :select-value="items.value.toString()" :select-list="items.options" @bankPicker="($event) => {items.value = $event}"></mouldSelect>
<image src="@/static/imgs/basic_down.png" mode="aspectFill"></image>
</view>
<!-- 日期选择 -->
<view class="base-block-write" v-if="items.type === 'date'">
<!-- <picker mode="date" :value-date="values[items.key]" :start="startDate" :end="endDate" @change="($event) => {values[items.key] = $event.detail.value}">
<view class="uni-input">{{values[items.key]}}</view>
</picker> -->
<mouldDate :value-date="items.value || '请选择日期'" class="idcardAdd-picker" @onDate="($event) => {items.value = $event}"></mouldDate>
<image src="@/static/imgs/basic_date.png" mode="aspectFill"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="introduce-btn">
<button class="btn" size="mini" @click="cacheSave">暂时保存</button>
<!-- -->
<view @click="nextStep" class="btn" size="mini">下一步</view>
</view>
<!-- 驳回提示 -->
<mouldTips :see-data="seeData" @tipsClose="($event) => {seeData.seeShow = $event}"></mouldTips>
<!-- 是否使用首次录入信息 -->
<view class="backFirst" v-if="popFirst"></view>
<view class="contFirst" v-if="popFirst">
<view class="tipsWhite">
<view class="tipsWhite-top">
<view class="tipsWhite-name">
温馨提示
</view>
<view class="tipsWhite-text">
是否使用首次录入信息
</view>
</view>
<view class="tipsWhite-btn">
<view class="idcardBtn-go active" @click="popFirst = false">
暂不使用
</view>
<view class="idcardBtn-go" @click="goFirst">
立即使用
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { userBank, cacheBank, cacheBankPut } from '@/apis/interfaces/user'
import mouldCheckbox from '@/components/mould-checkbox.vue'
import mouldInput from '@/components/mould-input.vue'
import mouldRadio from '@/components/mould-radio.vue'
import mouldText from '@/components/mould-text.vue'
import mouldSelect from '@/components/mould_select.vue'
import mouldDate from '@/components/mould-date.vue'
import mouldTips from '@/components/mould-tips.vue'
export default {
components: {
mouldCheckbox,
mouldInput,
mouldRadio,
mouldText,
mouldSelect,
mouldDate,
mouldTips
},
data() {
return {
popFirst : false, // 首次录入信息状态
disabled : false, // 按钮状态
bankData : '', // 基础信息
backParams: [], // 字段数组
// 查看提示组件
seeData : {
seeShow : false,
seeTitle: '',
seeText : '',
},
values : '',
marriage: [],
marriageIndex : 0, // 婚姻选择index
education: [],
educationIndex: 0, // 学历选择index
userId : '', // 第二个id
baseId : '' ,// 第二个id
institutionId: '',
cacheData: '' //缓存数据
}
},
computed: {
// isChecked(){
// return (val, vals) => {
// let valsArr = vals || []
// return valsArr.findIndex(v => v == val) >= 0
// }
// },
isShowBlock(){
return (backParams, items) => {
if(items.pre_key != null){
let paramsValue = backParams.find(v => v.key == items.pre_key)
return paramsValue.value == items.pre_value
}
return true
}
}
},
onShow() {
// 获取基础信息
this.baseInfo();
},
methods: {
// 基础信息
baseInfo() {
uni.showLoading({
title: '加载中...',
mask : true
})
userBank(this.$Route.query.id).then(res => {
// 是否使用首次录入信息
// if(res.is_finish == 0 && res.user_bank) {
// this.popFirst = true
// this.baseId = res.user_bank.user_bank_id
// }
let { item, params, business_order_user_bank_id } = res;
cacheBank(business_order_user_bank_id).then(StorageRes => {
this.userId = res.business_order_user_bank_id
uni.hideLoading()
if(StorageRes === ''){
this.backParams = params
return
}
let storageParams = []
storageParams = params.map(val => {
if(val.type == 'checkbox' && StorageRes[val.key].length > 0){
val.value = StorageRes[val.key]
return val
}
if(val.type == 'select' && StorageRes[val.key] === null){
val.value = 0
return val
}
val.value = StorageRes[val.key] === null ? "" : StorageRes[val.key]
return val;
})
this.backParams = storageParams
}).catch(StorageErr => {
uni.showToast({
title: StorageErr.message,
icon : 'none'
})
})
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 线上保存 - 缓存
cacheSave() {
let SaveArr = new Object;
this.backParams.map(val => {
SaveArr[val.key] = val.value
})
cacheBankPut(this.$Route.query.id, {...SaveArr}).then(res => {
uni.showToast({
title: '保存成功',
icon: "none"
})
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 下一步
nextStep(){
// 本地保存备份
// let newSaveArr = this.backParams.map(val => {
// return {
// key: val.key,
// value: val.value == null ? '' : val.value
// }
// })
let newSaveArr = new Object;
this.backParams.map(val => {
newSaveArr[val.key] = val.value
// 本地保存备份
// SaveArr.push({
// key: val.key,
// value: val.value
})
// 线上保存
cacheBankPut(this.$Route.query.id, {...newSaveArr}).then(res => {
// 跳转
this.$router.push({
name: 'ModifyOther',
params: {
id: this.$Route.query.id
}
})
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 提示组件 -- 赋值
seeTips(title, text) {
this.seeData.seeShow = true
this.seeData.seeTitle = title
this.seeData.seeText = text
},
// 跳转新页面-首次录入信息
goFirst() {
this.popFirst = false
this.$Router.replace({name: 'userBank', params: {userId: this.userId, id: this.baseId, type: 'first'}})
},
}
}
</script>
<style lang="scss" scoped>
.top {
background-color: #f5f5f5;
border-bottom: transparent 140rpx solid;
position: relative;
height: 100vh;
overflow-y: scroll;
&::after {
content: '';
position: absolute;
background-color: $mian-color;
border-radius: 0 0 $radius*5 $radius*5;
width: 100%;
height: 260rpx;
left: 0;
top: 0;
}
.base {
position: absolute;
z-index: 9;
padding: $padding + 20 $padding;
box-sizing: border-box;
.base-tab {
overflow: hidden;
display: flex;
padding: 0 $padding 20rpx 10rpx;
position: relative;
.base-tab-item {
color: #ffffff;
position: relative;
display: flex;
.base-tab-img {
width: 120rpx;
height: 120rpx;
}
.base-tab-cont {
padding-top: $padding - 15;
box-sizing: border-box;
.base-tab-name {
font-size: $title-size-sm;
}
.base-tab-tips {
font-size: $title-size-sm - 2;
border: 2rpx solid #ffeaea;
border-radius: $radius * 4;
width: 110rpx;
text-align: center;
opacity: .8;
margin-top: 10rpx;
}
}
}
.base-tab-spot {
text-align: center;
width: 180rpx;
float: left;
margin-top: $margin;
text {
border-radius: 50%;
background-color: #ffffff;
display: inline-block;
margin-left: 15rpx;
&:nth-child(1) {
width: 10rpx;
height: 10rpx;
opacity: .5;
}
&:nth-child(2) {
width: 14rpx;
height: 14rpx;
opacity: .8;
}
&:nth-child(3) {
width: 16rpx;
height: 16rpx;
}
}
}
}
.white {
padding: $padding;
box-sizing: border-box;
background-color: #ffffff;
border-radius: $radius-m;
overflow: hidden;
.base-title {
display: flex;
line-height: 38rpx;
.base-name {
flex: 1;
color: $mian-color;
font-weight: 600;
font-size: $title-size + 2;
}
.base-number {
color: #999999;
font-size: $title-size-m;
}
}
.base-list {
margin: 0 -10rpx 0;
overflow: hidden;
.base-block {
width: calc(50% - 20rpx);
// width: calc(100% - 20rpx);
margin: 20rpx 10rpx;
float: left;
.base-block-name {
// margin: $margin + 20 0 $margin - 10;
color: #111111;
display: flex;
text {
color: $mian-color;
padding-right: 10rpx;
}
.base-notesIcon {
width: 32rpx;
height: 32rpx;
margin: 6rpx 0 0 10rpx;
}
}
.base-block-textarea {
background-color: #F6F6F6;
border-radius: $radius-sm;
padding: $padding;
font-size: $title-size-lg;
color: #111111;
}
.base-block-write {
background-color: #F6F6F6;
border-radius: $radius-sm;
padding: 0 $padding;
box-sizing: border-box;
position: relative;
display: flex;
color: #111111;
font-size: $title-size-m;
height: 84rpx;
line-height: 84rpx;
margin-top: $margin - 10;
&.prohibit {
color: #999999;
}
.idcardAdd-picker {
width: 100%;
height: 100%;
}
.base-block-input {
width: 100%;
height: 100%;
font-size: $title-size-lg;
}
.base-block-textarea {
padding: $padding 0;
}
.idcardAdd-input {
display: flex;
flex: 1;
}
.placeholderClass {
color: #999999;
}
image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: $margin;
}
}
.base-block-site {
display: flex;
margin: 0 -5rpx;
.base-site-white {
background-color: #F6F6F6;
border-radius: $radius-sm;
flex: 3;
color: #111111;
font-size: $title-size-lg;
height: 84rpx;
line-height: 84rpx;
padding: 0 $padding - 10 0 $padding;
box-sizing: border-box;
position: relative;
margin: 0 5rpx;
width: 100%;
.picker {
width: calc(100% - 30rpx)
}
image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: 0;
}
}
}
.idcardAdd-aline {
font-size: $title-size-m;
color: #999999;
.idcardAdd-aline-write {
margin-right: $margin;
}
}
&.baseAline {
width: calc(100% - 20rpx);
}
&.radioAline {
display: flex;
.base-block-name {
flex: 1;
}
}
}
}
}
}
}
.introduce-btn {
position: fixed;
width: 100%;
left: 0;
bottom: 0;
background-color: #f5f5f5;
text-align: center;
padding: $padding $padding - 20;
box-sizing: border-box;
z-index: 9;
.btn {
background-color: $mian-color;
border: 2rpx solid transparent;
box-sizing: border-box;
color: #ffffff;
border-radius: $radius-sm;
width: calc(50% - 30rpx);
margin: 0 15rpx;
line-height: 90rpx;
font-size: $title-size;
float: left;
&:first-child {
background-color: transparent;
border-color: $mian-color;
color: $mian-color;
}
}
}
.backFirst {
position: fixed;
width: 100%;
height: 100vh;
z-index: 99;
background-color: rgba(0, 0, 0, .6);
left: 0;
top: 0;
}
.contFirst {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 100;
padding: 0 10%;
box-sizing: border-box;
.tipsWhite {
background-color: #ffffff;
border-radius: 20rpx;
overflow: hidden;
}
.tipsWhite-top {
padding: 30rpx;
box-sizing: border-box;
}
.tipsWhite-name {
text-align: center;
color: #111111;
font-size: 34rpx;
font-weight: 600;
margin-bottom: 30rpx;
padding-bottom: $padding;
border-bottom: solid #F6F6F6 2rpx;
}
.tipsWhite-text {
font-size: 30rpx;
color: #666666;
line-height: 48rpx;
text-align: center;
padding: $padding + 10 0;
}
.tipsWhite-btn {
line-height: 90rpx;
border-top: 2rpx solid #F6F6F6;
display: flex;
box-sizing: border-box;
.idcardBtn-go {
width: 50%;
background-color: $mian-color;
color: #ffffff;
height: 90rpx;
line-height: 90rpx;
font-size: $title-size;
text-align: center;
&.active {
background-color: #ffffff;
color: $mian-color;
}
}
}
}
</style>

View File

@@ -0,0 +1,927 @@
<template>
<view class="content">
<view class="top">
<view class="base">
<view class="white">
<view class="base-title">
<view class="base-name">
基本信息
</view>
<view class="base-number">
<!-- 6/12 -->
</view>
</view>
<view class="base-list">
<view class="base-block">
<view class="base-block-name">
<text>*</text>姓名
</view>
<view class="base-block-write prohibit">
{{baseData.name}}
</view>
</view>
<view class="base-block">
<view class="base-block-name">
<text>*</text>性别
</view>
<view class="base-block-write prohibit">
{{baseData.sex}}
</view>
</view>
<view class="base-block">
<view class="base-block-name">
<text>*</text>年龄
</view>
<view class="base-block-write prohibit">
{{baseData.age}}
</view>
</view>
<view class="base-block">
<view class="base-block-name">
<text>*</text>属相
</view>
<view class="base-block-write prohibit">
{{baseData.zodiak}}
</view>
</view>
<view class="base-block baseAline">
<view class="base-block-name">
<text>*</text>身份证号
</view>
<view class="base-block-write prohibit">
{{baseData.id_card}}
</view>
</view>
<view class="base-block baseAline">
<view class="base-block-name">
<text>*</text>身份证地址
</view>
<view class="base-block-write prohibit">
{{baseData.address}}
</view>
</view>
<view class="base-block">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>婚姻<image v-if="baseData.check_params.marriage" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.marriage.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<picker class="idcardAdd-picker" @change="marriageChange($event)" :range="marriage">
<view class="uni-input">{{marriage[marriageIndex]}}</view>
</picker>
<image src="/static/imgs/basic_down.png"></image>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.marriage">
<picker class="idcardAdd-picker" @change="marriageChange($event)" :range="marriage">
<view class="uni-input">{{marriage[marriageIndex]}}</view>
</picker>
<image src="/static/imgs/basic_down.png"></image>
</block>
<view class="idcardAdd-picker" v-else>
<view class="uni-input grey">{{marriage[marriageIndex]}}</view>
</view>
</block>
</view>
</view>
<view class="base-block" v-if="marriageIndex == 1">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>配偶 <image v-if="baseData.check_params.mate" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.mate.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" :value="mate" maxlength="4" type="text" placeholder="请输入配偶姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'mate')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.mate">
<input class="base-block-input" :value="mate" maxlength="4" type="text" placeholder="请输入配偶姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'mate')"/>
</block>
<block v-else-if="marriageIndex == 1 && baseData.check_params.marriage">
<input class="base-block-input" :value="mate" maxlength="4" type="text" placeholder="请输入配偶姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'mate')"/>
</block>
<view class="idcardAdd-picker" v-else>
<input class="base-block-input grey" disabled :value="mate" maxlength="4" type="text" placeholder="请输入配偶姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'mate')"/>
</view>
</block>
</view>
</view>
<view class="base-block" :class="{baseAline : marriageIndex == 1}">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>学历 <image v-if="baseData.check_params.education" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.education.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<picker class="idcardAdd-picker" @change="educationChange($event)" :range="education">
<view class="uni-input">{{education[educationIndex]}}</view>
</picker>
<image src="/static/imgs/basic_down.png"></image>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.education">
<picker class="idcardAdd-picker" @change="educationChange($event)" :range="education">
<view class="uni-input">{{education[educationIndex]}}</view>
</picker>
<image src="/static/imgs/basic_down.png"></image>
</block>
<view class="idcardAdd-picker" v-else>
<view class="grey">{{education[educationIndex]}}</view>
</view>
</block>
</view>
</view>
<view class="base-block baseAline">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>毕业学院 <image v-if="baseData.check_params.school" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.school.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" type="text" :value="school" placeholder="请输入毕业学院" placeholder-class="placeholderClass" @input="blurInput($event, 'school')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.school">
<input class="base-block-input" type="text" :value="school" placeholder="请输入毕业学院" placeholder-class="placeholderClass" @input="blurInput($event, 'school')"/>
</block>
<input v-else disabled class="base-block-input grey" type="text" :value="school" placeholder="请输入毕业学院" placeholder-class="placeholderClass" @input="blurInput($event, 'school')"/>
</block>
</view>
</view>
<view class="base-block baseAline">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>联系电话 <image v-if="baseData.check_params.mobile" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.mobile.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" maxlength="11" :value="mobile" type="tel" placeholder="请输入联系电话" placeholder-class="placeholderClass" @input="blurInput($event, 'mobile')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.mobile">
<input class="base-block-input" maxlength="11" :value="mobile" type="tel" placeholder="请输入联系电话" placeholder-class="placeholderClass" @input="blurInput($event, 'mobile')"/>
</block>
<input v-else disabled class="base-block-input grey" maxlength="11" :value="mobile" type="tel" placeholder="请输入联系电话" placeholder-class="placeholderClass" @input="blurInput($event, 'mobile')"/>
</block>
</view>
</view>
<view class="base-block baseAline">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>联系地址 <image v-if="baseData.check_params.contact_address" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.contact_address.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<block v-if="baseData.is_finish == 0">
<view class="base-block-write from-city-picker">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
v-model="baseData.province_id"
@change="onCityPicker"
></uni-data-picker>
</view>
</block>
<block v-else-if="baseData.is_finish == 2">
<view class="base-block-write from-city-picker" v-if="baseData.check_params.contact_address">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
v-model="baseData.province_id"
@change="onCityPicker"
></uni-data-picker>
</view>
<view class="base-block-textarea" style="color: #999;" v-else>
<textarea disabled placeholder-style="font-size: 30rpx; color: #999999" maxlength="500" :value="baseData.contact_address"/>
</view>
</block>
</view>
<view class="base-block baseAline">
<view class="base-block-textarea" v-if="baseData.is_finish == 0">
<textarea placeholder-style="color:#999999; font-size: 30rpx" maxlength="500" :value="address" @input="blurInput($event, 'address')" placeholder="请填写详细地址..."/>
</view>
<block v-else-if="baseData.is_finish == 2">
<view class="base-block-textarea" v-if="baseData.check_params.contact_address">
<textarea placeholder-style="font-size: 30rpx; color: #999999" maxlength="500" :value="address" @input="blurInput($event, 'address')" placeholder="请填写详细地址..."/>
</view>
</block>
</view>
<!-- 现单位名称 -->
<view class="base-block baseAline">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>现单位名称 <image v-if="baseData.check_params.now_company_name" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.now_company_name.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-textarea">
<block v-if="baseData.is_finish == 0">
<textarea placeholder-style="color:#999999; font-size: 30rpx" :value="companyName" @input="blurInput($event, 'companyName')" placeholder="请填写现单位名称"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.now_company_name">
<textarea placeholder-style="font-size: 30rpx; color: #999999" :value="companyName" @input="blurInput($event, 'companyName')" placeholder="请填写现单位名称"/>
</block>
<textarea v-else disabled style="color: #999999" placeholder-style="font-size: 30rpx; color: #999999" :value="companyName" @input="blurInput($event, 'companyName')" placeholder="请填写现单位名称"/>
</block>
</view>
</view>
<!-- 现单位地址 -->
<view class="base-block baseAline">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>现单位地址 <image v-if="baseData.check_params.now_company_address" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.now_company_address.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-textarea">
<block v-if="baseData.is_finish == 0">
<textarea placeholder-style="color:#999999; font-size: 30rpx" :value="companyAddress" @input="blurInput($event, 'companyAddress')" placeholder="请填写现单位地址"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.now_company_address">
<textarea placeholder-style="font-size: 30rpx; color: #999999" :value="companyAddress" @input="blurInput($event, 'companyAddress')" placeholder="请填写现单位地址"/>
</block>
<textarea v-else disabled style="color: #999999" placeholder-style="font-size: 30rpx; color: #999999" :value="companyAddress" @input="blurInput($event, 'companyAddress')" placeholder="请填写现单位地址"/>
</block>
</view>
</view>
<!-- 现居住地址 -->
<view class="base-block baseAline">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>现居住地址 <image v-if="baseData.check_params.now_domicile" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.now_domicile.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-textarea">
<block v-if="baseData.is_finish == 0">
<textarea placeholder-style="color:#999999; font-size: 30rpx" :value="domicile" @input="blurInput($event, 'domicile')" placeholder="请填写现居住地址"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.now_domicile">
<textarea placeholder-style="font-size: 30rpx; color: #999999" :value="domicile" @input="blurInput($event, 'domicile')" placeholder="请填写现居住地址"/>
</block>
<textarea v-else disabled style="color: #999999" placeholder-style="font-size: 30rpx; color: #999999" :value="domicile" @input="blurInput($event, 'domicile')" placeholder="请填写现居住地址"/>
</block>
</view>
</view>
<!-- 新增联系人 2021-04-12 -->
<view class="base-block">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>联系人1<image v-if="baseData.check_params.one_contact" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.one_contact.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" :value="oneContact" type="text" placeholder="预留联系人1姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'one_contact')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.one_contact">
<input class="base-block-input" :value="oneContact" type="text" placeholder="预留联系人1姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'one_contact')"/>
</block>
<input v-else disabled class="base-block-input grey" :value="oneContact" type="text" placeholder="预留联系人1姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'one_contact')"/>
</block>
</view>
</view>
<view class="base-block">
<view class="base-block-name" v-if="baseData.check_params">
<text>*</text>关系<image v-if="baseData.check_params.one_contact_relation" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.one_contact_relation.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" :value="oneContactRelation" type="text" placeholder="预留联系人1关系" placeholder-class="placeholderClass" @input="blurInput($event, 'one_contact_relation')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.one_contact_relation">
<input class="base-block-input" :value="oneContactRelation" type="text" placeholder="预留联系人1关系" placeholder-class="placeholderClass" @input="blurInput($event, 'one_contact_relation')"/>
</block>
<input v-else disabled class="base-block-input grey" :value="oneContactRelation" type="text" placeholder="预留联系人关系" placeholder-class="placeholderClass" @input="blurInput($event, 'one_contact_relation')"/>
</block>
</view>
</view>
<view class="base-block">
<view class="base-block-name" v-if="baseData.check_params">
<text></text>联系人2<image v-if="baseData.check_params.two_contact" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.two_contact.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" :value="twoContact" type="text" placeholder="预留联系人2姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'two_contact')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.two_contact">
<input class="base-block-input" :value="twoContact" type="text" placeholder="预留联系人2姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'two_contact')"/>
</block>
<input v-else disabled class="base-block-input grey" :value="twoContact" type="text" placeholder="预留联系人2姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'two_contact')"/>
</block>
</view>
</view>
<view class="base-block">
<view class="base-block-name" v-if="baseData.check_params">
<text></text>关系<image v-if="baseData.check_params.two_contact_relation" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.two_contact_relation.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" :value="twoContactRelation" type="text" placeholder="预留联系人2关系" placeholder-class="placeholderClass" @input="blurInput($event, 'two_contact_relation')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.two_contact_relation">
<input class="base-block-input" :value="twoContactRelation" type="text" placeholder="预留联系人2关系" placeholder-class="placeholderClass" @input="blurInput($event, 'two_contact_relation')"/>
</block>
<input v-else disabled class="base-block-input grey" :value="twoContactRelation" type="text" placeholder="预留联系人2关系" placeholder-class="placeholderClass" @input="blurInput($event, 'two_contact_relation')"/>
</block>
</view>
</view>
<view class="base-block">
<view class="base-block-name" v-if="baseData.check_params">
<text></text>联系人3<image v-if="baseData.check_params.three_contact" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.three_contact.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" :value="threeContact" type="text" placeholder="预留联系人3姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'three_contact')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.three_contact">
<input class="base-block-input" :value="threeContact" type="text" placeholder="预留联系人3姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'three_contact')"/>
</block>
<input v-else disabled class="base-block-input grey" :value="threeContact" type="text" placeholder="预留联系人3姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'three_contact')"/>
</block>
</view>
</view>
<view class="base-block">
<view class="base-block-name" v-if="baseData.check_params">
<text></text>关系<image v-if="baseData.check_params.three_contact_relation" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.three_contact_relation.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" :value="threeContactRelation" type="text" placeholder="预留联系人3关系" placeholder-class="placeholderClass" @input="blurInput($event, 'three_contact_relation')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.three_contact_relation">
<input class="base-block-input" :value="threeContactRelation" type="text" placeholder="预留联系人3关系" placeholder-class="placeholderClass" @input="blurInput($event, 'three_contact_relation')"/>
</block>
<input v-else disabled class="base-block-input grey" :value="threeContactRelation" type="text" placeholder="预留联系人3关系" placeholder-class="placeholderClass" @input="blurInput($event, 'three_contact_relation')"/>
</block>
</view>
</view>
<view class="base-block">
<view class="base-block-name" v-if="baseData.check_params">
<text></text>联系人4<image v-if="baseData.check_params.four_contact" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.four_contact.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" :value="fourContact" type="text" placeholder="预留联系人4姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'four_contact')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.four_contact">
<input class="base-block-input" :value="fourContact" type="text" placeholder="预留联系人4姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'four_contact')"/>
</block>
<input v-else disabled class="base-block-input grey" :value="fourContact" type="text" placeholder="预留联系人4姓名" placeholder-class="placeholderClass" @input="blurInput($event, 'four_contact')"/>
</block>
</view>
</view>
<view class="base-block">
<view class="base-block-name" v-if="baseData.check_params">
<text></text>关系<image v-if="baseData.check_params.four_contact_relation" class="base-notesIcon" @click="seeTips('驳回原因', baseData.check_params.four_contact_relation.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<view class="base-block-write">
<block v-if="baseData.is_finish == 0">
<input class="base-block-input" :value="fourContactRelation" type="text" placeholder="预留联系人4关系" placeholder-class="placeholderClass" @input="blurInput($event, 'four_contact_relation')"/>
</block>
<block v-else-if="baseData.is_finish == 2">
<block v-if="baseData.check_params.four_contact_relation">
<input class="base-block-input" :value="fourContactRelation" type="text" placeholder="预留联系人4关系" placeholder-class="placeholderClass" @input="blurInput($event, 'four_contact_relation')"/>
</block>
<input v-else disabled class="base-block-input grey" :value="fourContactRelation" type="text" placeholder="预留联系人4关系" placeholder-class="placeholderClass" @input="blurInput($event, 'four_contact_relation')"/>
</block>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="introduce-btn">
<button class="btn" size="mini" :disabled="disabled" @click="infoSubmit">提交审核</button>
</view>
<!-- 驳回提示 -->
<mouldTips :see-data="seeData" @tipsClose="($event) => {seeData.seeShow = $event}"></mouldTips>
<!-- 是否使用首次录入信息 -->
<view class="backFirst" v-if="popFirst"></view>
<view class="contFirst" v-if="popFirst">
<view class="tipsWhite">
<view class="tipsWhite-top">
<view class="tipsWhite-name">
温馨提示
</view>
<view class="tipsWhite-text">
是否使用首次录入信息
</view>
</view>
<view class="tipsWhite-btn">
<view class="idcardBtn-go active" @click="popFirst = false">
暂不使用
</view>
<view class="idcardBtn-go" @click="goFirst">
立即使用
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import uniDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/keypress.js';
import mouldTips from '@/components/mould-tips.vue'
import { userBase, basePut, create, createAll } from '@/apis/interfaces/user'
export default {
components: {
mouldTips
},
data() {
return {
popFirst: false, // 首次录入信息状态
disabled: false, // 按钮状态
baseData: '', // 基础信息
mobile : '', // 联系方式
mate : '', // 配偶名称
school : '', // 毕业学院
address : '', // 联系地址
companyName : '', // 现单位名称
companyAddress : '', // 现单位地址
domicile : '', // 现居住地址
oneContact : '', // 预留联系人1姓名
oneContactRelation : '', // 预留联系人1姓名-关系
twoContact :'', // 预留联系人2姓名
twoContactRelation : '', // 预留联系人2姓名-关系
threeContact : '', // 预留联系人3姓名
threeContactRelation : '', // 预留联系人4姓名-关系
fourContact : '', // 预留联系人4姓名
fourContactRelation : '', // 预留联系人4姓名-关系
// 查看提示组件
seeData : {
seeShow : false,
seeTitle: '',
seeText : '',
},
marriage: [],
marriageIndex : 0, // 婚姻选择index
education: [],
educationIndex: 0, // 学历选择index
cityPicker : [],
}
},
onLoad() {},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
createAll().then(res => {
this.cityPicker = res;
// 获取基础信息
this.baseInfo();
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
methods: {
// 基础信息
baseInfo() {
userBase(this.$Route.query.id).then(res => {
this.userId = res.base.business_order_user_id
this.baseData = res.base
this.education = res.base.educations
this.marriage = res.base.marriages
this.mobile = res.base.mobile || '' // 联系方式
this.mate = res.base.mate || '' // 配偶名称
this.school = res.base.school || '' // 毕业学院
this.address = res.base.tmp_address || '' // 联系地址
this.companyName = res.base.now_company_name || '' // 现单位名称
this.companyAddress = res.base.now_company_address || '' // 现单位地址
this.domicile = res.base.now_domicile || '' // 现居住地址
this.oneContact = res.base.one_contact || '' // 预留联系人1姓名
this.oneContactRelation = res.base.one_contact_relation || '' // 预留联系人1姓名-关系
this.twoContact = res.base.two_contact || '' // 预留联系人2姓名
this.twoContactRelation = res.base.two_contact_relation || '' // 预留联系人2姓名-关系
this.threeContact = res.base.three_contact || '' // 预留联系人3姓名
this.threeContactRelation = res.base.three_contact_relation || '' // 预留联系人4姓名-关系
this.fourContact = res.base.four_contact || '' // 预留联系人4姓名
this.fourContactRelation = res.base.four_contact_relation || '' // 预留联系人4姓名-关系
this.marriageIndex = res.base.marriage // 婚姻选择index
this.educationIndex = res.base.education // 婚姻选择index
// 是否使用首次录入信息
// if(res.base.is_finish == 0 && res.userBase) {
// this.popFirst = true
// this.baseId = res.userBase.user_base_id
// }
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 跳转新页面-首次录入信息
goFirst() {
this.popFirst = false
this.$Router.replace({name: 'userBase', params: {userId: this.userId, baseId: this.baseId, type: 'first'}})
},
// 婚姻选择
marriageChange(e) {
this.marriageIndex = e.detail.value
},
// 学历选择
educationChange(e) {
this.educationIndex = e.detail.value
},
// 输入框
blurInput(e, name) {
let value = e.detail.value
switch(name)
{
case 'mobile':{
this.mobile = value
break;
}
case 'mate':{
this.mate = value
break;
}
case 'school':{
this.school = value
break;
}
case 'address':{
this.address = value
break;
}
case 'companyName':{
this.companyName = value
break;
}
case 'companyAddress':{
this.companyAddress = value
break;
}
case 'domicile':{
this.domicile = value
break;
}
case 'one_contact':{
this.oneContact = value
break;
}
case 'one_contact_relation':{
this.oneContactRelation = value
break;
}
case 'two_contact':{
this.twoContact = value
break;
}
case 'two_contact_relation':{
this.twoContactRelation = value
break;
}
case 'three_contact':{
this.threeContact = value
break;
}
case 'three_contact_relation':{
this.threeContactRelation = value
break;
}
case 'four_contact':{
this.fourContact = value
break;
}
case 'four_contact_relation':{
this.fourContactRelation = value
break;
}
}
},
// 选择城市
onCityPicker(e){
let { value } = e.detail
this.baseData.district_id = value[0].value
this.baseData.city_id = value[1].value
this.baseData.province_id = value[2].value
this.btnSee = false
},
// 修改基础信息 - 提交
infoSubmit() {
let data = {
mobile : this.mobile, //联系方式
mate : this.mate, //配偶姓名
school : this.school, //毕业学院
tmp_address : this.address, //联系地址
now_company_name: this.companyName, // 现单位名称
now_company_address: this.companyAddress, // 现单位地址
now_domicile : this.domicile, // 现居住地址
province_id : this.baseData.province_id,
city_id : this.baseData.city_id,
district_id : this.baseData.district_id,
education : this.educationIndex, //学历
marriage : this.marriageIndex ,//婚姻状态
one_contact : this.oneContact, // 预留联系人1姓名
one_contact_relation : this.oneContactRelation, // 预留联系人1姓名-关系
two_contact : this.twoContact, // 预留联系人2姓名
two_contact_relation : this.twoContactRelation, // 预留联系人2姓名-关系
three_contact : this.threeContact, // 预留联系人3姓名
three_contact_relation : this.threeContactRelation,// 预留联系人4姓名-关系
four_contact : this.fourContact, // 预留联系人4姓名
four_contact_relation : this.fourContactRelation // 预留联系人4姓名-关系
}
basePut(this.baseData.business_order_user_id,data).then(res=>{
this.disabled = true
uni.showToast({
title: res,
icon: "none"
})
setTimeout(() => {
uni.navigateBack(1)
uni.hideLoading()
}, 1500)
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 提示组件 -- 赋值
seeTips(title, text) {
this.seeData.seeShow = true
this.seeData.seeTitle = title
this.seeData.seeText = text
},
}
}
</script>
<style lang="scss" scoped>
.top {
background-color: #f5f5f5;
border-bottom: transparent 140rpx solid;
position: relative;
&::after {
content: '';
position: absolute;
background-color: $mian-color;
border-radius: 0 0 $radius*5 $radius*5;
width: 100%;
height: 260rpx;
left: 0;
top: 0;
}
.base {
position: relative;
z-index: 1;
padding: $padding + 20 $padding;
box-sizing: border-box;
.white {
padding: $padding $padding 0;
box-sizing: border-box;
background-color: #ffffff;
border-radius: $radius-m;
overflow: hidden;
.base-title {
display: flex;
line-height: 38rpx;
.base-name {
flex: 1;
color: $mian-color;
font-weight: 600;
font-size: $title-size + 2;
}
.base-number {
color: #999999;
font-size: $title-size-m;
}
}
.base-list {
margin: 40rpx -10rpx 0;
overflow: hidden;
.base-block {
width: calc(50% - 20rpx);
margin: 0 10rpx $margin + 10;
float: left;
.base-block-name {
margin-bottom: $margin - 10;
color: #111111;
display: flex;
text {
color: $mian-color;
padding-right: 10rpx;
}
.base-notesIcon {
width: 32rpx;
height: 32rpx;
margin: 6rpx 0 0 10rpx;
}
}
.base-block-textarea {
background-color: #F6F6F6;
border-radius: $radius-sm;
padding: $padding;
font-size: $title-size-lg;
color: #111111;
}
.base-block-write {
background-color: #F6F6F6;
border-radius: $radius-sm;
padding: $padding - 10 $padding;
box-sizing: border-box;
position: relative;
display: flex;
color: #111111;
font-size: $title-size-lg;
line-height: 44rpx;
&.prohibit {
color: #999999;
}
.idcardAdd-picker {
width: 100%;
height: 100%;
}
.grey {
color: #999999;
}
.base-block-input {
width: 100%;
height: 100%;
font-size: $title-size-lg;
}
.base-block-textarea {
padding: $padding 0;
}
.placeholderClass {
color: #999999;
}
image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: $margin;
}
}
/deep/ .uni-data-tree-dialog {
bottom: 150rpx;
}
.base-block-site {
display: flex;
margin: 0 -5rpx;
.base-site-white {
background-color: #F6F6F6;
border-radius: $radius-sm;
flex: 3;
color: #111111;
font-size: $title-size-lg;
height: 84rpx;
line-height: 84rpx;
padding: 0 $padding - 10 0 $padding;
box-sizing: border-box;
position: relative;
margin: 0 5rpx;
width: 100%;
.picker {
width: calc(100% - 30rpx)
}
image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: 0;
}
}
}
}
.baseAline {
width: calc(100% - 20rpx);
}
}
}
}
}
.introduce-btn {
position: fixed;
width: 100%;
left: 0;
bottom: 0;
background-color: #f5f5f5;
text-align: center;
padding: $padding;
box-sizing: border-box;
z-index: 2;
.btn {
background-color: $mian-color;
color: #ffffff;
border-radius: $radius-sm;
width: 100%;
line-height: 90rpx;
font-size: $title-size;
&[disabled] {
background-color: #eba5a5;
}
}
}
.backFirst {
position: fixed;
width: 100%;
height: 100vh;
z-index: 99;
background-color: rgba(0, 0, 0, .6);
left: 0;
top: 0;
}
.contFirst {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 100;
padding: 0 10%;
box-sizing: border-box;
.tipsWhite {
background-color: #ffffff;
border-radius: 20rpx;
overflow: hidden;
}
.tipsWhite-top {
padding: 30rpx;
box-sizing: border-box;
}
.tipsWhite-name {
text-align: center;
color: #111111;
font-size: 34rpx;
font-weight: 600;
margin-bottom: 30rpx;
padding-bottom: $padding;
border-bottom: solid #F6F6F6 2rpx;
}
.tipsWhite-text {
font-size: 30rpx;
color: #666666;
line-height: 48rpx;
text-align: center;
padding: $padding + 10 0;
}
.tipsWhite-btn {
line-height: 90rpx;
border-top: 2rpx solid #F6F6F6;
display: flex;
box-sizing: border-box;
.idcardBtn-go {
width: 50%;
background-color: $mian-color;
color: #ffffff;
height: 90rpx;
line-height: 90rpx;
font-size: $title-size;
text-align: center;
&.active {
background-color: #ffffff;
color: $mian-color;
}
}
}
}

View File

@@ -0,0 +1,480 @@
<template>
<view class="content">
<view class="top">
<view class="base">
<view class="base-tab">
<view class="base-tab-item">
<image class="base-tab-img" src="/static/icon//bankIcon_01_active.png" mode="aspectFill"></image>
<view class="base-tab-cont">
<view class="base-tab-name">
银行信息
</view>
<view class="base-tab-tips" @click="$Router.replace({name: 'ModifyBank', params: {id: baseId}})">
去完善 >
</view>
</view>
</view>
<view class="base-tab-spot">
<text></text>
<text></text>
<text></text>
</view>
<view class="base-tab-item">
<image class="base-tab-img" src="/static/icon/bankIcon_02.png" mode="aspectFill"></image>
<view class="base-tab-cont">
<view class="base-tab-name">
其他信息
</view>
<view class="base-tab-tips">
待完善
</view>
</view>
</view>
</view>
<view class="white">
<view class="base-title">
<view class="base-name">
基本信息
</view>
<!-- <view class="base-number">
6/12
</view> -->
</view>
<view class="base-list">
<view class="base-block" :class="{baseAline : items.type === 'text' || items.type === 'textarea' }" v-for="(items, itemsIndex) in backParams" :key="itemsIndex">
<view class="base-block-name" v-if="items.label == 2">
<text>*</text>{{items.title}}
<image class="base-notesIcon" v-if="items.reason != ''" @click="seeTips('驳回原因', items.reason.description)" src="/static/icon/notesIcon.png" mode="aspectFill"></image>
</view>
<!-- 描述 -->
<block v-if="items.label == 2">
<view class="base-block-textarea" v-if="items.type === 'textarea'">
<mouldText class="idcardAdd-depict-textarea" :blur-placeholder="items.placeholder" :blur-value="items.value" @onTextarea="($event) => {items.value = $event}"></mouldText>
</view>
</block>
</view>
</view>
</view>
</view>
</view>
<view class="introduce-btn">
<view @click="$Router.replace({name: 'ModifyBank', params: {id: baseId}})" class="btn" size="mini">上一步</view>
<button class="btn" size="mini" :disabled="disabled" @click="infoSubmit">提交审核</button>
</view>
<!-- 驳回提示 -->
<mouldTips :see-data="seeData" @tipsClose="($event) => {seeData.seeShow = $event}"></mouldTips>
</view>
</template>
<script>
import { userBank, cacheBank, bankPut, cacheBankPut } from '@/apis/interfaces/user'
import mouldCheckbox from '@/components/mould-checkbox.vue'
import mouldInput from '@/components/mould-input.vue'
import mouldRadio from '@/components/mould-radio.vue'
import mouldText from '@/components/mould-text.vue'
import mouldSelect from '@/components/mould_select.vue'
import mouldDate from '@/components/mould-date.vue'
import mouldTips from '@/components/mould-tips.vue'
export default {
components: {
mouldCheckbox,
mouldInput,
mouldRadio,
mouldText,
mouldSelect,
mouldDate,
mouldTips
},
data() {
return {
baseId : '', // 银行id
businessId: '',
disabled : false, // 按钮状态
backParams: '', // 基础信息
// 查看提示组件
seeData : {
seeShow : false,
seeTitle: '',
seeText : '',
},
values : '',
marriage: [],
marriageIndex : 0, // 婚姻选择index
education: [],
educationIndex: 0, // 学历选择index
cacheData: [] ,//缓存数据
}
},
onShow() {
this.baseId = this.$Route.query.id
// 获取基础信息
this.baseInfo();
},
methods: {
// 基础信息
baseInfo() {
uni.showLoading({
title: '加载中...',
mask : true
})
userBank(this.$Route.query.id).then(res => {
// 是否使用首次录入信息
// if(res.is_finish == 0 && res.user_bank) {
// this.popFirst = true
// this.baseId = res.user_bank.user_bank_id
// }
let { item, params, business_order_user_bank_id } = res;
cacheBank(business_order_user_bank_id).then(StorageRes => {
this.userId = res.business_order_user_bank_id
uni.hideLoading()
if(StorageRes === ''){
this.backParams = params
return
}
let storageParams = []
storageParams = params.map(val => {
if(val.type == 'checkbox' && StorageRes[val.key].length > 0){
val.value = StorageRes[val.key]
return val
}
if(val.type == 'select' && StorageRes[val.key] === null){
val.value = 0
return val
}
val.value = StorageRes[val.key] === null ? "" : StorageRes[val.key]
return val;
})
this.backParams = storageParams
}).catch(StorageErr => {
uni.showToast({
title: StorageErr.message,
icon : 'none'
})
})
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 线上保存 - 缓存
cacheSave() {
let SaveArr = new Object;
this.backParams.map(val => {
SaveArr[val.key] = val.value
})
cacheBankPut(this.$Route.query.id, {...SaveArr}).then(res => {}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 提交信息
infoSubmit() {
let SaveArr = this.backParams.map(val => {
return {
key: val.key,
value: val.value
}
})
bankPut(this.$Route.query.id, {
data: SaveArr
}).then(res => {
// 保存
this.cacheSave();
uni.showToast({
title: res,
icon: "none"
})
this.disabled = true
setTimeout(() => {
this.$Router.replace({name: 'User'})
uni.hideLoading()
// uni.removeStorage({//通过key键值名来删除对应数据
// key:"saveArr" + this.$Route.query.id,
// success() {}
// })
}, 1500)
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 提示组件 -- 赋值
seeTips(title, text) {
this.seeData.seeShow = true
this.seeData.seeTitle = title
this.seeData.seeText = text
},
}
}
</script>
<style lang="scss" scoped>
.top {
background-color: #f5f5f5;
border-bottom: transparent 140rpx solid;
position: relative;
height: 100vh;
overflow-y: scroll;
&::after {
content: '';
position: absolute;
background-color: $mian-color;
border-radius: 0 0 $radius*5 $radius*5;
width: 100%;
height: 260rpx;
left: 0;
top: 0;
}
.base {
position: absolute;
z-index: 9;
padding: $padding + 20 $padding;
box-sizing: border-box;
.base-tab {
overflow: hidden;
display: flex;
padding: 0 $padding 20rpx 10rpx;
position: relative;
.base-tab-item {
color: #ffffff;
position: relative;
display: flex;
.base-tab-img {
width: 120rpx;
height: 120rpx;
}
.base-tab-cont {
padding-top: $padding - 15;
box-sizing: border-box;
.base-tab-name {
font-size: $title-size-sm;
}
.base-tab-tips {
font-size: $title-size-sm - 2;
border: 2rpx solid #ffeaea;
border-radius: $radius * 4;
width: 110rpx;
text-align: center;
opacity: .8;
margin-top: 10rpx;
}
}
}
.base-tab-spot {
text-align: center;
width: 180rpx;
float: left;
margin-top: $margin;
text {
border-radius: 50%;
background-color: #ffffff;
display: inline-block;
margin-left: 15rpx;
&:nth-child(1) {
width: 10rpx;
height: 10rpx;
opacity: .5;
}
&:nth-child(2) {
width: 14rpx;
height: 14rpx;
opacity: .8;
}
&:nth-child(3) {
width: 16rpx;
height: 16rpx;
}
}
}
}
.white {
padding: $padding;
box-sizing: border-box;
background-color: #ffffff;
border-radius: $radius-m;
overflow: hidden;
.base-title {
display: flex;
line-height: 38rpx;
.base-name {
flex: 1;
color: $mian-color;
font-weight: 600;
font-size: $title-size + 2;
}
.base-number {
color: #999999;
font-size: $title-size-m;
}
}
.base-list {
margin: 0 -10rpx 0;
overflow: hidden;
.base-block {
// width: calc(50% - 20rpx);
width: calc(100% - 20rpx);
margin: 0 10rpx 0;
float: left;
.base-block-name {
margin: $margin + 20 0 $margin - 10;
color: #111111;
display: flex;
text {
color: $mian-color;
padding-right: 10rpx;
}
.base-notesIcon {
width: 32rpx;
height: 32rpx;
margin: 6rpx 0 0 10rpx;
}
}
.base-block-textarea {
background-color: #F6F6F6;
border-radius: $radius-sm;
padding: $padding;
font-size: $title-size-lg;
color: #111111;
}
.base-block-write {
background-color: #F6F6F6;
border-radius: $radius-sm;
padding: 0 $padding;
box-sizing: border-box;
position: relative;
display: flex;
color: #111111;
font-size: $title-size-m;
height: 84rpx;
line-height: 84rpx;
&.prohibit {
color: #999999;
}
.idcardAdd-picker {
width: 100%;
height: 100%;
}
.base-block-input {
width: 100%;
height: 100%;
font-size: $title-size-lg;
}
.base-block-textarea {
padding: $padding 0;
}
.idcardAdd-input {
display: flex;
flex: 1;
}
.placeholderClass {
color: #999999;
}
image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: $margin;
}
}
.base-block-site {
display: flex;
margin: 0 -5rpx;
.base-site-white {
background-color: #F6F6F6;
border-radius: $radius-sm;
flex: 3;
color: #111111;
font-size: $title-size-lg;
height: 84rpx;
line-height: 84rpx;
padding: 0 $padding - 10 0 $padding;
box-sizing: border-box;
position: relative;
margin: 0 5rpx;
width: 100%;
.picker {
width: calc(100% - 30rpx)
}
image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: 0;
}
}
}
.idcardAdd-aline {
font-size: $title-size-m;
color: #999999;
}
}
.baseAline {
width: calc(100% - 20rpx);
}
}
}
}
}
.introduce-btn {
position: fixed;
width: 100%;
left: 0;
bottom: 0;
background-color: #f5f5f5;
text-align: center;
padding: $padding $padding - 20;
box-sizing: border-box;
z-index: 9;
.btn {
background-color: $mian-color;
border: 2rpx solid transparent;
box-sizing: border-box;
color: #ffffff;
border-radius: $radius-sm;
width: calc(50% - 30rpx);
margin: 0 15rpx;
line-height: 90rpx;
font-size: $title-size;
float: left;
&:first-child {
background-color: transparent;
border-color: $mian-color;
color: $mian-color;
}
&[disabled] {
background-color: #eba5a5;
}
}
}