diff --git a/docs/DW_PJ_LOT_V_POWERBI_SQL.txt b/docs/DW_PJ_LOT_V_POWERBI_SQL.txt new file mode 100644 index 0000000..fc8d9cb --- /dev/null +++ b/docs/DW_PJ_LOT_V_POWERBI_SQL.txt @@ -0,0 +1,60 @@ +SELECT L.LOTID AS ""Run Card Lot ID"", + L.Workorder AS ""Work Order ID"", + L.Qty AS ""Lot Qty(pcs)"", + L.Qty2 AS ""Lot Qty(Wafer pcs)"", + L.Status AS ""Run Card Status"", + L.HOLDREASONNAME AS ""Hold Reason"", + L.CurrentHoldCount AS ""Hold Count"", + L.Owner AS ""Work Order Owner"", + L.StartDate AS ""Run Card Start Date"", + L.UTS, + L.Product AS ""Product P/N"", + L.Productlinename AS ""Package"", + L.Package_LEF as ""Package(LF)"", + L.PJ_FUNCTION AS ""Product Function"", + L.Pj_Type AS ""Product Type"", + L.BOP, + L.FirstName AS ""Wafer Lot ID"", + L.WAFERNAME AS ""Wafer P/N"", + L.WaferLot ""Wafer Lot ID(Prefix)"", + L.SpecName AS ""Spec"", + L.SPECSEQUENCE AS ""Spec Sequence"", + L.SPECSEQUENCE || '_' || L.SpecName AS ""Spec(Order)"", + L.Workcentername AS ""Work Center"", + L.WorkCenterSequence AS ""Work Center Sequence"", + L.WorkCenter_Group AS ""Work Center(Group)"", + L.WorkCenter_Short AS ""Work Center(Short)"", + L.WorkCenterSequence_Group AS ""Work Center Sequence(Group)"", + L.WorkCenterSequence_Group || '_' || L.WorkCenter_Group AS ""Work Center Group(Order)"", + L.AgeByDays AS ""Age By Days"", + L.Equipments AS ""Equipment ID"", + L.EquipmentCount AS ""Equipment Count"", + L.Workflowname AS ""Work Flow Name"", + L.Datecode AS ""Product Date Code"", + L.LEADFRAMENAME AS ""LF Material Part"", + L.LEADFRAMEOPTION AS ""LF Option ID"", + L.COMNAME AS ""Compound Material Part"", + L.LOCATIONNAME AS ""Run Card Location"", + L.Eventname AS ""NCR ID"", + L.Occurrencedate AS ""NCR-issued Time"", + L.ReleaseTime AS ""Release Time"", + L.ReleaseEmp AS ""Release Employee"", + L.ReleaseReason AS ""Release Comment"", + L.COMMENT_HOLD AS ""Hold Comment"", + L.CONTAINERCOMMENTS AS ""Comment"", + L.COMMENT_DATE AS ""Run Card Comment"", + L.COMMENT_EMP AS ""Run Card Comment Employee"", + L.COMMENT_FUTURE AS ""Future Hold Comment"", + L.HOLDEMP AS ""Hold Employee"", + L.DEPTNAME AS ""Hold Employee Dept"", + L.PJ_PRODUCEREGION AS ""Produce Region"", + L.Prioritycodename AS ""Work Order Priority"", + L.TMTT_R AS ""TMTT Remaining"", + L.wafer_factor AS ""Die Consumption Qty"", + Case When (L.EquipmentCount>0) Then 'RUN' + When (L.CurrentHoldCount>0) Then 'HOLD' + ELSE 'QUENE' End AS ""WIP Status"", + Case When (L.EquipmentCount>0) Then 1 + When (L.CurrentHoldCount>0) Then 3 + ELSE 2 End AS ""WIP Status Sequence"", + sys_date AS ""Data Update Date"" \ No newline at end of file diff --git a/frontend_design/Hold_detail.pen b/frontend_design/Hold_detail.pen new file mode 100644 index 0000000..541f2ff --- /dev/null +++ b/frontend_design/Hold_detail.pen @@ -0,0 +1,2182 @@ +{ + "version": "2.6", + "children": [ + { + "type": "frame", + "id": "bi8Au", + "x": 0, + "y": 0, + "name": "Frame", + "clip": true, + "width": 800, + "height": 600, + "fill": "#FFFFFF", + "layout": "none" + }, + { + "type": "frame", + "id": "7V3YX", + "x": 0, + "y": 0, + "name": "Hold Detail Page", + "width": 1400, + "fill": "#F5F7FA", + "layout": "vertical", + "gap": 16, + "padding": 20, + "children": [ + { + "type": "frame", + "id": "I5lpc", + "name": "header", + "width": "fill_container", + "fill": { + "type": "gradient", + "gradientType": "linear", + "enabled": true, + "rotation": 135, + "size": { + "height": 1 + }, + "colors": [ + { + "color": "#667eea", + "position": 0 + }, + { + "color": "#764ba2", + "position": 1 + } + ] + }, + "cornerRadius": 10, + "padding": [ + 18, + 22 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "EdWXi", + "name": "headerLeft", + "gap": 12, + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "MVVGK", + "name": "backBtn", + "width": 36, + "height": 36, + "fill": "rgba(255,255,255,0.2)", + "cornerRadius": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon_font", + "id": "ZJEO4", + "name": "backIcon", + "width": 20, + "height": 20, + "iconFontName": "arrow-left", + "iconFontFamily": "lucide", + "fill": "#FFFFFF" + } + ] + }, + { + "type": "frame", + "id": "8YBhs", + "name": "titleGroup", + "layout": "vertical", + "gap": 4, + "children": [ + { + "type": "text", + "id": "W3jyy", + "name": "pageTitle", + "fill": "#FFFFFF", + "content": "Hold Detail: 缺陷", + "fontFamily": "Inter", + "fontSize": 22, + "fontWeight": "600" + }, + { + "type": "frame", + "id": "V3p7U", + "name": "holdBadge", + "fill": "#FEE2E2", + "cornerRadius": 4, + "gap": 6, + "padding": [ + 4, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "6Mvg0", + "name": "badgeText", + "fill": "#991B1B", + "content": "品質異常 Hold", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "JpXu7", + "name": "headerRight", + "gap": 12, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Bg1BI", + "name": "lastUpdate", + "fill": "rgba(255,255,255,0.8)", + "content": "Last Update: 2026-01-28 10:30:00", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "dH5jc", + "name": "summaryRow", + "width": "fill_container", + "gap": 16, + "children": [ + { + "type": "frame", + "id": "Jcuku", + "name": "card1", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "gap": 8, + "padding": 20, + "children": [ + { + "type": "text", + "id": "NO3qg", + "name": "card1Label", + "fill": "#666666", + "content": "Total Lots", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "S6x9b", + "name": "card1Value", + "fill": "#222222", + "content": "127", + "fontFamily": "Inter", + "fontSize": 32, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "k5Fqe", + "name": "card2", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "gap": 8, + "padding": 20, + "children": [ + { + "type": "text", + "id": "OzCf3", + "name": "card2Label", + "fill": "#666666", + "content": "Total QTY (pcs)", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "wrtwd", + "name": "card2Value", + "fill": "#222222", + "content": "458,920", + "fontFamily": "Inter", + "fontSize": 32, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "tGRHt", + "name": "card3", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "gap": 8, + "padding": 20, + "children": [ + { + "type": "text", + "id": "WbSE9", + "name": "card3Label", + "fill": "#666666", + "content": "平均當站滯留", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "wUiN4", + "name": "card3Value", + "fill": "#F59E0B", + "content": "3.2 天", + "fontFamily": "Inter", + "fontSize": 32, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "BlhLH", + "name": "card4", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "gap": 8, + "padding": 20, + "children": [ + { + "type": "text", + "id": "CLGML", + "name": "card4Label", + "fill": "#666666", + "content": "最久當站滯留", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "aGrnM", + "name": "card4Value", + "fill": "#EF4444", + "content": "15 天", + "fontFamily": "Inter", + "fontSize": 32, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "7uKhR", + "name": "card5", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "gap": 8, + "padding": 20, + "children": [ + { + "type": "text", + "id": "P1gHF", + "name": "card5Label", + "fill": "#666666", + "content": "影響站群", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "EoKkT", + "name": "card5Value", + "fill": "#222222", + "content": "8", + "fontFamily": "Inter", + "fontSize": 32, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "qYy5R", + "name": "contentGrid", + "width": "fill_container", + "gap": 16, + "children": [ + { + "type": "frame", + "id": "n6o9k", + "name": "leftCard", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "TQjuU", + "name": "leftHeader", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#E2E6EF" + }, + "padding": [ + 16, + 20 + ], + "children": [ + { + "type": "text", + "id": "9ZCN9", + "name": "leftTitle", + "fill": "#222222", + "content": "依站群分佈 (By Workcenter) - 點擊可篩選", + "fontFamily": "Inter", + "fontSize": 16, + "fontWeight": "600" + }, + { + "type": "frame", + "id": "sRUro", + "name": "clickHint1", + "fill": "#667eea", + "cornerRadius": 4, + "padding": [ + 4, + 8 + ], + "children": [ + { + "type": "text", + "id": "Er9HP", + "name": "clickText1", + "fill": "#FFFFFF", + "content": "可點擊篩選", + "fontFamily": "Inter", + "fontSize": 10, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "6dcCv", + "name": "leftBody", + "width": "fill_container", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "KJxxR", + "name": "tableHeader", + "width": "fill_container", + "fill": "#F9FAFB", + "gap": 16, + "padding": [ + 12, + 20 + ], + "children": [ + { + "type": "text", + "id": "pl1PL", + "name": "th1", + "fill": "#666666", + "content": "Workcenter", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "0Nler", + "name": "th2", + "fill": "#666666", + "content": "Lots", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "v8SQy", + "name": "th3", + "fill": "#666666", + "content": "QTY", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "hgtG9", + "name": "th4", + "fill": "#666666", + "content": "佔比", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "FeNSs", + "name": "row1", + "width": "fill_container", + "fill": "#EEF2FF", + "stroke": { + "align": "inside", + "thickness": 2, + "fill": "#667eea" + }, + "gap": 16, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "pzbjE", + "name": "r1c1", + "fill": "#222222", + "content": "DIE_BOND", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "ufZSd", + "name": "r1c2", + "fill": "#222222", + "content": "45", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "sNXbx", + "name": "r1c3", + "fill": "#222222", + "content": "156,230", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "R0Zvo", + "name": "r1c4", + "fill": "#667eea", + "content": "34.1%", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "QcUcl", + "name": "row2", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#F0F0F0" + }, + "gap": 16, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "pnDQb", + "name": "r2c1", + "fill": "#222222", + "content": "WIRE_BOND", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "8BYJg", + "name": "r2c2", + "fill": "#222222", + "content": "38", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "0ItAD", + "name": "r2c3", + "fill": "#222222", + "content": "128,450", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "EjrRN", + "name": "r2c4", + "fill": "#667eea", + "content": "28.0%", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "0E6IL", + "name": "row3", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#F0F0F0" + }, + "gap": 16, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "BuPpm", + "name": "r3c1", + "fill": "#222222", + "content": "MOLDING", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "EePKK", + "name": "r3c2", + "fill": "#222222", + "content": "28", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "2F2i9", + "name": "r3c3", + "fill": "#222222", + "content": "98,120", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "mBXbQ", + "name": "r3c4", + "fill": "#667eea", + "content": "21.4%", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "XoxQ0", + "name": "row4", + "width": "fill_container", + "gap": 16, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "jiGXt", + "name": "r4c1", + "fill": "#888888", + "content": "Others (5)", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "RJDFw", + "name": "r4c2", + "fill": "#888888", + "content": "16", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "TO1my", + "name": "r4c3", + "fill": "#888888", + "content": "76,120", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "vTEIy", + "name": "r4c4", + "fill": "#888888", + "content": "16.5%", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "jJRVr", + "name": "rightCard", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "D431a", + "name": "rightHeader", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#E2E6EF" + }, + "padding": [ + 16, + 20 + ], + "children": [ + { + "type": "text", + "id": "wbKWf", + "name": "rightTitle", + "fill": "#222222", + "content": "依 Package 分佈 - 點擊可篩選", + "fontFamily": "Inter", + "fontSize": 16, + "fontWeight": "600" + }, + { + "type": "frame", + "id": "Pq3Qm", + "name": "clickHint2", + "fill": "#667eea", + "cornerRadius": 4, + "padding": [ + 4, + 8 + ], + "children": [ + { + "type": "text", + "id": "vMiTb", + "name": "clickText2", + "fill": "#FFFFFF", + "content": "可點擊篩選", + "fontFamily": "Inter", + "fontSize": 10, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "crSW4", + "name": "rightBody", + "width": "fill_container", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "CAnxl", + "name": "pTableHeader", + "width": "fill_container", + "fill": "#F9FAFB", + "gap": 16, + "padding": [ + 12, + 20 + ], + "children": [ + { + "type": "text", + "id": "hbJ0a", + "name": "pth1", + "fill": "#666666", + "content": "Package", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "AjQJS", + "name": "pth2", + "fill": "#666666", + "content": "Lots", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "JYohj", + "name": "pth3", + "fill": "#666666", + "content": "QTY", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "MV6jF", + "name": "pth4", + "fill": "#666666", + "content": "佔比", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "j9Ycq", + "name": "prow1", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#F0F0F0" + }, + "gap": 16, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "5PO2Y", + "name": "pr1c1", + "fill": "#222222", + "content": "QFN", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "1CgoT", + "name": "pr1c2", + "fill": "#222222", + "content": "52", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "uQB2r", + "name": "pr1c3", + "fill": "#222222", + "content": "189,450", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "wY306", + "name": "pr1c4", + "fill": "#667eea", + "content": "41.3%", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "qI6Ae", + "name": "prow2", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#F0F0F0" + }, + "gap": 16, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "E02Zh", + "name": "pr2c1", + "fill": "#222222", + "content": "DFN", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "hFdSa", + "name": "pr2c2", + "fill": "#222222", + "content": "35", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "ZegQX", + "name": "pr2c3", + "fill": "#222222", + "content": "145,230", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "pQQf8", + "name": "pr2c4", + "fill": "#667eea", + "content": "31.6%", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "3zbTw", + "name": "prow3", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#F0F0F0" + }, + "gap": 16, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "eago9", + "name": "pr3c1", + "fill": "#222222", + "content": "SOT", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "h4G0R", + "name": "pr3c2", + "fill": "#222222", + "content": "22", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "mwqGr", + "name": "pr3c3", + "fill": "#222222", + "content": "78,120", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "3sOgp", + "name": "pr3c4", + "fill": "#667eea", + "content": "17.0%", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "lDXi1", + "name": "prow4", + "width": "fill_container", + "gap": 16, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "m8vMX", + "name": "pr4c1", + "fill": "#888888", + "content": "Others (4)", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "HNQIl", + "name": "pr4c2", + "fill": "#888888", + "content": "18", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "uLIWM", + "name": "pr4c3", + "fill": "#888888", + "content": "46,120", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "R4W2c", + "name": "pr4c4", + "fill": "#888888", + "content": "10.1%", + "textAlign": "right", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "IRtLq", + "name": "ageSection", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "QczQu", + "name": "ageHeader", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#E2E6EF" + }, + "padding": [ + 16, + 20 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "rjWxw", + "name": "ageTitle", + "fill": "#222222", + "content": "當站滯留天數分佈 (Age at Current Station)", + "fontFamily": "Inter", + "fontSize": 16, + "fontWeight": "600" + }, + { + "type": "text", + "id": "o8zso", + "name": "ageNote", + "fill": "#888888", + "content": "依 MOVEIN 時間計算 | 點擊可篩選", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "1TyeC", + "name": "ageBody", + "width": "fill_container", + "gap": 16, + "padding": 20, + "justifyContent": "space_between", + "children": [ + { + "type": "frame", + "id": "llWVM", + "name": "bucket1", + "width": "fill_container", + "fill": "#F0FDF4", + "cornerRadius": 8, + "stroke": { + "align": "inside", + "thickness": 2, + "fill": "#22C55E" + }, + "layout": "vertical", + "gap": 8, + "padding": 16, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "NQoCS", + "name": "b1Label", + "fill": "#166534", + "content": "0-1 天", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "600" + }, + { + "type": "text", + "id": "ovS4b", + "name": "b1Value", + "fill": "#166534", + "content": "42 lots", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "700" + }, + { + "type": "text", + "id": "DWt6p", + "name": "b1Pct", + "fill": "#22C55E", + "content": "33.1%", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "vgoxY", + "name": "b1Qty", + "fill": "#166534", + "content": "152,300", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ndAGZ", + "name": "bucket2", + "width": "fill_container", + "fill": "#FFFBEB", + "cornerRadius": 8, + "stroke": { + "align": "inside", + "thickness": 2, + "fill": "#F59E0B" + }, + "layout": "vertical", + "gap": 8, + "padding": 16, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "icdfd", + "name": "b2Label", + "fill": "#92400E", + "content": "1-3 天", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "600" + }, + { + "type": "text", + "id": "Rvns8", + "name": "b2Value", + "fill": "#92400E", + "content": "38 lots", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "700" + }, + { + "type": "text", + "id": "TuQKb", + "name": "b2Pct", + "fill": "#F59E0B", + "content": "29.9%", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "kEr4r", + "name": "b2Qty", + "fill": "#92400E", + "content": "138,450", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "gy2x0", + "name": "bucket3", + "width": "fill_container", + "fill": "#FFF7ED", + "cornerRadius": 8, + "stroke": { + "align": "inside", + "thickness": 2, + "fill": "#F97316" + }, + "layout": "vertical", + "gap": 8, + "padding": 16, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "B98JF", + "name": "b3Label", + "fill": "#9A3412", + "content": "3-7 天", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "600" + }, + { + "type": "text", + "id": "TdRbd", + "name": "b3Value", + "fill": "#9A3412", + "content": "28 lots", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "700" + }, + { + "type": "text", + "id": "KF1LK", + "name": "b3Pct", + "fill": "#F97316", + "content": "22.0%", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "IcmHX", + "name": "b3Qty", + "fill": "#9A3412", + "content": "98,120", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "iDYN9", + "name": "bucket4", + "width": "fill_container", + "fill": "#FEF2F2", + "cornerRadius": 8, + "stroke": { + "align": "inside", + "thickness": 2, + "fill": "#EF4444" + }, + "layout": "vertical", + "gap": 8, + "padding": 16, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Peb5J", + "name": "b4Label", + "fill": "#991B1B", + "content": "7+ 天", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "600" + }, + { + "type": "text", + "id": "ydAd9", + "name": "b4Value", + "fill": "#991B1B", + "content": "19 lots", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "700" + }, + { + "type": "text", + "id": "DVUNT", + "name": "b4Pct", + "fill": "#EF4444", + "content": "15.0%", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "r1aMo", + "name": "b4Qty", + "fill": "#991B1B", + "content": "70,050", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "EkLV0", + "name": "lotSection", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "6Tg6Z", + "name": "lotHeader", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#E2E6EF" + }, + "padding": [ + 16, + 20 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "hlYwY", + "name": "lotTitleGroup", + "gap": 12, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "UvnOY", + "name": "lotTitle", + "fill": "#222222", + "content": "Lot Details", + "fontFamily": "Inter", + "fontSize": 16, + "fontWeight": "600" + }, + { + "type": "frame", + "id": "54DK5", + "name": "lotCount", + "fill": "#667eea", + "cornerRadius": 12, + "padding": [ + 4, + 10 + ], + "children": [ + { + "type": "text", + "id": "65lwE", + "name": "lotCountText", + "fill": "#FFFFFF", + "content": "127 lots", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "OCvgO", + "name": "filterIndicator", + "fill": "#F0FDF4", + "cornerRadius": 12, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#22C55E" + }, + "padding": [ + 4, + 10 + ], + "children": [ + { + "type": "text", + "id": "dYBGb", + "name": "filterText", + "fill": "#166534", + "content": "篩選: DIE_BOND", + "fontFamily": "Inter", + "fontSize": 11, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "hVBnP", + "name": "clearBtn", + "fill": "#FEF2F2", + "cornerRadius": 12, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#EF4444" + }, + "padding": [ + 4, + 10 + ], + "children": [ + { + "type": "text", + "id": "Upvp6", + "name": "clearText", + "fill": "#991B1B", + "content": "✕ 清除篩選", + "fontFamily": "Inter", + "fontSize": 11, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "text", + "id": "UAIbQ", + "name": "lotInfo", + "fill": "#888888", + "content": "依滯留天數排序 (最久優先)", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "k2PhE", + "name": "lotBody", + "width": "fill_container", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "FYGFO", + "name": "lotTableHeader", + "width": "fill_container", + "fill": "#F9FAFB", + "gap": 8, + "padding": [ + 12, + 20 + ], + "children": [ + { + "type": "text", + "id": "LLmJp", + "name": "lth1", + "fill": "#666666", + "content": "LOTID", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "at5RZ", + "name": "lth2", + "fill": "#666666", + "content": "WORKORDER", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "ujPfX", + "name": "lth3", + "fill": "#666666", + "content": "QTY", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "UoBHt", + "name": "lth4", + "fill": "#666666", + "content": "Package", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "zV5Ma", + "name": "lth5", + "fill": "#666666", + "content": "Workcenter", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "ArmE7", + "name": "lth6", + "fill": "#666666", + "content": "Spec", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "jgkw4", + "name": "lth7", + "fill": "#666666", + "content": "Age", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "IZD0x", + "name": "lth8", + "fill": "#666666", + "content": "Hold By", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "text", + "id": "wk2g6", + "name": "lth9", + "fill": "#666666", + "content": "Dept", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "U7daK", + "name": "lotRow1", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#F0F0F0" + }, + "gap": 8, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "t3ceS", + "name": "lr1c1", + "fill": "#222222", + "content": "LOT2401150001", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "LV0bf", + "name": "lr1c2", + "fill": "#222222", + "content": "WO20240115001", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "KPyX9", + "name": "lr1c3", + "fill": "#222222", + "content": "5,200", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "4IAJD", + "name": "lr1c4", + "fill": "#222222", + "content": "QFN", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "ejmJF", + "name": "lr1c5", + "fill": "#222222", + "content": "DIE_BOND", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "YpYn3", + "name": "lr1c6", + "fill": "#222222", + "content": "Die Attach", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "0MDI8", + "name": "lr1c7", + "fill": "#FEE2E2", + "cornerRadius": 4, + "padding": [ + 2, + 8 + ], + "children": [ + { + "type": "text", + "id": "wGDd5", + "name": "lr1c7t", + "fill": "#991B1B", + "content": "15d", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "text", + "id": "bddVn", + "name": "lr1c8", + "fill": "#222222", + "content": "王小明", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "DrnAd", + "name": "lr1c9", + "fill": "#222222", + "content": "QC", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "XKBSi", + "name": "lotRow2", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#F0F0F0" + }, + "gap": 8, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "lHSqf", + "name": "lr2c1", + "fill": "#222222", + "content": "LOT2401180023", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "xXL5X", + "name": "lr2c2", + "fill": "#222222", + "content": "WO20240118005", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "PCg5f", + "name": "lr2c3", + "fill": "#222222", + "content": "3,800", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "UsM4m", + "name": "lr2c4", + "fill": "#222222", + "content": "DFN", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "soi3b", + "name": "lr2c5", + "fill": "#222222", + "content": "WIRE_BOND", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "rHrFq", + "name": "lr2c6", + "fill": "#222222", + "content": "Wire Bond", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "kKLNP", + "name": "lr2c7", + "fill": "#FFF7ED", + "cornerRadius": 4, + "padding": [ + 2, + 8 + ], + "children": [ + { + "type": "text", + "id": "jVduw", + "name": "lr2c7t", + "fill": "#9A3412", + "content": "8d", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "text", + "id": "Nsja6", + "name": "lr2c8", + "fill": "#222222", + "content": "李大華", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "0VS56", + "name": "lr2c9", + "fill": "#222222", + "content": "PE", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "mUQgn", + "name": "lotRow3", + "width": "fill_container", + "gap": 8, + "padding": [ + 12, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "yxhdB", + "name": "lr3c1", + "fill": "#222222", + "content": "LOT2401200045", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "zB9xG", + "name": "lr3c2", + "fill": "#222222", + "content": "WO20240120008", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "0GVPK", + "name": "lr3c3", + "fill": "#222222", + "content": "4,500", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "y5oaF", + "name": "lr3c4", + "fill": "#222222", + "content": "SOT", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "lkcvd", + "name": "lr3c5", + "fill": "#222222", + "content": "MOLDING", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "RqRPi", + "name": "lr3c6", + "fill": "#222222", + "content": "Molding", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "kMWnK", + "name": "lr3c7", + "fill": "#FFFBEB", + "cornerRadius": 4, + "padding": [ + 2, + 8 + ], + "children": [ + { + "type": "text", + "id": "S80Dg", + "name": "lr3c7t", + "fill": "#92400E", + "content": "2d", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "text", + "id": "vC6Ph", + "name": "lr3c8", + "fill": "#222222", + "content": "張三豐", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "xKBf2", + "name": "lr3c9", + "fill": "#222222", + "content": "QC", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "fgdNX", + "name": "pagination", + "width": "fill_container", + "stroke": { + "align": "inside", + "thickness": { + "top": 1 + }, + "fill": "#E2E6EF" + }, + "padding": [ + 12, + 20 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "UkFtQ", + "name": "pageInfo", + "fill": "#888888", + "content": "Showing 1-50 of 127 lots", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "b2LAR", + "name": "pageButtons", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "QERaB", + "name": "prevBtn", + "cornerRadius": 6, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "padding": [ + 8, + 16 + ], + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Msjmx", + "name": "prevText", + "fill": "#666666", + "content": "← Previous", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "PFfh6", + "name": "pageNum", + "fill": "#667eea", + "cornerRadius": 6, + "padding": [ + 8, + 16 + ], + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "glqu5", + "name": "pageNumText", + "fill": "#FFFFFF", + "content": "1", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "aWWrR", + "name": "nextBtn", + "cornerRadius": 6, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "padding": [ + 8, + 16 + ], + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "4pKqZ", + "name": "nextText", + "fill": "#666666", + "content": "Next →", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/frontend_design/WIP_main.pen b/frontend_design/WIP_main.pen new file mode 100644 index 0000000..d00b336 --- /dev/null +++ b/frontend_design/WIP_main.pen @@ -0,0 +1,614 @@ +{ + "version": "2.6", + "children": [ + { + "type": "frame", + "id": "GIoPU", + "x": 950, + "y": 0, + "name": "WIP Overview - Integrated", + "width": 1200, + "fill": "#F5F7FA", + "layout": "vertical", + "gap": 16, + "padding": 20, + "children": [ + { + "type": "frame", + "id": "N2qxA", + "name": "header", + "width": "fill_container", + "height": 64, + "fill": { + "type": "gradient", + "gradientType": "linear", + "enabled": true, + "rotation": 135, + "size": { + "height": 1 + }, + "colors": [ + { + "color": "#667eea", + "position": 0 + }, + { + "color": "#764ba2", + "position": 1 + } + ] + }, + "cornerRadius": 10, + "padding": [ + 0, + 22 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "7h8YC", + "name": "headerTitle", + "fill": "#FFFFFF", + "content": "WIP Overview Dashboard", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "600" + }, + { + "type": "frame", + "id": "JyskI", + "name": "headerRight", + "gap": 16, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "8rtgc", + "name": "lastUpdate", + "fill": "rgba(255,255,255,0.8)", + "content": "Last Update: 2026-01-27 14:30", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "ZH0PW", + "name": "refreshBtn", + "fill": "rgba(255,255,255,0.2)", + "cornerRadius": 8, + "padding": [ + 9, + 20 + ], + "children": [ + { + "type": "text", + "id": "wlrMh", + "name": "refreshText", + "fill": "#FFFFFF", + "content": "重新整理", + "fontFamily": "Inter", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "aYXjP", + "name": "Summary Section", + "width": "fill_container", + "layout": "vertical", + "gap": 12, + "children": [ + { + "type": "frame", + "id": "pFof4", + "name": "kpiRow", + "width": "fill_container", + "gap": 14, + "children": [ + { + "type": "frame", + "id": "0kWPh", + "name": "kpi1", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "gap": 6, + "padding": [ + 16, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "DTtUq", + "name": "kpi1Label", + "fill": "#666666", + "content": "Total Lots", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "vdmq8", + "name": "kpi1Value", + "fill": "#667eea", + "content": "1,234", + "fontFamily": "Inter", + "fontSize": 28, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "wEupl", + "name": "kpi2", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "gap": 6, + "padding": [ + 16, + 20 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "59OHd", + "name": "kpi2Label", + "fill": "#666666", + "content": "Total QTY", + "fontFamily": "Inter", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "YkPVl", + "name": "kpi2Value", + "fill": "#667eea", + "content": "56,789", + "fontFamily": "Inter", + "fontSize": 28, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "g65nT", + "name": "wipStatusRow", + "width": "fill_container", + "gap": 14, + "children": [ + { + "type": "frame", + "id": "sbKdU", + "name": "runCard", + "width": "fill_container", + "fill": "#F0FDF4", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 2, + "fill": "#22C55E" + }, + "layout": "vertical", + "gap": 8, + "padding": [ + 16, + 20 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "EQzBo", + "name": "runLeft", + "width": "fill_container", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "rectangle", + "cornerRadius": 5, + "id": "m7Prk", + "name": "runDot", + "fill": "#22C55E", + "width": 10, + "height": 10 + }, + { + "type": "text", + "id": "1DMEu", + "name": "runLabel", + "fill": "#166534", + "content": "RUN", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "ZVtRH", + "name": "runRight", + "width": "fill_container", + "gap": 24, + "justifyContent": "center", + "children": [ + { + "type": "text", + "id": "OLwma", + "name": "runLots", + "fill": "#0D0D0D", + "content": "500 lots", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "700" + }, + { + "type": "text", + "id": "OI5f5", + "name": "runQty", + "fill": "#166534", + "content": "30,000 pcs", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "uibRH", + "name": "queueCard", + "width": "fill_container", + "fill": "#FFFBEB", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 2, + "fill": "#F59E0B" + }, + "layout": "vertical", + "gap": 8, + "padding": [ + 16, + 20 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "xeGDP", + "name": "queueLeft", + "width": "fill_container", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "rectangle", + "cornerRadius": 5, + "id": "KuAgl", + "name": "queueDot", + "fill": "#F59E0B", + "width": 10, + "height": 10 + }, + { + "type": "text", + "id": "TsD9B", + "name": "queueLabel", + "fill": "#92400E", + "content": "QUEUE", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "41Db3", + "name": "queueRight", + "width": "fill_container", + "gap": 24, + "justifyContent": "center", + "children": [ + { + "type": "text", + "id": "dtaqd", + "name": "queueLots", + "fill": "#0D0D0D", + "content": "634 lots", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "700" + }, + { + "type": "text", + "id": "BVusD", + "name": "queueQty", + "fill": "#92400E", + "content": "21,789 pcs", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Y5gLu", + "name": "holdCard", + "width": "fill_container", + "fill": "#FEF2F2", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 2, + "fill": "#EF4444" + }, + "layout": "vertical", + "gap": 8, + "padding": [ + 16, + 20 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "juHZC", + "name": "holdLeft", + "width": "fill_container", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "rectangle", + "cornerRadius": 5, + "id": "FW9Vv", + "name": "holdDot", + "fill": "#EF4444", + "width": 10, + "height": 10 + }, + { + "type": "text", + "id": "gEojA", + "name": "holdLabel", + "fill": "#991B1B", + "content": "HOLD", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "3imiS", + "name": "holdRight", + "width": "fill_container", + "gap": 24, + "justifyContent": "center", + "children": [ + { + "type": "text", + "id": "AlTi3", + "name": "holdLots", + "fill": "#0D0D0D", + "content": "100 lots", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "700" + }, + { + "type": "text", + "id": "oKc0i", + "name": "holdQty", + "fill": "#991B1B", + "content": "5,000 pcs", + "fontFamily": "Inter", + "fontSize": 24, + "fontWeight": "700" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "uRXyA", + "name": "Content Grid", + "width": "fill_container", + "gap": 16, + "children": [ + { + "type": "frame", + "id": "7HMip", + "name": "matrixCard", + "width": "fill_container", + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "pxsYm", + "name": "matrixHeader", + "width": "fill_container", + "fill": "#FAFBFC", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#E2E6EF" + }, + "padding": [ + 14, + 20 + ], + "children": [ + { + "type": "text", + "id": "JhSDl", + "name": "matrixTitle", + "fill": "#222222", + "content": "Workcenter x Package Matrix (QTY)", + "fontFamily": "Inter", + "fontSize": 15, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "4hQZP", + "name": "matrixBody", + "width": "fill_container", + "height": 200, + "layout": "vertical", + "padding": 16, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "lH6Yr", + "name": "matrixPlaceholder", + "fill": "#999999", + "content": "[ Matrix Table ]", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "FOIFS", + "name": "holdSummaryCard", + "width": 320, + "fill": "#FFFFFF", + "cornerRadius": 10, + "stroke": { + "align": "inside", + "thickness": 1, + "fill": "#E2E6EF" + }, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "uikVi", + "name": "holdSummaryHeader", + "width": "fill_container", + "fill": "#FAFBFC", + "stroke": { + "align": "inside", + "thickness": { + "bottom": 1 + }, + "fill": "#E2E6EF" + }, + "padding": [ + 14, + 20 + ], + "children": [ + { + "type": "text", + "id": "VBWBv", + "name": "holdSummaryTitle", + "fill": "#222222", + "content": "Hold Summary", + "fontFamily": "Inter", + "fontSize": 15, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "cFEPm", + "name": "holdSummaryBody", + "width": "fill_container", + "height": 200, + "layout": "vertical", + "padding": 16, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "s7sa1", + "name": "holdSummaryPlaceholder", + "fill": "#999999", + "content": "[ Hold Table ]", + "fontFamily": "Inter", + "fontSize": 14, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/openspec/changes/archive/2026-01-27-wip-status-filter/design.md b/openspec/changes/archive/2026-01-27-wip-status-filter/design.md new file mode 100644 index 0000000..b7c60da --- /dev/null +++ b/openspec/changes/archive/2026-01-27-wip-status-filter/design.md @@ -0,0 +1,348 @@ +# WIP Status Filter - 技術設計 + +## 架構概覽 + +``` +┌─────────────────────────────────────────────────────────────┐ +│ wip_overview.html (前端) │ +│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ +│ │ RUN │ │ QUEUE │ │ HOLD │ ← 可點擊卡片 │ +│ └────┬────┘ └────┬────┘ └────┬────┘ │ +│ │ │ │ │ +│ └───────────┼───────────┘ │ +│ ▼ │ +│ activeStatusFilter (state) │ +│ │ │ +│ ▼ │ +│ GET /api/wip/overview/matrix?status={RUN|QUEUE|HOLD} │ +└─────────────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ wip_routes.py │ +│ api_overview_matrix() ← 新增 status 參數解析 │ +└─────────────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ wip_service.py │ +│ get_wip_matrix(status=...) ← 新增 status 篩選邏輯 │ +└─────────────────────────────────────────────────────────────┘ +``` + +--- + +## 後端變更 + +### 1. wip_service.py - get_wip_matrix() + +**新增參數**:`status: Optional[str] = None` + +**SQL 條件**: +```python +# 在 _build_base_conditions 之後加入 +if status: + status_upper = status.upper() + if status_upper == 'RUN': + conditions.append("EQUIPMENTCOUNT > 0") + elif status_upper == 'HOLD': + conditions.append("EQUIPMENTCOUNT = 0 AND CURRENTHOLDCOUNT > 0") + elif status_upper == 'QUEUE': + conditions.append("EQUIPMENTCOUNT = 0 AND CURRENTHOLDCOUNT = 0") +``` + +**函數簽名變更**: +```python +def get_wip_matrix( + include_dummy: bool = False, + workorder: Optional[str] = None, + lotid: Optional[str] = None, + status: Optional[str] = None # 新增 +) -> Optional[Dict[str, Any]]: +``` + +### 2. wip_routes.py - api_overview_matrix() + +**新增參數解析**: +```python +status = request.args.get('status', '').strip().upper() or None + +# 驗證 status 值 +if status and status not in ('RUN', 'QUEUE', 'HOLD'): + return jsonify({ + 'success': False, + 'error': 'Invalid status. Use RUN, QUEUE, or HOLD' + }), 400 + +result = get_wip_matrix( + include_dummy=include_dummy, + workorder=workorder, + lotid=lotid, + status=status # 新增 +) +``` + +--- + +## 前端變更 + +### 1. 新增狀態變數 + +```javascript +// 在 state 物件旁邊新增 +let activeStatusFilter = null; // null | 'run' | 'queue' | 'hold' +``` + +### 2. 新增 CSS 樣式 + +```css +/* 可點擊的卡片 */ +.wip-status-card { + cursor: pointer; + transition: all 0.2s ease; +} + +.wip-status-card:hover { + transform: translateY(-2px); + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); +} + +/* 選中狀態 */ +.wip-status-card.active { + border-width: 3px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); +} + +.wip-status-card.run.active { + box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4); +} + +.wip-status-card.queue.active { + box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4); +} + +.wip-status-card.hold.active { + box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4); +} + +/* 篩選提示標籤 */ +.filter-badge { + display: none; + font-size: 10px; + padding: 2px 6px; + border-radius: 4px; + margin-left: 8px; + background: rgba(0, 0, 0, 0.1); +} + +.wip-status-card.active .filter-badge { + display: inline-block; +} +``` + +### 3. HTML 變更 + +為卡片添加 `onclick` 和篩選標籤: + +```html +