From e47bc9e53ed3d64016c1e0db67d280e63b367e07 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期五, 21 八月 2026 17:05:54 +0800
Subject: [PATCH] 导入模板下载 导入 计算迟到加班早退
---
src/views/wls/arrivalnotice/index.vue | 40 ++++++++++++++++++++++++++++------------
1 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/src/views/wls/arrivalnotice/index.vue b/src/views/wls/arrivalnotice/index.vue
index 15f292e..198da46 100644
--- a/src/views/wls/arrivalnotice/index.vue
+++ b/src/views/wls/arrivalnotice/index.vue
@@ -15,6 +15,7 @@
generateArrivalNoticeFromPurchaseOrder,
getArrivalNoticePage,
} from '#/api/mes/wm/arrivalnotice';
+import { generateItemReceiptFromArrivalNotice } from '#/api/mes/wm/itemreceipt';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
@@ -68,12 +69,22 @@
/** 鎻愮ず鍓嶅線璐ㄦ妯″潡 */
function handleQc() {
- message.info('璇峰墠寰�銆愯川閲忕鐞� - 寰呮浠诲姟銆戜腑杩涜鏉ユ枡妫�楠屾搷浣�');
+ message.info('璇峰墠寰�銆愯川閲忕鐞� - IQC妫�楠屻�戜腑杩涜鏉ユ枡妫�楠屾搷浣�');
}
-/** 鎻愮ず鍓嶅線閲囪喘鍏ュ簱妯″潡 */
-function handleReceipt() {
- message.info('璇峰墠寰�銆愪粨搴撶鐞� - 閲囪喘鍏ュ簱銆戜腑杩涜鍏ュ簱鎿嶄綔');
+/** 鎵ц鍏ュ簱锛氭牴鎹埌璐ч�氱煡鍗曠敓鎴愰噰璐叆搴撳崟 */
+async function handleReceipt(row: MesWmArrivalNoticeApi.ArrivalNotice) {
+ const hideLoading = message.loading({
+ content: '姝e湪鐢熸垚閲囪喘鍏ュ簱鍗�...',
+ duration: 0,
+ });
+ try {
+ await generateItemReceiptFromArrivalNotice(row.id!);
+ message.success('鍏ュ簱鎴愬姛');
+ handleRefresh();
+ } finally {
+ hideLoading();
+ }
}
/** 浠庨噰璐鍗曠敓鎴愬埌璐ч�氱煡鍗� */
@@ -144,13 +155,14 @@
<template #toolbar-tools>
<TableAction
:actions="[
- {
- label: $t('ui.actionTitle.create', ['鍒拌揣閫氱煡鍗�']),
- type: 'primary',
- icon: ACTION_ICON.ADD,
- auth: ['mes:wm-arrival-notice:create'],
- onClick: handleCreate,
- },
+ // 娉ㄩ噴锛氶殣钘忔柊澧炲埌璐ч�氱煡鍗曟寜閽�
+ // {
+ // label: $t('ui.actionTitle.create', ['鍒拌揣閫氱煡鍗�']),
+ // type: 'primary',
+ // icon: ACTION_ICON.ADD,
+ // auth: ['mes:wm-arrival-notice:create'],
+ // onClick: handleCreate,
+ // },
{
label: '浠庨噰璐鍗曠敓鎴�',
type: 'primary',
@@ -205,9 +217,13 @@
{
label: '鎵ц鍏ュ簱',
type: 'link',
+ auth: ['mes:wm-item-receipt:create'],
ifShow:
row.status === MesWmArrivalNoticeStatusEnum.PENDING_RECEIPT,
- onClick: handleReceipt,
+ popConfirm: {
+ title: `纭鏍规嵁鍒拌揣閫氱煡鍗� ${row.code} 鐢熸垚閲囪喘鍏ュ簱鍗曪紵`,
+ confirm: handleReceipt.bind(null, row),
+ },
},
]"
/>
--
Gitblit v1.9.3