Explorar o código

弹出广告,变更公司

zhengkaixin %!s(int64=3) %!d(string=hai) anos
pai
achega
c0da40e3fb

BIN=BIN
src/assets/img/close.png


+ 129 - 0
src/components/Tips.vue

@@ -0,0 +1,129 @@
+<template>
+	<div class="mui-content  fyy-newui">
+		<div class="mui-popup mui-popup-in" v-if="bannerTipsVisible">
+			<div class="">
+				<div class="mui-popup-title">
+					<img :src="bannerTipsPicUrl" width="100%">
+
+				</div>
+
+			</div>
+			<div class=""  v-if="bannerTipsActivity">
+				<img :src="bannerTipsActivity.contentUrl"  v-if="bannerTipsActivity.contentUrl" @click="gotTo" width="50%"/>
+			</div>
+			<a class="fyy-over mui-icon " @click="bannerTipsHide">
+				<img src="~$project/assets/img/close.png" width="36px">
+			</a>
+		</div>
+		<div class="mui-popup-backdrop mui-active" v-if="bannerTipsVisible" ></div>
+	</div>
+</template>
+
+<script>
+	//import * as API_activityApi from '@/apis/activityApi'
+
+	import {
+		mapGetters,
+		mapMutations
+	} from 'vuex'
+	export default {
+		name: 'Vip',
+		props: {
+			bannerTipsVisible: {
+				require: false,
+				default: false,
+			},
+			bannerTipsPicUrl: {
+				require: false,
+				default: '',
+			},
+
+			bannerTipsActivity: {
+				require: false,
+				default: null,
+			},
+
+		},
+
+		methods: {
+			//跳转vip
+			gotTo() {
+				var linkUrl= this.bannerTipsActivity.linkUrl;
+				var linkType= this.bannerTipsActivity.linkType;
+
+				if( linkType=='1'){
+				
+				}else{
+					this.mui.toast(this.bannerTipsActivity.buttonName);
+				}
+				this.$emit('bannerTipsHide');
+			},
+			bannerTipsHide(){
+				this.$emit('bannerTipsHide');
+			},
+		},
+		mounted() {
+
+
+		},
+		computed: {
+
+		}
+	}
+</script>
+
+<!-- <style src="@/assets/css/app.css"></style>
+ -->
+ <style scoped>
+	.mui-popup-inner {
+		background-color: #333;
+		padding: 20px 15px 15px
+	}
+
+	.mui-popup-title {
+		color: #cfac7e;
+		font-size: 24px;
+		padding-top: 15px;
+	}
+
+	.mui-popup-title h2 {
+		margin-top: 15px
+	}
+
+	.mui-popup-text {
+		color: #cfac7e;
+		padding-top: 15px;
+	}
+
+	.mui-popup-text p {
+		font-size: 18px;
+		margin-bottom: 10px;
+		color: #cfac7e;
+	}
+
+	.mui-popup-text h2 {
+		margin-bottom: 10px;
+		font-size: 24px;
+	}
+
+	.mui-popup-buttons {
+		background: #333;
+		height: 70px;
+	}
+
+	.mui-popup-button {
+		background: none;
+		border: 1px solid #cfac7e;
+		margin: 0 15px;
+		border-radius: 5px !important;
+		color: #cfac7e
+	}
+	
+	.fyy-over {
+	
+		right: 0;
+		top: 0;
+		color: #515151;
+		font-size: 36px;
+	}
+</style>

+ 7 - 2
src/projects/business/views/Master/Company/RegisterExamine.vue

@@ -212,7 +212,7 @@
 					mui.toast('请选择要处理的信息');
 				} else {
 					this.subForm.status = status;
-					this.subForm.content = status == 1 ? '同意' : '拒绝';
+					//this.subForm.content = status == 1 ? '同意' : '拒绝';
 					this.doAction();
 				}
 			},
