index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="content">
  3. <view class="text-area">
  4. <view class="white_b"></view>
  5. </view>
  6. <view class="stripe"></view>
  7. <view class="roll">
  8. <view>
  9. <view @click="show = true">
  10. <u-icon name="edit-pen"></u-icon>手动录入
  11. </view>
  12. <view>{{tips}}:{{number}}</view>
  13. </view>
  14. <view>
  15. <view></view>
  16. <view></view>
  17. <view style="width: 94%;height: 20px;background-color: rgb(0,0,0,0);margin: 0 auto;margin-top: -1rpx;border-radius: 0;">
  18. <image src="../../../static/sailun/line.png" style="width: 100%;height: 1rpx;" mode=""></image>
  19. </view>
  20. </view>
  21. <view class="generate" style="overflow:auto;">
  22. <u-table font-size="20" border-color="#ffffff" bg-color="#fff">
  23. <u-tr class="u-tr">
  24. <u-th class="u-th" width="30%">胎号</u-th>
  25. <u-th class="u-th">规格</u-th>
  26. <u-th class="u-th" width="15%"></u-th>
  27. </u-tr>
  28. <u-tr class="u-tr" :key="index" v-for="(item, index) in lisi">
  29. <u-td class="u-td" width="30%">{{item.name}}</u-td>
  30. <u-td class="u-td">{{item.Specifications}}</u-td>
  31. <u-td class="u-td" width="15%">删除</u-td>
  32. </u-tr>
  33. </u-table>
  34. <u-divider color="rgb(144, 147, 153)" half-width="200" border-color="rgb(144, 147, 153)" margin-top="40">没有更多了</u-divider>
  35. </view>
  36. </view>
  37. <view class="determine">
  38. <u-button type="primary" :ripple="true" shape="circle">扫码确认</u-button>
  39. </view>
  40. <view>
  41. </view>
  42. <view>
  43. <scan @getCode="getScanCode" />
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. data() {
  50. return {
  51. tips: '提示',
  52. number: '请扫码入库',
  53. i: 1,
  54. lisi: [{
  55. name: '1',
  56. Specifications: '175/70R14 88T XL BH15 BGBL'
  57. }]
  58. }
  59. },
  60. onLoad() {
  61. },
  62. onReady() {
  63. uni.setNavigationBarTitle({
  64. title: '扫码干哈'
  65. });
  66. },
  67. methods: {
  68. bug() {
  69. console.log("成功")
  70. this.i++
  71. this.lisi.push({
  72. name: this.i,
  73. Specifications: this.i
  74. })
  75. },
  76. //获取扫码控件
  77. getScanCode(val) {
  78. console.log(val)
  79. this.number = val
  80. this.tips = "胎号"
  81. this.bug()
  82. }
  83. }
  84. }
  85. </script>
  86. <style>
  87. .generate {
  88. width: 92%;
  89. height: 420rpx;
  90. margin: 0 auto;
  91. margin-top: 120rpx;
  92. }
  93. .determine {
  94. width: 690rpx;
  95. margin-top: 30rpx;
  96. }
  97. .content {
  98. display: flex;
  99. flex-direction: column;
  100. align-items: center;
  101. justify-content: center;
  102. }
  103. .logo {
  104. height: 200rpx;
  105. width: 200rpx;
  106. margin-top: 200rpx;
  107. margin-left: auto;
  108. margin-right: auto;
  109. margin-bottom: 50rpx;
  110. }
  111. .stripe {
  112. width: 720rpx;
  113. height: 30rpx;
  114. background: rgba(0, 0, 0, 0.2);
  115. border-radius: 12rpx;
  116. margin: 0 auto;
  117. margin-top: -200rpx;
  118. }
  119. .text-area {
  120. width: 100%;
  121. height: 750rpx;
  122. background-color: #0094fe;
  123. display: flex;
  124. justify-content: center;
  125. }
  126. .white_b {
  127. width: 83%;
  128. height: 540rpx;
  129. background-color: rgb(255, 255, 255, 0.5);
  130. border-radius: 20rpx;
  131. }
  132. .title {
  133. font-size: 36rpx;
  134. color: #8f8f94;
  135. }
  136. page {
  137. /* background-color: #000; */
  138. }
  139. .roll {
  140. width: 690rpx;
  141. height: auto;
  142. background: #FFFFFF;
  143. margin: 0 auto;
  144. margin-top: -15rpx;
  145. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(101, 176, 249, 0.3);
  146. border-bottom-left-radius: 10rpx;
  147. border-bottom-right-radius: 10rpx;
  148. padding-top: 50rpx;
  149. padding-bottom: 50rpx;
  150. }
  151. .roll>view:nth-child(1)>view:nth-child(2) {
  152. font-size: 42rpx;
  153. font-weight: bold;
  154. color: #0192FD;
  155. text-align: center;
  156. margin-bottom: 50rpx;
  157. }
  158. .roll>view:nth-child(1)>view:nth-child(1) {
  159. width: 200rpx;
  160. color: #0094FE;
  161. position: relative;
  162. top: -40rpx;
  163. left: 500rpx;
  164. font-size: 32rpx;
  165. text-align: center;
  166. }
  167. .roll>view:nth-child(2)>view {
  168. width: 50rpx;
  169. height: 50rpx;
  170. background-color: #F4F4F4;
  171. border-radius: 100%;
  172. float: right;
  173. margin-right: -30rpx;
  174. }
  175. .roll>view:nth-child(2)>view:nth-child(1) {
  176. float: left;
  177. margin-left: -30rpx;
  178. }
  179. </style>