story#6932,售出信息,区分三种状态显示及按钮对应逻辑
This commit is contained in:
@ -268,7 +268,6 @@ export default {
|
||||
if( this.form.vehicleRearPhoto ) {
|
||||
this.vehicleRearPhotoList = [{url: this.form.vehicleRearPhoto}]
|
||||
}
|
||||
// console.log("carSourceFormInfo",carSourceFormInfo)
|
||||
if(carSourceFormInfo.otherImgSrc0){
|
||||
this.otherImgSrc.push(carSourceFormInfo.otherImgSrc0)
|
||||
this.otherImgSrcList.push({url:carSourceFormInfo.otherImgSrc0})
|
||||
@ -293,7 +292,6 @@ export default {
|
||||
this.otherImgSrc.push(carSourceFormInfo.otherImgSrc5)
|
||||
this.otherImgSrcList.push({url:carSourceFormInfo.otherImgSrc5})
|
||||
}
|
||||
// console.log("--",this.vehicleLicensePhotoList,this.vehicleAnglePhotoList,this.otherImgSrcList)
|
||||
},
|
||||
methods:{
|
||||
validatePrice(value) {
|
||||
@ -480,21 +478,6 @@ export default {
|
||||
otherPhoto:this.otherImgSrc?.join(',')
|
||||
})
|
||||
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)
|
||||
} catch (e){
|
||||
console.log('e',e)
|
||||
@ -605,7 +588,6 @@ export default {
|
||||
}
|
||||
.navBar{
|
||||
margin-bottom: 46px;
|
||||
|
||||
}
|
||||
.noContentAudit{
|
||||
height: calc(100% - 42px);
|
||||
|
@ -8,6 +8,7 @@
|
||||
:preview-full-image="false"
|
||||
:max-count="multiple ? 6 : 1"
|
||||
@click-preview="handlePreviewClick"
|
||||
:deletable="showDel"
|
||||
>
|
||||
<div class="upload">
|
||||
<img class="icon" src="@/assets/secondHandCar/upload.png"/>
|
||||
@ -36,6 +37,10 @@ export default {
|
||||
files: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
showDel:{
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -162,10 +162,8 @@ export default {
|
||||
return
|
||||
}
|
||||
if(this.xiajiaInfo?.type==1 && this.radio==1){
|
||||
console.log("111")
|
||||
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{
|
||||
await usedCarRemove({
|
||||
id:this.xiajiaInfo.id,
|
||||
@ -182,9 +180,6 @@ export default {
|
||||
query: { type:1 ,id:item.id,queryType:3,homePage:false},
|
||||
})
|
||||
},
|
||||
reviseXiajiaHandle(item){//修改下架
|
||||
console.log("修改下架",item)
|
||||
},
|
||||
async polishHandle(item){//檫亮
|
||||
try {
|
||||
await usedCarPolish(item.id)
|
||||
@ -204,8 +199,13 @@ export default {
|
||||
console.log('reShangJiaHandle',e)
|
||||
}
|
||||
},
|
||||
reviseXiajiaHandle(item){//修改下架
|
||||
console.log("修改下架",item)
|
||||
this.$router.push({ name: "sellingInfo", query: {id:item.id,type:'revise'}})
|
||||
},
|
||||
viewXiajiaHandle(item){//查看下架
|
||||
console.log("item",item)
|
||||
console.log("查看下架",item)
|
||||
this.$router.push({ name: "sellingInfo", query: {id:item.id,type:'view'}})
|
||||
},
|
||||
xiajiaHandle(item){//下架
|
||||
this.poupShow=true
|
||||
|
@ -2,82 +2,98 @@
|
||||
<div class="wrap" >
|
||||
<div class="headerWrap">
|
||||
<img class="bg" src="@/assets/secondHandCar/bg.png" />
|
||||
<div class="nav">
|
||||
<img class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" />
|
||||
<span>售出信息</span>
|
||||
<div class="navWrap">
|
||||
<div v-if="isWebFunc()" style="opacity: 0;" class="back"></div>
|
||||
<img v-else class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" />
|
||||
<span class="title">售出信息</span>
|
||||
<div style="opacity: 0;" class="back"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentWrap">
|
||||
<div>
|
||||
<div class="twoContent content">
|
||||
<div class="item vehicleTypeItem">
|
||||
<span> <span class="star">*</span>售出渠道 </span>
|
||||
<van-radio-group v-model="form.salesChannel" direction="horizontal" class="radioWrap">
|
||||
<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="3" :class="{'checked':form.salesChannel==3,'salesChannelRadio':true}">报废</van-radio>
|
||||
</van-radio-group>
|
||||
</div>
|
||||
<template v-if="form.salesChannel==3">
|
||||
<div class="item" style="margin-top: 8px">
|
||||
<span style="line-height: 0.5rem"> <span class="star">*</span>报废机动车回收证明 </span>
|
||||
<upload-common @success3="getRecyclePhoto" @delete3="deleteImgRecycle"
|
||||
:text="'回收证明'" :multiple="false" :files.sync="recyclePathList"/>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>报废年月</span>
|
||||
<el-date-picker
|
||||
v-model="form.scrapTime"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>购买方 </span>
|
||||
<van-field
|
||||
class="radioWrap"
|
||||
v-model="form.purchaser"
|
||||
input-align="right"
|
||||
> </van-field>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>售出价格 </span>
|
||||
<van-field
|
||||
type="number"
|
||||
class="radioWrap"
|
||||
v-model="form.sellPrice"
|
||||
input-align="right"
|
||||
>
|
||||
<template slot="right-icon" >
|
||||
<span style="white-space: nowrap; margin-left: 8px;"> 元 </span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
<div class="item" style="margin-top: 8px">
|
||||
<span> <span class="star">*</span>交易合同 </span>
|
||||
<upload-common @success3="getTradePhoto" @delete3="deleteImgTrade"
|
||||
:text="'交易合同'" :multiple="false" :files.sync="tradeContractPathList"/>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>交易年月</span>
|
||||
<el-date-picker
|
||||
v-model="form.tradeTime"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="audit" v-if="status==9 && auditRemark">
|
||||
<span><img class="noAudit" src="@/assets/secondHandCar/noAudit.png" />审核不通过:</span>
|
||||
<span>{{auditRemark }}</span>
|
||||
</div>
|
||||
<div class="btnWrap">
|
||||
<div class="btn" @click="noMultipleClicks(submitHandle)">确认售出</div>
|
||||
</div>
|
||||
<div class="contentWrap" :class="[!(status==9 && auditRemark) ? 'noReasonWrap': 'hasReasonWrap']">
|
||||
<div class="content">
|
||||
<div class="item vehicleTypeItem">
|
||||
<span> <span class="star">*</span>售出渠道 </span>
|
||||
<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="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-group>
|
||||
</div>
|
||||
<template v-if="form.salesChannel==3">
|
||||
<div class="item" style="margin-top: 8px">
|
||||
<span style="line-height: 0.5rem"> <span class="star">*</span>报废机动车回收证明 </span>
|
||||
<upload-common @success3="getRecyclePhoto" @delete3="deleteImgRecycle" :show-del="type == 'revise'"
|
||||
:text="'回收证明'" :multiple="false" :files.sync="recyclePathList"/>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>报废年月</span>
|
||||
<el-date-picker
|
||||
:disabled="type !== 'revise'"
|
||||
v-model="form.scrapTime"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>购买方 </span>
|
||||
<van-field
|
||||
:disabled="type !== 'revise'"
|
||||
class="radioWrap"
|
||||
v-model="form.purchaser"
|
||||
input-align="right"
|
||||
> </van-field>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>售出价格 </span>
|
||||
<van-field
|
||||
:disabled="type !== 'revise'"
|
||||
type="number"
|
||||
class="radioWrap"
|
||||
v-model="form.sellPrice"
|
||||
input-align="right"
|
||||
>
|
||||
<template slot="right-icon" >
|
||||
<span style="white-space: nowrap; margin-left: 8px;"> 元 </span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
<div class="item" style="margin-top: 8px">
|
||||
<span> <span class="star">*</span>交易合同 </span>
|
||||
<upload-common @success3="getTradePhoto" @delete3="deleteImgTrade" :show-del="type == 'revise'"
|
||||
:text="'交易合同'" :multiple="false" :files.sync="tradeContractPathList"/>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>交易年月</span>
|
||||
<el-date-picker
|
||||
:disabled="type !== 'revise'"
|
||||
v-model="form.tradeTime"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</template>
|
||||
</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>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -86,8 +102,9 @@
|
||||
<script>
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
// carInfoDetail,
|
||||
import { usedCarRemove} from "@/api/secondHandCar"
|
||||
import {auditCarInfo, usedCarRemove,carInfoDetail,auditCarInfoAgain} from "@/api/secondHandCar"
|
||||
import uploadCommon from "@/views/secondHandCar/components/upload-common.vue";
|
||||
import {auditCarInfoAgain} from "@/api/secondHandCar";
|
||||
export default {
|
||||
name: "sellingInfo",
|
||||
mixins:[myMixins],
|
||||
@ -109,23 +126,56 @@ export default {
|
||||
recyclePathList:[],
|
||||
otherImgSrc:[],
|
||||
otherImgSrcList:[],
|
||||
type:'',
|
||||
auditRemark:'',
|
||||
auditReason:'',
|
||||
status:'' ,
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.form.id=this.$route.query.id || urlParams.get('id');
|
||||
/*
|
||||
this.type=this.$route.query.type || urlParams.get('type');
|
||||
if( this.form.id){
|
||||
let res = await carInfoDetail({
|
||||
id:this.form.id,
|
||||
queryType:this.queryType ,
|
||||
queryType:4,
|
||||
})
|
||||
this.form={...res.data}
|
||||
this.tradeContractPathList=[{url:res.data?.vehicleLicensePhoto}]
|
||||
this.recyclePathList=[{url:res.data?.vehicleAnglePhoto}]
|
||||
}*/
|
||||
this.auditRemark=res.data?.auditRemark
|
||||
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:{
|
||||
// 审核操作
|
||||
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(){
|
||||
let rule = this.validationRules.find(item =>
|
||||
item.required && (item.value === null || item.value === undefined || item.value === ''))
|
||||
@ -144,12 +194,32 @@ export default {
|
||||
this.form.recyclePath=''
|
||||
this.form.scrapTime=''
|
||||
}
|
||||
await usedCarRemove({
|
||||
...this.form,
|
||||
salesChannel:Number(this.form.salesChannel)
|
||||
})
|
||||
this.$toast('操作成功')
|
||||
this.h5GoBack()
|
||||
let res=''
|
||||
if(this.status == 9){
|
||||
res=await auditCarInfoAgain({// 审核不通过再次提交
|
||||
...this.form,
|
||||
salesChannel:Number(this.form.salesChannel)
|
||||
})
|
||||
}else {
|
||||
res=await usedCarRemove({
|
||||
...this.form,
|
||||
salesChannel:Number(this.form.salesChannel)
|
||||
})
|
||||
}
|
||||
if(res.code == 200 && !res.msg){
|
||||
this.$toast('操作成功')
|
||||
if(this.isWebFunc()){
|
||||
setTimeout(()=>{
|
||||
this.closeParentDialog()
|
||||
},1000)
|
||||
}else{
|
||||
setTimeout(()=>{
|
||||
this.h5GoBack()
|
||||
},1000)
|
||||
}
|
||||
}else{
|
||||
this.$toast(res.msg)
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
@ -193,15 +263,18 @@ export default {
|
||||
.headerWrap{
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px 16px 0;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
position: relative;
|
||||
.nav {
|
||||
.navWrap{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
box-sizing: border-box;
|
||||
padding: 0 16px 10px;
|
||||
}
|
||||
.bg{
|
||||
.bg {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
@ -214,51 +287,82 @@ export default {
|
||||
.back{
|
||||
@include wh(15px,15px);
|
||||
}
|
||||
span{
|
||||
.title{
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
color: #203152;
|
||||
}
|
||||
}
|
||||
.contentWrap{
|
||||
width: 100%;
|
||||
height: calc(100% - 42px);
|
||||
overflow-y: auto;
|
||||
@include sizingPadding(10px,15px);
|
||||
@include flexBetween;
|
||||
/* .radioWrap{
|
||||
.audit{
|
||||
@include wh(100%,43px);
|
||||
background: #FFF7F4;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin-top: 7px;
|
||||
margin-bottom: 15px;
|
||||
}*/
|
||||
.btnWrap{
|
||||
width: 100%;
|
||||
padding-bottom: 20px;
|
||||
@include flexBetCen;
|
||||
.btn{
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
color: #FFFFFF;
|
||||
cursor: pointer;
|
||||
width: 296px;
|
||||
background: #4A7FEB;
|
||||
margin: 0 auto;
|
||||
font-size: 15px;
|
||||
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{
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
@include sizingPadding(15px,15px);
|
||||
@include flexBetween;
|
||||
.btnWrap{
|
||||
padding-bottom: 20px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
.commonBtn{
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
color: #FFFFFF;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn{
|
||||
width: 296px;
|
||||
background: #4A7FEB;
|
||||
margin: 0 auto;
|
||||
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{
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0 14px 0 20px;
|
||||
//padding:0 20px;
|
||||
}
|
||||
.twoContent{
|
||||
.item{
|
||||
display: flex;
|
||||
font-weight: 400;
|
||||
|
Reference in New Issue
Block a user