@@ -227,11 +227,15 @@
 			},
 			//同意拒绝
 			doAction() {
+				var content = this.subForm.status == 1 ? '同意' : '拒绝';
+				this.subForm.content =content
 				this.subForm.ids = this.selectIdList.join(',');
 				if (this.checkForm()) {
 					var _this = this;
 					var btnArray = ['否', '是'];
-					mui.confirm('是否' + _this.subForm.content + '所勾选的注册申请?', '提示', btnArray, function(e) {
+					mui.prompt('是否' + content+ '所勾选的注册申请?', '备注','提示', btnArray, function(e) {
+						
+						_this.subForm.content = e.value;
 						if (e.index == 1) {
 							//同意
 							if (_this.subForm.status == 1) {
@@ -289,6 +293,7 @@
 			})
 		},
 		mounted() {
+			//this.doAction()
 			this.getList();
 			//监控下拉加载事件
 			var _this = this;

+ 87 - 20
src/projects/business/views/Master/Home.vue

@@ -69,13 +69,13 @@
 						</router-link>
 					</div>
 					<div class="mui-col-xs-6">
-						<router-link :to="{name:'MasterMineFeedback'}" class="vongi-floor-padded">
+						<a  @tap="updateCompany" class="vongi-floor-padded">
 							<div class="mui-media-body">
-								<h4 class="mui-ellipsis">问题反馈</h4>
-								<p class="mui-ellipsis">感谢您的发声</p>
+								<h4 class="mui-ellipsis">变更公司</h4>
+								<p class="mui-ellipsis">重选所在公司</p>
 							</div>
-							<img class="mui-media-object mui-pull-right" src="http://rccs.oss-cn-hangzhou.aliyuncs.com/jp_housekeeper/img/cicon18.png?x-oss-process=image/resize,h_50,m_lfit" width="54" />
-						</router-link>
+							<img class="mui-media-object mui-pull-right" src="http://rccs.oss-cn-hangzhou.aliyuncs.com/jp_housekeeper/img/cicon35.png?x-oss-process=image/resize,h_50,m_lfit" width="54" />
+						</a>
 					</div>
 					<div v-if="noticeList.length" class="mui-col-xs-12">
 						<div class="vongi-floor-padded">
@@ -88,23 +88,16 @@
 					<div class="mui-col-xs-12">
 						<div id="slider" class="mui-slider">
 							<div class="mui-slider-group">
+								
 								<!-- 第一张 -->
-								<div class="mui-slider-item">
-									<a href="javascript:void(0)">
-										<img src="http://rccs.oss-cn-hangzhou.aliyuncs.com/jp_housekeeper/img/02.jpg?x-oss-process=image/resize,h_200,m_lfit">
-									</a>
-								</div>
-								<!-- 第二张 -->
-								<div class="mui-slider-item">
-									<a href="javascript:void(0)">
-										<img src="http://rccs.oss-cn-hangzhou.aliyuncs.com/jp_housekeeper/img/02.jpg?x-oss-process=image/resize,h_200,m_lfit">
+								<div class="mui-slider-item" v-for="(item,i) in bannerTipsList" :key="i">
+									<a @click="showTips(item)" >
+										<img :src="item.picUrl">
 									</a>
 								</div>
+								 
 							</div>
-							<div class="mui-slider-indicator">
-								<div class="mui-indicator mui-active"></div>
-								<div class="mui-indicator"></div>
-							</div>
+							
 						</div>
 					</div>
 				</div>
@@ -132,6 +125,8 @@
 					</div>
 				</div>
 			</div>
+			<Tips :bannerTipsVisible="bannerTipsVisible" :bannerTipsPicUrl="bannerTipsPicUrl" :bannerTipsActivity="bannerTipsActivity"
+			      @bannerTipsHide="bannerTipsHide"></Tips>
 		</div>
 
 		<nav-menu :router="[{name:'Master'},{name:'MasterMineMessage'},{name:'MasterMineCenter'}]"></nav-menu>
@@ -142,16 +137,25 @@
 
 <script>
 	require('$project/assets/js/mui.picker.min.js');
+	import * as API_Common from '$project/apis/common'
+	
 	import * as API_Notice from '@/apis/Common/notice'
 	import * as API_User from '$project/apis/user'
 	import Common from '$project/components/Common.vue'
 	import Loading from '$project/components/Loading.vue'
 	import TopHeader from '$project/components/TopHeader.vue'
+	import Tips from '$project/components/Tips.vue'
+	
 	import NavMenu from '@/components/NavMenu.vue'
 	import {
 		mapGetters,
 		mapMutations
 	} from 'vuex'
+	import {
+		hourDistance,
+		currentTimeStamp,
+		parseUnixTime
+	} from '$project/utils'
 	import * as types from '$project/store/mutation-types'
 	export default {
 		name: 'Master',
@@ -159,19 +163,78 @@
 			Common,
 			Loading,
 			TopHeader,
-			NavMenu
+			NavMenu,Tips
 		},
 		data() {
 			return {
 				isLoading: false,
 
 				roleList: [],
-
+				bannerList:[
+					{
+						img:'Frame 913.png',
+						url:"img:Frame 912 (2).png"
+					}
+				],
+				
+				bannerTipsList: [],
+				bannerInterval: null,
+				//弹窗公告, 有就显示
+				bannerTipsVisible: false,
+				bannerTipsPicUrl: '',
+				bannerTipsId: '',
+				bannerTipsActivity: null,
 				noticeList: [],
 			}
 		},
 		created() {},
+		
 		methods: {
+			showTips(item){
+				this.bannerTipsVisible = true;
+				
+				this.bannerTipsPicUrl = item.linkUrl;
+							         
+			},
+			getBannerTipsInfo() {
+				
+				var time =parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
+				var bannerTipsTime= window.localStorage.getItem("xpgj_bannerTipsTime");
+			    //tips 广告
+			    API_Common.getBannerInfo("5").then(response => {
+			        // = response;
+			        this.bannerTipsList=response;
+					
+			        if(!bannerTipsTime||bannerTipsTime!=time){
+						
+			        	if (this.bannerTipsList.length > 0) {
+			        	 			
+			        	    this.bannerTipsVisible = true;
+			        	    var x = Math.floor(Math.random() * this.bannerTipsList.length);
+			        	    this.bannerTipsPicUrl = this.bannerTipsList[x].linkUrl;
+							window.localStorage.setItem("xpgj_bannerTipsTime",time);
+			        	 
+			        	}
+			        }
+			     
+			
+			    }).catch(error => {
+			        this.mui.toast(error);
+			    })
+			},
+			bannerTipsHide() {
+			    this.bannerTipsVisible = false;
+			},
+			updateCompany(){
+				var _this = this;
+				var btnArray = ['取消', '确认'];
+				mui.confirm('选择新公司后,需要新的公司管理员审核通过后方可正式加入', '确认变更', btnArray, function(e) {
+					if (e.index == 1) {
+						window.location.href="../home/#/register/business/step2?isupdate=1"
+					}
+				})
+				
+			},
             goto(url){
                 window.location=url;
 			},
@@ -279,6 +342,10 @@
 				interval: 2000, //自动轮播周期,若为0则不自动播放,默认为0;
 				bounce: true //是否启用回弹
 			});
+	
+			this.getBannerTipsInfo()
+			
+			
 		},
 		destroyed() {
 

+ 20 - 2
src/projects/home/views/Register/Business/Step2.vue

@@ -87,7 +87,7 @@
 		data() {
 			return {
 				pageTitle: '选择单位',
-
+				isupdate:false,
 				subForm: {
 					sceneId: '',
 					sceneName: '',
@@ -136,7 +136,25 @@
 			}
 		},
 		created() {
-			this.subForm = this.register_form_data;
+			if(this.$route.query.isupdate){
+				this.isupdate=true;
+				 this.subForm = {"sceneId":"1","sceneName":"工厂园区",
+				 "personRoleId":"1","roleName":"员工","name":"",
+				 "personId":"","companyId":"","companyName":"请选择",
+				 "companyStructureId":"","serviceCompanyId":"",
+				 "serviceCompanyName":"请选择","selectCompanyStructureList":[],
+				 "address":"","idCard":"","faceImageUrl":"","popularizePersonId":""}
+				 this.subForm.personId = this.person_data.id;
+				 this.subForm.changeCompany=1;
+				 	this.set_register_form_data(this.subForm);
+				 
+			}else{
+				
+					this.subForm = this.register_form_data;
+					this.subForm.changeCompany=0;
+			
+			}
+		
 			this.companyForm.sceneId = this.subForm.sceneId;
 			this.searchForm.sceneId = this.subForm.sceneId;
 		},