Workbench: backend target aktualisiert

This commit is contained in:
chris
2026-10-10 17:19:30 +00:00
parent 55c9acbfef
commit 04c952f9ae
119 changed files with 963 additions and 2080 deletions

View File

@@ -2,11 +2,10 @@
<html lang="de">
<head>
<meta charset="UTF-8">
<title>BOM Import</title>
<script src="/backend/xlsx/xlsx.full.min.js"></script>
<script src="/backend/handsontable/handsontable/dist/handsontable.full.min.js"></script>
<link rel="stylesheet" href="/backend/handsontable/handsontable/dist/handsontable.full.min.css">
<title>BOM Import</title>
<script src="/backend/xlsx/xlsx.full.min.js"></script>
<script src="/backend/excel-preview.js"></script>
<style>
/* ===== Base Theme (gleich wie Workbench/HMI) ===== */
@@ -90,23 +89,8 @@ input[type="file"]{
padding:6px;
}
/* ===== Handsontable Dark Fix ===== */
.handsontable{
color:#e5e7eb;
}
.handsontable .htCore td,
.handsontable .htCore th{
background:#020617;
color:#e5e7eb;
border-color:#334155;
}
.handsontable .htCore th{
background:#020617;
font-weight:600;
}
</style>
</style>
<link rel="stylesheet" href="/backend/ios.css">
</head>
<body>
@@ -131,19 +115,19 @@ input[type="file"]{
</section>
<script>
document.addEventListener("DOMContentLoaded", function () {
let importedData = [];
let hot;
const url = sessionStorage.getItem("url");
const stationNumber = sessionStorage.getItem("stationNumber");
function exportExcel() {
const headers = [
"PRODUCT","BOM_VERSION_ERP","Part_NO","COMP_NAME","POS_TYPE",
"ALTERNATIVE","WS_ERP","LAYER","QTY","UNIT","SETUP","PRODUKT","PROCESS_GROUP"
];
const worksheet = XLSX.utils.aoa_to_sheet([headers]);
document.addEventListener("DOMContentLoaded", function () {
let importedData = [];
const headers = [
"MATERIAL_NO","BOM_VERSION_ERP","COMPONENT_NO","COMP_NAME",
"POS_TYPE","ALTERNATIVE","WS_ERP","LAYER","QTY","UNIT",
"SETUP_FLAG","PRODUKT","PROCESS_GROUP"
];
const url = sessionStorage.getItem("url");
const stationNumber = sessionStorage.getItem("stationNumber");
function exportExcel() {
const worksheet = XLSX.utils.aoa_to_sheet([headers]);
const workbook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(workbook, worksheet, "BOM");
XLSX.writeFile(workbook, "BOMExport.xlsx");
@@ -165,25 +149,8 @@ document.addEventListener("DOMContentLoaded", function () {
row.some(cell => cell !== null && cell !== undefined && String(cell).trim() !== "")
);
importedData = rawData.filter(row => !isRowEmpty(row));
if (!hot) {
hot = new Handsontable(document.getElementById("import-table"), {
data: importedData,
colHeaders:[
"MATERIAL_NO","BOM_VERSION_ERP","COMPONENT_NO","COMP_NAME",
"POS_TYPE","ALTERNATIVE","WS_ERP","LAYER","QTY","UNIT",
"SETUP_FLAG","PRODUKT","PROCESS_GROUP"
],
rowHeaders:true,
width:"100%",
height:420,
licenseKey:"non-commercial-and-evaluation"
});
} else {
hot.loadData(importedData);
}
importedData = rawData.filter(row => !isRowEmpty(row));
WorkbenchExcelPreview.render("import-table", headers, importedData);
};
reader.readAsBinaryString(fileInput.files[0]);
}
@@ -225,8 +192,9 @@ const jsonData = importedData
document.getElementById("export-button").onclick = exportExcel;
document.getElementById("file-input").onchange = importExcelData;
document.getElementById("send-button").onclick = sendExcelData;
});
document.getElementById("send-button").onclick = sendExcelData;
WorkbenchExcelPreview.render("import-table", headers, importedData);
});
function isRowEmpty(row) {
return !row || row.every(