diff --git a/src/api/automatedWarehouse/palletPacking.js b/src/api/automatedWarehouse/palletPacking.js
index e70d435..6aeb563 100644
--- a/src/api/automatedWarehouse/palletPacking.js
+++ b/src/api/automatedWarehouse/palletPacking.js
@@ -26,3 +26,15 @@ export const getLayersForEdit = data => createAPI(`/wcsIntegration/getLayersForE
// 更新栈板明细位置 - AI制作
export const updatePalletDetailPosition = data => createAPI(`/wcsIntegration/updatePalletDetailPosition`,'post',data)
+
+// 获取AGV站点列表 - AI制作
+export const getAgvStations = data => createAPI(`/wcsIntegration/getAgvStations`,'post',data)
+
+// 根据起点站点获取可达目标站点 - AI制作
+export const getTargetStations = data => createAPI(`/wcsIntegration/getTargetStations`,'post',data)
+
+// 创建栈板运输任务 - AI制作
+export const createPalletTransportTask = data => createAPI(`/wcsIntegration/createPalletTransportTask`,'post',data)
+
+// Call栈板到指定站点 - AI制作
+export const callPalletToStation = data => createAPI(`/wcsIntegration/callPalletToStation`,'post',data)
diff --git a/src/views/modules/automatedWarehouse/palletPacking.vue b/src/views/modules/automatedWarehouse/palletPacking.vue
index 7167c94..69aea12 100644
--- a/src/views/modules/automatedWarehouse/palletPacking.vue
+++ b/src/views/modules/automatedWarehouse/palletPacking.vue
@@ -103,8 +103,11 @@
-
@@ -262,6 +264,119 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -275,7 +390,11 @@ import {
savePalletDetail,
deletePalletDetail,
getLayersForEdit,
- updatePalletDetailPosition
+ updatePalletDetailPosition,
+ getAgvStations,
+ getTargetStations,
+ createPalletTransportTask,
+ callPalletToStation
} from '../../../api/automatedWarehouse/palletPacking'
export default {
@@ -303,6 +422,18 @@ export default {
// 栈板明细
detailList: [],
+ // 运输任务模态框
+ transportModalVisible: false,
+ startStationOptions: [],
+ targetStationOptions: [],
+ selectedStartStation: '',
+ selectedTargetStation: '',
+
+ // Call栈板模态框
+ callPalletModalVisible: false,
+ callStationOptions: [],
+ selectedCallStation: '',
+
// 修改位置模态框
editPositionModalVisible: false,
editSerialNo: '',
@@ -343,10 +474,27 @@ export default {
});
},
- // Call栈板 - 预留接口
+ // Call栈板 - 选择站点
handleCallPallet() {
- // TODO: 实现Call栈板功能
- this.$message.info('Call栈板功能待实现');
+ if (!this.palletCode) {
+ this.$message.error('请先扫描栈板编码');
+ return;
+ }
+
+ this.callPalletModalVisible = true;
+ this.selectedCallStation = '';
+
+ // 获取AGV站点列表
+ getAgvStations({}).then(({ data }) => {
+ if (data.code === 0) {
+ this.callStationOptions = data.stations || [];
+ } else {
+ this.$message.error(data.msg || '获取站点列表失败');
+ }
+ }).catch(error => {
+ console.error('获取站点列表失败:', error);
+ this.$message.error('获取站点列表失败');
+ });
},
// 位置选择变化
@@ -585,6 +733,152 @@ export default {
this.editOriginalPosition = '';
this.editOriginalLayer = '';
},
+
+ // 运输指令按钮点击事件
+ handleTransportOrder() {
+ if (!this.palletCode) {
+ this.$message.error('请先扫描栈板');
+ return;
+ }
+
+ this.transportModalVisible = true;
+ this.selectedStartStation = '';
+ this.selectedTargetStation = '';
+ this.targetStationOptions = [];
+
+ // 获取AGV站点列表
+ getAgvStations({}).then(({ data }) => {
+ if (data.code === 0) {
+ this.startStationOptions = data.stations || [];
+ } else {
+ this.$message.error(data.msg || '获取站点列表失败');
+ }
+ }).catch(error => {
+ console.error('获取站点列表失败:', error);
+ this.$message.error('获取站点列表失败');
+ });
+ },
+
+ // 起点站点选择变化
+ handleStartStationChange() {
+ this.selectedTargetStation = '';
+ this.targetStationOptions = [];
+
+ if (this.selectedStartStation) {
+ getTargetStations({
+ startStation: this.selectedStartStation
+ }).then(({ data }) => {
+ if (data.code === 0) {
+ this.targetStationOptions = data.targets || [];
+ } else {
+ this.$message.error(data.msg || '获取目标站点失败');
+ }
+ }).catch(error => {
+ console.error('获取目标站点失败:', error);
+ this.$message.error('获取目标站点失败');
+ });
+ }
+ },
+
+ // 确认创建运输任务
+ confirmTransportTask() {
+ if (!this.selectedStartStation) {
+ this.$message.error('请选择起点站点');
+ return;
+ }
+ if (!this.selectedTargetStation) {
+ this.$message.error('请选择目标站点');
+ return;
+ }
+
+ createPalletTransportTask({
+ site: this.site,
+ palletId: this.palletCode,
+ startStation: this.selectedStartStation,
+ endStation: this.selectedTargetStation
+ }).then(({ data }) => {
+ if (data.code === 0) {
+ this.$message.success('运输任务创建成功');
+ this.closeTransportModal();
+ } else {
+ this.$message.error(data.msg || '创建运输任务失败');
+ }
+ }).catch(error => {
+ console.error('创建运输任务失败:', error);
+ this.$message.error('创建运输任务失败');
+ });
+ },
+
+ // 关闭运输任务模态框
+ closeTransportModal() {
+ this.transportModalVisible = false;
+ this.selectedStartStation = '';
+ this.selectedTargetStation = '';
+ this.startStationOptions = [];
+ this.targetStationOptions = [];
+ },
+
+ // 确认Call栈板
+ confirmCallPallet() {
+ if (!this.selectedCallStation) {
+ this.$message.error('请选择站点');
+ return;
+ }
+
+ callPalletToStation({
+ site: this.site,
+ palletId: this.palletCode,
+ station: this.selectedCallStation
+ }).then(({ data }) => {
+ if (data.code === 0) {
+ this.$message.success('Call栈板任务创建成功');
+ this.closeCallPalletModal();
+ } else {
+ this.$message.error(data.msg || 'Call栈板失败');
+ }
+ }).catch(error => {
+ console.error('Call栈板失败:', error);
+ this.$message.error('Call栈板失败');
+ });
+ },
+
+ // 关闭Call栈板模态框
+ closeCallPalletModal() {
+ this.callPalletModalVisible = false;
+ this.selectedCallStation = '';
+ this.callStationOptions = [];
+ },
+
+ // 确认Call栈板
+ confirmCallPallet() {
+ if (!this.selectedCallStation) {
+ this.$message.error('请选择站点');
+ return;
+ }
+
+ callPalletToStation({
+ site: this.site,
+ palletId: this.palletCode,
+ targetStation: this.selectedCallStation
+ }).then(({ data }) => {
+ if (data.code === 0) {
+ this.$message.success('Call栈板成功');
+ this.closeCallPalletModal();
+ } else {
+ this.$message.error(data.msg || 'Call栈板失败');
+ }
+ }).catch(error => {
+ console.error('Call栈板失败:', error);
+ this.$message.error('Call栈板失败');
+ });
+ },
+
+ // 关闭Call栈板模态框
+ closeCallPalletModal() {
+ this.callPalletModalVisible = false;
+ this.selectedCallStation = '';
+ this.callStationOptions = [];
+ },
},
mounted() {
this.$nextTick(() => {
@@ -687,4 +981,31 @@ export default {
::v-deep .el-radio__label {
font-size: 14px;
}
+
+/* 标题行样式 */
+.list-title-row {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 8px;
+}
+
+.list-title-row .list-title {
+ margin: 0;
+ flex: 1;
+}
+
+/* 空数据行样式 */
+.empty-row {
+ justify-content: center;
+ align-items: center;
+ padding: 20px;
+ border-bottom: none;
+}
+
+.empty-row .empty-hint {
+ text-align: center;
+ color: #999;
+ width: 100%;
+}