From 53d9a72e5a88f1778f3bfdf45fa1e42240808462 Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Mon, 11 Aug 2025 09:54:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor(wms):=20=E6=A0=B9=E6=8D=AE=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=8F=82=E6=95=B0=E5=85=A5=E5=BA=93=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E4=B8=8D=E5=90=8C=EF=BC=8C=E7=BD=91=E9=A1=B5=E5=88=86?= =?UTF-8?q?=E4=B8=BA=E5=A4=9A=E4=B8=AA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注释掉入库方式相关的表单项 - 添加路由参数获取逻辑,初始化时设置查询表单的入库方式 - 重置表单时使用保存的路由参数值恢复入库方式 --- src/views/wms/instockOrderCopy/index.vue | 29 +++++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/views/wms/instockOrderCopy/index.vue b/src/views/wms/instockOrderCopy/index.vue index c575926..ad04fc7 100644 --- a/src/views/wms/instockOrderCopy/index.vue +++ b/src/views/wms/instockOrderCopy/index.vue @@ -10,11 +10,11 @@ - - - - - + + + + + @@ -626,15 +626,31 @@ const parentTableInfoForm = ref({}) const parentTableApproveForm = ref({}) const childrenTableInfoForm = ref({}) + const queryForm = ref({ instockCode: '', materialCategoryId: '', materialCategoryName: '', warehouseId: '', instockType: '', + instockMethond: '', pageNum: 1, pageSize: 10 }) + +// 获取路由实例 +const route = useRoute();// 获取路由实例 +// 初始化时获取路由参数并设置到查询表单 +let routeInstockMethondValue = ''; +if (route.query.instockMethond) { + // 确保值是字符串类型,如果是数组则取第一个元素 + const instockMethondValue = Array.isArray(route.query.instockMethond) + ? route.query.instockMethond[0] + : route.query.instockMethond; + queryForm.value.instockMethond = instockMethondValue; + routeInstockMethondValue = instockMethondValue; // 保存路由参数值 +} + const parentTableRef = ref() const parentTableData = ref([]) const ids = ref([]) @@ -764,7 +780,8 @@ const query = async () => { } const reset = () => { queryForm.value = { - instockId: '' + instockId: '', + instockMethond: routeInstockMethondValue, // 使用保存的路由参数值 } getParentTable() }