From 7e4d259db375d52eda45aa0df8b5d2324d88c0e6 Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 5 Jan 2026 10:57:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=89=A9=E6=96=99=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=89=A9=E6=96=99=E7=AE=A1=E7=90=86=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在出库记录页面添加操作员查询字段 - 将物料分类状态值从数字改为文字"启用" - 调整交易类型表格列显示,隐藏主键ID和创建时间 - 重构物料管理页面,优化分类选择逻辑和显示 - 显示供应商编码和名称列,移除部分冗余字段 --- .../productionMaterial/MmMaterial.vue | 63 ++++++++----------- .../productionMaterial/MmMaterialCategory.vue | 4 +- .../productionMaterial/MmRecordOutbound.vue | 3 + .../productionMaterial/MmTransactionType.vue | 4 +- 4 files changed, 33 insertions(+), 41 deletions(-) diff --git a/src/views/materialManagement/productionMaterial/MmMaterial.vue b/src/views/materialManagement/productionMaterial/MmMaterial.vue index 6227668..faa1455 100644 --- a/src/views/materialManagement/productionMaterial/MmMaterial.vue +++ b/src/views/materialManagement/productionMaterial/MmMaterial.vue @@ -15,8 +15,10 @@ - - + + {{ item.value }} + {{ item.label }} + @@ -112,13 +114,18 @@ - + + + {{ item.value }} + {{ item.label }} + + - + @@ -128,18 +135,6 @@ - - - - - - - - @@ -168,20 +163,6 @@ - - - - - - - - - - - - - - @@ -228,8 +209,8 @@ const columns = ref([ { visible: true, align: 'center', type: '', prop: 'categoryName', label: '物料分类名称', showOverflowTooltip: true }, { visible: true, align: 'center', type: '', prop: 'unit', label: '计量单位', showOverflowTooltip: true }, { visible: true, align: 'center', type: 'dict', prop: 'type', label: '物料类型(原材料/半成品/产成品/打包材料/辅料)', showOverflowTooltip: true }, - { visible: false, align: 'center', type: '', prop: 'supplierCode', label: '供应商编码', showOverflowTooltip: true }, - { visible: false, align: 'center', type: '', prop: 'supplierName', label: '供应商名称', showOverflowTooltip: true }, + { visible: true, align: 'center', type: '', prop: 'supplierCode', label: '供应商编码', showOverflowTooltip: true }, + { visible: true, align: 'center', type: '', prop: 'supplierName', label: '供应商名称', showOverflowTooltip: true }, { visible: false, align: 'center', type: '', prop: 'safetyStock', label: '安全库存' }, { visible: false, align: 'center', type: 'dict', prop: 'status', label: '状态(停用/启用)', showOverflowTooltip: true }, { visible: true, align: 'center', type: '', prop: 'createdTime', label: '创建时间', showOverflowTooltip: true }, @@ -331,7 +312,9 @@ const state = reactive({ dictValue: '启用', dictLabel: '启用' } - ] + ], + // 物料分类编码 选项列表 格式 eg:{ materialCode: '001', materialName: '原材料'} + materialCodeOptions: [] } }) @@ -429,8 +412,6 @@ function handleDelete(row) { proxy.$modal.msgSuccess('删除成功') }) } -// 物料分类名称下拉列表 -const materialCategoryOptions = ref([]) // 物料分类名称下拉列表 可见性变化时触发 function handleGetMmMaterialCategoryOptions() { @@ -438,14 +419,22 @@ function handleGetMmMaterialCategoryOptions() { getMmMaterialCategoryOptions().then((res) => { const { code, data } = res if (code == 200) { - console.log(data) - materialCategoryOptions.value = data + state.options.materialCodeOptions = data } }) } catch (err) { console.log(err) } } + +// 物料分类名称下拉列表 选项变化时触发 +function handleCategoryChange(val) { + if (val) { + form.value.categoryCode = val.value + form.value.categoryName = val.label + } +} + handleGetMmMaterialCategoryOptions() handleQuery() diff --git a/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue b/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue index 4cab77a..fc0b040 100644 --- a/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue +++ b/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue @@ -232,7 +232,7 @@ const state = reactive({ single: true, multiple: true, form: { - status: 1 + status: '启用', }, rules: { categoryCode: [{ required: true, message: '分类编码不能为空', trigger: 'blur' }], @@ -270,7 +270,7 @@ function reset() { parentCode: null, levelNo: null, description: null, - status: 1, // 设置默认值为'1'(启用) + status: '启用', // 设置默认值为'启用' createdTime: null, updatedTime: null } diff --git a/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue b/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue index 700df06..50750dd 100644 --- a/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue +++ b/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue @@ -22,6 +22,9 @@ + + +