kucun1_body.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <title>title</title>
  8. <link rel="stylesheet" href="../../css/api.css"/>
  9. <link rel="stylesheet" href="../../css/aui.css"/>
  10. <link rel="stylesheet" href="../../css/weui.min.css"/>
  11. <link rel="stylesheet" href="../../css/html.css"/>
  12. <link rel="stylesheet" href="../../css/xunjia_wuliao.css"/>
  13. <style>
  14. #app {
  15. padding-bottom: 3rem;
  16. }
  17. .weui_cell:before {
  18. border-top: 0px !important;
  19. }
  20. .weui_btn {
  21. border-radius: 0px !important;
  22. }
  23. .zmq-radius {
  24. border: 1px solid#00787B;
  25. border-radius: 5px;
  26. padding : 0px 5px;
  27. margin-top: -5px;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <div id="app" v-cloak>
  33. <article style="bottom: 0;">
  34. <div class="weui_cells weui_cells_access zmq-width-90 zmq-bg-transparent">
  35. <a class="weui_cell zmq-margin-top-10 zmq-bg-white zmq-radius-10" href="javascript:;" v-for="(store,index) in list">
  36. <div class="weui_cell_bd weui_cell_primary">
  37. <div class="wuliao-title zmq-border-bottom-1">
  38. <label class="zmq-text-msg">商品编码:{{store.bizGoodsDto.serialNumber}}</label>
  39. <!--<span class="zmq-text-msg" >-{{store.statusName}}</span>-->
  40. <span class="require zmq-line-1 zmq-float-right zmq-position-absolute zmq-radius"><label class="zmq-text-msg">{{store.bizGoodsDto.brand}}</label></span>
  41. </div>
  42. <div class="wuliao-title">
  43. <label class="zmq-text-font-06">{{store.bizGoodsDto.comName}}</label>
  44. </div>
  45. <div class="detail zmq-flex-nowarp">
  46. <span class="date zmq-text-explain">总库存:{{store.tatalStock}}</span>
  47. <!--<span class="date zmq-text-explain">可用库存:{{store.onsaleStock}}</span>-->
  48. </div>
  49. <div class="detail zmq-flex-nowarp">
  50. <span class="date zmq-text-explain">创建时间:{{store.createTime}}</span>
  51. </div>
  52. </div> </a>
  53. </div>
  54. </article>
  55. <img class="zmq-img-nodata" v-show="hasData == false" src="../../image/nodata.png" />
  56. <div v-show="upLock == false" class="zmq-text-explain zmq-margin-top-10 zmq-textAlign-center zmq-margin-bottom-10 zmq-block-text">
  57. 已无更多数据
  58. </div>
  59. </div>
  60. </body>
  61. <script type="text/javascript" src="../../script/api.js"></script>
  62. <script type="text/javascript" src="../../script/aui-scroll.js"></script>
  63. <script type="text/javascript" src="../../script/vue.js"></script>
  64. <script type="text/javascript" src="../../script/httpRequest.js"></script>
  65. <script type="text/javascript" src="../../script/vue_plugins.js"></script>
  66. <script type="text/javascript">
  67. apiready = function() {
  68. new Vue({
  69. el : '#app',
  70. data : {
  71. retariler_id : '',
  72. // 获取库存url
  73. getStockUrl : 'getKucunInfoUrl',
  74. type : '',
  75. list : [],
  76. // 是否有数据
  77. hasData : false,
  78. // 分页查询
  79. upLock : true,
  80. current : 1,
  81. total : 1,
  82. },
  83. methods : {
  84. init : function() {
  85. var _this = this;
  86. this.retariler_id = $api.getStorage("retailerid");
  87. _this.getStock();
  88. this.configHeaderRefush(function() {
  89. _this.upLock = true;
  90. _this.current = 1;
  91. _this.getStock();
  92. })
  93. // 配置上啦刷星
  94. this.configBottomRefush(function(status) {
  95. if (_this.hasData == true) {
  96. // 开启上拉加载
  97. if (_this.total > _this.current) {
  98. _this.downData = 'up';
  99. _this.current = _this.current + 1;
  100. _this.getList();
  101. } else {
  102. // 上啦没有数据了
  103. _this.upLock = false;
  104. }
  105. }
  106. })
  107. },
  108. // 获取库存
  109. getStock : function() {
  110. // var data = {
  111. // retarilerId : this.retariler_id,
  112. // current : this.current,
  113. // }, _this = this;
  114. // this.$post(this.getStockUrl, data, function(ret) {
  115. // alertJson(ret);
  116. // if (ret.code == 0) {
  117. // _this.list = ret.page.records;
  118. // }
  119. // })
  120. var data = {
  121. retailerId : this.retariler_id,
  122. current : this.current,
  123. }, _this = this;
  124. this.$post(this.getStockUrl, data, function(ret) {
  125. if (ret.code == 0) {
  126. _this.total = ret.page.pages;
  127. if (_this.downData == 'up') {
  128. _this.list = _this.list.concat(ret.page.records);
  129. } else {
  130. _this.list = ret.page.records;
  131. if (_this.list.length > 0) {
  132. _this.hasData = true;
  133. }
  134. }
  135. }
  136. })
  137. },
  138. // 查看商品详情
  139. loonInfo : function(id){
  140. var page = {
  141. id : id,
  142. page : 'get'
  143. }
  144. this.goWin("orderScan_win","orderScan_win.html",page);
  145. }
  146. },
  147. mounted : function() {
  148. this.init();
  149. }
  150. })
  151. }
  152. </script>
  153. </html>