From b5fd8d9c9a855200a9d825eeffcfed8f42f4bfb9 Mon Sep 17 00:00:00 2001
From: Yangwl <1726150332@qq.com>
Date: Mon, 25 Nov 2024 11:37:35 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AE=B1=E5=9E=8B=E6=94=B9=E6=88=90=E5=8D=95?=
=?UTF-8?q?=E8=A1=A8=EF=BC=8C=E4=BA=A7=E5=93=81=E7=BB=B4=E6=8A=A4=E7=AE=B1?=
=?UTF-8?q?=E5=9E=8B=E6=94=B9=E6=88=90=E4=B8=8B=E6=8B=89=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/mes/mesBox/index.vue | 118 +++++++++++++++++++++++++++++---
src/views/wms/product/index.vue | 71 ++++++++++++++++++-
2 files changed, 177 insertions(+), 12 deletions(-)
diff --git a/src/views/mes/mesBox/index.vue b/src/views/mes/mesBox/index.vue
index 39bc3ff..99694fd 100644
--- a/src/views/mes/mesBox/index.vue
+++ b/src/views/mes/mesBox/index.vue
@@ -52,6 +52,16 @@
v-hasPermi="['mes:mesBox:remove']">删除
+
+ 导入
+
导出
@@ -62,15 +72,18 @@
-
+
-
-
-
- {{ scope.row.boxType }}
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -98,9 +111,18 @@
-
+
+
+
+
+
+
+
+
+
+
取 消
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+
+ 是否更新已经存在的箱型信息
+
+
仅允许导入xls、xlsx格式文件。
+
下载模板
+
+
+
+
diff --git a/src/views/wms/product/index.vue b/src/views/wms/product/index.vue
index 5cd3aab..22209b8 100644
--- a/src/views/wms/product/index.vue
+++ b/src/views/wms/product/index.vue
@@ -430,20 +430,35 @@
>
+
+
+
+
+
-
+
-
+
-
+
@@ -667,6 +682,9 @@ import {
updateProductAttached,
addProductAttached,
} from "@/api/wms/product";
+import {
+ listMesBox
+} from "@/api/mes/mesBox"
import { syncProductSAP } from "@/api/technology/proroute";
export default {
@@ -695,6 +713,7 @@ export default {
total: 0,
// 产品信息表格数据
productList: [],
+ boxTypes: [], // 用于存储返回的 boxType 数据
// 弹出层标题
title: "",
// 是否显示弹出层
@@ -870,6 +889,19 @@ export default {
this.reset();
this.open = true;
this.title = "添加产品信息";
+ // 请求 MesBox 列表数据
+ listMesBox().then((response) => {
+ // 将返回的 boxType 数据赋值给 boxTypes
+ this.boxTypes = response.rows.map((item) => ({
+ boxType: item.boxType, // 假设返回数据的字段名为 boxType
+ length:item.length,
+ width:item.width,
+ height:item.height,
+
+ }));
+ }).catch((error) => {
+ console.error("请求 MesBox 数据失败:", error); // 捕获错误并输出
+ });
},
/** 修改按钮操作 */
handleUpdate(row) {
@@ -880,6 +912,19 @@ export default {
this.open = true;
this.title = "修改产品信息";
});
+ // 请求 MesBox 列表数据
+ listMesBox().then((response) => {
+ // 将返回的 boxType 数据赋值给 boxTypes
+ this.boxTypes = response.rows.map((item) => ({
+ boxType: item.boxType, // 假设返回数据的字段名为 boxType
+ length:item.length,
+ width:item.width,
+ height:item.height,
+
+ }));
+ }).catch((error) => {
+ console.error("请求 MesBox 数据失败:", error); // 捕获错误并输出
+ });
},
// 查询明细按钮操作
@@ -985,6 +1030,26 @@ export default {
const productCodes = this.productCodes;
return syncProductSAP(productCodes);
},
+
+ handleBoxTypeChange(selectedBoxType) {
+ console.log(selectedBoxType)
+ // 根据选择的 boxType 查找对应的长宽高
+ const selectedBox = this.boxTypes.find(
+ (box) => box.boxType === selectedBoxType
+ );
+ console.log(selectedBox)
+ if (selectedBox) {
+ console.log("222")
+ this.form.length = selectedBox.length;
+ this.form.width = selectedBox.width;
+ this.form.height = selectedBox.height;
+ } else {
+ // 清空长宽高
+ this.form.length = null;
+ this.form.width = null;
+ this.form.height = null;
+ }
+ },
},
};