story#5314 二手车系统的优化需求 需要UI和接口的修改

This commit is contained in:
2025-04-07 16:07:02 +08:00
parent 7b7e926f8a
commit 5de1efc5fb
6 changed files with 100 additions and 14 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -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,13 +42,13 @@
<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>
@ -63,6 +65,13 @@
<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
@ -99,10 +108,9 @@
> </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="validatePrice"
@ -113,6 +121,16 @@
</template> </template>
</van-field> </van-field>
</div> </div>
<div class="item">
<span> <span class="star">*</span>底盘品牌</span>
<van-field
style="border: none"
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">
@ -163,6 +181,7 @@ export default {
type:1, type:1,
vehicleLicensePhoto:'', vehicleLicensePhoto:'',
vehicleAnglePhoto:'', vehicleAnglePhoto:'',
vehicleRearPhoto: '',
otherPhoto:'', otherPhoto:'',
licenseType:'', licenseType:'',
brandModel:'', brandModel:'',
@ -178,6 +197,8 @@ export default {
contactNumber:'', contactNumber:'',
minPrice:'', minPrice:'',
desc:'', desc:'',
underpanBrand: '',
brakeSystem: '',
}, },
radio: 0, radio: 0,
type:'',//1为发布&修改 2为审核 type:'',//1为发布&修改 2为审核
@ -191,6 +212,7 @@ export default {
areaName:'', areaName:'',
vehicleLicensePhotoList:[], vehicleLicensePhotoList:[],
vehicleAnglePhotoList:[], vehicleAnglePhotoList:[],
vehicleRearPhotoList: [],
otherImgSrcList:[], otherImgSrcList:[],
otherImgSrc:[], otherImgSrc:[],
status:'', status:'',
@ -225,6 +247,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){
@ -242,6 +265,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){
@ -319,7 +345,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=''
@ -336,6 +362,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);
@ -354,15 +387,19 @@ 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 => let rule = this.validationRules.find(item =>
@ -404,15 +441,19 @@ 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 => let rule = this.validationRules.find(item =>
@ -472,10 +513,12 @@ export default {
return [ return [
{ value: this.form.vehicleType, name: '车辆类型不能为空' }, { value: this.form.vehicleType, name: '车辆类型不能为空' },
{ value: this.form.emissionStandard, name: '排放标准不能为空' }, { value: this.form.emissionStandard, name: '排放标准不能为空' },
{ value: this.form.brakeSystem, name: '刹车系统不能为空' },
{ value: this.form.areaCode, name: '所在城市不能为空' }, { value: this.form.areaCode, name: '所在城市不能为空' },
{ value: this.form.mileage, name: '行驶里程不能为空' }, { value: this.form.mileage, name: '行驶里程不能为空' },
{ value: this.form.contactNumber, name: '联系方式不能为空' }, { value: this.form.contactNumber, name: '联系方式不能为空' },
{ value: this.form.minPrice, name: '售价不能为空' }, { value: this.form.minPrice, name: '售价不能为空' },
{ value: this.form.underpanBrand, name: '底盘品牌不能为空' },
]; ];
}, },
}, },

View File

@ -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})
} }

View File

@ -150,6 +150,9 @@ 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)
} }
}, },

View File

@ -73,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">
@ -85,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>
@ -154,6 +164,10 @@ export default {
this.setSearchVal(); this.setSearchVal();
this.getList() this.getList()
}, },
proprietary() {
this.setSearchVal();
this.getList()
}
}, },
data(){ data(){
return{ return{
@ -171,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:'蓝牌'},
], ],
@ -186,6 +201,7 @@ export default {
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:'',
} }
@ -255,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;
@ -264,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"})
@ -320,6 +338,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){// 第一页直接赋值
@ -434,23 +453,23 @@ export default {
justify-content: space-around; justify-content: space-around;
padding-bottom: 10px; padding-bottom: 10px;
.customSel { .customSel {
width: 69px; width: 60px;
height: 25px; height: 25px;
background: #F5F5F5; background: #F5F5F5;
border-radius: 4px; border-radius: 4px;
font-size: 12px; font-size: 10px;
color: #323233; color: #323233;
::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;
} }
@ -504,6 +523,9 @@ export default {
cursor: pointer; cursor: pointer;
} }
.left{ .left{
width: 115px;
height: 77px;
position: relative;
.img, .qiugou{ .img, .qiugou{
width: 115px; width: 115px;
height: 77px; height: 77px;
@ -522,6 +544,20 @@ export default {
object-fit: cover; /* 保持比例填充容器,裁剪多余部分 */ object-fit: cover; /* 保持比例填充容器,裁剪多余部分 */
object-position: center; /* 居中显示 */ 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{