main.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
  6. <title>应用</title>
  7. <link rel="stylesheet" href="../css/api.css"/>
  8. <link rel="stylesheet" href="../css/aui.css"/>
  9. <link rel="stylesheet" href="../fonts/iconfont.css"/>
  10. <link rel="stylesheet" href="../css/weui.min.css"/>
  11. <link rel="stylesheet" href="../css/app.css"/>
  12. <link rel="stylesheet" href="../css/html.css"/>
  13. <!--<script type="text/javascript" src="../script/rem.js"></script>-->
  14. <style>
  15. .app-echart li .app-wrap {
  16. min-height: 154px;
  17. }
  18. .app-echart-per {
  19. padding: 5px 10px;
  20. }
  21. .app-echart-per {
  22. background-color: #009944;
  23. }
  24. .app-echart-per:first-of-type {
  25. font-size: 0.6rem;
  26. color: #fff;
  27. border-right: 1px solid #fff;
  28. border-bottom: 1px solid #fff;
  29. }
  30. .app-echart-per p:last-of-type {
  31. font-size: 0.9rem;
  32. color: #ffd900;
  33. padding-left: 15px
  34. }
  35. .app-list li .app-wrap .iconfont {
  36. font-size: 1.5rem
  37. }
  38. .app-warp-badge {
  39. position: absolute;
  40. float: right;
  41. background-color: #FF0000;
  42. padding: 0 5px;
  43. border-radius: 50%;
  44. font-size: 0.5rem;
  45. color: #fff;
  46. margin-left: 19%;
  47. margin-top: -5px;
  48. }
  49. .zmq-icon-inline-user {
  50. height: 1.5rem !important;
  51. width: 1.5rem !important;
  52. }
  53. .zmq-shenhe-img {
  54. width: 1.8rem;
  55. height: 1.8rem;
  56. }
  57. .zmq-shenhe-msg {
  58. line-height: 2rem;
  59. padding-left: 0.5rem;
  60. color: #e23b3b;
  61. /*text-shadow: 1px 1px 1px #f0f0f0;*/
  62. font-weight: bold;
  63. font-size: 0.8rem
  64. }
  65. .app-list li .app-wrap span {
  66. font-weight : bold;
  67. }
  68. .zmq-margin-level-5 {
  69. margin-left: 0px ;
  70. }
  71. </style>
  72. </head>
  73. <body>
  74. <article style="padding-bottom: 54px;" id="app">
  75. <div class="list-wrap zmq-width-90 zmq-bg-white zmq-margin-top-10 zmq-padding-btn zmq-radius-5 zmq-box-normal">
  76. <ul class="app-list">
  77. <li>
  78. <div class="app-wrap">
  79. <a href="javascript:void(0);" onclick="goWin('orderList_win')"> <img src="../image/drawable-xhdpi/list0.png" class="zmq-icon-inline-user zmq-margin-level-5 zmq-margin-vertical-5" /> <span>订单管理</span> </a>
  80. </div>
  81. </li>
  82. <li>
  83. <div class="app-wrap">
  84. <a href="javascript:;" onclick="goWin('../kucunB/kucunC_win')"> <img src="../image/drawable-xhdpi/list1.png" class="zmq-icon-inline-user zmq-margin-level-5 zmq-margin-vertical-5" /> <span>库存管理</span> </a>
  85. </div>
  86. </li>
  87. <li>
  88. <div class="app-wrap">
  89. <a href="javascript:;" onclick="goWin('../order/wuliuList_win')"> <img src="../image/drawable-xhdpi/list3.png" class="zmq-icon-inline-user zmq-margin-level-5 zmq-margin-vertical-5" /> <span>物流查询</span> </a>
  90. </div>
  91. </li>
  92. <!--<li>
  93. <div class="app-wrap">
  94. <a href="javascript:;"> <img src="../image/drawable-xhdpi/list3.png" class="zmq-icon-inline-user zmq-margin-level-5 zmq-margin-vertical-5" /> <span>收货记录</span> </a>
  95. </div>
  96. </li>
  97. <li>
  98. <div class="app-wrap">
  99. <a href="javascript:;"> <img src="../image/drawable-xhdpi/list4.png" class="zmq-icon-inline-user zmq-margin-level-5 zmq-margin-vertical-5" /> <span>退货管理</span> </a>
  100. </div>
  101. </li>
  102. <li>
  103. <div class="app-wrap">
  104. <a href="javascript:;" onclick="goWin('../kucunB/kucunB_win')"> <img src="../image/drawable-xhdpi/list5.png" class="zmq-icon-inline-user zmq-margin-level-5 zmq-margin-vertical-5" /> <span>销售报表</span> </a>
  105. </div>
  106. </li>
  107. <li>
  108. <div class="app-wrap">
  109. <a href="javascript:;"> <img src="../image/drawable-xhdpi/list6.png" class="zmq-icon-inline-user zmq-margin-level-5 zmq-margin-vertical-5" /> <span>质检结果</span> </a>
  110. </div>
  111. </li>-->
  112. </ul>
  113. </div>
  114. <!-- 销售增长率 -->
  115. <!-- <div class="list-wrap zmq-width-90 zmq-bg-white zmq-margin-top-10 zmq-padding-btn zmq-radius-5 zmq-box-normal">
  116. <ul class="app-echart">
  117. <li>
  118. <div class="zmq-flex zmq-border-bottom-1">
  119. <div class="zmq-bg-chart zmq-margin-bottom-5 zmq-radius-5">
  120. <img src="../image/drawable-xhdpi/chart1.png" />
  121. </div>
  122. <div class="zmq-chart-msg zmq-margin-level-10">
  123. <div class="zmq-chart-msg-title">销售增长率</div>
  124. <div class="zmq-chart-msg-info">18 <em>个订单</em></div>
  125. </div>
  126. </div>
  127. <div class="app-wrap" id="zhu"></div>
  128. </li>
  129. </ul>
  130. </div>-->
  131. <!-- 有待审核门店 -->
  132. <div class="list-wrap zmq-width-90 zmq-bg-white zmq-margin-top-10 zmq-padding-btn zmq-radius-5 zmq-box-normal" v-show="has > 0" v-on:click="loosKehu" v-cloak>
  133. <div class="zmq-flex">
  134. <div class="zmq-shenhe-img">
  135. <img src="../image/shen.png"/>
  136. </div>
  137. <div class="zmq-shenhe-msg" v-cloak>
  138. 有 {{has}} 个门店等待您审核 >>
  139. </div>
  140. </div>
  141. </div>
  142. <div class="list-wrap zmq-width-90 zmq-bg-white zmq-margin-top-10 zmq-padding-btn zmq-radius-5 zmq-box-normal" v-show="has == 0" v-on:click="loosKehu" v-cloak>
  143. <div class="zmq-flex">
  144. <div class="zmq-shenhe-img">
  145. <img src="../image/down.png"/>
  146. </div>
  147. <div class="zmq-shenhe-msg zmq-text-done">
  148. 暂无门店审核信息
  149. </div>
  150. </div>
  151. </div>
  152. <!-- 销售占比 -->
  153. <div class="list-wrap zmq-width-90 zmq-bg-white zmq-margin-top-10 zmq-padding-btn zmq-radius-5 zmq-box-normal">
  154. <ul class="app-echart">
  155. <li>
  156. <div class="zmq-flex zmq-border-bottom-1">
  157. <div class="zmq-bg-chart zmq-margin-bottom-5 zmq-radius-5">
  158. <img src="../image/drawable-xhdpi/chart2.png" />
  159. </div>
  160. <div class="zmq-chart-msg zmq-margin-level-10">
  161. <div class="zmq-chart-msg-title">
  162. 库存统计
  163. </div>
  164. <div class="zmq-chart-msg-info" v-cloak>
  165. {{list.length}} <em>个品牌</em>
  166. </div>
  167. </div>
  168. </div>
  169. <!-- <div class="app-wrap zmq-flex zmq-padding-doneBtn" v-for="(d,i) in list">
  170. <div class="zmq-margin-level-10">
  171. {{d.brand}}:
  172. </div>
  173. <div class="zmq-text-success">
  174. {{d.tatal_stock}}
  175. </div>
  176. </div>-->
  177. <div class="app-wrap" id="bing" style="margin-left: -4rem"></div>
  178. </li>
  179. </ul>
  180. </div>
  181. </article>
  182. </body>
  183. <script type="text/javascript" src="../script/api.js"></script>
  184. <script type="text/javascript" src="../script/vue.js"></script>
  185. <script type="text/javascript" src="../script/echarts.js"></script>
  186. <script type="text/javascript" src="../script/zhu.js"></script>
  187. <script type="text/javascript" src="../script/bing.js"></script>
  188. <script type="text/javascript" src="../script/httpRequest.js"></script>
  189. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  190. <script type="text/javascript">
  191. apiready = function() {
  192. new Vue({
  193. el : '#app',
  194. data : {
  195. // 购物车数量
  196. carNum : '',
  197. agentId : '',
  198. list : [],
  199. ffurl : 'getStockByBrand',
  200. getCustomUrl : 'getRetailerUrl',
  201. // 是否有未审核的门店
  202. has : 0,
  203. },
  204. methods : {
  205. init : function() {
  206. var _this = this;
  207. this.agentId = $api.getStorage('agentid');
  208. // setZhu();
  209. setBing();
  210. this.getUserInfo(function(ret) {
  211. // alertJson(ret);
  212. });
  213. this.getLTLIst();
  214. this.getCustom();
  215. this.configHeaderRefush(function() {
  216. _this.getLTLIst();
  217. _this.getCustom();
  218. })
  219. this.addEvent("checkRetailer", function() {
  220. _this.getCustom();
  221. })
  222. },
  223. // 获取轮胎列表
  224. getLTLIst : function() {
  225. var data = {
  226. agentId : this.agentId,
  227. }, _this = this;
  228. this.$post(this.ffurl, data, function(ret) {
  229. if (ret.code == 0) {
  230. var newList = new Array();
  231. _this.list = ret.list;
  232. ret.list.map(function(d, i) {
  233. var option = {
  234. name : d.brand,
  235. value : d.tatal_stock
  236. }
  237. newList.push(option)
  238. })
  239. setBing(newList);
  240. }
  241. })
  242. },
  243. // 获取门店列表
  244. getCustom : function() {
  245. var data = {
  246. agent_id : this.agentId,
  247. url : 'json',
  248. type : 'body',
  249. }, _this = this;
  250. this.$post(this.getCustomUrl, data, function(ret) {
  251. if (ret.code == 0) {
  252. var has = 0;
  253. ret.list.map(function(d, i) {
  254. if (d.status == 0) {
  255. has++;
  256. }
  257. });
  258. _this.has = has;
  259. }
  260. })
  261. },
  262. // 查看客户列表
  263. loosKehu : function() {
  264. api.openWin({
  265. name : 'kehu_win',
  266. url : './kehu/kehu_win.html',
  267. pageParam : ""
  268. });
  269. }
  270. },
  271. mounted : function() {
  272. this.init();
  273. }
  274. })
  275. }
  276. function goWin(winName, page) {
  277. api.openWin({
  278. name : winName,
  279. url : './order/' + winName + '.html',
  280. pageParam : page
  281. });
  282. }
  283. </script>
  284. <!--<script type="text/javascript">
  285. function goWin(winName) {
  286. api.openWin({
  287. name : winName,
  288. url : './order/' + winName + '.html',
  289. });
  290. }
  291. </script>-->
  292. </html>