diff --git a/src/api/automatedWarehouse/palletPacking.js b/src/api/automatedWarehouse/palletPacking.js
index 6ad6292..7b003c1 100644
--- a/src/api/automatedWarehouse/palletPacking.js
+++ b/src/api/automatedWarehouse/palletPacking.js
@@ -3,6 +3,9 @@ import { createAPI } from "@/utils/httpRequest.js";
// 检查栈板是否存在并获取位置信息 - AI制作
export const checkPalletExists = data => createAPI(`/wcsIntegration/checkPalletExists`,'post',data)
+// 简单查询栈板信息(无任何校验)- rqrq
+export const getPalletInfoSimple = data => createAPI(`/wcsIntegration/getPalletInfoSimple`,'post',data)
+
// 获取栈板位置信息 - AI制作
export const getPalletPositions = data => createAPI(`/wcsIntegration/getPalletPositions`,'post',data)
@@ -21,6 +24,12 @@ export const savePalletDetail = data => createAPI(`/wcsIntegration/savePalletDet
// 删除栈板明细(扫出) - AI制作
export const deletePalletDetail = data => createAPI(`/wcsIntegration/deletePalletDetail`,'post',data)
+// 恢复标签到原栈板(分拣撤回) - rqrq
+export const restorePalletDetail = data => createAPI(`/wcsIntegration/restorePalletDetail`,'post',data)
+
+// 查询标签当前所在栈板的信息 - rqrq
+export const getLabelInfo = data => createAPI(`/wcsIntegration/getLabelInfo`,'post',data)
+
// 获取编辑位置时的层数选项(排除指定标签) - AI制作
export const getLayersForEdit = data => createAPI(`/wcsIntegration/getLayersForEdit`,'post',data)
diff --git a/src/router/index.js b/src/router/index.js
index 6b4a672..dae2500 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -121,6 +121,7 @@ const globalRoutes = [
// 立库-打托
{path: "/palletAssembly",name: "palletAssembly", component: resolve => require(["@/views/modules/automatedWarehouse/palletAssembly.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
{path: "/palletSorting",name: "palletSorting", component: resolve => require(["@/views/modules/automatedWarehouse/palletSorting.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
+ {path: "/palletSearch",name: "palletSearch", component: resolve => require(["@/views/modules/automatedWarehouse/palletSearch.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
]
diff --git a/src/views/main.vue b/src/views/main.vue
index 49de344..76acc86 100644
--- a/src/views/main.vue
+++ b/src/views/main.vue
@@ -148,6 +148,12 @@
+
diff --git a/src/views/modules/automatedWarehouse/palletAssembly.vue b/src/views/modules/automatedWarehouse/palletAssembly.vue
index 4abadbe..6d9348d 100644
--- a/src/views/modules/automatedWarehouse/palletAssembly.vue
+++ b/src/views/modules/automatedWarehouse/palletAssembly.vue
@@ -127,16 +127,21 @@
-
-
+
+
+
+
取消
+
+
+
+
+
+
+
+
{{ detail.position }}
+
{{ detail.layer }}
+
{{ detail.serialNo }}
+
+
+
+
+
+
+
item.serialNo === this.scanCode);
+
deletePalletDetail({
site: this.site,
palletId: this.palletCode,
serialNo: this.scanCode
}).then(({ data }) => {
if (data.code === 0) {
+ // 扫出成功后,把记录添加到扫出列表缓存 - rqrq
+ if (scanOutItem) {
+ this.scanOutList.push({
+ position: scanOutItem.position,
+ layer: scanOutItem.layer,
+ serialNo: scanOutItem.serialNo
+ });
+ console.log('扫出记录已缓存 - rqrq,serialNo=' + scanOutItem.serialNo + ',当前扫出总数=' + this.scanOutList.length);
+ }
+
this.$message.success('扫出成功');
this.needRefreshOnClose = true;
this.scanCode = '';
@@ -1320,9 +1388,15 @@ export default {
this.callStartStationOptions = [];
this.callTargetStationOptions = [];
},
+ // 显示浏览明细弹窗 - rqrq
showDetailModal(){
this.detailModalVisible=true;
},
+
+ // 显示查看扫出弹窗 - rqrq
+ showScanOutModal(){
+ this.scanOutModalVisible=true;
+ },
},
mounted() {
this.$nextTick(() => {
@@ -1457,6 +1531,18 @@ export default {
border-color: #ccc !important;
}
+/* 警告按钮样式 - rqrq */
+.action-btn.warning {
+ background-color: #E6A23C;
+ border-color: #E6A23C;
+ color: white;
+}
+
+.action-btn.warning:hover:not(:disabled) {
+ background-color: #f0b757;
+ border-color: #f0b757;
+}
+
/* 层数网格样式 - rqrq */
.layer-grid {
display: flex;
diff --git a/src/views/modules/automatedWarehouse/palletPacking.vue b/src/views/modules/automatedWarehouse/palletPacking.vue
index da94d2c..62c40f8 100644
--- a/src/views/modules/automatedWarehouse/palletPacking.vue
+++ b/src/views/modules/automatedWarehouse/palletPacking.vue
@@ -127,13 +127,18 @@
-
-
- {{ '浏览明细' }}
+
+
+ {{ '明细' }}
- 条码数:{{detailList.length}}
- 运输指令
+
+ 扫出({{scanOutList.length}})
+
+ 运输
+
+
+
+
取消
+
+
+
+
+
+
+
+
{{ detail.position }}
+
{{ detail.layer }}
+
{{ detail.serialNo }}
+
+
+
+
+
+
+
item.serialNo === this.scanCode);
+
deletePalletDetail({
site: this.site,
palletId: this.palletCode,
serialNo: this.scanCode
}).then(({ data }) => {
if (data.code === 0) {
+ // 扫出成功后,把记录添加到扫出列表缓存 - rqrq
+ if (scanOutItem) {
+ this.scanOutList.push({
+ position: scanOutItem.position,
+ layer: scanOutItem.layer,
+ serialNo: scanOutItem.serialNo
+ });
+ console.log('扫出记录已缓存 - rqrq,serialNo=' + scanOutItem.serialNo + ',当前扫出总数=' + this.scanOutList.length);
+ }
+
this.$message.success('扫出成功');
this.needRefreshOnClose = true;
this.scanCode = '';
@@ -1453,9 +1521,15 @@ export default {
this.callStartStationOptions = [];
this.callTargetStationOptions = [];
},
+ // 显示浏览明细弹窗 - rqrq
showDetailModal(){
this.detailModalVisible=true;
},
+
+ // 显示查看扫出弹窗 - rqrq
+ showScanOutModal(){
+ this.scanOutModalVisible=true;
+ },
},
mounted() {
this.$nextTick(() => {
@@ -1590,6 +1664,18 @@ export default {
border-color: #ccc !important;
}
+/* 警告按钮样式 - rqrq */
+.action-btn.warning {
+ background-color: #E6A23C;
+ border-color: #E6A23C;
+ color: white;
+}
+
+.action-btn.warning:hover:not(:disabled) {
+ background-color: #f0b757;
+ border-color: #f0b757;
+}
+
/* 层数网格样式 - rqrq */
.layer-grid {
display: flex;
diff --git a/src/views/modules/automatedWarehouse/palletSearch.vue b/src/views/modules/automatedWarehouse/palletSearch.vue
new file mode 100644
index 0000000..ff728c2
--- /dev/null
+++ b/src/views/modules/automatedWarehouse/palletSearch.vue
@@ -0,0 +1,382 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ '浏览明细' }}
+
+
+
+
+
+
+
+
{{ detail.position }}
+
{{ detail.layer }}
+
{{ detail.serialNo }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ detail.position }}
+
{{ detail.layer }}
+
{{ detail.serialNo }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/automatedWarehouse/palletSorting.vue b/src/views/modules/automatedWarehouse/palletSorting.vue
index 89b369b..d65af92 100644
--- a/src/views/modules/automatedWarehouse/palletSorting.vue
+++ b/src/views/modules/automatedWarehouse/palletSorting.vue
@@ -109,7 +109,7 @@
扫进
- 扫出
+ 扫回
{
- if (data.code === 0) {
- this.$message.success('扫进成功');
- this.needRefreshOnClose = true;
- this.scanCode = '';
+ }).then(({ data: queryData }) => {
+ let originalDetail = null;
+ if (queryData && queryData.code === 0 && queryData.row) {
+ originalDetail = queryData.row;
+ }
- // 重新加载层数选项(可能新增了层数) - rqrq
- this.loadLayerOptions();
+ // 执行扫进操作 - rqrq
+ savePalletDetail({
+ site: this.site,
+ palletId: this.palletCode,
+ position: this.scanPosition,
+ layer: this.scanLayer,
+ serialNo: this.scanCode
+ }).then(({ data }) => {
+ if (data.code === 0) {
+ // 扫进成功后,缓存原始数据 - rqrq
+ if (originalDetail) {
+ this.originalDetailCache[this.scanCode] = {
+ palletId: originalDetail.palletId || '',
+ position: originalDetail.position || '',
+ layer: originalDetail.layer || 1,
+ wcsFlag: originalDetail.wcsFlag !== undefined ? originalDetail.wcsFlag : 1,
+ partNo: originalDetail.partNo || '',
+ createDate: originalDetail.createDate || new Date().toISOString(),
+ createBy: originalDetail.createBy || ''
+ };
+ console.log('扫进成功,已缓存原始数据 - rqrq,serialNo=' + this.scanCode +
+ ',原栈板=' + originalDetail.palletId);
+ }
- // 保持当前位置选中,聚焦到输入框 - rqrq
- this.$refs.scanInput.focus();
- } else {
- // 扫进失败:弹出提示框,截取前100字符 - rqrq
- let errorMsg = data.msg || '扫进失败';
- if (errorMsg.length > 100) {
- errorMsg = errorMsg.substring(0, 100) + '...';
- }
- this.$alert(errorMsg, '错误', {
- confirmButtonText: '确定',
- callback: () => {
- this.scanCode = '';
- this.$nextTick(() => {
- if (this.$refs.scanInput) {
- this.$refs.scanInput.focus();
+ this.$message.success('扫进成功');
+ this.needRefreshOnClose = true;
+ this.scanCode = '';
+
+ // 重新加载层数选项(可能新增了层数) - rqrq
+ this.loadLayerOptions();
+
+ // 保持当前位置选中,聚焦到输入框 - rqrq
+ this.$refs.scanInput.focus();
+ } else {
+ // 扫进失败:弹出提示框,截取前100字符 - rqrq
+ let errorMsg = data.msg || '扫进失败';
+ if (errorMsg.length > 100) {
+ errorMsg = errorMsg.substring(0, 100) + '...';
+ }
+ this.$alert(errorMsg, '错误', {
+ confirmButtonText: '确定',
+ callback: () => {
+ this.scanCode = '';
+ this.$nextTick(() => {
+ if (this.$refs.scanInput) {
+ this.$refs.scanInput.focus();
+ }
+ });
}
});
}
- });
- }
- }).catch(error => {
- console.error('扫进失败:', error);
- // 网络错误:弹出提示框 - rqrq
- let errorMsg = error.message || '扫进失败';
- if (errorMsg.length > 100) {
- errorMsg = errorMsg.substring(0, 100) + '...';
- }
- this.$alert(errorMsg, '错误', {
- confirmButtonText: '确定',
- callback: () => {
- this.scanCode = '';
- this.$nextTick(() => {
- if (this.$refs.scanInput) {
- this.$refs.scanInput.focus();
+ }).catch(error => {
+ console.error('扫进失败:', error);
+ // 网络错误:弹出提示框 - rqrq
+ let errorMsg = error.message || '扫进失败';
+ if (errorMsg.length > 100) {
+ errorMsg = errorMsg.substring(0, 100) + '...';
+ }
+ this.$alert(errorMsg, '错误', {
+ confirmButtonText: '确定',
+ callback: () => {
+ this.scanCode = '';
+ this.$nextTick(() => {
+ if (this.$refs.scanInput) {
+ this.$refs.scanInput.focus();
+ }
+ });
}
});
- }
- });
+ });
+
+ }).catch(error => {
+ console.error('查询标签信息失败:', error);
+ // 查询失败不影响扫进操作,只是无法缓存原始数据 - rqrq
+ console.log('无法查询标签原始信息,将不缓存 - rqrq');
});
} else {
- // 扫出操作
- deletePalletDetail({
+ // 扫回操作(恢复到原栈板)- rqrq
+ // 检查是否有缓存的原始数据 - rqrq
+ const originalData = this.originalDetailCache[this.scanCode];
+ if (!originalData) {
+ this.$message.error('未找到该标签的原始数据,无法扫回');
+ this.scanCode = '';
+ this.$nextTick(() => {
+ if (this.$refs.scanInput) {
+ this.$refs.scanInput.focus();
+ }
+ });
+ return;
+ }
+
+ // 调用恢复接口 - rqrq
+ restorePalletDetail({
site: this.site,
- palletId: this.palletCode,
- serialNo: this.scanCode
+ serialNo: this.scanCode,
+ originalPalletId: originalData.palletId,
+ originalPosition: originalData.position,
+ originalLayer: originalData.layer,
+ partNo: originalData.partNo,
+ createDate: originalData.createDate,
+ createBy: originalData.createBy,
+ wcsFlag: originalData.wcsFlag
}).then(({ data }) => {
if (data.code === 0) {
- this.$message.success('扫出成功');
+ // 恢复成功后,删除缓存 - rqrq
+ delete this.originalDetailCache[this.scanCode];
+ console.log('扫回成功,已删除缓存 - rqrq,serialNo=' + this.scanCode);
+
+ this.$message.success('扫回成功');
this.needRefreshOnClose = true;
this.scanCode = '';
- this.$refs.scanInput.focus();
+ this.$nextTick(() => {
+ if (this.$refs.scanInput) {
+ this.$refs.scanInput.focus();
+ }
+ });
} else {
- // 扫出失败:弹出提示框,截取前100字符 - rqrq
- let errorMsg = data.msg || '扫出失败';
+ // 扫回失败:弹出提示框,截取前100字符 - rqrq
+ let errorMsg = data.msg || '扫回失败';
if (errorMsg.length > 100) {
errorMsg = errorMsg.substring(0, 100) + '...';
}
@@ -1090,9 +1164,9 @@ export default {
});
}
}).catch(error => {
- console.error('扫出失败:', error);
+ console.error('扫回失败:', error);
// 网络错误:弹出提示框 - rqrq
- let errorMsg = error.message || '扫出失败';
+ let errorMsg = error.message || '扫回失败';
if (errorMsg.length > 100) {
errorMsg = errorMsg.substring(0, 100) + '...';
}