index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <view class="content">
  3. <view class="text-area">
  4. <scan @getCode="getScanCode"/>
  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">
  22. <u-table font-size="24" 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. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. tips: '提示',
  49. number: '请扫码入库',
  50. nbTitle: '扫码标题',
  51. i: 1,
  52. lisi: [{
  53. name: '123456789154Sad',
  54. Specifications: '175/70R14 88T XL BH15 BGBL'
  55. }],
  56. background: {
  57. backgroundColor: '#0094fe',
  58. }
  59. }
  60. },
  61. onLoad() {
  62. },
  63. onReady() {
  64. },
  65. methods: {
  66. bug() {
  67. console.log("成功")
  68. this.i++
  69. this.lisi.push({
  70. name: this.i,
  71. Specifications: this.i
  72. })
  73. },
  74. //获取扫码控件
  75. getScanCode(val) {
  76. console.log(val)
  77. this.number = val
  78. this.tips = "胎号"
  79. this.bug()
  80. },
  81. scancodein() {
  82. this.$u.route({
  83. url: 'pages/home/Scan-code-in/index'
  84. })
  85. }
  86. }
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. .generate {
  91. width: 98%;
  92. height: 420rpx;
  93. overflow:auto;
  94. margin: 0 auto;
  95. margin-top: 120rpx;
  96. }
  97. .determine {
  98. width: 690rpx;
  99. margin-top: 330rpx;
  100. }
  101. .content {
  102. display: flex;
  103. flex-direction: column;
  104. align-items: center;
  105. justify-content: center;
  106. padding-top: 100%;
  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-color: #00A0EA;
  120. border-radius: 12rpx;
  121. margin: 0 auto;
  122. margin-top: -100rpx;
  123. }
  124. .text-area {
  125. width: 100%;
  126. background-color: #000;
  127. display: flex;
  128. position: static;
  129. justify-content: center;
  130. padding-top: 180rpx;
  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. .status_bar {
  180. height: var(--status-bar-height);
  181. width: 100%;
  182. background-color: #0095FF;
  183. }
  184. </style>