diff --git a/static/css/style.css b/static/css/style.css index 76f75f9..3e25ea8 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -427,7 +427,7 @@ footer { } -#excelTable { +.tableplace { font-family: Calibri, sans-serif; font-size: 15px; text-align: center; @@ -440,7 +440,7 @@ min-width: 680px; background-color: yellow; /* Change background color for the second column */ /* } */ -#excelTable tr td { +.tableplace tr td { text-align: center; padding: 0px 6px; background-color: white; @@ -451,7 +451,7 @@ background-color: white; border-color: red; border-style: solid !important; } -#excelTableContainer { +.tableplaceContainer { margin: auto; text-align: -webkit-center; text-align: center; @@ -467,7 +467,22 @@ background-color: white; border-radius: 10px; } - -.repeatedx { +.tableplacedown{ + color: aliceblue; + margin: auto; text-align: -webkit-center; + /* background-color: white; */ + display: flex; + gap: 5px; + justify-content: center; +} +.search2table{ + color: blue; +} +.searchlivetable{ +color: red; +} + +.searchpriomtable{ +color: green; } \ No newline at end of file diff --git a/static/js/diag.js b/static/js/diag.js index 4b1795a..9d13eb9 100644 --- a/static/js/diag.js +++ b/static/js/diag.js @@ -520,8 +520,9 @@ const cleanAll = () => { tempDetails = []; $('#titleInput').val('Cleaned!') prepareTable('excelTable', ['Модель','Сер.номер','Заявленная неисправность','Произведенная работа']) - $('#tablePlace').text('') - $('#tablePlace2').text('') + $('#RepeatedTablePlace').text('') + $('#SearchLiveTablePlace').text('') + $('#SearchPriomTablePlace').text('') const dancers = document.querySelector('.bg-tarakan'); dancers.classList.remove("show-tarakan"); @@ -656,7 +657,8 @@ SerialNumber.addEventListener("submit", (e) => { for (var key in data) { if (data.hasOwnProperty(key)) { console.dir(data[key]); - $('.repeated').append(buildHtmlTable([data[key]])) + $('#RepeatedTablePlace').text('Повтор:') + $('#RepeatedTablePlace').append(buildHtmlTable([data[key]],'search2')) } } }) @@ -671,7 +673,8 @@ SerialNumber.addEventListener("submit", (e) => { for (var key in data) { if (data.hasOwnProperty(key)) { console.dir(data[key]); - $('.repeatedx').append(buildHtmlTable([data[key]])) + $('#SearchLiveTablePlace').text('Повтор Live:') + $('#SearchLiveTablePlace').append(buildHtmlTable([data[key]],'searchlive')) } } }) @@ -686,7 +689,8 @@ SerialNumber.addEventListener("submit", (e) => { for (var key in data) { if (data.hasOwnProperty(key)) { console.dir(data[key]); - $('.repeatedpriom').append(buildHtmlTable([data[key]])) + $('#SearchPriomTablePlace').text('АКТ Прием:') + $('#SearchPriomTablePlace').append(buildHtmlTable([data[key]],'searchpriom')) } } }) @@ -714,14 +718,14 @@ async function fetchData(serial, location) { console.error('Fetch Error:', error); $('#searchText').text(error.message) $('.form-btn').css('background-color', 'orangered') - throw error; // Re-throw the error to be caught in the main function } } -function buildHtmlTable(arr) { + +function buildHtmlTable(arr,search) { const table = document.createElement('table'); - table.setAttribute('id', 'excelTable'); - table.setAttribute('class', 'redtable'); + table.setAttribute('id', search); + table.setAttribute('class', `${search}table tableplace`); table.setAttribute('border', '2'); // const columns = addAllColumnHeaders(arr, table); const columns = addRowWithoutHeaders(arr, table); @@ -772,12 +776,9 @@ $("#selectmodel").change(function () { manualSelectModel = true; $("#selectmodel").removeClass("blinking"); tempModel = document.getElementById("selectmodel").value; - // checkModel(tempSerial, tempModel); cleanCoords(); imageFromModel(tempModel) checkDetails() - // console.log(tempSerial, tempModel); - }); const checkModel = (serial, models) => { @@ -787,7 +788,6 @@ const checkModel = (serial, models) => { tempModel = document.getElementById("selectmodel").value; // updateCoords(tempModel); - return; } diff --git a/views/home.ejs b/views/home.ejs index e64fcef..cc46c67 100644 --- a/views/home.ejs +++ b/views/home.ejs @@ -109,8 +109,8 @@
Модель | @@ -184,13 +184,11 @@ -