|
|
|
@ -747,7 +747,7 @@ export default { |
|
|
|
// 扫描栈板 - rqrq |
|
|
|
handlePalletScan() { |
|
|
|
if (!this.palletCode.trim()) { |
|
|
|
this.$message.error('请输入栈板编码'); |
|
|
|
this.$alert('请输入栈板编码', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -851,11 +851,11 @@ export default { |
|
|
|
// 加载托盘类型列表(根据palletFamily过滤) |
|
|
|
this.loadPalletTypeList(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取栈板信息失败'); |
|
|
|
this.$alert(data.msg || '获取栈板信息失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取栈板信息失败:', error); |
|
|
|
this.$message.error('获取栈板信息失败'); |
|
|
|
this.$alert('获取栈板信息失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
@ -973,11 +973,11 @@ export default { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success('更新成功'); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '更新失败'); |
|
|
|
this.$alert(data.msg || '更新失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('更新失败:', error); |
|
|
|
this.$message.error('更新失败'); |
|
|
|
this.$alert('更新失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
@ -996,11 +996,11 @@ export default { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.callAreaOptions = data.rows || []; |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取区域列表失败'); |
|
|
|
this.$alert(data.msg || '获取区域列表失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取区域列表失败:', error); |
|
|
|
this.$message.error('获取区域列表失败'); |
|
|
|
this.$alert('获取区域列表失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
}); |
|
|
|
|
|
|
|
// 获取栈板类型列表(active='Y')- rqrq |
|
|
|
@ -1012,11 +1012,11 @@ export default { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.callPalletTypeOptions = data.rows || []; |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取栈板类型列表失败'); |
|
|
|
this.$alert(data.msg || '获取栈板类型列表失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取栈板类型列表失败:', error); |
|
|
|
this.$message.error('获取栈板类型列表失败'); |
|
|
|
this.$alert('获取栈板类型列表失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1037,11 +1037,11 @@ export default { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.callStationOptions = data.rows || []; |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取站点列表失败'); |
|
|
|
this.$alert(data.msg || '获取站点列表失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取站点列表失败:', error); |
|
|
|
this.$message.error('获取站点列表失败'); |
|
|
|
this.$alert('获取站点列表失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1165,11 +1165,11 @@ export default { |
|
|
|
// 加载位置网格 - rqrq |
|
|
|
this.loadAvailablePositions(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取栈板信息失败'); |
|
|
|
this.$alert(data.msg || '获取栈板信息失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取栈板信息失败:', error); |
|
|
|
this.$message.error('获取栈板信息失败'); |
|
|
|
this.$alert('获取栈板信息失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1218,7 +1218,7 @@ export default { |
|
|
|
|
|
|
|
console.log('位置网格加载完成 - 总位置:' + this.positionGrid.length + ',可用:' + this.availablePositions.length + ' - rqrq'); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取位置信息失败'); |
|
|
|
this.$alert(data.msg || '获取位置信息失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
// 失败后保持全部禁用 - rqrq |
|
|
|
this.availablePositions = []; |
|
|
|
this.positionGrid = []; |
|
|
|
@ -1226,7 +1226,7 @@ export default { |
|
|
|
}); |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取位置信息失败:', error); |
|
|
|
this.$message.error('获取位置信息失败'); |
|
|
|
this.$alert('获取位置信息失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
// 失败后保持全部禁用 - rqrq |
|
|
|
this.availablePositions = []; |
|
|
|
this.positionGrid = []; |
|
|
|
@ -1294,18 +1294,18 @@ export default { |
|
|
|
// 处理标签扫描 - rqrq |
|
|
|
handleLabelScan() { |
|
|
|
if (!this.scanCode.trim()) { |
|
|
|
this.$message.error('请输入标签编码'); |
|
|
|
this.$alert('请输入标签编码', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (this.operationType === 'in') { |
|
|
|
// 扫进操作 |
|
|
|
if (!this.scanPosition) { |
|
|
|
this.$message.error('请选择位置'); |
|
|
|
this.$alert('请选择位置', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!this.scanLayer) { |
|
|
|
this.$message.error('请选择层数'); |
|
|
|
this.$alert('请选择层数', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1489,11 +1489,11 @@ export default { |
|
|
|
// 确定修改位置 |
|
|
|
confirmEditPosition() { |
|
|
|
if (!this.editPosition) { |
|
|
|
this.$message.error('请选择位置'); |
|
|
|
this.$alert('请选择位置', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!this.editLayer) { |
|
|
|
this.$message.error('请选择层数'); |
|
|
|
this.$alert('请选择层数', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1518,11 +1518,11 @@ export default { |
|
|
|
this.closeEditPositionModal(); |
|
|
|
this.refreshTable(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '位置修改失败'); |
|
|
|
this.$alert(data.msg || '位置修改失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('位置修改失败:', error); |
|
|
|
this.$message.error('位置修改失败'); |
|
|
|
this.$alert('位置修改失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
}).finally(() => { |
|
|
|
// 无论成功或失败,都要恢复按钮状态 |
|
|
|
this.editPositionLoading = false; |
|
|
|
@ -1543,7 +1543,7 @@ export default { |
|
|
|
// 运输指令按钮点击事件 |
|
|
|
handleTransportOrder() { |
|
|
|
if (!this.palletCode) { |
|
|
|
this.$message.error('请先扫描栈板'); |
|
|
|
this.$alert('请先扫描栈板', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1556,7 +1556,7 @@ export default { |
|
|
|
// 从返回数据中获取栈板位置信息 |
|
|
|
this.currentPalletStation = data.locationCode || ''; |
|
|
|
if (!this.currentPalletStation) { |
|
|
|
this.$message.error('无法获取当前栈板位置'); |
|
|
|
this.$alert('无法获取当前栈板位置', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.palletCode=data.palletId |
|
|
|
@ -1594,29 +1594,29 @@ export default { |
|
|
|
this.$message.warning('当前没有可用的目标区域,所有站点可能都已被占用'); |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取站点列表失败'); |
|
|
|
this.$alert(data.msg || '获取站点列表失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取站点列表失败:', error); |
|
|
|
this.$message.error('获取站点列表失败'); |
|
|
|
this.$alert('获取站点列表失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取栈板信息失败'); |
|
|
|
this.$alert(data.msg || '获取栈板信息失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取栈板信息失败:', error); |
|
|
|
this.$message.error('获取栈板信息失败'); |
|
|
|
this.$alert('获取栈板信息失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 确认创建运输任务 |
|
|
|
confirmTransportTask() { |
|
|
|
if (!this.currentPalletStation) { |
|
|
|
this.$message.error('无法获取当前栈板位置'); |
|
|
|
this.$alert('无法获取当前栈板位置', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
// if (!this.selectedTargetArea) { |
|
|
|
// this.$message.error('请选择目标区域'); |
|
|
|
// this.$alert('请选择目标区域', '错误', { confirmButtonText: '确定' }); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
//默认写死入库 |
|
|
|
@ -1672,15 +1672,15 @@ export default { |
|
|
|
confirmCallPallet() { |
|
|
|
// 参数校验 - rqrq |
|
|
|
if (!this.selectedCallArea) { |
|
|
|
this.$message.error('请选择区域'); |
|
|
|
this.$alert('请选择区域', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!this.selectedCallStation) { |
|
|
|
this.$message.error('请选择站点'); |
|
|
|
this.$alert('请选择站点', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!this.selectedCallPalletType) { |
|
|
|
this.$message.error('请选择栈板类型'); |
|
|
|
this.$alert('请选择栈板类型', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1703,11 +1703,11 @@ export default { |
|
|
|
this.$message.success('空托盘调用任务创建成功'); |
|
|
|
this.closeCallPalletModal(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '调用空托盘失败'); |
|
|
|
this.$alert(data.msg || '调用空托盘失败', '错误', { confirmButtonText: '确定' }); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('调用空托盘失败:', error); |
|
|
|
this.$message.error('异常:'+error); |
|
|
|
this.$alert('异常:'+error, '错误', { confirmButtonText: '确定' }); |
|
|
|
}).finally(() => { |
|
|
|
// 无论成功或失败,都要恢复按钮状态 - rqrq |
|
|
|
this.callPalletLoading = false; |
|
|
|
|