|
|
@ -283,9 +283,10 @@ export default { |
|
|
*/ |
|
|
*/ |
|
|
handleWebSocketMessage(message) { |
|
|
handleWebSocketMessage(message) { |
|
|
if (message && message.code === 0) { |
|
|
if (message && message.code === 0) { |
|
|
this.containerPickingList = message.data.containerList |
|
|
|
|
|
this.materialPickingList = message.data.materialList |
|
|
|
|
|
// 如果storageBatchNo.length>10,则status改成分拣中 |
|
|
|
|
|
|
|
|
this.containerPickingList = message.data.containerList || [] |
|
|
|
|
|
this.materialPickingList = message.data.materialList || [] |
|
|
|
|
|
|
|
|
|
|
|
// 如果 storageBatchNo.length < 10,则 status 改成 分拣中 |
|
|
this.containerPickingList.forEach(item => { |
|
|
this.containerPickingList.forEach(item => { |
|
|
if (item.storageBatchNo && item.storageBatchNo.length < 10) { |
|
|
if (item.storageBatchNo && item.storageBatchNo.length < 10) { |
|
|
item.status = '分拣中' |
|
|
item.status = '分拣中' |
|
|
@ -298,6 +299,20 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 排序:分拣中 在最上面 |
|
|
|
|
|
this.containerPickingList.sort((a, b) => { |
|
|
|
|
|
if (a.status === '分拣中' && b.status !== '分拣中') return -1 |
|
|
|
|
|
if (a.status !== '分拣中' && b.status === '分拣中') return 1 |
|
|
|
|
|
return 0 |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.materialPickingList.sort((a, b) => { |
|
|
|
|
|
if (a.status === '分拣中' && b.status !== '分拣中') return -1 |
|
|
|
|
|
if (a.status !== '分拣中' && b.status === '分拣中') return 1 |
|
|
|
|
|
return 0 |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|