index.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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">{{successCount}}{{$t('scancodeenter.strip')}}</u-td>
  9. <u-td class="u-td">{{$t('scancodeenter.delivery')}}</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">{{$t('scanningconfirm.number')}}</u-th>
  16. <u-th class="u-th">{{$t('scanningconfirm.failreason')}}</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">{{item}}</u-td>
  20. <u-td class="u-td">{{$t('scanningconfirm.stateA')}}</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">{{item}}</u-td>
  24. <u-td class="u-td">{{$t('scanningconfirm.stateB')}}</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">{{item}}</u-td>
  28. <u-td class="u-td">{{$t('scanningconfirm.notincluded')}}</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>{{$t('scanningconfirm.number_s')}}</view>
  37. <view>{{$t('scanningconfirm.materiel')}}</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>
  47. <u-toast ref="repeat" position="bottom" />
  48. <view class="tail" @click="location">
  49. {{$t('scanningconfirm.confirm')}}
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. import {
  55. request
  56. } from '../../../common/request/request'
  57. require("promise.prototype.finally").shim()
  58. export default {
  59. data() {
  60. return {
  61. datalist: [],
  62. total: 0,
  63. show: false,
  64. successCount: '', //成功条数
  65. notBelongStoreBrandTyreNumbers: [], //非门店经营品牌胎号
  66. nonRegularTyreNumbers: [], //非正规胎号
  67. notScanInTyres: [], //未入库胎号
  68. longitude:'', //经度
  69. latitude:'' ,//纬度
  70. degree:'',
  71. address_s:'',
  72. whole:''
  73. }
  74. },
  75. created() {
  76. uni.$on('update', data => {
  77. this.datalist = data.materialList
  78. console.log(data)
  79. this.whole = data
  80. return this.datalist
  81. })
  82. },
  83. onBackPress(options) {
  84. if (options.from == 'backbutton') {
  85. this.$u.route({
  86. url: 'pages/home/scancode/scancodeout'
  87. })
  88. uni.$emit('data', {
  89. lisi: this.datalist
  90. })
  91. }
  92. return true;
  93. },
  94. methods: {
  95. confirm() {
  96. this.$u.route({
  97. type:'redirectTo',
  98. url: 'pages/me/Delivery-details/index'
  99. })
  100. this.datalist = ''
  101. },
  102. location(){
  103. let this_s = this
  104. console.log(this.whole)
  105. this_s.Submit()
  106. },
  107. Submit() {
  108. this.show = true;
  109. request({
  110. url: '/storeScan/storeScanOutTyres',
  111. method: 'Post',
  112. data: {
  113. storeId:this.$store.state.storeInfo.storeId,
  114. userId:this.$store.state.storeInfo.userId,
  115. scanAddress: this.whole.address, //地址
  116. longitude: this.whole.degree.x,
  117. latitude: this.whole.degree.y,
  118. materialList: this.datalist
  119. }
  120. }).then(res => {
  121. console.log(res)
  122. if (res.data.code == 500) {
  123. this.$refs.repeat.show({
  124. title: res.data.msg,
  125. type: 'default',
  126. position: 'bottom'
  127. })
  128. }
  129. this.notBelongStoreBrandTyreNumbers = res.data.data.notBelongStoreBrandTyreNumbers //非门店经营品牌胎号
  130. this.successCount = res.data.data.successCount //成功条数
  131. this.nonRegularTyreNumbers = res.data.data.nonRegularTyreNumbers //非正规胎号
  132. this.notScanInTyres = res.data.data.notScanInTyres //未入库轮胎号
  133. this.datalist = ''
  134. }).catch(err => {
  135. uni.showToast({
  136. icon: 'none',
  137. title: this.$t('scanningconfirm.networkstate'),
  138. position: "bottom"
  139. })
  140. }).finally(() => {
  141. // Loading.close()
  142. })
  143. }
  144. },
  145. }
  146. </script>
  147. <style lang="scss" scoped>
  148. .behind {
  149. width: 100%;
  150. height: 230rpx;
  151. margin-bottom: -200rpx;
  152. background-color: #0094FE;
  153. }
  154. .header {
  155. width: 100%;
  156. }
  157. .content {
  158. width: 711rpx;
  159. // height: 852rpx;
  160. background: #FFFFFF;
  161. box-shadow: 0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41);
  162. border-radius: 20rpx;
  163. padding-top: 10rpx;
  164. padding-bottom: 10rpx;
  165. margin: 0 auto;
  166. }
  167. .content-one {
  168. display: flex;
  169. justify-content: space-between;
  170. }
  171. .content-one:nth-child(1) {
  172. margin-left: 90rpx;
  173. margin-right: 150rpx;
  174. font-weight: bold;
  175. margin-top: 30rpx;
  176. }
  177. .content-two {
  178. display: flex;
  179. justify-content: space-between;
  180. margin-top: 30rpx;
  181. line-height: 115rpx;
  182. width: 666rpx;
  183. margin: 0 auto;
  184. color: #9c9c9c;
  185. font-size: 28rpx;
  186. border-bottom: 1rpx solid #E8E8E8;
  187. }
  188. .content-two>view:nth-child(2) {
  189. padding-top: 28rpx;
  190. width: 350rpx;
  191. line-height: 53rpx;
  192. text-align: center;
  193. }
  194. .content-two>view:nth-child(3) {
  195. color: #149EE2;
  196. margin-right: 50rpx;
  197. }
  198. .tail {
  199. width: 678rpx;
  200. line-height: 83rpx;
  201. background: #0095FF;
  202. color: #fff;
  203. text-align: center;
  204. margin: 0 auto;
  205. margin-top: 60rpx;
  206. border-radius: 15rpx;
  207. }
  208. .content-four {
  209. color: #acacac;
  210. font-size: 24rpx;
  211. margin-top: 30rpx;
  212. margin-left: 20rpx;
  213. margin-bottom: 50rpx;
  214. }
  215. </style>