From 03534e58d6e897ddb6d510227271d1609e2eae0a Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 31 Dec 2025 11:21:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=89=A9=E6=96=99=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=85=A5=E5=BA=93=E5=8D=95=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E5=B9=B6=E6=B7=BB=E5=8A=A0=E7=89=A9=E6=96=99=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E5=92=8C=E5=BA=93=E4=BD=8D=E7=BC=96=E7=A0=81=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在MmInventory.vue中调整表单字段布局,添加入库单号字段 - 将物料编码和库位编码输入框改为下拉选择框 - 在MmRecordInbound.vue中重构表单,添加物料编码和库位编码选择功能 - 新增获取物料编码和库位编码列表的API调用方法 --- .../productionMaterial/MmInventory.vue | 74 ++++---- .../productionMaterial/MmRecordInbound.vue | 172 +++++++++++++++++- 2 files changed, 193 insertions(+), 53 deletions(-) diff --git a/src/views/materialManagement/productionMaterial/MmInventory.vue b/src/views/materialManagement/productionMaterial/MmInventory.vue index 14fcf3a..c43dc02 100644 --- a/src/views/materialManagement/productionMaterial/MmInventory.vue +++ b/src/views/materialManagement/productionMaterial/MmInventory.vue @@ -83,6 +83,12 @@ + + + + + + @@ -96,11 +102,11 @@ --> - + @@ -108,38 +114,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -149,6 +123,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -156,14 +150,8 @@ - - - - - - - - + + @@ -188,7 +176,7 @@ --> - + diff --git a/src/views/materialManagement/productionMaterial/MmRecordInbound.vue b/src/views/materialManagement/productionMaterial/MmRecordInbound.vue index b01e8b0..0b99475 100644 --- a/src/views/materialManagement/productionMaterial/MmRecordInbound.vue +++ b/src/views/materialManagement/productionMaterial/MmRecordInbound.vue @@ -82,7 +82,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -222,7 +343,7 @@ import { updateMmRecordInbound, getMmRecordInbound } from '@/api/materialManagement/productionMaterial/mmrecordinbound.js' -import { getTransactionOption } from '@/api/materialManagement/productionMaterial/mminventory.js' +import { getTransactionOption, getMaterialOption, getLocationOption } from '@/api/materialManagement/productionMaterial/mminventory.js' const { proxy } = getCurrentInstance() const ids = ref([]) const loading = ref(false) @@ -321,7 +442,9 @@ const state = reactive({ }, options: { // 入库类型 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'} - transactionTypeOptions: [] + transactionTypeOptions: [], + materialCodeOptions: [], + locationOptions: [] } }) @@ -335,6 +458,7 @@ function cancel() { // 重置表单 function reset() { + form.value = { unit: null, createdTime: null, @@ -439,5 +563,33 @@ function getTypeOfWarehousingList() { } } +// 物料编码列表 +function getMaterialCodeList() { + try { + getMaterialOption('materialCode').then((res) => { + const { code, data } = res + if (code == 200) { + state.options.materialCodeOptions = data + } + }) + } catch (error) { + proxy.$modal.msgError(error.message) + } +} + +// 获取库位编码列表 +function getLocationOptionList() { + try { + getLocationOption('warehouseCode').then((res) => { + const { code, data } = res + if (code == 200) { + state.options.locationOptions = data + } + }) + } catch (error) { + proxy.$modal.msgError(error.message) + } +} + handleQuery()