index.vue 4.2 KB

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