rukutongji_body.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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>
  78. <div class="rukuTongjiBody">
  79. <div class="item flex a-center j-center" v-for="(s,index) in store">
  80. <div class="fx1">
  81. {{ s.tireNumber }}
  82. </div>
  83. <div class="fx1">
  84. {{ s.maktx }}
  85. </div>
  86. <div class="fx1">
  87. {{ s.reward }}元
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="rukuTongjiFoot flex a-center j-center" v-if="canClick" v-on:click="doneChoose">
  93. 扫码确认
  94. </div>
  95. <div class="rukuTongjiFoot flex a-center j-center" style="background-color : #ccc;color:#fff"
  96. v-if="!canClick">
  97. 扫码确认
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </body>
  103. <script type="text/javascript" src="../script/jquery-1.11.0.min.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. var store = api.pageParam.store;
  110. var type = api.pageParam.type;
  111. new Vue({
  112. el: '#app',
  113. data: {
  114. store: JSON.parse(store),
  115. address: '', // 经纬度 + 地址
  116. lonlat: '',
  117. userid: '',
  118. type: type,
  119. canClick: true,
  120. },
  121. methods: {
  122. init: function () {
  123. var _this = this;
  124. this.userid = $api.getStorage('userid');
  125. this.map = api.require('bMap');
  126. if (api.systemType == 'ios') {
  127. this.map.initMapSDK(function (ret) {
  128. if (ret.status) { }
  129. });
  130. }
  131. this.ifHasPrme('location', function (ret1) {
  132. if (ret1 == true) {
  133. // 获取当前位置和当前经纬度
  134. _this.map.getLocation(function (ret2, err) {
  135. if (ret2.status) {
  136. _this.lonlat = ret2;
  137. _this.map.getNameFromCoords({
  138. lon: ret2.lon,
  139. lat: ret2.lat
  140. }, function (ret3, err) {
  141. if (ret3.status) {
  142. _this.address = ret3;
  143. } else {
  144. }
  145. });
  146. } else { }
  147. });
  148. }
  149. })
  150. // 获取当前地址
  151. },
  152. /**
  153. * 扫码入库
  154. */
  155. doneChoose: function () {
  156. if (!this.address.lat || !this.address.lon) {
  157. api.toast({
  158. msg: '正在获取定位,请稍候',
  159. });
  160. this.init();
  161. return;
  162. }
  163. var data = {
  164. "scanAddress": this.address.district,
  165. "latitude": this.address.lat == '' ? '' : this.address.lat.toString().substring(0, 11),
  166. "longitude": this.address.lon == '' ? '' : this.address.lon.toString().substring(0, 11),
  167. "storeId": this.userid,
  168. "province": this.address.province,
  169. "city": this.address.city,
  170. "district": this.address.district,
  171. "rewardType": "2",
  172. "materialList": this.store,
  173. "result": this.store.length,
  174. "type": 'body',
  175. "url": 'json'
  176. }
  177. var url = "sacaCodeIn",
  178. _this = this;
  179. this.canClick = false;
  180. this.$post(url, data, function (ret) {
  181. _this.canClick = true;
  182. if (ret.code == 0) {
  183. if (!ret.message) {
  184. _this.sendEvent('refushku');
  185. api.alert({
  186. title: '入库提示',
  187. msg: ret.msg,
  188. }, function (ret, err) {
  189. if (ret) {
  190. _this.goWin('intoNode_win', 'intoNode_win.html', '');
  191. }
  192. });
  193. } else {
  194. api.toast({
  195. msg: ret.message
  196. });
  197. }
  198. }
  199. })
  200. }
  201. },
  202. mounted: function () {
  203. this.init();
  204. }
  205. })
  206. }
  207. </script>
  208. </html>