查验
This commit is contained in:
@@ -16,7 +16,13 @@
|
||||
<a href="/setting" class="nav-link">⚙️ 设置</a>
|
||||
<a href="/running" class="nav-link">▶️ 运行</a>
|
||||
</nav>
|
||||
<div class="status-bar">
|
||||
<div class="status-bar" style="display:flex;align-items:center;gap:12px">
|
||||
<label class="env-toggle" title="切换测试/正式环境">
|
||||
<span class="env-label" :class="testMode ? 'test' : 'prod'">{% raw %}{{ testMode ? '🧪 测试' : '🏭 正式' }}{% endraw %}</span>
|
||||
<div class="toggle-switch" @click="toggleEnvMode" :class="{active: testMode}">
|
||||
<div class="toggle-knob"></div>
|
||||
</div>
|
||||
</label>
|
||||
<span class="status-item" :class="statusClass">
|
||||
{% raw %}{{ statusText }}{% endraw %}
|
||||
</span>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>运行监控 - AGV 拍摄系统</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css?v=20260529a">
|
||||
<link rel="stylesheet" href="/static/css/style.css?v=20260616a">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
@@ -48,6 +48,30 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 查验进度 -->
|
||||
<section class="card" v-if="inspection">
|
||||
<h2>🔍 查验进度 — {% raw %}{{ inspection.customsName }}{% endraw %}</h2>
|
||||
<p class="hint" style="margin-bottom:12px">
|
||||
总进度: {% raw %}{{ inspectionTotal }}{% endraw %} / {% raw %}{{ inspectionTarget }}{% endraw %} 台
|
||||
<span v-if="inspectionTotal >= inspectionTarget && inspectionTarget > 0" style="color:#4caf50;font-weight:bold"> ✅ 已完成</span>
|
||||
</p>
|
||||
<div class="inspection-grid">
|
||||
<div v-for="(item, ii) in inspection.items" :key="ii" class="inspection-item" :class="{ 'insp-done': item.inspected >= item.quantify, 'insp-active': item.inspected > 0 && item.inspected < item.quantify }">
|
||||
<div class="insp-name">{% raw %}{{ item.inventoryName }}{% endraw %}</div>
|
||||
<div class="insp-code">{% raw %}{{ item.inventoryCode }}{% endraw %}</div>
|
||||
<div class="insp-spec">{% raw %}{{ item.spec }}{% endraw %}</div>
|
||||
<div class="insp-count">
|
||||
<span class="insp-num">{% raw %}{{ item.inspected }}{% endraw %}</span>
|
||||
<span class="insp-sep">/</span>
|
||||
<span class="insp-total">{% raw %}{{ item.quantify }}{% endraw %}</span>
|
||||
</div>
|
||||
<div class="insp-bar">
|
||||
<div class="insp-fill" :style="{width: (item.quantify > 0 ? (item.inspected / item.quantify * 100) : 0) + '%'}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 任务步骤控制开关 -->
|
||||
<section class="card">
|
||||
<h2>🎛️ 任务步骤控制</h2>
|
||||
@@ -202,7 +226,7 @@
|
||||
<div class="modal-overlay" v-if="showQrModal">
|
||||
<div class="modal">
|
||||
<h3>⌨️ 手动输入二维码</h3>
|
||||
<p>所有姿态均未识别到二维码,请手动输入:</p>
|
||||
<p>{% raw %}{{ qrMessage }}{% endraw %}</p>
|
||||
<input type="text" v-model="qrValue" placeholder="输入二维码内容" autofocus @keyup.enter="submitQr">
|
||||
<div class="modal-actions">
|
||||
<button class="btn btn-success" @click="rescanQr" style="margin-right:auto">🔄 重新扫描</button>
|
||||
@@ -241,6 +265,6 @@
|
||||
</div>
|
||||
|
||||
<script src="/static/js/vue3.global.prod.js"></script>
|
||||
<script src="/static/js/running.js?v=20260605b"></script>
|
||||
<script src="/static/js/running.js?v=20260616c"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -110,7 +110,7 @@
|
||||
<thead>
|
||||
<tr style="background:#1a2332;text-align:left">
|
||||
<th style="padding:10px 12px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:13px">ID</th>
|
||||
<th style="padding:10px 12px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:13px">机型名称</th>
|
||||
<th style="padding:10px 12px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:13px">机型申请时间</th>
|
||||
<th style="padding:10px 12px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:13px">描述</th>
|
||||
<th style="padding:10px 12px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:13px">备注</th>
|
||||
<th style="padding:10px 12px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:13px;text-align:center">操作</th>
|
||||
@@ -161,7 +161,7 @@
|
||||
<div style="margin-top:8px">
|
||||
<div style="display:flex;gap:8px;align-items:center;flex-wrap:wrap">
|
||||
<input type="text" v-model="newPoseForm[m.id + '_front']"
|
||||
placeholder="姿态名称(如:取料)"
|
||||
placeholder="姿态申请时间(如:取料)"
|
||||
style="flex:1;min-width:120px;padding:6px;border:1px solid #2a3441;border-radius:4px">
|
||||
<button class="btn btn-secondary btn-small" @click="addPose(m.id, 'front', newPoseForm[m.id + '_front'])">➕ 添加正面姿态(当前角度)</button>
|
||||
</div>
|
||||
@@ -208,7 +208,7 @@
|
||||
<div style="margin-top:8px">
|
||||
<div style="display:flex;gap:8px;align-items:center;flex-wrap:wrap">
|
||||
<input type="text" v-model="newPoseForm[m.id + '_back']"
|
||||
placeholder="姿态名称(如:放料)"
|
||||
placeholder="姿态申请时间(如:放料)"
|
||||
style="flex:1;min-width:120px;padding:6px;border:1px solid #2a3441;border-radius:4px">
|
||||
<button class="btn btn-secondary btn-small" @click="addPose(m.id, 'back', newPoseForm[m.id + '_back'])">➕ 添加背面姿态(当前角度)</button>
|
||||
</div>
|
||||
@@ -225,7 +225,7 @@
|
||||
<button class="btn-icon" @click="showAddModelModal = false">✕</button>
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom:12px">
|
||||
<label>机型名称</label>
|
||||
<label>机型申请时间</label>
|
||||
<input type="text" v-model="newModelName" placeholder="例如:SMT-A" style="width:100%;padding:8px;border:1px solid #2a3441;border-radius:4px">
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom:12px">
|
||||
@@ -445,7 +445,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div style="display:flex;justify-content:flex-end;margin-bottom:16px">
|
||||
<input type="text" v-model="newQrName" placeholder="输入名称..." style="background:#0f1923;border:1px solid #2a3441;color:#fff;padding:8px 12px;border-radius:6px;margin-right:8px;width:180px">
|
||||
<input type="text" v-model="newQrName" placeholder="输入申请时间..." style="background:#0f1923;border:1px solid #2a3441;color:#fff;padding:8px 12px;border-radius:6px;margin-right:8px;width:180px">
|
||||
<button class="btn btn-primary" @click="addQrConfig()">➕ 添加</button>
|
||||
</div>
|
||||
<div v-if="qrConfigs.length === 0" style="text-align:center;color:#9aa0a6;padding:40px">
|
||||
@@ -454,7 +454,7 @@
|
||||
<table v-else style="width:100%;border-collapse:collapse;margin-bottom:16px">
|
||||
<thead>
|
||||
<tr style="background:#1a2332;text-align:left">
|
||||
<th style="padding:10px 8px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:12px">名称</th>
|
||||
<th style="padding:10px 8px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:12px">申请时间</th>
|
||||
<th style="padding:10px 4px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:12px">J1</th>
|
||||
<th style="padding:10px 4px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:12px">J2</th>
|
||||
<th style="padding:10px 4px;border-bottom:1px solid #2a3441;color:#9aa0a6;font-size:12px">J3</th>
|
||||
@@ -606,30 +606,33 @@
|
||||
<tr>
|
||||
<th style="width:60px">序号</th>
|
||||
<th>报关单号</th>
|
||||
<th>名称</th>
|
||||
<th>申请时间</th>
|
||||
<th>状态</th>
|
||||
<th>机器数</th>
|
||||
<th style="width:80px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, idx) in customsPageData" :key="item.id || idx"
|
||||
<tr v-for="(item, idx) in customsPageData" :key="(item.customs && item.customs.id) || item.id || idx"
|
||||
class="clickable-row"
|
||||
:class="{ 'row-selected': selectedCustomsId === (item.id || item.customsId || item.customs_id) }"
|
||||
@click="selectCustomsRow(item, idx)">
|
||||
:class="{ 'row-selected': selectedCustomsId === ((item.customs && item.customs.id) || item.id || item.customsId || item.customs_id) }"
|
||||
@click="selectCustomsRow(item)">
|
||||
<td>{% raw %}{{ (customsPage - 1) * customsPageSize + idx + 1 }}{% endraw %}</td>
|
||||
<td><strong>{% raw %}{{ item.customsNo || item.customs_no || item.id || '-' }}{% endraw %}</strong></td>
|
||||
<td>{% raw %}{{ item.name || item.customsName || item.customs_name || '-' }}{% endraw %}</td>
|
||||
<td><span class="badge" :class="'badge-' + (item.status || 'unknown')">{% raw %}{{ item.status || '未知' }}{% endraw %}</span></td>
|
||||
<td>{% raw %}{{ item.machineCount || item.machine_count || item.machineNum || item.machine_num || '?' }}{% endraw %}</td>
|
||||
<td><strong>{% raw %}{{ (item.customs && item.customs.customsCode) || item.orderCode || (item.customs && item.customs.id) || '-' }}{% endraw %}</strong></td>
|
||||
<td>{% raw %}{{ item.orderCode || item.drawCode || '-' }}{% endraw %}</td>
|
||||
<td><span class="badge" :class="((item.customs && item.customs.customsCode) ? 'badge-success' : 'badge-pending')">{% raw %}{{ (item.customs && item.customs.customsCode) ? '已报关' : '待报关' }}{% endraw %}</span></td>
|
||||
<td>{% raw %}{{ (item.customs && item.customs.orderId) ? item.customs.orderId.split(',').length : '?' }}{% endraw %}</td>
|
||||
<td>
|
||||
<button class="btn btn-small btn-primary" @click.stop="selectCustomsRow(item, idx)">
|
||||
<button class="btn btn-small btn-primary" @click.stop="selectCustomsRow(item)">
|
||||
📦 查看机器
|
||||
</button>
|
||||
<button class="btn btn-small btn-success" style="margin-left:4px" @click.stop="startInspection(item)">
|
||||
🔍 开始查验
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="!customsPageData.length && !customsLoading">
|
||||
<td colspan="6" style="text-align:center;color:#8899aa;padding:24px">暂无报关单数据</td>
|
||||
<td colspan="7" style="text-align:center;color:#8899aa;padding:24px">暂无报关单数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -657,21 +660,23 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:50px">序号</th>
|
||||
<th>机器编号</th>
|
||||
<th>机器名称</th>
|
||||
<th>型号</th>
|
||||
<th>二维码值</th>
|
||||
<th>状态</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>规格</th>
|
||||
<th>序列号</th>
|
||||
<th>数量</th>
|
||||
<th>查验数量</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(m, mi) in customsMachines" :key="mi">
|
||||
<td>{% raw %}{{ mi + 1 }}{% endraw %}</td>
|
||||
<td><strong>{% raw %}{{ m.serialNumber || m.serial_number || m.serialNo || m.serial_no || m.machineNo || m.machine_no || m.id || '-' }}{% endraw %}</strong></td>
|
||||
<td>{% raw %}{{ m.name || m.machineName || m.machine_name || m.model || '-' }}{% endraw %}</td>
|
||||
<td>{% raw %}{{ m.modelName || m.model_name || m.model || '-' }}{% endraw %}</td>
|
||||
<td style="font-family:monospace;color:#4fc3f7">{% raw %}{{ m.qrValue || m.qr_value || m.qr || m.qrCode || m.qr_code || m.serialNumber || m.serial_number || '-' }}{% endraw %}</td>
|
||||
<td><span class="badge" :class="'badge-' + (m.status || 'normal')">{% raw %}{{ m.status || '正常' }}{% endraw %}</span></td>
|
||||
<td><strong>{% raw %}{{ m.inventoryCode || m.machineCode || '-' }}{% endraw %}</strong></td>
|
||||
<td>{% raw %}{{ m.inventoryName || m.machineName || m.name || '-' }}{% endraw %}</td>
|
||||
<td>{% raw %}{{ m.inventorySpecification || m.spec || '-' }}{% endraw %}</td>
|
||||
<td style="font-family:monospace;color:#4fc3f7">{% raw %}{{ m.serialNumber || m.serialNumbers || m.qrValue || '-' }}{% endraw %}</td>
|
||||
<td>{% raw %}{{ m.quantify || m.quantity || (m.quantify ? m.quantify : '?') }}{% endraw %}</td>
|
||||
<td><span :class="(m.inspectionCount > 0) ? 'badge badge-success' : 'badge badge-pending'">{% raw %}{{ m.inspectionCount || 0 }}{% endraw %}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -697,7 +702,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 机械臂截图弹窗 -->
|
||||
<div class="modal-overlay" v-if="showArmSnapshot" @click.self="showArmSnapshot = false">
|
||||
<div class="modal-overlay" v-if="showArmSnapshot && armSnapshotUrl" @click.self="showArmSnapshot = false">
|
||||
<div class="modal" style="max-width:800px">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px">
|
||||
<h3>📸 机械臂摄像头截图</h3>
|
||||
@@ -713,6 +718,6 @@
|
||||
</div>
|
||||
|
||||
<script src="/static/js/vue3.global.prod.js?v=20260526a"></script>
|
||||
<script src="/static/js/setting.js?v=20260612a"></script>
|
||||
<script src="/static/js/setting.js?v=20260616f"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user