agentList_body.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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/css/vant-ui.css" />
  12. <link rel="stylesheet" type="text/css" href="../../../../../css/css/iconfont.css">
  13. <link rel="stylesheet" type="text/css" href="../../../../../css/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. <van-tabs v-model="active">
  43. <van-tab title="门店审核">
  44. <div class="pageView dingdangenzong">
  45. <div class="totalCount">总共:{{ totaltotals }} 家</div>
  46. <div class="dingdanSearch flex a-center j-center">
  47. <div class="search_box flex a-center">
  48. <!-- <input type="text" placeholder="请输入门店名称" v-model="agentKeyword"> -->
  49. <div class="search_input" v-on:click="inSearch">
  50. 请输入门店名称
  51. </div>
  52. <div class="fgx"></div>
  53. <div class="search_btn flex a-center" style="width:1.8rem" v-on:click="chooseStatus">{{
  54. agentStatus.name }} <i class="iconfont icon-xia"></i> </div>
  55. <van-icon name="search" size="0.32rem" />
  56. </div>
  57. </div>
  58. <div class="mendianliebiao" v-show="list.length > 0" id="mescroll" style="height:80vh">
  59. <div class="item flex a-center" v-for="(item,index) in list"
  60. v-on:click="lookStoreInfo(item.id)">
  61. <div class="img"><img :src="item.storeImageUrl"
  62. onerror="javascript:this.src='../../../../../image/image/noimg.png';"></div>
  63. <div class="infos">
  64. <h2>{{item.storeName}}</h2>
  65. <p><a style="font-weight: 600;">经销品牌:</a>{{item.brandName}}</p>
  66. <p><a style="font-weight: 600;">电话:</a>{{item.storePhone}}</p>
  67. <span>状态:{{item.statusName}}</span>
  68. </div>
  69. <i class="iconfont icon-right"></i>
  70. </div>
  71. <div v-show="hasOther && list.length > 0"
  72. style="width: 100%;height: 1rem;;text-align : center;margin-top : 1rem;font-size:0.3rem">
  73. 暂无更多数据</div>
  74. </div>
  75. <div v-show="list.length == 0" style="text-align:center">
  76. <img src="../../../../../image/image/nodata.png"
  77. style="margin:2rem auto;width:100%;height:100%" />
  78. </div>
  79. </div>
  80. </van-tab>
  81. <van-tab title="冻结门店">
  82. <div class="pageView dingdangenzong">
  83. <div class="totalCount">总共:{{ freezeList.length }} 家</div>
  84. <div class="dingdanSearch flex a-center j-center">
  85. <div class="search_box flex a-center">
  86. <input type="text" placeholder="请输入门店名称" v-model="agentKeyword">
  87. <van-icon name="search" size="0.32rem" />
  88. </div>
  89. </div>
  90. <div class="mendianliebiao" v-show="freezeList.length > 0" id="mescroll" style="height:93vh">
  91. <div class="item flex a-center" v-for="(item,index) in freezeList"
  92. v-on:click="lookStoreInfo(item.id)">
  93. <div class="img"><img :src="item.storeImageUrl"
  94. onerror="javascript:this.src='../../../../../image/image/noimg.png';"></div>
  95. <div class="infos">
  96. <h2>{{item.storeName}}</h2>
  97. <p><a style="font-weight: 600;">经销品牌:</a>{{item.brandName}}</p>
  98. <p><a style="font-weight: 600;">电话:</a>{{item.storePhone}}</p>
  99. <span>状态:{{item.statusName}}</span>
  100. </div>
  101. <i class="iconfont icon-right"></i>
  102. </div>
  103. <div v-show="hasOther && freezeList.length > 0"
  104. style="width: 100%;height: 1rem;;text-align : center;margin-top : 1rem;font-size:0.3rem">
  105. 暂无更多数据</div>
  106. </div>
  107. <div v-show="freezeList.length == 0" style="text-align:center">
  108. <img src="../../../../../image/image/nodata.png"
  109. style="margin:2rem auto;width:100%;height:100%" />
  110. </div>
  111. </div>
  112. </van-tab>
  113. <van-tab title="门店解冻">
  114. <div class="pageView dingdangenzong">
  115. <div class="totalCount">总共:{{ thawList.length }} 家</div>
  116. <div class="dingdanSearch flex a-center j-center">
  117. <div class="search_box flex a-center">
  118. <input type="text" placeholder="请输入门店名称" v-model="agentKeyword2">
  119. <van-icon name="search" size="0.32rem" />
  120. </div>
  121. </div>
  122. <div class="mendianliebiao" v-show="thawList.length > 0" id="mescroll">
  123. <div class="item flex a-center" v-for="(item,index) in thawList"
  124. v-on:click="lookStoreInfo2(item)">
  125. <div class="img"><img :src="item.storeImageUrl"
  126. onerror="javascript:this.src='../../../../../image/image/noimg.png';"></div>
  127. <div class="infos">
  128. <h2>{{item.storeName}}</h2>
  129. <p><a style="font-weight: 600;">经销品牌:</a>{{item.brand}}</p>
  130. <p><a style="font-weight: 600;">电话:</a>{{item.storePhone}}</p>
  131. <span v-if="item.status==0">状态:待审核</span>
  132. <span v-if="item.status==1">状态:经销商审核通过</span>
  133. <span v-if="item.status==2">状态:经销商审核拒绝 </span>
  134. <span v-if="item.status==3">状态:B2B审核通过</span>
  135. <span v-if="item.status==4">状态:B2B审核拒绝</span>
  136. </div>
  137. <i class="iconfont icon-right"></i>
  138. </div>
  139. <div v-show="hasOther && thawList.length > 0"
  140. style="width: 100%;height: 1rem;;text-align : center;margin-top : 1rem;font-size:0.3rem">
  141. 暂无更多数据</div>
  142. </div>
  143. <div v-show="thawList.length == 0" style="text-align:center">
  144. <img src="../../../../../image/image/nodata.png"
  145. style="margin:2rem auto;width:100%;height:100%" />
  146. </div>
  147. </div>
  148. </van-tab>
  149. </van-tabs>
  150. </div>
  151. </body>
  152. <!-- <script src="js/vue.js"></script> -->
  153. <script type="text/javascript" src="../../../../../script/aui-scroll.js"></script>
  154. <link rel="stylesheet" href="../../../../../script/mescroll/mescroll.min.css">
  155. <script type="text/javascript" src="../../../../../script/mescroll/mescroll.min.js"></script>
  156. <script type="text/javascript" src="../../../../../script/js/vue.js"></script>
  157. <script type="text/javascript" src="../../../../../script/js/vant-ui.js"></script>
  158. <script type="text/javascript" src="../../../../../script/js/main.js"></script>
  159. <script type="text/javascript" src="../../../../../script/api.js"></script>
  160. <script type="text/javascript" src="../../../../../script/httpRequest.js"></script>
  161. <script type="text/javascript" src="../../../../../script/vue_plugins.js"></script>
  162. <script>
  163. apiready = function () {
  164. new Vue({
  165. el: '#app',
  166. data: {
  167. list: [],
  168. // 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}],
  169. kunnr: '',
  170. current: 1,
  171. size: 10,
  172. totalPages: 1,
  173. frist: 1,
  174. active: 0,
  175. statuses: [{
  176. code: '',
  177. name: '全部'
  178. }, {
  179. code: '0',
  180. name: '待审核'
  181. }, {
  182. code: '1',
  183. name: '审核通过'
  184. }],
  185. agentKeyword: '', // 冻结
  186. agentKeyword2: '', // 解冻
  187. agentStatus: { code: '', name: '全部' },
  188. UIActionSelector: '',
  189. mescroll: '',
  190. hasOther: false,
  191. totaltotals: 0,
  192. freezeList: [],
  193. thawList: []
  194. },
  195. watch: {
  196. agentKeyword: function () {
  197. this.selectFreezeStore();
  198. },
  199. agentKeyword2: function () {
  200. this.agentUnfreezeProposer();
  201. }
  202. },
  203. mounted: function () {
  204. this.init();
  205. },
  206. methods: {
  207. init: function () {
  208. this.UIActionSelector = api.require("UIActionSelector");
  209. this.kunnr = $api.getStorage('kunnr');
  210. this.getStoreList();
  211. this.selectFreezeStore();
  212. this.agentUnfreezeProposer();
  213. var _this = this;
  214. this.addEvent('refushAgentList', function () {
  215. _this.current = 1;
  216. _this.getStoreList();
  217. _this.selectFreezeStore();
  218. _this.agentUnfreezeProposer();
  219. })
  220. },
  221. configs: function () {
  222. var _this = this;
  223. this.frist = 2;
  224. this.configDownAndPull("mescroll", function (mescroll) {
  225. _this.list = [];
  226. _this.current = 1;
  227. _this.mescroll = mescroll;
  228. _this.getStoreList(mescroll);
  229. }, function (mescroll) {
  230. if (_this.current < _this.totalPages) {
  231. _this.current = _this.current + 1;
  232. _this.getStoreList(mescroll, 1);
  233. } else {
  234. mescroll.endSuccess(_this.size, false);
  235. }
  236. }, false);
  237. this.configBottomRefush(function () {
  238. if (_this.current < _this.totalPages) {
  239. _this.current = _this.current + 1;
  240. _this.getStoreList(_this.mescroll, 1);
  241. } else {
  242. _this.hasOther = true;
  243. // _this.mescroll.endSuccess(_this.size, false);
  244. }
  245. })
  246. },
  247. selectFreezeStore: function () {
  248. var params = {
  249. kunnr: this.kunnr,
  250. // kunnr: "0001001097",
  251. vkorg: "8100",
  252. vtweg: "10",
  253. spart: "40",
  254. storeName: this.agentKeyword,
  255. url: 'json',
  256. type: 'body'
  257. },
  258. _this = this;
  259. this.$post('selectFreezeStore', params, function (ret) {
  260. if (ret.code == 0 || ret.code == '0') {
  261. _this.freezeList = ret.data
  262. }
  263. });
  264. },
  265. agentUnfreezeProposer: function () {
  266. var params = {
  267. kunnr: this.kunnr,
  268. // kunnr: "0001002432",
  269. storeName: this.agentKeyword2,
  270. url: 'json',
  271. type: 'body'
  272. },
  273. _this = this;
  274. this.$post('agentUnfreezeProposer', params, function (ret) {
  275. if (ret.code == 0 || ret.code == '0') {
  276. _this.thawList = ret.data
  277. }
  278. });
  279. },
  280. getStoreList: function (mescroll) {
  281. var params = {
  282. kunnr: this.kunnr,
  283. "status": this.agentStatus.code,
  284. "storeName": this.agentKeyword,
  285. "current": this.current,
  286. "size": this.size,
  287. url: 'json',
  288. type: 'body'
  289. },
  290. _this = this;
  291. this.$post('getRetailerUrl', params, function (ret) {
  292. if (ret.code == 0 || ret.code == '0') {
  293. _this.list = _this.current == 1 ? ret.list.records : _this.list.concat(ret.list.records);
  294. _this.totalPages = ret.list.pages;
  295. _this.totaltotals = ret.list.total;
  296. // _this.list = _this.current == 1 ? _this.demoList : _this.list.concat(_this.demoList);
  297. if (_this.frist == 1) {
  298. _this.$nextTick(function () {
  299. _this.configs();
  300. })
  301. }
  302. if (mescroll) {
  303. mescroll.endSuccess(_this.size, true);
  304. }
  305. }
  306. });
  307. },
  308. // 点击查看门店详情进行审核
  309. lookStoreInfo: function (id) {
  310. var params = {
  311. storeId: id
  312. }
  313. this.goWin('agentInfo', '../agentInfo/agentInfo_win.html', params);
  314. },
  315. // 点击查看门店详情进行审核
  316. lookStoreInfo2: function (item) {
  317. var params = {
  318. storeData:item
  319. }
  320. this.goWin('agentInfo', '../agentInfo/thawInfo_win.html', params);
  321. },
  322. // 筛选状态
  323. chooseStatus: function () {
  324. var _this = this;
  325. this.chooseRegion(this.UIActionSelector, 1, this.statuses, function (ret) {
  326. if (ret.eventType == 'ok') {
  327. _this.agentStatus = ret.selectedInfo[0];
  328. _this.current = 1;
  329. if (_this.mescroll != '') {
  330. _this.mescroll.resetUpScroll();
  331. _this.mescroll.endSuccess(_this.size, true);
  332. }
  333. _this.getStoreList();
  334. }
  335. })
  336. },
  337. inSearch: function () {
  338. this.goWin('agentSearch', '../agentSearch/agentSearch_win.html');
  339. },
  340. inSearch2: function () {
  341. this.goWin('agentSearch', '../agentSearch/freezeSearch_win.html');
  342. }
  343. }
  344. })
  345. }
  346. </script>
  347. </html>