From b94e6db9af9ca2593d479819cf61effcdb1a2613 Mon Sep 17 00:00:00 2001 From: zhx Date: Fri, 29 May 2026 20:55:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=88=E5=BA=A6=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/operate/manual-salary-payment.vue | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/apps/src/views/operate/manual-salary-payment.vue b/apps/src/views/operate/manual-salary-payment.vue index 94ffaa5..33f1db1 100644 --- a/apps/src/views/operate/manual-salary-payment.vue +++ b/apps/src/views/operate/manual-salary-payment.vue @@ -6,6 +6,8 @@ import { watch, } from 'vue'; +import dayjs from 'dayjs'; + import { Page } from '@vben/common-ui'; import { useAccessStore } from '@vben/stores'; @@ -21,6 +23,7 @@ import { getAllowedSysOrigins } from '#/views/system/shared'; import { Button, Card, + DatePicker, Modal, Select, Space, @@ -59,6 +62,7 @@ const salarySortKey = ref<'' | SalarySortKey>(''); const salarySortOrder = ref(''); const query = reactive({ + billBelong: dayjs().format('YYYYMM'), countryCode: '', cursor: 1, limit: 20, @@ -168,7 +172,7 @@ watch( ); watch( - [() => query.sysOrigin, () => query.countryCode, () => query.userId], + [() => query.sysOrigin, () => query.countryCode, () => query.userId, () => query.billBelong], () => { selectedUserIds.value = []; }, @@ -256,6 +260,13 @@ function countryLabel(code?: string) { return `${country.phonePrefix || ''} ${country.countryName || country.aliasName || code}`; } +function billBelongLabel() { + if (!query.billBelong || query.billBelong.length !== 6) { + return '当前账期'; + } + return `${query.billBelong.slice(0, 4)}-${query.billBelong.slice(4, 6)}`; +} + function getRowKey(record: Record) { return String(record.id || record.userProfile?.account || record.userId || ''); } @@ -327,6 +338,7 @@ function toggleSalarySort(key?: number | string) { async function submitManualSalary(userIds?: string[]) { const hasSelectedUsers = !!userIds?.length; resultRows.value = await confirmManualSalary({ + billBelong: Number(query.billBelong), countryCode: query.countryCode, sysOrigin: query.sysOrigin, ...(hasSelectedUsers ? { userIds } : {}), @@ -354,8 +366,8 @@ function confirmPay() { ? '本次只发放已勾选的用户。' : '未勾选用户,本次将发放当前筛选国家的所有可发工资用户。', title: hasSelectedUsers - ? `确认发放已选择的 ${userIds.length} 人当前账期工资?` - : `确认发放 ${countryLabel(query.countryCode)} 当前账期工资?`, + ? `确认发放已选择的 ${userIds.length} 人 ${billBelongLabel()} 工资?` + : `确认发放 ${countryLabel(query.countryCode)} ${billBelongLabel()} 工资?`, async onOk() { paying.value = true; try { @@ -383,7 +395,7 @@ function settleUser(record: Record) { content: payableSalary < 0 ? '该用户应发小于实收,本次发放0并置为已结算,不会对用户扣款。' : '本次只结算当前这一行用户的工资。', - title: `确认结算用户 ${record.userProfile?.account || userId} 的当前账期工资?`, + title: `确认结算用户 ${record.userProfile?.account || userId} 的 ${billBelongLabel()} 工资?`, async onOk() { settlingUserId.value = userId; try { @@ -428,6 +440,16 @@ void loadCountries(); @change="loadData(true)" @search="countryKeyword = $event" /> +