| src/api/personnelManagement/staffSalaryMain.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/inventoryManagement/receiptManagement/Record.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/personnelManagement/monthlyStatistics/components/auditDia.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/personnelManagement/monthlyStatistics/components/formDia.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/personnelManagement/monthlyStatistics/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/procurementManagement/procurementLedger/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/personnelManagement/staffSalaryMain.js
@@ -48,3 +48,12 @@ data: ids, }); } // 获取可用部门列表(根据月份查询,排除已发放工资表的部门) export function staffSalaryMainAvailableDepts(salaryMonth) { return request({ url: "/staffSalaryMain/availableDepts", method: "get", params: { salaryMonth }, }); } src/views/inventoryManagement/receiptManagement/Record.vue
@@ -129,6 +129,10 @@ <el-table-column label="单位" prop="unit" show-overflow-tooltip /> <el-table-column label="本次入库数量" prop="theoryStockInNum" width="120" show-overflow-tooltip /> <el-table-column label="实际入库数量" prop="stockInNum" width="120" src/views/personnelManagement/monthlyStatistics/components/auditDia.vue
@@ -86,7 +86,7 @@ <script setup> import { ref, computed, reactive, toRefs, getCurrentInstance, watch } from "vue"; import { ElMessage } from "element-plus"; import Cookies from "js-cookie"; import useUserStore from "@/store/modules/user"; import FormDialog from "@/components/Dialog/FormDialog.vue"; import { staffSalaryMainUpdate } from "@/api/personnelManagement/staffSalaryMain.js"; @@ -98,6 +98,7 @@ }); const { proxy } = getCurrentInstance(); const userStore = useUserStore(); const dialogVisible = computed({ get: () => props.modelValue, @@ -176,15 +177,21 @@ return; } const username = Cookies.get("username") || ""; const userIdRaw = Cookies.get("userId"); const auditUserId = userIdRaw ? Number(userIdRaw) : undefined; const username = userStore.name || ""; const currentUserId = Number(userStore.id); const assignedAuditUserId = Number(row?.auditUserId); // 权限验证:只有指定的审核人才能进行审核 if (!currentUserId || currentUserId !== assignedAuditUserId) { ElMessage.warning("您不是指定的审核人,无法进行审核操作"); return; } // 构建审核数据 const submitData = { id: row.id, status: Number(auditResult.value) === 2 ? 2 : 4, // 2=不通过 4=通过(待发放) auditUserId, auditUserId: currentUserId, auditUserName: username, }; loading.value = true; src/views/personnelManagement/monthlyStatistics/components/formDia.vue
@@ -36,6 +36,18 @@ </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="选择工资月份" prop="salaryMonth"> <el-date-picker v-model="form.salaryMonth" type="month" value-format="YYYY-MM" format="YYYY-MM" placeholder="请选择工资月份" style="width: 100%" clearable /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="选择部门" prop="deptIds"> <el-select v-model="form.deptIds" @@ -47,20 +59,9 @@ <el-option v-for="item in deptOptions" :key="item.deptId" :label="item.deptName" :value="item.deptId" /> :value="item.deptId" :disabled="isDeptDisabled(item.deptId)" /> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="选择工资月份" prop="salaryMonth"> <el-date-picker v-model="form.salaryMonth" type="month" value-format="YYYY-MM" format="YYYY-MM" placeholder="请选择工资月份" style="width: 100%" clearable /> </el-form-item> </el-col> <el-col :span="6"> @@ -379,18 +380,20 @@ computed, getCurrentInstance, nextTick, watch, } from "vue"; import { ArrowUp } from "@element-plus/icons-vue"; import FormDialog from "@/components/Dialog/FormDialog.vue"; import { listDept } from "@/api/system/dept.js"; import { staffOnJobList } from "@/api/personnelManagement/monthlyStatistics.js"; import { bankList } from "@/api/personnelManagement/bank.js"; import { staffSalaryMainAdd, staffSalaryMainUpdate, staffSalaryMainCalculateSalary, staffSalaryMainCalculateByEmployeeId, } from "@/api/personnelManagement/staffSalaryMain.js"; import { bankList } from "@/api/personnelManagement/bank.js"; import { staffSalaryMainAdd, staffSalaryMainUpdate, staffSalaryMainCalculateSalary, staffSalaryMainCalculateByEmployeeId, staffSalaryMainAvailableDepts, } from "@/api/personnelManagement/staffSalaryMain.js"; import { userListNoPageByTenantId } from "@/api/system/user.js"; const emit = defineEmits(["update:modelValue", "close"]); @@ -413,6 +416,7 @@ const addPersonVisible = ref(false); const taxDialogVisible = ref(false); const deptOptions = ref([]); const availableDeptIds = ref(new Set()); const deptStaffTree = ref([]); const employeeList = ref([]); const selectedEmployees = ref([]); @@ -643,11 +647,32 @@ return list; } const loadDeptOptions = () => { // 加载所有部门 const loadAllDeptOptions = () => { listDept().then(res => { const tree = res.data ?? []; deptOptions.value = flattenDept(tree); }); }; // 加载可用部门列表(用于判断部门是否可选) const loadAvailableDepts = (salaryMonth) => { if (!salaryMonth) { availableDeptIds.value = new Set(); return; } staffSalaryMainAvailableDepts(salaryMonth).then(res => { const availableDepts = Array.isArray(res.data) ? res.data : []; availableDeptIds.value = new Set(availableDepts.map(d => d.deptId)); }); }; // 判断部门是否禁用 const isDeptDisabled = (deptId) => { // 如果没有选择月份,所有部门都可选 if (!form.value.salaryMonth) return false; // 如果已选择月份,只有在可用部门列表中的部门才可选 return !availableDeptIds.value.has(deptId); }; // 构建 部门-人员 树(用于新增人员弹窗) @@ -691,9 +716,9 @@ const openDialog = (type, row) => { nextTick(() => { resetRecalcState(); loadDeptOptions(); loadBankOptions(); loadUserList(); loadAllDeptOptions(); employeeList.value = []; Object.assign(form.value, { id: undefined, @@ -725,8 +750,21 @@ employeeList.value = row.staffSalaryDetailList.map(e => normalizeSalaryRow(e)); } } // 编辑状态且有月份时,加载可用部门列表 if (type === "edit" && form.value.salaryMonth) { loadAvailableDepts(form.value.salaryMonth); } }); }; // 监听工资月份变化,清空部门选择并加载可用部门列表 watch(() => form.value.salaryMonth, (newMonth, oldMonth) => { // 切换月份时清空已选择的部门 if (newMonth !== oldMonth) { form.value.deptIds = []; } loadAvailableDepts(newMonth); }); const openAddPerson = () => { loadDeptStaffTree(); @@ -970,4 +1008,4 @@ font-weight: bold; font-size: 18px; } </style> </style> src/views/personnelManagement/monthlyStatistics/index.vue
@@ -114,6 +114,7 @@ } from "vue"; import { ElMessageBox } from "element-plus"; import Cookies from "js-cookie"; import useUserStore from "@/store/modules/user"; import FormDia from "./components/formDia.vue"; import BankSettingDia from "./components/bankSettingDia.vue"; import AuditDia from "./components/auditDia.vue"; @@ -126,6 +127,7 @@ staffSalaryMainUpdate, } from "@/api/personnelManagement/staffSalaryMain.js"; const userStore = useUserStore(); const data = reactive({ searchForm: { salaryTitle: "", @@ -179,7 +181,12 @@ { name: "审核", type: "text", disabled: row => Number(row?.status) !== 3, disabled: (row) => { const currentUserId = Number(userStore.id); const auditUserId = Number(row?.auditUserId); // 状态不是待审核 或 当前用户不是指定的审核人,则禁用审核按钮 return Number(row?.status) !== 3 || !currentUserId || currentUserId !== auditUserId; }, clickFun: row => openAudit(row), }, { @@ -399,9 +406,9 @@ const handleExport = () => { proxy.download( "/compensationPerformance/export", { ...searchForm.value, current: page.current, size: page.size }, "工资表.xlsx" "/staffSalaryMain/export", { ...searchForm.value }, "工资表.xlsx" ); }; src/views/procurementManagement/procurementLedger/index.vue
@@ -786,7 +786,7 @@ prop="unit" width="70" /> <el-table-column label="待入库数量" prop="availableQuality" prop="pendingInboundQuantity" width="100" /> <el-table-column label="本次入库数量" width="130"> @@ -794,7 +794,7 @@ <el-input-number v-model="scope.row.inboundQuantity" :step="0.01" :min="0" :max="scope.row.availableQuality" :max="scope.row.pendingInboundQuantity" @change="handleInboundChange(scope.row)" controls-position="right" style="width: 100%" /> @@ -877,6 +877,9 @@ batchGeneratePurchaseInboundSteps, manualStockIn, } from "@/api/procurementManagement/procurementLedger.js"; import { modelList, productTreeList } from "@/api/basicData/product.js"; import dayjs from "dayjs"; import FileUpload from "@/components/AttachmentUpload/file/index.vue"; import useFormData from "@/hooks/useFormData.js"; const FileList = defineAsyncComponent(() => import("@/components/Dialog/FileList.vue") @@ -910,9 +913,6 @@ }); const total = ref(0); const fileList = ref([]); import { modelList, productTreeList } from "@/api/basicData/product.js"; import dayjs from "dayjs"; import FileUpload from "@/components/AttachmentUpload/file/index.vue"; // 订单审批状态显示文本 const approvalStatusText = { @@ -1416,16 +1416,22 @@ proxy.$modal.loading("正在加载产品信息..."); const res = await productList({ salesLedgerId: row.id, type: 2 }); if (res.code === 200) { // 过滤掉已经完全入库的产品(如果有这个状态的话,或者直接显示所有可用数量大于0的产品) stockInForm.details = (res.data || []) .filter(item => (item.availableQuality || 0) > 0) .map(item => ({ const productDetails = (res.data || []).map(item => { const pendingInboundQuantity = Number(item.pendingInboundQuantity || 0); return { ...item, inboundQuantity: item.availableQuality || 0, // 默认入库全部可用数量 pendingInboundQuantity, inboundQuantity: pendingInboundQuantity, // 默认入库全部待入库数量 isContainsWater: false, waterContent: 0, actualInboundQuantity: item.availableQuality || 0, })); actualInboundQuantity: pendingInboundQuantity, }; }); // 过滤掉已经完全入库的产品 stockInForm.details = productDetails.filter( item => (item.pendingInboundQuantity || 0) > 0 ); if (stockInForm.details.length === 0) { proxy.$modal.msgWarning("该合同下没有可入库的产品记录"); @@ -1469,10 +1475,10 @@ } const overLimit = stockInForm.details.some( item => item.inboundQuantity > item.availableQuality item => item.inboundQuantity > item.pendingInboundQuantity ); if (overLimit) { proxy.$modal.msgWarning("入库数量不能超过可用数量"); proxy.$modal.msgWarning("入库数量不能超过待入库数量"); return; }