mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-19 00:56:45 +08:00
GFRS-2618【前端】新增津贴申请的基本信息页面的部分代码。提交人--张齐
This commit is contained in:
@@ -45,6 +45,11 @@ export default {
|
||||
valueKey: {
|
||||
type: String,
|
||||
default: 'text'
|
||||
},
|
||||
// 津贴申请的流水单号
|
||||
allowanceNo: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -89,7 +94,7 @@ export default {
|
||||
imgNoCheckedUrl: this.$assetsUrl + 'images/allowance/qmqr_n.png'
|
||||
}
|
||||
],
|
||||
//localStorage.allowancePageFlag:控制导航是否可以直接跳转页面 1-投保人信息 2-被保人信息 3-选择产品 4-受益人信息 5-告知信息 6-账户信息 7-附件上传 8-签名确认
|
||||
//localStorage.allowancePageFlag:控制导航是否可以直接跳转页面 1-基本信息 2-账户信息 3-影像资料 4-签名确认
|
||||
allowancePageFlag: Number(localStorage.allowancePageFlag)
|
||||
}
|
||||
},
|
||||
@@ -107,16 +112,16 @@ export default {
|
||||
if (Number(localStorage.allowancePageFlag) < Number(pageIndex)) return
|
||||
switch (pageIndex) {
|
||||
case 1: //跳到基本信息页面
|
||||
url = `/allowance/application/BaseInfo?edit=1&allowancePageFlag=${pageIndex}`
|
||||
url = `/allowance/application/BaseInfo?edit=1&allowancePageFlag=${pageIndex}&allowanceNo=${this.allowanceNo}`
|
||||
break
|
||||
case 2: //跳到账户信息页面
|
||||
url = `/allowance/application/AccountInfo?edit=1&allowancePageFlag=${pageIndex}`
|
||||
url = `/allowance/application/AccountInfo?edit=1&allowancePageFlag=${pageIndex}&allowanceNo=${this.allowanceNo}`
|
||||
break
|
||||
case 3: //跳到影像资料页面
|
||||
url = `/allowance/application/AttachmentManagement?edit=1&allowancePageFlag=${pageIndex}`
|
||||
url = `/allowance/application/AttachmentManagement?edit=1&allowancePageFlag=${pageIndex}&allowanceNo=${this.allowanceNo}`
|
||||
break
|
||||
case 4: //跳到签名确认页面
|
||||
url = `/allowance/application/SignatureConfirmation?edit=1&allowancePageFlag=${pageIndex}`
|
||||
url = `/allowance/application/SignatureConfirmation?edit=1&allowancePageFlag=${pageIndex}&allowanceNo=${this.allowanceNo}`
|
||||
break
|
||||
default:
|
||||
break
|
||||
|
||||
225
src/components/ebiz/allowance/myInfo/IndexBar.vue
Normal file
225
src/components/ebiz/allowance/myInfo/IndexBar.vue
Normal file
@@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<div class='own_content'>
|
||||
<ul class='index-bar'>
|
||||
<li @click='changePage(Number(index) + 1)' v-for='(item, index) in pageTitle' :key='index' :class='item.tabClass'
|
||||
:id='item.tabClass'>
|
||||
<!-- 选中 -->
|
||||
<div v-if='item.tabClass' class='flex justify-content-fs align-items-c'>
|
||||
<div class='flex flex-direction-colunm align-items-c'>
|
||||
<van-image :src='item.imgCheckedUrl' class='image_head' />
|
||||
<span class='fs12 mt12'>{{ item.pageItem }}</span>
|
||||
</div>
|
||||
<van-image :src='doneUrl' v-if='index !== 2' class='image_done' />
|
||||
</div>
|
||||
<div v-if='!item.tabClass' class='flex justify-content-fs align-items-c'>
|
||||
<div class='flex flex-direction-colunm align-items-c'>
|
||||
<van-image :src='item.imgNoCheckedUrl' class='image_head' />
|
||||
<span class='fs12 mt12' style='color: #999999'>{{ item.pageItem }}</span>
|
||||
</div>
|
||||
<van-image :src='doneNurl' v-if='index !== 2' class='image_done' />
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Icon, Image as VanImage } from 'vant'
|
||||
|
||||
export default {
|
||||
name: 'IndexBar',
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
required: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
}
|
||||
},
|
||||
//选项对象中,文字对应的 key
|
||||
valueKey: {
|
||||
type: String,
|
||||
default: 'text'
|
||||
},
|
||||
// 津贴申请的流水单号
|
||||
enjoyId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
[Icon.name]: Icon,
|
||||
[VanImage.name]: VanImage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
doneUrl: this.$assetsUrl + 'images/allowance/done.png',
|
||||
doneNurl: this.$assetsUrl + 'images/allowance/done_n.png',
|
||||
pageTitle: [
|
||||
{
|
||||
pageNo: 1,
|
||||
pageItem: '基本信息',
|
||||
urlStr: '/allowance/myInfo/BaseInfo',
|
||||
tabClass: '',
|
||||
imgCheckedUrl: this.$assetsUrl + 'images/allowance/jbxx.png',
|
||||
imgNoCheckedUrl: this.$assetsUrl + 'images/allowance/jbxx_n.png'
|
||||
},
|
||||
{
|
||||
pageNo: 2,
|
||||
pageItem: '账户信息',
|
||||
urlStr: '/allowance/myInfo/AccountInfo',
|
||||
tabClass: '',
|
||||
imgCheckedUrl: this.$assetsUrl + 'images/allowance/zhxx.png',
|
||||
imgNoCheckedUrl: this.$assetsUrl + 'images/allowance/zhxx_n.png'
|
||||
},
|
||||
{
|
||||
pageNo: 3,
|
||||
pageItem: '影响资料',
|
||||
urlStr: '/allowance/myInfo/AttachmentManagement',
|
||||
tabClass: '',
|
||||
imgCheckedUrl: this.$assetsUrl + 'images/allowance/yxzz.png',
|
||||
imgNoCheckedUrl: this.$assetsUrl + 'images/allowance/yxzz_n.png'
|
||||
}
|
||||
],
|
||||
//localStorage.allowanceMyInfoPageFlag:控制导航是否可以直接跳转页面 1-基本信息 2-账户信息 3-影像资料
|
||||
allowanceMyInfoPageFlag: Number(localStorage.allowanceMyInfoPageFlag)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.selectTab()
|
||||
},
|
||||
methods: {
|
||||
changePage(pageIndex) {
|
||||
let url = ''
|
||||
if (!localStorage.allowanceMyInfoPageFlag) return
|
||||
if (Number(localStorage.allowanceMyInfoPageFlag) < Number(pageIndex)) return
|
||||
switch (pageIndex) {
|
||||
case 1: //跳到基本信息页面
|
||||
url = `/allowance/myInfo/BaseInfo?edit=1&allowanceMyInfoPageFlag=${pageIndex}&enjoyId=${this.enjoyId}`
|
||||
break
|
||||
case 2: //跳到账户信息页面
|
||||
url = `/allowance/myInfo/AccountInfo?edit=1&allowanceMyInfoPageFlag=${pageIndex}&enjoyId=${this.enjoyId}`
|
||||
break
|
||||
case 3: //跳到影像资料页面
|
||||
url = `/allowance/myInfo/AttachmentManagement?edit=1&allowanceMyInfoPageFlag=${pageIndex}&enjoyId=${this.enjoyId}`
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
forbidSwipeBack: '1',
|
||||
url: location.origin + `/#${url}`
|
||||
},
|
||||
routerInfo: { path: url }
|
||||
})
|
||||
// let str = location.hash
|
||||
// let i = str.search(/AttachmentManagement/i)
|
||||
// if (i !== -1 && pageIndex != 2 && pageIndex != 3) {
|
||||
// this.$dialog
|
||||
// .confirm({
|
||||
// className: 'dialog-blue',
|
||||
// title: '提示',
|
||||
// message: '离开此页可能会丢失部分数据,是否确认离开?'
|
||||
// // cancelButtonColor: '#E9332E',
|
||||
// // confirmButtonColor: '#FFFFFF'
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.$jump({
|
||||
// flag: 'h5',
|
||||
// extra: {
|
||||
// forbidSwipeBack: '1',
|
||||
// url: location.origin + `/#${url}`
|
||||
// },
|
||||
// routerInfo: { path: url }
|
||||
// })
|
||||
// })
|
||||
// .catch(() => {
|
||||
// return
|
||||
// })
|
||||
// } else {
|
||||
// this.$jump({
|
||||
// flag: 'h5',
|
||||
// extra: {
|
||||
// forbidSwipeBack: '1',
|
||||
// url: location.origin + `/#${url}`
|
||||
// },
|
||||
// routerInfo: { path: url }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
selectTab() {
|
||||
let endIndex = location.hash.indexOf('?', 1)
|
||||
let str = endIndex == -1 ? location.hash.slice(1) : location.hash.slice(1, endIndex)
|
||||
this.pageTitle.forEach(v => {
|
||||
if (v.urlStr.toLowerCase() == str.toLowerCase()) {
|
||||
v.tabClass = 'active'
|
||||
}
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.$el.querySelector('#active').scrollIntoView(true)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.index-bar {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.index-bar li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.index-bar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.index-bar span,
|
||||
.index-bar van-icon {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #2E4591;
|
||||
}
|
||||
|
||||
.activeline {
|
||||
background: #2E4591;
|
||||
}
|
||||
|
||||
.image_head {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.image_done {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.own_content {
|
||||
padding-top: 19px;
|
||||
padding-bottom: 15px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,113 +0,0 @@
|
||||
<template>
|
||||
<div class="parent">
|
||||
<van-index-bar>
|
||||
<div v-if="data.length > 0">
|
||||
<div class=" bg-white mt10 " v-for="parentInfo in data" :key="parentInfo.letter">
|
||||
<van-index-anchor :index="parentInfo.letter" />
|
||||
<div v-for="parent in parentInfo.data" :key="parent.name" class="flex ml15 mt10 pb10 content border-b align-items-c" @click="choose(parent)">
|
||||
<img class="w40 mr15 " src="../../../../assets/images/bnf_avatar.png"/>
|
||||
|
||||
<div class="c-gray-darker fs14">
|
||||
<div>{{ parent.customerName }}</div>
|
||||
<div class="mt5">{{ parent.customerPhone }}</div>
|
||||
</div>
|
||||
<div class="text-right" style="flex:1">
|
||||
<!-- <van-tag :color="parent.customerType == 0 ? '#7ED321' : parent.customerType == 1 ? '#5CA7DE' : '#333'" class="mr40" plain>{{-->
|
||||
<!-- parent.typeName-->
|
||||
<!-- }}</van-tag>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="text-center">
|
||||
<img class="mt40 w200" src="../../../../assets/images/pic_page-non.png"/>
|
||||
<p class="mt15">暂无数据</p>
|
||||
</div>
|
||||
</van-index-bar>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getCustomersList, getAgentCustomerInfo } from '@/api/ebiz/customer/customer'
|
||||
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典找到用户等级
|
||||
import utils from '@/assets/js/business-common'
|
||||
import { IndexBar, IndexAnchor, Tag, Icon } from 'vant'
|
||||
export default {
|
||||
name: 'Parent',
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
isSuccess: false,
|
||||
type: ['success', 'primary', 'danger', '']
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
components: {
|
||||
[IndexBar.name]: IndexBar,
|
||||
[IndexAnchor.name]: IndexAnchor,
|
||||
[Tag.name]: Tag,
|
||||
[Icon.name]: Icon
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
choose(data) {
|
||||
let params = {
|
||||
customerNumber: data.customerNumber
|
||||
}
|
||||
getAgentCustomerInfo(params).then(res => {
|
||||
console.log(res, '详情')
|
||||
if (res.result == '0') {
|
||||
this.isSuccess = true
|
||||
let content = res.content
|
||||
if (content.birthday) {
|
||||
content.age = utils.jsGetAge(content.birthday)
|
||||
}
|
||||
this.$emit('on-choose', content)
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
getCustomersList({}).then(res => {
|
||||
debugger
|
||||
console.log(res)
|
||||
if (res.result == '0') {
|
||||
let customerList = []
|
||||
//根据数据字典中的客户等级 展示
|
||||
for (var key in res.agentCustomerList) {
|
||||
// res.agentCustomerList[key].forEach(current => {
|
||||
// dataDictionary.customerType.forEach(type => {
|
||||
// if (current.customerType == type.id) {
|
||||
// current.typeName = type.text
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
let current = {
|
||||
data: res.agentCustomerList[key],
|
||||
letter: key
|
||||
}
|
||||
|
||||
customerList.push(current)
|
||||
}
|
||||
this.data = customerList
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.parent {
|
||||
.van-index-anchor {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
border-bottom: 1px solid #d6d6d6;
|
||||
}
|
||||
.border-b {
|
||||
border-bottom: 1px solid #d6d6d6;
|
||||
}
|
||||
.content:last-child {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
100
src/components/ebiz/parentList/Parent.vue
Normal file
100
src/components/ebiz/parentList/Parent.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<div class='parent'>
|
||||
<van-index-bar>
|
||||
<div v-if='data.length > 0'>
|
||||
<!-- <div class=' bg-white mt10 ' v-for='parentInfo in data' :key='parentInfo.letter'>-->
|
||||
<!-- <van-index-anchor :index='parentInfo.letter' />-->
|
||||
<div v-for='parent in data' :key='parent.name'
|
||||
class='flex ml15 mt10 pb10 content border-b align-items-c' @click='choose(parent)'>
|
||||
<img class='w40 mr15 ' src='../../../assets/images/bnf_avatar.png' />
|
||||
|
||||
<div class='c-gray-darker fs14'>
|
||||
<div>{{ parent.name }}</div>
|
||||
<div class='mt5'>{{ parent.customerPhone }}</div>
|
||||
</div>
|
||||
<div class='text-right' style='flex:1'>
|
||||
<!-- <van-tag :color="parent.customerType == 0 ? '#7ED321' : parent.customerType == 1 ? '#5CA7DE' : '#333'" class="mr40" plain>{{-->
|
||||
<!-- parent.typeName-->
|
||||
<!-- }}</van-tag>-->
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class='text-center'>
|
||||
<img class='mt40 w200' src='../../../assets/images/pic_page-non.png' />
|
||||
<p class='mt15'>暂无数据</p>
|
||||
</div>
|
||||
</van-index-bar>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getAllowanceBaseList, getAgentCustomerInfo } from '@/api/ebiz/parentList/parentList'
|
||||
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典找到用户等级
|
||||
import utils from '@/assets/js/business-common'
|
||||
import { IndexBar, IndexAnchor, Tag, Icon } from 'vant'
|
||||
|
||||
export default {
|
||||
name: 'Parent',
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
isSuccess: false,
|
||||
type: ['success', 'primary', 'danger', '']
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
components: {
|
||||
[IndexBar.name]: IndexBar,
|
||||
[IndexAnchor.name]: IndexAnchor,
|
||||
[Tag.name]: Tag,
|
||||
[Icon.name]: Icon
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
choose(data) {
|
||||
let params = {
|
||||
customerNumber: data.customerNumber
|
||||
}
|
||||
getAgentCustomerInfo(params).then(res => {
|
||||
console.log(res, '详情')
|
||||
if (res.result == '0') {
|
||||
this.isSuccess = true
|
||||
let content = res.content
|
||||
if (content.birthday) {
|
||||
content.age = utils.jsGetAge(content.birthday)
|
||||
}
|
||||
this.$emit('on-choose', content)
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
getAllowanceBaseList({}).then(res => {
|
||||
console.log(res)
|
||||
if (res.result == '0') {
|
||||
this.data = res.content
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.parent {
|
||||
.van-index-anchor {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
border-bottom: 1px solid #d6d6d6;
|
||||
}
|
||||
|
||||
.border-b {
|
||||
border-bottom: 1px solid #d6d6d6;
|
||||
}
|
||||
|
||||
.content:last-child {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -89,7 +89,8 @@ export default {
|
||||
[Popup.name]: Popup,
|
||||
[Icon.name]: Icon,
|
||||
[Sticky.name]: Sticky,
|
||||
Parent
|
||||
[Parent.name]: Parent
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.showPicker = this.parentShowPicker
|
||||
Reference in New Issue
Block a user