agentList_body.html 13 KB

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