v5: Убрано Подразделение, Отдел переименован в Подразделение, Филиал — выпадающий список
This commit is contained in:
parent
c1fa753530
commit
4252a2127c
41
index.html
41
index.html
@ -475,11 +475,10 @@ tr:hover td { background: var(--cyan-50); }
|
||||
<tr>
|
||||
<th>Таб. №</th>
|
||||
<th>Филиал</th>
|
||||
<th>Подразделение</th>
|
||||
<th>Место дислокации</th>
|
||||
<th>ФИО</th>
|
||||
<th>Должность</th>
|
||||
<th>Отдел</th>
|
||||
<th>Подразделение</th>
|
||||
<th>Дата приема</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@ -701,17 +700,20 @@ tr:hover td { background: var(--cyan-50); }
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label>Филиал</label>
|
||||
<input type="text" id="empBranch" placeholder="Центральный филиал">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Подразделение</label>
|
||||
<input type="text" id="empSubdivision" placeholder="Цех №3">
|
||||
</div>
|
||||
<select id="empBranch">
|
||||
<option value="">— Выберите —</option>
|
||||
<option>ДКБ</option>
|
||||
<option>ДРБ</option>
|
||||
<option>ДТК</option>
|
||||
<option>ДЦБСФ</option>
|
||||
<option>ОДС</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Место дислокации / Населенный пункт</label>
|
||||
<input type="text" id="empLocation" placeholder="г. Алматы">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>ФИО *</label>
|
||||
<input type="text" id="empName" placeholder="Иванов Иван Иванович">
|
||||
@ -722,8 +724,8 @@ tr:hover td { background: var(--cyan-50); }
|
||||
<input type="text" id="empPosition" placeholder="Инженер">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Отдел</label>
|
||||
<input type="text" id="empDepartment" placeholder="Технический отдел">
|
||||
<label>Подразделение</label>
|
||||
<input type="text" id="empDepartment" placeholder="Техническое подразделение">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@ -959,12 +961,12 @@ function daysBetween(d1, d2) {
|
||||
function seedDemo() {
|
||||
if (DB.employees.length > 0) return;
|
||||
DB.employees = [
|
||||
{ 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' },
|
||||
{ id: uid(), tabNum: '00001', fullName: 'Иванов Иван Иванович', position: 'Кабельщик-спайщик', department: 'Техническое подразделение', branch: 'ОДС', location: 'г. Алматы', climateZone: '1', dateHired: '2020-03-15' },
|
||||
{ id: uid(), tabNum: '00002', fullName: 'Петрова Анна Сергеевна', position: 'Электромонтер', department: 'Энергоцех', branch: 'ДКБ', location: 'г. Астана', climateZone: '2', dateHired: '2021-06-01' },
|
||||
{ id: uid(), tabNum: '00003', fullName: 'Сериков Асхат Нурланович', position: 'Электромонтер', department: 'Энергоцех', branch: 'ДРБ', location: 'г. Шымкент', climateZone: '3', dateHired: '2019-11-10' },
|
||||
{ id: uid(), tabNum: '00004', fullName: 'Ким Елена Викторовна', position: 'Инженер', department: 'Отдел качества', branch: 'ДЦБСФ', location: 'г. Алматы', climateZone: '0', dateHired: '2022-01-20' },
|
||||
{ id: uid(), tabNum: '00005', fullName: 'Нургалиев Даурен Кайратович', position: 'Сварщик', department: 'Ремонтный цех', branch: 'ДТК', location: 'г. Актобе', climateZone: '2', dateHired: '2018-08-05' },
|
||||
{ id: uid(), tabNum: '00006', fullName: 'Ахметов Тимур Болатович', position: 'Кабельщик-спайщик', department: 'Линейный цех', branch: 'ОДС', location: 'г. Усть-Каменогорск', climateZone: '2', dateHired: '2023-02-01' },
|
||||
];
|
||||
DB.siz = [
|
||||
{ id: uid(), name: 'Каска защитная', type: 'Головы', protection: '1 класс', standard: 'ГОСТ 12.4.128-83', wearMonths: 24, unit: 'шт.' },
|
||||
@ -1052,7 +1054,6 @@ function openEmployeeModal(emp) {
|
||||
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');
|
||||
@ -1069,7 +1070,6 @@ function saveEmployee() {
|
||||
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,
|
||||
@ -1099,14 +1099,12 @@ function renderEmployees() {
|
||||
(e.department || '').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 => `<tr>
|
||||
<td>${e.tabNum}</td>
|
||||
<td>${e.branch || '—'}</td>
|
||||
<td>${e.subdivision || '—'}</td>
|
||||
<td>${e.location || '—'}</td>
|
||||
<td><strong>${e.fullName}</strong></td>
|
||||
<td>${e.position}</td>
|
||||
@ -1689,11 +1687,10 @@ function exportAllToExcel() {
|
||||
const emps = DB.employees.map(e => ({
|
||||
'Таб. №': e.tabNum,
|
||||
'Филиал': e.branch,
|
||||
'Подразделение': e.subdivision,
|
||||
'Место дислокации': e.location,
|
||||
'ФИО': e.fullName,
|
||||
'Должность': e.position,
|
||||
'Отдел': e.department,
|
||||
'Подразделение': e.department,
|
||||
'Дата приема': fmtDate(e.dateHired),
|
||||
'Клим. пояс': climateZoneLabel(e.climateZone||'0'),
|
||||
}));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user