diff --git a/src/views/modules/automatedWarehouse/palletAssembly.vue b/src/views/modules/automatedWarehouse/palletAssembly.vue
index 6d9348d..78fbf7a 100644
--- a/src/views/modules/automatedWarehouse/palletAssembly.vue
+++ b/src/views/modules/automatedWarehouse/palletAssembly.vue
@@ -76,6 +76,17 @@
+
+
+
+ 是否强制整托出库
+
+
+
@@ -478,6 +489,7 @@ export default {
currentPalletFamily: '', // 当前栈板大分类(固定不可改)
currentPalletType: '', // 当前栈板类型
currentAutoSort: '', // 当前是否自动分拣 Y/N
+ forceFullPalletOut: false, // 是否强制整托出库 - rqrq
palletTypeOptions: [], // 托盘类型选项列表
palletTypeDisabled: false, // 栈板类型下拉框是否禁用(有明细数据时禁用)
autoSortDisabled: false, // 自动分拣下拉框是否禁用
@@ -499,7 +511,7 @@ export default {
needRefreshOnClose: false, // 标记是否需要在关闭模态框时刷新
// 位置网格数据 - rqrq
- positionGrid: [], // 位置网格列表(用于显示4宫格或9宫格)
+ positionGrid: [], // 位置网格列表(用于显示4宫格或9宫格),格式: [{position: '1', count: 2}, ...]
availablePositions: [], // 可用位置列表
currentSelectedPosition: '', // 当前选中的位置
currentMixedMode: false, // 是否混装模式
@@ -553,6 +565,7 @@ export default {
this.currentPalletFamily = '';
this.currentPalletType = '';
this.currentAutoSort = '';
+ this.forceFullPalletOut = false; // 清空强制整托出库 - rqrq
this.palletTypeOptions = [];
this.palletTypeDisabled = false;
this.autoSortDisabled = false;
@@ -774,13 +787,21 @@ export default {
this.savePalletTypeAndAutoSort();
},
- // 保存栈板类型和自动分拣标志
+ // 是否强制整托出库变更事件 - rqrq
+ handleForceFullPalletOutChange() {
+ console.log('是否强制整托出库变更 - rqrq,forceFullPalletOut=' + this.forceFullPalletOut);
+ // 保存到数据库
+ this.savePalletTypeAndAutoSort();
+ },
+
+ // 保存栈板类型、自动分拣标志和存储类型 - rqrq
savePalletTypeAndAutoSort() {
updatePalletTypeAndAutoSort({
site: this.site,
palletId: this.palletCode,
palletType: this.currentPalletType,
- autoSort: this.currentAutoSort
+ autoSort: this.currentAutoSort,
+ forceFullPalletOut: this.forceFullPalletOut // 是否强制整托出库 - rqrq
}).then(({ data }) => {
if (data.code === 0) {
this.$message.success('更新成功');
@@ -960,26 +981,55 @@ export default {
this.positionGridLoading = true;
this.availablePositions = []; // 清空可用位置,全部禁用
- getAvailablePositionsForLayer({
+ // 先获取当前层的所有明细数据,用于统计每个position的数量 - rqrq
+ getPalletDetails({
site: this.site,
palletId: this.palletCode,
+ position: '',
layer: this.scanLayer
- }).then(({ data }) => {
- if (data && data.code === 0) {
- const result = data.data;
- this.positionGrid = result.positions || [];
- this.availablePositions = result.availablePositions || [];
- console.log('位置网格加载完成 - 总位置:' + this.positionGrid.length + ',可用:' + this.availablePositions.length + ' - rqrq');
- } else {
- this.$message.error(data.msg || '获取位置信息失败');
- // 失败后保持全部禁用 - rqrq
- this.availablePositions = [];
+ }).then(({ data: detailData }) => {
+ // 统计每个position的数量 - rqrq
+ const positionCountMap = {};
+ if (detailData && detailData.code === 0) {
+ const details = detailData.details || [];
+ details.forEach(detail => {
+ const pos = detail.position;
+ positionCountMap[pos] = (positionCountMap[pos] || 0) + 1;
+ });
+ console.log('当前层(' + this.scanLayer + ')各位置数量统计 - rqrq:', positionCountMap);
}
+
+ // 获取位置网格信息 - rqrq
+ return getAvailablePositionsForLayer({
+ site: this.site,
+ palletId: this.palletCode,
+ layer: this.scanLayer
+ }).then(({ data }) => {
+ if (data && data.code === 0) {
+ const result = data.data;
+ const positions = result.positions || [];
+ this.availablePositions = result.availablePositions || [];
+
+ // 将positions转换为包含count的对象数组 - rqrq
+ this.positionGrid = positions.map(position => ({
+ position: position,
+ count: positionCountMap[position] || 0
+ }));
+
+ console.log('位置网格加载完成 - 总位置:' + this.positionGrid.length + ',可用:' + this.availablePositions.length + ' - rqrq');
+ } else {
+ this.$message.error(data.msg || '获取位置信息失败');
+ // 失败后保持全部禁用 - rqrq
+ this.availablePositions = [];
+ this.positionGrid = [];
+ }
+ });
}).catch(error => {
console.error('获取位置信息失败:', error);
this.$message.error('获取位置信息失败');
// 失败后保持全部禁用 - rqrq
this.availablePositions = [];
+ this.positionGrid = [];
}).finally(() => {
// 无论成功失败,都要解除加载状态 - rqrq
this.positionGridLoading = false;
diff --git a/src/views/modules/automatedWarehouse/palletPacking.vue b/src/views/modules/automatedWarehouse/palletPacking.vue
index 62c40f8..e94b869 100644
--- a/src/views/modules/automatedWarehouse/palletPacking.vue
+++ b/src/views/modules/automatedWarehouse/palletPacking.vue
@@ -76,6 +76,17 @@
+
+
+
+ 是否强制整托出库
+
+
+
@@ -537,6 +548,7 @@ export default {
currentPalletFamily: '', // 当前栈板大分类(固定不可改)
currentPalletType: '', // 当前栈板类型
currentAutoSort: '', // 当前是否自动分拣 Y/N
+ forceFullPalletOut: false, // 是否强制整托出库 - rqrq
palletTypeOptions: [], // 托盘类型选项列表
palletTypeDisabled: false, // 栈板类型下拉框是否禁用(有明细数据时禁用)
autoSortDisabled: false, // 自动分拣下拉框是否禁用
@@ -558,7 +570,7 @@ export default {
needRefreshOnClose: false, // 标记是否需要在关闭模态框时刷新
// 位置网格数据 - rqrq
- positionGrid: [], // 位置网格列表(用于显示4宫格或9宫格)
+ positionGrid: [], // 位置网格列表(用于显示4宫格或9宫格),格式: [{position: '1', count: 2}, ...]
availablePositions: [], // 可用位置列表
currentSelectedPosition: '', // 当前选中的位置
currentMixedMode: false, // 是否混装模式
@@ -618,6 +630,7 @@ export default {
this.currentPalletFamily = '';
this.currentPalletType = '';
this.currentAutoSort = '';
+ this.forceFullPalletOut = false; // 清空强制整托出库 - rqrq
this.palletTypeOptions = [];
this.palletTypeDisabled = false;
this.autoSortDisabled = false;
@@ -843,13 +856,21 @@ export default {
this.savePalletTypeAndAutoSort();
},
- // 保存栈板类型和自动分拣标志
+ // 是否强制整托出库变更事件 - rqrq
+ handleForceFullPalletOutChange() {
+ console.log('是否强制整托出库变更 - rqrq,forceFullPalletOut=' + this.forceFullPalletOut);
+ // 保存到数据库
+ this.savePalletTypeAndAutoSort();
+ },
+
+ // 保存栈板类型、自动分拣标志和存储类型 - rqrq
savePalletTypeAndAutoSort() {
updatePalletTypeAndAutoSort({
site: this.site,
palletId: this.palletCode,
palletType: this.currentPalletType,
- autoSort: this.currentAutoSort
+ autoSort: this.currentAutoSort,
+ forceFullPalletOut: this.forceFullPalletOut // 是否强制整托出库 - rqrq
}).then(({ data }) => {
if (data.code === 0) {
this.$message.success('更新成功');
@@ -1030,26 +1051,55 @@ export default {
this.positionGridLoading = true;
this.availablePositions = []; // 清空可用位置,全部禁用
- getAvailablePositionsForLayer({
+ // 先获取当前层的所有明细数据,用于统计每个position的数量 - rqrq
+ getPalletDetails({
site: this.site,
palletId: this.palletCode,
+ position: '',
layer: this.scanLayer
- }).then(({ data }) => {
- if (data && data.code === 0) {
- const result = data.data;
- this.positionGrid = result.positions || [];
- this.availablePositions = result.availablePositions || [];
- console.log('位置网格加载完成 - 总位置:' + this.positionGrid.length + ',可用:' + this.availablePositions.length + ' - rqrq');
- } else {
- this.$message.error(data.msg || '获取位置信息失败');
- // 失败后保持全部禁用 - rqrq
- this.availablePositions = [];
+ }).then(({ data: detailData }) => {
+ // 统计每个position的数量 - rqrq
+ const positionCountMap = {};
+ if (detailData && detailData.code === 0) {
+ const details = detailData.details || [];
+ details.forEach(detail => {
+ const pos = detail.position;
+ positionCountMap[pos] = (positionCountMap[pos] || 0) + 1;
+ });
+ console.log('当前层(' + this.scanLayer + ')各位置数量统计 - rqrq:', positionCountMap);
}
+
+ // 获取位置网格信息 - rqrq
+ return getAvailablePositionsForLayer({
+ site: this.site,
+ palletId: this.palletCode,
+ layer: this.scanLayer
+ }).then(({ data }) => {
+ if (data && data.code === 0) {
+ const result = data.data;
+ const positions = result.positions || [];
+ this.availablePositions = result.availablePositions || [];
+
+ // 将positions转换为包含count的对象数组 - rqrq
+ this.positionGrid = positions.map(position => ({
+ position: position,
+ count: positionCountMap[position] || 0
+ }));
+
+ console.log('位置网格加载完成 - 总位置:' + this.positionGrid.length + ',可用:' + this.availablePositions.length + ' - rqrq');
+ } else {
+ this.$message.error(data.msg || '获取位置信息失败');
+ // 失败后保持全部禁用 - rqrq
+ this.availablePositions = [];
+ this.positionGrid = [];
+ }
+ });
}).catch(error => {
console.error('获取位置信息失败:', error);
this.$message.error('获取位置信息失败');
// 失败后保持全部禁用 - rqrq
this.availablePositions = [];
+ this.positionGrid = [];
}).finally(() => {
// 无论成功失败,都要解除加载状态 - rqrq
this.positionGridLoading = false;
diff --git a/src/views/modules/automatedWarehouse/palletSorting.vue b/src/views/modules/automatedWarehouse/palletSorting.vue
index d65af92..64f508a 100644
--- a/src/views/modules/automatedWarehouse/palletSorting.vue
+++ b/src/views/modules/automatedWarehouse/palletSorting.vue
@@ -76,6 +76,17 @@
+
+
+
+ 是否强制整托出库
+
+
+
@@ -436,6 +447,7 @@ export default {
currentPalletFamily: '', // 当前栈板大分类(固定不可改)
currentPalletType: '', // 当前栈板类型
currentAutoSort: '', // 当前是否自动分拣 Y/N
+ forceFullPalletOut: false, // 是否强制整托出库 - rqrq
palletTypeOptions: [], // 托盘类型选项列表
palletTypeDisabled: false, // 栈板类型下拉框是否禁用(有明细数据时禁用)
autoSortDisabled: false, // 自动分拣下拉框是否禁用
@@ -457,7 +469,7 @@ export default {
needRefreshOnClose: false, // 标记是否需要在关闭模态框时刷新
// 位置网格数据 - rqrq
- positionGrid: [], // 位置网格列表(用于显示4宫格或9宫格)
+ positionGrid: [], // 位置网格列表(用于显示4宫格或9宫格),格式: [{position: '1', count: 2}, ...]
availablePositions: [], // 可用位置列表
currentSelectedPosition: '', // 当前选中的位置
currentMixedMode: false, // 是否混装模式
@@ -512,6 +524,7 @@ export default {
this.currentPalletFamily = '';
this.currentPalletType = '';
this.currentAutoSort = '';
+ this.forceFullPalletOut = false; // 清空强制整托出库 - rqrq
this.palletTypeOptions = [];
this.palletTypeDisabled = false;
this.autoSortDisabled = false;
@@ -733,13 +746,21 @@ export default {
this.savePalletTypeAndAutoSort();
},
- // 保存栈板类型和自动分拣标志
+ // 是否强制整托出库变更事件 - rqrq
+ handleForceFullPalletOutChange() {
+ console.log('是否强制整托出库变更 - rqrq,forceFullPalletOut=' + this.forceFullPalletOut);
+ // 保存到数据库
+ this.savePalletTypeAndAutoSort();
+ },
+
+ // 保存栈板类型、自动分拣标志和存储类型 - rqrq
savePalletTypeAndAutoSort() {
updatePalletTypeAndAutoSort({
site: this.site,
palletId: this.palletCode,
palletType: this.currentPalletType,
- autoSort: this.currentAutoSort
+ autoSort: this.currentAutoSort,
+ forceFullPalletOut: this.forceFullPalletOut // 是否强制整托出库 - rqrq
}).then(({ data }) => {
if (data.code === 0) {
this.$message.success('更新成功');
@@ -919,26 +940,55 @@ export default {
this.positionGridLoading = true;
this.availablePositions = []; // 清空可用位置,全部禁用
- getAvailablePositionsForLayer({
+ // 先获取当前层的所有明细数据,用于统计每个position的数量 - rqrq
+ getPalletDetails({
site: this.site,
palletId: this.palletCode,
+ position: '',
layer: this.scanLayer
- }).then(({ data }) => {
- if (data && data.code === 0) {
- const result = data.data;
- this.positionGrid = result.positions || [];
- this.availablePositions = result.availablePositions || [];
- console.log('位置网格加载完成 - 总位置:' + this.positionGrid.length + ',可用:' + this.availablePositions.length + ' - rqrq');
- } else {
- this.$message.error(data.msg || '获取位置信息失败');
- // 失败后保持全部禁用 - rqrq
- this.availablePositions = [];
+ }).then(({ data: detailData }) => {
+ // 统计每个position的数量 - rqrq
+ const positionCountMap = {};
+ if (detailData && detailData.code === 0) {
+ const details = detailData.details || [];
+ details.forEach(detail => {
+ const pos = detail.position;
+ positionCountMap[pos] = (positionCountMap[pos] || 0) + 1;
+ });
+ console.log('当前层(' + this.scanLayer + ')各位置数量统计 - rqrq:', positionCountMap);
}
+
+ // 获取位置网格信息 - rqrq
+ return getAvailablePositionsForLayer({
+ site: this.site,
+ palletId: this.palletCode,
+ layer: this.scanLayer
+ }).then(({ data }) => {
+ if (data && data.code === 0) {
+ const result = data.data;
+ const positions = result.positions || [];
+ this.availablePositions = result.availablePositions || [];
+
+ // 将positions转换为包含count的对象数组 - rqrq
+ this.positionGrid = positions.map(position => ({
+ position: position,
+ count: positionCountMap[position] || 0
+ }));
+
+ console.log('位置网格加载完成 - 总位置:' + this.positionGrid.length + ',可用:' + this.availablePositions.length + ' - rqrq');
+ } else {
+ this.$message.error(data.msg || '获取位置信息失败');
+ // 失败后保持全部禁用 - rqrq
+ this.availablePositions = [];
+ this.positionGrid = [];
+ }
+ });
}).catch(error => {
console.error('获取位置信息失败:', error);
this.$message.error('获取位置信息失败');
// 失败后保持全部禁用 - rqrq
this.availablePositions = [];
+ this.positionGrid = [];
}).finally(() => {
// 无论成功失败,都要解除加载状态 - rqrq
this.positionGridLoading = false;