emis-frontend/src/views/emis/customerService/traceWaybillDetailView.vue

217 lines
6.0 KiB
Vue
Raw Normal View History

2024-06-11 11:52:07 +00:00
<template>
<div>
2024-08-05 01:14:17 +00:00
<div v-if="billDetail" style="display: inline-flex; width: 100%; margin-top: 15px;">
2024-06-11 11:52:07 +00:00
<div style="width:80%">
<el-steps :active="active" align-center finish-status="finish">
<el-step >
<template slot="title">
2024-08-05 01:14:17 +00:00
揽收(<span >{{billDetail.sender.countryName}}</span>)
2024-06-11 11:52:07 +00:00
</template>
<span class="icon iconfont" slot="icon">&#xe7b0;</span>
</el-step>
<el-step title="发件" >
<span class="icon iconfont" slot="icon">&#xe689;</span>
</el-step>
<el-step title="到件" >
<span class="icon iconfont" slot="icon">&#xe688;</span>
</el-step>
<el-step title="派件" >
<span class="icon iconfont" slot="icon">&#xe660;</span>
</el-step>
<el-step >
<template slot="title">
2024-08-05 01:14:17 +00:00
签收(<span >{{billDetail.reciever.countryName}}</span>)
2024-08-05 03:04:35 +00:00
<!-- 签收(<span ></span>) -->
2024-06-11 11:52:07 +00:00
</template>
<span class="icon iconfont" slot="icon">&#xe819;</span>
</el-step>
</el-steps>
</div>
2024-06-27 03:15:31 +00:00
<div style="width:20%;font-size: 11px;color: gray; padding: 0px 10px;display: inline-flex;">
<div>
<!-- <el-button
2024-06-11 11:52:07 +00:00
type="primary"
@click="showGotRmk"
2024-06-27 03:15:31 +00:00
>揽收底单</el-button> -->
</div>
2024-06-19 05:41:45 +00:00
<div>
2024-06-27 03:15:31 +00:00
<div style="text-align: center;">
2024-08-05 01:14:17 +00:00
<ImagePreview height="50px" v-for="pic in (billDetail.billPicDispatchRmk.split(',') )" :key="pic" :src="pic" >
</ImagePreview>
2024-06-15 14:03:21 +00:00
</div>
2024-06-27 03:15:31 +00:00
<div style="text-align: center;">
签收底单
2024-06-15 14:03:21 +00:00
</div>
2024-06-19 05:41:45 +00:00
</div>
2024-06-11 11:52:07 +00:00
</div>
</div>
2024-08-05 03:04:35 +00:00
<el-tabs v-model="activeTab" class="center-tabs" style="margin-top: 15px;">
<el-tab-pane label="扫描记录" name="tab-1">
2024-08-07 03:54:30 +00:00
<TraceRecordList :key="resetRefreshId+'_1'" :billCode="showBillCode" @onCanSeeBillDetail="onCanSeeBillDetail"></TraceRecordList>
2024-06-11 11:52:07 +00:00
</el-tab-pane>
2024-08-05 03:04:35 +00:00
<el-tab-pane label="运单信息" v-if="canViewDetail" name="tab-2">
2024-08-07 03:54:30 +00:00
<WaybillDetailReadOnly :key="resetRefreshId+'_2'" :billCode="showBillCode"></WaybillDetailReadOnly>
2024-06-11 11:52:07 +00:00
</el-tab-pane>
2024-08-05 03:04:35 +00:00
<el-tab-pane label="查看图片" name="tab-3">
2024-08-07 03:54:30 +00:00
<BillPicList :key="resetRefreshId+'_3'" :billCode="showBillCode" ></BillPicList>
2024-06-11 11:52:07 +00:00
</el-tab-pane>
2024-08-05 03:04:35 +00:00
<el-tab-pane label="日志记录" name="tab-4">
2024-06-11 11:52:07 +00:00
</el-tab-pane>
2024-08-05 03:04:35 +00:00
<el-tab-pane label="问题件" name="tab-5">
2024-08-07 03:54:30 +00:00
<ProblemList :key="resetRefreshId+'_4'" :billCode="showBillCode"></ProblemList>
2024-06-11 11:52:07 +00:00
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import TraceRecordList from './traceRecordList.vue';
import ProblemList from './problemList.vue';
import BillPicList from './billPicList.vue';
import WaybillDetailReadOnly from '@/views/emis/emisWaybill/waybillDetailReadOnly.vue';
2024-06-27 03:15:31 +00:00
import { getWaybillDetail } from "@/api/emis/emisWaybill";
2024-08-05 01:14:17 +00:00
import { getTraceListByBillCode } from "@/api/emis/emisTmsScanRecord";
2024-06-11 11:52:07 +00:00
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
export default {
2024-06-27 03:15:31 +00:00
name: "TraceWaybillDetailView",
2024-06-11 11:52:07 +00:00
props:{
2024-06-21 17:54:53 +00:00
scanBillCode:{
type: String
2024-06-27 03:15:31 +00:00
},
2024-08-07 03:54:30 +00:00
resetRefreshId: {
type: String
},
2024-06-11 11:52:07 +00:00
},
components: {
TraceRecordList,
WaybillDetailReadOnly,
ProblemList,
BillPicList
},
dicts: [],
data() {
return {
2024-08-05 03:04:35 +00:00
activeTab:"tab-1",
2024-06-11 11:52:07 +00:00
active:1,
// 遮罩层
loading: true,
2024-08-05 03:04:35 +00:00
billDetail:null,
2024-07-01 04:32:46 +00:00
traceInfoList: [],
2024-08-05 01:14:17 +00:00
scanRecordList:[],
2024-07-01 04:32:46 +00:00
canViewDetail:false,
2024-06-11 11:52:07 +00:00
};
},
created() {
2024-06-27 03:15:31 +00:00
this.initData();
2024-06-11 11:52:07 +00:00
},
2024-08-07 03:54:30 +00:00
computed: {
showBillCode() {
return this.billCode;
},
},
2024-06-11 11:52:07 +00:00
watch: {
"billCode": {
handler (newValue, oldValue) {
2024-08-07 03:54:30 +00:00
2024-06-11 11:52:07 +00:00
},
deep: true
}
},
methods: {
2024-06-27 03:15:31 +00:00
initData(){
2024-07-01 04:32:46 +00:00
let ownerSiteCode=this.$store.getters.ownerSiteCode;
let empName = this.$store.getters.empName;
2024-06-27 03:15:31 +00:00
getWaybillDetail(this.scanBillCode).then(response => {
2024-07-01 04:32:46 +00:00
2024-06-27 03:15:31 +00:00
this.billDetail = Object.assign({},response.data);
2024-07-01 04:32:46 +00:00
// console.log("===>",this.billDetail);
//bug:848 调整后:与运单号关联的:寄件网点、目的网点、签收网点、总部、销售联系人、回款联系人 允许查看 运单信息;其他网点或员工若不相关则不允许查看;
if(
ownerSiteCode == this.billDetail.sendSiteCode
|| ownerSiteCode == this.billDetail.dispatchSiteCode
|| ownerSiteCode == this.billDetail.signSiteCode
|| ownerSiteCode == '88888'
|| empName ==this.billDetail.payee
|| empName ==this.billDetail.salesmen
){
this.canViewDetail=true;
}
2024-06-27 03:15:31 +00:00
if(this.billDetail.waybillStatus=='10'){
this.active=1;
}
else if(this.billDetail.waybillStatus=='20'){
this.active=2;
}
else if(this.billDetail.waybillStatus=='30'){
this.active=3;
}
else if(this.billDetail.waybillStatus=='40'){
this.active=4;
}
else if(this.billDetail.waybillStatus=='50'){
this.active=5;
}else{
this.active=2;
}
});
2024-08-05 01:14:17 +00:00
2024-06-11 11:52:07 +00:00
},
2024-08-05 03:04:35 +00:00
onCanSeeBillDetail(isCan){
console.log("======>onCanSeeBillDetail=====>",isCan);
this.canViewDetail=isCan;
},
2024-08-05 01:14:17 +00:00
2024-06-27 03:15:31 +00:00
showGotRmk(){
2024-06-11 11:52:07 +00:00
},
calcDeliveryTime(startData,endDate){
return timeDiffTime(startData,endDate)
},
}
};
</script>
<style lang="scss">
.margin-top{
margin-top: 20px;
}
.el-descriptions-item__label.is-bordered-label {
min-width: 80px;
}
.printMeClass {
font-family: SimHei;
label {
font-weight: normal;
}
}
// :deep .el-step__head.is-success {
// color: rgb(52, 158, 250);
// border-color: rgb(52, 158, 250);
// }
// :deep .el-step__title.is-success {
// font-weight: bold;
// color: rgb(52, 158, 250);
// }
// :deep .el-step__description.is-success {
// color: rgb(52, 158, 250);
// }
</style>