|
@@ -238,10 +238,20 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ _getToDay(){
|
|
|
|
|
+ let now = new Date();
|
|
|
|
|
+ let yy = now.getFullYear();
|
|
|
|
|
+ let mm = now.getMonth() + 1;
|
|
|
|
|
+ let dd = now.getDate();
|
|
|
|
|
+ let hh = now.getHours();
|
|
|
|
|
+ let m = now.getMinutes();
|
|
|
|
|
+ let ss = now.getSeconds();
|
|
|
|
|
+ return yy+'-'+(mm<10 ? '0'+mm : mm)+'-'+(dd<10 ? '0'+dd : dd)+" "+(hh<10 ? '0'+hh : hh)+":"+(m<10 ? '0'+m : m)+":"+(ss<10 ? '0'+ss : ss);
|
|
|
|
|
+ },
|
|
|
failRetry(){
|
|
failRetry(){
|
|
|
this.data.forEach(item=>{
|
|
this.data.forEach(item=>{
|
|
|
if (!item.status){
|
|
if (!item.status){
|
|
|
- window.axios.post('{{url('record')}}',{logisticNumber:item.logisticNumber,warehouse:this.selected},{
|
|
|
|
|
|
|
+ window.axios.post('{{url('record')}}',{logisticNumber:item.logisticNumber,locationAt:item.locationAt,warehouse:this.selected},{
|
|
|
headers: {
|
|
headers: {
|
|
|
"jwtToken" : this.jwtToken
|
|
"jwtToken" : this.jwtToken
|
|
|
}
|
|
}
|
|
@@ -266,7 +276,8 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
submitRecord(logisticNumber,recordAt){
|
|
submitRecord(logisticNumber,recordAt){
|
|
|
- window.axios.post('{{url('record')}}',{logisticNumber:logisticNumber,warehouse:this.selected},{
|
|
|
|
|
|
|
+ let dateTime = this._getToDay();
|
|
|
|
|
+ window.axios.post('{{url('record')}}',{logisticNumber:logisticNumber,locationAt:dateTime,warehouse:this.selected},{
|
|
|
headers: {
|
|
headers: {
|
|
|
"jwtToken" : this.jwtToken,
|
|
"jwtToken" : this.jwtToken,
|
|
|
}
|
|
}
|
|
@@ -282,6 +293,7 @@
|
|
|
}
|
|
}
|
|
|
this.buildToast(status,logisticNumber);
|
|
this.buildToast(status,logisticNumber);
|
|
|
this.data.unshift({
|
|
this.data.unshift({
|
|
|
|
|
+ locationAt:dateTime,
|
|
|
logisticNumber:logisticNumber,logistic:status ? res.data.logistic : "未知",recordAt:status ? res.data.recordAt : recordAt,status:status
|
|
logisticNumber:logisticNumber,logistic:status ? res.data.logistic : "未知",recordAt:status ? res.data.recordAt : recordAt,status:status
|
|
|
});
|
|
});
|
|
|
if (!status)this.errorSum++;
|
|
if (!status)this.errorSum++;
|
|
@@ -290,6 +302,7 @@
|
|
|
this.playAudio('storage/networkError.mp3');
|
|
this.playAudio('storage/networkError.mp3');
|
|
|
this.buildToast(false,logisticNumber);
|
|
this.buildToast(false,logisticNumber);
|
|
|
this.data.unshift({
|
|
this.data.unshift({
|
|
|
|
|
+ locationAt:dateTime,
|
|
|
logisticNumber:logisticNumber,logistic:"未知",recordAt:recordAt,status:false
|
|
logisticNumber:logisticNumber,logistic:"未知",recordAt:recordAt,status:false
|
|
|
});
|
|
});
|
|
|
this.errorSum++;
|
|
this.errorSum++;
|