123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <template>
- <view class="page">
- <!-- 公共组件-每个页面必须引入 -->
- <public-module></public-module>
- <view class="box">
- <view class="row " v-for="(item,index) in typeList" :key="index" @tap="chooseVehicleType(index)">
- <!-- 永安 -->
- <view class="row_header dis a-c j-s">
- <view class="left">{{item.modelName }}</view>
- <view class="right">¥{{item.replacementValue}}</view>
- </view>
- <view class="row_body dis f-c">
- <view class="dis j-s">
- <view style="margin-right: 5px;">车系:{{item.series}}</view>
- <view>{{item.remark}}</view>
- <view style="margin-left: auto;">({{item.ratedPassengerCapacity}}座)</view>
- </view>
- <view class="dis j-s">
- <view>年款:<text style="color: #2432ff;">{{item.marketYear}}</text></view>
- <view>排量:<text style="color: #2432ff;">{{item.displacement}}</text></view>
- <view>功率:<text style="color: #2432ff;">{{item.powerScale}}</text></view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapMutations
- } from "vuex"
- export default {
- data() {
- return {
- frameNo: "", //车架号
- modelName: "", //车型
- enrollDate: "", //
- typeList: [],
- vehicleType: null,
- }
- },
- async onLoad(options) {
- if (options.frameNo) {
- this.vehicleType = options.vehicleType;
- this.frameNo = decodeURIComponent(options.frameNo);
- let res = await this.$http.get('/order/carModel/vinSearch?frameNo=' + this.frameNo);
- this.typeList = res.data;
- } else if (options.modelName) {
- this.modelName = decodeURIComponent(options.modelName);
- let params = {
- modelName: this.modelName
- }
- let res = await this.$http.post('/order/zhongMeiApi/modelsQuery', params);
- this.typeList = res.data;
- }
- },
- computed: {
- getHeight() {
- let height = uni.getSystemInfoSync().windowHeight;
- return `height: ${height}px;`;
- }
- },
- methods: {
- async queryList(pageNo, pageSize) {
- // if (!!this.brandName) {
- // /* 永安 */
- // let param = {
- // // "rows": pageSize,
- // // "pageNo": pageNo,
- // "modelName": this.brandName,
- // // "enrollDate": this.enrollDate,
- // // "frameNo": this.frameNo,
- // }
- // let res = await this.$http.post('/insZhongmei/modelQuery', param);
- // let resList = [];
- // if (!!res.data) {
- // resList = res.data;
- // }
- // this.$refs.paging.complete(res.data);
- // this.firstLoaded = true;
- // } else if (!!this.frameNo) {
- // let res = await this.$http.get('/insZhongmei/vinSearch?frameNo=' + this.frameNo);
- // let resList = [];
- // if (!!res.data) {
- // resList = res.data;
- // }
- // this.$refs.paging.complete(res.data);
- // this.firstLoaded = true;
- // }
- },
- chooseVehicleType(index) {
- let pages = getCurrentPages(); //获取所有页面栈实例列表
- let nowPage = pages[pages.length - 1]; //当前页页面实例
- let prevPage = pages[pages.length - 2]; //上一页页面实例
- prevPage.$vm.carInfo.brandName = this.typeList[index].brandCN; //车型
- prevPage.$vm.carInfo.modelcname = this.typeList[index].modelName; //车型
- prevPage.$vm.carInfo.caryear = this.typeList[index].marketYear; //年款
- prevPage.$vm.carInfo.seatCount = this.typeList[index].ratedPassengerCapacity; //座位数
- prevPage.$vm.carInfo.purchasePrice = this.typeList[index].replacementValue; //价格
- prevPage.$vm.carInfo.modelCode = this.typeList[index].modelCode; //车辆型号编码
- prevPage.$vm.carInfo.familyName = this.typeList[index].series; //系列
- prevPage.$vm.carInfo.enginedesc = this.typeList[index].displacement; //排量
- prevPage.$vm.carInfo.energyType = this.typeList[index].fuelTypeCode; //燃油种类
- prevPage.$vm.carInfo.powerScale = this.typeList[index].powerScale; //功率
- if (this.vehicleType) {
- prevPage.$vm.vehicleType = this.vehicleType;
- }
- uni.navigateBack({ //uni.navigateTo跳转的返回,默认1为返回上一级
- delta: 1
- });
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .page {
- min-height: 100vh;
- background: #F8FAFE;
- padding: 16px 16px 150px 16px;
- }
- .row {
- width: 100%;
- height: auto;
- background: #FFFFFF;
- box-shadow: 0px 4px 10px 0px #DAE3F4;
- border-radius: 12px;
- border-bottom: 1px solid #f2f2f2;
- padding: 0 10px;
- margin-bottom: 10px;
- .row_header {
- width: 100%;
- font-size: 28upx;
- border-bottom: 1upx solid #EEEEEE;
- padding: 5px 0;
- font-weight: bold;
- }
- .row_body {
- width: 100%;
- padding: 10px 0;
- view {
- font-weight: bold;
- font-size: 12px;
- }
- }
- }
- .row .row_header .left {
- flex: 5;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- color: #333;
- }
- .row .row_header .right {
- flex: 2;
- color: #FF5600;
- text-align: right;
- }
- .row .row .row_body view>view {
- margin: 0 5px;
- }
- /* 底部的样式Start */
- .bottom {
- height: 120upx;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- background: #FFFFFF;
- border-top: 1upx solid #EEEEEE;
- z-index: 99;
- }
- .bottom>button {
- font-size: 30upx;
- background: #337ab7;
- color: #FFFFFF;
- flex: 1;
- margin: 0upx 30upx;
- }
- /* 底部的样式End */
- </style>
|