From 196b76f4f027b6e828fe7629948afd3b360b4c46 Mon Sep 17 00:00:00 2001 From: hwj Date: Wed, 21 Jan 2026 11:46:34 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E8=B4=A8=E9=87=8F=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E6=A3=80=E9=AA=8C=E9=A1=B9=E7=9B=AE-=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E6=98=BE=E7=A4=BA=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/zjitem/index.vue | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/views/mes/zjitem/index.vue b/src/views/mes/zjitem/index.vue index 3ccc1781..21ea2cd6 100644 --- a/src/views/mes/zjitem/index.vue +++ b/src/views/mes/zjitem/index.vue @@ -91,7 +91,11 @@ - + + + ([]) // 列表 +const unitList = ref([]) // 产品单位列表 const loading = ref(true) // 列表的加载中 const list = ref([]) // 列表的数据 const total = ref(0) // 列表的总页数 @@ -228,8 +234,16 @@ const handleExport = async () => { /** 初始化 **/ onMounted(async () => { typeList.value = await ZjTypeApi.getZjTypeList() + unitList.value = await ProductUnitApi.getProductUnitSimpleList() getList() }) +const getUnitName = (value: any) => { + const v = value === '' || value === null || value === undefined ? undefined : Number(value) + if (!v || !unitList.value.length) return '-' + const item = unitList.value.find((u) => u.id === v) + return item?.name ?? '-' +} + - \ No newline at end of file +