|
|
@@ -48,28 +48,26 @@
|
|
|
<div class="text-center" style="font-size: 12px;">
|
|
|
@{{ current_stationTaskBatch.batch.owner.name }}
|
|
|
</div>
|
|
|
+ <div class="col text-muted text-left">
|
|
|
+ <img id="barcode" :alt="batchCode">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="col">
|
|
|
- <button class="btn btn-lg mt-4" @click="runTheTaskBatch()"
|
|
|
- :class="[
|
|
|
+ <div class="col text-center">
|
|
|
+ <button class="btn btn-lg mt-4" @click="runTheTaskBatch()"
|
|
|
+ :class="[
|
|
|
(current_stationTaskBatch.runningStatus==='')?'btn-info':'',
|
|
|
(current_stationTaskBatch.runningStatus==='请求中')?'btn-dark':'',
|
|
|
(current_stationTaskBatch.runningStatus==='请求失败')?'btn-danger':'',
|
|
|
(current_stationTaskBatch.runningStatus==='请求成功')?'btn-success':'',
|
|
|
(current_stationTaskBatch.runningStatus==='请求异常')?'btn-danger':'',
|
|
|
]"
|
|
|
- >
|
|
|
- <span v-if="!current_stationTaskBatch.runningStatus">执行</span>
|
|
|
- <span v-if="current_stationTaskBatch.runningStatus==='请求中'">请求中</span>
|
|
|
- <span v-if="current_stationTaskBatch.runningStatus==='请求失败'">(失败)重新执行</span>
|
|
|
- <span v-if="current_stationTaskBatch.runningStatus==='请求成功'">(请求成功)重新执行</span>
|
|
|
- <span v-if="current_stationTaskBatch.runningStatus==='请求异常'">(请求异常)重新执行</span>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row">
|
|
|
- <div class="col text-muted text-left">
|
|
|
- <img id="barcode" :alt="batchCode">
|
|
|
+ >
|
|
|
+ <span v-if="!current_stationTaskBatch.runningStatus">执行</span>
|
|
|
+ <span v-if="current_stationTaskBatch.runningStatus==='请求中'">请求中</span>
|
|
|
+ <span v-if="current_stationTaskBatch.runningStatus==='请求失败'">(失败)重新执行</span>
|
|
|
+ <span v-if="current_stationTaskBatch.runningStatus==='请求成功'">(请求成功)重新执行</span>
|
|
|
+ <span v-if="current_stationTaskBatch.runningStatus==='请求异常'">(请求异常)重新执行</span>
|
|
|
+ </button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="text-center my-2" style="overflow-y: scroll;max-height:200px;">
|
|
|
@@ -386,7 +384,7 @@
|
|
|
console.log((new Date()).toTimeString(),msg);
|
|
|
let json = JSON.parse(msg.json);
|
|
|
if(!json||json.length===0)return;
|
|
|
- this.station['current_station_task']=json;
|
|
|
+ this.task=json;
|
|
|
});
|
|
|
},
|
|
|
selectBatch(stationTaskBatch){
|
|
|
@@ -430,8 +428,8 @@
|
|
|
},
|
|
|
computed:{
|
|
|
task(){
|
|
|
- if(!this.current_stationTaskBatch||typeof(this.current_stationTaskBatch['_'+this.current_stationTaskBatch.batch_id])==='undefined')return null;
|
|
|
- return this.stationTask_indexByBatch['_'+this.current_stationTaskBatch.batch_id]
|
|
|
+ if(!this.current_stationTaskBatch||typeof(this.stationTask_indexByBatch['_'+this.current_stationTaskBatch.batch_id])==='undefined')return null;
|
|
|
+ return this.stationTask_indexByBatch['_'+this.current_stationTaskBatch.batch_id];
|
|
|
},
|
|
|
stationTasks(){
|
|
|
if(!this.station)return;
|
|
|
@@ -468,15 +466,16 @@
|
|
|
},
|
|
|
taskCommodities(){
|
|
|
if(!this.task)return [];
|
|
|
- return this.station['current_station_task']['station_task_commodities'];
|
|
|
+ console.log('taskCommodities:',this.task['station_task_commodities'])
|
|
|
+ return this.task['station_task_commodities'];
|
|
|
},
|
|
|
taskCommoditiesListByBin(){
|
|
|
if(!this.task)return [];
|
|
|
function reIndexByBin() {
|
|
|
this.taskCommoditiesListByBinVar = [];
|
|
|
- this.taskCommoditiesListByBinVar.md5 = md5(JSON.stringify(this.station['current_station_task']['station_task_commodities']));
|
|
|
+ this.taskCommoditiesListByBinVar.md5 = md5(JSON.stringify(this.task['station_task_commodities']));
|
|
|
let _this=this;
|
|
|
- this.station['current_station_task']['station_task_commodities']
|
|
|
+ this.task['station_task_commodities']
|
|
|
.forEach(function (taskCommodity) {
|
|
|
if (typeof (_this.taskCommoditiesListByBinVar[taskCommodity['bin_number']]) === 'undefined') {
|
|
|
_this.taskCommoditiesListByBinVar[taskCommodity['bin_number']] = null;
|
|
|
@@ -489,7 +488,7 @@
|
|
|
if((typeof this.taskCommoditiesListByBinVar)==='undefined'||!this.taskCommoditiesListByBinVar){
|
|
|
return reIndexByBin.call(this);
|
|
|
}
|
|
|
- let md5Now = md5(JSON.stringify(this.station['current_station_task']['station_task_commodities']));
|
|
|
+ let md5Now = md5(JSON.stringify(this.task['station_task_commodities']));
|
|
|
|
|
|
if(this.taskCommoditiesListByBinVar.md5!==md5Now){
|
|
|
return reIndexByBin.call(this);
|