2026-07-28 23:26:34 +08:00
|
|
|
|
{{define "freight"}}
|
|
|
|
|
|
<!doctype html>
|
|
|
|
|
|
<html lang="zh-CN">
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<title>{{.Page.Title}} - 采购任务管理</title>
|
|
|
|
|
|
{{template "document-head" .}}
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
|
|
|
{{template "site-header" .}}
|
|
|
|
|
|
<main id="main-content" class="page">
|
|
|
|
|
|
<div class="title-row">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<h1>ERP 货运</h1>
|
|
|
|
|
|
<p class="subtitle">核对已同步的货运单和全部商品明细</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<a class="button primary" href="/freight/import">导入货运单</a>
|
|
|
|
|
|
</div>
|
2026-07-29 12:11:56 +08:00
|
|
|
|
{{if .Notice}}<div class="notice" role="status">{{.Notice}}</div>{{end}}
|
2026-07-29 15:34:51 +08:00
|
|
|
|
<section class="table-region freight-region" aria-labelledby="freight-table-title">
|
2026-07-28 23:26:34 +08:00
|
|
|
|
<h2 id="freight-table-title" class="visually-hidden">货运单列表</h2>
|
|
|
|
|
|
{{if .Orders}}
|
2026-07-29 15:34:51 +08:00
|
|
|
|
<table class="freight-table freight-list-table">
|
2026-07-28 23:26:34 +08:00
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
2026-07-29 15:34:51 +08:00
|
|
|
|
<th scope="col">货运单</th>
|
|
|
|
|
|
<th scope="col">商品摘要</th>
|
2026-07-28 23:26:34 +08:00
|
|
|
|
<th scope="col">店铺</th>
|
|
|
|
|
|
<th scope="col">状态</th>
|
|
|
|
|
|
<th scope="col">更新时间</th>
|
|
|
|
|
|
<th scope="col"><span class="visually-hidden">操作</span></th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
{{range .Orders}}
|
|
|
|
|
|
<tr>
|
2026-07-29 15:34:51 +08:00
|
|
|
|
<td data-label="货运单">
|
|
|
|
|
|
<div class="freight-media">
|
|
|
|
|
|
{{if .PreviewImageURL}}
|
|
|
|
|
|
<img class="freight-thumb freight-thumb-list" src="{{.PreviewImageURL}}"
|
|
|
|
|
|
width="56" height="56" loading="lazy" decoding="async"
|
|
|
|
|
|
alt="{{if .PreviewTitle}}{{.PreviewTitle}}{{else}}货运商品{{end}}图片">
|
|
|
|
|
|
{{else}}
|
|
|
|
|
|
<span class="freight-thumb freight-thumb-list freight-thumb-placeholder"
|
|
|
|
|
|
aria-label="{{imageStatusLabel .PreviewImageStatus}}">
|
|
|
|
|
|
{{imageStatusLabel .PreviewImageStatus}}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
{{end}}
|
|
|
|
|
|
<span class="freight-media-copy">
|
|
|
|
|
|
<strong>{{if .SourceCode}}{{.SourceCode}}{{else}}{{.ExternalStockID}}{{end}}</strong>
|
|
|
|
|
|
<span class="secondary">ERP ID:{{.ExternalStockID}}</span>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td data-label="商品摘要">
|
|
|
|
|
|
<strong class="freight-product-title">{{if .PreviewTitle}}{{.PreviewTitle}}{{else}}未提供商品标题{{end}}</strong>
|
|
|
|
|
|
<span class="secondary">共 {{.ItemCount}} 项</span>
|
2026-07-28 23:26:34 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
<td data-label="店铺">{{if .ShopName}}{{.ShopName}}{{else}}未提供{{end}}</td>
|
|
|
|
|
|
<td data-label="状态">
|
|
|
|
|
|
<span class="secondary">订单:{{if .OrderStatus}}{{.OrderStatus}}{{else}}未提供{{end}}</span>
|
|
|
|
|
|
<span class="secondary">采购:{{if .PurchaseStatus}}{{.PurchaseStatus}}{{else}}未提供{{end}}</span>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td data-label="更新时间"><time datetime="{{machineTime .UpdatedAt}}">{{displayTime .UpdatedAt}}</time></td>
|
|
|
|
|
|
<td data-label="操作"><a class="detail-link" href="/freight/{{pathPart .ID}}">查看详情</a></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
{{end}}
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
{{else}}
|
|
|
|
|
|
<div class="empty-state">
|
|
|
|
|
|
<h2>尚未导入货运单</h2>
|
|
|
|
|
|
<p>按完整单号创建第一条 ERP 同步任务。</p>
|
|
|
|
|
|
<a class="button primary" href="/freight/import">导入货运单</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{{end}}
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</main>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|
|
|
|
|
|
{{end}}
|