intoStore_body.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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. .jinhuoRank li {
  29. height: 2rem
  30. }
  31. </style>
  32. <body>
  33. <div id="app" v-cloak>
  34. <div class="pageView filterpage" style="overflow:scroll;overflow-y:hidden">
  35. <div class="leiji flex a-center j-center" style="background-color:#00a0ea;color:#fff;font-size:0.4rem;padding:0.2rem 0">
  36. 期间进货总量:
  37. <h4> {{ totalInfo }} </h4>
  38. </div>
  39. <van-popup position="bottom" v-model="timeShow">
  40. <mycalendar @comfirm="comfirm" @close="timeShow = false"></mycalendar>
  41. </van-popup>
  42. <div class="zhuceTimer flex a-center jlr">
  43. <div class="flex a-center" v-on:click="getTimes">
  44. <h4>进货时间:</h4>
  45. <p v-on:click="getTimes(0)">{{ startTime }}</p> ~ <p v-on:click="getTimes(1)">{{ endTime }}</p>
  46. </div>
  47. </div>
  48. <div class="view flex col" style="height:95%" >
  49. <div class="page router fx1" id="mescroll">
  50. <ul class="jinhuoRank" >
  51. <li class="flex a-center" v-for="item in totalList">
  52. <!-- <div class="image"><img :src="item.storeImageUrl">
  53. </div> -->
  54. <div class="info">
  55. <p>
  56. {{ item.storeName }}
  57. </p>
  58. <div style="display:flex">
  59. <p style="flex : 1">
  60. 电话:{{ item.storePhone }}
  61. </p>
  62. <p style="flex : 1">
  63. 经销品牌:{{ item.brandName }}
  64. </p>
  65. </div>
  66. <div style="display:flex">
  67. <p style="flex : 1">
  68. 签约任务:{{ item.numTask }}条
  69. </p>
  70. <p style="flex : 1">
  71. 线上订货数量:{{ item.ocount }}条
  72. </p>
  73. </div>
  74. <div style="display:flex">
  75. <p style="flex : 1">
  76. 本月待完成:{{ item.leftNum }}条
  77. </p>
  78. <p style="flex : 1">
  79. 本月已完成:{{ item.scanNum }}条
  80. </p>
  81. </div>
  82. <div style="display:flex">
  83. <p style="flex : 1">
  84. 期间进货:{{ item.scanNumes }}条
  85. </p>
  86. </div>
  87. </div>
  88. </li>
  89. </ul>
  90. </div>
  91. </div>
  92. <div v-show="totalList.length == 0" style="text-align:center;overflow:auto">
  93. <img src="./image/nodata.png" style="margin:2rem auto;width:100%;height:100%" />
  94. </div>
  95. </div>
  96. </div>
  97. </body>
  98. </html>
  99. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  100. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  101. <script type="text/javascript" src="../script/api.js"></script>
  102. <script type="text/javascript" src="../script/httpRequest.js"></script>
  103. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  104. <script type="text/javascript">
  105. apiready = function() {
  106. var date = new Date();
  107. if((date.getMonth()+1)<10){
  108. var mon="0"+(date.getMonth()+1)
  109. }else{
  110. var mon=(date.getMonth()+1)
  111. }
  112. new Vue({
  113. el : '#app',
  114. data : {
  115. list : [],
  116. kunnr : '',
  117. frist : 1,
  118. current : 1,
  119. size : 10,
  120. totalPages : 1,
  121. totalInfo : {}, // 进货分析中的库存总量
  122. totalList : [], // 进货分析的数据列表
  123. // 添加查询
  124. timeShow: false,
  125. // keyword: '',
  126. startTime : date.getFullYear()+'-'+mon+'-01',
  127. endTime : '至今'
  128. },
  129. methods : {
  130. init : function(){
  131. var _this = this;
  132. this.kunnr = $api.getStorage('kunnr');
  133. this.getStoreList_jiage();
  134. },
  135. // 查询数据
  136. // 选择筛选条件
  137. comfirm : function(v) {
  138. this.timeShow = false
  139. },
  140. //选择时间
  141. getTimes : function(type){
  142. var _this = this;
  143. this.getTime(function(time){
  144. if(type == 0){
  145. _this.startTime = time;
  146. }else{
  147. _this.endTime = time;
  148. }
  149. _this.getStoreList_jiage();
  150. })
  151. },
  152. // 查询门店进货分析 -- 贾哥
  153. getStoreList_jiage : function(mescroll){
  154. var startTime = this.startTime == date.getFullYear()+'-'+mon+'-1' ? '' : this.startTime;
  155. var endTime = this.endTime == '至今' ? '' : this.endTime;
  156. var data = "agentCode=" + this.kunnr
  157. + "&current=" + this.current
  158. + "&size=" + this.size
  159. + "&startTime="+ startTime
  160. + "&endTime=" + endTime;
  161. var _this = this;
  162. this.$get("getInfoStoreU_jiage",data,function(ret){
  163. if (ret.code == 0 || ret.code == '0') {
  164. _this.totalInfo = ret.total;
  165. _this.totalList = _this.current == 1 ? ret.page.records : _this.totalList.concat(ret.page.records);
  166. _this.totalPages = ret.page.pages;
  167. if(mescroll){
  168. mescroll.endSuccess(_this.size,true);
  169. }
  170. if(_this.frist == 1){
  171. _this.$nextTick(function(){
  172. _this.configs();
  173. })
  174. }
  175. }
  176. })
  177. },
  178. /**
  179. * 查询门店进货分析
  180. */
  181. getStoreList : function(mescroll){
  182. var _this = this,url = "getIntoStoreU";
  183. var data = {
  184. "kunnr": this.kunnr,
  185. "pageSize": this.size,
  186. "size":this.current,
  187. "url" : "json",
  188. "type" : "body",
  189. "startTime": this.startTime,
  190. "endTime": this.endTime
  191. }
  192. this.$post(url,data,function(ret){
  193. if (ret.code == 0 || ret.code == '0') {
  194. _this.totalInfo = ret.count;
  195. _this.totalList = _this.current == 1 ? ret.Data : _this.totalList.concat(ret.Data);
  196. _this.totalPages = ret.Data.pageCount;
  197. if(mescroll){
  198. mescroll.endSuccess(_this.size,true);
  199. }
  200. if(_this.frist == 1){
  201. _this.$nextTick(function(){
  202. _this.configs();
  203. })
  204. }
  205. }
  206. })
  207. },
  208. configs : function(){
  209. var _this = this;
  210. this.frist = 2;
  211. this.configDownAndPull("mescroll", function(mescroll) {
  212. _this.current = 1;
  213. _this.getStoreList_jiage(mescroll);
  214. }, function(mescroll) {
  215. if (_this.current < _this.totalPages) {
  216. _this.current = _this.current + 1;
  217. _this.getStoreList_jiage(mescroll, 1);
  218. } else {
  219. mescroll.endSuccess(_this.size, false);
  220. }
  221. })
  222. },
  223. },
  224. mounted : function() {
  225. this.init();
  226. }
  227. })
  228. }
  229. </script>