
<style scoped> 
.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}
.clearfix{overflow:hidden;_zoom:1;}
.text-gray{color:#717171;}
.text-orange{color:#eb7741;}
.text-danger{color:#c03546;}
.comp-login {background-color:#fff;height:100%;height:100vh;}
.input-box {background:#FFF;}
.comp-login {padding:0;margin:0;}
.Owner_StoreView{overflow: hidden;background: #F3F6FF;}
.titleClerkInfo{padding:0.8rem 3%;padding-bottom:0;text-indent:1.2rem;color:#3A8AFB;background: url(http://image.supercarrier8.com/h5_key/icon-info.png) no-repeat 3% 0.8rem;background-size:1rem;background-color: #fff;font-weight: 700;}
.productPanel{background-color: #fff;padding: 0 3%;}
.productWay {padding: 1.06rem 0;border-bottom: 1px solid #E9E9E9;display:flex;line-height: 1;}
.productWay .titleInfo{margin-right: 0.6rem}
.productWay .titleInfo span{width:3.75rem;display: inline-block;text-align:justify;text-justify:distribute-all-lines;/*ie6-8*/text-align-last:justify;/* ie9*/-moz-text-align-last:justify;/*ff*/-webkit-text-align-last:justify;/*chrome 20+*/}
.productWay .resultInfo{-webkit-box-flex: 1;flex: 1;}/*icon-tel-blue.png */
.productWay .resultInfo .telCode{color:#3A8AFB;margin-left:0.2rem;font-size:0.75rem;padding-right:0.9rem;background: url(http://image.supercarrier8.com/h5_key/icon-tel-blue.png) no-repeat 98% center;background-size:0.8rem 0.8rem;}
.mint-button{width:92%;margin:0 auto;margin-top:1rem;background-color:#3A8AFB;border-radius: 0.2rem;}
.mask {position: fixed;top: 0;left: 0;height: 100%;width: 100%;background: rgba(0, 0, 0, 0.5);}
</style>
<style>
.mint-indicator .mint-indicator-mask{z-index:2008;}
</style>
<template> 
  <div class="container comp-login jfBaseSize Owner_StoreView" v-cloak v-bind:style="isShow.vh?'height:100vh':'height: 100%;'"> 
    <div class="titleClerkInfo">店员信息</div>
    <div class="productPanel">
      <div class="productWay">
          <div class="titleInfo">
            <span>店员编号</span>
          </div>
          <div class="resultInfo">
            <span class="text-gray" v-html="model.MemberNo?model.MemberNo:'-'"></span>
          </div>
      </div>
      <div class="productWay">
        <div class="titleInfo">
          <span>店员姓名</span>
        </div>
        <div class="resultInfo">
          <span class="text-gray" v-html="model.NickName?model.NickName:'-'"></span>
        </div>
      </div>
      <div class="productWay">
        <div class="titleInfo">
          <span>所属门店</span>
        </div>
        <div class="resultInfo">
          <span class="text-gray" v-html="model.StoreName?model.StoreName:'-'"></span>
        </div>
      </div>
      <div class="productWay">
        <div class="titleInfo">
          <span>手机号</span>
        </div>
        <div class="resultInfo">
          <span class="text-gray" v-html="model.Mobile?model.Mobile:'-'"></span>
          <!-- <span class="telCode">拨打</span> -->
          <a class="telCode" v-if="model.Mobile?true:false" v-bind:href="'tel:'+model.Mobile">拨打</a>
        </div>
      </div>
      <div class="productWay">
        <div class="titleInfo">
          <span>注册时间</span>
        </div>
        <div class="resultInfo">
          <span class="text-gray" v-html="model.RegTime?model.RegTime:'-'"></span>
        </div>
      </div>
    </div>
    <ReturnHome ref="returnhome"></ReturnHome>
  </div>
</template>
<script>
import { Toast,InfiniteScroll } from 'mint-ui';
import {Indicator} from 'mint-ui';
import channelHelper from "@/assets/js/channelHelper.js";
	import ReturnHome from "@/components/channel/temp001/ReturnHome";
import { base64 } from "@/assets/js/cryptoHelper";
import { debug } from 'util';
import '@/assets/js/libs/js.cookie';
export default {
  name: "Key_AddStore",
   components: {ReturnHome},
  provide(){       
     return{           
        goPage:this.goPage       
     }   
  },
  props: ["comp", "cfg", "selectedPage"],
  data() { 
    return {
      searchData:{},
      model:{

      },
      isShow:{
        vh:false,
      },
    };
  },
  methods: {
    goPage(pagetype){
        this.$parent.changeSelectedPage(pagetype);
    },
    H5GetClerkInfo:function(){//店员信息
      var that=this;
      Indicator.open();
      var url = "/channel/H5GetClerkInfo";
      var dataParams = that.searchData;
      var cbError=function(){Indicator.close();}
      var cbSuccess = function(res){
          Indicator.close();
          if (res.flag){
            if (res.data) {
              that.$set(that,'model',res.data);
            }
          }else{
            Toast(res.msg);
            that.judgeLogin();
          }
      };
      //请求后端
      channelHelper.CommonCallService(url,dataParams,cbSuccess,cbError,null,null);
    },
    judgeLogin:function(){
      var eno = this.sup8.context.enterpriseno;
      if (!channelHelper.CheckLogin(this.$parent,eno,this.sup8.context.entranceid)) {
        this.$parent.changeSelectedPage('Key_Login');
        return false;
      }
    },
  },
  created: function() {
    var that = this;
    var isDesign = location.pathname.indexOf('design');
    if(isDesign!=-1)
    {
        return;
    }
    //判断是否登录
    that.judgeLogin();
    var data=JSON.parse(sessionStorage.getItem("OwnerStoreManager"));
    if (data&&data.ID) {
      that.$set(that,'searchData',{
        UserToken:channelHelper.GetUserToken(),
        EnterpriseNo:that.sup8.context.enterpriseno,
        LanguageType:channelHelper.GetLanguageType(),
        ClerkId:(data.ID?data.ID:""),
      });
      that.H5GetClerkInfo();
    }
  },
  mounted: function() {
    
  }
};
</script>
