Compare commits
38 Commits
prod-25-03
...
prod-25-04
Author | SHA1 | Date | |
---|---|---|---|
c0ac29efe2 | |||
e04743e871 | |||
95c8095518 | |||
0aa3630adb | |||
75eba22e9e | |||
a162c3fdcc | |||
33f4857427 | |||
432f35a403 | |||
ae0bd3b169 | |||
6b27859358 | |||
99edd5d431 | |||
9ac5860ef8 | |||
e56de7ff8b | |||
4a70d881b8 | |||
5de1efc5fb | |||
7b7e926f8a | |||
ba1cd9fcac | |||
3fe67c1015 | |||
cdc63e6c42 | |||
0e138e22f4 | |||
b5c5f24c49 | |||
d3d6226bcd | |||
a426b67a51 | |||
efe76bb675 | |||
de9d73a642 | |||
044813f411 | |||
b90b7ea89c | |||
4c02dcd075 | |||
3cd768b973 | |||
db6a3facae | |||
48ab0cfb52 | |||
c5176ebc02 | |||
f666d9bcb4 | |||
6864a1330f | |||
e373acb818 | |||
fe71adf6e3 | |||
b6d0ae476c | |||
c80a2f6e6b |
@ -44,10 +44,10 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h3>声明</h3>
|
<h3>声明</h3>
|
||||||
<p>本平台为二手车买卖双方提供免费信息发布服务。在您使用本平台之前,请仔细阅读并理解本免责声明。一旦使用本平台,即视为您已阅读、理解并同意接受本免责声明的所有条款。</p>
|
<p>本平台为二手拖车买卖双方提供免费信息发布服务。在您使用本平台之前,请仔细阅读并理解本免责声明。一旦使用本平台,即视为您已阅读、理解并同意接受本免责声明的所有条款。</p>
|
||||||
|
|
||||||
<h4>一、平台性质</h4>
|
<h4>一、平台性质</h4>
|
||||||
<p>1. 本平台仅为信息发布平台,不参与任何二手车交易环节,包括但不限于交易洽谈、合同签订、款项支付、车辆交付等,实际交易价格由买卖双方自行协商确定。</p>
|
<p>1. 本平台仅为信息发布平台,不参与任何二手拖车交易环节,包括但不限于交易洽谈、合同签订、款项支付、车辆交付等,实际交易价格由买卖双方自行协商确定。</p>
|
||||||
<p>2. 本平台不对发布信息的真实性、准确性、完整性、合法性进行任何形式的担保或保证,用户应自行判断信息的真实性并承担由此产生的风险。</p>
|
<p>2. 本平台不对发布信息的真实性、准确性、完整性、合法性进行任何形式的担保或保证,用户应自行判断信息的真实性并承担由此产生的风险。</p>
|
||||||
|
|
||||||
<h4>二、用户责任</h4>
|
<h4>二、用户责任</h4>
|
||||||
|
@ -95,3 +95,20 @@ export function batteryDetailList (data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询未读告知函
|
||||||
|
export function selectUnReadNotifyBySupplier() {
|
||||||
|
return request({
|
||||||
|
url: '/supplierManage/correction/notify/selectUnReadNotifyBySupplier',
|
||||||
|
method:'POST',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 阅读告知函
|
||||||
|
export function correctionHandle(data) {
|
||||||
|
return request({
|
||||||
|
url: '/supplierManage/correction/record/correctionHandle',
|
||||||
|
method:'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -54,14 +54,14 @@ export function userFeedback(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//二手车信息擦亮
|
//二手拖车信息擦亮
|
||||||
export function usedCarPolish(data){
|
export function usedCarPolish(data){
|
||||||
return request({
|
return request({
|
||||||
url: `/toc-user/car-app/usedCarPolish/${data}`,
|
url: `/toc-user/car-app/usedCarPolish/${data}`,
|
||||||
method:'POST',
|
method:'POST',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//二手车信息下架
|
//二手拖车信息下架
|
||||||
export function usedCarRemove(data){
|
export function usedCarRemove(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/toc-user/car-app/usedCarRemove',
|
url: '/toc-user/car-app/usedCarRemove',
|
||||||
@ -70,7 +70,7 @@ export function usedCarRemove(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//二手车信息重新上架
|
//二手拖车信息重新上架
|
||||||
export function usedCarReShelf(data){
|
export function usedCarReShelf(data){
|
||||||
return request({
|
return request({
|
||||||
url: `/toc-user/car-app/usedCarReShelf/${data}`,
|
url: `/toc-user/car-app/usedCarReShelf/${data}`,
|
||||||
|
BIN
src/assets/secondHandCar/icon_saled.png
Normal file
BIN
src/assets/secondHandCar/icon_saled.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/secondHandCar/icon_zdOwner.png
Normal file
BIN
src/assets/secondHandCar/icon_zdOwner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
@ -186,6 +186,14 @@ const routes = [
|
|||||||
title:'文档资料'
|
title:'文档资料'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/notificationList',
|
||||||
|
name: 'notificationList',
|
||||||
|
component:()=>import('@/views/index/notificationList'),
|
||||||
|
meta: {
|
||||||
|
title:'告知函'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/caseList',
|
path: '/caseList',
|
||||||
name: 'caseList',
|
name: 'caseList',
|
||||||
|
161
src/views/index/notificationList.vue
Normal file
161
src/views/index/notificationList.vue
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="dialog-wrapper">
|
||||||
|
<div class="title">
|
||||||
|
{{ '告知函('+(currentIndex + 1)+'/'+ list.length+')' }}
|
||||||
|
</div>
|
||||||
|
<h3 class="top">{{currentItem?.title?currentItem?.title:(currentItem?.type==1 ? '质量不合格整改' : '质量不合格调整告知')}}</h3>
|
||||||
|
<div class="center">
|
||||||
|
<div v-html="formattedContent(currentItem)"></div>
|
||||||
|
</div>
|
||||||
|
<div class="end">
|
||||||
|
<div>中道汽车救援股份有限公司</div>
|
||||||
|
<div>区域管理部</div>
|
||||||
|
<div>{{formatDate(currentItem)}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="iptWrap">
|
||||||
|
<div class="tip">请仔细阅读告知函内容,并在下方输入"我已阅读”以表明您已充分理解函件中的各项信息。</div>
|
||||||
|
<el-input style="width: 50%" v-model.trim="content" placeholder="请输入我已阅读"></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="info" size="small" v-if="num > 0">还需阅读{{num}}秒</el-button>
|
||||||
|
<el-button type="primary" size="small" v-if="num==0" @click="confirmHandle(currentItem)">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {myMixins} from "@/utils/myMixins"
|
||||||
|
import {selectUnReadNotifyBySupplier, correctionHandle} from "@/api/order"
|
||||||
|
export default {
|
||||||
|
name: "notificationList",
|
||||||
|
mixins: [myMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
currentIndex: 0,
|
||||||
|
num:10,
|
||||||
|
timer: null,
|
||||||
|
content: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
currentItem() {
|
||||||
|
return this.list[this.currentIndex];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
currentIndex() {
|
||||||
|
this.content = '';
|
||||||
|
this.num = 10;
|
||||||
|
this.startCountdown();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async mounted() {
|
||||||
|
await this.getLetterList();
|
||||||
|
this.timer && clearInterval(this.timer)
|
||||||
|
this.startCountdown();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async confirmHandle(item){
|
||||||
|
if (this.content === '我已阅读') {
|
||||||
|
console.log('item', item)
|
||||||
|
let res = await correctionHandle({
|
||||||
|
handleType:4,
|
||||||
|
operationType:'modify',
|
||||||
|
recordId:item.recordId,
|
||||||
|
planId:item.planId,
|
||||||
|
notifyId:item.id,
|
||||||
|
});
|
||||||
|
console.log('阅读res', res)
|
||||||
|
// 确认成功后处理下一个告知函
|
||||||
|
this.currentIndex++;
|
||||||
|
if (this.currentIndex < this.list.length) {
|
||||||
|
this.content = '';
|
||||||
|
this.num = 10;
|
||||||
|
this.startCountdown();
|
||||||
|
} else {
|
||||||
|
this.closeHandle();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error('请输入"我已阅读"以确认');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getLetterList(){
|
||||||
|
let res = await selectUnReadNotifyBySupplier();
|
||||||
|
let result = res?.data || []
|
||||||
|
if(result && result.length>0){
|
||||||
|
this.list = result
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formatDate(val){
|
||||||
|
/** 日期格式化
|
||||||
|
* */
|
||||||
|
if(!val?.updateTime){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const date = new Date(val.updateTime);
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = date.getMonth() + 1; // 月份从 0 开始,需要加 1
|
||||||
|
const day = date.getDate();
|
||||||
|
const formattedDate = `${year}年${month}月${day}日`;
|
||||||
|
return formattedDate
|
||||||
|
},
|
||||||
|
formattedContent(val) {
|
||||||
|
/** 转换文本,能被 v-html 识别
|
||||||
|
* */
|
||||||
|
return val?.content?.replace(/\r\n/g, '<br>').replace(/\n/g, '<br>');
|
||||||
|
},
|
||||||
|
startCountdown() {
|
||||||
|
this.stopCountdown()
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
if (this.num > 0) {
|
||||||
|
this.num--;
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
closeHandle() {
|
||||||
|
this.stopCountdown();
|
||||||
|
// 调用 app 的方法
|
||||||
|
this.goBack();
|
||||||
|
},
|
||||||
|
stopCountdown() {
|
||||||
|
if (this.timer) {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.timer = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.dialog-wrapper {
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
|
||||||
|
}
|
||||||
|
.top {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.center {
|
||||||
|
margin: 20px 0;
|
||||||
|
line-height: 24px;
|
||||||
|
.hight{
|
||||||
|
color: #0B99E4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.end{
|
||||||
|
text-align: right;
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
.tip{
|
||||||
|
margin-top: 40px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
</style>
|
@ -25,6 +25,8 @@
|
|||||||
:text="'行驶证照片'" :multiple="false" :files.sync="vehicleLicensePhotoList"/>
|
:text="'行驶证照片'" :multiple="false" :files.sync="vehicleLicensePhotoList"/>
|
||||||
<upload-common @success2="getPlateColor" @delete2="deleteImg2"
|
<upload-common @success2="getPlateColor" @delete2="deleteImg2"
|
||||||
:text="'车辆45度照'" :multiple="false" :files.sync="vehicleAnglePhotoList" />
|
:text="'车辆45度照'" :multiple="false" :files.sync="vehicleAnglePhotoList" />
|
||||||
|
<upload-common @success4="getBackPhoto" @delete4="deleteImgBack"
|
||||||
|
:text="'车辆后方45度'" :multiple="false" :files.sync="vehicleRearPhotoList" />
|
||||||
<upload-common @success3="getOtherImg" @delete3="handleDeleteOtherImg"
|
<upload-common @success3="getOtherImg" @delete3="handleDeleteOtherImg"
|
||||||
:text="'其他照片0/6'" :multiple="true" :files.sync="otherImgSrcList"/>
|
:text="'其他照片0/6'" :multiple="true" :files.sync="otherImgSrcList"/>
|
||||||
</div>
|
</div>
|
||||||
@ -40,28 +42,36 @@
|
|||||||
<div class="item vehicleTypeItem">
|
<div class="item vehicleTypeItem">
|
||||||
<span> <span class="star">*</span>车辆类型 </span>
|
<span> <span class="star">*</span>车辆类型 </span>
|
||||||
<van-radio-group v-model="form.vehicleType" direction="horizontal" class="radioWrap">
|
<van-radio-group v-model="form.vehicleType" direction="horizontal" class="radioWrap">
|
||||||
<van-radio name="拖车" :class="{'checked':form.vehicleType=='拖车','vehicleRadio':true}">拖车</van-radio>
|
<van-radio name="平板拖车" :class="{'checked':form.vehicleType=='平板拖车','vehicleRadio':true}">平板拖车</van-radio>
|
||||||
<van-radio name="地库车" :class="{'checked':form.vehicleType=='地库车','vehicleRadio':true}">地库车</van-radio>
|
<van-radio name="地库车" :class="{'checked':form.vehicleType=='地库车','vehicleRadio':true}">地库车</van-radio>
|
||||||
<van-radio name="牵引车" :class="{'checked':form.vehicleType=='牵引车','vehicleRadio':true}">牵引车</van-radio>
|
<van-radio name="牵引车" :class="{'checked':form.vehicleType=='牵引车','vehicleRadio':true}">牵引车</van-radio>
|
||||||
<van-radio name="随车吊" :class="{'checked':form.vehicleType=='随车吊','vehicleRadio':true}">随车吊</van-radio>
|
<van-radio name="随车吊" :class="{'checked':form.vehicleType=='随车吊','vehicleRadio':true}">随车吊</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" v-if="form.vehicleType=='拖车'">
|
<div class="item" v-if="form.vehicleType=='平板拖车'">
|
||||||
<span> <span class="star">*</span>落板方式 </span>
|
<span> <span class="star">*</span>落板方式 </span>
|
||||||
<van-radio-group v-model="form.boardType" direction="horizontal" class="radioWrap">
|
<van-radio-group v-model="form.boardType" direction="horizontal" class="radioWrap">
|
||||||
<van-radio name="1" :class="{'checked':form.boardType==1}">全落地</van-radio>
|
<van-radio name="1" :class="{'checked':form.boardType==1}">全落地</van-radio>
|
||||||
<van-radio name="2" :class="{'checked':form.boardType==2}">斜落地</van-radio>
|
<van-radio name="2" :class="{'checked':form.boardType==2}">斜落一体</van-radio>
|
||||||
<van-radio name="3" :class="{'checked':form.boardType==3}">一般平板</van-radio>
|
<van-radio name="3" :class="{'checked':form.boardType==3}">普通斜板</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span> <span class="star">*</span>排放标准 </span>
|
<span> <span class="star">*</span>排放标准 </span>
|
||||||
<van-radio-group v-model="form.emissionStandard" direction="horizontal" class="radioWrap">
|
<van-radio-group v-model="form.emissionStandard" direction="horizontal" class="radioWrap">
|
||||||
|
<van-radio name="3" :class="{'checked':form.emissionStandard==3}">国3</van-radio>
|
||||||
<van-radio name="4" :class="{'checked':form.emissionStandard==4}">国4</van-radio>
|
<van-radio name="4" :class="{'checked':form.emissionStandard==4}">国4</van-radio>
|
||||||
<van-radio name="5" :class="{'checked':form.emissionStandard==5}">国5</van-radio>
|
<van-radio name="5" :class="{'checked':form.emissionStandard==5}">国5</van-radio>
|
||||||
<van-radio name="6" :class="{'checked':form.emissionStandard==6}">国6</van-radio>
|
<van-radio name="6" :class="{'checked':form.emissionStandard==6}">国6</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<span> <span class="star">*</span>刹车系统 </span>
|
||||||
|
<van-radio-group v-model="form.brakeSystem" direction="horizontal" class="radioWrap">
|
||||||
|
<van-radio name="1" :class="{'checked':form.brakeSystem==1}">气刹</van-radio>
|
||||||
|
<van-radio name="2" :class="{'checked':form.brakeSystem==2}">油刹</van-radio>
|
||||||
|
</van-radio-group>
|
||||||
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span> <span class="star">*</span>所在城市 </span>
|
<span> <span class="star">*</span>所在城市 </span>
|
||||||
<van-field
|
<van-field
|
||||||
@ -98,12 +108,12 @@
|
|||||||
> </van-field>
|
> </van-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span> <span class="star">*</span>售价</span>
|
<span> <span class="star">*</span>售价(含税)</span>
|
||||||
<van-field
|
<van-field
|
||||||
type="number"
|
type="number"
|
||||||
style="border: none"
|
|
||||||
class="radioWrap"
|
class="radioWrap"
|
||||||
v-model="form.minPrice"
|
v-model="form.minPrice"
|
||||||
|
@input="validatePrice"
|
||||||
input-align="right"
|
input-align="right"
|
||||||
>
|
>
|
||||||
<template slot="right-icon" >
|
<template slot="right-icon" >
|
||||||
@ -111,6 +121,15 @@
|
|||||||
</template>
|
</template>
|
||||||
</van-field>
|
</van-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="item" style="margin-bottom:20px">
|
||||||
|
<span> <span class="star">*</span>底盘品牌</span>
|
||||||
|
<van-field
|
||||||
|
class="radioWrap"
|
||||||
|
v-model="form.underpanBrand"
|
||||||
|
input-align="right"
|
||||||
|
>
|
||||||
|
</van-field>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="line lastLine"></div>
|
<div class="line lastLine"></div>
|
||||||
<div class="threeContent content">
|
<div class="threeContent content">
|
||||||
@ -124,7 +143,7 @@
|
|||||||
<img v-show="radio==1" @click="radio=0" class="radioIcon" src="@/assets/secondHandCar/checked.png" />
|
<img v-show="radio==1" @click="radio=0" class="radioIcon" src="@/assets/secondHandCar/checked.png" />
|
||||||
<img v-show="radio==0" @click="radio=1" class="radioIcon" src="@/assets/secondHandCar/uncheck.png" />
|
<img v-show="radio==0" @click="radio=1" class="radioIcon" src="@/assets/secondHandCar/uncheck.png" />
|
||||||
<span>我已阅读并同意</span>
|
<span>我已阅读并同意</span>
|
||||||
<span @click="viewPrivacy">《二手车交易条款》</span>
|
<span @click="viewPrivacy">《二手拖车交易条款》</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnWrap" >
|
<div class="btnWrap" >
|
||||||
<div v-if="type==1" class="btn commonBtn" @click="noMultipleClicks(submitHandle)">发布</div>
|
<div v-if="type==1" class="btn commonBtn" @click="noMultipleClicks(submitHandle)">发布</div>
|
||||||
@ -161,6 +180,7 @@ export default {
|
|||||||
type:1,
|
type:1,
|
||||||
vehicleLicensePhoto:'',
|
vehicleLicensePhoto:'',
|
||||||
vehicleAnglePhoto:'',
|
vehicleAnglePhoto:'',
|
||||||
|
vehicleRearPhoto: '',
|
||||||
otherPhoto:'',
|
otherPhoto:'',
|
||||||
licenseType:'',
|
licenseType:'',
|
||||||
brandModel:'',
|
brandModel:'',
|
||||||
@ -176,6 +196,8 @@ export default {
|
|||||||
contactNumber:'',
|
contactNumber:'',
|
||||||
minPrice:'',
|
minPrice:'',
|
||||||
desc:'',
|
desc:'',
|
||||||
|
underpanBrand: '',
|
||||||
|
brakeSystem: '',
|
||||||
},
|
},
|
||||||
radio: 0,
|
radio: 0,
|
||||||
type:'',//1为发布&修改 2为审核
|
type:'',//1为发布&修改 2为审核
|
||||||
@ -189,6 +211,7 @@ export default {
|
|||||||
areaName:'',
|
areaName:'',
|
||||||
vehicleLicensePhotoList:[],
|
vehicleLicensePhotoList:[],
|
||||||
vehicleAnglePhotoList:[],
|
vehicleAnglePhotoList:[],
|
||||||
|
vehicleRearPhotoList: [],
|
||||||
otherImgSrcList:[],
|
otherImgSrcList:[],
|
||||||
otherImgSrc:[],
|
otherImgSrc:[],
|
||||||
status:'',
|
status:'',
|
||||||
@ -223,6 +246,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.vehicleLicensePhotoList=[{url:res.data?.vehicleLicensePhoto}]
|
this.vehicleLicensePhotoList=[{url:res.data?.vehicleLicensePhoto}]
|
||||||
this.vehicleAnglePhotoList=[{url:res.data?.vehicleAnglePhoto}]
|
this.vehicleAnglePhotoList=[{url:res.data?.vehicleAnglePhoto}]
|
||||||
|
this.vehicleRearPhotoList = [{ url: res.data?.vehicleRearPhoto }]
|
||||||
}
|
}
|
||||||
let carSourceFormInfo=localStorage.getItem("carSourceFormInfo") ? JSON.parse(localStorage.getItem("carSourceFormInfo")) : ''
|
let carSourceFormInfo=localStorage.getItem("carSourceFormInfo") ? JSON.parse(localStorage.getItem("carSourceFormInfo")) : ''
|
||||||
if(!carSourceFormInfo){
|
if(!carSourceFormInfo){
|
||||||
@ -240,6 +264,9 @@ export default {
|
|||||||
}
|
}
|
||||||
if(this.form.vehicleAnglePhoto){
|
if(this.form.vehicleAnglePhoto){
|
||||||
this.vehicleAnglePhotoList=[{url:this.form.vehicleAnglePhoto}]
|
this.vehicleAnglePhotoList=[{url:this.form.vehicleAnglePhoto}]
|
||||||
|
}
|
||||||
|
if( this.form.vehicleRearPhoto ) {
|
||||||
|
this.vehicleRearPhotoList = [{url: this.form.vehicleRearPhoto}]
|
||||||
}
|
}
|
||||||
// console.log("carSourceFormInfo",carSourceFormInfo)
|
// console.log("carSourceFormInfo",carSourceFormInfo)
|
||||||
if(carSourceFormInfo.otherImgSrc0){
|
if(carSourceFormInfo.otherImgSrc0){
|
||||||
@ -269,6 +296,13 @@ export default {
|
|||||||
// console.log("--",this.vehicleLicensePhotoList,this.vehicleAnglePhotoList,this.otherImgSrcList)
|
// console.log("--",this.vehicleLicensePhotoList,this.vehicleAnglePhotoList,this.otherImgSrcList)
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
validatePrice(value) {
|
||||||
|
if (value?.startsWith(0) && value?.length > 1) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.minPrice = 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
clearStorageFormInfo(){
|
clearStorageFormInfo(){
|
||||||
localStorage.setItem("carSourceFormInfo",'')
|
localStorage.setItem("carSourceFormInfo",'')
|
||||||
},
|
},
|
||||||
@ -310,7 +344,7 @@ export default {
|
|||||||
this.form.vinCode=data.info.vin
|
this.form.vinCode=data.info.vin
|
||||||
this.form.plateNumber=data.info.plateNo
|
this.form.plateNumber=data.info.plateNo
|
||||||
this.form.registerDate=data.info.registerDate +' 00:00:00'
|
this.form.registerDate=data.info.registerDate +' 00:00:00'
|
||||||
this.form.vehicleType=data.info.vehicleType
|
// this.form.vehicleType=data.info.vehicleType
|
||||||
},
|
},
|
||||||
deleteImg1(){
|
deleteImg1(){
|
||||||
this.form.vehicleLicensePhoto=''
|
this.form.vehicleLicensePhoto=''
|
||||||
@ -327,6 +361,13 @@ export default {
|
|||||||
getOtherImg(data){
|
getOtherImg(data){
|
||||||
this.otherImgSrc.push(data.url)
|
this.otherImgSrc.push(data.url)
|
||||||
},
|
},
|
||||||
|
getBackPhoto(data) {
|
||||||
|
console.log("datadata",data)
|
||||||
|
this.form.vehicleRearPhoto = data.url
|
||||||
|
},
|
||||||
|
deleteImgBack() {
|
||||||
|
this.form.vehicleRearPhoto = '';
|
||||||
|
},
|
||||||
handleDeleteOtherImg(file,index) {
|
handleDeleteOtherImg(file,index) {
|
||||||
this.otherImgSrc = this.otherImgSrc.filter((item,i) => index !== i);
|
this.otherImgSrc = this.otherImgSrc.filter((item,i) => index !== i);
|
||||||
this.otherImgSrcList = this.otherImgSrcList.filter((item,i) => index !== i);
|
this.otherImgSrcList = this.otherImgSrcList.filter((item,i) => index !== i);
|
||||||
@ -345,18 +386,36 @@ export default {
|
|||||||
this.$toast('车辆45度不能为空')
|
this.$toast('车辆45度不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(!this.form.vehicleRearPhoto && type == 1) {
|
||||||
|
this.$toast('车辆后方45度不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
let flag=this.validateHandle()
|
let flag=this.validateHandle()
|
||||||
if(flag){
|
if(flag){
|
||||||
this.$toast(flag)
|
this.$toast(flag)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.form.vehicleType=='拖车' && !this.form.boardType) {
|
if (this.form.vehicleType=='平板拖车' && !this.form.boardType) {
|
||||||
this.$toast('落板方式不能为空')
|
this.$toast('落板方式不能为空')
|
||||||
return
|
return
|
||||||
}else if(this.form.vehicleType !=='拖车'){
|
}else if(this.form.vehicleType !=='平板拖车'){
|
||||||
this.form.boardType=''
|
this.form.boardType=''
|
||||||
}
|
}
|
||||||
let rule=this.validationRules.find(item=>!item.value)
|
let rule
|
||||||
|
if( type == 1 ) {
|
||||||
|
rule = this.validationRules.find(item =>
|
||||||
|
item.value === null ||
|
||||||
|
item.value === undefined ||
|
||||||
|
item.value === ''
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
rule = this.validationRulesSimple.find(item =>
|
||||||
|
item.value === null ||
|
||||||
|
item.value === undefined ||
|
||||||
|
item.value === ''
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if(rule){
|
if(rule){
|
||||||
this.$toast(rule.name)
|
this.$toast(rule.name)
|
||||||
return
|
return
|
||||||
@ -391,18 +450,26 @@ export default {
|
|||||||
this.$toast('车辆45度不能为空')
|
this.$toast('车辆45度不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(!this.form.vehicleRearPhoto) {
|
||||||
|
this.$toast('车辆后方45度不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
let flag=this.validateHandle()
|
let flag=this.validateHandle()
|
||||||
if(flag){
|
if(flag){
|
||||||
this.$toast(flag)
|
this.$toast(flag)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.form.vehicleType=='拖车' && !this.form.boardType) {
|
if (this.form.vehicleType=='平板拖车' && !this.form.boardType) {
|
||||||
this.$toast('落板方式不能为空')
|
this.$toast('落板方式不能为空')
|
||||||
return
|
return
|
||||||
}else if(this.form.vehicleType !=='拖车'){
|
}else if(this.form.vehicleType !=='平板拖车'){
|
||||||
this.form.boardType=''
|
this.form.boardType=''
|
||||||
}
|
}
|
||||||
let rule=this.validationRules.find(item=>!item.value)
|
let rule = this.validationRules.find(item =>
|
||||||
|
item.value === null ||
|
||||||
|
item.value === undefined ||
|
||||||
|
item.value === ''
|
||||||
|
)
|
||||||
if(rule){
|
if(rule){
|
||||||
this.$toast(rule.name)
|
this.$toast(rule.name)
|
||||||
return
|
return
|
||||||
@ -452,6 +519,18 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
validationRules() {
|
validationRules() {
|
||||||
|
return [
|
||||||
|
{ value: this.form.vehicleType, name: '车辆类型不能为空' },
|
||||||
|
{ value: this.form.emissionStandard, name: '排放标准不能为空' },
|
||||||
|
{ value: this.form.brakeSystem, name: '刹车系统不能为空' },
|
||||||
|
{ value: this.form.areaCode, name: '所在城市不能为空' },
|
||||||
|
{ value: this.form.mileage, name: '行驶里程不能为空' },
|
||||||
|
{ value: this.form.contactNumber, name: '联系方式不能为空' },
|
||||||
|
{ value: this.form.minPrice, name: '售价不能为空' },
|
||||||
|
{ value: this.form.underpanBrand, name: '底盘品牌不能为空' },
|
||||||
|
];
|
||||||
|
},
|
||||||
|
validationRulesSimple() {
|
||||||
return [
|
return [
|
||||||
{ value: this.form.vehicleType, name: '车辆类型不能为空' },
|
{ value: this.form.vehicleType, name: '车辆类型不能为空' },
|
||||||
{ value: this.form.emissionStandard, name: '排放标准不能为空' },
|
{ value: this.form.emissionStandard, name: '排放标准不能为空' },
|
||||||
|
@ -89,6 +89,8 @@ export default {
|
|||||||
this.$emit("delete1");
|
this.$emit("delete1");
|
||||||
} else if (this.text === "车辆45度照") {
|
} else if (this.text === "车辆45度照") {
|
||||||
this.$emit("delete2");
|
this.$emit("delete2");
|
||||||
|
} else if(this.text == '车辆后方45度') {
|
||||||
|
this.$emit("delete4");
|
||||||
} else {
|
} else {
|
||||||
console.log("file, detail", file, detail)
|
console.log("file, detail", file, detail)
|
||||||
this.$emit("delete3", file, detail.index);
|
this.$emit("delete3", file, detail.index);
|
||||||
@ -122,6 +124,8 @@ export default {
|
|||||||
let num = this.getVehicleLicense(result.data.color)
|
let num = this.getVehicleLicense(result.data.color)
|
||||||
let data = {url: res?.data, colorStr: result.data.color, colorStatus: num, plateType: result.data.number}
|
let data = {url: res?.data, colorStr: result.data.color, colorStatus: num, plateType: result.data.number}
|
||||||
this.$emit('success2', data)
|
this.$emit('success2', data)
|
||||||
|
} else if(this.text == '车辆后方45度') {
|
||||||
|
this.$emit('success4', {url: res?.data, uid: file.uid})
|
||||||
} else {
|
} else {
|
||||||
this.$emit('success3', {url: res?.data, uid: file.uid})
|
this.$emit('success3', {url: res?.data, uid: file.uid})
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<van-loading v-show="!detailInfo" class="loadingWrap" type="spinner" color="#1989fa" />
|
<van-loading v-show="!detailInfo" class="loadingWrap" type="spinner" color="#1989fa" />
|
||||||
<div class="contentWrap" v-show="detailInfo">
|
<div class="contentWrap" v-show="detailInfo">
|
||||||
<el-carousel v-if="isWebFunc()" trigger="click" height="215px" :autoplay="false">
|
<el-carousel v-if="isWebFunc()" trigger="click" height="215px" :autoplay="true">
|
||||||
<el-carousel-item v-for="(item,i) in imgSrcList" :key="i">
|
<el-carousel-item v-for="(item,i) in imgSrcList" :key="i">
|
||||||
<img v-if="item" class="swipeImg" :src="item" />
|
<el-image
|
||||||
|
:src="item"
|
||||||
|
v-if="item"
|
||||||
|
:preview-src-list="[item]"
|
||||||
|
class="swipeImg"
|
||||||
|
/>
|
||||||
|
<!-- <img v-if="item" class="swipeImg" :src="item" />-->
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</el-carousel>
|
</el-carousel>
|
||||||
<van-swipe v-else @change="onChange" >
|
<van-swipe v-else @change="onChange" :autoplay="3000">
|
||||||
<van-swipe-item v-for="(item,i) in imgSrcList" :key="i">
|
<van-swipe-item v-for="(item,i) in imgSrcList" :key="i" @click="showImagePreview(i)">
|
||||||
<img v-if="item" class="swipeImg" :src="item" />
|
<img v-if="item" class="swipeImg" :src="item" />
|
||||||
</van-swipe-item>
|
</van-swipe-item>
|
||||||
<template #indicator>
|
<template #indicator>
|
||||||
@ -35,6 +41,7 @@
|
|||||||
<span>{{ detailInfo.createTime?.substring(0,10) }}</span><span>{{ detailInfo.areaName }}</span><span>发布</span>
|
<span>{{ detailInfo.createTime?.substring(0,10) }}</span><span>{{ detailInfo.areaName }}</span><span>发布</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="price">
|
<div class="price">
|
||||||
|
售价(含税):
|
||||||
<span>{{ formatNumber(detailInfo.minPrice) }}</span>
|
<span>{{ formatNumber(detailInfo.minPrice) }}</span>
|
||||||
<span>万</span>
|
<span>万</span>
|
||||||
</div>
|
</div>
|
||||||
@ -51,12 +58,12 @@
|
|||||||
<div class="suGang"></div>
|
<div class="suGang"></div>
|
||||||
<div class="itemInfo">
|
<div class="itemInfo">
|
||||||
<span>{{ detailInfo.vehicleType }}</span>
|
<span>{{ detailInfo.vehicleType }}</span>
|
||||||
<span>拖车类型</span>
|
<span>车辆类型</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="suGang"></div>
|
<div class="suGang"></div>
|
||||||
<div class="itemInfo">
|
<div class="itemInfo">
|
||||||
<span>{{ detailInfo.boardType?.label }} </span>
|
<span>{{ detailInfo.boardType?.label }} </span>
|
||||||
<span>拖车落板</span>
|
<span>落板方式</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descItem descCommon">
|
<div class="descItem descCommon">
|
||||||
@ -71,7 +78,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="suGang"></div>
|
<div class="suGang"></div>
|
||||||
<div class="itemInfo">
|
<div class="itemInfo">
|
||||||
<span>{{ formatToWan(detailInfo.mileage)}}公里</span>
|
<span>{{ detailInfo.brakeSystem == 2 ? '油刹' : '汽刹' }}</span>
|
||||||
|
<span>刹车系统</span>
|
||||||
|
</div>
|
||||||
|
<div class="suGang"></div>
|
||||||
|
<div class="itemInfo">
|
||||||
|
<span>{{ detailInfo.underpanBrand }}</span>
|
||||||
|
<span>底盘品牌</span>
|
||||||
|
</div>
|
||||||
|
<div class="suGang"></div>
|
||||||
|
<div class="itemInfo">
|
||||||
|
<el-tooltip class="item" effect="dark" :content="formatToWan(detailInfo.mileage)+'公里'" placement="top">
|
||||||
|
<span style="display: inline-block;width:100%;cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{ formatToWan(detailInfo.mileage)}}公里</span>
|
||||||
|
</el-tooltip>
|
||||||
<span>行驶公里</span>
|
<span>行驶公里</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -95,15 +114,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import {carInfoDetail,saveRecord} from "@/api/secondHandCar";
|
import {carInfoDetail,saveRecord} from "@/api/secondHandCar";
|
||||||
import { Dialog } from 'vant';
|
import { ImagePreview, Dialog } from 'vant';
|
||||||
export default {
|
export default {
|
||||||
name: "forSale",
|
name: "forSale",
|
||||||
mixins:[myMixins],
|
mixins:[myMixins],
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
show:false,
|
|
||||||
current: 0,
|
current: 0,
|
||||||
noClick:true,
|
noClick:true,
|
||||||
id:'',
|
id:'',
|
||||||
@ -117,8 +136,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
// console.log(" localStorage.setItem('indexActiveTab', this.activeTab);", localStorage.getItem('indexActiveTab'))
|
window.addEventListener('message', (event) => {
|
||||||
// 页面加载时记录进入时间
|
if (event.data === 'dialogClosed') {
|
||||||
|
console.log('Dialog 已关闭');
|
||||||
|
this.getDuration(1)
|
||||||
|
// 执行关闭后的逻辑
|
||||||
|
}
|
||||||
|
});
|
||||||
this.startTime = new Date();
|
this.startTime = new Date();
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
this.id=this.$route.query.id || urlParams.get('id');
|
this.id=this.$route.query.id || urlParams.get('id');
|
||||||
@ -136,42 +160,52 @@ export default {
|
|||||||
if(res.data.otherPhoto){
|
if(res.data.otherPhoto){
|
||||||
this.imgSrcList=res.data.otherPhoto.split(',') || []
|
this.imgSrcList=res.data.otherPhoto.split(',') || []
|
||||||
}
|
}
|
||||||
|
if( res?.data?.vehicleRearPhoto ) {
|
||||||
|
this.imgSrcList.unshift(res?.data?.vehicleRearPhoto)
|
||||||
|
}
|
||||||
this.imgSrcList.unshift(res?.data?.vehicleAnglePhoto)
|
this.imgSrcList.unshift(res?.data?.vehicleAnglePhoto)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.getDuration()
|
this.getDuration(1)
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
showImagePreview(index) {
|
||||||
|
ImagePreview({
|
||||||
|
images: this.imgSrcList.map(item => item),
|
||||||
|
startPosition: index,
|
||||||
|
closeable: true
|
||||||
|
});
|
||||||
|
},
|
||||||
formatToWan(num) {
|
formatToWan(num) {
|
||||||
let result = (num / 10000).toString();
|
let result = (num / 10000).toString(); // 转换为万单位
|
||||||
if (result.includes('.')) {
|
if (result.includes('.')) {
|
||||||
let decimalPart = result.split('.')[1];
|
let decimalPart = result.split('.')[1]; // 获取小数部分
|
||||||
if (decimalPart.length > 2) {
|
if (decimalPart.length > 1) {
|
||||||
result = parseFloat(result).toFixed(2);
|
result = parseFloat(result).toFixed(1); // 保留一位小数
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result + '万';
|
return result + '万';
|
||||||
},
|
},
|
||||||
getDuration(){
|
getDuration(type){
|
||||||
// 页面卸载时记录离开时间并计算浏览时长
|
// 页面卸载时记录离开时间并计算浏览时长
|
||||||
const endTime = new Date();
|
const endTime = new Date();
|
||||||
const duration = (endTime - this.startTime) / 1000; // 计算时长(秒)\
|
const duration = (endTime - this.startTime) / 1000; // 计算时长(秒)\
|
||||||
this.saveRecord(duration);
|
this.saveRecord(duration,type);
|
||||||
},
|
},
|
||||||
async saveRecord(duration){
|
async saveRecord(duration,type){
|
||||||
await saveRecord({type: this.recordType, carInfoId: this.id, duration})
|
await saveRecord({type: type, carInfoId: this.id, duration})
|
||||||
},
|
},
|
||||||
handle(){
|
handle(){
|
||||||
this.show=true
|
this.getDuration(2)
|
||||||
Dialog.alert({
|
Dialog.alert({
|
||||||
message:this.detailInfo.contactNumber ,
|
message:this.detailInfo.contactNumber ,
|
||||||
confirmButtonText:'拨打电话',
|
confirmButtonText:this.isWebFunc() ? '确定' : '拨打电话',
|
||||||
showCancelButton:true,
|
showCancelButton:true,
|
||||||
}).then(async() => {
|
}).then(async() => {
|
||||||
this.recordType=2
|
if(!this.isWebFunc()){
|
||||||
window.location.href = `tel:${this.detailInfo.contactNumber}`;
|
window.location.href = `tel:${this.detailInfo.contactNumber}`;
|
||||||
await this.getDuration()
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// on cancel
|
// on cancel
|
||||||
});
|
});
|
||||||
@ -360,5 +394,25 @@ export default {
|
|||||||
.swipeImg{
|
.swipeImg{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
object-fit: cover; /* 保持比例填充容器,裁剪多余部分 */
|
||||||
|
object-position: center; /* 居中显示 */
|
||||||
}
|
}
|
||||||
|
::v-deep .el-carousel__button {
|
||||||
|
height: 0.15rem !important;
|
||||||
|
width: 0.3rem;
|
||||||
|
}
|
||||||
|
::v-deep .el-carousel__indicators--horizontal {
|
||||||
|
padding: 0.32rem 0.08rem;
|
||||||
|
}
|
||||||
|
::v-deep .el-carousel__arrow {
|
||||||
|
background-color: rgba(31, 45, 61, 1);
|
||||||
|
font-size: 0.5rem;
|
||||||
|
}
|
||||||
|
::v-deep .el-carousel__indicators--horizontal {
|
||||||
|
bottom: 10px;
|
||||||
|
}
|
||||||
|
::v-deep .el-image__inner {
|
||||||
|
object-fit: cover;
|
||||||
|
object-position: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
|
<div class="navBar">
|
||||||
|
<van-nav-bar
|
||||||
|
title="二手拖车信息"
|
||||||
|
left-arrow
|
||||||
|
left-arrow-color="#FFFFFF"
|
||||||
|
:border="false"
|
||||||
|
:fixed="true"
|
||||||
|
:safe-area-inset-top="true"
|
||||||
|
@click-left="goBack"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div class="headerWrap">
|
<div class="headerWrap">
|
||||||
<img class="bg" src="@/assets/secondHandCar/bg.png" />
|
<img class="bg" src="@/assets/secondHandCar/bg.png" />
|
||||||
<img class="mine" src="@/assets/secondHandCar/mine.png" @click="goMine" />
|
<img class="mine" src="@/assets/secondHandCar/mine.png" @click="goMine" />
|
||||||
@ -62,6 +73,14 @@
|
|||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-select v-model="proprietary" placeholder="发布方" :class="{'customSel':true , 'has-value': (proprietary || proprietary === 0) ? true : false }" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in proprietaryOption"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="contentWrap" v-show="!show">
|
<div class="contentWrap" v-show="!show">
|
||||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
||||||
@ -74,6 +93,8 @@
|
|||||||
<div class="contentItem">
|
<div class="contentItem">
|
||||||
<div class="item" v-for="(item,index) in pageList" :key="index" @click="viewCarSource(item)">
|
<div class="item" v-for="(item,index) in pageList" :key="index" @click="viewCarSource(item)">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
|
<img class="owner_logo" v-if="item.proprietary == 1" src="@/assets/secondHandCar/icon_zdOwner.png" alt="">
|
||||||
|
<img class="saled_logo" v-if="item.status.code == 6 && item.downReason == '已售出'" src="@/assets/secondHandCar/icon_saled.png" alt="">
|
||||||
<img class="img" v-if="item.vehicleAnglePhoto" :src="item.vehicleAnglePhoto" />
|
<img class="img" v-if="item.vehicleAnglePhoto" :src="item.vehicleAnglePhoto" />
|
||||||
<div v-else class="qiugou">{{item.vehicleType?.substring(0,2)}}</div>
|
<div v-else class="qiugou">{{item.vehicleType?.substring(0,2)}}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -83,8 +104,9 @@
|
|||||||
{{ item.brandModel?.match(/^[\u4e00-\u9fa5]+/)?.[0]?.replace(/牌$/, '') }} | {{item.emissionStandard?.label}} | {{ formatToWan(item.mileage) }}公里</div>
|
{{ item.brandModel?.match(/^[\u4e00-\u9fa5]+/)?.[0]?.replace(/牌$/, '') }} | {{item.emissionStandard?.label}} | {{ formatToWan(item.mileage) }}公里</div>
|
||||||
<div v-else class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}} {{item.emissionStandard?.label}}</div>
|
<div v-else class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}} {{item.emissionStandard?.label}}</div>
|
||||||
<div class="date" v-show="activeTab==0 && item.registerDate">注册日期: {{item.registerDate?.substring(0,10)}}</div>
|
<div class="date" v-show="activeTab==0 && item.registerDate">注册日期: {{item.registerDate?.substring(0,10)}}</div>
|
||||||
<div v-if="activeTab==0" class="price"><span>¥</span> <span>{{formatNumber(item.minPrice) }}</span> <span>万</span> </div>
|
<div v-if="activeTab==0" class="price">售价(含税):<span>¥</span> <span>{{formatNumber(item.minPrice) }}</span> <span>万</span> </div>
|
||||||
<div v-else class="priceRange">
|
<div v-else class="priceRange">
|
||||||
|
售价(含税):
|
||||||
<span class="num">{{formatNumber(item.minPrice) }}</span> <span class="danwei">万</span>
|
<span class="num">{{formatNumber(item.minPrice) }}</span> <span class="danwei">万</span>
|
||||||
<span class="su">~</span>
|
<span class="su">~</span>
|
||||||
<span class="num">{{formatNumber(item.maxPrice) }}</span> <span class="danwei">万</span>
|
<span class="num">{{formatNumber(item.maxPrice) }}</span> <span class="danwei">万</span>
|
||||||
@ -142,6 +164,10 @@ export default {
|
|||||||
this.setSearchVal();
|
this.setSearchVal();
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
proprietary() {
|
||||||
|
this.setSearchVal();
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
@ -159,6 +185,7 @@ export default {
|
|||||||
priceSort:'',
|
priceSort:'',
|
||||||
emissionStandard:'',
|
emissionStandard:'',
|
||||||
boardType:'',
|
boardType:'',
|
||||||
|
proprietary: '',
|
||||||
licenseTypeOption:[
|
licenseTypeOption:[
|
||||||
{value:2,label:'黄牌'},{value:3,label:'绿牌'},{value:1,label:'蓝牌'},
|
{value:2,label:'黄牌'},{value:3,label:'绿牌'},{value:1,label:'蓝牌'},
|
||||||
],
|
],
|
||||||
@ -169,11 +196,12 @@ export default {
|
|||||||
{value:1,label:'5~6'},{value:2,label:'7~8'},{value:3,label:'8~9'}
|
{value:1,label:'5~6'},{value:2,label:'7~8'},{value:3,label:'8~9'}
|
||||||
],
|
],
|
||||||
emissionStandardOption:[
|
emissionStandardOption:[
|
||||||
{value:1,label:'不限'},{value:4,label:'国四'},{value:5,label:'国五'},{value:6,label:'国六'}
|
{value:1,label:'不限'},{value:3,label:'国三'},{value:4,label:'国四'},{value:5,label:'国五'},{value:6,label:'国六'}
|
||||||
],
|
],
|
||||||
boardTypeOption:[
|
boardTypeOption:[
|
||||||
{value:1,label:'全落地'},{value:2,label:'斜落地'},{value:3,label:'一般斜板'},{value:9,label:'不限'}
|
{value:1,label:'全落地'},{value:2,label:'斜落一体'},{value:3,label:'普通斜板'},{value:9,label:'不限'}
|
||||||
],
|
],
|
||||||
|
proprietaryOption: [{value: 1, label: '中道自营'}, {value: 0, label: '服务商发布'}],
|
||||||
poupShow:false,
|
poupShow:false,
|
||||||
suggestContent:'',
|
suggestContent:'',
|
||||||
}
|
}
|
||||||
@ -196,8 +224,8 @@ export default {
|
|||||||
let result = (num / 10000).toString();
|
let result = (num / 10000).toString();
|
||||||
if (result.includes('.')) {
|
if (result.includes('.')) {
|
||||||
let decimalPart = result.split('.')[1];
|
let decimalPart = result.split('.')[1];
|
||||||
if (decimalPart.length > 2) {
|
if (decimalPart.length > 1) {
|
||||||
result = parseFloat(result).toFixed(2);
|
result = parseFloat(result).toFixed(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result + '万';
|
return result + '万';
|
||||||
@ -243,6 +271,7 @@ export default {
|
|||||||
sessionStorage.setItem('licenseType',String(this.licenseType));
|
sessionStorage.setItem('licenseType',String(this.licenseType));
|
||||||
sessionStorage.setItem('emissionStandard',String(this.emissionStandard));
|
sessionStorage.setItem('emissionStandard',String(this.emissionStandard));
|
||||||
sessionStorage.setItem('boardType',String(this.boardType));
|
sessionStorage.setItem('boardType',String(this.boardType));
|
||||||
|
sessionStorage.setItem('proprietary',String(this.proprietary));
|
||||||
},
|
},
|
||||||
getSearchVal(){
|
getSearchVal(){
|
||||||
this.activeTab = Number(sessionStorage.getItem('indexActiveTab')) || 0;
|
this.activeTab = Number(sessionStorage.getItem('indexActiveTab')) || 0;
|
||||||
@ -252,6 +281,7 @@ export default {
|
|||||||
this.licenseType = Number(sessionStorage.getItem('licenseType')) || '';
|
this.licenseType = Number(sessionStorage.getItem('licenseType')) || '';
|
||||||
this.emissionStandard = Number(sessionStorage.getItem('emissionStandard')) || '';
|
this.emissionStandard = Number(sessionStorage.getItem('emissionStandard')) || '';
|
||||||
this.boardType = Number(sessionStorage.getItem('boardType')) || '';
|
this.boardType = Number(sessionStorage.getItem('boardType')) || '';
|
||||||
|
this.proprietary = Number(sessionStorage.getItem('proprietary')) || '';
|
||||||
},
|
},
|
||||||
goMine(){//我的发布
|
goMine(){//我的发布
|
||||||
this.$router.push({ name: "mineRelease"})
|
this.$router.push({ name: "mineRelease"})
|
||||||
@ -291,6 +321,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
this.pageNum=1
|
this.pageNum=1
|
||||||
|
this.getList()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$toast('刷新成功');
|
this.$toast('刷新成功');
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
@ -308,6 +339,7 @@ export default {
|
|||||||
priceSort:this.priceSort,
|
priceSort:this.priceSort,
|
||||||
boardType:this.boardType,
|
boardType:this.boardType,
|
||||||
emissionStandard:this.emissionStandard,
|
emissionStandard:this.emissionStandard,
|
||||||
|
proprietary: this.proprietary
|
||||||
})
|
})
|
||||||
this.total=res.total
|
this.total=res.total
|
||||||
if(this.pageNum == 1){// 第一页直接赋值
|
if(this.pageNum == 1){// 第一页直接赋值
|
||||||
@ -344,14 +376,18 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.navBar{
|
||||||
|
margin-bottom: 46px;
|
||||||
|
}
|
||||||
.fixImg{
|
.fixImg{
|
||||||
width: 210px;
|
width: 210px;
|
||||||
height: 102px;
|
height: 102px;
|
||||||
position: absolute;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
z-index: 11;
|
z-index: 11;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.headerWrap{
|
.headerWrap{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -413,28 +449,39 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.filterWrap {
|
.filterWrap {
|
||||||
width: 100%;
|
width: calc(100% - 5px);
|
||||||
|
padding-right: 5px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
/*justify-content: space-around;*/
|
||||||
|
overflow-x: auto; /* 允许横向滚动 */
|
||||||
|
white-space: nowrap; /* 防止子元素换行 */
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
-webkit-overflow-scrolling: touch; /* 在iOS上平滑滚动 */
|
||||||
|
scrollbar-width: none; /* Firefox */
|
||||||
|
padding-bottom: 10px;
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
display: none; /* Chrome/Safari */
|
||||||
|
}
|
||||||
.customSel {
|
.customSel {
|
||||||
width: 69px;
|
flex: 0 0 auto; /* 防止子元素被压缩 */
|
||||||
|
width: 80px;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
font-size: 12px;
|
font-size: 10px;
|
||||||
color: #323233;
|
color: #323233;
|
||||||
|
margin-left: 5px;
|
||||||
::v-deep .el-input__inner{
|
::v-deep .el-input__inner{
|
||||||
padding: 0 2px;
|
padding: 0 2px;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
font-size: 12px;
|
font-size: 10px;
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
::v-deep .el-input__icon{
|
::v-deep .el-input__icon{
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
font-size: 12px;
|
font-size: 10px;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
color: #2A5094;
|
color: #2A5094;
|
||||||
}
|
}
|
||||||
@ -470,7 +517,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.contentWrap{
|
.contentWrap{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 80px);
|
height: calc(100% - 126px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background-color: #F2F2F2 ;
|
background-color: #F2F2F2 ;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -485,8 +532,12 @@ export default {
|
|||||||
.item{
|
.item{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.left{
|
.left{
|
||||||
|
width: 115px;
|
||||||
|
height: 77px;
|
||||||
|
position: relative;
|
||||||
.img, .qiugou{
|
.img, .qiugou{
|
||||||
width: 115px;
|
width: 115px;
|
||||||
height: 77px;
|
height: 77px;
|
||||||
@ -501,6 +552,24 @@ export default {
|
|||||||
letter-spacing: 5px;
|
letter-spacing: 5px;
|
||||||
background-color: #6C81CD;
|
background-color: #6C81CD;
|
||||||
}
|
}
|
||||||
|
.img {
|
||||||
|
object-fit: cover; /* 保持比例填充容器,裁剪多余部分 */
|
||||||
|
object-position: center; /* 居中显示 */
|
||||||
|
}
|
||||||
|
.owner_logo {
|
||||||
|
width: 60px;
|
||||||
|
height: 23px;
|
||||||
|
position: absolute;
|
||||||
|
left: -4px;
|
||||||
|
top: -3px;
|
||||||
|
}
|
||||||
|
.saled_logo {
|
||||||
|
width: 76px;
|
||||||
|
height: 48px;
|
||||||
|
position: absolute;
|
||||||
|
left: 24px;
|
||||||
|
top: 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.right{
|
.right{
|
||||||
.title{
|
.title{
|
||||||
|
@ -34,19 +34,15 @@
|
|||||||
<span>{{item.vehicleType}}</span>
|
<span>{{item.vehicleType}}</span>
|
||||||
<img class="titleImg" :src="getStatus(item.status?.code)" />
|
<img class="titleImg" :src="getStatus(item.status?.code)" />
|
||||||
</div>
|
</div>
|
||||||
<!--
|
|
||||||
<div v-if="activeTab==0" class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}} {{ item.licenseType?.label }} |
|
|
||||||
{{ item.brandModel?.match(/^[\u4e00-\u9fa5]+/)?.[0]?.replace(/牌$/, '') }} | {{item.emissionStandard?.label}} | {{ formatToWan(item.mileage) }}公里</div>
|
|
||||||
<div v-else class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}} {{item.emissionStandard?.label}}</div>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<div v-if="activeTab==0" class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}} {{ item.licenseType?.label }} |
|
<div v-if="activeTab==0" class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}} {{ item.licenseType?.label }} |
|
||||||
{{ item.mileage }}km | {{item.emissionStandard?.label}}</div>
|
{{ item.mileage }}km | {{item.emissionStandard?.label}}</div>
|
||||||
|
|
||||||
<div v-else class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}}
|
<div v-else class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}}
|
||||||
{{item.vehicleType }} | {{item.emissionStandard?.label}}</div>
|
{{item.vehicleType }} | {{item.emissionStandard?.label}}</div>
|
||||||
<div v-if="item.type==1" class="price"><span>{{formatNumber(item.minPrice) }}</span> <span>万</span> </div>
|
<div v-if="item.type==1" class="price">售价(含税):<span>{{formatNumber(item.minPrice) }}</span> <span>万</span> </div>
|
||||||
<div v-else class="priceRange">
|
<div v-else class="priceRange">
|
||||||
|
售价(含税):
|
||||||
<span class="num">{{formatNumber(item.minPrice) }}</span> <span class="danwei">万</span>
|
<span class="num">{{formatNumber(item.minPrice) }}</span> <span class="danwei">万</span>
|
||||||
<span class="su">~</span>
|
<span class="su">~</span>
|
||||||
<span class="num">{{formatNumber(item.maxPrice) }}</span> <span class="danwei">万</span>
|
<span class="num">{{formatNumber(item.maxPrice) }}</span> <span class="danwei">万</span>
|
||||||
@ -333,6 +329,8 @@ export default {
|
|||||||
height: 77px;
|
height: 77px;
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
object-fit: cover;
|
||||||
|
object-position: center;
|
||||||
}
|
}
|
||||||
.smallImg{
|
.smallImg{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<span> <span class="star">*</span>求购类型 </span>
|
<span> <span class="star">*</span>求购类型 </span>
|
||||||
<div class="radioWrap">
|
<div class="radioWrap">
|
||||||
<van-radio-group v-model="form.vehicleType" direction="horizontal">
|
<van-radio-group v-model="form.vehicleType" direction="horizontal">
|
||||||
<van-radio name="拖车" :class="{'checked':form.vehicleType=='拖车','vehicleRadio':true}">拖车</van-radio>
|
<van-radio name="拖车" :class="{'checked':form.vehicleType=='拖车','vehicleRadio':true}">平板拖车</van-radio>
|
||||||
<van-radio name="地库车" :class="{'checked':form.vehicleType=='地库车','vehicleRadio':true}">地库车</van-radio>
|
<van-radio name="地库车" :class="{'checked':form.vehicleType=='地库车','vehicleRadio':true}">地库车</van-radio>
|
||||||
<van-radio name="牵引车" :class="{'checked':form.vehicleType=='牵引车','vehicleRadio':true}">牵引车</van-radio>
|
<van-radio name="牵引车" :class="{'checked':form.vehicleType=='牵引车','vehicleRadio':true}">牵引车</van-radio>
|
||||||
<van-radio name="随车吊" :class="{'checked':form.vehicleType=='随车吊','vehicleRadio':true}">随车吊</van-radio>
|
<van-radio name="随车吊" :class="{'checked':form.vehicleType=='随车吊','vehicleRadio':true}">随车吊</van-radio>
|
||||||
@ -41,18 +41,19 @@
|
|||||||
<span> <span class="star">*</span>落板方式 </span>
|
<span> <span class="star">*</span>落板方式 </span>
|
||||||
<van-radio-group v-model="form.boardType" direction="horizontal" class="radioWrap">
|
<van-radio-group v-model="form.boardType" direction="horizontal" class="radioWrap">
|
||||||
<van-radio name="1" :class="{'checked':form.boardType==1}">全落地</van-radio>
|
<van-radio name="1" :class="{'checked':form.boardType==1}">全落地</van-radio>
|
||||||
<van-radio name="2" :class="{'checked':form.boardType==2}">斜落地</van-radio>
|
<van-radio name="2" :class="{'checked':form.boardType==2}">斜落一体</van-radio>
|
||||||
<van-radio name="3" :class="{'checked':form.boardType==3}">一般平板</van-radio>
|
<van-radio name="3" :class="{'checked':form.boardType==3}">普通斜板</van-radio>
|
||||||
<van-radio name="9" :class="{'checked':form.boardType==9}">不限</van-radio>
|
<van-radio name="9" :class="{'checked':form.boardType==9}">不限</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" >
|
<div class="item vehicleTypeItem" >
|
||||||
<span> <span class="star">*</span>排放标准 </span>
|
<span> <span class="star">*</span>排放标准 </span>
|
||||||
<van-radio-group v-model="form.emissionStandard" direction="horizontal" class="radioWrap">
|
<van-radio-group v-model="form.emissionStandard" direction="horizontal" class="radioWrap" style="padding-top: 5px">
|
||||||
<van-radio name="4" :class="{'checked':form.emissionStandard==4}">国4</van-radio>
|
<van-radio name="3" :class="{'checked':form.emissionStandard==3,'vehicleRadio':true}">国3</van-radio>
|
||||||
<van-radio name="5" :class="{'checked':form.emissionStandard==5}">国5</van-radio>
|
<van-radio name="4" :class="{'checked':form.emissionStandard==4,'vehicleRadio':true}">国4</van-radio>
|
||||||
<van-radio name="6" :class="{'checked':form.emissionStandard==6}">国6</van-radio>
|
<van-radio name="5" :class="{'checked':form.emissionStandard==5,'vehicleRadio':true}">国5</van-radio>
|
||||||
<van-radio name="1" :class="{'checked':form.emissionStandard==1}">不限</van-radio>
|
<van-radio name="6" :class="{'checked':form.emissionStandard==6,'vehicleRadio':true}">国6</van-radio>
|
||||||
|
<van-radio name="1" :class="{'checked':form.emissionStandard==1,'vehicleRadio':true}">不限</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
@ -68,12 +69,12 @@
|
|||||||
<div class="item priceItem">
|
<div class="item priceItem">
|
||||||
<span> <span class="star">*</span>价格区间 </span>
|
<span> <span class="star">*</span>价格区间 </span>
|
||||||
<div style="display: flex;align-items: center" class="price">
|
<div style="display: flex;align-items: center" class="price">
|
||||||
<el-input type="tel" v-model.number="form.minPrice" >
|
<el-input type="tel" v-model.number="form.minPrice" @input="validatePrice">
|
||||||
<template slot="suffix" >元
|
<template slot="suffix" >元
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span style="font-size: 14px;color: rgba(44, 61, 84, 0.59);margin: 0 6px">-</span>
|
<span style="font-size: 14px;color: rgba(44, 61, 84, 0.59);margin: 0 6px">-</span>
|
||||||
<el-input type="tel" v-model.number="form.maxPrice" >
|
<el-input type="tel" v-model.number="form.maxPrice" @input="validatePrice1">
|
||||||
<template slot="suffix" >元
|
<template slot="suffix" >元
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -92,7 +93,7 @@
|
|||||||
<img v-show="radio==1" @click="radio=0" class="radioIcon" src="@/assets/secondHandCar/checked.png" />
|
<img v-show="radio==1" @click="radio=0" class="radioIcon" src="@/assets/secondHandCar/checked.png" />
|
||||||
<img v-show="radio==0" @click="radio=1" class="radioIcon" src="@/assets/secondHandCar/uncheck.png" />
|
<img v-show="radio==0" @click="radio=1" class="radioIcon" src="@/assets/secondHandCar/uncheck.png" />
|
||||||
<span>我已阅读并同意</span>
|
<span>我已阅读并同意</span>
|
||||||
<span @click="viewPrivacy">《二手车交易条款》</span>
|
<span @click="viewPrivacy">《二手拖车交易条款》</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnWrap" >
|
<div class="btnWrap" >
|
||||||
<div v-if="type==1" class="btn commonBtn" @click="noMultipleClicks(submitHandle)">发布</div>
|
<div v-if="type==1" class="btn commonBtn" @click="noMultipleClicks(submitHandle)">发布</div>
|
||||||
@ -171,6 +172,20 @@ export default {
|
|||||||
this.ortherReason=wantBuyFormInfo.ortherReason
|
this.ortherReason=wantBuyFormInfo.ortherReason
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
validatePrice(value) {
|
||||||
|
if (value?.startsWith(0) && value?.length > 1) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.minPrice = 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
validatePrice1(value) {
|
||||||
|
if (value?.startsWith(0) && value?.length > 1) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.maxPrice = 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
clearStorageFormInfo(){
|
clearStorageFormInfo(){
|
||||||
localStorage.setItem("wantBuyFormInfo",'')
|
localStorage.setItem("wantBuyFormInfo",'')
|
||||||
},
|
},
|
||||||
@ -205,7 +220,11 @@ export default {
|
|||||||
}else if(this.form.vehicleType !=='拖车'){
|
}else if(this.form.vehicleType !=='拖车'){
|
||||||
this.form.boardType=''
|
this.form.boardType=''
|
||||||
}
|
}
|
||||||
let rule=this.validationRules.find(item=>!item.value)
|
let rule = this.validationRules.find(item =>
|
||||||
|
item.value === null ||
|
||||||
|
item.value === undefined ||
|
||||||
|
item.value === ''
|
||||||
|
)
|
||||||
if(rule){
|
if(rule){
|
||||||
this.$toast(rule.name)
|
this.$toast(rule.name)
|
||||||
return
|
return
|
||||||
@ -247,7 +266,11 @@ export default {
|
|||||||
}else if(this.form.vehicleType !=='拖车'){
|
}else if(this.form.vehicleType !=='拖车'){
|
||||||
this.form.boardType=''
|
this.form.boardType=''
|
||||||
}
|
}
|
||||||
let rule=this.validationRules.find(item=>!item.value)
|
let rule = this.validationRules.find(item =>
|
||||||
|
item.value === null ||
|
||||||
|
item.value === undefined ||
|
||||||
|
item.value === ''
|
||||||
|
)
|
||||||
if(rule){
|
if(rule){
|
||||||
this.$toast(rule.name)
|
this.$toast(rule.name)
|
||||||
return
|
return
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<span>{{ detailInfo.createTime?.substring(0,10) }}</span><span>发布</span>
|
<span>{{ detailInfo.createTime?.substring(0,10) }}</span><span>发布</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="price">
|
<div class="price">
|
||||||
|
售价(含税):
|
||||||
<span class="num">{{formatNumber(detailInfo.minPrice) }}</span> <span class="danwei">万</span>
|
<span class="num">{{formatNumber(detailInfo.minPrice) }}</span> <span class="danwei">万</span>
|
||||||
<span class="su">~</span>
|
<span class="su">~</span>
|
||||||
<span class="num">{{formatNumber(detailInfo.maxPrice) }}</span> <span class="danwei">万</span>
|
<span class="num">{{formatNumber(detailInfo.maxPrice) }}</span> <span class="danwei">万</span>
|
||||||
@ -29,12 +30,12 @@
|
|||||||
<el-tooltip class="item" effect="dark" :content="detailInfo.vehicleType" placement="top">
|
<el-tooltip class="item" effect="dark" :content="detailInfo.vehicleType" placement="top">
|
||||||
<span style="cursor: pointer">{{ detailInfo.vehicleType }}</span>
|
<span style="cursor: pointer">{{ detailInfo.vehicleType }}</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<span>拖车类型</span>
|
<span>车辆类型</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="suGang"></div>
|
<div class="suGang"></div>
|
||||||
<div class="itemInfo">
|
<div class="itemInfo">
|
||||||
<span>{{ detailInfo.boardType?.label }} </span>
|
<span>{{ detailInfo.boardType?.label }} </span>
|
||||||
<span>拖车落板</span>
|
<span>落板方式</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="suGang"></div>
|
<div class="suGang"></div>
|
||||||
<div class="itemInfo">
|
<div class="itemInfo">
|
||||||
@ -67,12 +68,16 @@ export default {
|
|||||||
detailInfo:'',
|
detailInfo:'',
|
||||||
duration:'',
|
duration:'',
|
||||||
startTime: null, // 记录进入时间
|
startTime: null, // 记录进入时间
|
||||||
recordType:1,
|
|
||||||
isList:false,
|
isList:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
// 页面加载时记录进入时间
|
window.addEventListener('message', (event) => {
|
||||||
|
if (event.data === 'dialogClosed') {
|
||||||
|
console.log('Dialog 已关闭');
|
||||||
|
this.getDuration(1)
|
||||||
|
}
|
||||||
|
});
|
||||||
this.startTime = new Date();
|
this.startTime = new Date();
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
this.id=this.$route.query.id || urlParams.get('id');
|
this.id=this.$route.query.id || urlParams.get('id');
|
||||||
@ -87,26 +92,27 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.getDuration()
|
this.getDuration(1)
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getDuration(){
|
getDuration(type){
|
||||||
const endTime = new Date();
|
const endTime = new Date();
|
||||||
const duration = (endTime - this.startTime) / 1000; // 计算时长(秒)
|
const duration = (endTime - this.startTime) / 1000; // 计算时长(秒)
|
||||||
this.saveRecord(duration);
|
this.saveRecord(duration,type);
|
||||||
},
|
},
|
||||||
async saveRecord(duration){
|
async saveRecord(duration,type){
|
||||||
await saveRecord({type:this.recordType,carInfoId:this.id,duration})
|
await saveRecord({type:type,carInfoId:this.id,duration})
|
||||||
},
|
},
|
||||||
handle(){
|
handle(){
|
||||||
|
this.getDuration(2)
|
||||||
Dialog.alert({
|
Dialog.alert({
|
||||||
message:this.detailInfo.contactNumber ,
|
message:this.detailInfo.contactNumber ,
|
||||||
confirmButtonText:'拨打电话',
|
confirmButtonText:this.isWebFunc() ? '确定' : '拨打电话',
|
||||||
showCancelButton:true,
|
showCancelButton:true,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.recordType=2
|
if(!this.isWebFunc()){
|
||||||
this.getDuration()
|
|
||||||
window.location.href = `tel:${this.detailInfo.contactNumber}`;
|
window.location.href = `tel:${this.detailInfo.contactNumber}`;
|
||||||
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// on cancel
|
// on cancel
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user