oeindex.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <view class="inputBox">
  5. <img src="../../static/img/icon_search.png" alt="" class="searchImg">
  6. <input v-model="om" type="text" placeholder="OE/品牌号" class="topInput" @confirm="inputconfirm">
  7. <image src="../../static/img/icon_close.png" class="searchClose" v-if="vin!=''"
  8. @click="clear"></image>
  9. <!-- <image src="../../static/img/icon_camera.png" mode="" class="cameraImg"></image> -->
  10. </view>
  11. </view>
  12. <view class="history">
  13. <view class="historyTop">
  14. <view class="historyTopTxt">示例数据</view>
  15. <!-- <image src="../../static/img/icon_delete.png" mode="" class="historyDelImg"></image> -->
  16. </view>
  17. <view v-for="(item,index) in 1" class="historyLIneBox">
  18. <view class="historyLIne" @click="gogroup2('16176RTA004')">16176RTA004</view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. om: ''
  28. }
  29. },
  30. onLoad() {
  31. },
  32. methods: {
  33. clear(){
  34. this.om = ''
  35. this.$emit('search','');
  36. },
  37. inputconfirm(){
  38. console.log(this.om)
  39. // if (this.vin.length != 17) {
  40. // uni.showToast({
  41. // title: '请输入正确VIN',
  42. // icon: 'none',
  43. // duration: 3000
  44. // });
  45. // return;
  46. // }
  47. this.$http('advancedEpc/parts/find', {
  48. partsnums: this.om,
  49. }, 'GET').then(res => {
  50. /* uni.hideLoading(); */
  51. //console.log(res.data.number);
  52. if (res.data.number == 200 || res.data.number == 5212) {
  53. this.gogroup()
  54. } else {
  55. uni.showToast({
  56. title: res.data.message,
  57. icon: 'none',
  58. duration: 3000
  59. });
  60. }
  61. });
  62. },
  63. gogroup(){
  64. uni.navigateTo({
  65. url:'OESearch?om='+this.om
  66. })
  67. },
  68. gogroup2(om){
  69. uni.navigateTo({
  70. url:'OESearch?om='+om
  71. })
  72. }
  73. }
  74. }
  75. </script>
  76. <style scoped>
  77. .comment{
  78. padding-bottom: constant(safe-area-inset-bottom);
  79. padding-bottom: env(safe-area-inset-bottom);
  80. }
  81. .top{
  82. height: 96rpx;
  83. border-bottom: 1px solid #EEEEEE;
  84. padding-top: 24rpx;
  85. }
  86. .searchImg{
  87. width: 40rpx;
  88. height: 40rpx;
  89. margin-top: 16rpx;
  90. margin-left: 20rpx;
  91. }
  92. .inputBox{
  93. width: 702rpx;
  94. height: 72rpx;
  95. background: #F4F5F7;
  96. border-radius: 36rpx;
  97. margin-left: 24rpx;
  98. display:flex;
  99. position: relative;
  100. }
  101. .topInput{
  102. font-size: 28rpx;
  103. height: 72rpx;
  104. line-height: 72rpx;
  105. padding-left: 16rpx;
  106. width: 500rpx;
  107. }
  108. .searchClose {
  109. position: absolute;
  110. width: 36rpx;
  111. height: 36rpx;
  112. right: 36rpx;
  113. top: 20rpx;
  114. }
  115. .cameraImg{
  116. position: absolute;
  117. width: 40rpx;
  118. height: 40rpx;
  119. top: 16rpx;
  120. right: 20rpx;
  121. }
  122. .history{
  123. padding: 24rpx;
  124. }
  125. .historyTop{
  126. display: flex;
  127. justify-content: space-between;
  128. }
  129. .historyDelImg{
  130. width: 34rpx;height: 34rpx;
  131. }
  132. .historyTopTxt{
  133. font-size: 28rpx;
  134. font-weight: 400;
  135. color: #666666;
  136. line-height: 34rpx;
  137. }
  138. .historyLIne{
  139. color: #333333;font-size: 24rpx;
  140. height: 64rpx;
  141. background: #F4F5F7;
  142. border-radius: 32rpx;
  143. line-height: 64rpx;
  144. padding: 0 24rpx;
  145. margin-top: 20rpx;
  146. }
  147. .historyLIneBox{
  148. display: flex;
  149. }
  150. </style>