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;
+ }
+ },
},
};