agentList_body.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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. var active = api.pageParam.active;
  165. if (active!=2) {
  166. active==0
  167. }
  168. new Vue({
  169. el: '#app',
  170. data: {
  171. list: [],
  172. // 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}],
  173. kunnr: '',
  174. current: 1,
  175. size: 10,
  176. totalPages: 1,
  177. frist: 1,
  178. active: active,
  179. statuses: [{
  180. code: '',
  181. name: '全部'
  182. }, {
  183. code: '0',
  184. name: '待审核'
  185. }, {
  186. code: '1',
  187. name: '审核通过'
  188. }],
  189. agentKeyword: '', // 冻结
  190. agentKeyword2: '', // 解冻
  191. agentStatus: { code: '', name: '全部' },
  192. UIActionSelector: '',
  193. mescroll: '',
  194. hasOther: false,
  195. totaltotals: 0,
  196. freezeList: [],
  197. thawList: []
  198. },
  199. watch: {
  200. agentKeyword: function () {
  201. this.selectFreezeStore();
  202. },
  203. agentKeyword2: function () {
  204. this.agentUnfreezeProposer();
  205. }
  206. },
  207. mounted: function () {
  208. this.init();
  209. },
  210. methods: {
  211. init: function () {
  212. this.UIActionSelector = api.require("UIActionSelector");
  213. this.kunnr = $api.getStorage('kunnr');
  214. this.getStoreList();
  215. this.selectFreezeStore();
  216. this.agentUnfreezeProposer();
  217. var _this = this;
  218. this.addEvent('refushAgentList', function () {
  219. _this.current = 1;
  220. _this.getStoreList();
  221. _this.selectFreezeStore();
  222. _this.agentUnfreezeProposer();
  223. })
  224. },
  225. configs: function () {
  226. var _this = this;
  227. this.frist = 2;
  228. this.configDownAndPull("mescroll", function (mescroll) {
  229. _this.list = [];
  230. _this.current = 1;
  231. _this.mescroll = mescroll;
  232. _this.getStoreList(mescroll);
  233. }, function (mescroll) {
  234. if (_this.current < _this.totalPages) {
  235. _this.current = _this.current + 1;
  236. _this.getStoreList(mescroll, 1);
  237. } else {
  238. mescroll.endSuccess(_this.size, false);
  239. }
  240. }, false);
  241. this.configBottomRefush(function () {
  242. if (_this.current < _this.totalPages) {
  243. _this.current = _this.current + 1;
  244. _this.getStoreList(_this.mescroll, 1);
  245. } else {
  246. _this.hasOther = true;
  247. // _this.mescroll.endSuccess(_this.size, false);
  248. }
  249. })
  250. },
  251. selectFreezeStore: function () {
  252. var params = {
  253. kunnr: this.kunnr,
  254. // kunnr: "0001001097",
  255. vkorg: "8100",
  256. vtweg: "10",
  257. spart: "40",
  258. storeName: this.agentKeyword,
  259. url: 'json',
  260. type: 'body'
  261. },
  262. _this = this;
  263. this.$post('selectFreezeStore', params, function (ret) {
  264. if (ret.code == 0 || ret.code == '0') {
  265. _this.freezeList = ret.data
  266. }
  267. });
  268. },
  269. agentUnfreezeProposer: function () {
  270. var params = {
  271. kunnr: this.kunnr,
  272. // kunnr: "0001002432",
  273. storeName: this.agentKeyword2,
  274. url: 'json',
  275. type: 'body'
  276. },
  277. _this = this;
  278. this.$post('agentUnfreezeProposer', params, function (ret) {
  279. if (ret.code == 0 || ret.code == '0') {
  280. _this.thawList = ret.data
  281. }
  282. });
  283. },
  284. getStoreList: function (mescroll) {
  285. var params = {
  286. kunnr: this.kunnr,
  287. "status": this.agentStatus.code,
  288. "storeName": this.agentKeyword,
  289. "current": this.current,
  290. "size": this.size,
  291. url: 'json',
  292. type: 'body'
  293. },
  294. _this = this;
  295. this.$post('getRetailerUrl', params, function (ret) {
  296. if (ret.code == 0 || ret.code == '0') {
  297. _this.list = _this.current == 1 ? ret.list.records : _this.list.concat(ret.list.records);
  298. _this.totalPages = ret.list.pages;
  299. _this.totaltotals = ret.list.total;
  300. // _this.list = _this.current == 1 ? _this.demoList : _this.list.concat(_this.demoList);
  301. if (_this.frist == 1) {
  302. _this.$nextTick(function () {
  303. _this.configs();
  304. })
  305. }
  306. if (mescroll) {
  307. mescroll.endSuccess(_this.size, true);
  308. }
  309. }
  310. });
  311. },
  312. // 点击查看门店详情进行审核
  313. lookStoreInfo: function (id) {
  314. var params = {
  315. storeId: id
  316. }
  317. this.goWin('agentInfo', '../agentInfo/agentInfo_win.html', params);
  318. },
  319. // 点击查看门店详情进行审核
  320. lookStoreInfo2: function (item) {
  321. var params = {
  322. storeData:item
  323. }
  324. this.goWin('agentInfo', '../agentInfo/thawInfo_win.html', params);
  325. },
  326. // 筛选状态
  327. chooseStatus: function () {
  328. var _this = this;
  329. this.chooseRegion(this.UIActionSelector, 1, this.statuses, function (ret) {
  330. if (ret.eventType == 'ok') {
  331. _this.agentStatus = ret.selectedInfo[0];
  332. _this.current = 1;
  333. if (_this.mescroll != '') {
  334. _this.mescroll.resetUpScroll();
  335. _this.mescroll.endSuccess(_this.size, true);
  336. }
  337. _this.getStoreList();
  338. }
  339. })
  340. },
  341. inSearch: function () {
  342. this.goWin('agentSearch', '../agentSearch/agentSearch_win.html');
  343. },
  344. inSearch2: function () {
  345. this.goWin('agentSearch', '../agentSearch/freezeSearch_win.html');
  346. }
  347. }
  348. })
  349. }
  350. </script>
  351. </html>