123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444 |
- <!DOCTYPE html>
- <html class="">
- <!--STATUS OK-->
- <head>
- <meta name="referrer" content="always" />
- <meta charset='utf-8' />
- <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="x-dns-prefetch-control" content="on">
- <meta name="description" content="">
- <meta name="format-detection" content="telephone=no" />
- <link rel="stylesheet" type="text/css" href="../../../../css/css/vant-ui.css" />
- <link rel="stylesheet" type="text/css" href="../../../../css/css/iconfont.css">
- <link rel="stylesheet" type="text/css" href="../../../../css/css/main.css" />
- <!-- <script src="https://b2bcnfile.sailuntire.com/upload/outerstyle/agentCommon/TBR/js/tbr_role_config.js?v=2" charset="utf-8"></script> -->
- <script src="../../js/tbr_role_config.js" charset="utf-8"></script>
- <script type="text/javascript" src="../../../../script/js/vue.js"></script>
- <script type="text/javascript" src="../../../../script/js/vue-i18n.js"></script>
- <script type="text/javascript" src="../../js/zh.js"></script>
- <script type="text/javascript" src="../../js/en.js"></script>
- <script src="../../../../script/js/vant-ui.js"></script>
- <script src="../../../../script/js/main.js"></script>
- <title></title>
- </head>
- <style>
- .menu .item p {
- font-size: 0.26rem;
- text-align: center;
- }
- .line1 {
- width:300px;
- overflow: hidden;
- text-overflow:ellipsis;
- }
- .mt-10 {
- margin-top: 10px;
- }
- </style>
- <body>
- <div id="app" v-cloak>
- <div class="header flex a-center j-center line1" id="aui-header" style="height: 1.5rem;font-size: 0.4rem;width : 100%;text-align:center">
- <p class="line1">{{ agentName }}</p>
- </div>
- <div class="view flex col">
- <div class="page router fx1 mescroll" style="padding-top: 0.86rem;" :style="{'padding-bottom':footerHeight+'px'}" id="mescroll">
- <!-- <div class="header flex a-center j-center" id="aui-header">
- 赛轮轮胎经销商
- <div class="toobla">
- <div class="icon4"></div>
- </div>
- </div>-->
- <div style="background-color:#00a0ea;height:.5rem;width:100%">
- </div>
- <div class="banner mt-10">
- <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
- <van-swipe-item @click="handleSee"v-if="!storeBrand.length"><img src="../../../../image/image/news.jpg">
- </van-swipe-item>
- <van-swipe-item @click="handleSee"v-else v-for="(item,index) in storeBrand" :key="index"><img :src="item.imgPath"></van-swipe-item>
- </van-swipe>
- </div>
- <div class="homeTipbox flex a-center">
- <div class="laba"></div>
- <div class="labaInfos">
- <van-swipe style="height: .35rem;" :autoplay="3000" :show-indicators="false" vertical >
- <van-swipe-item v-for="(item,index) in messageList" :key="index">{{item.msgContent}}</van-swipe-item>
- </van-swipe>
- </div>
- </div>
- <div class="menu flex wrap">
- <div v-if="roleConfig[subRoleName].pages[0].subEle.orderList.isShow" class="item flex col a-center" v-on:click="openWin('orderList')">
- <b class="icon c2"></b>
- <p>
- {{ $t('home.index.storeOrder') }}
- </p>
- </div>
- <div v-if="roleConfig[subRoleName].pages[0].subEle.fac_storage.isShow" class="item flex col a-center" v-on:click="openWin('fac_storage')">
- <b class="icon c3"></b>
- <p>
- {{ $t('home.index.factoryInventory') }}
- </p>
- </div>
- <!-- <div class="item flex col a-center" v-on:click="openWin('propaganda')">
- <b class="icon c4"></b>
- <p>
- 厂家宣传
- </p>
- </div> -->
- <!-- <div class="item flex col a-center" v-on:click="openWin('agentList')">
- <b class="icon c5"></b>
- <p>
- 签约审核
- </p>
- </div> -->
- <div v-if="roleConfig[subRoleName].pages[0].subEle.intoStore.isShow" class="item flex col a-center" v-on:click="openWin('intoStore')">
- <b class="icon c6"></b>
- <p>
- {{ $t('home.index.storePurchaseAnalysis') }}
- </p>
- </div>
- <div v-if="roleConfig[subRoleName].pages[0].subEle.b2b_order_list.isShow" class="item flex col a-center" v-on:click="openWin('b2b_order_list')">
- <b class="icon c7"></b>
- <p>
- {{ $t('home.index.orderTrack') }}
- </p>
- </div>
- <!-- <div class="item flex col a-center" v-on:click="scanCode">
- <b class="icon c8"></b>
- <p>
- 核销审核
- </p>
- </div> -->
- </div>
- <div class="workField flex a-center">
- <div class="sup"></div>
- <h4>{{ $t('home.index.QuickWork') }}</h4>
- </div>
- <div class="workFieldContainer flex jlr wrap">
- <div v-if="roleConfig[subRoleName].pages[0].subEle.agentList.isShow" class="item"><img :src="imgs[0][langFlag]" v-on:click="openWin('agentList')"></div>
- <div v-if="roleConfig[subRoleName].pages[0].subEle.backList.isShow" class="item"><img :src="imgs[1][langFlag]" v-on:click="openWin('backList')"></div>
- <div v-if="roleConfig[subRoleName].pages[0].subEle.propaganda.isShow" class="item"><img :src="imgs[2][langFlag]" v-on:click="openWin('propaganda')"></div>
- <div v-if="roleConfig[subRoleName].pages[0].subEle.agent_storage.isShow" class="item"><img :src="imgs[3][langFlag]" v-on:click="openWin('agent_storage')"></div>
- <img :src="imgs[4][langFlag]" style="height : 3rem">
- </div>
- <div class="workField flex a-center">
- <div class="case"><img src="../../../../image/img/images/work.png">
- </div>
- <h4>{{ $t('home.index.monthlyPurchase') }} TOP 10</h4>
- </div>
- <ul class="jinhuoRank">
- <li class="flex a-center" v-for="(item,index) in storeList" style="height:2.5rem">
- <!-- <div class="image"><img :src="item.storeImageUrl">
- </div> -->
- <div class="info">
- <p>
- {{ $t('home.index.storeName') }}:{{ item.storeName }}
- </p>
- <p>
- {{ $t('home.index.mobile') }}:{{ item.storePhone }}
- </p>
- <p>
- {{ $t('home.index.sellBrand') }}:{{ item.brandName }}
- </p>
- <div style="display:flex">
- <p style="flex : 1">
- {{ $t('home.index.signContract') }}:{{ item.signCount }}{{ $t('common.one') }}
- </p>
- <p style="flex : 1">
- {{ $t('home.index.scanCodeNum') }}:{{ item.count }}{{ $t('common.one') }}
- </p>
- </div>
- </div>
- <div class="fgx"></div>
- <div class="rankwrap flex col a-center j-center">
- <h2>{{ (index + 1)}}</h2>
- TOP
- </div>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </body>
- </html>
- <link rel="stylesheet" href="../../../../script/mescroll/mescroll.min.css">
- <script type="text/javascript" src="../../../../script/mescroll/mescroll.min.js"></script>
- <script type="text/javascript" src="../../../../script/api.js"></script>
- <script type="text/javascript" src="../../js/httpRequest_tbr.js"></script>
- <script type="text/javascript" src="../../../../script/vue_plugins.js"></script>
- <script type="text/javascript" src="../../../../script/js/moment.js"></script>
- <script type="text/javascript">
- apiready = function() {
- let langType = $api.getStorage('lang') || 'cn'
- const i18n = new VueI18n({
- locale: langType,//设置语言
- messages: {
- en: getEn(),
- cn: getCn()
- }
- })
- api.addEventListener({
- name:'updateLang'
- }, function(ret, err){
- i18n.locale = $api.getStorage('lang') || 'cn'
- });
- var header = $api.byId('aui-header');
- $api.fixStatusBar(header);
- var headerPos = $api.offset(header);
- if (api.systemType == 'android') {
- $api.css($api.byId('app'), 'padding-top:20px');
- $api.css($api.byId('content'),'margin-top:' + (headerPos.h-20) + 'px');
- };
- var roleConfig = $role;
- new Vue({
- el : '#app',
- i18n,
- data : {
- footerHeight : 0,
- list : [],
- agentName : '',
- icon : [{
- label : '首页',
- path : '/',
- active : "../../../../image/img/images/tabar_home_active.png",
- inactive : "../../../../image/img/images/tabar_home_inactive.png"
- }, {
- label : '发现',
- path : '/discover',
- active : '../../../../image/img/images/faxian.png',
- inactive : '../../../../image/img/images/faxian.png'
- }, {
- label : '消息',
- path : '/information',
- active : '../../../../image/img/images/xiaoxi.png',
- inactive : '../../../../image/img/images/xiaoxi.png'
- }, {
- label : '我的',
- path : '/meber',
- active : '../../../../image/img/images/wode.png',
- inactive : '../../../../image/img/images/wode.png'
- }],
- scanCodeData : '',
- storeList : [],
- kunnr : '',
- messageList : [],
- storeBrand:[],
- subRoleName: "superAdmin",
- roleConfig: roleConfig,
- langFlag: 'cn',
- imgs: [
- {
- cn: '../../../../image/image/mendian1.png',
- en: '../../../../image/image/shop_approval.png',
- },
- {
- cn: '../../../../image/image/hexiao1.png',
- en: '../../../../image/image/my_vari.png',
- },
- {
- cn: '../../../../image/image/111.png',
- en: '../../../../image/image/pormation.png',
- },
- {
- cn: '../../../../image/image/myku.png',
- en: '../../../../image/image/my_stock.png',
- },
- {
- cn: '../../../../image/image/banner_bottom.png',
- en: '../../../../image/image/ad.png',
- }
- ]
- },
- methods : {
- init : function(){
- var _this = this;
- this.kunnr = $api.getStorage('kunnr');
- this.subRoleName = $api.getStorage('subRoleName');
- // 判断是什么角色
- this.subRoleName = $api.getStorage('subRoleName');
- this.addEvent("refushUser",function(){
- _this.kunnr = $api.getStorage('kunnr');
- _this.subRoleName = $api.getStorage('subRoleName');
- _this.getMeberInfo();
- _this.getStoreList_jiage();
- _this.getAgentBanner();
- })
- this.getMeberInfo();
- this.getStoreList_jiage();
- this.getAgentBanner();
- this.scanCodeData = api.require('codeScan');
- this.configDownAndPull("mescroll",function(mescroll){
- _this.getStoreList_jiage(mescroll);
- },function(){
- },false);
- this.getMessageList();
- this.initApush('p' + this.kunnr);
- },
- // 扫描二维码审核
- scanCode : function(){
- var _this = this,url = "checkConponU";
- // 判断有没有权限
- this.ifHasPrme('camera',function(ret){
- if(ret == true){
- _this.scanCodeData.scan(function(ret1, err) {
- _this.showModal(_this.$t('home.index.examineTitle'), _this.$t('home.index.examine') + ret1.code + _this.$t('home.index.isPass'), [_this.$t('home.index.noPass'), _this.$t('home.index.isPass')], function(ret){
- // 2 通过 1 不通过
- if(ret != 0){
- var data = {
- couponCode : ret1.code,
- kunnr : _this.kunnr,
- status : ret,
- url : 'json',
- type : 'body'
- }
- _this.$post(url,data,function(res){
- if(res.code == 0){
- api.toast({
- msg: '已审核' + ['','不通过','通过'][ret],
- });
- }
- })
- }
- })
- });
- }
- })
- },
- // 获取经销商信息
- getMeberInfo : function(){
- var url = "getMeberInfoU", _this = this,data = {token : $api.getStorage('token'),url : 'json',type : 'body'};
- this.$post(url,data,function(ret){
- if(ret.code == 0){
- if(ret.data == null){ // 个人不存在
- $api.clearStorage();
- _this.goWin("login", "login.html", "");
- }
- _this.agentName = ret.data.data == null ? '' : ret.data.data.name;
- }
- })
- },
- // 打开新页面
- openWin : function(src){
- if($role[this.subRoleName].pages[0].subEle[src].isClick){
- this.goWin(src,src+"/"+src+'_win.html','');
- }else{
- var index = langType == 'en'? 1 : 0
- api.toast({
- msg: $role[this.subRoleName].pages[0].subEle[src].msg[index]
- });
- }
- },
- // 获取门店进货分析
- getStoreIntoList : function(mescroll){
- var _this = this,url = "getIntoStoreU";
- var data = {
- "kunnr": this.kunnr,
- "pageSize": 10,
- "size":1,
- "url" : "json",
- "type" : "body",
- }
- this.$post(url,data,function(ret){
- if(ret.code == 0 || ret.code == '0'){
- _this.storeList = ret.Data;
- if(mescroll){
- mescroll.endSuccess();
- }
- }
- })
- },
- //轮播图
- getAgentBanner : function(){
- var _this = this,url = "getAgentBanner";
- var data = {
- "showPosition": 2,
- "url" : "json",
- "type" : "body",
- };
- this.$post(url,data,function(ret){
- if(ret.code == 0 || ret.code == '0'){
- _this.storeBrand= ret.data;
- }
- })
- },
- // 查询门店进货分析 -- 贾哥
- getStoreList_jiage : function(mescroll){
- var _this = this,url = "getInfoStoreU_jiage";
- var data = {
- "kunnr":this.kunnr,
- "url" : "json",
- "type" : "body",
- };
- setTimeout(function(){
- if(mescroll){
- mescroll.endSuccess();
- }
- },1000);
- this.$post("getInfoStoreU_jiage",data,function(ret){
- if (ret.code == 0 || ret.code == '0') {
- _this.storeList = ret.Data;
- if(mescroll){
- mescroll.endSuccess(_this.size,true);
- }
- }
- })
- },
- // 获取跑马灯链接
- getMessageList: function() {
- var data = {
- "url": "json",
- "type": "body",
- "contentType": 2,
- },
- _this = this;
- this.$post('getMessageList', data, function(ret) {
- _this.messageList = ret.data;
- })
- },
- handleSee: function(){
- var _this = this;
- var dateTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
- api.ajax({
- url: "http://b2bcnapi.sailuntire.com/allstell/app/sailun/appNewsCount/save",//'https://b2bcnapi.sailuntire.com/allstell/sailun/appNewsCount/save',
- method: 'post',
- headers : {
- "Content-type" : "application/json"
- },
- data: {
- "body":{
- "account": _this.kunnr,
- "appType": "2",
- "id": 0,
- "showTime": dateTime,
- "tapTime": dateTime
- }
- }
- },function(ret, err){
- var obj = {
- dateTime: dateTime
- };
- _this.goWin("news_win","./news/news_win.html",obj);
- // 不做提示
- });
- }
- },
- mounted : function() {
- this.langFlag = i18n.locale == 'en' ? 'en' : 'cn'
- this.init();
- var _this = this;
- this.ifHasPrme('storage', function(ret) {
- if (ret == true) {
- _this.getNewVersionUrlTbr(function() {
- });
- }
- })
- // this.footerHeight = this.$refs['footer'].$el.offsetHeight
- }
- })
- }
- </script>
|