跟踪预警逻辑调整

This commit is contained in:
wuteng 2025-12-31 16:24:44 +08:00
parent b122b85db3
commit 17aca9be31
3 changed files with 40 additions and 14 deletions

View File

@ -394,7 +394,7 @@
</el-table-column>
<el-table-column :label="$t('跟踪预警')" align="center" prop="traceWaring" min-width="100" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<div v-if="scope.row.lastScanRecord!=null" >
<div v-if="scope.row.lastScanDate!=null" >
<div v-if="scope.row.blSign=='1'" >
已签收
</div>
@ -403,11 +403,11 @@
<span style="color: red">{{ scope.row.problemTypeName }}</span>
</div>
<div v-else>
<span v-if="calcDeliveryTime(new Date(),scope.row.lastScanRecord.scanDate)>2" style="color: red" >
轨迹异常:停留超时{{calcDeliveryTime(new Date(),scope.row.lastScanRecord.scanDate)}} 天
<span v-if="calcDeliveryTime(new Date(),scope.row.lastScanDate)>2" style="color: red" >
轨迹异常:停留超时{{calcDeliveryTime(new Date(),scope.row.lastScanDate)}} 天
</span>
<span v-else >
{{calcDeliveryTime(new Date(),scope.row.lastScanRecord.scanDate)}}天
{{calcDeliveryTime(new Date(),scope.row.lastScanDate)}}天
</span>
</div>
</div>
@ -654,6 +654,7 @@ import ProblemTypeMultiplePicker from '@/views/emis/EmisBaseTools/ProblemTypeMul
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
import TraceWaybillDetailView from '@/views/emis/customerService/traceWaybillDetailView.vue';
import { queryLastRecord } from "@/api/emis/emisTmsScanRecord";
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
import { formatSearchStr,deepClone } from '@/utils/index'
@ -1017,6 +1018,8 @@ export default {
this.emisWaybillList = response.rows;
this.total = response.total;
this.loading = false;
this.showLastTraceInfo();
});
// 查询统计
@ -1024,7 +1027,17 @@ export default {
this.queryStatInfoMap = response.data;
});
},
showLastTraceInfo(){
if(this.emisWaybillList&&this.emisWaybillList.length>0){
this.emisWaybillList.forEach(item=>{
queryLastRecord(item.billCode).then(response => {
let data=response.data;
item.lastTraceInfo=data.lastTraceInfo;
item.lastScanDate=data.scanDate;
});
});
}
},
onDateSelect(value){
this.dateTimeRange=value;
// scanDate

View File

@ -377,7 +377,7 @@
</el-table-column>
<el-table-column :label="$t('跟踪预警')" align="center" prop="traceWaring" min-width="100" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<div v-if="scope.row.lastScanRecord!=null" >
<div v-if="scope.row.lastScanDate!=null" >
<div v-if="scope.row.blSign=='1'" >
已签收
</div>
@ -386,11 +386,11 @@
<span style="color: red">{{ scope.row.problemTypeName }}</span>
</div>
<div v-else>
<span v-if="calcDeliveryTime(new Date(),scope.row.lastScanRecord.scanDate)>2" style="color: red" >
轨迹异常:停留超时{{calcDeliveryTime(new Date(),scope.row.lastScanRecord.scanDate)}} 天
<span v-if="calcDeliveryTime(new Date(),scope.row.lastScanDate)>2" style="color: red" >
轨迹异常:停留超时{{calcDeliveryTime(new Date(),scope.row.lastScanDate)}} 天
</span>
<span v-else >
{{calcDeliveryTime(new Date(),scope.row.lastScanRecord.scanDate)}}天
{{calcDeliveryTime(new Date(),scope.row.lastScanDate)}}天
</span>
</div>
</div>
@ -631,6 +631,7 @@ import ProblemTypeMultiplePicker from '@/views/emis/EmisBaseTools/ProblemTypeMul
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
import TraceWaybillDetailView from '@/views/emis/customerService/traceWaybillDetailView.vue';
import { queryLastRecord } from "@/api/emis/emisTmsScanRecord";
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
import { formatSearchStr,deepClone } from '@/utils/index'
@ -983,6 +984,8 @@ export default {
this.emisWaybillList = response.rows;
this.total = response.total;
this.loading = false;
this.showLastTraceInfo();
});
// 查询统计
@ -990,7 +993,17 @@ export default {
this.queryStatInfoMap = response.data;
});
},
showLastTraceInfo(){
if(this.emisWaybillList&&this.emisWaybillList.length>0){
this.emisWaybillList.forEach(item=>{
queryLastRecord(item.billCode).then(response => {
let data=response.data;
item.lastTraceInfo=data.lastTraceInfo;
item.lastScanDate=data.scanDate;
});
});
}
},
onDateSelect(value){
this.dateTimeRange=value;
// scanDate

View File

@ -373,7 +373,7 @@
</el-table-column>
<el-table-column :label="$t('跟踪预警')" align="center" prop="traceWaring" min-width="100" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<div v-if="scope.row.lastScanRecord!=null" >
<div v-if="scope.row.lastScanDate!=null" >
<div v-if="scope.row.blSign=='1'" >
已签收
</div>
@ -382,11 +382,11 @@
<span style="color: red">{{ scope.row.problemTypeName }}</span>
</div>
<div v-else>
<span v-if="calcDeliveryTime(new Date(),scope.row.lastScanRecord.scanDate)>2" style="color: red" >
轨迹异常:停留超时{{calcDeliveryTime(new Date(),scope.row.lastScanRecord.scanDate)}} 天
<span v-if="calcDeliveryTime(new Date(),scope.row.lastScanDate)>2" style="color: red" >
轨迹异常:停留超时{{calcDeliveryTime(new Date(),scope.row.lastScanDate)}} 天
</span>
<span v-else >
{{calcDeliveryTime(new Date(),scope.row.lastScanRecord.scanDate)}}天
{{calcDeliveryTime(new Date(),scope.row.lastScanDate)}}天
</span>
</div>
</div>