diff --git a/inventory-web/src/api/transaction.ts b/inventory-web/src/api/transaction.ts index f86d684..5abf4a3 100644 --- a/inventory-web/src/api/transaction.ts +++ b/inventory-web/src/api/transaction.ts @@ -308,6 +308,18 @@ export function rejectBorrowTransfer(transferId: number, reason?: string) { }) } +/** + * 待我接收的转交数量 —— 全局待办强提醒用(初始化 + 轮询)。 + * 极轻量,只做一次 count。 + * @returns { count } + */ +export function getPendingTransferCount() { + return request({ + url: '/v1/transactions/borrow/transfer/pending-count', + method: 'get' + }) +} + /** * 整单流转时间线(**borrow_no** 维度):借出 → 转交(可多次) → 归还 → 报废 * diff --git a/inventory-web/src/components/PendingTransferNotifier/index.vue b/inventory-web/src/components/PendingTransferNotifier/index.vue new file mode 100644 index 0000000..24037fb --- /dev/null +++ b/inventory-web/src/components/PendingTransferNotifier/index.vue @@ -0,0 +1,104 @@ + + + diff --git a/inventory-web/src/layout/index.vue b/inventory-web/src/layout/index.vue index af8e789..0540503 100644 --- a/inventory-web/src/layout/index.vue +++ b/inventory-web/src/layout/index.vue @@ -8,6 +8,10 @@ + + + @@ -15,6 +19,7 @@ import Sidebar from './components/Sidebar/index.vue' import AppMain from './components/AppMain.vue' import SpecHelper from '@/components/SpecHelper/index.vue' +import PendingTransferNotifier from '@/components/PendingTransferNotifier/index.vue'