chukutongji_body.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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. <body>
  20. <div id="app" v-cloak>
  21. <div class="pageView chukujilu flex col" style="overflow-y:scroll">
  22. <!-- <div class="header flex a-center j-center">
  23. <i class="iconfont icon-back" onclick="history.go(-1)"></i>
  24. 入库统计
  25. </div>-->
  26. <!-- <div class="leiji flex a-center j-center">
  27. 入库码:<h4>202004041613617225</h4>
  28. </div>-->
  29. <div class="boxs" style="padding-left: 0; padding-right: 0; padding-bottom: 1.4rem;">
  30. <div class="rukuTongji">
  31. <!--<div class="rukuTongjiTitle flex a-center j-center">
  32. 规格统计
  33. </div>
  34. <div class="rukuTongjiHead flex j-center">
  35. <div class="item flex a-center j-center">
  36. 规格
  37. </div>
  38. <div class="item flex a-center j-center">
  39. 数量
  40. </div>
  41. </div>
  42. <div class="rukuTongjiBody">
  43. <div class="item flex a-center j-center">
  44. <div class="fx1">
  45. 165/60r14 75h
  46. <br/>
  47. bh15bgbl
  48. </div>
  49. <div class="fx1">
  50. SL12
  51. </div>
  52. </div>
  53. <div class="item flex a-center j-center">
  54. <div class="fx1">
  55. 165/60r14 75h
  56. <br/>
  57. bh15bgbl
  58. </div>
  59. <div class="fx1">
  60. SL12
  61. </div>
  62. </div>
  63. </div>-->
  64. <div class="rukuTongjiTitle flex a-center j-center" style="margin-top: 0rem;">
  65. 明细统计
  66. </div>
  67. <div class="rukuTongjiHead flex j-center">
  68. <!-- <div class="item flex a-center j-center">
  69. 规格
  70. </div>
  71. <div class="item flex a-center j-center">
  72. 花纹
  73. </div>
  74. <div class="item flex a-center j-center">
  75. 奖励
  76. </div> -->
  77. <div class="item flex a-center j-center">
  78. 胎号
  79. </div>
  80. <div class="item flex a-center j-center">
  81. 物料描述
  82. </div>
  83. </div>
  84. <div class="rukuTongjiBody">
  85. <div class="item flex a-center j-center" v-for="(s,index) in store">
  86. <!-- <div class="fx1">
  87. {{ s.specs }}
  88. </div>
  89. <div class="fx1">
  90. {{ s.pattern }}
  91. </div>
  92. <div class="fx1">
  93. 0元
  94. </div> -->
  95. <div class="fx1">
  96. {{s.tirenumber}}
  97. </div>
  98. <div class="fx1">
  99. {{s.maktx}}
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="rukuTongjiFoot flex a-center j-center" v-if="canClick" v-on:click="doneChoose">
  105. 扫码确认
  106. </div>
  107. <div class="rukuTongjiFoot flex a-center j-center" style="background-color : #ccc;color:#fff" v-if="!canClick">
  108. 扫码确认
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </body>
  114. <script type="text/javascript" src="../script/jquery-1.11.0.min.js"></script>
  115. <script type="text/javascript" src="../script/api.js"></script>
  116. <script type="text/javascript" src="../script/httpRequest.js"></script>
  117. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  118. <script type="text/javascript">
  119. apiready = function() {
  120. var store = api.pageParam.store;
  121. var type = api.pageParam.type;
  122. new Vue({
  123. el: '#app',
  124. data: {
  125. store: JSON.parse(store),
  126. address: '', // 经纬度 + 地址
  127. lonlat: '',
  128. userid: '',
  129. canClick : true,
  130. },
  131. methods: {
  132. init: function() {
  133. var _this = this;
  134. this.userid = $api.getStorage('userid');
  135. this.map = api.require('bMap');
  136. if (api.systemType == 'ios') {
  137. this.map.initMapSDK(function(ret) {
  138. if (ret.status) {}
  139. });
  140. }
  141. this.ifHasPrme('location', function(ret1) {
  142. if (ret1 == true) {
  143. _this.map.getLocation(function(ret2, err) {
  144. if (ret2.status) {
  145. _this.lonlat = ret2;
  146. _this.map.getNameFromCoords({
  147. lon: ret2.lon,
  148. lat: ret2.lat
  149. }, function(ret3, err) {
  150. if (ret3.status) {
  151. _this.address = ret3;
  152. } else {
  153. }
  154. });
  155. } else {}
  156. });
  157. }
  158. })
  159. // 获取当前地址
  160. },
  161. /**
  162. * 扫码入库
  163. */
  164. doneChoose: function() {
  165. if (!this.address.lat || !this.address.lon) {
  166. api.toast({
  167. msg: '正在获取定位,请稍候',
  168. });
  169. this.init();
  170. return;
  171. }
  172. var data = {
  173. "scanAddress": this.address.district,
  174. "latitude": this.address.lat,
  175. "longitude": this.address.lon,
  176. "storeId": this.userid,
  177. "province": this.address.province,
  178. "city": this.address.city,
  179. "district": this.address.district,
  180. "rewardType": "1",
  181. "materialList": this.store,
  182. "result": this.store.length,
  183. "type": 'body',
  184. "url": 'json'
  185. }
  186. var url = "outStoreU",
  187. _this = this;
  188. this.canClick = false;
  189. this.$post(url, data, function(ret) {
  190. _this.canClick = true;
  191. if (ret.code == 0) {
  192. _this.sendEvent('refushku');
  193. api.alert({
  194. title: '出库提示',
  195. msg: ret.msg,
  196. }, function(ret, err){
  197. if( ret ){
  198. _this.goWin('gotoNode_win','gotoNode_win.html','');
  199. }
  200. });
  201. }
  202. })
  203. }
  204. },
  205. mounted: function() {
  206. this.init();
  207. }
  208. })
  209. }
  210. </script>
  211. </html>