Compare commits

..

1 Commits

Author SHA1 Message Date
zhang.weiwei
402723a749 feat-GBC渠道首页项目选择弹框新增项目名称和年份搜索 2025-03-27 22:20:24 +08:00
4 changed files with 324 additions and 246 deletions

View File

@@ -3947,35 +3947,6 @@ export default {
{
code: "GFRS_M0094__cashValue",
label: "元"
},
{
//养老年金开始领取年龄
code: 'pensionAge',
label: '岁'
},
{
code: 'AppntCriticalDiseaseExemptionPremiumD',
label: '元'
},
{
code: 'AppntModerateOrMinorDiseaseExemptionPremiumD',
label: '元'
},
{
code: 'AppntDeathOrTotalDiseaseExemptionPremiumD',
label: '元'
},
{
code: 'InsuredCriticalDiseaseExemptionPremiumD',
label: '元'
},
{
code: 'InsuredModerateOrMinorDiseaseExemptionPremiumD',
label: '元'
},
{
code: 'InsuredDeathOrTotalDiseaseExemptionPremiumD',
label: '元'
}
],
// 卡单与短期险重新投保选择职业类别时,两个模块职业类型数据的排序不同,创建这个数据字典,用于在选择职业类别时,作为一个参数传入组件,

View File

@@ -1,79 +1,103 @@
<template>
<div class="public_container" :style="{paddingTop:marginTop+'px'}">
<!-- <van-pull-refresh v-model="isLoading" @refresh="onRefresh">-->
<div class="head">
<van-swipe :autoplay="3000" style="width: 100%;">
<van-swipe-item v-for="(item, index) in activity" :key="index" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend(item)">
<!-- <img :src="config.assetsUrl + item.img + '?v=' + thisGetTime" /> -->
<img :src="item.img">
</van-swipe-item>
</van-swipe>
</div>
<div class="public_container" :style="{ paddingTop: marginTop + 'px' }">
<!-- <van-pull-refresh v-model="isLoading" @refresh="onRefresh">-->
<div class="head">
<van-swipe :autoplay="3000" style="width: 100%">
<van-swipe-item v-for="(item, index) in activity" :key="index" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend(item)">
<!-- <img :src="config.assetsUrl + item.img + '?v=' + thisGetTime" /> -->
<img :src="item.img" />
</van-swipe-item>
</van-swipe>
</div>
<div class="iconPart1">
<van-notice-bar :left-icon="png8" :text='getCodeValue'/>
</div>
<div class="iconPart1">
<van-notice-bar :left-icon="png8" :text="getCodeValue" />
</div>
<div class="top">
<div class="menu" v-for="(item, ind) in homePageIcon" :key="ind" @click="goDetail(item)">
<div class="menuImg">
<img :src="item.img">
</div>
<span class="menuName">{{ item.title }}</span>
<div class="top">
<div class="menu" v-for="(item, ind) in homePageIcon" :key="ind" @click="goDetail(item)">
<div class="menuImg">
<img :src="item.img" />
</div>
<span class="menuName">{{ item.title }}</span>
</div>
</div>
<div class="cooperativeUnits">
<div>
<div style="width: 50%; display: inline-block" v-for="(item, index) in list1" :key="index">
<p
style="
display: flex;
justify-content: flex-start;
height: 50px;
align-items: center;
margin: 5px 10px;
border: 1px solid #eee;
border-radius: 5px;
background: #fff;
color: #333333;
padding-left: 10px;
"
>
<img src="@/assets/images/GBC/home-cooperativeUnits-icon.png" style="width: 20px; height: 20px; margin-right: 10px" />
{{ item.name }}
</p>
</div>
</div>
</div>
<div class="cooperativeUnits">
<div>
<div style="width: 50%;display: inline-block;" v-for="(item,index) in list1" :key="index">
<p style="display: flex;justify-content: flex-start;height: 50px;align-items: center;margin: 5px 10px;border:1px solid #eee;border-radius: 5px;background: #fff;color: #333333;padding-left: 10px;">
<img src="@/assets/images/GBC/home-cooperativeUnits-icon.png" style="width: 20px;height: 20px;margin-right: 10px;"/>
{{item.name}}
</p>
</div>
</div>
</div>
<div class="companyProfile">
<img :src="image1" style="width: 100%;"/>
</div>
<!-- </van-pull-refresh>-->
<div class="companyProfile">
<img :src="image1" style="width: 100%" />
</div>
<!-- </van-pull-refresh>-->
<van-dialog v-model="chooseProjectDialogShow" :showConfirmButton="false">
<div slot="title">
<p style="color: #E9332E;">请选择项目</p>
</div>
<div class="chooseProjectDialog" style="padding: 20px 30px 30px;font-size: 14px;height:425px;overflow-y:auto">
<van-radio-group v-model="chooseTeamCode">
<van-radio v-for="(item,index) in projectList" :key="index" :name="item.teamCode" style="margin: 10px;">
<span style="margin-left: 20px;">
{{item.projectName}}
<span v-if="item.teamName" style="margin-left: 10px;color: #a7a7a7;">
({{item.teamName}})
<template slot="title">
<p style="color: #e9332e">请选择项目</p>
</template>
<template>
<div class="search-project-warpper">
<van-search
v-model="searchProjectName"
shape="round"
background="#fff"
@focus="handleFocus"
@blur="handleBlur"
@search="searchProject"
placeholder="请输入项目名称"
/>
<van-dropdown-menu :overlay="false" active-color="#e9332e">
<van-dropdown-item v-model="searchProjectYear" :options="searchProjectYearOptions" get-container="body" @change="searchProject" />
</van-dropdown-menu>
</div>
<div class="chooseProjectDialog">
<van-radio-group v-model="chooseTeamCode">
<van-radio v-for="(item, index) in projectList" :key="index" :name="item.teamCode" style="margin: 10px">
<span style="margin-left: 20px">
{{ item.projectName }}
<span v-if="item.teamName" style="margin-left: 10px; color: #a7a7a7">
{{ item.teamName }}
</span>
<span v-if="item.projectState" style="margin-left: 10px; color: #a7a7a7"> 状态{{ item.projectState === '1' ? '正常' : '失效' }} </span>
</span>
</span>
</van-radio>
</van-radio-group>
</div>
<div style="text-align: center;margin-bottom: 30px;">
<van-button round type="danger" size="small" style="padding:0px 35px;font-size: 14px;" @click="chooseProjectList">
确定
</van-button>
</div>
</van-radio>
</van-radio-group>
</div>
<div style="text-align: center; margin-top: 20px; margin-bottom: 20px">
<van-button round type="danger" size="small" style="padding: 0px 80px; font-size: 14px" @click="chooseProjectList"> 确定 </van-button>
</div>
</template>
</van-dialog>
<!-- 选择过期项目弹窗提示 -->
<van-dialog v-model="enableProjectDialogShow" :showConfirmButton="false">
<div slot="title">
<p style="color: #E9332E;">提示</p>
<p style="color: #e9332e">提示</p>
</div>
<div style="padding: 20px 30px 30px;font-size: 14px;">
{{chooseProjectName}}项目服务时间已结束
</div>
<div style="text-align: center;margin-bottom: 30px;">
<van-button round type="danger" size="small" style="padding:0px 35px;font-size: 14px;" @click="enableProjectDialogShow = false">
返回
</van-button>
<div style="padding: 30px; font-size: 14px">{{ chooseProjectName }}项目服务时间已结束</div>
<div style="text-align: center; margin-bottom: 20px">
<van-button round type="danger" size="small" style="padding: 0px 80px; font-size: 14px" @click="enableProjectDialogShow = false"> 返回 </van-button>
</div>
</van-dialog>
</div>
@@ -82,9 +106,9 @@
<script>
import { gbcProjectList, gbcProjectConfirm, homeConfigGBC } from '@/api/GBC/GBC'
import { getAgentInfo } from '@/api/ebiz/my/my.js'
import { Swipe, SwipeItem, NoticeBar, Icon, Popup, PullRefresh ,Toast, RadioGroup, Radio } from 'vant'
import { Swipe, SwipeItem, NoticeBar, Icon, Popup, PullRefresh, Toast, RadioGroup, Radio, Search, DropdownMenu, DropdownItem } from 'vant'
import config from '@/config'
import png8 from '@/assets/YB_APP/images/8.png';
import png8 from '@/assets/YB_APP/images/8.png'
export default {
name: 'Home',
components: {
@@ -93,75 +117,94 @@ export default {
[NoticeBar.name]: NoticeBar,
[Icon.name]: Icon,
[Popup.name]: Popup,
[PullRefresh.name]:PullRefresh,
[RadioGroup.name]:RadioGroup,
[Radio.name]:Radio,
[Toast.name]:Toast ,
[PullRefresh.name]: PullRefresh,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Toast.name]: Toast,
[Search.name]: Search,
[DropdownMenu.name]: DropdownMenu,
[DropdownItem.name]: DropdownItem
},
data() {
return {
config,
marginTop:'80',
getCodeValue:'',
marginTop: '80',
getCodeValue: '',
png8,
activity: [],
homePageIcon:[
{title:'建议书',route:'/proposal/list',img:require('@/assets/images/GBC/home-menu-1.png')},
{title:'电子投保',route:'/sale/list',img:require('@/assets/images/GBC/home-menu-2.png')},
{title:'海报设计',route:'/poster/posterList',img:require('@/assets/images/GBC/home-menu-3.png')},
{title:'GBC专区',route:'/GBC/projectList',img:require('@/assets/images/GBC/home-menu-4.png')}
homePageIcon: [
{ title: '建议书', route: '/proposal/list', img: require('@/assets/images/GBC/home-menu-1.png') },
{ title: '电子投保', route: '/sale/list', img: require('@/assets/images/GBC/home-menu-2.png') },
{ title: '海报设计', route: '/poster/posterList', img: require('@/assets/images/GBC/home-menu-3.png') },
{ title: 'GBC专区', route: '/GBC/projectList', img: require('@/assets/images/GBC/home-menu-4.png') }
],
isLoading: false,
image1: require('@/assets/images/GBC/home-companyProfile.png'),
list1:[
{name:'广西金融投资集团'},{name:'广投集团'},{name:'广西北部湾银行'},{name:'国海证券'},
],
projectList:[],
list1: [{ name: '广西金融投资集团' }, { name: '广投集团' }, { name: '广西北部湾银行' }, { name: '国海证券' }],
projectList: [],
chooseProjectDialogShow: false,
chooseTeamCode:'',
chooseProjectCode:'',
chooseTeamCode: '',
chooseProjectCode: '',
chooseProjectName: '',
enableProjectDialogShow: false,
searchProjectName: '', // 搜索项目名称
searchProjectYear: '' // 搜索项目年份
}
},
mounted(){
computed: {
searchProjectYearOptions() {
let currentYear = new Date().getFullYear()
let options = [
{
text: '全部',
value: ''
}
]
// 从2024年开始到当前年份结束
for (let i = 2024; i <= currentYear; i++) {
options.push({
text: i + '年',
value: i
})
}
return options
}
},
mounted() {
this.homeConfigGBC()
this.setMarginTop()
if(this.$route.query.isFrom == 'login') {
if (this.$route.query.isFrom == 'login') {
this.gbcProjectList()
}
this.getAgentInfo()
},
methods:{
getAgentInfo(){
let params = {
}
getAgentInfo(params).then(res => {
if(res.result == '0') {
if(res.branchType == '13') {
window.localStorage.setItem('branchType','13')
methods: {
getAgentInfo() {
let params = {}
getAgentInfo(params).then((res) => {
if (res.result == '0') {
if (res.branchType == '13') {
window.localStorage.setItem('branchType', '13')
}
} else {
this.$toast(res.resultMessage)
}
})
},
gbcProjectList(){
let params = {
}
gbcProjectList(params).then(res=>{
if(res.result == '0') {
gbcProjectList() {
let params = {}
gbcProjectList(params).then((res) => {
if (res.result == '0') {
this.projectList = res.content
if(this.projectList.length == 1) {
if (this.projectList.length == 1) {
this.chooseProjectDialogShow = false
this.chooseTeamCode = this.projectList[0].teamCode
this.chooseProjectCode = this.projectList[0].projectCode
this.chooseProjectName = this.projectList[0].projectName
this.chooseProjectList()
}
if(this.projectList.length > 1) {
if (this.projectList.length > 1) {
this.chooseProjectDialogShow = true
}
} else {
@@ -170,25 +213,42 @@ export default {
})
},
chooseProjectList(){
if(!this.chooseTeamCode) {
searchProject() {
let params = {
projectName: this.searchProjectName,
projectYear: this.searchProjectYear
}
gbcProjectList(params).then((res) => {
if (res.result == '0') {
this.chooseTeamCode = ''
this.chooseProjectCode = ''
this.chooseProjectName = ''
this.projectList = res.content
} else {
this.$toast(res.resultMessage)
}
})
},
chooseProjectList() {
if (!this.chooseTeamCode) {
this.$toast('请选择项目')
return false
}
if(this.projectList && this.projectList.length != 0) {
this.projectList.forEach(item=>{
if(item.teamCode == this.chooseTeamCode){
if (this.projectList && this.projectList.length != 0) {
this.projectList.forEach((item) => {
if (item.teamCode == this.chooseTeamCode) {
this.chooseProjectName = item.projectName
}
})
}
let params = {
teamCode:this.chooseTeamCode
teamCode: this.chooseTeamCode
}
gbcProjectConfirm(params).then(res=>{
if(res.result == '0') {
if(res.content.enable == 1){
gbcProjectConfirm(params).then((res) => {
if (res.result == '0') {
if (res.content.enable == 1) {
this.chooseProjectDialogShow = false
} else {
this.enableProjectDialogShow = true
@@ -198,21 +258,21 @@ export default {
}
})
},
goDetail(data){
goDetail(data) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#'+ data.route,
url: location.origin + '/#' + data.route
},
routerInfo: {
path: data.route,
},
path: data.route
}
})
},
setMarginTop(){
EWebBridge.webCallAppInJs("top_bar_height").then(data => {
console.log(data,'top_bar_height')
if(data){
setMarginTop() {
EWebBridge.webCallAppInJs('top_bar_height').then((data) => {
console.log(data, 'top_bar_height')
if (data) {
// 获取高度成功
let height = data.height
// 设置高度
@@ -220,43 +280,41 @@ export default {
}
})
},
homeConfigGBC(){
let params = {
}
homeConfigGBC(params).then(res=>{
if(res.result == 0){
homeConfigGBC() {
let params = {}
homeConfigGBC(params).then((res) => {
if (res.result == 0) {
this.activity = res.content.activity
if(res.content.getCodeValue.length!=0){
res.content.getCodeValue.forEach(item=>{
if (res.content.getCodeValue.length != 0) {
res.content.getCodeValue.forEach((item) => {
this.getCodeValue += item + ' '
})
}
this.homePageIcon = res.content.icon.homePageIcon
}else{
} else {
this.$toast(res.resultMessage)
}
})
},
touchstart(){
touchstart() {
this.clickFlag = true
},
touchmove(){
touchmove() {
this.clickFlag = false
},
touchend(data){
if(this.clickFlag){
touchend(data) {
if (this.clickFlag) {
let dataURL = JSON.parse(data.route).extra.url
if(dataURL){
let thisRoute = dataURL.substring(dataURL.lastIndexOf("/#")+2)
if (dataURL) {
let thisRoute = dataURL.substring(dataURL.lastIndexOf('/#') + 2)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + thisRoute,
url: location.origin + '/#' + thisRoute
},
routerInfo: {
path: thisRoute,
},
path: thisRoute
}
})
}
}
@@ -264,12 +322,12 @@ export default {
// 下拉刷新
onRefresh() {
setTimeout(() => {
Toast('刷新成功');
this.isLoading = false;
location. reload()
}, 1000);
},
},
Toast('刷新成功')
this.isLoading = false
location.reload()
}, 1000)
}
}
// beforeRouteEnter(to, from, next) {
// next(vm => {
// if(from && from.path){
@@ -284,85 +342,134 @@ export default {
}
</script>
<style lang="scss" scoped>
.public_container{
font-size: 12px;
height: 100vh;
width: 100vw;
/*background-image: url("../../assets/YB_APP/images/2-1.png");*/
/*background-repeat: no-repeat;*/
/*background-size: contain;*/
background: #F0F8FF;
}
.head {
position: relative;
margin: 10px;border-radius: 5px;
/*box-shadow: 0px 5px 8px 0px #7a6fc1;*/
img {
width: 100%;
height: 100%;
border-radius: 5px;
}
/deep/ .van-swipe-item{
height: auto;
}
}
/deep/ .van-notice-bar{
border-radius: 5px;
}
.menuImg{
width:100%;display: flex;justify-content: center;margin-bottom: 5px;
/deep/ img{
width: 30px;
height: 30px;
}
}
/deep/ .van-notice-bar{
background: #fff;
color: #333;
letter-spacing: 1px;
}
/deep/ .van-icon__image{
.public_container {
font-size: 12px;
height: 100vh;
width: 100vw;
/*background-image: url("../../assets/YB_APP/images/2-1.png");*/
/*background-repeat: no-repeat;*/
/*background-size: contain;*/
background: #f0f8ff;
}
.head {
position: relative;
margin: 10px;
border-radius: 5px;
/*box-shadow: 0px 5px 8px 0px #7a6fc1;*/
img {
width: 100%;
}
/deep/ .van-notice-bar__left-icon{
width: 50px;
}
/deep/ .van-notice-bar__wrap{
margin-left: 10px;
}
/deep/ .van-swipe-item{
img{
height:145px;
}
}
.iconPart1{
margin: 10px;border-radius: 5px;
}
.top{
display:flex;
justify-content: space-between;
margin: 10px;
height: 100%;
border-radius: 5px;
align-items: center;
padding: 15px;
}
.title-img {
height: 40px;
/deep/ .van-swipe-item {
height: auto;
}
/deep/ .chooseProjectDialog{
.van-radio__icon {
.van-icon{
border: 1px solid red;
}
}
/deep/ .van-notice-bar {
border-radius: 5px;
}
.menuImg {
width: 100%;
display: flex;
justify-content: center;
margin-bottom: 5px;
/deep/ img {
width: 30px;
height: 30px;
}
}
/deep/ .van-notice-bar {
background: #fff;
color: #333;
letter-spacing: 1px;
}
/deep/ .van-icon__image {
width: 100%;
}
/deep/ .van-notice-bar__left-icon {
width: 50px;
}
/deep/ .van-notice-bar__wrap {
margin-left: 10px;
}
/deep/ .van-swipe-item {
img {
height: 145px;
}
}
.iconPart1 {
margin: 10px;
border-radius: 5px;
}
.top {
display: flex;
justify-content: space-between;
margin: 10px;
border-radius: 5px;
align-items: center;
padding: 15px;
}
.title-img {
height: 40px;
}
/deep/ .van-dialog {
// top: calc(100vh - 300px);
top: 55%;
&__header {
padding-top: 20px;
}
}
/deep/ .chooseProjectDialog {
height: calc(100vh - 400px);
min-height: 300px;
padding: 0 15px;
font-size: 14px;
overflow-y: auto;
.van-radio__icon {
.van-icon {
border: 1px solid red;
}
}
.cooperativeUnits{
background: url("../../assets/images/GBC/home-cooperativeUnits.png");
background-repeat: no-repeat;
background-size: cover;
height: 130px;
padding-top: 60px;
margin: 10px;
border-radius: 10px;
}
.cooperativeUnits {
background: url('../../assets/images/GBC/home-cooperativeUnits.png');
background-repeat: no-repeat;
background-size: cover;
height: 130px;
padding-top: 60px;
margin: 10px;
border-radius: 10px;
}
.search-project-warpper {
display: flex;
align-items: center;
padding: 10px 15px 0;
/deep/ .van-search {
flex-grow: 1;
padding: 0;
}
/deep/ .van-dropdown-menu {
min-width: 60px;
flex-shrink: 0;
}
/deep/ .van-hairline--top-bottom::after {
display: none;
}
/deep/ .van-dropdown-item--down {
top: calc(50px + 56px) !important; // 标题栏+搜索框
}
/deep/ .van-button--small {
width: 200px;
}
}
</style>

View File

@@ -834,8 +834,8 @@ export default {
let m = time.getMonth() + 1 < 10 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1
console.log(y, m)
this.monthValue = y + '-' + m
this.dialogForm.startDate = y + '-' + m + '-' + '01' // "2024-08-01",
this.dialogForm.endDate = y + '-' + m + '-' + '31'//"2024-08-31",
this.dialogForm.startDate = y + '-' + m + '-' + '01' // "2024-09-01",
this.dialogForm.endDate = y + '-' + m + '-' + '30'//"2024-09-30",
})
this.overlayShow = false
},

View File

@@ -48,7 +48,7 @@ export default {
age = this.getSaleInsuredInfo().age
tips = '投保人年龄不适合此款险种,请选择其他险种!'
} else {
if(riskProductCode == 'GFRS_M0061' || riskProductCode == 'GFRS_M0102' || riskProductCode == 'GFRS_M0101'){
if(riskProductCode == 'GFRS_M0061'){
age = this.getSaleInsuredPersonInfo().birthday?utilsAge.getAge29(this.getSaleInsuredPersonInfo().birthday, new Date()):this.getSaleInsuredPersonInfo().insuredAge
}else{
age = this.getSaleInsuredPersonInfo().birthday?utilsAge.getAgeByValue(this.getSaleInsuredPersonInfo().birthday, new Date()):this.getSaleInsuredPersonInfo().insuredAge