| Таб. № |
+ Филиал |
+ Подразделение |
+ Место дислокации |
ФИО |
Должность |
Отдел |
@@ -695,6 +698,20 @@ tr:hover td { background: var(--cyan-50); }
+
+
+
+
+
@@ -942,12 +959,12 @@ function daysBetween(d1, d2) {
function seedDemo() {
if (DB.employees.length > 0) return;
DB.employees = [
- { id: uid(), tabNum: '00001', fullName: 'Иванов Иван Иванович', position: 'Кабельщик-спайщик', department: 'Линейный цех', climateZone: '1', dateHired: '2020-03-15' },
- { id: uid(), tabNum: '00002', fullName: 'Петрова Анна Сергеевна', position: 'Электромонтер', department: 'Энергоцех', climateZone: '2', dateHired: '2021-06-01' },
- { id: uid(), tabNum: '00003', fullName: 'Сериков Асхат Нурланович', position: 'Электромонтер', department: 'Энергоцех', climateZone: '3', dateHired: '2019-11-10' },
- { id: uid(), tabNum: '00004', fullName: 'Ким Елена Викторовна', position: 'Инженер', department: 'Технический отдел', climateZone: '0', dateHired: '2022-01-20' },
- { id: uid(), tabNum: '00005', fullName: 'Нургалиев Даурен Кайратович', position: 'Сварщик', department: 'Ремонтный цех', climateZone: '2', dateHired: '2018-08-05' },
- { id: uid(), tabNum: '00006', fullName: 'Ахметов Тимур Болатович', position: 'Кабельщик-спайщик', department: 'Линейный цех', climateZone: '2', dateHired: '2023-02-01' },
+ { id: uid(), tabNum: '00001', fullName: 'Иванов Иван Иванович', position: 'Кабельщик-спайщик', department: 'Технический отдел', branch: 'Центральный филиал', subdivision: 'Линейный цех', location: 'г. Алматы', climateZone: '1', dateHired: '2020-03-15' },
+ { id: uid(), tabNum: '00002', fullName: 'Петрова Анна Сергеевна', position: 'Электромонтер', department: 'Энергоцех', branch: 'Северный филиал', subdivision: 'Участок №2', location: 'г. Астана', climateZone: '2', dateHired: '2021-06-01' },
+ { id: uid(), tabNum: '00003', fullName: 'Сериков Асхат Нурланович', position: 'Электромонтер', department: 'Энергоцех', branch: 'Южный филиал', subdivision: 'Участок №5', location: 'г. Шымкент', climateZone: '3', dateHired: '2019-11-10' },
+ { id: uid(), tabNum: '00004', fullName: 'Ким Елена Викторовна', position: 'Инженер', department: 'Технический отдел', branch: 'Центральный филиал', subdivision: 'Отдел качества', location: 'г. Алматы', climateZone: '0', dateHired: '2022-01-20' },
+ { id: uid(), tabNum: '00005', fullName: 'Нургалиев Даурен Кайратович', position: 'Сварщик', department: 'Ремонтный цех', branch: 'Западный филиал', subdivision: 'Сварочный участок', location: 'г. Актобе', climateZone: '2', dateHired: '2018-08-05' },
+ { id: uid(), tabNum: '00006', fullName: 'Ахметов Тимур Болатович', position: 'Кабельщик-спайщик', department: 'Линейный цех', branch: 'Восточный филиал', subdivision: 'Монтажная бригада №1', location: 'г. Усть-Каменогорск', climateZone: '2', dateHired: '2023-02-01' },
];
DB.siz = [
{ id: uid(), name: 'Каска защитная', type: 'Головы', protection: '1 класс', standard: 'ГОСТ 12.4.128-83', wearMonths: 24, unit: 'шт.' },
@@ -1034,6 +1051,9 @@ function openEmployeeModal(emp) {
document.getElementById('empPosition').value = emp ? emp.position : '';
document.getElementById('empDepartment').value = emp ? emp.department : '';
document.getElementById('empDateHired').value = emp ? emp.dateHired : '';
+ document.getElementById('empBranch').value = emp ? (emp.branch || '') : '';
+ document.getElementById('empSubdivision').value = emp ? (emp.subdivision || '') : '';
+ document.getElementById('empLocation').value = emp ? (emp.location || '') : '';
document.getElementById('empClimateZone').value = emp ? (emp.climateZone || '0') : '0';
openModal('employeeModal');
}
@@ -1048,6 +1068,9 @@ function saveEmployee() {
fullName: name,
position: document.getElementById('empPosition').value.trim(),
department: document.getElementById('empDepartment').value.trim(),
+ branch: document.getElementById('empBranch').value.trim(),
+ subdivision: document.getElementById('empSubdivision').value.trim(),
+ location: document.getElementById('empLocation').value.trim(),
climateZone: document.getElementById('empClimateZone').value || '0',
dateHired: document.getElementById('empDateHired').value,
};
@@ -1074,11 +1097,17 @@ function renderEmployees() {
(e.fullName || '').toLowerCase().includes(q) ||
(e.position || '').toLowerCase().includes(q) ||
(e.department || '').toLowerCase().includes(q) ||
- (e.tabNum || '').toLowerCase().includes(q)
+ (e.tabNum || '').toLowerCase().includes(q) ||
+ (e.branch || '').toLowerCase().includes(q) ||
+ (e.subdivision || '').toLowerCase().includes(q) ||
+ (e.location || '').toLowerCase().includes(q)
);
const tbody = document.getElementById('empTable');
tbody.innerHTML = list.map(e => `
| ${e.tabNum} |
+ ${e.branch || '—'} |
+ ${e.subdivision || '—'} |
+ ${e.location || '—'} |
${e.fullName} |
${e.position} |
${e.department} |
@@ -1659,10 +1688,14 @@ function exportAllToExcel() {
const emps = DB.employees.map(e => ({
'Таб. №': e.tabNum,
+ 'Филиал': e.branch,
+ 'Подразделение': e.subdivision,
+ 'Место дислокации': e.location,
'ФИО': e.fullName,
'Должность': e.position,
'Отдел': e.department,
'Дата приема': fmtDate(e.dateHired),
+ 'Клим. пояс': climateZoneLabel(e.climateZone||'0'),
}));
const ws1 = XLSX.utils.json_to_sheet(emps);
XLSX.utils.book_append_sheet(wb, ws1, 'Работники');