56 lines
5.6 KiB
HTML
56 lines
5.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="staff-csrf-token" content="{{ g.staff.csrf_token }}">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>订单数据管理 · 柏悦物流</title>
|
|
<link rel="icon" href="{{ url_for('static', filename='fa.jpg') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/theme.css') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/admin_orders.css') }}">
|
|
</head>
|
|
<body class="orders-page">
|
|
<header class="orders-topbar">
|
|
<a class="brand" href="/admin/dashboard"><span class="brand-mark" aria-hidden="true">物流</span><span class="brand-name">柏悦物流</span></a>
|
|
<nav aria-label="后台导航"><a href="/admin/dashboard">返回客服工作台</a><button id="staff-logout" type="button">退出登录</button></nav>
|
|
</header>
|
|
<main class="orders-shell">
|
|
<div class="orders-heading"><div><p class="orders-eyebrow">STAFF CONSOLE</p><h1>订单数据管理</h1><p>导入订单后,客户登录并关联对应租户即可查询订单信息。</p></div><a class="template-link" href="/api/admin/orders/import/template">下载CSV模板 ↓</a></div>
|
|
<section class="import-card" aria-labelledby="import-title">
|
|
<div class="card-heading"><span class="step-number">01</span><div><h2 id="import-title">上传订单文件</h2><p>支持 CSV 和 XLSX,单次最多 5,000 条、文件不超过 5 MB。</p></div></div>
|
|
<form id="order-import-form">
|
|
<label class="file-picker" for="order-file"><span class="file-icon" aria-hidden="true">↑</span><span><strong id="file-name">选择订单文件</strong><small>点击选择 CSV 或 XLSX 文件</small></span><input id="order-file" name="file" type="file" accept=".csv,.xlsx,text/csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" required></label>
|
|
<p class="import-hint">必填列:租户ID、订单号。重复订单会保留已有记录,不会覆盖人工修改。</p>
|
|
<div class="form-actions"><button id="preview-import" class="button-primary" type="submit">校验并预览</button><span id="import-status" role="status" aria-live="polite"></span></div>
|
|
</form>
|
|
</section>
|
|
<section id="import-results" class="import-card results-card" aria-labelledby="results-title" hidden>
|
|
<div class="card-heading"><span class="step-number">02</span><div><h2 id="results-title">校验结果</h2><p id="results-caption">核对后再确认导入。</p></div></div>
|
|
<div id="import-summary" class="summary-grid"></div>
|
|
<div class="table-scroll"><table><thead><tr><th>行</th><th>租户ID</th><th>订单号</th><th>状态</th><th>入仓码</th><th>检查结果</th></tr></thead><tbody id="preview-rows"></tbody></table></div>
|
|
<p id="preview-limit-note" class="import-hint" hidden>表格仅展示前 20 条,其他行仍会执行完整校验。</p>
|
|
<div id="import-errors" class="error-list" hidden></div>
|
|
<div class="form-actions result-actions"><button id="confirm-import" class="button-primary" type="button" hidden>确认导入</button><span class="import-hint">确认后新增有效订单;文件中的错误行必须先修正。</span></div>
|
|
</section>
|
|
<section class="import-card" aria-labelledby="orders-title">
|
|
<div class="card-heading"><span class="step-number">03</span><div><h2 id="orders-title">订单列表</h2><p>按订单号、入仓码、Shipment ID 或租户筛选。</p></div></div>
|
|
<form id="order-search-form" class="order-search-form">
|
|
<label>关键词<input id="order-query" type="search" maxlength="128" placeholder="订单号、入仓码或 Shipment ID"></label>
|
|
<label>租户ID<input id="order-tenant" type="search" maxlength="128" placeholder="精确租户ID"></label>
|
|
<label>业务状态<select id="order-status"><option value="">全部状态</option><option value="DRAFT">草稿</option><option value="SUBMITTED">已提交</option><option value="APPROVED">审核通过</option><option value="ACCEPTED">已接单</option><option value="REJECTED">审核驳回</option><option value="PROCESSING">履约中</option><option value="COMPLETED">头程订单已完成</option><option value="CANCELLED">已取消</option></select></label>
|
|
<button class="button-primary" type="submit">搜索</button>
|
|
</form>
|
|
<p id="order-list-status" class="import-hint" role="status" aria-live="polite"></p>
|
|
<div class="table-scroll"><table><thead><tr><th>租户ID</th><th>订单号</th><th>业务状态</th><th>入仓码</th><th>Shipment ID</th><th>目的国</th><th>来源更新时间</th></tr></thead><tbody id="order-list-rows"><tr><td colspan="7">正在加载订单…</td></tr></tbody></table></div>
|
|
<div class="form-actions"><button id="load-more-orders" class="button-secondary" type="button" hidden>加载更多</button></div>
|
|
</section>
|
|
<section class="import-card" aria-labelledby="batches-title">
|
|
<div class="card-heading"><span class="step-number">04</span><div><h2 id="batches-title">导入记录</h2><p>记录操作人员和导入数量;撤销只删除仍未被修改的本批新增订单。</p></div></div>
|
|
<div class="table-scroll"><table><thead><tr><th>时间</th><th>文件</th><th>操作人</th><th>新增</th><th>重复保留</th><th>状态</th><th>操作</th></tr></thead><tbody id="import-batch-rows"><tr><td colspan="7">正在加载导入记录…</td></tr></tbody></table></div>
|
|
</section>
|
|
</main>
|
|
<script src="{{ url_for('static', filename='js/support.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/admin_orders.js') }}"></script>
|
|
</body>
|
|
</html>
|