intoStore_body.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. <script src="../../../../../script/js/vue.js"></script>
  15. <script src="../../../../../script/js/vue-i18n.js"></script>
  16. <script src="../../../../../script/js/vant-ui.js"></script>
  17. <script src="../../../../../script/js/main.js"></script>
  18. <script type="text/javascript" src="../../../js/zh.js"></script>
  19. <script type="text/javascript" src="../../../js/en.js"></script>
  20. <title></title>
  21. </head>
  22. <style>
  23. .menu .item p {
  24. font-size: 0.26rem;
  25. }
  26. .line1 {
  27. width:300px;
  28. overflow: hidden;
  29. text-overflow:ellipsis;
  30. }
  31. .jinhuoRank li {
  32. height: auto;
  33. }
  34. .jinhuoRank li .info{
  35. padding-bottom: 10px;
  36. }
  37. .seeDetails{
  38. font-size: 0.22rem;
  39. padding: 0.2rem;
  40. display: flex;
  41. justify-content: space-between;
  42. width: 6.74rem;
  43. margin: 0 auto;
  44. border-top: 1px solid #c8cdd0;
  45. }
  46. .mescroll{
  47. position: relative;
  48. height: auto; /*如设置bottom:50px,则需height:auto才能生效*/
  49. bottom: 8px;
  50. background: #ffffff;
  51. padding-bottom: 24px;
  52. }
  53. </style>
  54. <body>
  55. <div id="app" v-cloak>
  56. <div class="pageView filterpage" style="overflow:scroll;overflow-y:hidden">
  57. <div class="leiji flex a-center j-center" style="background-color:#00a0ea;color:#fff;font-size:0.4rem;padding:0.2rem 0">
  58. {{ $t('home.intoStore.totalGoods') }}:
  59. <h4> {{ totalInfo }} </h4>
  60. </div>
  61. <van-popup position="bottom" v-model="timeShow">
  62. <mycalendar @comfirm="comfirm" @close="timeShow = false"></mycalendar>
  63. </van-popup>
  64. <div class="zhuceTimer flex a-center jlr">
  65. <div class="flex a-center" v-on:click="getTimes">
  66. <h4>{{ $t('home.intoStore.PurchaseTime') }}:</h4>
  67. <p v-on:click="getTimes(0)">{{ startTime }}</p> ~ <p v-on:click="getTimes(1)">{{ endTime }}</p>
  68. </div>
  69. </div>
  70. <div class="page router fx1 mescroll" id="mescroll">
  71. <ul class="jinhuoRank" >
  72. <li v-for="item in totalList">
  73. <!-- <div class="image"><img :src="item.storeImageUrl">
  74. </div> -->
  75. <div class="info">
  76. <p>
  77. {{ item.storeName }}
  78. </p>
  79. <div style="display:flex">
  80. <p style="flex : 1">
  81. {{ $t('home.intoStore.mobile') }}:{{ item.storePhone }}
  82. </p>
  83. <p style="flex : 1">
  84. {{ $t('home.intoStore.sellBrand') }}:{{ item.brandName }}
  85. </p>
  86. </div>
  87. <div style="display:flex">
  88. <p style="flex : 1">
  89. {{ $t('home.intoStore.signContract') }}:{{ item.numTask }}{{ $t('common.one') }}
  90. </p>
  91. <p style="flex : 1">
  92. {{ $t('home.intoStore.onlineOrderQty') }}:{{ item.ocount }}{{ $t('common.one') }}
  93. </p>
  94. </div>
  95. <div style="display:flex">
  96. <p style="flex : 1">
  97. {{ $t('home.intoStore.monthlyWaitFinish') }}:{{ item.leftNum }}{{ $t('common.one') }}
  98. </p>
  99. <p style="flex : 1">
  100. {{ $t('home.intoStore.monthlyFinished') }}:{{ item.scanNum }}{{ $t('common.one') }}
  101. </p>
  102. </div>
  103. <div style="display:flex">
  104. <p style="flex : 1">
  105. {{ $t('home.intoStore.purchase') }}:{{ item.scanNumes }}{{ $t('common.one') }}
  106. </p>
  107. </div>
  108. </div>
  109. </li>
  110. </ul>
  111. </div>
  112. <div v-show="totalList.length == 0" style="text-align:center;overflow:auto">
  113. <img src="../../../../../image/image/nodata.png" style="margin:2rem auto;width:100%;height:100%" />
  114. </div>
  115. </div>
  116. </div>
  117. </body>
  118. </html>
  119. <link rel="stylesheet" href="../../../../../script/mescroll/mescroll.min.css">
  120. <script type="text/javascript" src="../../../../../script/mescroll/mescroll.min.js"></script>
  121. <script type="text/javascript" src="../../../../../script/api.js"></script>
  122. <script type="text/javascript" src="../../../../../script/httpRequest.js"></script>
  123. <script type="text/javascript" src="../../../../../script/vue_plugins.js"></script>
  124. <script type="text/javascript">
  125. apiready = function() {
  126. let langType = $api.getStorage('lang') || 'cn'
  127. const i18n = new VueI18n({
  128. locale: langType,//设置语言
  129. messages: {
  130. en: getEn(),
  131. cn: getCn()
  132. }
  133. })
  134. var date = new Date();
  135. if((date.getMonth()+1)<10){
  136. var mon="0"+(date.getMonth()+1)
  137. }else{
  138. var mon=(date.getMonth()+1)
  139. }
  140. new Vue({
  141. el : '#app',
  142. i18n,
  143. data : {
  144. list : [],
  145. kunnr : '',
  146. frist : 1,
  147. current : 1,
  148. size : 10,
  149. totalPages : 1,
  150. totalInfo : {}, // 进货分析中的库存总量
  151. totalList : [], // 进货分析的数据列表
  152. // 添加查询
  153. timeShow: false,
  154. // keyword: '',
  155. startTime : date.getFullYear()+'-'+mon+'-01',
  156. endTime : ''
  157. },
  158. methods : {
  159. init : function(){
  160. this.endTime = this.$t('home.intoStore.now')
  161. var _this = this;
  162. this.kunnr = $api.getStorage('kunnr');
  163. this.getStoreList_jiage();
  164. },
  165. // 查询数据
  166. // 选择筛选条件
  167. comfirm : function(v) {
  168. this.timeShow = false
  169. },
  170. //选择时间
  171. getTimes : function(type){
  172. var _this = this;
  173. this.getTime(function(time){
  174. if(type == 0){
  175. _this.startTime = time;
  176. }else{
  177. _this.endTime = time;
  178. }
  179. _this.getStoreList_jiage();
  180. })
  181. },
  182. // 查询门店进货分析 -- 贾哥
  183. getStoreList_jiage : function(mescroll){
  184. var startTime = this.startTime == date.getFullYear()+'-'+mon+'-1' ? '' : this.startTime;
  185. var endTime = this.endTime == this.$t('home.intoStore.now') ? '' : this.endTime;
  186. var data = "agentCode=" + this.kunnr
  187. + "&current=" + this.current
  188. + "&size=" + this.size
  189. + "&startTime="+ startTime
  190. + "&endTime=" + endTime;
  191. var _this = this;
  192. this.$get("getInfoStoreU_jiage",data,function(ret){
  193. if (ret.code == 0 || ret.code == '0') {
  194. _this.totalInfo = ret.total;
  195. _this.totalList = _this.current == 1 ? ret.page.records : _this.totalList.concat(ret.page.records);
  196. _this.totalPages = ret.page.pages;
  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. /**
  209. * 查询门店进货分析
  210. */
  211. getStoreList : function(mescroll){
  212. var _this = this,url = "getIntoStoreU";
  213. var data = {
  214. "kunnr": this.kunnr,
  215. "pageSize": this.size,
  216. "size":this.current,
  217. "url" : "json",
  218. "type" : "body",
  219. "startTime": this.startTime,
  220. "endTime": this.endTime
  221. }
  222. this.$post(url,data,function(ret){
  223. if (ret.code == 0 || ret.code == '0') {
  224. _this.totalInfo = ret.count;
  225. _this.totalList = _this.current == 1 ? ret.Data : _this.totalList.concat(ret.Data);
  226. _this.totalPages = ret.Data.pageCount;
  227. if(mescroll){
  228. mescroll.endSuccess(_this.size,true);
  229. }
  230. if(_this.frist == 1){
  231. _this.$nextTick(function(){
  232. _this.configs();
  233. })
  234. }
  235. }
  236. })
  237. },
  238. configs : function(){
  239. var _this = this;
  240. this.frist = 2;
  241. this.configDownAndPull("mescroll", function(mescroll) {
  242. _this.current = 1;
  243. _this.getStoreList_jiage(mescroll);
  244. }, function(mescroll) {
  245. if (_this.current < _this.totalPages) {
  246. _this.current = _this.current + 1;
  247. _this.getStoreList_jiage(mescroll, 1);
  248. } else {
  249. mescroll.endSuccess(_this.size, false);
  250. }
  251. })
  252. }
  253. },
  254. mounted : function() {
  255. this.init();
  256. }
  257. })
  258. }
  259. </script>