123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359 |
- <!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/vant-ui.css" />
- <link rel="stylesheet" type="text/css" href="css/iconfont.css">
- <link rel="stylesheet" type="text/css" href="css/main.css" />
- <script src="js/vue.js"></script>
- <script src="js/vant-ui.js"></script>
- <script src="js/main.js"></script>
- <title></title>
- </head>
- <style>
- .menu .item p {
- font-size: 0.26rem;
- }
- .line1 {
- width:300px;
- overflow: hidden;
- text-overflow:ellipsis;
- }
- </style>
- <body>
- <div id="app">
- <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" 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">
- <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
- <van-swipe-item v-if="!storeBrand.length"><img src="image/banner1.png">
- </van-swipe-item>
- <van-swipe-item 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 class="item flex col a-center j-center" v-on:click="openWin('orderList')">
- <b class="icon c2"></b>
- <p>
- 门店订单
- </p>
- </div>
- <div class="item flex col a-center j-center" v-on:click="openWin('fac_storage')">
- <b class="icon c3"></b>
- <p>
- 工厂库存
- </p>
- </div>
- <!-- <div class="item flex col a-center j-center" v-on:click="openWin('propaganda')">
- <b class="icon c4"></b>
- <p>
- 厂家宣传
- </p>
- </div> -->
- <!-- <div class="item flex col a-center j-center" v-on:click="openWin('agentList')">
- <b class="icon c5"></b>
- <p>
- 签约审核
- </p>
- </div> -->
- <div class="item flex col a-center j-center" v-on:click="openWin('intoStore')">
- <b class="icon c6"></b>
- <p>
- 门店进货分析
- </p>
- </div>
- <div class="item flex col a-center j-center" v-on:click="openWin('b2b_order_list')">
- <b class="icon c7"></b>
- <p>
- 订单跟踪
- </p>
- </div>
- <!-- <div class="item flex col a-center j-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>快速工作栏</h4>
- </div>
- <div class="workFieldContainer flex jlr wrap">
- <div class="item"><img src="image/mendian1.png" v-on:click="openWin('agentList')">
- </div>
- <div class="item"><img src="image/hexiao1.png" v-on:click="openWin('backList')">
- </div>
- <div class="item"><img src="image/111.png" v-on:click="openWin('propaganda')">
- </div>
- <div class="item"><img src="image/myku.png" v-on:click="openWin('agent_storage')">
- </div>
- <img src="image/banner_bottom.png" style="height : 3rem">
- </div>
- <div class="workField flex a-center">
- <div class="case"><img src="img/images/work.png">
- </div>
- <h4>本月进货 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>
- {{ item.storeName }}
- </p>
- <p>
- 电话:{{ item.storePhone }}
- </p>
- <p>
- 经销品牌:{{ item.brandName }}
- </p>
- <div style="display:flex">
- <p style="flex : 1">
- 签约任务:{{ item.numTask }}条
- </p>
- <p style="flex : 1">
- 线上订货数量:{{ item.ocount }}条
- </p>
- </div>
- <div style="display:flex">
- <p style="flex : 1">
- 本月待完成:{{ item.leftNum }}条
- </p>
- <p style="flex : 1">
- 本月已完成:{{ item.scanNum }}条
- </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="./mescroll/mescroll.min.css">
- <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
- <script type="text/javascript" src="../script/api.js"></script>
- <script type="text/javascript" src="../script/httpRequest.js"></script>
- <script type="text/javascript" src="../script/vue_plugins.js"></script>
- <script type="text/javascript">
- apiready = function() {
- 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');
- }
- new Vue({
- el : '#app',
- data : {
- footerHeight : 0,
- list : [],
- agentName : '',
- icon : [{
- label : '首页',
- path : '/',
- active : "./img/images/tabar_home_active.png",
- inactive : "./img/images/tabar_home_inactive.png"
- }, {
- label : '发现',
- path : '/discover',
- active : './img/images/faxian.png',
- inactive : './img/images/faxian.png'
- }, {
- label : '消息',
- path : '/information',
- active : './img/images/xiaoxi.png',
- inactive : './img/images/xiaoxi.png'
- }, {
- label : '我的',
- path : '/meber',
- active : './img/images/wode.png',
- inactive : './img/images/wode.png'
- }],
- scanCodeData : '',
- storeList : [],
- kunnr : '',
- messageList : [],
- storeBrand:[]
- },
- methods : {
- init : function(){
- var _this = this;
- this.kunnr = $api.getStorage('kunnr');
- this.addEvent("refushUser",function(){
- _this.kunnr = $api.getStorage('kunnr');
- _this.getMeberInfo();
- _this.getStoreList_jiage();
- })
- 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("核销码审核", "审核"+ret1.code+"是否通过?", ["不通过","通过"], 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){
- this.goWin(src,src+'_win.html','');
- },
- // 获取门店进货分析
- 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 = {
- "KUNNR":this.kunnr,
- "url" : "json",
- "type" : "body",
- }
- this.$post(url,data,function(ret){
- if(ret.code == 0 || ret.code == '0'){
- _this.storeBrand= ret.agentBanner;
- }
- })
- },
- // 查询门店进货分析 -- 贾哥
- getStoreList_jiage : function(mescroll){
- var data = "agentCode=" + this.kunnr + "¤t=1&size=10",_this = this;
- setTimeout(function(){
- if(mescroll){
- mescroll.endSuccess();
- }
- },1000);
- this.$get("getInfoStoreU_jiage",data,function(ret){
- if (ret.code == 0 || ret.code == '0') {
- _this.storeList = ret.page.records;
- 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.list;
- })
- },
- },
- mounted : function() {
- this.init();
- var _this = this;
- this.ifHasPrme('storage', function(ret) {
- if (ret == true) {
- _this.getNewVersionUrl(function() {
- });
- }
- })
- // this.footerHeight = this.$refs['footer'].$el.offsetHeight
- }
- })
- }
- </script>
|