index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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" @click="scancodein">扫码确认</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. scancodein(){
  84. this.$u.route({
  85. url: 'pages/home/Scan-code-in/index',
  86. })
  87. }
  88. }
  89. }
  90. </script>
  91. <style>
  92. .generate {
  93. width: 92%;
  94. height: 420rpx;
  95. margin: 0 auto;
  96. margin-top: 120rpx;
  97. }
  98. .determine {
  99. width: 690rpx;
  100. margin-top: 30rpx;
  101. }
  102. .content {
  103. display: flex;
  104. flex-direction: column;
  105. align-items: center;
  106. justify-content: center;
  107. }
  108. .logo {
  109. height: 200rpx;
  110. width: 200rpx;
  111. margin-top: 200rpx;
  112. margin-left: auto;
  113. margin-right: auto;
  114. margin-bottom: 50rpx;
  115. }
  116. .stripe {
  117. width: 720rpx;
  118. height: 30rpx;
  119. background: rgba(0, 0, 0, 0.2);
  120. border-radius: 12rpx;
  121. margin: 0 auto;
  122. margin-top: -200rpx;
  123. }
  124. .text-area {
  125. width: 100%;
  126. height: 750rpx;
  127. background-color: #0094fe;
  128. display: flex;
  129. justify-content: center;
  130. }
  131. .white_b {
  132. width: 83%;
  133. height: 540rpx;
  134. background-color: rgb(255, 255, 255, 0.5);
  135. border-radius: 20rpx;
  136. }
  137. .title {
  138. font-size: 36rpx;
  139. color: #8f8f94;
  140. }
  141. page {
  142. /* background-color: #000; */
  143. }
  144. .roll {
  145. width: 690rpx;
  146. height: auto;
  147. background: #FFFFFF;
  148. margin: 0 auto;
  149. margin-top: -15rpx;
  150. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(101, 176, 249, 0.3);
  151. border-bottom-left-radius: 10rpx;
  152. border-bottom-right-radius: 10rpx;
  153. padding-top: 50rpx;
  154. padding-bottom: 50rpx;
  155. }
  156. .roll>view:nth-child(1)>view:nth-child(2) {
  157. font-size: 42rpx;
  158. font-weight: bold;
  159. color: #0192FD;
  160. text-align: center;
  161. margin-bottom: 50rpx;
  162. }
  163. .roll>view:nth-child(1)>view:nth-child(1) {
  164. width: 200rpx;
  165. color: #0094FE;
  166. position: relative;
  167. top: -40rpx;
  168. left: 500rpx;
  169. font-size: 32rpx;
  170. text-align: center;
  171. }
  172. .roll>view:nth-child(2)>view {
  173. width: 50rpx;
  174. height: 50rpx;
  175. background-color: #F4F4F4;
  176. border-radius: 100%;
  177. float: right;
  178. margin-right: -30rpx;
  179. }
  180. .roll>view:nth-child(2)>view:nth-child(1) {
  181. float: left;
  182. margin-left: -30rpx;
  183. }
  184. </style>