carType1.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <template>
  2. <view style="background-color: #f2f2f2;">
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <view class="box">
  6. <view class="row d-flex flex-column" v-for="(item,index) in typeList" :key="index"
  7. @tap="chooseVehicleType(index)">
  8. <!-- 永安 -->
  9. <view class="row_header d-flex a-center j-sb">
  10. <view class="left">{{item.modelName }}</view>
  11. <view class="right">¥{{item.replacementValue}}</view>
  12. </view>
  13. <view class="row_body">
  14. <view>
  15. <view>车系:{{item.series}}</view>
  16. <view>{{item.remark}}</view>
  17. <view>厂牌型号代码:<text style="color:#ea552d;">{{item.modelCode}}</text> </view>
  18. <view>年款:<text style="color: #2432ff;">{{item.marketYear}}</text></view>
  19. <view>排量:<text style="color: #2432ff;">{{item.displacement}}</text></view>
  20. <view>座位数:<text style="color: #2432ff;">{{item.ratedPassengerCapacity}}</text></view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import {
  29. mapState,
  30. mapMutations
  31. } from "vuex"
  32. export default {
  33. data() {
  34. return {
  35. frameNo: "", //车架号
  36. enrollDate: "", //
  37. typeList: [],
  38. }
  39. },
  40. async onLoad(options) {
  41. if (options.frameNo) {
  42. this.frameNo = decodeURIComponent(options.frameNo);
  43. let res = await this.$http.get('/order/carModel/vinSearch?frameNo=' + this.frameNo);
  44. this.typeList = res.data;
  45. }
  46. },
  47. computed: {
  48. getHeight() {
  49. let height = uni.getSystemInfoSync().windowHeight;
  50. return `height: ${height}px;`;
  51. }
  52. },
  53. methods: {
  54. async queryList(pageNo, pageSize) {
  55. // if (!!this.brandName) {
  56. // /* 永安 */
  57. // let param = {
  58. // // "rows": pageSize,
  59. // // "pageNo": pageNo,
  60. // "modelName": this.brandName,
  61. // // "enrollDate": this.enrollDate,
  62. // // "frameNo": this.frameNo,
  63. // }
  64. // let res = await this.$http.post('/insZhongmei/modelQuery', param);
  65. // let resList = [];
  66. // if (!!res.data) {
  67. // resList = res.data;
  68. // }
  69. // this.$refs.paging.complete(res.data);
  70. // this.firstLoaded = true;
  71. // } else if (!!this.frameNo) {
  72. // let res = await this.$http.get('/insZhongmei/vinSearch?frameNo=' + this.frameNo);
  73. // let resList = [];
  74. // if (!!res.data) {
  75. // resList = res.data;
  76. // }
  77. // this.$refs.paging.complete(res.data);
  78. // this.firstLoaded = true;
  79. // }
  80. },
  81. chooseVehicleType(index) {
  82. let pages = getCurrentPages(); //获取所有页面栈实例列表
  83. let nowPage = pages[pages.length - 1]; //当前页页面实例
  84. let prevPage = pages[pages.length - 2]; //上一页页面实例
  85. prevPage.$vm.carInfo.brandName = this.typeList[index].modelName; //车型
  86. prevPage.$vm.carInfo.modelcname = this.typeList[index].modelName; //车型
  87. prevPage.$vm.carInfo.caryear = this.typeList[index].marketYear; //年款
  88. prevPage.$vm.carInfo.seatCount = this.typeList[index].ratedPassengerCapacity; //座位数
  89. prevPage.$vm.carInfo.purchasePrice = this.typeList[index].replacementValue; //价格
  90. prevPage.$vm.carInfo.modelCode = this.typeList[index].modelCode; //车辆型号编码
  91. prevPage.$vm.carInfo.familyName = this.typeList[index].series; //系列
  92. prevPage.$vm.carInfo.enginedesc = this.typeList[index].displacement; //排量
  93. prevPage.$vm.carInfo.powertype = this.typeList[index].fuelType; //燃油种类
  94. prevPage.$vm.carInfo.powerScale = this.typeList[index].powerScale; //功率
  95. uni.navigateBack({ //uni.navigateTo跳转的返回,默认1为返回上一级
  96. delta: 1
  97. });
  98. }
  99. }
  100. }
  101. </script>
  102. <style>
  103. page {
  104. background-color: #f2f2f2;
  105. }
  106. .box {
  107. padding-top: 10px;
  108. }
  109. .display {
  110. display: flex;
  111. }
  112. .row {
  113. width: 100%;
  114. box-sizing: border-box;
  115. margin-bottom: 20upx;
  116. border-radius: 5upx;
  117. padding: 10upx;
  118. background-color: #FFFFFF;
  119. padding: 10px;
  120. }
  121. .row .row_header {
  122. font-size: 28upx;
  123. border-bottom: 1upx solid #EEEEEE;
  124. height: 50upx;
  125. }
  126. .row .row_header .left {
  127. flex: 5;
  128. overflow: hidden;
  129. text-overflow: ellipsis;
  130. white-space: nowrap;
  131. color: #333;
  132. }
  133. .row .row_header .right {
  134. flex: 2;
  135. color: #ea552d;
  136. text-align: right;
  137. }
  138. .row_body {
  139. padding: 10px;
  140. }
  141. .row .row_body view {
  142. color: #333;
  143. font-size: 24upx;
  144. text-align: center;
  145. display: flex;
  146. flex-wrap: wrap;
  147. justify-content: space-between;
  148. }
  149. .row .row_body view>view {
  150. margin: 0 5px;
  151. }
  152. /* 底部的样式Start */
  153. .bottom {
  154. height: 120upx;
  155. position: fixed;
  156. bottom: 0;
  157. left: 0;
  158. right: 0;
  159. background: #FFFFFF;
  160. border-top: 1upx solid #EEEEEE;
  161. z-index: 99;
  162. }
  163. .bottom>button {
  164. font-size: 30upx;
  165. background: #337ab7;
  166. color: #FFFFFF;
  167. flex: 1;
  168. margin: 0upx 30upx;
  169. }
  170. /* 底部的样式End */
  171. </style>