index.html 11 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/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. <script src="js/vue.js"></script>
  15. <script src="js/vant-ui.js"></script>
  16. <script src="js/main.js"></script>
  17. <title></title>
  18. </head>
  19. <style>
  20. .menu .item p {
  21. font-size: 0.26rem;
  22. }
  23. .line1 {
  24. width:300px;
  25. overflow: hidden;
  26. text-overflow:ellipsis;
  27. }
  28. </style>
  29. <body>
  30. <div id="app">
  31. <div class="header flex a-center j-center line1" id="aui-header" style="height: 1.5rem;font-size: 0.4rem;width : 100%;text-align:center">
  32. <p class="line1">{{ agentName }}</p>
  33. </div>
  34. <div class="view flex col">
  35. <div class="page router fx1" style="padding-top: 0.86rem;" :style="{'padding-bottom':footerHeight+'px'}" id="mescroll">
  36. <!-- <div class="header flex a-center j-center" id="aui-header">
  37. 赛轮轮胎经销商
  38. <div class="toobla">
  39. <div class="icon4"></div>
  40. </div>
  41. </div>-->
  42. <div style="background-color:#00a0ea;height:.5rem;width:100%">
  43. </div>
  44. <div class="banner">
  45. <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
  46. <van-swipe-item v-if="!storeBrand.length"><img src="image/banner1.png">
  47. </van-swipe-item>
  48. <van-swipe-item v-else v-for="(item,index) in storeBrand" :key="index"><img :src="item.imgPath"></van-swipe-item>
  49. </van-swipe>
  50. </div>
  51. <div class="homeTipbox flex a-center">
  52. <div class="laba"></div>
  53. <div class="labaInfos">
  54. <van-swipe style="height: .35rem;" :autoplay="3000" :show-indicators="false" vertical >
  55. <van-swipe-item v-for="(item,index) in messageList" :key="index">{{item.msgContent}}</van-swipe-item>
  56. </van-swipe>
  57. </div>
  58. </div>
  59. <div class="menu flex wrap">
  60. <div class="item flex col a-center j-center" v-on:click="openWin('orderList')">
  61. <b class="icon c2"></b>
  62. <p>
  63. 门店订单
  64. </p>
  65. </div>
  66. <div class="item flex col a-center j-center" v-on:click="openWin('fac_storage')">
  67. <b class="icon c3"></b>
  68. <p>
  69. 工厂库存
  70. </p>
  71. </div>
  72. <!-- <div class="item flex col a-center j-center" v-on:click="openWin('propaganda')">
  73. <b class="icon c4"></b>
  74. <p>
  75. 厂家宣传
  76. </p>
  77. </div> -->
  78. <!-- <div class="item flex col a-center j-center" v-on:click="openWin('agentList')">
  79. <b class="icon c5"></b>
  80. <p>
  81. 签约审核
  82. </p>
  83. </div> -->
  84. <div class="item flex col a-center j-center" v-on:click="openWin('intoStore')">
  85. <b class="icon c6"></b>
  86. <p>
  87. 门店进货分析
  88. </p>
  89. </div>
  90. <div class="item flex col a-center j-center" v-on:click="openWin('b2b_order_list')">
  91. <b class="icon c7"></b>
  92. <p>
  93. 订单跟踪
  94. </p>
  95. </div>
  96. <!-- <div class="item flex col a-center j-center" v-on:click="scanCode">
  97. <b class="icon c8"></b>
  98. <p>
  99. 核销审核
  100. </p>
  101. </div> -->
  102. </div>
  103. <div class="workField flex a-center">
  104. <div class="sup"></div>
  105. <h4>快速工作栏</h4>
  106. </div>
  107. <div class="workFieldContainer flex jlr wrap">
  108. <div class="item"><img src="image/mendian1.png" v-on:click="openWin('agentList')">
  109. </div>
  110. <div class="item"><img src="image/hexiao1.png" v-on:click="openWin('backList')">
  111. </div>
  112. <div class="item"><img src="image/111.png" v-on:click="openWin('propaganda')">
  113. </div>
  114. <div class="item"><img src="image/myku.png" v-on:click="openWin('agent_storage')">
  115. </div>
  116. <img src="image/banner_bottom.png" style="height : 3rem">
  117. </div>
  118. <div class="workField flex a-center">
  119. <div class="case"><img src="img/images/work.png">
  120. </div>
  121. <h4>本月进货 TOP 10</h4>
  122. </div>
  123. <ul class="jinhuoRank">
  124. <li class="flex a-center" v-for="(item,index) in storeList" style="height:2.5rem">
  125. <!-- <div class="image"><img :src="item.storeImageUrl">
  126. </div> -->
  127. <div class="info">
  128. <p>
  129. {{ item.storeName }}
  130. </p>
  131. <p>
  132. 电话:{{ item.storePhone }}
  133. </p>
  134. <p>
  135. 经销品牌:{{ item.brandName }}
  136. </p>
  137. <div style="display:flex">
  138. <p style="flex : 1">
  139. 签约任务:{{ item.numTask }}条
  140. </p>
  141. <p style="flex : 1">
  142. 线上订货数量:{{ item.ocount }}条
  143. </p>
  144. </div>
  145. <div style="display:flex">
  146. <p style="flex : 1">
  147. 本月待完成:{{ item.leftNum }}条
  148. </p>
  149. <p style="flex : 1">
  150. 本月已完成:{{ item.scanNum }}条
  151. </p>
  152. </div>
  153. </div>
  154. <div class="fgx"></div>
  155. <div class="rankwrap flex col a-center j-center">
  156. <h2>{{ (index + 1)}}</h2>
  157. TOP
  158. </div>
  159. </li>
  160. </ul>
  161. </div>
  162. </div>
  163. </div>
  164. </body>
  165. </html>
  166. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  167. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  168. <script type="text/javascript" src="../script/api.js"></script>
  169. <script type="text/javascript" src="../script/httpRequest.js"></script>
  170. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  171. <script type="text/javascript">
  172. apiready = function() {
  173. var header = $api.byId('aui-header');
  174. $api.fixStatusBar(header);
  175. var headerPos = $api.offset(header);
  176. if (api.systemType == 'android') {
  177. $api.css($api.byId('app'), 'padding-top:20px');
  178. $api.css($api.byId('content'),'margin-top:' + (headerPos.h-20) + 'px');
  179. }
  180. new Vue({
  181. el : '#app',
  182. data : {
  183. footerHeight : 0,
  184. list : [],
  185. agentName : '',
  186. icon : [{
  187. label : '首页',
  188. path : '/',
  189. active : "./img/images/tabar_home_active.png",
  190. inactive : "./img/images/tabar_home_inactive.png"
  191. }, {
  192. label : '发现',
  193. path : '/discover',
  194. active : './img/images/faxian.png',
  195. inactive : './img/images/faxian.png'
  196. }, {
  197. label : '消息',
  198. path : '/information',
  199. active : './img/images/xiaoxi.png',
  200. inactive : './img/images/xiaoxi.png'
  201. }, {
  202. label : '我的',
  203. path : '/meber',
  204. active : './img/images/wode.png',
  205. inactive : './img/images/wode.png'
  206. }],
  207. scanCodeData : '',
  208. storeList : [],
  209. kunnr : '',
  210. messageList : [],
  211. storeBrand:[]
  212. },
  213. methods : {
  214. init : function(){
  215. var _this = this;
  216. this.kunnr = $api.getStorage('kunnr');
  217. this.addEvent("refushUser",function(){
  218. _this.kunnr = $api.getStorage('kunnr');
  219. _this.getMeberInfo();
  220. _this.getStoreList_jiage();
  221. })
  222. this.getMeberInfo();
  223. this.getStoreList_jiage();
  224. this.getAgentBanner();
  225. this.scanCodeData = api.require('codeScan');
  226. this.configDownAndPull("mescroll",function(mescroll){
  227. _this.getStoreList_jiage(mescroll);
  228. },function(){
  229. },false);
  230. this.getMessageList();
  231. this.initApush('p' + this.kunnr);
  232. },
  233. // 扫描二维码审核
  234. scanCode : function(){
  235. var _this = this,url = "checkConponU";
  236. // 判断有没有权限
  237. this.ifHasPrme('camera',function(ret){
  238. if(ret == true){
  239. _this.scanCodeData.scan(function(ret1, err) {
  240. _this.showModal("核销码审核", "审核"+ret1.code+"是否通过?", ["不通过","通过"], function(ret){
  241. // 2 通过 1 不通过
  242. if(ret != 0){
  243. var data = {
  244. couponCode : ret1.code,
  245. kunnr : _this.kunnr,
  246. status : ret,
  247. url : 'json',
  248. type : 'body'
  249. }
  250. _this.$post(url,data,function(res){
  251. if(res.code == 0){
  252. api.toast({
  253. msg: '已审核' + ['','不通过','通过'][ret],
  254. });
  255. }
  256. })
  257. }
  258. })
  259. });
  260. }
  261. })
  262. },
  263. // 获取经销商信息
  264. getMeberInfo : function(){
  265. var url = "getMeberInfoU", _this = this,data = {token : $api.getStorage('token'),url : 'json',type : 'body'};
  266. this.$post(url,data,function(ret){
  267. if(ret.code == 0){
  268. if(ret.data == null){ // 个人不存在
  269. $api.clearStorage();
  270. _this.goWin("login", "login.html", "");
  271. }
  272. _this.agentName = ret.data.data == null ? '' : ret.data.data.name;
  273. }
  274. })
  275. },
  276. // 打开新页面
  277. openWin : function(src){
  278. this.goWin(src,src+'_win.html','');
  279. },
  280. // 获取门店进货分析
  281. getStoreIntoList : function(mescroll){
  282. var _this = this,url = "getIntoStoreU";
  283. var data = {
  284. "kunnr": this.kunnr,
  285. "pageSize": 10,
  286. "size":1,
  287. "url" : "json",
  288. "type" : "body",
  289. }
  290. this.$post(url,data,function(ret){
  291. if(ret.code == 0 || ret.code == '0'){
  292. _this.storeList = ret.Data;
  293. if(mescroll){
  294. mescroll.endSuccess();
  295. }
  296. }
  297. })
  298. },
  299. //轮播图
  300. getAgentBanner : function(){
  301. var _this = this,url = "getAgentBanner";
  302. var data = {
  303. "KUNNR":this.kunnr,
  304. "url" : "json",
  305. "type" : "body",
  306. }
  307. this.$post(url,data,function(ret){
  308. if(ret.code == 0 || ret.code == '0'){
  309. _this.storeBrand= ret.agentBanner;
  310. }
  311. })
  312. },
  313. // 查询门店进货分析 -- 贾哥
  314. getStoreList_jiage : function(mescroll){
  315. var data = "agentCode=" + this.kunnr + "&current=1&size=10",_this = this;
  316. setTimeout(function(){
  317. if(mescroll){
  318. mescroll.endSuccess();
  319. }
  320. },1000);
  321. this.$get("getInfoStoreU_jiage",data,function(ret){
  322. if (ret.code == 0 || ret.code == '0') {
  323. _this.storeList = ret.page.records;
  324. if(mescroll){
  325. mescroll.endSuccess(_this.size,true);
  326. }
  327. }
  328. })
  329. },
  330. // 获取跑马灯链接
  331. getMessageList: function() {
  332. var data = {
  333. "url": "json",
  334. "type": "body",
  335. "contentType": 2,
  336. },
  337. _this = this;
  338. this.$post('getMessageList', data, function(ret) {
  339. _this.messageList = ret.list;
  340. })
  341. },
  342. },
  343. mounted : function() {
  344. this.init();
  345. var _this = this;
  346. this.ifHasPrme('storage', function(ret) {
  347. if (ret == true) {
  348. _this.getNewVersionUrl(function() {
  349. });
  350. }
  351. })
  352. // this.footerHeight = this.$refs['footer'].$el.offsetHeight
  353. }
  354. })
  355. }
  356. </script>