123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- <!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" />
- <title></title>
- </head>
- <style>
- .dingdangenzong .dingdanSearch {
- top: .1rem
- }
- .dingdangenzong {
- padding-top: 1.2rem;
- }
- .totalCount {
- background-color: #00a0ea !important;
- color: #fff;
- text-align: center;
- padding: 0.3rem 0;
- font-size: 0.3rem;
- width: 90%;
- margin: 0 5%;
- border-radius: 5px;
- }
- .search_input{
- color: #B5B5B5;
- font-size: .25rem;
- width: 100%;
- padding-left: .8rem;
- }
- </style>
- <body>
- <div id="app" v-cloak>
- <div class="pageView dingdangenzong" style="overflow:scroll;overflow-y:hidden">
- <div class="totalCount">总共:{{ totaltotals }} 家</div>
- <div class="dingdanSearch flex a-center j-center">
- <div class="search_box flex a-center">
- <!-- <input type="text" placeholder="请输入门店名称" v-model="agentKeyword"> -->
- <div class="search_input" v-on:click="inSearch">
- 请输入门店名称
- </div>
- <div class="fgx"></div>
- <div class="search_btn flex a-center" style="width:1.8rem" v-on:click="chooseStatus">{{ agentStatus.name }} <i class="iconfont icon-xia"></i> </div>
- <van-icon name="search" size="0.32rem" />
- </div>
- </div>
- <div class="mendianliebiao" v-show="list.length > 0" id="mescroll" style="height:94%">
- <div class="item flex a-center" v-for="(item,index) in list" v-on:click="lookStoreInfo(item.id)" style="margin-bottom:.5rem">
- <div class="img"><img :src="item.storeImageUrl" onerror="javascript:this.src='./image/noimg.png';"></div>
- <div class="infos">
- <h2>{{item.storeName}}</h2>
- <p>经销品牌:{{item.brandName}}</p>
- <p>电话:{{item.storePhone}}</p>
- <span>状态:{{item.statusName}}</span>
- </div>
- <i class="iconfont icon-right"></i>
- </div>
- </div>
- <div v-show="list.length == 0" style="text-align:center">
- <img src="./image/nodata.png" style="margin:2rem auto;width:100%;height:100%" />
- </div>
- </div>
- </div>
- </body>
- <!-- <script src="js/vue.js"></script> -->
- <script type="text/javascript" src="../script/aui-scroll.js"></script>
- <link rel="stylesheet" href="./mescroll/mescroll.min.css">
- <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
- <script type="text/javascript" src="../script/vue.js"></script>
- <script src="js/vant-ui.js"></script>
- <script src="js/main.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>
- apiready = function() {
- new Vue({
- el: '#app',
- data: {
- list : [],
- // list: [{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1},{statusName : 1}],
- kunnr: '',
- current: 1,
- size: 10,
- totalPages: 1,
- frist : 1,
- statuses : [{
- code : '',
- name : '全部'
- },{
- code : '0',
- name : '待审核'
- },{
- code : '1',
- name : '审核通过'
- },{
- code : '3',
- name : '门店已冻结'
- }],
- agentKeyword : '', // 门店名称
- agentStatus : {code : '',name : '全部'},
- UIActionSelector : '',
- mescroll : '',
- hasOther : false,
- totaltotals : 0,
- },
- // watch : {
- // agentKeyword : function(nw,ow){
- // this.current = 1;
- // this.getStoreList();
- // }
- // },
- mounted: function() {
- this.init();
- },
- methods: {
- init: function() {
- this.UIActionSelector = api.require("UIActionSelector");
- this.kunnr = $api.getStorage('kunnr');
- this.getStoreList();
- var _this = this;
- this.addEvent('refushAgentList',function(){
- _this.current =_this.current;
- _this.getStoreList();
- })
- },
- configs : function(){
- var _this = this;
- this.frist = 2;
- this.configDownAndPull("mescroll", function(mescroll) {
- _this.list = [];
- _this.current = 1;
- _this.mescroll = mescroll;
- _this.getStoreList(mescroll);
- }, function(mescroll) {
- if (_this.current < _this.totalPages) {
- _this.current = _this.current + 1;
- _this.getStoreList(mescroll, 1);
- } else {
- mescroll.endSuccess(_this.size, false);
- }
- },false);
- this.configBottomRefush(function(){
- if (_this.current < _this.totalPages) {
- _this.current = _this.current + 1;
- _this.getStoreList(_this.mescroll, 1);
- } else {
- _this.hasOther = true;
- // _this.mescroll.endSuccess(_this.size, false);
- }
- })
- },
- getStoreList: function(mescroll) {
- var params = {
- kunnr: this.kunnr,
- "status": this.agentStatus.code,
- "storeName":this.agentKeyword,
- "current" : this.current,
- "size" : this.size,
- url: 'json',
- type: 'body'
- },
- _this = this;
- this.$post('getRetailerUrl', params, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- _this.list = _this.current == 1 ? ret.list.records : _this.list.concat(ret.list.records);
- _this.totalPages = ret.list.pages;
- _this.totaltotals = ret.list.total;
- // _this.list = _this.current == 1 ? _this.demoList : _this.list.concat(_this.demoList);
- if(_this.frist == 1){
- _this.$nextTick(function(){
- _this.configs();
- })
- }
- if(mescroll){
- mescroll.endSuccess(_this.size,true);
- }
- }
- });
- },
- // 点击查看门店详情进行审核
- lookStoreInfo: function(id) {
- var params = {
- storeId: id
- }
- this.goWin('agentInfo', 'agentInfo_win.html', params);
- },
- // 筛选状态
- chooseStatus : function(){
- var _this = this;
- this.chooseRegion(this.UIActionSelector,1,this.statuses,function(ret){
- if(ret.eventType == 'ok'){
- _this.agentStatus = ret.selectedInfo[0];
- _this.current = 1;
- if(_this.mescroll != ''){
- _this.mescroll.resetUpScroll();
- _this.mescroll.endSuccess(_this.size,true);
- }
- _this.getStoreList();
- }
- })
- },
- inSearch:function(){
- this.goWin('agentSearch', 'agentSearch_win.html');
- }
- }
- })
- }
- </script>
- </html>
|