index.vue 5.3 KB

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