story#6932,售出信息,区分三种状态显示及按钮对应逻辑

This commit is contained in:
2025-07-30 10:26:13 +08:00
parent 8b35675abc
commit 1d8fd78a2b
4 changed files with 239 additions and 148 deletions

View File

@ -268,7 +268,6 @@ export default {
if( this.form.vehicleRearPhoto ) { if( this.form.vehicleRearPhoto ) {
this.vehicleRearPhotoList = [{url: this.form.vehicleRearPhoto}] this.vehicleRearPhotoList = [{url: this.form.vehicleRearPhoto}]
} }
// console.log("carSourceFormInfo",carSourceFormInfo)
if(carSourceFormInfo.otherImgSrc0){ if(carSourceFormInfo.otherImgSrc0){
this.otherImgSrc.push(carSourceFormInfo.otherImgSrc0) this.otherImgSrc.push(carSourceFormInfo.otherImgSrc0)
this.otherImgSrcList.push({url:carSourceFormInfo.otherImgSrc0}) this.otherImgSrcList.push({url:carSourceFormInfo.otherImgSrc0})
@ -293,7 +292,6 @@ export default {
this.otherImgSrc.push(carSourceFormInfo.otherImgSrc5) this.otherImgSrc.push(carSourceFormInfo.otherImgSrc5)
this.otherImgSrcList.push({url:carSourceFormInfo.otherImgSrc5}) this.otherImgSrcList.push({url:carSourceFormInfo.otherImgSrc5})
} }
// console.log("--",this.vehicleLicensePhotoList,this.vehicleAnglePhotoList,this.otherImgSrcList)
}, },
methods:{ methods:{
validatePrice(value) { validatePrice(value) {
@ -480,21 +478,6 @@ export default {
otherPhoto:this.otherImgSrc?.join(',') otherPhoto:this.otherImgSrc?.join(',')
}) })
this.clearStorageFormInfo() this.clearStorageFormInfo()
if(res.code == 200 && !res.msg){
this.$toast('发布成功')
if(this.isWebFunc()){
setTimeout(()=>{
this.closeParentDialog()
},1000)
}else{
setTimeout(()=>{
this.$router.push({ name: "mineRelease"})
sessionStorage.setItem('mineActiveTab',String(1) )
},1000)
}
}else{
this.$toast(res.msg)
}
console.log("车源发布publishCarInfo",res) console.log("车源发布publishCarInfo",res)
} catch (e){ } catch (e){
console.log('e',e) console.log('e',e)
@ -605,7 +588,6 @@ export default {
} }
.navBar{ .navBar{
margin-bottom: 46px; margin-bottom: 46px;
} }
.noContentAudit{ .noContentAudit{
height: calc(100% - 42px); height: calc(100% - 42px);

View File

@ -8,6 +8,7 @@
:preview-full-image="false" :preview-full-image="false"
:max-count="multiple ? 6 : 1" :max-count="multiple ? 6 : 1"
@click-preview="handlePreviewClick" @click-preview="handlePreviewClick"
:deletable="showDel"
> >
<div class="upload"> <div class="upload">
<img class="icon" src="@/assets/secondHandCar/upload.png"/> <img class="icon" src="@/assets/secondHandCar/upload.png"/>
@ -36,6 +37,10 @@ export default {
files: { files: {
type: Array, type: Array,
default: () => [] default: () => []
},
showDel:{
type: Boolean,
default: true
} }
}, },
data() { data() {

View File

@ -162,10 +162,8 @@ export default {
return return
} }
if(this.xiajiaInfo?.type==1 && this.radio==1){ if(this.xiajiaInfo?.type==1 && this.radio==1){
console.log("111")
this.poupShow=false this.poupShow=false
this.$router.push({ name: "sellingInfo", query: {id:this.xiajiaInfo.id }}) this.$router.push({ name: "sellingInfo", query: {id:this.xiajiaInfo.id,type:'revise'}})
}else{ }else{
await usedCarRemove({ await usedCarRemove({
id:this.xiajiaInfo.id, id:this.xiajiaInfo.id,
@ -182,9 +180,6 @@ export default {
query: { type:1 ,id:item.id,queryType:3,homePage:false}, query: { type:1 ,id:item.id,queryType:3,homePage:false},
}) })
}, },
reviseXiajiaHandle(item){//修改下架
console.log("修改下架",item)
},
async polishHandle(item){//檫亮 async polishHandle(item){//檫亮
try { try {
await usedCarPolish(item.id) await usedCarPolish(item.id)
@ -204,8 +199,13 @@ export default {
console.log('reShangJiaHandle',e) console.log('reShangJiaHandle',e)
} }
}, },
reviseXiajiaHandle(item){//修改下架
console.log("修改下架",item)
this.$router.push({ name: "sellingInfo", query: {id:item.id,type:'revise'}})
},
viewXiajiaHandle(item){//查看下架 viewXiajiaHandle(item){//查看下架
console.log("item",item) console.log("查看下架",item)
this.$router.push({ name: "sellingInfo", query: {id:item.id,type:'view'}})
}, },
xiajiaHandle(item){//下架 xiajiaHandle(item){//下架
this.poupShow=true this.poupShow=true

View File

@ -2,18 +2,22 @@
<div class="wrap" > <div class="wrap" >
<div class="headerWrap"> <div class="headerWrap">
<img class="bg" src="@/assets/secondHandCar/bg.png" /> <img class="bg" src="@/assets/secondHandCar/bg.png" />
<div class="nav"> <div class="navWrap">
<img class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" /> <div v-if="isWebFunc()" style="opacity: 0;" class="back"></div>
<span>售出信息</span> <img v-else class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" />
<span class="title">售出信息</span>
<div style="opacity: 0;" class="back"></div> <div style="opacity: 0;" class="back"></div>
</div> </div>
<div class="audit" v-if="status==9 && auditRemark">
<span><img class="noAudit" src="@/assets/secondHandCar/noAudit.png" />审核不通过</span>
<span>{{auditRemark }}</span>
</div> </div>
<div class="contentWrap"> </div>
<div> <div class="contentWrap" :class="[!(status==9 && auditRemark) ? 'noReasonWrap': 'hasReasonWrap']">
<div class="twoContent content"> <div class="content">
<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.salesChannel" direction="horizontal" class="radioWrap"> <van-radio-group v-model="form.salesChannel" direction="horizontal" class="radioWrap" :disabled="type !== 'revise'">
<van-radio name="1" :class="{'checked':form.salesChannel==1,'salesChannelRadio':true,'radio':true}">中道二手拖车</van-radio> <van-radio name="1" :class="{'checked':form.salesChannel==1,'salesChannelRadio':true,'radio':true}">中道二手拖车</van-radio>
<van-radio name="2" :class="{'checked':form.salesChannel==2,'salesChannelRadio':true}">本地线下</van-radio> <van-radio name="2" :class="{'checked':form.salesChannel==2,'salesChannelRadio':true}">本地线下</van-radio>
<van-radio name="3" :class="{'checked':form.salesChannel==3,'salesChannelRadio':true}">报废</van-radio> <van-radio name="3" :class="{'checked':form.salesChannel==3,'salesChannelRadio':true}">报废</van-radio>
@ -22,12 +26,13 @@
<template v-if="form.salesChannel==3"> <template v-if="form.salesChannel==3">
<div class="item" style="margin-top: 8px"> <div class="item" style="margin-top: 8px">
<span style="line-height: 0.5rem"> <span class="star">*</span>报废机动车回收证明 </span> <span style="line-height: 0.5rem"> <span class="star">*</span>报废机动车回收证明 </span>
<upload-common @success3="getRecyclePhoto" @delete3="deleteImgRecycle" <upload-common @success3="getRecyclePhoto" @delete3="deleteImgRecycle" :show-del="type == 'revise'"
:text="'回收证明'" :multiple="false" :files.sync="recyclePathList"/> :text="'回收证明'" :multiple="false" :files.sync="recyclePathList"/>
</div> </div>
<div class="item"> <div class="item">
<span> <span class="star">*</span>报废年月</span> <span> <span class="star">*</span>报废年月</span>
<el-date-picker <el-date-picker
:disabled="type !== 'revise'"
v-model="form.scrapTime" v-model="form.scrapTime"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
@ -40,6 +45,7 @@
<div class="item"> <div class="item">
<span> <span class="star">*</span>购买方 </span> <span> <span class="star">*</span>购买方 </span>
<van-field <van-field
:disabled="type !== 'revise'"
class="radioWrap" class="radioWrap"
v-model="form.purchaser" v-model="form.purchaser"
input-align="right" input-align="right"
@ -48,6 +54,7 @@
<div class="item"> <div class="item">
<span> <span class="star">*</span>售出价格 </span> <span> <span class="star">*</span>售出价格 </span>
<van-field <van-field
:disabled="type !== 'revise'"
type="number" type="number"
class="radioWrap" class="radioWrap"
v-model="form.sellPrice" v-model="form.sellPrice"
@ -60,12 +67,13 @@
</div> </div>
<div class="item" style="margin-top: 8px"> <div class="item" style="margin-top: 8px">
<span> <span class="star">*</span>交易合同 </span> <span> <span class="star">*</span>交易合同 </span>
<upload-common @success3="getTradePhoto" @delete3="deleteImgTrade" <upload-common @success3="getTradePhoto" @delete3="deleteImgTrade" :show-del="type == 'revise'"
:text="'交易合同'" :multiple="false" :files.sync="tradeContractPathList"/> :text="'交易合同'" :multiple="false" :files.sync="tradeContractPathList"/>
</div> </div>
<div class="item"> <div class="item">
<span> <span class="star">*</span>交易年月</span> <span> <span class="star">*</span>交易年月</span>
<el-date-picker <el-date-picker
:disabled="type !== 'revise'"
v-model="form.tradeTime" v-model="form.tradeTime"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
@ -75,9 +83,17 @@
</div> </div>
</template> </template>
</div> </div>
<div class="btnWrap" v-if="type !== 'view'">
<div v-if="type == 'revise'" class="btn commonBtn" @click="noMultipleClicks(submitHandle)">确认售出</div>
<template v-else-if="type=='audit'">
<div style="margin: 10px">不通过原因</div>
<el-input style="margin-bottom: 10px;margin-left: 10px" class="ipt" v-model.trim="auditReason" type="textarea" :autosize="{ minRows: 2, maxRows: 6 }"
maxlength="200" show-word-limit placeholder="请填写不通过原因"></el-input>
<div class="auditBtn">
<div class="commonBtn" @click="noMultipleClicks(auditHandle,0)">审核不通过</div>
<div class="commonBtn" @click="noMultipleClicks(auditHandle,1)"><span style="margin-right: 6px"></span>审核通过</div>
</div> </div>
<div class="btnWrap"> </template>
<div class="btn" @click="noMultipleClicks(submitHandle)">确认售出</div>
</div> </div>
</div> </div>
</div> </div>
@ -86,8 +102,9 @@
<script> <script>
import {myMixins} from "@/utils/myMixins" import {myMixins} from "@/utils/myMixins"
// carInfoDetail, // carInfoDetail,
import { usedCarRemove} from "@/api/secondHandCar" import {auditCarInfo, usedCarRemove,carInfoDetail,auditCarInfoAgain} from "@/api/secondHandCar"
import uploadCommon from "@/views/secondHandCar/components/upload-common.vue"; import uploadCommon from "@/views/secondHandCar/components/upload-common.vue";
import {auditCarInfoAgain} from "@/api/secondHandCar";
export default { export default {
name: "sellingInfo", name: "sellingInfo",
mixins:[myMixins], mixins:[myMixins],
@ -109,23 +126,56 @@ export default {
recyclePathList:[], recyclePathList:[],
otherImgSrc:[], otherImgSrc:[],
otherImgSrcList:[], otherImgSrcList:[],
type:'',
auditRemark:'',
auditReason:'',
status:'' ,
} }
}, },
async mounted() { async mounted() {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
this.form.id=this.$route.query.id || urlParams.get('id'); this.form.id=this.$route.query.id || urlParams.get('id');
/* this.type=this.$route.query.type || urlParams.get('type');
if( this.form.id){ if( this.form.id){
let res = await carInfoDetail({ let res = await carInfoDetail({
id:this.form.id, id:this.form.id,
queryType:this.queryType , queryType:4,
}) })
this.form={...res.data} this.form={...res.data}
this.tradeContractPathList=[{url:res.data?.vehicleLicensePhoto}] this.auditRemark=res.data?.auditRemark
this.recyclePathList=[{url:res.data?.vehicleAnglePhoto}] this.status=res.data?.status?.code
}*/ if(res.data?.tradeContractPath){
this.tradeContractPathList=[{url:res.data?.tradeContractPath}]
}
if(res.data?.recyclePath){
this.recyclePathList=[{url:res.data?.recyclePath}]
}
}
}, },
methods:{ methods:{
// 审核操作
async auditHandle(type){
if (!type && !this.auditReason){
this.$toast('请填写不通过原因')
return
}
try {
await auditCarInfo({
id: this.form.id,
auditResult: type ? 1 : 0 ,
auditReason: this.auditReason,
...this.form,
licenseType:this.form?.licenseType?.code,
boardType:this.form?.boardType?.code,
emissionStandard:this.form?.emissionStandard?.code,
})
setTimeout(()=>{
this.closeParentDialog()
},1000)
} finally {
console.log(type)
}
},
async submitHandle(){ async submitHandle(){
let rule = this.validationRules.find(item => let rule = this.validationRules.find(item =>
item.required && (item.value === null || item.value === undefined || item.value === '')) item.required && (item.value === null || item.value === undefined || item.value === ''))
@ -144,12 +194,32 @@ export default {
this.form.recyclePath='' this.form.recyclePath=''
this.form.scrapTime='' this.form.scrapTime=''
} }
await usedCarRemove({ let res=''
if(this.status == 9){
res=await auditCarInfoAgain({// 审核不通过再次提交
...this.form, ...this.form,
salesChannel:Number(this.form.salesChannel) salesChannel:Number(this.form.salesChannel)
}) })
}else {
res=await usedCarRemove({
...this.form,
salesChannel:Number(this.form.salesChannel)
})
}
if(res.code == 200 && !res.msg){
this.$toast('操作成功') this.$toast('操作成功')
if(this.isWebFunc()){
setTimeout(()=>{
this.closeParentDialog()
},1000)
}else{
setTimeout(()=>{
this.h5GoBack() this.h5GoBack()
},1000)
}
}else{
this.$toast(res.msg)
}
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} }
@ -193,13 +263,16 @@ export default {
.headerWrap{ .headerWrap{
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 15px 16px 0; padding-top: 15px;
padding-bottom: 15px;
position: relative; position: relative;
.nav { .navWrap{
width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 15px; box-sizing: border-box;
padding: 0 16px 10px;
} }
.bg { .bg {
position: absolute; position: absolute;
@ -214,30 +287,48 @@ export default {
.back{ .back{
@include wh(15px,15px); @include wh(15px,15px);
} }
span{ .title{
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
color: #203152; color: #203152;
} }
.audit{
@include wh(100%,43px);
background: #FFF7F4;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
color: #FF6B3B;
.noAudit{
@include wh(13px,12px);
margin-right: 5px;
vertical-align: bottom;
}
span:first-child{
font-weight: 600;
}
}
}
.navBar{
margin-bottom: 46px;
}
.noReasonWrap{
height: calc(100% - 42px);
}
.hasReasonWrap{
height: calc(100% - 85px);
} }
.contentWrap{ .contentWrap{
width: 100%; width: 100%;
height: calc(100% - 42px);
overflow-y: auto; overflow-y: auto;
@include sizingPadding(10px,15px); @include sizingPadding(15px,15px);
@include flexBetween; @include flexBetween;
/* .radioWrap{
display: flex;
justify-content: space-around;
align-items: center;
margin-top: 7px;
margin-bottom: 15px;
}*/
.btnWrap{ .btnWrap{
width: 100%;
padding-bottom: 20px; padding-bottom: 20px;
@include flexBetCen; padding-top: 15px;
.btn{ }
.commonBtn{
height: 46px; height: 46px;
line-height: 46px; line-height: 46px;
text-align: center; text-align: center;
@ -245,20 +336,33 @@ export default {
border-radius: 5px; border-radius: 5px;
color: #FFFFFF; color: #FFFFFF;
cursor: pointer; cursor: pointer;
}
.btn{
width: 296px; width: 296px;
background: #4A7FEB; background: #4A7FEB;
margin: 0 auto; margin: 0 auto;
font-size: 15px; font-size: 15px;
} }
.auditBtn{
display: flex;
justify-content: space-between;
font-size: 14px;
box-sizing: border-box;
padding: 0 6px;
div:first-child{
width: 100px;
opacity: 0.79;
background: #1C2C49;
}
div:last-child{
width: 200px;
background: #4A7FEB;
} }
} }
}
.content{ .content{
width: 100%; width: 100%;
box-sizing: border-box;
padding: 0 14px 0 20px;
//padding:0 20px;
}
.twoContent{
.item{ .item{
display: flex; display: flex;
font-weight: 400; font-weight: 400;