From e2caad521926eb7722c061ec58f8c45c2a87a52a Mon Sep 17 00:00:00 2001 From: flower-string <2178503051@qq.com> Date: Sun, 9 Mar 2025 20:15:14 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E8=96=AA=E8=B5=84=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/oa/salary.js | 32 +++ .../views/oa/peoples/salary/staff/index.vue | 246 ++++++++++++++++++ .../views/oa/peoples/salary/worker/index.vue | 0 3 files changed, 278 insertions(+) create mode 100644 ruoyi-ui/src/api/oa/salary.js create mode 100644 ruoyi-ui/src/views/oa/peoples/salary/staff/index.vue create mode 100644 ruoyi-ui/src/views/oa/peoples/salary/worker/index.vue diff --git a/ruoyi-ui/src/api/oa/salary.js b/ruoyi-ui/src/api/oa/salary.js new file mode 100644 index 0000000..e5a6200 --- /dev/null +++ b/ruoyi-ui/src/api/oa/salary.js @@ -0,0 +1,32 @@ +import request from '@/utils/request' + +/** + * 根据月份和文件计算工资 + * @param {*} param0.monthStr: 月份 + * @param {*} param0.filePath: 文件路径 + * @returns + */ +export function calculateSalary({ monthStr, filePath }) { + return request({ + url: '/oa/salary/calc', + method: 'post', + data: { + monthStr, + filePath + } + }) +} + +/** + * oss文件上传 + */ +export function uploadOssFile(data) { + return request({ + url: '/system/oss/upload', + method: 'post', + data, + headers: { + 'Content-Type': 'multipart/form-data' + } + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/views/oa/peoples/salary/staff/index.vue b/ruoyi-ui/src/views/oa/peoples/salary/staff/index.vue new file mode 100644 index 0000000..05fd05d --- /dev/null +++ b/ruoyi-ui/src/views/oa/peoples/salary/staff/index.vue @@ -0,0 +1,246 @@ + + + + + 新增计算 + + + + + + + + + + + + + + 将文件拖到此处,或点击上传 + 仅支持xlsx格式文件 + + + + + + 取消 + 确认上传 + + {{ isUploading ? '计算中...' : '开始计算' }} + + + + + + + + + 计算历史 + + + + + + ¥ {{scope.row.totalAmount}} + + + + + 查看 + + + + + + + + {{ currentMonth }} 薪资计算结果 + + + + + + + + ¥ {{scope.row.total}} + + + + + + 合计人数:{{currentResult.length}} 人 + 总金额:¥ {{totalAmount}} + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/oa/peoples/salary/worker/index.vue b/ruoyi-ui/src/views/oa/peoples/salary/worker/index.vue new file mode 100644 index 0000000..e69de29