intoNode_body.html 8.3 KB

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