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