Browse Source

fix(automatedWarehouse): 将消息提示改为弹窗提示

- 将栈板扫描时的输入验证错误提示改为弹窗
- 将获取栈板信息失败的错误提示改为弹窗
- 将更新操作失败的错误提示改为弹窗
- 将获取区域、站点、托盘类型列表失败的错误提示改为弹窗
- 将位置信息加载失败的错误提示改为弹窗
- 将标签扫描时的位置和层数选择验证改为弹窗提示
- 将组托和分拣操作的验证错误提示改为弹窗
- 将托盘合并和调用操作的错误提示改为弹窗
- 将预留取消操作的错误提示改为弹窗
master
常熟吴彦祖 3 weeks ago
parent
commit
c97534f653
  1. 61
      src/views/modules/automatedWarehouse/palletAssembly.vue
  2. 8
      src/views/modules/automatedWarehouse/palletMerge.vue
  3. 70
      src/views/modules/automatedWarehouse/palletPacking.vue
  4. 6
      src/views/modules/automatedWarehouse/palletSearch.vue
  5. 64
      src/views/modules/automatedWarehouse/palletSorting.vue
  6. 64
      src/views/modules/automatedWarehouse/palletSortingNoAgv.vue

61
src/views/modules/automatedWarehouse/palletAssembly.vue

