二手车交易,全部接口对接
This commit is contained in:
@ -17,9 +17,12 @@
|
||||
<div class="oneContent content">
|
||||
<img class="sort" src="@/assets/secondHandCar/one_cheyuan.png" />
|
||||
<div class="uploadWrap">
|
||||
<upload-common style="margin-right:4px" @success1="getDrivingLicense" :text="'行驶证照片'" :multiple="false" />
|
||||
<upload-common style="margin-right: 4px" @success2="getPlateColor" :text="'车辆45度照'" :multiple="false" />
|
||||
<upload-common @success3="getOtherImg" :text="'其他照片0/6'" :multiple="true" />
|
||||
<upload-common @success1="getDrivingLicense" @delete1="deleteImg1"
|
||||
:text="'行驶证照片'" :multiple="false" :files.sync="vehicleLicensePhotoList"/>
|
||||
<upload-common @success2="getPlateColor" @delete2="deleteImg2"
|
||||
:text="'车辆45度照'" :multiple="false" :files.sync="vehicleAnglePhotoList" />
|
||||
<upload-common @success3="getOtherImg" @delete3="handleDeleteOtherImg"
|
||||
:text="'其他照片0/6'" :multiple="true" :files.sync="otherImgSrcList"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
@ -106,6 +109,9 @@
|
||||
<img class="sort" src="@/assets/secondHandCar/three.png" />
|
||||
<el-input class="ipt" v-model.trim="form.desc" type="textarea" :autosize="{ minRows: 6, maxRows: 6 }"
|
||||
maxlength="500" show-word-limit placeholder="描述车辆信息:如事故、额外加装、无线遥控"></el-input>
|
||||
<div v-if="type==2" style="margin: 10px 3px">不通过原因</div>
|
||||
<el-input v-if="type==2" class="ipt" v-model.trim="auditReason" type="textarea" :autosize="{ minRows: 2, maxRows: 6 }"
|
||||
maxlength="200" show-word-limit placeholder="请填写不通过原因"></el-input>
|
||||
<div class="checkedWrap" v-if="type==1">
|
||||
<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" />
|
||||
@ -126,7 +132,7 @@
|
||||
closeable
|
||||
position="bottom"
|
||||
>
|
||||
<van-area title="标题" :area-list="areaList" closeable="true"
|
||||
<van-area title="标题" :area-list="areaList" closeable="true" :value="form.areaCode ? String(form.areaCode) : ''"
|
||||
@cancel="areaShow = false" @confirm="confirmHandle"/>
|
||||
</van-popup>
|
||||
</div>
|
||||
@ -164,9 +170,8 @@ export default {
|
||||
maxPrice:'',
|
||||
desc:'',
|
||||
},
|
||||
price:'',
|
||||
radio: 0,
|
||||
type:'',//1为发布 2为审核
|
||||
type:'',//1为发布&修改 2为审核
|
||||
areaList: areaList,
|
||||
areaShow:false,
|
||||
areaName:'',
|
||||
@ -176,13 +181,16 @@ export default {
|
||||
auditRemark:'',
|
||||
auditReason:'',
|
||||
queryType:'',
|
||||
vehicleLicensePhotoList:[],
|
||||
vehicleAnglePhotoList:[],
|
||||
otherImgSrcList:[],
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.type=this.$route.query.type || urlParams.get('type');
|
||||
this.id=this.$route.query.id
|
||||
this.queryType=this.$route.query.queryType
|
||||
this.id=this.$route.query.id || urlParams.get('id');
|
||||
this.queryType=this.$route.query.queryType || urlParams.get('queryType');
|
||||
if( this.id){
|
||||
let res = await carInfoDetail({
|
||||
id:this.id,
|
||||
@ -194,8 +202,11 @@ export default {
|
||||
this.form.emissionStandard=res.data.emissionStandard?.code
|
||||
this.auditRemark=res.data?.auditRemark
|
||||
this.areaName=res.data?.areaName
|
||||
this.otherImgSrc=res.data?.otherPhoto?.split(',')
|
||||
this.otherImgSrc?.map(item=>this.otherImgSrcList.push({url:item}))
|
||||
this.vehicleLicensePhotoList=[{url:res.data?.vehicleLicensePhoto}]
|
||||
this.vehicleAnglePhotoList=[{url:res.data?.vehicleAnglePhoto}]
|
||||
}
|
||||
console.log("---",this.type,this.form)
|
||||
},
|
||||
methods:{
|
||||
confirmHandle(val){
|
||||
@ -218,15 +229,26 @@ export default {
|
||||
this.form.registerDate=data.info.registerDate +' 00:00:00'
|
||||
this.form.vehicleType=data.info.vehicleType
|
||||
},
|
||||
deleteImg1(){
|
||||
this.form.vehicleLicensePhoto=''
|
||||
},
|
||||
getPlateColor(data){
|
||||
console.log("getPlateColor",data)
|
||||
this.form.vehicleAnglePhoto=data.url
|
||||
this.form.licenseType=data.colorStatus
|
||||
this.form.vehicleFrontLicensePlate=data.plateType
|
||||
},
|
||||
deleteImg2(){
|
||||
this.form.vehicleAnglePhoto=''
|
||||
},
|
||||
getOtherImg(data){
|
||||
this.otherImgSrc.push(data)
|
||||
console.log("getOtherImg",data)
|
||||
this.otherImgSrc.push(data.url)
|
||||
},
|
||||
handleDeleteOtherImg(file,index) {
|
||||
// this.otherImgSrc = this.otherImgSrc.filter((item) => item !== file.url);
|
||||
this.otherImgSrc = this.otherImgSrc.filter((item,i) => index !== i);
|
||||
this.otherImgSrcList = this.otherImgSrcList.filter((item,i) => index !== i);
|
||||
console.log("删除后的 otherImgSrc", this.otherImgSrc,this.otherImgSrcList);
|
||||
},
|
||||
// 审核操作
|
||||
async auditHandle(type){
|
||||
|
Reference in New Issue
Block a user