diff --git a/src/api/haianAutoWarehouse/palletChangeStation.js b/src/api/haianAutoWarehouse/palletChangeStation.js
index 6d180e9..1f93a93 100644
--- a/src/api/haianAutoWarehouse/palletChangeStation.js
+++ b/src/api/haianAutoWarehouse/palletChangeStation.js
@@ -1,7 +1,13 @@
import { createAPI } from "@/utils/httpRequest.js";
+// 海安-检查栈板是否可执行换站(含calling_flag与当前站点)- rqrq
+export const checkPalletForChangeStation = data => createAPI(`/haiAnWcsIntegration/checkPalletForChangeStation`, 'post', data)
+
// 海安-获取可选区域(choose_able=Y)- rqrq
export const getAreaOptionsForChange = data => createAPI(`/haiAnWcsIntegration/getAreaOptionsForChange`, 'post', data)
// 海安-按区域获取站点清单(locationCode/status)- rqrq
export const getStationsByArea = data => createAPI(`/haiAnWcsIntegration/getStationsByArea`, 'post', data)
+
+// 海安-提交托盘运输任务(写haian_wms_order_task并调用立库搬运接口)- rqrq
+export const submitChangeStationTask = data => createAPI(`/haiAnWcsIntegration/submitChangeStationTask`, 'post', data)
diff --git a/src/router/index.js b/src/router/index.js
index 0f4b179..886ce7b 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -153,6 +153,7 @@ const globalRoutes = [
{path: "/haianPalletPacking",name: "haianPalletPacking", component: resolve => require(["@/views/modules/haianAutoWarehouse/haianPalletPacking.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
{path: "/haianPalletSorting",name: "haianPalletSorting", component: resolve => require(["@/views/modules/haianAutoWarehouse/haianPalletSorting.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
{path: "/haianPalletSearch",name: "haianPalletSearch", component: resolve => require(["@/views/modules/haianAutoWarehouse/haianPalletSearch.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
+ {path: "/haianPalletChangeStation",name: "haianPalletChangeStation", component: resolve => require(["@/views/modules/haianAutoWarehouse/haianPalletChangeStation.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
]
diff --git a/src/views/main.vue b/src/views/main.vue
index 3323ee8..fe8ce9e 100644
--- a/src/views/main.vue
+++ b/src/views/main.vue
@@ -151,6 +151,12 @@
+
diff --git a/src/views/modules/haianAutoWarehouse/haianPalletChangeStation.vue b/src/views/modules/haianAutoWarehouse/haianPalletChangeStation.vue
new file mode 100644
index 0000000..c5496ba
--- /dev/null
+++ b/src/views/modules/haianAutoWarehouse/haianPalletChangeStation.vue
@@ -0,0 +1,561 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ palletInfo.currentStationId || '-' }}
+
+
+
+
+ {{ palletInfo.currentStationCode || '-' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ detail.position }}
+
{{ detail.layer }}
+
{{ detail.serialNo }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/haianAutoWarehouse/haianPalletPacking.vue b/src/views/modules/haianAutoWarehouse/haianPalletPacking.vue
index dbb0b5d..00c3dbe 100644
--- a/src/views/modules/haianAutoWarehouse/haianPalletPacking.vue
+++ b/src/views/modules/haianAutoWarehouse/haianPalletPacking.vue
@@ -1,11 +1,11 @@
@@ -192,7 +194,7 @@
@@ -227,7 +229,7 @@
@@ -310,7 +312,7 @@
@@ -342,8 +344,8 @@
@@ -415,7 +417,11 @@ export default {
stationCode: '',
palletType: ''
},
- transportLoading: false
+ transportLoading: false,
+ // 海安页面接口防连点锁:按钮触发接口期间统一置为true,返回后解锁 - rqrq
+ palletScanLoading: false,
+ palletConfigLoading: false,
+ scanRequestLoading: false
}
},
computed: {
@@ -441,6 +447,10 @@ export default {
]
}
return this.positionGrid.map((p) => ({ ...p, isPlaceholder: false }))
+ },
+ // 统一接口忙碌状态:用于禁用按钮、回退和首页,避免请求未返回时重复触发 - rqrq
+ interfaceBusy() {
+ return this.palletScanLoading || this.palletConfigLoading || this.scanRequestLoading || this.callEmptyLoading || this.transportLoading
}
},
methods: {
@@ -453,10 +463,20 @@ export default {
return true
},
handleBack() {
+ if (this.interfaceBusy) {
+ return
+ }
// 返回首页前先清空海安组盘页面状态,避免keep-alive导致二次进入残留旧数据 - rqrq
this.resetPage(false)
this.$router.back()
},
+ // 接口处理中禁用首页跳转,避免用户误离开导致重复提交和状态错乱 - rqrq
+ goHome() {
+ if (this.interfaceBusy) {
+ return
+ }
+ this.$router.push({ path: '/' })
+ },
// 海安组盘页统一重置方法:退出和重进都走同一套清理逻辑,保证状态一致性 - rqrq
resetPage(needFocus = true) {
this.site = this.$store.state.user.site
@@ -505,6 +525,9 @@ export default {
palletType: ''
}
this.transportLoading = false
+ this.palletScanLoading = false
+ this.palletConfigLoading = false
+ this.scanRequestLoading = false
if (needFocus) {
this.$nextTick(() => {
if (this.$refs.palletInput) {
@@ -517,10 +540,14 @@ export default {
if (!this.ensureSite()) {
return
}
+ if (this.interfaceBusy) {
+ return
+ }
if (!this.palletCode || !this.palletCode.trim()) {
this.$alert('请输入栈板编码', '提示', { confirmButtonText: '确定' })
return
}
+ this.palletScanLoading = true
checkPalletExists({
site: this.site,
palletId: this.palletCode.trim()
@@ -541,6 +568,8 @@ export default {
}
}).catch((error) => {
this.$alert(error.message || '栈板校验失败', '错误', { confirmButtonText: '确定' })
+ }).finally(() => {
+ this.palletScanLoading = false
})
},
loadPalletInfo() {
@@ -654,6 +683,10 @@ export default {
},
// 更新托盘类型与自动分拣设置,保持海安后端状态一致 - rqrq
savePalletTypeConfig() {
+ if (this.interfaceBusy) {
+ return
+ }
+ this.palletConfigLoading = true
updatePalletTypeAndAutoSort({
site: this.site,
palletId: this.palletCode,
@@ -668,10 +701,17 @@ export default {
} else {
this.$alert((data && data.msg) || '托盘配置更新失败', '错误', { confirmButtonText: '确定' })
}
+ }).catch((error) => {
+ this.$alert(error.message || '托盘配置更新失败', '错误', { confirmButtonText: '确定' })
+ }).finally(() => {
+ this.palletConfigLoading = false
})
},
// 沿用原页面入口命名,点击Call栈板时打开空托盘调用弹窗 - rqrq
handleCallPallet() {
+ if (this.interfaceBusy) {
+ return
+ }
this.openCallEmptyModal()
},
// 打开扫码弹窗并初始化网格数据,交互与原PDA页面一致 - rqrq
@@ -815,19 +855,29 @@ export default {
if (!this.ensureSite()) {
return
}
+ if (this.interfaceBusy) {
+ return
+ }
if (!this.scanCode || !this.scanCode.trim()) {
+ this.scanCode = ''
this.$alert('请输入标签编码', '错误', { confirmButtonText: '确定' })
+ this.moveFocusToScanInput()
return
}
if (this.operationType === 'in') {
if (!this.scanPosition) {
+ this.scanCode = ''
this.$alert('请选择位置', '错误', { confirmButtonText: '确定' })
+ this.moveFocusToScanInput()
return
}
if (!this.scanLayer) {
+ this.scanCode = ''
this.$alert('请选择层数', '错误', { confirmButtonText: '确定' })
+ this.moveFocusToScanInput()
return
}
+ this.scanRequestLoading = true
savePalletDetail({
site: this.site,
palletId: this.palletCode,
@@ -843,13 +893,20 @@ export default {
this.loadLayerOptions()
this.moveFocusToScanInput()
} else {
+ this.scanCode = ''
this.$alert((data && data.msg) || '扫进失败', '错误', { confirmButtonText: '确定' })
+ this.moveFocusToScanInput()
}
}).catch((error) => {
+ this.scanCode = ''
this.$alert(error.message || '扫进失败', '错误', { confirmButtonText: '确定' })
+ this.moveFocusToScanInput()
+ }).finally(() => {
+ this.scanRequestLoading = false
})
} else {
const scanOutItem = this.detailList.find((item) => item.serialNo === this.scanCode)
+ this.scanRequestLoading = true
deletePalletDetail({
site: this.site,
palletId: this.palletCode,
@@ -868,10 +925,16 @@ export default {
this.scanCode = ''
this.moveFocusToScanInput()
} else {
+ this.scanCode = ''
this.$alert((data && data.msg) || '扫出失败', '错误', { confirmButtonText: '确定' })
+ this.moveFocusToScanInput()
}
}).catch((error) => {
+ this.scanCode = ''
this.$alert(error.message || '扫出失败', '错误', { confirmButtonText: '确定' })
+ this.moveFocusToScanInput()
+ }).finally(() => {
+ this.scanRequestLoading = false
})
}
},
@@ -917,6 +980,9 @@ export default {
})
},
submitCallEmpty() {
+ if (this.interfaceBusy) {
+ return
+ }
if (!this.callEmptyForm.areaId || !this.callEmptyForm.stationCode || !this.callEmptyForm.palletType) {
this.$alert('请完整选择区域、站点和栈板类型', '提示', { confirmButtonText: '确定' })
return
@@ -943,6 +1009,9 @@ export default {
if (!this.ensureSite()) {
return
}
+ if (this.interfaceBusy) {
+ return
+ }
if (!this.palletScanned) {
this.$alert('请先扫描栈板', '提示', { confirmButtonText: '确定' })
return
@@ -963,7 +1032,7 @@ export default {
})
},
submitTransport() {
- if (this.transportLoading) {
+ if (this.interfaceBusy) {
return
}
this.transportLoading = true
@@ -1001,6 +1070,11 @@ export default {