@ -1,4 +1,4 @@
<template>
<template>
<div>
<div class="pda-container">
<!-- 头部栏 -->
@ -670,7 +670,7 @@ export default {
// - rqrq
handlePalletScan() {
if (!this.palletCode.trim()) {
this.$message.error('请输入栈板编码');
this.$alert('请输入栈板编码', '错误', { confirmButtonText: '确定' });
return;
}
@ -776,11 +776,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: '确定' });
});
},
@ -898,11 +898,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: '确定' });
});
},
@ -921,11 +921,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
@ -937,11 +937,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: '确定' });
});
},
@ -962,11 +962,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: '确定' });
});
},
@ -1089,11 +1089,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: '确定' });
});
},
@ -1142,7 +1142,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 = [];
@ -1150,7 +1150,7 @@ export default {
});
}).catch(error => {
console.error('获取位置信息失败:', error);
this.$message.error('获取位置信息失败');
this.$alert('获取位置信息失败', '错误', { confirmButtonText: '确定' });
// - rqrq
this.availablePositions = [];
this.positionGrid = [];
@ -1219,18 +1219,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;
}
@ -1414,11 +1414,11 @@ export default {
//
confirmEditPosition() {
if (!this.editPosition) {
this.$message.error('请选择位置');
this.$alert('请选择位置', '错误', { confirmButtonText: '确定' });
return;
}
if (!this.editLayer) {
this.$message.error('请选择层数');
this.$alert('请选择层数', '错误', { confirmButtonText: '确定' });
return;
}
@ -1443,11 +1443,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;
@ -1468,13 +1468,13 @@ export default {
//
handleCompleteAssembly() {
if (!this.palletCode) {
this.$message.error('请先扫描栈板');
this.$alert('请先扫描栈板', '错误', { confirmButtonText: '确定' });
return;
}
//
if (!this.detailList || this.detailList.length === 0) {
this.$message.error('栈板明细为空,请先扫进物料');
this.$alert('栈板明细为空,请先扫进物料', '错误', { confirmButtonText: '确定' });
return;
}
@ -1531,15 +1531,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;
}
@ -1562,11 +1562,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;
@ -1870,3 +1870,4 @@ export default {
}
}
</style>

8
src/views/modules/automatedWarehouse/palletMerge.vue

@ -200,7 +200,7 @@ export default {
// - rqrq
const scannedCode = this.processScanInput(this.sourcePalletCode)
if (!scannedCode) {
this.$message.error('请输入来源托盘编码')
this.$alert('请输入来源托盘编码', '错误', { confirmButtonText: '确定' })
return
}
@ -287,7 +287,7 @@ export default {
// - rqrq
const scannedCode = this.processScanInput(this.targetPalletCode)
if (!scannedCode) {
this.$message.error('请输入目标托盘编码')
this.$alert('请输入目标托盘编码', '错误', { confirmButtonText: '确定' })
return
}
@ -304,7 +304,7 @@ export default {
// 使- rqrq
if (this.sourcePalletCode && realPalletId === this.sourcePalletCode) {
this.$message.error('目标托盘不能与来源托盘相同')
this.$alert('目标托盘不能与来源托盘相同', '错误', { confirmButtonText: '确定' })
this.targetPalletCode = ''
return
}
@ -406,7 +406,7 @@ export default {
// - rqrq
handleMerge() {
if (!this.canMerge) {
this.$message.error('请先扫描来源托盘和目标托盘')
this.$alert('请先扫描来源托盘和目标托盘', '错误', { confirmButtonText: '确定' })
return
}

70
src/views/modules/automatedWarehouse/palletPacking.vue

@ -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;

6
src/views/modules/automatedWarehouse/palletSearch.vue

@ -357,7 +357,7 @@ export default {
// - rqrq
handleBatchCancelReserve() {
if (this.locationCode === '1101') {
this.$message.error('栈板在库位1101上,不允许取消预留');
this.$alert('栈板在库位1101上,不允许取消预留', '错误', { confirmButtonText: '确定' });
return;
}
@ -386,11 +386,11 @@ export default {
// - rqrq
this.loadReservedLabels();
} else {
this.$message.error(data.msg || '取消预留失败');
this.$alert(data.msg || '取消预留失败', '错误', { confirmButtonText: '确定' });
}
}).catch(error => {
console.error('批量取消预留失败:', error);
this.$message.error('取消预留异常');
this.$alert('取消预留异常', '错误', { confirmButtonText: '确定' });
}).finally(() => {
this.cancelReserveLoading = false;
});

64
src/views/modules/automatedWarehouse/palletSorting.vue

@ -606,7 +606,7 @@ export default {
// - rqrq
handlePalletScan() {
if (!this.palletCode.trim()) {
this.$message.error('请输入栈板编码');
this.$alert('请输入栈板编码', '错误', { confirmButtonText: '确定' });
return;
}
@ -716,11 +716,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: '确定' });
});
},
@ -838,11 +838,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: '确定' });
});
},
@ -858,11 +858,11 @@ export default {
this.callStartStationOptions = data.stations || [];
console.log('起始站点列表:', this.callStartStationOptions);
} else {
this.$message.error(data.msg || '获取起始站点列表失败');
this.$alert(data.msg || '获取起始站点列表失败', '错误', { confirmButtonText: '确定' });
}
}).catch(error => {
console.error('获取起始站点列表失败:', error);
this.$message.error('获取起始站点列表失败');
this.$alert('获取起始站点列表失败', '错误', { confirmButtonText: '确定' });
});
//
@ -870,11 +870,11 @@ export default {
if (data && data.code === 0) {
this.callTargetStationOptions = data.stations || [];
} else {
this.$message.error(data.msg || '获取目标站点列表失败');
this.$alert(data.msg || '获取目标站点列表失败', '错误', { confirmButtonText: '确定' });
}
}).catch(error => {
console.error('获取目标站点列表失败:', error);
this.$message.error('获取目标站点列表失败');
this.$alert('获取目标站点列表失败', '错误', { confirmButtonText: '确定' });
});
},
@ -997,11 +997,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: '确定' });
});
},
@ -1050,7 +1050,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 = [];
@ -1058,7 +1058,7 @@ export default {
});
}).catch(error => {
console.error('获取位置信息失败:', error);
this.$message.error('获取位置信息失败');
this.$alert('获取位置信息失败', '错误', { confirmButtonText: '确定' });
// - rqrq
this.availablePositions = [];
this.positionGrid = [];
@ -1127,18 +1127,18 @@ export default {
// - rqrq
handleLabelScan() {
if (!this.scanCode.trim()) {
this.$message.error('请输入标签编码');
this.$alert('请输入标签编码', '错误', { confirmButtonText: '确定' });
return;
}
if (this.operationType === 'in') {
// - rqrq
if (!this.scanPosition) {
this.$message.error('请选择位置');
this.$alert('请选择位置', '错误', { confirmButtonText: '确定' });
return;
}
if (!this.scanLayer) {
this.$message.error('请选择层数');
this.$alert('请选择层数', '错误', { confirmButtonText: '确定' });
return;
}
@ -1329,7 +1329,7 @@ export default {
// - rqrq
const originalData = this.originalDetailCache[this.scanCode];
if (!originalData) {
this.$message.error('未找到该标签的原始数据,无法扫回');
this.$alert('未找到该标签的原始数据,无法扫回', '错误', { confirmButtonText: '确定' });
this.scanCode = '';
this.$nextTick(() => {
if (this.$refs.scanInput) {
@ -1463,11 +1463,11 @@ export default {
//
confirmEditPosition() {
if (!this.editPosition) {
this.$message.error('请选择位置');
this.$alert('请选择位置', '错误', { confirmButtonText: '确定' });
return;
}
if (!this.editLayer) {
this.$message.error('请选择层数');
this.$alert('请选择层数', '错误', { confirmButtonText: '确定' });
return;
}
@ -1492,11 +1492,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;
@ -1517,13 +1517,13 @@ export default {
//
handleCompleteAssembly() {
if (!this.palletCode) {
this.$message.error('请先扫描栈板');
this.$alert('请先扫描栈板', '错误', { confirmButtonText: '确定' });
return;
}
//
if (!this.detailList || this.detailList.length === 0) {
this.$message.error('栈板明细为空,请先扫进物料');
this.$alert('栈板明细为空,请先扫进物料', '错误', { confirmButtonText: '确定' });
return;
}
@ -1582,17 +1582,17 @@ export default {
// Call
confirmCallPallet() {
if (!this.selectedCallStartStation) {
this.$message.error('请选择起始站点');
this.$alert('请选择起始站点', '错误', { confirmButtonText: '确定' });
return;
}
if (!this.selectedCallTargetStation) {
this.$message.error('请选择目标站点');
this.$alert('请选择目标站点', '错误', { confirmButtonText: '确定' });
return;
}
//
if (this.selectedCallStartStation === this.selectedCallTargetStation) {
this.$message.error('起始站点和目标站点不能相同');
this.$alert('起始站点和目标站点不能相同', '错误', { confirmButtonText: '确定' });
return;
}
@ -1608,11 +1608,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(() => {
//
this.callPalletLoading = false;
@ -1634,13 +1634,13 @@ export default {
// - rqrq
handleFinishSorting() {
if (!this.palletCode) {
this.$message.error('请先扫描栈板');
this.$alert('请先扫描栈板', '错误', { confirmButtonText: '确定' });
return;
}
//
// if (!this.detailList || this.detailList.length === 0) {
// this.$message.error('');
// this.$alert('', '', { confirmButtonText: '' });
// return;
// }
@ -1670,11 +1670,11 @@ export default {
// - rqrq
this.resetPage();
} else {
this.$message.error(data.msg || '结束分拣失败');
this.$alert(data.msg || '结束分拣失败', '错误', { confirmButtonText: '确定' });
}
}).catch(error => {
console.error('结束分拣失败:', error);
this.$message.error('结束分拣失败');
this.$alert('结束分拣失败', '错误', { confirmButtonText: '确定' });
}).finally(() => {
// - rqrq
this.finishSortingLoading = false;

64
src/views/modules/automatedWarehouse/palletSortingNoAgv.vue

@ -606,7 +606,7 @@ export default {
// - rqrq
handlePalletScan() {
if (!this.palletCode.trim()) {
this.$message.error('请输入栈板编码');
this.$alert('请输入栈板编码', '错误', { confirmButtonText: '确定' });
return;
}
@ -716,11 +716,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: '确定' });
});
},
@ -838,11 +838,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: '确定' });
});
},
@ -858,11 +858,11 @@ export default {
this.callStartStationOptions = data.stations || [];
console.log('起始站点列表:', this.callStartStationOptions);
} else {
this.$message.error(data.msg || '获取起始站点列表失败');
this.$alert(data.msg || '获取起始站点列表失败', '错误', { confirmButtonText: '确定' });
}
}).catch(error => {
console.error('获取起始站点列表失败:', error);
this.$message.error('获取起始站点列表失败');
this.$alert('获取起始站点列表失败', '错误', { confirmButtonText: '确定' });
});
//
@ -870,11 +870,11 @@ export default {
if (data && data.code === 0) {
this.callTargetStationOptions = data.stations || [];
} else {
this.$message.error(data.msg || '获取目标站点列表失败');
this.$alert(data.msg || '获取目标站点列表失败', '错误', { confirmButtonText: '确定' });
}
}).catch(error => {
console.error('获取目标站点列表失败:', error);
this.$message.error('获取目标站点列表失败');
this.$alert('获取目标站点列表失败', '错误', { confirmButtonText: '确定' });
});
},
@ -997,11 +997,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: '确定' });
});
},
@ -1050,7 +1050,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 = [];
@ -1058,7 +1058,7 @@ export default {
});
}).catch(error => {
console.error('获取位置信息失败:', error);
this.$message.error('获取位置信息失败');
this.$alert('获取位置信息失败', '错误', { confirmButtonText: '确定' });
// - rqrq
this.availablePositions = [];
this.positionGrid = [];
@ -1127,18 +1127,18 @@ export default {
// - rqrq
handleLabelScan() {
if (!this.scanCode.trim()) {
this.$message.error('请输入标签编码');
this.$alert('请输入标签编码', '错误', { confirmButtonText: '确定' });
return;
}
if (this.operationType === 'in') {
// - rqrq
if (!this.scanPosition) {
this.$message.error('请选择位置');
this.$alert('请选择位置', '错误', { confirmButtonText: '确定' });
return;
}
if (!this.scanLayer) {
this.$message.error('请选择层数');
this.$alert('请选择层数', '错误', { confirmButtonText: '确定' });
return;
}
@ -1329,7 +1329,7 @@ export default {
// - rqrq
const originalData = this.originalDetailCache[this.scanCode];
if (!originalData) {
this.$message.error('未找到该标签的原始数据,无法扫回');
this.$alert('未找到该标签的原始数据,无法扫回', '错误', { confirmButtonText: '确定' });
this.scanCode = '';
this.$nextTick(() => {
if (this.$refs.scanInput) {
@ -1463,11 +1463,11 @@ export default {
//
confirmEditPosition() {
if (!this.editPosition) {
this.$message.error('请选择位置');
this.$alert('请选择位置', '错误', { confirmButtonText: '确定' });
return;
}
if (!this.editLayer) {
this.$message.error('请选择层数');
this.$alert('请选择层数', '错误', { confirmButtonText: '确定' });
return;
}
@ -1492,11 +1492,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;
@ -1517,13 +1517,13 @@ export default {
//
handleCompleteAssembly() {
if (!this.palletCode) {
this.$message.error('请先扫描栈板');
this.$alert('请先扫描栈板', '错误', { confirmButtonText: '确定' });
return;
}
//
if (!this.detailList || this.detailList.length === 0) {
this.$message.error('栈板明细为空,请先扫进物料');
this.$alert('栈板明细为空,请先扫进物料', '错误', { confirmButtonText: '确定' });
return;
}
@ -1582,17 +1582,17 @@ export default {
// Call
confirmCallPallet() {
if (!this.selectedCallStartStation) {
this.$message.error('请选择起始站点');
this.$alert('请选择起始站点', '错误', { confirmButtonText: '确定' });
return;
}
if (!this.selectedCallTargetStation) {
this.$message.error('请选择目标站点');
this.$alert('请选择目标站点', '错误', { confirmButtonText: '确定' });
return;
}
//
if (this.selectedCallStartStation === this.selectedCallTargetStation) {
this.$message.error('起始站点和目标站点不能相同');
this.$alert('起始站点和目标站点不能相同', '错误', { confirmButtonText: '确定' });
return;
}
@ -1608,11 +1608,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(() => {
//
this.callPalletLoading = false;
@ -1634,13 +1634,13 @@ export default {
// - rqrq
handleFinishSorting() {
if (!this.palletCode) {
this.$message.error('请先扫描栈板');
this.$alert('请先扫描栈板', '错误', { confirmButtonText: '确定' });
return;
}
//
// if (!this.detailList || this.detailList.length === 0) {
// this.$message.error('');
// this.$alert('', '', { confirmButtonText: '' });
// return;
// }
@ -1670,11 +1670,11 @@ export default {
// - rqrq
this.resetPage();
} else {
this.$message.error(data.msg || '结束分拣失败');
this.$alert(data.msg || '结束分拣失败', '错误', { confirmButtonText: '确定' });
}
}).catch(error => {
console.error('结束分拣失败:', error);
this.$message.error('结束分拣失败');
this.$alert('结束分拣失败', '错误', { confirmButtonText: '确定' });
}).finally(() => {
// - rqrq
this.finishSortingLoading = false;

Loading…
Cancel
Save