agentList_body.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <!DOCTYPE html>
  2. <html class="">
  3. <!--STATUS OK-->
  4. <head>
  5. <meta name="referrer" content="always" />
  6. <meta charset='utf-8' />
  7. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="x-dns-prefetch-control" content="on">
  9. <meta name="description" content="">
  10. <meta name="format-detection" content="telephone=no" />
  11. <link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
  12. <link rel="stylesheet" type="text/css" href="css/iconfont.css">
  13. <link rel="stylesheet" type="text/css" href="css/main.css" />
  14. <title></title>
  15. </head>
  16. <style>
  17. .dingdangenzong .dingdanSearch {
  18. top: .1rem
  19. }
  20. .dingdangenzong {
  21. padding-top: 1.2rem;
  22. }
  23. .totalCount {
  24. background-color: #00a0ea !important;
  25. color: #fff;
  26. text-align: center;
  27. padding: 0.3rem 0;
  28. font-size: 0.3rem;
  29. width: 90%;
  30. margin: 0 5%;
  31. border-radius: 5px;
  32. }
  33. .search_input{
  34. color: #B5B5B5;
  35. font-size: .25rem;
  36. width: 100%;
  37. padding-left: .8rem;
  38. }
  39. </style>
  40. <body>
  41. <div id="app" v-cloak>
  42. <div class="pageView dingdangenzong" style="overflow:scroll;overflow-y:hidden">
  43. <div class="totalCount">总共:{{ totaltotals }} 家</div>
  44. <div class="dingdanSearch flex a-center j-center">
  45. <div class="search_box flex a-center">
  46. <!-- <input type="text" placeholder="请输入门店名称" v-model="agentKeyword"> -->
  47. <div class="search_input" v-on:click="inSearch">
  48. 请输入门店名称
  49. </div>
  50. <div class="fgx"></div>
  51. <div class="search_btn flex a-center" style="width:1.8rem" v-on:click="chooseStatus">{{ agentStatus.name }} <i class="iconfont icon-xia"></i> </div>
  52. <van-icon name="search" size="0.32rem" />
  53. </div>
  54. </div>
  55. <div class="mendianliebiao" v-show="list.length > 0" id="mescroll" style="height:94%">
  56. <div class="item flex a-center" v-for="(item,index) in list" v-on:click="lookStoreInfo(item.id)" style="margin-bottom:.5rem">
  57. <div class="img"><img :src="item.storeImageUrl" onerror="javascript:this.src='./image/noimg.png';"></div>
  58. <div class="infos">
  59. <h2>{{item.storeName}}</h2>
  60. <p>经销品牌:{{item.brandName}}</p>
  61. <p>电话:{{item.storePhone}}</p>
  62. <span>状态:{{item.statusName}}</span>
  63. </div>
  64. <i class="iconfont icon-right"></i>
  65. </div>
  66. </div>
  67. <div v-show="list.length == 0" style="text-align:center">
  68. <img src="./image/nodata.png" style="margin:2rem auto;width:100%;height:100%" />
  69. </div>
  70. </div>
  71. </div>
  72. </body>
  73. <!-- <script src="js/vue.js"></script> -->
  74. <script type="text/javascript" src="../script/aui-scroll.js"></script>
  75. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  76. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  77. <script type="text/javascript" src="../script/vue.js"></script>
  78. <script src="js/vant-ui.js"></script>
  79. <script src="js/main.js"></script>
  80. <script type="text/javascript" src="../script/api.js"></script>
  81. <script type="text/javascript" src="../script/httpRequest.js"></script>
  82. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  83. <script>
  84. apiready = function() {
  85. new Vue({
  86. el: '#app',
  87. data: {
  88. list : [],
  89. // 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}],
  90. kunnr: '',
  91. current: 1,
  92. size: 10,
  93. totalPages: 1,
  94. frist : 1,
  95. statuses : [{
  96. code : '',
  97. name : '全部'
  98. },{
  99. code : '0',
  100. name : '待审核'
  101. },{
  102. code : '1',
  103. name : '审核通过'
  104. },{
  105. code : '3',
  106. name : '门店已冻结'
  107. }],
  108. agentKeyword : '', // 门店名称
  109. agentStatus : {code : '',name : '全部'},
  110. UIActionSelector : '',
  111. mescroll : '',
  112. hasOther : false,
  113. totaltotals : 0,
  114. },
  115. // watch : {
  116. // agentKeyword : function(nw,ow){
  117. // this.current = 1;
  118. // this.getStoreList();
  119. // }
  120. // },
  121. mounted: function() {
  122. this.init();
  123. },
  124. methods: {
  125. init: function() {
  126. this.UIActionSelector = api.require("UIActionSelector");
  127. this.kunnr = $api.getStorage('kunnr');
  128. this.getStoreList();
  129. var _this = this;
  130. this.addEvent('refushAgentList',function(){
  131. _this.current =_this.current;
  132. _this.getStoreList();
  133. })
  134. },
  135. configs : function(){
  136. var _this = this;
  137. this.frist = 2;
  138. this.configDownAndPull("mescroll", function(mescroll) {
  139. _this.list = [];
  140. _this.current = 1;
  141. _this.mescroll = mescroll;
  142. _this.getStoreList(mescroll);
  143. }, function(mescroll) {
  144. if (_this.current < _this.totalPages) {
  145. _this.current = _this.current + 1;
  146. _this.getStoreList(mescroll, 1);
  147. } else {
  148. mescroll.endSuccess(_this.size, false);
  149. }
  150. },false);
  151. this.configBottomRefush(function(){
  152. if (_this.current < _this.totalPages) {
  153. _this.current = _this.current + 1;
  154. _this.getStoreList(_this.mescroll, 1);
  155. } else {
  156. _this.hasOther = true;
  157. // _this.mescroll.endSuccess(_this.size, false);
  158. }
  159. })
  160. },
  161. getStoreList: function(mescroll) {
  162. var params = {
  163. kunnr: this.kunnr,
  164. "status": this.agentStatus.code,
  165. "storeName":this.agentKeyword,
  166. "current" : this.current,
  167. "size" : this.size,
  168. url: 'json',
  169. type: 'body'
  170. },
  171. _this = this;
  172. this.$post('getRetailerUrl', params, function(ret) {
  173. if (ret.code == 0 || ret.code == '0') {
  174. _this.list = _this.current == 1 ? ret.list.records : _this.list.concat(ret.list.records);
  175. _this.totalPages = ret.list.pages;
  176. _this.totaltotals = ret.list.total;
  177. // _this.list = _this.current == 1 ? _this.demoList : _this.list.concat(_this.demoList);
  178. if(_this.frist == 1){
  179. _this.$nextTick(function(){
  180. _this.configs();
  181. })
  182. }
  183. if(mescroll){
  184. mescroll.endSuccess(_this.size,true);
  185. }
  186. }
  187. });
  188. },
  189. // 点击查看门店详情进行审核
  190. lookStoreInfo: function(id) {
  191. var params = {
  192. storeId: id
  193. }
  194. this.goWin('agentInfo', 'agentInfo_win.html', params);
  195. },
  196. // 筛选状态
  197. chooseStatus : function(){
  198. var _this = this;
  199. this.chooseRegion(this.UIActionSelector,1,this.statuses,function(ret){
  200. if(ret.eventType == 'ok'){
  201. _this.agentStatus = ret.selectedInfo[0];
  202. _this.current = 1;
  203. if(_this.mescroll != ''){
  204. _this.mescroll.resetUpScroll();
  205. _this.mescroll.endSuccess(_this.size,true);
  206. }
  207. _this.getStoreList();
  208. }
  209. })
  210. },
  211. inSearch:function(){
  212. this.goWin('agentSearch', 'agentSearch_win.html');
  213. }
  214. }
  215. })
  216. }
  217. </script>
  218. </html>