index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <view class="content">
  3. <u-navbar :title="nbTitle" back-icon-color="#ffffff" title-color="#ffffff" :background="background" :border-bottom="false"></u-navbar>
  4. <view class="text-area">
  5. <view class="white_b"></view>
  6. </view>
  7. <view class="stripe"></view>
  8. <view class="roll">
  9. <view>
  10. <view @click="show = true">
  11. <u-icon name="edit-pen"></u-icon>手动录入
  12. </view>
  13. <view>{{tips}}:{{number}}</view>
  14. </view>
  15. <view>
  16. <view></view>
  17. <view></view>
  18. <view style="width: 94%;height: 20px;background-color: rgb(0,0,0,0);margin: 0 auto;margin-top: -1rpx;border-radius: 0;">
  19. <image src="../../../static/sailun/line.png" style="width: 100%;height: 1rpx;" mode=""></image>
  20. </view>
  21. </view>
  22. <view class="generate">
  23. <u-table font-size="24" border-color="#ffffff" bg-color="#fff">
  24. <u-tr class="u-tr">
  25. <u-th class="u-th" width="30%">胎号</u-th>
  26. <u-th class="u-th">规格</u-th>
  27. <u-th class="u-th" width="15%"></u-th>
  28. </u-tr>
  29. <u-tr class="u-tr" :key="index" v-for="(item, index) in lisi">
  30. <u-td class="u-td" width="30%">{{item.name}}</u-td>
  31. <u-td class="u-td">{{item.Specifications}}</u-td>
  32. <u-td class="u-td" width="15%">删除</u-td>
  33. </u-tr>
  34. </u-table>
  35. <u-divider color="rgb(144, 147, 153)" half-width="200" border-color="rgb(144, 147, 153)" margin-top="40">没有更多了</u-divider>
  36. </view>
  37. </view>
  38. <view class="determine">
  39. <u-button type="primary" :ripple="true" shape="circle" @click="scancodein">扫码确认</u-button>
  40. </view>
  41. <view>
  42. </view>
  43. <view>
  44. <scan @getCode="getScanCode" />
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. export default {
  50. data() {
  51. return {
  52. tips: '提示',
  53. number: '请扫码入库',
  54. nbTitle: '扫码标题',
  55. i: 1,
  56. lisi: [{
  57. name: '123456789154Sad',
  58. Specifications: '175/70R14 88T XL BH15 BGBL'
  59. }],
  60. background: {
  61. backgroundColor: '#0094fe',
  62. }
  63. }
  64. },
  65. onLoad() {
  66. },
  67. onReady() {
  68. },
  69. methods: {
  70. bug() {
  71. console.log("成功")
  72. this.i++
  73. this.lisi.push({
  74. name: this.i,
  75. Specifications: this.i
  76. })
  77. },
  78. //获取扫码控件
  79. getScanCode(val) {
  80. console.log(val)
  81. this.number = val
  82. this.tips = "胎号"
  83. this.bug()
  84. },
  85. scancodein() {
  86. this.$u.route({
  87. url: 'pages/home/Scan-code-in/index'
  88. })
  89. }
  90. }
  91. }
  92. </script>
  93. <style scoped>
  94. .generate {
  95. width: 98%;
  96. height: 420rpx;
  97. overflow:auto;
  98. margin: 0 auto;
  99. margin-top: 120rpx;
  100. }
  101. .determine {
  102. width: 690rpx;
  103. margin-top: 30rpx;
  104. }
  105. .content {
  106. display: flex;
  107. flex-direction: column;
  108. align-items: center;
  109. justify-content: center;
  110. }
  111. .logo {
  112. height: 200rpx;
  113. width: 200rpx;
  114. margin-top: 200rpx;
  115. margin-left: auto;
  116. margin-right: auto;
  117. margin-bottom: 50rpx;
  118. }
  119. .stripe {
  120. width: 720rpx;
  121. height: 30rpx;
  122. background-color: rgba(0, 0, 0, 0.2);
  123. border-radius: 12rpx;
  124. margin: 0 auto;
  125. margin-top: -100rpx;
  126. }
  127. .text-area {
  128. width: 100%;
  129. height: 650rpx;
  130. background-color: #0094fe;
  131. display: flex;
  132. justify-content: center;
  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>