From b0e6a3324bcc0e073c4f864cb537e1725685b0c5 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 09 十月 2026 21:10:20 +0800
Subject: [PATCH] 天津-奇缘恒艺 1.录数据需求修改
---
src/views/personnelManagement/classsSheduling/index.vue | 28 +++++-
src/views/personnelManagement/contractManagement/components/formDia.vue | 4 -
src/views/personnelManagement/attendanceCheckin/checkinRules/index.vue | 21 ++---
src/views/basicData/supplierManage/components/BlacklistTab.vue | 30 -------
src/views/personnelManagement/contractManagement/index.vue | 74 +++++++++---------
src/views/collaborativeApproval/knowledgeBase/index.vue | 7 -
src/views/personnelManagement/attendanceCheckin/checkinRules/components/form.vue | 25 +----
src/views/basicData/supplierManage/components/HomeTab.vue | 30 -------
8 files changed, 76 insertions(+), 143 deletions(-)
diff --git a/src/views/basicData/supplierManage/components/BlacklistTab.vue b/src/views/basicData/supplierManage/components/BlacklistTab.vue
index 206ba62..6742904 100644
--- a/src/views/basicData/supplierManage/components/BlacklistTab.vue
+++ b/src/views/basicData/supplierManage/components/BlacklistTab.vue
@@ -90,26 +90,6 @@
</el-row>
<el-row :gutter="30">
<el-col :span="12">
- <el-form-item label="寮�鎴疯锛�" prop="bankAccountName">
- <el-input
- v-model="form.bankAccountName"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="璐﹀彿锛�" prop="bankAccountNum">
- <el-input
- v-model="form.bankAccountNum"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
<el-form-item label="鑱旂郴浜猴細" prop="contactUserName">
<el-input
v-model="form.contactUserName"
@@ -283,16 +263,6 @@
label: "鑱旂郴鏂瑰紡",
prop: "companyPhone",
width:150
- },
- {
- label: "寮�鎴疯",
- prop: "bankAccountName",
- width: 220,
- },
- {
- label: "璐﹀彿",
- prop: "bankAccountNum",
- width: 220,
},
{
label: "鑱旂郴浜�",
diff --git a/src/views/basicData/supplierManage/components/HomeTab.vue b/src/views/basicData/supplierManage/components/HomeTab.vue
index da62ca4..c9f05d0 100644
--- a/src/views/basicData/supplierManage/components/HomeTab.vue
+++ b/src/views/basicData/supplierManage/components/HomeTab.vue
@@ -96,26 +96,6 @@
</el-row>
<el-row :gutter="30">
<el-col :span="12">
- <el-form-item label="寮�鎴疯锛�" prop="bankAccountName">
- <el-input
- v-model="form.bankAccountName"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="璐﹀彿锛�" prop="bankAccountNum">
- <el-input
- v-model="form.bankAccountNum"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
<el-form-item label="鑱旂郴浜猴細" prop="contactUserName">
<el-input
v-model="form.contactUserName"
@@ -289,16 +269,6 @@
label: "鑱旂郴鏂瑰紡",
prop: "companyPhone",
width:150
- },
- {
- label: "寮�鎴疯",
- prop: "bankAccountName",
- width: 220,
- },
- {
- label: "璐﹀彿",
- prop: "bankAccountNum",
- width: 220,
},
{
label: "鑱旂郴浜�",
diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index b0c50fb..b0141b2 100644
--- a/src/views/collaborativeApproval/knowledgeBase/index.vue
+++ b/src/views/collaborativeApproval/knowledgeBase/index.vue
@@ -583,13 +583,6 @@
}
},
{
- name: "闂瓟",
- type: "text",
- clickFun: (row) => {
- openChatDialog(row);
- }
- },
- {
name: "璇︽儏",
type: "text",
clickFun: (row) => {
diff --git a/src/views/personnelManagement/attendanceCheckin/checkinRules/components/form.vue b/src/views/personnelManagement/attendanceCheckin/checkinRules/components/form.vue
index 0ddea67..f4f60d2 100644
--- a/src/views/personnelManagement/attendanceCheckin/checkinRules/components/form.vue
+++ b/src/views/personnelManagement/attendanceCheckin/checkinRules/components/form.vue
@@ -31,18 +31,16 @@
<el-form-item label="鐝"
prop="shift">
<el-select v-model="form.shift"
- placeholder="璇烽�夋嫨鐝"
+ placeholder="璇烽�夋嫨鎴栬緭鍏ョ彮娆�"
+ filterable
+ allow-create
+ default-first-option
:disabled="operationType === 'view'"
style="width: 100%">
<el-option v-for="item in shifts_list"
:key="item.value"
:label="item.label"
- :value="item.value"
- :disabled="
- operationType === 'add' &&
- (String(item.label || '').includes('鍋�') ||
- String(item.label || '').includes('浼�'))
- " />
+ :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="鎵撳崱鑼冨洿(m)"
@@ -169,19 +167,10 @@
// 鑾峰彇鐝瀛楀吀鍊�
const { shifts_list } = useDict("shifts_list");
- const selectedShiftLabel = computed(() => {
- const item = shifts_list.value?.find(
- s => String(s.value) === String(form.shift)
- );
- return item?.label || "";
- });
-
const hideClockFields = computed(() => {
if (props.operationType === "view") return false;
- return (
- selectedShiftLabel.value.includes("鍋�") ||
- selectedShiftLabel.value.includes("浼�")
- );
+ const shiftName = form.shift || "";
+ return shiftName.includes("鍋�") || shiftName.includes("浼�");
});
// 琛ㄥ崟鏁版嵁
diff --git a/src/views/personnelManagement/attendanceCheckin/checkinRules/index.vue b/src/views/personnelManagement/attendanceCheckin/checkinRules/index.vue
index 9658b1f..da2dc59 100644
--- a/src/views/personnelManagement/attendanceCheckin/checkinRules/index.vue
+++ b/src/views/personnelManagement/attendanceCheckin/checkinRules/index.vue
@@ -29,17 +29,11 @@
</el-form-item>
<el-form-item label="鐝锛�"
prop="shift">
- <el-select v-model="searchForm.shift"
- placeholder="璇烽�夋嫨鐝"
- clearable
- style="width: 200px">
- <el-option
- v-for="item in shifts_list"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
+ <el-input v-model="searchForm.shift"
+ placeholder="璇疯緭鍏ョ彮娆�"
+ clearable
+ style="width: 200px"
+ @keyup.enter="handleSearch" />
</el-form-item>
<el-form-item>
<el-button type="primary"
@@ -259,7 +253,10 @@
// 鏌ヨ鐝鍒楄〃
const fetchData = () => {
tableLoading.value = true;
- getAttendanceRules({ ...page, ...searchForm })
+ const params = { ...page };
+ if (searchForm.sysDeptId) params.sysDeptId = searchForm.sysDeptId;
+ if (searchForm.shift) params.shift = searchForm.shift;
+ getAttendanceRules(params)
.then(res => {
const records = Array.isArray(res?.data?.records) ? res.data.records : [];
tableData.value = records.filter(r => String(r?.id) !== "999");
diff --git a/src/views/personnelManagement/classsSheduling/index.vue b/src/views/personnelManagement/classsSheduling/index.vue
index 59e65b4..9e816db 100644
--- a/src/views/personnelManagement/classsSheduling/index.vue
+++ b/src/views/personnelManagement/classsSheduling/index.vue
@@ -147,9 +147,9 @@
class="shift-dropdown">
<div class="shift-box"
:class="{
- 'shift-box-early': m.shift === '鏃╃彮',
- 'shift-box-mid': m.shift === '涓彮',
- 'shift-box-night': m.shift === '澶滅彮',
+ 'shift-box-early': m.shift && m.shift.includes('鏃╃彮'),
+ 'shift-box-mid': m.shift && m.shift.includes('涓彮'),
+ 'shift-box-night': m.shift && m.shift.includes('澶滅彮'),
'shift-box-rest': !m.shift || m.shift === '浼戞伅',
'shift-box-leave': m.shift === '璇峰亣',
'shift-box-other': m.shift === '澶�11',
@@ -159,7 +159,7 @@
</div>
<template #dropdown>
<el-dropdown-menu>
- <el-dropdown-item v-for="(n, j) in classType"
+ <el-dropdown-item v-for="(n, j) in getRowClassType(item)"
:key="'h' + j"
:command="n.id">{{ n.shift || '鈥�'
}}</el-dropdown-item>
@@ -422,10 +422,26 @@
if (!schedulingQuery.deptId) return classType.value || [];
return (classType.value || []).filter(item => {
if (["998", "999"].includes(String(item?.id))) return true;
- const itemDeptId = item.deptId ?? item.sysDeptId ?? item.dept_id;
+ const itemDeptId = item.sysDeptId ?? item.deptId ?? item.dept_id;
return String(itemDeptId) === String(schedulingQuery.deptId);
});
});
+
+ // 鏍煎瓙鍐呮敼鐝鏃讹紝鎸夎鍛樺伐鐨勯儴闂ㄨ繃婊ゅ彲閫夌彮娆★紙閬垮厤涓嶅悓閮ㄩ棬鐨勫悓鍚嶇彮娆℃贩娣嗭級
+ const getRowClassType = row => {
+ const list = classType.value || [];
+ const staffId = row?.userId ?? row?.user_id ?? row?.id;
+ const staff = (personListAll.value || []).find(
+ item => String(item.id) === String(staffId)
+ );
+ const deptId = staff?.sysDeptId ?? staff?.deptId ?? staff?.dept_id;
+ if (!deptId) return list;
+ return list.filter(item => {
+ if (["998", "999"].includes(String(item?.id))) return true;
+ const itemDeptId = item.sysDeptId ?? item.deptId ?? item.dept_id;
+ return String(itemDeptId) === String(deptId);
+ });
+ };
// 鍒楄〃鏁版嵁
const listForm = ref([]);
@@ -853,7 +869,7 @@
const node = findDeptNodeById(schedulingQuery.deptId);
const deptIds = new Set(collectDeptIds(node));
personList.value = (personListAll.value || []).filter(item => {
- const itemDeptId = item.deptId ?? item.sysDeptId ?? item.dept_id;
+ const itemDeptId = item.sysDeptId ?? item.deptId ?? item.dept_id;
return deptIds.has(String(itemDeptId)) && !isEmployeeBlockedByLeaveDate(item);
});
};
diff --git a/src/views/personnelManagement/contractManagement/components/formDia.vue b/src/views/personnelManagement/contractManagement/components/formDia.vue
index 3db1bee..7fa9a7a 100644
--- a/src/views/personnelManagement/contractManagement/components/formDia.vue
+++ b/src/views/personnelManagement/contractManagement/components/formDia.vue
@@ -44,10 +44,6 @@
prop: "contractStartTime",
},
{
- label: "鍚堝悓缁撴潫鏃ユ湡",
- prop: "contractEndTime",
- },
- {
dataType: "action",
label: "鎿嶄綔",
align: "center",
diff --git a/src/views/personnelManagement/contractManagement/index.vue b/src/views/personnelManagement/contractManagement/index.vue
index d6abdb3..458952a 100644
--- a/src/views/personnelManagement/contractManagement/index.vue
+++ b/src/views/personnelManagement/contractManagement/index.vue
@@ -5,9 +5,6 @@
<span class="search_title">濮撳悕锛�</span>
<el-input v-model="searchForm.staffName" style="width: 240px" placeholder="璇疯緭鍏ュ鍚嶆悳绱�" @change="handleQuery"
clearable :prefix-icon="Search" />
- <span style="margin-left: 10px" class="search_title">鍚堝悓缁撴潫鏃ユ湡锛�</span>
- <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
- placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
<el-button type="primary" @click="handleQuery" style="margin-left: 10px">鎼滅储</el-button>
</div>
<div>
@@ -20,7 +17,14 @@
<div class="table_list">
<PIMTable rowKey="id" :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true"
@selection-change="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination"
- :total="page.total"></PIMTable>
+ :total="page.total">
+ <template #age="{ row }">
+ <span>{{ calcAge(row.birthDate) }}</span>
+ </template>
+ <template #contractTime="{ row }">
+ <span>{{ formatContractTime(row) }}</span>
+ </template>
+ </PIMTable>
</div>
<form-dia ref="formDia" @close="handleQuery"></form-dia>
<renew-contract
@@ -77,20 +81,17 @@
<script setup>
import { Search } from "@element-plus/icons-vue";
+import dayjs from "dayjs";
import { onMounted, ref, defineAsyncComponent } from "vue";
import FormDia from "@/views/personnelManagement/contractManagement/components/formDia.vue";
const RenewContract = defineAsyncComponent(() => import("@/views/personnelManagement/employeeRecord/components/RenewContract.vue"));
import { ElMessageBox } from "element-plus";
import { staffOnJobListPage } from "@/api/personnelManagement/staffOnJob.js";
-import dayjs from "dayjs";
import { getToken } from "@/utils/auth.js";
import FilesDia from "./filesDia.vue";
const data = reactive({
searchForm: {
staffName: "",
- entryDate: null, // 褰曞叆鏃ユ湡
- entryDateStart: undefined,
- entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
@@ -131,8 +132,10 @@
prop: "sex",
},
{
- label: "鎴风睄浣忓潃",
- prop: "nativePlace",
+ label: "骞撮緞",
+ prop: "age",
+ dataType: "slot",
+ slot: "age",
},
// {
// label: "宀椾綅",
@@ -144,22 +147,16 @@
// width: 200
// },
{
- label: "绗竴瀛﹀巻",
- prop: "firstStudy",
- },
- {
- label: "涓撲笟",
- prop: "profession",
- width: 100
- },
- {
- label: "骞撮緞",
- prop: "age",
- },
- {
label: "鑱旂郴鐢佃瘽",
prop: "phone",
width: 150
+ },
+ {
+ label: "鍚堝悓鏃堕棿",
+ prop: "contractTime",
+ dataType: "slot",
+ slot: "contractTime",
+ width: 200,
},
// {
// label: "绱ф�ヨ仈绯讳汉",
@@ -180,11 +177,6 @@
// prop: "contractStartTime",
// width: 120
// },
- {
- label: "鍚堝悓缁撴潫鏃ユ湡",
- prop: "contractExpireTime",
- width: 120
- },
{
dataType: "action",
label: "鎿嶄綔",
@@ -225,15 +217,26 @@
const formDia = ref()
const { proxy } = getCurrentInstance()
-const changeDaterange = (value) => {
- searchForm.value.entryDateStart = undefined;
- searchForm.value.entryDateEnd = undefined;
- if (value) {
- searchForm.value.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD");
- searchForm.value.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD");
+// 鏍规嵁鍑虹敓鏃ユ湡璁$畻骞撮緞
+const calcAge = (birth) => {
+ if (!birth) return "-";
+ const birthDay = dayjs(birth);
+ const now = dayjs();
+ let age = now.year() - birthDay.year();
+ if (now.month() < birthDay.month() || (now.month() === birthDay.month() && now.date() < birthDay.date())) {
+ age--;
}
- getList();
+ return age;
};
+
+// 鍚堝悓鏃堕棿锛堝紑濮� ~ 缁撴潫锛�
+const formatContractTime = (row) => {
+ const start = row.contractStartTime;
+ const end = row.contractEndTime;
+ if (start && end) return `${start} ~ ${end}`;
+ return start || end || "-";
+};
+
// 鎵撳紑闄勪欢寮规
const openFilesFormDia = (row) => {
console.log(row)
@@ -255,7 +258,6 @@
const getList = () => {
tableLoading.value = true;
const params = { ...searchForm.value, ...page };
- params.entryDate = undefined
params.staffState = 1
staffOnJobListPage(params).then(res => {
tableLoading.value = false;
--
Gitblit v1.9.3