Compare commits
14 Commits
dev-2025
...
prod-25-03
Author | SHA1 | Date | |
---|---|---|---|
4a0a60afb7 | |||
321414ad87 | |||
fc4cbbed7a | |||
a69d57b0fd | |||
6e9acbcf1e | |||
d147b77d25 | |||
89fc3ac753 | |||
06c51d6b65 | |||
f2a45915fe | |||
7b06331eb6 | |||
ef247173a1 | |||
3c9dc6ecf5 | |||
82fc504fb5 | |||
42a75a644c |
@ -94,4 +94,21 @@ export function batteryDetailList (data){
|
||||
contentType:'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 查询未读告知函
|
||||
export function selectUnReadNotifyBySupplier() {
|
||||
return request({
|
||||
url: '/supplierManage/correction/notify/selectUnReadNotifyBySupplier',
|
||||
method:'POST',
|
||||
})
|
||||
}
|
||||
|
||||
// 阅读告知函
|
||||
export function correctionHandle(data) {
|
||||
return request({
|
||||
url: '/supplierManage/correction/record/correctionHandle',
|
||||
method:'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
@ -186,6 +186,14 @@ const routes = [
|
||||
title:'文档资料'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/notificationList',
|
||||
name: 'notificationList',
|
||||
component:()=>import('@/views/index/notificationList'),
|
||||
meta: {
|
||||
title:'告知函'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/caseList',
|
||||
name: 'caseList',
|
||||
|
161
src/views/index/notificationList.vue
Normal file
161
src/views/index/notificationList.vue
Normal file
@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dialog-wrapper">
|
||||
<div class="title">
|
||||
{{ '告知函('+(currentIndex + 1)+'/'+ list.length+')' }}
|
||||
</div>
|
||||
<h3 class="top">{{currentItem?.title?currentItem?.title:(currentItem?.type==1 ? '质量不合格整改' : '质量不合格调整告知')}}</h3>
|
||||
<div class="center">
|
||||
<div v-html="formattedContent(currentItem)"></div>
|
||||
</div>
|
||||
<div class="end">
|
||||
<div>中道汽车救援股份有限公司</div>
|
||||
<div>区域管理部</div>
|
||||
<div>{{formatDate(currentItem)}}</div>
|
||||
</div>
|
||||
<div class="iptWrap">
|
||||
<div class="tip">请仔细阅读告知函内容,并在下方输入"我已阅读”以表明您已充分理解函件中的各项信息。</div>
|
||||
<el-input style="width: 50%" v-model.trim="content" placeholder="请输入我已阅读"></el-input>
|
||||
</div>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="info" size="small" v-if="num > 0">还需阅读{{num}}秒</el-button>
|
||||
<el-button type="primary" size="small" v-if="num==0" @click="confirmHandle(currentItem)">确认</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {selectUnReadNotifyBySupplier, correctionHandle} from "@/api/order"
|
||||
export default {
|
||||
name: "notificationList",
|
||||
mixins: [myMixins],
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
currentIndex: 0,
|
||||
num:10,
|
||||
timer: null,
|
||||
content: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentItem() {
|
||||
return this.list[this.currentIndex];
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
currentIndex() {
|
||||
this.content = '';
|
||||
this.num = 10;
|
||||
this.startCountdown();
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
await this.getLetterList();
|
||||
this.timer && clearInterval(this.timer)
|
||||
this.startCountdown();
|
||||
},
|
||||
methods: {
|
||||
async confirmHandle(item){
|
||||
if (this.content === '我已阅读') {
|
||||
console.log('item', item)
|
||||
let res = await correctionHandle({
|
||||
handleType:4,
|
||||
operationType:'modify',
|
||||
recordId:item.recordId,
|
||||
planId:item.planId,
|
||||
notifyId:item.id,
|
||||
});
|
||||
console.log('阅读res', res)
|
||||
// 确认成功后处理下一个告知函
|
||||
this.currentIndex++;
|
||||
if (this.currentIndex < this.list.length) {
|
||||
this.content = '';
|
||||
this.num = 10;
|
||||
this.startCountdown();
|
||||
} else {
|
||||
this.closeHandle();
|
||||
}
|
||||
} else {
|
||||
this.$message.error('请输入"我已阅读"以确认');
|
||||
}
|
||||
},
|
||||
async getLetterList(){
|
||||
let res = await selectUnReadNotifyBySupplier();
|
||||
let result = res?.data || []
|
||||
if(result && result.length>0){
|
||||
this.list = result
|
||||
}
|
||||
},
|
||||
formatDate(val){
|
||||
/** 日期格式化
|
||||
* */
|
||||
if(!val?.updateTime){
|
||||
return
|
||||
}
|
||||
const date = new Date(val.updateTime);
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1; // 月份从 0 开始,需要加 1
|
||||
const day = date.getDate();
|
||||
const formattedDate = `${year}年${month}月${day}日`;
|
||||
return formattedDate
|
||||
},
|
||||
formattedContent(val) {
|
||||
/** 转换文本,能被 v-html 识别
|
||||
* */
|
||||
return val?.content?.replace(/\r\n/g, '<br>').replace(/\n/g, '<br>');
|
||||
},
|
||||
startCountdown() {
|
||||
this.stopCountdown()
|
||||
this.timer = setInterval(() => {
|
||||
if (this.num > 0) {
|
||||
this.num--;
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
closeHandle() {
|
||||
this.stopCountdown();
|
||||
// 调用 app 的方法
|
||||
this.goBack();
|
||||
},
|
||||
stopCountdown() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-wrapper {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.title {
|
||||
|
||||
}
|
||||
.top {
|
||||
text-align: center;
|
||||
}
|
||||
.center {
|
||||
margin: 20px 0;
|
||||
line-height: 24px;
|
||||
.hight{
|
||||
color: #0B99E4;
|
||||
}
|
||||
}
|
||||
.end{
|
||||
text-align: right;
|
||||
line-height: 24px;
|
||||
}
|
||||
.tip{
|
||||
margin-top: 40px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
@ -57,6 +57,7 @@
|
||||
<div class="item">
|
||||
<span> <span class="star">*</span>排放标准 </span>
|
||||
<van-radio-group v-model="form.emissionStandard" direction="horizontal" class="radioWrap">
|
||||
<van-radio name="3" :class="{'checked':form.emissionStandard==3}">国3</van-radio>
|
||||
<van-radio name="4" :class="{'checked':form.emissionStandard==4}">国4</van-radio>
|
||||
<van-radio name="5" :class="{'checked':form.emissionStandard==5}">国5</van-radio>
|
||||
<van-radio name="6" :class="{'checked':form.emissionStandard==6}">国6</van-radio>
|
||||
@ -104,6 +105,7 @@
|
||||
style="border: none"
|
||||
class="radioWrap"
|
||||
v-model="form.minPrice"
|
||||
@input="validatePrice"
|
||||
input-align="right"
|
||||
>
|
||||
<template slot="right-icon" >
|
||||
@ -269,6 +271,13 @@ export default {
|
||||
// console.log("--",this.vehicleLicensePhotoList,this.vehicleAnglePhotoList,this.otherImgSrcList)
|
||||
},
|
||||
methods:{
|
||||
validatePrice(value) {
|
||||
if (value?.startsWith(0) && value?.length > 1) {
|
||||
this.$nextTick(() => {
|
||||
this.form.minPrice = 0
|
||||
})
|
||||
}
|
||||
},
|
||||
clearStorageFormInfo(){
|
||||
localStorage.setItem("carSourceFormInfo",'')
|
||||
},
|
||||
@ -356,7 +365,11 @@ export default {
|
||||
}else if(this.form.vehicleType !=='拖车'){
|
||||
this.form.boardType=''
|
||||
}
|
||||
let rule=this.validationRules.find(item=>!item.value)
|
||||
let rule = this.validationRules.find(item =>
|
||||
item.value === null ||
|
||||
item.value === undefined ||
|
||||
item.value === ''
|
||||
)
|
||||
if(rule){
|
||||
this.$toast(rule.name)
|
||||
return
|
||||
@ -402,7 +415,11 @@ export default {
|
||||
}else if(this.form.vehicleType !=='拖车'){
|
||||
this.form.boardType=''
|
||||
}
|
||||
let rule=this.validationRules.find(item=>!item.value)
|
||||
let rule = this.validationRules.find(item =>
|
||||
item.value === null ||
|
||||
item.value === undefined ||
|
||||
item.value === ''
|
||||
)
|
||||
if(rule){
|
||||
this.$toast(rule.name)
|
||||
return
|
||||
|
@ -71,7 +71,9 @@
|
||||
</div>
|
||||
<div class="suGang"></div>
|
||||
<div class="itemInfo">
|
||||
<span>{{ formatToWan(detailInfo.mileage)}}公里</span>
|
||||
<el-tooltip class="item" effect="dark" :content="formatToWan(detailInfo.mileage)+'公里'" placement="top">
|
||||
<span style="display: inline-block;width:100%;cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{ formatToWan(detailInfo.mileage)}}公里</span>
|
||||
</el-tooltip>
|
||||
<span>行驶公里</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -95,6 +97,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {carInfoDetail,saveRecord} from "@/api/secondHandCar";
|
||||
import { Dialog } from 'vant';
|
||||
@ -103,7 +106,6 @@ export default {
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
show:false,
|
||||
current: 0,
|
||||
noClick:true,
|
||||
id:'',
|
||||
@ -117,8 +119,13 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
// console.log(" localStorage.setItem('indexActiveTab', this.activeTab);", localStorage.getItem('indexActiveTab'))
|
||||
// 页面加载时记录进入时间
|
||||
window.addEventListener('message', (event) => {
|
||||
if (event.data === 'dialogClosed') {
|
||||
console.log('Dialog 已关闭');
|
||||
this.getDuration(1)
|
||||
// 执行关闭后的逻辑
|
||||
}
|
||||
});
|
||||
this.startTime = new Date();
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.id=this.$route.query.id || urlParams.get('id');
|
||||
@ -140,38 +147,36 @@ export default {
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
this.getDuration()
|
||||
this.getDuration(1)
|
||||
},
|
||||
methods:{
|
||||
formatToWan(num) {
|
||||
let result = (num / 10000).toString();
|
||||
let result = (num / 10000).toString(); // 转换为万单位
|
||||
if (result.includes('.')) {
|
||||
let decimalPart = result.split('.')[1];
|
||||
if (decimalPart.length > 2) {
|
||||
result = parseFloat(result).toFixed(2);
|
||||
let decimalPart = result.split('.')[1]; // 获取小数部分
|
||||
if (decimalPart.length > 1) {
|
||||
result = parseFloat(result).toFixed(1); // 保留一位小数
|
||||
}
|
||||
}
|
||||
return result + '万';
|
||||
},
|
||||
getDuration(){
|
||||
getDuration(type){
|
||||
// 页面卸载时记录离开时间并计算浏览时长
|
||||
const endTime = new Date();
|
||||
const duration = (endTime - this.startTime) / 1000; // 计算时长(秒)\
|
||||
this.saveRecord(duration);
|
||||
this.saveRecord(duration,type);
|
||||
},
|
||||
async saveRecord(duration){
|
||||
await saveRecord({type: this.recordType, carInfoId: this.id, duration})
|
||||
async saveRecord(duration,type){
|
||||
await saveRecord({type: type, carInfoId: this.id, duration})
|
||||
},
|
||||
handle(){
|
||||
this.show=true
|
||||
this.getDuration(2)
|
||||
Dialog.alert({
|
||||
message:this.detailInfo.contactNumber ,
|
||||
confirmButtonText:'拨打电话',
|
||||
showCancelButton:true,
|
||||
}).then(async() => {
|
||||
this.recordType=2
|
||||
window.location.href = `tel:${this.detailInfo.contactNumber}`;
|
||||
await this.getDuration()
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
@ -169,7 +169,7 @@ export default {
|
||||
{value:1,label:'5~6'},{value:2,label:'7~8'},{value:3,label:'8~9'}
|
||||
],
|
||||
emissionStandardOption:[
|
||||
{value:1,label:'不限'},{value:4,label:'国四'},{value:5,label:'国五'},{value:6,label:'国六'}
|
||||
{value:1,label:'不限'},{value:3,label:'国三'},{value:4,label:'国四'},{value:5,label:'国五'},{value:6,label:'国六'}
|
||||
],
|
||||
boardTypeOption:[
|
||||
{value:1,label:'全落地'},{value:2,label:'斜落地'},{value:3,label:'一般斜板'},{value:9,label:'不限'}
|
||||
@ -196,8 +196,8 @@ export default {
|
||||
let result = (num / 10000).toString();
|
||||
if (result.includes('.')) {
|
||||
let decimalPart = result.split('.')[1];
|
||||
if (decimalPart.length > 2) {
|
||||
result = parseFloat(result).toFixed(2);
|
||||
if (decimalPart.length > 1) {
|
||||
result = parseFloat(result).toFixed(1);
|
||||
}
|
||||
}
|
||||
return result + '万';
|
||||
|
@ -34,11 +34,6 @@
|
||||
<span>{{item.vehicleType}}</span>
|
||||
<img class="titleImg" :src="getStatus(item.status?.code)" />
|
||||
</div>
|
||||
<!--
|
||||
<div v-if="activeTab==0" class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}} {{ item.licenseType?.label }} |
|
||||
{{ item.brandModel?.match(/^[\u4e00-\u9fa5]+/)?.[0]?.replace(/牌$/, '') }} | {{item.emissionStandard?.label}} | {{ formatToWan(item.mileage) }}公里</div>
|
||||
<div v-else class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}} {{item.emissionStandard?.label}}</div>
|
||||
-->
|
||||
|
||||
<div v-if="activeTab==0" class="type">{{ item.boardType?.label ? item.boardType?.label+' | ' : ''}} {{ item.licenseType?.label }} |
|
||||
{{ item.mileage }}km | {{item.emissionStandard?.label}}</div>
|
||||
|
@ -46,13 +46,14 @@
|
||||
<van-radio name="9" :class="{'checked':form.boardType==9}">不限</van-radio>
|
||||
</van-radio-group>
|
||||
</div>
|
||||
<div class="item" >
|
||||
<div class="item vehicleTypeItem" >
|
||||
<span> <span class="star">*</span>排放标准 </span>
|
||||
<van-radio-group v-model="form.emissionStandard" direction="horizontal" class="radioWrap">
|
||||
<van-radio name="4" :class="{'checked':form.emissionStandard==4}">国4</van-radio>
|
||||
<van-radio name="5" :class="{'checked':form.emissionStandard==5}">国5</van-radio>
|
||||
<van-radio name="6" :class="{'checked':form.emissionStandard==6}">国6</van-radio>
|
||||
<van-radio name="1" :class="{'checked':form.emissionStandard==1}">不限</van-radio>
|
||||
<van-radio-group v-model="form.emissionStandard" direction="horizontal" class="radioWrap" style="padding-top: 5px">
|
||||
<van-radio name="3" :class="{'checked':form.emissionStandard==3,'vehicleRadio':true}">国3</van-radio>
|
||||
<van-radio name="4" :class="{'checked':form.emissionStandard==4,'vehicleRadio':true}">国4</van-radio>
|
||||
<van-radio name="5" :class="{'checked':form.emissionStandard==5,'vehicleRadio':true}">国5</van-radio>
|
||||
<van-radio name="6" :class="{'checked':form.emissionStandard==6,'vehicleRadio':true}">国6</van-radio>
|
||||
<van-radio name="1" :class="{'checked':form.emissionStandard==1,'vehicleRadio':true}">不限</van-radio>
|
||||
</van-radio-group>
|
||||
</div>
|
||||
<div class="item">
|
||||
@ -68,12 +69,12 @@
|
||||
<div class="item priceItem">
|
||||
<span> <span class="star">*</span>价格区间 </span>
|
||||
<div style="display: flex;align-items: center" class="price">
|
||||
<el-input type="tel" v-model.number="form.minPrice" >
|
||||
<el-input type="tel" v-model.number="form.minPrice" @input="validatePrice">
|
||||
<template slot="suffix" >元
|
||||
</template>
|
||||
</el-input>
|
||||
<span style="font-size: 14px;color: rgba(44, 61, 84, 0.59);margin: 0 6px">-</span>
|
||||
<el-input type="tel" v-model.number="form.maxPrice" >
|
||||
<el-input type="tel" v-model.number="form.maxPrice" @input="validatePrice1">
|
||||
<template slot="suffix" >元
|
||||
</template>
|
||||
</el-input>
|
||||
@ -171,6 +172,20 @@ export default {
|
||||
this.ortherReason=wantBuyFormInfo.ortherReason
|
||||
},
|
||||
methods:{
|
||||
validatePrice(value) {
|
||||
if (value?.startsWith(0) && value?.length > 1) {
|
||||
this.$nextTick(() => {
|
||||
this.form.minPrice = 0
|
||||
})
|
||||
}
|
||||
},
|
||||
validatePrice1(value) {
|
||||
if (value?.startsWith(0) && value?.length > 1) {
|
||||
this.$nextTick(() => {
|
||||
this.form.maxPrice = 0
|
||||
})
|
||||
}
|
||||
},
|
||||
clearStorageFormInfo(){
|
||||
localStorage.setItem("wantBuyFormInfo",'')
|
||||
},
|
||||
@ -205,7 +220,11 @@ export default {
|
||||
}else if(this.form.vehicleType !=='拖车'){
|
||||
this.form.boardType=''
|
||||
}
|
||||
let rule=this.validationRules.find(item=>!item.value)
|
||||
let rule = this.validationRules.find(item =>
|
||||
item.value === null ||
|
||||
item.value === undefined ||
|
||||
item.value === ''
|
||||
)
|
||||
if(rule){
|
||||
this.$toast(rule.name)
|
||||
return
|
||||
@ -247,7 +266,11 @@ export default {
|
||||
}else if(this.form.vehicleType !=='拖车'){
|
||||
this.form.boardType=''
|
||||
}
|
||||
let rule=this.validationRules.find(item=>!item.value)
|
||||
let rule = this.validationRules.find(item =>
|
||||
item.value === null ||
|
||||
item.value === undefined ||
|
||||
item.value === ''
|
||||
)
|
||||
if(rule){
|
||||
this.$toast(rule.name)
|
||||
return
|
||||
|
@ -67,12 +67,16 @@ export default {
|
||||
detailInfo:'',
|
||||
duration:'',
|
||||
startTime: null, // 记录进入时间
|
||||
recordType:1,
|
||||
isList:false,
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
// 页面加载时记录进入时间
|
||||
window.addEventListener('message', (event) => {
|
||||
if (event.data === 'dialogClosed') {
|
||||
console.log('Dialog 已关闭');
|
||||
this.getDuration(1)
|
||||
}
|
||||
});
|
||||
this.startTime = new Date();
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.id=this.$route.query.id || urlParams.get('id');
|
||||
@ -87,25 +91,24 @@ export default {
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
this.getDuration()
|
||||
this.getDuration(1)
|
||||
},
|
||||
methods:{
|
||||
getDuration(){
|
||||
getDuration(type){
|
||||
const endTime = new Date();
|
||||
const duration = (endTime - this.startTime) / 1000; // 计算时长(秒)
|
||||
this.saveRecord(duration);
|
||||
this.saveRecord(duration,type);
|
||||
},
|
||||
async saveRecord(duration){
|
||||
await saveRecord({type:this.recordType,carInfoId:this.id,duration})
|
||||
async saveRecord(duration,type){
|
||||
await saveRecord({type:type,carInfoId:this.id,duration})
|
||||
},
|
||||
handle(){
|
||||
this.getDuration(2)
|
||||
Dialog.alert({
|
||||
message:this.detailInfo.contactNumber ,
|
||||
confirmButtonText:'拨打电话',
|
||||
showCancelButton:true,
|
||||
}).then(() => {
|
||||
this.recordType=2
|
||||
this.getDuration()
|
||||
window.location.href = `tel:${this.detailInfo.contactNumber}`;
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
|
Reference in New Issue
Block a user