|
|
@@ -119,16 +119,16 @@
|
|
|
}else{
|
|
|
_this.currentAudioIndex=_this.currentAudioIndex+1;
|
|
|
}
|
|
|
- if (package && package.measuringMachine && package.measuringMachine.name ===_this.package.measuringMachine){
|
|
|
+ if (package && package.measuring_machine && package.measuring_machine.name ===_this.package.measuringMachine){
|
|
|
if (package.id ===_this.package.id){
|
|
|
- _this.package.measuringMachine_status=package.measuringMachine.status;
|
|
|
- _this.measuringMachinesIndex[package.package.measuringMachine.name].status=package.measuringMachine_status;
|
|
|
+ _this.package.measuringMachine_status=package.measuring_machine.status;
|
|
|
+ _this.measuringMachinesIndex[package.measuring_machine.name].status=package.measuring_machine.status;
|
|
|
tempTip.setDuration(4000);
|
|
|
tempTip.showSuccess('暂无新数据');
|
|
|
return;
|
|
|
}
|
|
|
_this.updateData(_this,package);
|
|
|
- let logistic_name = package.logistic ? package.logistic.name : '';
|
|
|
+ let logistic_name = package.order ? (package.order.logistic ? package.order.logistic.name : '') : '';
|
|
|
if (_this.logisticAudioURL[logistic_name]){
|
|
|
audio.src=_this.logisticAudioURL[logistic_name];
|
|
|
audio.play();
|
|
|
@@ -153,11 +153,6 @@
|
|
|
tempTip.showSuccess('刷新成功!');
|
|
|
}
|
|
|
});
|
|
|
- /* if(this.timer){
|
|
|
- clearInterval(this.timer);
|
|
|
- }else {
|
|
|
- this.timer=setInterval(()=>{this.flushData();},18000);
|
|
|
- }*/
|
|
|
},
|
|
|
methods:{
|
|
|
clickMeasuringMachine(e){
|
|
|
@@ -167,7 +162,7 @@
|
|
|
if (response.data.id){
|
|
|
let orderPackage=response.data;
|
|
|
_this.updateData(_this,orderPackage);
|
|
|
- _this.package.measuringMachine=orderPackage.measuringMachine ? orderPackage.measuringMachine.name : ''; }else {
|
|
|
+ _this.package.measuringMachine=orderPackage.measuring_machine ? orderPackage.measuring_machine.name : ''; }else {
|
|
|
tempTip.setDuration(4000);
|
|
|
tempTip.showSuccess('暂无数据!');
|
|
|
}
|
|
|
@@ -182,14 +177,14 @@
|
|
|
_this.package.logistic_number=package.logistic_number;
|
|
|
_this.package.orderno = package.order ? package.order.code : '';
|
|
|
_this.package.weight=package.weight;
|
|
|
- _this.package.owner=package.owner ? package.owner.name : '';
|
|
|
- _this.package.paperBox=package.paperBox ? package.paperBox.name : '';
|
|
|
+ _this.package.owner=package.order ? (package.order.owner ? package.order.owner.name : '') : '';
|
|
|
+ _this.package.paperBox=package.paper_box ? package.paper_box.name : '';
|
|
|
_this.package.recipient=package.order ? package.order.recipient : '';
|
|
|
_this.package.status=package.status;
|
|
|
_this.package.weighed_at=package.weighed_at;_this.package.bulk=package.bulk;
|
|
|
- _this.package.logistic_name=package.logistic ? package.logistic.name : '';
|
|
|
- _this.package.measuringMachine_status=package.measuringMachine ? package.measuringMachine.status : '';
|
|
|
- _this.measuringMachinesIndex[package.measuringMachine ? package.measuringMachine.name : ''].status=package.measuringMachine_status;
|
|
|
+ _this.package.logistic_name=package.order ? (package.order.logistic ? package.order.logistic.name : '') : '';
|
|
|
+ _this.package.measuringMachine_status=package.measuring_machine ? package.measuring_machine.status : '';
|
|
|
+ _this.measuringMachinesIndex[package.measuring_machine ? package.measuring_machine.name : ''].status=package.measuring_machine ? package.measuring_machine.status : '离线';
|
|
|
}
|
|
|
},
|
|
|
});
|