diff --git a/src/api/automatedWarehouse/palletPacking.js b/src/api/automatedWarehouse/palletPacking.js
index 7b003c1..72336b2 100644
--- a/src/api/automatedWarehouse/palletPacking.js
+++ b/src/api/automatedWarehouse/palletPacking.js
@@ -73,3 +73,5 @@ export const getAvailablePositionsForLayer = data => createAPI(`/wcsIntegration/
export const completePalletAssemblyForFenJian = data => createAPI(`/wcsIntegration/completePalletAssemblyForFenJian`,'post',data)
+// 调用空托盘到指定站点(选择区域、站点、栈板类型)- rqrq
+export const callEmptyPalletToStation = data => createAPI(`/wcsIntegration/callEmptyPalletToStation`,'post',data)
diff --git a/src/views/modules/automatedWarehouse/palletAssembly.vue b/src/views/modules/automatedWarehouse/palletAssembly.vue
index 78fbf7a..387ad2d 100644
--- a/src/views/modules/automatedWarehouse/palletAssembly.vue
+++ b/src/views/modules/automatedWarehouse/palletAssembly.vue
@@ -403,7 +403,7 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
+
-
+
-
- 栈板类型
+
+ >
+
+
@@ -474,9 +497,15 @@ import {
getAvailableAgvStations,
callPalletToStation,
completePalletAssembly,
- getAvailablePositionsForLayer
+ getAvailablePositionsForLayer,
+ callEmptyPalletToStation // 新增调用空托盘API - rqrq
} from '../../../api/automatedWarehouse/palletPacking'
+import {
+ getAreaOptionsForChange,
+ getStationsByArea
+} from '../../../api/automatedWarehouse/palletChangeStation'
+
export default {
data() {
return {
@@ -524,12 +553,14 @@ export default {
scanOutList: [],
scanOutModalVisible: false,
- // Call栈板模态框
+ // Call栈板模态框 - rqrq
callPalletModalVisible: false,
- callStartStationOptions: [], // 起始站点选项(statusDb=1,有货)
- callTargetStationOptions: [], // 目标站点选项(statusDb=0,空闲)
- selectedCallStartStation: '',
- selectedCallTargetStation: '',
+ callAreaOptions: [], // 可选区域列表 - rqrq
+ callStationOptions: [], // 可选站点列表 - rqrq
+ callPalletTypeOptions: [], // 栈板类型列表 - rqrq
+ selectedCallArea: '', // 选中的区域 - rqrq
+ selectedCallStation: '', // 选中的站点 - rqrq
+ selectedCallPalletType: '', // 选中的栈板类型 - rqrq
// 修改位置模态框
editPositionModalVisible: false,
@@ -814,35 +845,67 @@ export default {
});
},
- // Call栈板 - 调用空托盘
+ // Call栈板 - 调用空托盘 - rqrq
handleCallPallet() {
this.callPalletModalVisible = true;
- this.selectedCallStartStation = '';
- this.selectedCallTargetStation = '';
+ this.selectedCallArea = '';
+ this.selectedCallStation = '';
+ this.selectedCallPalletType = '';
+ this.callStationOptions = [];
+
+ // 获取可选区域列表(choose_able='Y')- rqrq
+ getAreaOptionsForChange({
+ site: this.site
+ }).then(({ data }) => {
+ if (data && data.code === 0) {
+ this.callAreaOptions = data.rows || [];
+ } else {
+ this.$message.error(data.msg || '获取区域列表失败');
+ }
+ }).catch(error => {
+ console.error('获取区域列表失败:', error);
+ this.$message.error('获取区域列表失败');
+ });
- // 获取起始站点(有货的正式站点)
- getAvailableAgvStations({ statusDb: 1 }).then(({ data }) => {
+ // 获取栈板类型列表(active='Y')- rqrq
+ getPalletTypeList({
+ site: this.site,
+ palletFamily: '', // 不过滤大分类,显示所有栈板类型 - rqrq
+ active: 'Y'
+ }).then(({ data }) => {
if (data && data.code === 0) {
- this.callStartStationOptions = data.stations || [];
- console.log('起始站点列表:', this.callStartStationOptions);
+ this.callPalletTypeOptions = data.rows || [];
} else {
- this.$message.error(data.msg || '获取起始站点列表失败');
+ this.$message.error(data.msg || '获取栈板类型列表失败');
}
}).catch(error => {
- console.error('获取起始站点列表失败:', error);
- this.$message.error('获取起始站点列表失败');
+ console.error('获取栈板类型列表失败:', error);
+ this.$message.error('获取栈板类型列表失败');
});
+ },
+
+ // 区域选择change事件 - rqrq
+ handleCallAreaChange() {
+ this.selectedCallStation = '';
+ this.callStationOptions = [];
+
+ if (!this.selectedCallArea) {
+ return;
+ }
- // 获取目标站点(空闲的正式站点)
- getAvailableAgvStations({ statusDb: 0 }).then(({ data }) => {
+ // 根据区域获取可用站点列表 - rqrq
+ getStationsByArea({
+ site: this.site,
+ areaId: this.selectedCallArea
+ }).then(({ data }) => {
if (data && data.code === 0) {
- this.callTargetStationOptions = data.stations || [];
+ this.callStationOptions = data.rows || [];
} else {
- this.$message.error(data.msg || '获取目标站点列表失败');
+ this.$message.error(data.msg || '获取站点列表失败');
}
}).catch(error => {
- console.error('获取目标站点列表失败:', error);
- this.$message.error('获取目标站点列表失败');
+ console.error('获取站点列表失败:', error);
+ this.$message.error('获取站点列表失败');
});
},
@@ -1390,53 +1453,64 @@ export default {
});
},
- // 确认Call栈板
+ // 确认Call栈板 - rqrq
confirmCallPallet() {
- if (!this.selectedCallStartStation) {
- this.$message.error('请选择起始站点');
+ // 参数校验 - rqrq
+ if (!this.selectedCallArea) {
+ this.$message.error('请选择区域');
return;
}
- if (!this.selectedCallTargetStation) {
- this.$message.error('请选择目标站点');
+ if (!this.selectedCallStation) {
+ this.$message.error('请选择站点');
return;
}
-
- // 前端验证:两个站点不能一样
- if (this.selectedCallStartStation === this.selectedCallTargetStation) {
- this.$message.error('起始站点和目标站点不能相同');
+ if (!this.selectedCallPalletType) {
+ this.$message.error('请选择栈板类型');
return;
}
- // 设置loading状态,防止重复点击
- this.callPalletLoading = true;
+ // 确认对话框 - rqrq
+ this.$confirm('确定调用空托盘吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ // 设置loading状态,防止重复点击 - rqrq
+ this.callPalletLoading = true;
- callPalletToStation({
- site: this.site,
- startStation: this.selectedCallStartStation,
- targetStation: this.selectedCallTargetStation
- }).then(({ data }) => {
- if (data.code === 0) {
- this.$message.success('空托盘调用任务创建成功');
- this.closeCallPalletModal();
- } else {
- this.$message.error(data.msg || '调用空托盘失败');
- }
- }).catch(error => {
- console.error('调用空托盘失败:', error);
- this.$message.error('异常:'+error);
- }).finally(() => {
- // 无论成功或失败,都要恢复按钮状态
- this.callPalletLoading = false;
+ // 调用后端API - rqrq
+ callEmptyPalletToStation({
+ site: this.site,
+ stationCode: this.selectedCallStation,
+ palletType: this.selectedCallPalletType
+ }).then(({ data }) => {
+ if (data && data.code === 0) {
+ this.$message.success('空托盘调用任务创建成功');
+ this.closeCallPalletModal();
+ } else {
+ this.$message.error(data.msg || '调用空托盘失败');
+ }
+ }).catch(error => {
+ console.error('调用空托盘失败:', error);
+ this.$message.error('异常:'+error);
+ }).finally(() => {
+ // 无论成功或失败,都要恢复按钮状态 - rqrq
+ this.callPalletLoading = false;
+ });
+ }).catch(() => {
+ // 用户取消 - rqrq
});
},
- // 关闭Call栈板模态框
+ // 关闭Call栈板模态框 - rqrq
closeCallPalletModal() {
this.callPalletModalVisible = false;
- this.selectedCallStartStation = '';
- this.selectedCallTargetStation = '';
- this.callStartStationOptions = [];
- this.callTargetStationOptions = [];
+ this.selectedCallArea = '';
+ this.selectedCallStation = '';
+ this.selectedCallPalletType = '';
+ this.callAreaOptions = [];
+ this.callStationOptions = [];
+ this.callPalletTypeOptions = [];
},
// 显示浏览明细弹窗 - rqrq
showDetailModal(){
diff --git a/src/views/modules/automatedWarehouse/palletPacking.vue b/src/views/modules/automatedWarehouse/palletPacking.vue
index 69385b4..5ffe7f4 100644
--- a/src/views/modules/automatedWarehouse/palletPacking.vue
+++ b/src/views/modules/automatedWarehouse/palletPacking.vue
@@ -468,7 +468,7 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
+
-
+
-
- 栈板类型
+
+ >
+
+
@@ -540,9 +563,15 @@ import {
getPalletTypeList,
getPalletTypeAreas,
updatePalletTypeAndAutoSort,
- getAvailablePositionsForLayer
+ getAvailablePositionsForLayer,
+ callEmptyPalletToStation // 新增调用空托盘API - rqrq
} from '../../../api/automatedWarehouse/palletPacking'
+import {
+ getAreaOptionsForChange,
+ getStationsByArea
+} from '../../../api/automatedWarehouse/palletChangeStation'
+
export default {
data() {
return {
@@ -596,12 +625,14 @@ export default {
currentPalletStation: '',
selectedTargetArea: '', // 选择的目标区域
- // Call栈板模态框
+ // Call栈板模态框 - rqrq
callPalletModalVisible: false,
- callStartStationOptions: [], // 起始站点选项(statusDb=1,有货)
- callTargetStationOptions: [], // 目标站点选项(statusDb=0,空闲)
- selectedCallStartStation: '',
- selectedCallTargetStation: '',
+ callAreaOptions: [], // 可选区域列表 - rqrq
+ callStationOptions: [], // 可选站点列表 - rqrq
+ callPalletTypeOptions: [], // 栈板类型列表 - rqrq
+ selectedCallArea: '', // 选中的区域 - rqrq
+ selectedCallStation: '', // 选中的站点 - rqrq
+ selectedCallPalletType: '', // 选中的栈板类型 - rqrq
// 修改位置模态框
editPositionModalVisible: false,
@@ -890,35 +921,67 @@ export default {
});
},
- // Call栈板 - 调用空托盘
+ // Call栈板 - 调用空托盘 - rqrq
handleCallPallet() {
this.callPalletModalVisible = true;
- this.selectedCallStartStation = '';
- this.selectedCallTargetStation = '';
+ this.selectedCallArea = '';
+ this.selectedCallStation = '';
+ this.selectedCallPalletType = '';
+ this.callStationOptions = [];
+
+ // 获取可选区域列表(choose_able='Y')- rqrq
+ getAreaOptionsForChange({
+ site: this.site
+ }).then(({ data }) => {
+ if (data && data.code === 0) {
+ this.callAreaOptions = data.rows || [];
+ } else {
+ this.$message.error(data.msg || '获取区域列表失败');
+ }
+ }).catch(error => {
+ console.error('获取区域列表失败:', error);
+ this.$message.error('获取区域列表失败');
+ });
- // 获取AGV站点列表,分别过滤起始站点和目标站点
- // 获取起始站点(有货的正式站点)
- getAvailableAgvStations({ statusDb: 1 }).then(({ data }) => {
+ // 获取栈板类型列表(active='Y')- rqrq
+ getPalletTypeList({
+ site: this.site,
+ palletFamily: '', // 不过滤大分类,显示所有栈板类型 - rqrq
+ active: 'Y'
+ }).then(({ data }) => {
if (data && data.code === 0) {
- this.callStartStationOptions = data.stations || [];
+ this.callPalletTypeOptions = data.rows || [];
} else {
- this.$message.error(data.msg || '获取起始站点列表失败');
+ this.$message.error(data.msg || '获取栈板类型列表失败');
}
}).catch(error => {
- console.error('获取起始站点列表失败:', error);
- this.$message.error('获取起始站点列表失败');
+ console.error('获取栈板类型列表失败:', error);
+ this.$message.error('获取栈板类型列表失败');
});
+ },
+
+ // 区域选择change事件 - rqrq
+ handleCallAreaChange() {
+ this.selectedCallStation = '';
+ this.callStationOptions = [];
+
+ if (!this.selectedCallArea) {
+ return;
+ }
- // 获取目标站点(空闲的正式站点)
- getAvailableAgvStations({ statusDb: 0 }).then(({ data }) => {
+ // 根据区域获取可用站点列表 - rqrq
+ getStationsByArea({
+ site: this.site,
+ areaId: this.selectedCallArea
+ }).then(({ data }) => {
if (data && data.code === 0) {
- this.callTargetStationOptions = data.stations || [];
+ this.callStationOptions = data.rows || [];
} else {
- this.$message.error(data.msg || '获取目标站点列表失败');
+ this.$message.error(data.msg || '获取站点列表失败');
}
}).catch(error => {
- console.error('获取目标站点列表失败:', error);
- this.$message.error('获取目标站点列表失败');
+ console.error('获取站点列表失败:', error);
+ this.$message.error('获取站点列表失败');
});
},
@@ -1531,53 +1594,64 @@ export default {
this.transportAreaOptions = [];
},
- // 确认Call栈板
+ // 确认Call栈板 - rqrq
confirmCallPallet() {
- if (!this.selectedCallStartStation) {
- this.$message.error('请选择起始站点');
+ // 参数校验 - rqrq
+ if (!this.selectedCallArea) {
+ this.$message.error('请选择区域');
return;
}
- if (!this.selectedCallTargetStation) {
- this.$message.error('请选择目标站点');
+ if (!this.selectedCallStation) {
+ this.$message.error('请选择站点');
return;
}
-
- // 前端验证:两个站点不能一样
- if (this.selectedCallStartStation === this.selectedCallTargetStation) {
- this.$message.error('起始站点和目标站点不能相同');
+ if (!this.selectedCallPalletType) {
+ this.$message.error('请选择栈板类型');
return;
}
- // 设置loading状态,防止重复点击
- this.callPalletLoading = true;
-
- callPalletToStation({
- site: this.site,
- startStation: this.selectedCallStartStation,
- targetStation: this.selectedCallTargetStation
- }).then(({ data }) => {
- if (data.code === 0) {
- this.$message.success('空托盘调用任务创建成功');
- this.closeCallPalletModal();
- } else {
- this.$message.error(data.msg || '调用空托盘失败');
- }
- }).catch(error => {
- console.error('调用空托盘失败:', error);
- this.$message.error('异常:'+error);
- }).finally(() => {
- // 无论成功或失败,都要恢复按钮状态
- this.callPalletLoading = false;
+ // 确认对话框 - rqrq
+ this.$confirm('确定调用空托盘吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ // 设置loading状态,防止重复点击 - rqrq
+ this.callPalletLoading = true;
+
+ // 调用后端API - rqrq
+ callEmptyPalletToStation({
+ site: this.site,
+ stationCode: this.selectedCallStation,
+ palletType: this.selectedCallPalletType
+ }).then(({ data }) => {
+ if (data && data.code === 0) {
+ this.$message.success('空托盘调用任务创建成功');
+ this.closeCallPalletModal();
+ } else {
+ this.$message.error(data.msg || '调用空托盘失败');
+ }
+ }).catch(error => {
+ console.error('调用空托盘失败:', error);
+ this.$message.error('异常:'+error);
+ }).finally(() => {
+ // 无论成功或失败,都要恢复按钮状态 - rqrq
+ this.callPalletLoading = false;
+ });
+ }).catch(() => {
+ // 用户取消 - rqrq
});
},
- // 关闭Call栈板模态框
+ // 关闭Call栈板模态框 - rqrq
closeCallPalletModal() {
this.callPalletModalVisible = false;
- this.selectedCallStartStation = '';
- this.selectedCallTargetStation = '';
- this.callStartStationOptions = [];
- this.callTargetStationOptions = [];
+ this.selectedCallArea = '';
+ this.selectedCallStation = '';
+ this.selectedCallPalletType = '';
+ this.callAreaOptions = [];
+ this.callStationOptions = [];
+ this.callPalletTypeOptions = [];
},
// 显示浏览明细弹窗 - rqrq
showDetailModal(){
diff --git a/src/views/modules/automatedWarehouse/palletSorting.vue b/src/views/modules/automatedWarehouse/palletSorting.vue
index 64f508a..6bf09f5 100644
--- a/src/views/modules/automatedWarehouse/palletSorting.vue
+++ b/src/views/modules/automatedWarehouse/palletSorting.vue
@@ -30,13 +30,13 @@
spellcheck="false"
ref="palletInput"
/>
-
+
+
+
+
+
+
+