148 lines
7.3 KiB
PHP
148 lines
7.3 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
|
<title><?php echo htmlspecialchars($title); ?> - MES 前台工位</title>
|
|
<!-- Bootstrap 3.3.6 -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/css/bootstrap.min.css">
|
|
<!-- Font Awesome -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/css/font-awesome.min.css">
|
|
<!-- Ionicons(已本地化,P3-14 消除外部 CDN 供应链风险) -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/css/ionicons.min.css">
|
|
<!-- Theme style -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/css/AdminLTE.min.css">
|
|
<!-- AdminLTE Skins -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/css/skins/_all-skins.min.css">
|
|
<!-- iCheck -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/plugins/iCheck/flat/blue.css">
|
|
<!-- Morris chart -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/plugins/morris/morris.css">
|
|
<!-- jvectormap -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/plugins/jvectormap/jquery-jvectormap-1.2.2.css">
|
|
<!-- Date Picker -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/plugins/datepicker/datepicker3.css">
|
|
<!-- Daterange picker -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/plugins/daterangepicker/daterangepicker-bs3.css">
|
|
<!-- bootstrap wysihtml5 - text editor -->
|
|
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/static/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
|
|
<style>
|
|
/* 全局表格居中 */
|
|
.table th,
|
|
.table td {
|
|
text-align: center !important;
|
|
vertical-align: middle !important;
|
|
}
|
|
/* 工位记录表 - 分色 */
|
|
.record-table th,
|
|
.record-table td {
|
|
text-align: center !important;
|
|
vertical-align: middle !important;
|
|
}
|
|
.record-table thead th {
|
|
background: #3c8dbc !important;
|
|
color: #fff !important;
|
|
}
|
|
.record-table tbody td:nth-child(1) { background: #FCE4EC; } /* 浅粉 */
|
|
.record-table tbody td:nth-child(2) { background: #E3F2FD; } /* 浅蓝 */
|
|
.record-table tbody td:nth-child(3) { background: #E8F5E9; } /* 浅绿 */
|
|
.record-table tbody td:nth-child(4) { background: #FFF3E0; } /* 浅橙 */
|
|
.record-table tbody td:nth-child(5) { background: #F3E5F5; } /* 浅紫 */
|
|
.record-table tbody td:nth-child(6) { background: #E0F7FA; } /* 浅青 */
|
|
.record-table tbody td:nth-child(7) { background: #FFF9C4; } /* 浅黄 */
|
|
.record-table tbody td:nth-child(8) { background: #E8EAF6; } /* 靛蓝 */
|
|
.record-table tbody td:nth-child(9) { background: #EFEBE9; } /* 浅棕 */
|
|
</style>
|
|
<script src="<?php echo BASE_URL; ?>/static/js/jquery-3.7.1.min.js"></script>
|
|
<?php // v3-P2 CSP:全局事件委托(替代内联 onclick 等),配合 nonce 实现无 unsafe-inline ?>
|
|
<script src="<?php echo BASE_URL; ?>/static/js/csp_global.js" nonce="<?php echo csp_nonce(); ?>"></script>
|
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
|
<!--[if lt IE 9]>
|
|
<script src="<?php echo BASE_URL; ?>/static/js/html5shiv.min.js"></script>
|
|
<script src="<?php echo BASE_URL; ?>/static/js/respond.min.js"></script>
|
|
<![endif]-->
|
|
</head>
|
|
<body class="hold-transition skin-blue sidebar-mini">
|
|
<div class="wrapper">
|
|
|
|
<header class="main-header">
|
|
<a href="<?php echo BASE_URL; ?>/Front/index" class="logo">
|
|
<span class="logo-mini"><b>MES</b></span>
|
|
<span class="logo-lg"><b>MES</b> 前台工位</span>
|
|
</a>
|
|
<nav class="navbar navbar-static-top">
|
|
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
|
|
<span class="sr-only">切换导航</span>
|
|
</a>
|
|
<div class="navbar-custom-menu">
|
|
<ul class="nav navbar-nav">
|
|
<li>
|
|
<a href="<?php echo BASE_URL; ?>/Admin/index"><i class="fa fa-arrow-left"></i> <span class="hidden-xs">返回后台</span></a>
|
|
</li>
|
|
<li class="dropdown user user-menu">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
|
<i class="fa fa-user"></i>
|
|
<span class="hidden-xs"><?php echo htmlspecialchars($user['emp_name']); ?></span>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li class="user-header" style="background:#3c8dbc; color:#fff; padding:10px; text-align:center;">
|
|
<p><?php echo htmlspecialchars($user['emp_name']); ?></p>
|
|
</li>
|
|
<li class="user-footer">
|
|
<div class="pull-right">
|
|
<a href="<?php echo BASE_URL; ?>/Login/logout" class="btn btn-default btn-flat"><i class="fa fa-power-off"></i> 退出登录</a>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<aside class="main-sidebar">
|
|
<section class="sidebar">
|
|
<ul class="sidebar-menu" data-widget="tree">
|
|
<li class="header">工位导航</li>
|
|
<?php
|
|
$stationIcons = [
|
|
'inbound' => 'fa-sign-in',
|
|
'pcb_test' => 'fa-microchip',
|
|
'battery' => 'fa-battery-full',
|
|
'assembly' => 'fa-cogs',
|
|
'finished_test' => 'fa-check-circle',
|
|
'warehouse' => 'fa-warehouse',
|
|
'delivery' => 'fa-truck'
|
|
];
|
|
// 工位显示名称映射
|
|
$stationNameMap = [
|
|
'inbound' => '半成品入库',
|
|
'warehouse' => '成品入库',
|
|
];
|
|
foreach ($stations as $station):
|
|
$icon = isset($stationIcons[$station['station_type']]) ? $stationIcons[$station['station_type']] : 'fa-circle-o';
|
|
$displayName = isset($stationNameMap[$station['station_type']]) ? $stationNameMap[$station['station_type']] : $station['station_name'];
|
|
?>
|
|
<li class="<?php echo (isset($activeStation) && $activeStation === $station['station_type']) ? 'active' : ''; ?>">
|
|
<a href="<?php echo BASE_URL; ?>/Front/<?php echo $station['station_type']; ?>">
|
|
<i class="fa <?php echo $icon; ?>"></i>
|
|
<span><?php echo htmlspecialchars($displayName); ?></span>
|
|
</a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</section>
|
|
</aside>
|
|
|
|
<div class="content-wrapper">
|
|
<section class="content-header">
|
|
<h1><?php echo htmlspecialchars($title); ?><small> 前台工位</small></h1>
|
|
<ol class="breadcrumb">
|
|
<li><a href="<?php echo BASE_URL; ?>/Front/index"><i class="fa fa-th"></i> 工位选择</a></li>
|
|
<li class="active"><?php echo htmlspecialchars($title); ?></li>
|
|
</ol>
|
|
</section>
|
|
<section class="content">
|