index.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <!-- 扫码出库确认页面 -->
  3. <view>
  4. <u-modal v-model="show" :show-title="false" @confirm="confirm">
  5. <view style="width: 100%;height: 42rpx;margin-top: 30rpx;margin-bottom: 10rpx;text-align: center;">成功信息</view>
  6. <u-table border-color="#f2f2f2">
  7. <u-tr class="u-tr">
  8. <u-td class="u-td" style="font-size: 24rpx;">{{successCount}}</u-td>
  9. <u-td class="u-td">成功出库轮胎</u-td>
  10. </u-tr>
  11. </u-table>
  12. <view style="width: 100%;height: 42rpx;margin-top: 30rpx;margin-bottom: 10rpx;text-align: center;">失败信息</view>
  13. <u-table border-color="#f2f2f2" font-size="20rpx">
  14. <u-tr class="u-tr">
  15. <u-th class="u-th">轮胎胎号</u-th>
  16. <u-th class="u-th">失败原因</u-th>
  17. </u-tr>
  18. <u-tr class="u-tr" v-for="(item,index) in notBelongStoreBrandTyreNumbers" :key="index">
  19. <u-td class="u-td" style="font-size: 24rpx;">{{item}}</u-td>
  20. <u-td class="u-td">非门店经营品牌</u-td>
  21. </u-tr>
  22. <u-tr class="u-tr" v-for="(item,index) in nonRegularTyreNumbers" :key="index">
  23. <u-td class="u-td" style="font-size: 24rpx;">{{item}}</u-td>
  24. <u-td class="u-td">非正规胎号</u-td>
  25. </u-tr>
  26. <u-tr class="u-tr" v-for="(item,index) in notScanInTyres" :key="index">
  27. <u-td class="u-td" style="font-size: 24rpx;">{{item}}</u-td>
  28. <u-td class="u-td">未入库轮胎</u-td>
  29. </u-tr>
  30. </u-table>
  31. </u-modal>
  32. <view class="header">
  33. <view class="behind"></view>
  34. <view class="content">
  35. <view class="content-one">
  36. <view>胎号</view>
  37. <view>物料</view>
  38. </view>
  39. <view v-for="(item,index) in datalist" :key="index">
  40. <view class="content-two">
  41. <view>{{item.tireNumber}}</view>
  42. <view>{{item.maktx}}</view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="content-four">
  47. 注:请完善请完善请完善请完善请完善请完善请完善
  48. </view>
  49. </view>
  50. <u-toast ref="repeat" position="bottom" />
  51. <view class="tail" @click="Submit">
  52. 扫码确认
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import {
  58. request
  59. } from '../../../common/request/request'
  60. require("promise.prototype.finally").shim()
  61. export default {
  62. data() {
  63. return {
  64. datalist: [],
  65. total: 0,
  66. show: false,
  67. successCount: '', //成功条数
  68. notBelongStoreBrandTyreNumbers: [], //非门店经营品牌胎号
  69. nonRegularTyreNumbers: [], //非正规胎号
  70. notScanInTyres: [], //未入库胎号
  71. longitude:'', //经度
  72. latitude:'' //纬度
  73. }
  74. },
  75. created() {
  76. uni.$on('update', data => {
  77. this.datalist = data.materialList
  78. return this.datalist
  79. })
  80. },
  81. methods: {
  82. confirm() {
  83. this.$u.route({
  84. type:'redirectTo',
  85. url: 'pages/me/Delivery-details/index'
  86. })
  87. },
  88. Submit() {
  89. uni.getLocation({
  90. type: 'wgs84',
  91. geocode:true,
  92. success: function(res) {
  93. console.log(res, "当前位置");
  94. console.log(res.longitude);
  95. console.log(res.latitude);
  96. this.longitude = res.longitude
  97. this.latitude = res.latitude
  98. },
  99. });
  100. this.show = true;
  101. request({
  102. url: '/storeScan/storeScanOutTyres',
  103. method: 'Post',
  104. data: {
  105. storeId:this.$store.state.storeInfo.storeId,
  106. userId:this.$store.state.storeInfo.userId,
  107. scanAddress: '中国',
  108. longitude: this.longitude,
  109. latitude: this.latitude,
  110. materialList: this.datalist
  111. }
  112. }).then(res => {
  113. console.log(res.data.msg)
  114. if (res.data.code == 500) {
  115. this.$refs.repeat.show({
  116. title: res.data.msg,
  117. type: 'default',
  118. position: 'bottom'
  119. })
  120. }
  121. this.notBelongStoreBrandTyreNumbers = res.data.data.notBelongStoreBrandTyreNumbers //非门店经营品牌胎号
  122. this.successCount = res.data.data.successCount //成功条数
  123. this.nonRegularTyreNumbers = res.data.data.nonRegularTyreNumbers //非正规胎号
  124. this.notScanInTyres = res.data.data.notScanInTyres //未入库轮胎号
  125. console.log(res)
  126. }).catch(err => {
  127. console.log(err.data.msg)
  128. }).finally(() => {
  129. // Loading.close()
  130. })
  131. }
  132. },
  133. }
  134. </script>
  135. <style lang="scss" scoped>
  136. .behind {
  137. width: 100%;
  138. height: 230rpx;
  139. margin-bottom: -200rpx;
  140. background-color: #0094FE;
  141. }
  142. .header {
  143. width: 100%;
  144. }
  145. .content {
  146. width: 711rpx;
  147. // height: 852rpx;
  148. background: #FFFFFF;
  149. box-shadow: 0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41);
  150. border-radius: 20rpx;
  151. padding-top: 10rpx;
  152. padding-bottom: 10rpx;
  153. margin: 0 auto;
  154. }
  155. .content-one {
  156. display: flex;
  157. justify-content: space-between;
  158. }
  159. .content-one:nth-child(1) {
  160. margin-left: 90rpx;
  161. margin-right: 150rpx;
  162. font-weight: bold;
  163. margin-top: 30rpx;
  164. }
  165. .content-two {
  166. display: flex;
  167. justify-content: space-between;
  168. margin-top: 30rpx;
  169. line-height: 115rpx;
  170. width: 666rpx;
  171. margin: 0 auto;
  172. color: #9c9c9c;
  173. font-size: 28rpx;
  174. border-bottom: 1rpx solid #E8E8E8;
  175. }
  176. .content-two>view:nth-child(2) {
  177. padding-top: 28rpx;
  178. width: 350rpx;
  179. line-height: 53rpx;
  180. text-align: center;
  181. }
  182. .content-two>view:nth-child(3) {
  183. color: #149EE2;
  184. margin-right: 50rpx;
  185. }
  186. .tail {
  187. width: 678rpx;
  188. line-height: 83rpx;
  189. background: #0095FF;
  190. color: #fff;
  191. text-align: center;
  192. margin: 0 auto;
  193. margin-top: 60rpx;
  194. border-radius: 15rpx;
  195. }
  196. .content-four {
  197. color: #acacac;
  198. font-size: 24rpx;
  199. margin-top: 30rpx;
  200. margin-left: 20rpx;
  201. margin-bottom: 50rpx;
  202. }
  203. </style>