From 9883ea1124db29b4a6c55f9ce9003f6c5e182a0e Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Tue, 28 Oct 2025 16:13:31 +0800
Subject: [PATCH] =?UTF-8?q?2025-10-28=20pda=E7=94=9F=E4=BA=A7=E9=A2=86?=
=?UTF-8?q?=E9=80=80=E6=96=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../productionIssueReturnDetail.vue | 37 +++++++++++++------
1 file changed, 26 insertions(+), 11 deletions(-)
diff --git a/src/views/modules/production/productionIssueReturnDetail.vue b/src/views/modules/production/productionIssueReturnDetail.vue
index 8fdeaff..2c7933b 100644
--- a/src/views/modules/production/productionIssueReturnDetail.vue
+++ b/src/views/modules/production/productionIssueReturnDetail.vue
@@ -70,7 +70,6 @@
:label="item.orderNo"
:value="item.orderNo">
{{ item.orderNo }}
- {{ item.partNo }}
@@ -165,6 +164,7 @@ export default {
scanCode: '',
isRemoveMode: false,
returnOrderNo: '', // 退库工单(从路由参数获取)
+ buNo: '', // BU编码(从路由参数获取)
blankInput: '', // 空白输入框
issueOrderNo: '', // 领料工单
operationSeq: '', // 工序序号
@@ -179,14 +179,17 @@ export default {
}
},
mounted() {
- // 从路由参数获取退库工单信息
+ // 从路由参数获取退库工单信息和BU编码
if (this.$route.query.inboundNo) {
this.returnOrderNo = this.$route.query.inboundNo
}
+ if (this.$route.query.buNo) {
+ this.buNo = this.$route.query.buNo
+ }
- // 如果没有退库工单号,返回列表页
- if (!this.returnOrderNo) {
- this.$message.error('缺少退库工单信息')
+ // 如果没有退库工单号或BU编码,返回列表页
+ if (!this.returnOrderNo || !this.buNo) {
+ this.$message.error('缺少必要参数信息')
this.$router.back()
return
}
@@ -232,7 +235,7 @@ export default {
// 调用后端接口获取标签信息
const params = {
site: localStorage.getItem('site'),
- buNo: localStorage.getItem('buNo'),
+ buNo: this.buNo, // 使用从路由参数获取的buNo
warehouseId: currentWarehouse,
labelCode: labelCode
}
@@ -284,7 +287,7 @@ export default {
const params = {
site: localStorage.getItem('site'),
- buNo: localStorage.getItem('buNo'),
+ buNo: this.buNo, // 使用从路由参数获取的buNo
searchKey: query,
limit: 3 // top3
}
@@ -306,6 +309,18 @@ export default {
// 领料工单选择变化
handleIssueOrderChange(value) {
+ // 校验:领料工单不能等于退库工单
+ if (value === this.returnOrderNo) {
+ this.$message.error('领料工单不能与退库工单相同')
+ // 清空领料工单选择
+ this.issueOrderNo = ''
+ this.selectedIssueOrder = null
+ this.operationSeq = ''
+ this.operationName = ''
+ this.operationOptions = []
+ return
+ }
+
const selected = this.issueOrderOptions.find(item => item.orderNo === value)
if (selected) {
this.selectedIssueOrder = selected
@@ -324,14 +339,14 @@ export default {
loadOperationList(orderNo) {
const params = {
site: localStorage.getItem('site'),
- buNo: localStorage.getItem('buNo'),
+ buNo: this.buNo, // 使用从路由参数获取的buNo
orderNo: orderNo
}
getOrderDetail(params).then(({ data }) => {
- if (data && data.code === 0 && data.operations) {
+ if (data && data.code === 0 && data.orderDetail.operations) {
// 后端返回工序集合
- this.operationOptions = data.operations || []
+ this.operationOptions = data.orderDetail.operations || []
// 如果只有一个工序,自动选中
if (this.operationOptions.length === 1) {
@@ -400,7 +415,7 @@ export default {
const params = {
site: localStorage.getItem('site'),
- buNo: localStorage.getItem('buNo'),
+ buNo: this.buNo, // 使用从路由参数获取的buNo
warehouseId: currentWarehouse,
userName: localStorage.getItem('userName'),
returnOrderNo: this.returnOrderNo,