From b461c6527e3a85e9af59e7680e792bcb5ffb6b7e Mon Sep 17 00:00:00 2001
From: ZN <zhang_12370@163.com>
Date: 星期二, 10 三月 2026 15:53:37 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New
---
src/views/personnelManagement/monthlyStatistics/index.vue | 93 ++++++++++++++++++++--------------------------
1 files changed, 41 insertions(+), 52 deletions(-)
diff --git a/src/views/personnelManagement/monthlyStatistics/index.vue b/src/views/personnelManagement/monthlyStatistics/index.vue
index 40d450b..f389f57 100644
--- a/src/views/personnelManagement/monthlyStatistics/index.vue
+++ b/src/views/personnelManagement/monthlyStatistics/index.vue
@@ -4,7 +4,7 @@
<div>
<span class="search_title">涓婚锛�</span>
<el-input
- v-model="searchForm.title"
+ v-model="searchForm.salaryTitle"
style="width: 240px"
placeholder="璇疯緭鍏ヤ富棰�"
clearable
@@ -81,28 +81,18 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="issueDialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" :loading="issueLoading" @click="confirmIssue">
纭畾
</el-button>
+ <el-button @click="issueDialogVisible = false">鍙栨秷</el-button>
</template>
</el-dialog>
- <el-dialog v-model="auditDialogVisible" title="宸ヨ祫瀹℃牳" width="720px">
- <el-form label-position="top">
- <el-form-item label="瀹℃牳缁撴灉" required>
- <el-radio-group v-model="auditForm.result">
- <el-radio :value="4">閫氳繃</el-radio>
- <el-radio :value="2">涓嶉�氳繃</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-form>
- <template #footer>
- <el-button @click="auditDialogVisible = false">鍙栨秷</el-button>
- <el-button type="primary" :loading="auditLoading" @click="confirmAudit">
- 纭畾
- </el-button>
- </template>
- </el-dialog>
+ <audit-dia
+ v-model="auditDialogVisible"
+ :row="auditRow"
+ @close="auditDialogVisible = false"
+ @success="handleAuditSuccess"
+ />
</div>
</template>
@@ -120,6 +110,7 @@
import Cookies from "js-cookie";
import FormDia from "./components/formDia.vue";
import BankSettingDia from "./components/bankSettingDia.vue";
+import AuditDia from "./components/auditDia.vue";
import PIMTable from "@/components/PIMTable/PIMTable.vue";
import { bankList } from "@/api/personnelManagement/bank.js";
import {
@@ -130,7 +121,7 @@
const data = reactive({
searchForm: {
- title: "",
+ salaryTitle: "",
status: "",
salaryMonth: "",
},
@@ -140,7 +131,22 @@
const tableColumn = ref([
{ label: "宸ヨ祫涓婚", prop: "salaryTitle", minWidth: 140 },
{ label: "宸ヨ祫鏈堜唤", prop: "salaryMonth", width: 120 },
- { label: "鐘舵��", prop: "statusName", width: 110 },
+ {
+ label: "鐘舵��",
+ prop: "statusName",
+ width: 110,
+ dataType: "tag",
+ formatType: (status) => {
+ const statusMap = {
+ "鑽夌": "info",
+ "瀹℃牳鏈�氳繃": "danger",
+ "寰呭鏍�": "warning",
+ "寰呭彂鏀�": "primary",
+ "宸插彂鏀�": "success"
+ };
+ return statusMap[status] || "info";
+ }
+ },
{ label: "宸ヨ祫鎬婚", prop: "totalSalary", width: 120 },
{ label: "鏀粯閾惰", prop: "payBank", width: 120 },
{ label: "瀹℃牳浜�", prop: "auditUserName", width: 110 },
@@ -155,19 +161,19 @@
{
name: "缂栬緫",
type: "text",
- showHide: (row) => Number(row?.status) === 1 || Number(row?.status) === 2,
+ disabled: (row) => Number(row?.status) !== 1 && Number(row?.status) !== 2,
clickFun: (row) => openForm("edit", row),
},
{
name: "瀹℃牳",
type: "text",
- showHide: (row) => Number(row?.status) === 3,
+ disabled: (row) => Number(row?.status) !== 3,
clickFun: (row) => openAudit(row),
},
{
name: "鍙戞斁",
type: "text",
- showHide: (row) => Number(row?.status) === 4,
+ disabled: (row) => Number(row?.status) !== 4,
clickFun: (row) => openIssue(row),
},
],
@@ -195,9 +201,8 @@
const issueRow = ref(null);
const issueForm = reactive({ bank: "" });
const auditDialogVisible = ref(false);
-const auditLoading = ref(false);
const auditRow = ref(null);
-const auditForm = reactive({ result: 4 }); // 4=閫氳繃(寰呭彂鏀�) 2=涓嶉�氳繃
+const auditDiaRef = ref(null);
const issueBankOptions = computed(() => {
const options = Array.isArray(bankSetting.value?.options) ? bankSetting.value.options : [];
@@ -235,7 +240,7 @@
};
const handleReset = () => {
- searchForm.value.title = "";
+ searchForm.value.salaryTitle = "";
searchForm.value.status = "";
searchForm.value.salaryMonth = "";
page.current = 1;
@@ -258,6 +263,7 @@
.then((res) => {
tableLoading.value = false;
const records = res.data?.records ?? res.data?.list ?? [];
+ console.log('鍒楄〃鎺ュ彛杩斿洖鏁版嵁:', records);
// 鍏煎鍚庣瀛楁锛氳嫢鎺ュ彛浠嶈繑鍥炲彴璐︾粨鏋勶紝鍙湪姝ゅ仛鏄犲皠
tableData.value = records.map((item) => ({
...item,
@@ -293,9 +299,16 @@
};
const openAudit = (row) => {
+ console.log('鎵撳紑瀹℃牳锛屼紶鍏ョ殑鏁版嵁:', row);
auditRow.value = row || null;
- auditForm.result = 4;
auditDialogVisible.value = true;
+ nextTick(() => {
+ auditDiaRef.value?.openDialog(row);
+ });
+};
+
+const handleAuditSuccess = () => {
+ getList();
};
const openIssue = (row) => {
@@ -309,31 +322,7 @@
issueDialogVisible.value = true;
};
-const confirmAudit = () => {
- const row = auditRow.value;
- if (!row?.id) {
- auditDialogVisible.value = false;
- return;
- }
- const username = Cookies.get("username") || "";
- const userIdRaw = Cookies.get("userId");
- const auditUserId = userIdRaw ? Number(userIdRaw) : undefined;
- auditLoading.value = true;
- staffSalaryMainUpdate({
- id: row.id,
- status: Number(auditForm.result) === 2 ? 2 : 4,
- auditUserId,
- auditUserName: username,
- })
- .then(() => {
- proxy?.$modal?.msgSuccess?.("瀹℃牳鎴愬姛");
- auditDialogVisible.value = false;
- getList();
- })
- .finally(() => {
- auditLoading.value = false;
- });
-};
+
const confirmIssue = () => {
const bank = issueForm.bank ? String(issueForm.bank).trim() : "";
--
Gitblit v1.9.3