From 358bb39ffbc371a430b7317fdd580e314908b5a7 Mon Sep 17 00:00:00 2001 From: ChenQiuYu Date: Mon, 19 May 2025 11:04:15 +0800 Subject: [PATCH] dev --- .../home/index/Dialog/ExpireWarnDetail.vue | 83 +++++++++++----- .../home/index/Dialog/InventoryWarnDetail.vue | 98 +++++++++++++------ src/components/home/index/InventoryAlert.vue | 9 +- src/components/home/index/ValidityWarning.vue | 7 +- src/components/settings/ItemEdit.vue | 1 - src/views/inventory/goods.vue | 24 ++--- src/views/social/directory.vue | 1 - 7 files changed, 141 insertions(+), 82 deletions(-) diff --git a/src/components/home/index/Dialog/ExpireWarnDetail.vue b/src/components/home/index/Dialog/ExpireWarnDetail.vue index 6640038..b113dc5 100644 --- a/src/components/home/index/Dialog/ExpireWarnDetail.vue +++ b/src/components/home/index/Dialog/ExpireWarnDetail.vue @@ -1,52 +1,76 @@ \ No newline at end of file diff --git a/src/components/home/index/Dialog/InventoryWarnDetail.vue b/src/components/home/index/Dialog/InventoryWarnDetail.vue index 3410692..86a36b8 100644 --- a/src/components/home/index/Dialog/InventoryWarnDetail.vue +++ b/src/components/home/index/Dialog/InventoryWarnDetail.vue @@ -1,61 +1,95 @@ \ No newline at end of file diff --git a/src/components/home/index/InventoryAlert.vue b/src/components/home/index/InventoryAlert.vue index f37d3b7..ad88f1c 100644 --- a/src/components/home/index/InventoryAlert.vue +++ b/src/components/home/index/InventoryAlert.vue @@ -8,19 +8,16 @@ onMounted(() => { getInventoryWarning() }) const inventoryWarnDetailRef = ref() -const inventoryWarnListSrc = ref([]); const inventoryWarnList = ref([]); const openInventoryWarnDetail = () => { nextTick(() => { - inventoryWarnDetailRef.value.init(inventoryWarnListSrc.value) + inventoryWarnDetailRef.value.init() }) } - const getInventoryWarning = () => { - post("statistics/numberEarlyWarning").then((res: any) => { - inventoryWarnListSrc.value = res - inventoryWarnList.value = res.slice(0, 4) + post("statistics/numberEarlyWarning",{pageNum: 1, pageSize: 20}).then((res: any) => { + inventoryWarnList.value = res.list.slice(0, 4) }) } const isZeroInventory = (item: any) => { diff --git a/src/components/home/index/ValidityWarning.vue b/src/components/home/index/ValidityWarning.vue index 1bfeff2..fabd097 100644 --- a/src/components/home/index/ValidityWarning.vue +++ b/src/components/home/index/ValidityWarning.vue @@ -7,7 +7,7 @@ import ExpireWarnDetail from "@/components/home/index/Dialog/ExpireWarnDetail.vu const expireWarnDetailRef = ref() const openExpireWarnDetail = () => { nextTick(() => { - expireWarnDetailRef.value.init(expireDateWarningListSrc.value) + expireWarnDetailRef.value.init() }) } @@ -18,9 +18,8 @@ const expireDateWarningListSrc = ref([]); const expireDateWarningList = ref([]); const getExpiryDateWarning = () => { - post("statistics/expiryDateWarning").then((res: any) => { - expireDateWarningListSrc.value = res - expireDateWarningList.value = res.slice(0, 4) + post("statistics/expiryDateWarning",{pageNum: 1, pageSize: 20}).then((res: any) => { + expireDateWarningList.value = res.list.slice(0, 4) }) } const isExpire = (item: any) => { diff --git a/src/components/settings/ItemEdit.vue b/src/components/settings/ItemEdit.vue index 845e71b..03b352d 100644 --- a/src/components/settings/ItemEdit.vue +++ b/src/components/settings/ItemEdit.vue @@ -177,7 +177,6 @@ const init = () => { if (props.id) { post("item/getItemById", {id: props.id}).then((res: any) => { form.value = res - form.value.unit = Number(res.unit) }) } } diff --git a/src/views/inventory/goods.vue b/src/views/inventory/goods.vue index c3ff002..107f96f 100644 --- a/src/views/inventory/goods.vue +++ b/src/views/inventory/goods.vue @@ -96,18 +96,18 @@ {{ scope.row.minPackagingNumber }}*{{ scope.row.minPackagingUnit }}/{{ scope.row.packagingUnit }} - + - + - + @@ -118,7 +118,7 @@ 已停售 - + - + - - + + @@ -147,24 +147,24 @@ - - + + - + - + - + diff --git a/src/views/social/directory.vue b/src/views/social/directory.vue index 85dee81..e99202e 100644 --- a/src/views/social/directory.vue +++ b/src/views/social/directory.vue @@ -38,7 +38,6 @@ -