gotoNode_body.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  18. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  19. <title></title>
  20. </head>
  21. <style>
  22. .chukujilu {
  23. background-color: #fff !important;
  24. }
  25. .chukujilu .chukuTimer {
  26. background-color: #00a0ea !important;
  27. color: #fff !important;
  28. }
  29. .mescroll{
  30. position: relative;
  31. height: 73%;/*如设置bottom:50px,则需height:auto才能生效*/
  32. }
  33. </style>
  34. <body>
  35. <div id="app" v-cloak>
  36. <div class="pageView chukujilu flex col filterpage">
  37. <div class="leiji flex a-center j-center" style="background-color : #00a0ea !important">
  38. 库存总量:
  39. <h4>{{total}} </h4>
  40. </div>
  41. <div class="searchSpec">
  42. <div class="search flex a-center">
  43. <div class="searchbox">
  44. <svg t="1589079341958" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5394" width="22" height="22">
  45. <path d="M883.626667 823.04l-145.066667-144.64A337.92 337.92 0 0 0 810.666667 469.333333a341.333333 341.333333 0 1 0-341.333334 341.333334 337.92 337.92 0 0 0 209.066667-72.106667l144.64 145.066667a42.666667 42.666667 0 0 0 60.586667 0 42.666667 42.666667 0 0 0 0-60.586667zM213.333333 469.333333a256 256 0 1 1 256 256 256 256 0 0 1-256-256z" p-id="5395" fill="#bfbfbf"></path>
  46. </svg>
  47. <input type="search" placeholder="请输入轮胎胎号或规格" v-model="keyword">
  48. </div>
  49. </div>
  50. </div>
  51. <van-popup position="bottom" v-model="timeShow">
  52. <mycalendar @comfirm="comfirm" @close="timeShow = false"></mycalendar>
  53. </van-popup>
  54. <div class="zhuceTimer flex a-center jlr">
  55. <div class="flex a-center" v-on:click="getTimes">
  56. <h4>出库时间:</h4>
  57. <p v-on:click="getTimes(0)">{{ startTime }}</p> ~ <p v-on:click="getTimes(1)">{{ endTime }}</p>
  58. </div>
  59. </div>
  60. <!-- <div class="leiji flex a-center j-center">
  61. 累计(条):<h4>999</h4>
  62. </div> -->
  63. <!-- <div class="chukuTimer flex a-center jlr" @click="openTimer">
  64. <div class="flex a-center">
  65. <h4 class="flex a-center j-center">出库日期:</h4>
  66. <div class="flex a-center j-center" v-on:click="chooseTime">{{startCurrentDate}}</div>
  67. </div>
  68. <div class="iconfont icon-right"></div>
  69. </div> -->
  70. <div class="mescroll-touch-y mescroll" id="mescroll">
  71. <div class="boxs" v-show="list.length > 0" >
  72. <ul>
  73. <li v-for="(item,index) in list">
  74. <div class="bottom flex jlr a-center">
  75. <p>出库码:{{ item.batchNumber }}</p>
  76. <span>1 条</span>
  77. </div>
  78. <div class="bottom flex jlr a-center">
  79. <p>物料描述:{{ item.maktx }}</p>
  80. </div>
  81. <div class="bottom flex jlr a-center">
  82. <p>胎号:{{ item.tireNumber }}</p>
  83. </div>
  84. <div class="bottom flex jlr a-center">
  85. <p>创建时间:{{ item.createTime | formatDate}}</p>
  86. </div>
  87. </li>
  88. </ul>
  89. <!-- <div v-show="hasOther == false" style="width: 100%;height: 1rem;;text-align : center;margin-top : 1rem;font-size:0.3rem;background:#ccc;color:#fff;width:200px;margin:0.5rem auto;line-height:1rem" v-on:click="addMore">点击加载更多</div> -->
  90. <!-- <div v-show="hasOther && list.length > 0" style="width: 100%;height: 1rem;;text-align : center;margin-top : 1rem;font-size:0.3rem">暂无更多数据</div> -->
  91. </div>
  92. <div v-show="list.length == 0" style="overflow:auto">
  93. <img src="./image/noData.png" style="margin:2rem auto" />
  94. </div>
  95. </div>
  96. </div>
  97. <!--
  98. <van-popup v-model="startTimeShow" position="bottom">
  99. <van-datetime-picker v-model="startCurrentDate" type="date" title="选择开始时间" @confirm="startConfirm"/>
  100. </van-popup> -->
  101. </div>
  102. </body>
  103. <script type="text/javascript" src="../script/aui-scroll.js"></script>
  104. <script type="text/javascript" src="../script/api.js"></script>
  105. <script type="text/javascript" src="../script/httpRequest.js"></script>
  106. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  107. <script type="text/javascript">
  108. apiready = function() {
  109. new Vue({
  110. el: '#app',
  111. data: {
  112. list:[],
  113. startTimeShow: false,
  114. startCurrentDate: "点击选择时间",
  115. size: 10,
  116. current: 1,
  117. totalPages: 1,
  118. frist: 1,
  119. mescroll: '',
  120. hasOther : false,
  121. total:'',
  122. // 添加查询
  123. timeShow: false,
  124. keyword: '',
  125. startTime : '开始时间',
  126. endTime : '结束时间'
  127. },
  128. watch: {
  129. keyword: function(nw, od) {
  130. this.current = 1;
  131. this.getIntoList();
  132. }
  133. },
  134. methods: {
  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.getIntoList();
  150. })
  151. },
  152. init: function() {
  153. this.userid = $api.getStorage('userid');
  154. this.getIntoList();
  155. },
  156. configs: function() {
  157. var _this = this;
  158. this.frist = 2;
  159. this.configDownAndPull("mescroll",function(mescroll){
  160. _this.current = 1;
  161. _this.mescroll = mescroll;
  162. _this.getIntoList(mescroll);
  163. },function(mescroll){
  164. if(_this.current < _this.totalPages){
  165. _this.current = _this.current + 1;
  166. _this.getIntoList(mescroll,1);
  167. }else{
  168. mescroll.endSuccess(_this.size,false);
  169. }
  170. });
  171. },
  172. addMore : function(){
  173. var _this = this;
  174. if(_this.current < _this.totalPages){
  175. _this.current = _this.current + 1;
  176. _this.getIntoList(_this.mescroll, 1);
  177. }else{
  178. _this.hasOther = true;
  179. }
  180. },
  181. chooseTime: function() {
  182. var _this = this;
  183. this.getTime(function(time) {
  184. _this.startCurrentDate = time;
  185. if (_this.mescroll != '') {
  186. _this.mescroll.resetUpScroll();
  187. }
  188. })
  189. },
  190. openTimer: function() {
  191. this.startTimeShow = true
  192. },
  193. startConfirm: function(e) {
  194. this.startTimeShow = false
  195. },
  196. getIntoList: function(mescroll) {
  197. var _this = this,
  198. url = "getinOrOutU";
  199. var data = {
  200. "storeId": this.userid,
  201. "size": this.size,
  202. "current": this.current,
  203. "scanType": 2,
  204. "url": "json",
  205. "type": "body",
  206. "tireNumber": this.keyword,
  207. "startTime" : this.startTime == '开始时间' ? '' : this.startTime+' 00:00:00',
  208. "endTime" : this.endTime == '结束时间' ? '' : this.endTime+' 23:59:59'
  209. }
  210. this.$post(url, data, function(ret) {
  211. if (ret.code == 0 || ret.code == '0') {
  212. _this.total=ret.Data.total
  213. _this.totalPages = ret.Data.pages;
  214. _this.list = _this.current == 1 ? ret.Data.records : _this.list.concat(ret.Data.records);
  215. if (mescroll) {
  216. mescroll.endSuccess(_this.size, true);
  217. }
  218. if (_this.frist == 1) {
  219. _this.$nextTick(function() {
  220. _this.configs();
  221. })
  222. }
  223. }
  224. })
  225. }
  226. },
  227. filters: {
  228. timer: function(v) {
  229. var v = new Date(v);
  230. if (v && v!='开始时间' && v!='') {
  231. var y = v.getFullYear()
  232. var m = v.getMonth() + 1
  233. var d = v.getDate()
  234. return y + '-' + m + '-' + d
  235. } else {
  236. return '请选择'
  237. }
  238. },
  239. formatDate: function(time) {
  240. return time.substring(0,10)
  241. }
  242. },
  243. mounted: function() {
  244. this.init();
  245. }
  246. })
  247. }
  248. </script>
  249. </html>