index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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}}条</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">{{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">{{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">{{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>
  47. <u-toast ref="repeat" position="bottom" />
  48. <view class="tail" @click="location">
  49. 扫码确认
  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. }).finally(() => {
  136. // Loading.close()
  137. })
  138. }
  139. },
  140. }
  141. </script>
  142. <style lang="scss" scoped>
  143. .behind {
  144. width: 100%;
  145. height: 230rpx;
  146. margin-bottom: -200rpx;
  147. background-color: #0094FE;
  148. }
  149. .header {
  150. width: 100%;
  151. }
  152. .content {
  153. width: 711rpx;
  154. // height: 852rpx;
  155. background: #FFFFFF;
  156. box-shadow: 0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41);
  157. border-radius: 20rpx;
  158. padding-top: 10rpx;
  159. padding-bottom: 10rpx;
  160. margin: 0 auto;
  161. }
  162. .content-one {
  163. display: flex;
  164. justify-content: space-between;
  165. }
  166. .content-one:nth-child(1) {
  167. margin-left: 90rpx;
  168. margin-right: 150rpx;
  169. font-weight: bold;
  170. margin-top: 30rpx;
  171. }
  172. .content-two {
  173. display: flex;
  174. justify-content: space-between;
  175. margin-top: 30rpx;
  176. line-height: 115rpx;
  177. width: 666rpx;
  178. margin: 0 auto;
  179. color: #9c9c9c;
  180. font-size: 28rpx;
  181. border-bottom: 1rpx solid #E8E8E8;
  182. }
  183. .content-two>view:nth-child(2) {
  184. padding-top: 28rpx;
  185. width: 350rpx;
  186. line-height: 53rpx;
  187. text-align: center;
  188. }
  189. .content-two>view:nth-child(3) {
  190. color: #149EE2;
  191. margin-right: 50rpx;
  192. }
  193. .tail {
  194. width: 678rpx;
  195. line-height: 83rpx;
  196. background: #0095FF;
  197. color: #fff;
  198. text-align: center;
  199. margin: 0 auto;
  200. margin-top: 60rpx;
  201. border-radius: 15rpx;
  202. }
  203. .content-four {
  204. color: #acacac;
  205. font-size: 24rpx;
  206. margin-top: 30rpx;
  207. margin-left: 20rpx;
  208. margin-bottom: 50rpx;
  209. }
  210. </style>