diff --git a/src/api/secondHandCar.js b/src/api/secondHandCar.js
index 5fc7d32e..2344c421 100644
--- a/src/api/secondHandCar.js
+++ b/src/api/secondHandCar.js
@@ -82,7 +82,15 @@ export function auditCarInfo(data){
return request({
url: '/toc-user/car-admin/auditCarInfo',
method:'POST',
- // contentType: 'application/json',
+ data
+ })
+}
+// 保存信息记录
+export function saveRecord(data){
+ return request({
+ url: '/toc-user/car-record/saveRecord',
+ method:'POST',
+ contentType: 'application/json',
data
})
}
\ No newline at end of file
diff --git a/src/utils/myMixins.js b/src/utils/myMixins.js
index 4e6fa26b..1261d761 100644
--- a/src/utils/myMixins.js
+++ b/src/utils/myMixins.js
@@ -77,6 +77,15 @@ export const myMixins = {
} else {
// 这里是重复点击的判断
}
+ },
+ formatNumber(num) {
+ if (num < 10000) {
+ // 小于 5 位数,显示为 0.x 万
+ return `${(num / 10000).toFixed(1)}`;
+ } else {
+ // 大于或等于 5 位数,显示为 x 万,四舍五入到小数点后一位
+ return `${Math.round(num / 1000) / 10}`;
+ }
}
}
}
diff --git a/src/views/secondHandCar/carSource.vue b/src/views/secondHandCar/carSource.vue
index 1ab6f271..cb1355ed 100644
--- a/src/views/secondHandCar/carSource.vue
+++ b/src/views/secondHandCar/carSource.vue
@@ -17,9 +17,12 @@
-
-
-
+
+
+
@@ -106,6 +109,9 @@
+ 不通过原因
+

@@ -126,7 +132,7 @@
closeable
position="bottom"
>
-
@@ -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){
diff --git a/src/views/secondHandCar/components/upload-common.vue b/src/views/secondHandCar/components/upload-common.vue
index e3d1b05e..9e4c6607 100644
--- a/src/views/secondHandCar/components/upload-common.vue
+++ b/src/views/secondHandCar/components/upload-common.vue
@@ -1,108 +1,159 @@
-
-
-
-

-
{{ text }}
-
-
-
+
+
+

+
{{ displayText }}
+
+
+ {{ index + 1 }}/6
+
+
\ No newline at end of file
diff --git a/src/views/secondHandCar/forSale.vue b/src/views/secondHandCar/forSale.vue
index b0b9eeea..4fa0569b 100644
--- a/src/views/secondHandCar/forSale.vue
+++ b/src/views/secondHandCar/forSale.vue
@@ -31,7 +31,7 @@
{{ detailInfo.createTime?.substring(0,10) }}{{ detailInfo.areaName }}发布
- {{ detailInfo.maxPrice / 10000 }}
+ {{ formatNumber(detailInfo.maxPrice) }}
万
@@ -92,7 +92,7 @@