md
This commit is contained in:
parent
54f3151c2e
commit
22fdb4c142
@ -23,13 +23,15 @@ export default {
|
||||
reverse: false,
|
||||
loading: true,
|
||||
isNeedTrace:false,
|
||||
showUrl:null,
|
||||
deviceNo:null,
|
||||
|
||||
beginTraceDate:null,
|
||||
endTraceDate:null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
traceMapUrl: function () {
|
||||
return "https://lbs.jtrs56.com/showTraceMap?deviceNo="+this.deviceNo;
|
||||
return "https://lbs.jtrs56.com/showTraceMap?deviceNo="+this.deviceNo+"&beginDate="+beginTraceDate+"&endDate="+endTraceDate;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
@ -44,22 +46,31 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
|
||||
initData() {
|
||||
async initData() {
|
||||
this.isNeedTrace=true;
|
||||
if(this.billCode) {
|
||||
getDeviceNoByBillCode(this.billCode).then(response => {
|
||||
let res=await getDeviceNoByBillCode(this.billCode);
|
||||
if(res.code==200){
|
||||
this.deviceNo=response.data;
|
||||
if(this.deviceNo!='-1'){
|
||||
this.isNeedTrace=true;
|
||||
let resBillDtl=getWaybillDetail(this.billCode);
|
||||
if(resBillDtl.code==200){
|
||||
|
||||
let billDetail=resBillDtl.data;
|
||||
this.beginTraceDate=billDetail.sendDate;
|
||||
this.endTraceDate=billDetail.signDate
|
||||
if(this.endTraceDate==null){
|
||||
this.endTraceDate=new Date();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}else{
|
||||
this.deviceNo=null;
|
||||
}
|
||||
},
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user