@@ -4,21 +4,24 @@
|
||||
{{/* ── 第一段:顶部工具条 ────────────────────────────── */}}
|
||||
<div class="toolbar">
|
||||
{{if .CurrentUser.IsAdmin}}<a class="button" href="/integrations/catalog">导入记录</a>{{end}}
|
||||
{{if .CurrentUser.IsAdmin}}
|
||||
{{if .DeletedFilter}}<a class="button-link" href="/shopee">返回正常商品</a>{{else}}<a class="button-link" href="/shopee?deleted=1">回收站</a>{{end}}
|
||||
{{end}}
|
||||
<form id="shopee-bulk-form" method="post" action="/shopee/collect-batch" hidden></form>
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="list_goods_id" value="{{.Keyword}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="list_shop_name" value="{{.ShopNameKeyword}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="q" value="{{.Keyword}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="search_field" value="{{.SearchField}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="status" value="{{.StatusFilter}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="shop" value="{{.ShopFilter}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="image" value="{{.ImageFilter}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="store" value="{{.StoreFilter}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="deleted" value="{{if .DeletedFilter}}1{{end}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="unlinked" value="{{if .UnlinkedFilter}}1{{end}}" form="shopee-bulk-form">
|
||||
<input type="hidden" name="page" value="{{.CurrentPage}}" form="shopee-bulk-form">
|
||||
{{if not .DeletedFilter}}
|
||||
<button type="button" data-modal-open="shopee-collect-modal" data-collect-open
|
||||
data-collect-form="shopee-bulk-form" data-need-checked>创建 PDD 采集任务</button>
|
||||
{{end}}
|
||||
<form class="inline grow" method="get" action="/shopee">
|
||||
{{if .DeletedFilter}}<input type="hidden" name="deleted" value="1">{{end}}
|
||||
{{if .UnlinkedFilter}}<input type="hidden" name="unlinked" value="1">{{end}}
|
||||
{{/* 状态筛选是刚需(找待补规格 / 找没填链接的),不是锦上添花,
|
||||
见 docs/admin/05-ui-specification.md §4.1、工单 #43。
|
||||
放在关键词前面:操作员大多是"看某一类"而不是"查某个 ID"。 */}}
|
||||
@@ -28,37 +31,14 @@
|
||||
<option value="{{.Value}}" {{if eq .Value $.StatusFilter}}selected{{end}}>{{.Text}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
<label for="shop">店铺</label>
|
||||
<select id="shop" name="shop">
|
||||
{{range .ShopOptions}}
|
||||
<option value="{{.Value}}" {{if eq .Value $.ShopFilter}}selected{{end}}>{{.Text}}</option>
|
||||
<label for="search-field">分类</label>
|
||||
<select id="search-field" name="search_field">
|
||||
{{range .SearchFieldOptions}}
|
||||
<option value="{{.Value}}" {{if eq .Value $.SearchField}}selected{{end}}>{{.Text}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
<label for="image">图片</label>
|
||||
<select id="image" name="image">
|
||||
{{range .ImageOptions}}
|
||||
<option value="{{.Value}}" {{if eq .Value $.ImageFilter}}selected{{end}}>{{.Text}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
<label for="store">业务店铺</label>
|
||||
<select id="store" name="store">
|
||||
<option value="" {{if eq .StoreFilter ""}}selected{{end}}>全部业务店铺</option>
|
||||
<option value="unlinked" {{if eq .StoreFilter "unlinked"}}selected{{end}}>待关联</option>
|
||||
{{range .StoreOptions}}
|
||||
<option value="{{.ShopID}}" {{if eq .ShopID $.StoreFilter}}selected{{end}}>{{.DisplayName}}{{if not .Enabled}}(已停用){{end}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
{{if .CurrentUser.IsAdmin}}
|
||||
<label for="deleted">数据范围</label>
|
||||
<select id="deleted" name="deleted">
|
||||
<option value="" {{if not .DeletedFilter}}selected{{end}}>正常商品</option>
|
||||
<option value="1" {{if .DeletedFilter}}selected{{end}}>已删除</option>
|
||||
</select>
|
||||
{{end}}
|
||||
<label for="q">商品 ID / 名称</label>
|
||||
<input id="q" class="shopee-search-field" type="text" name="goods_id" value="{{.Keyword}}" placeholder="商品 ID / 名称">
|
||||
<label for="shop-name">店铺名称</label>
|
||||
<input id="shop-name" class="shopee-search-field" type="text" name="shop_name" value="{{.ShopNameKeyword}}" placeholder="店铺名称">
|
||||
<label for="q">关键词</label>
|
||||
<input id="q" class="shopee-search-field" type="text" name="q" value="{{.Keyword}}" placeholder="请输入搜索关键词">
|
||||
<button type="submit">搜索</button>
|
||||
</form>
|
||||
|
||||
@@ -72,6 +52,8 @@
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{if .UnlinkedFilter}}<p class="hint" role="status">当前只显示尚未登记到店铺管理的蝦皮商品。<a href="/shopee">查看全部正常商品</a></p>{{end}}
|
||||
|
||||
{{/* ── 第二段:带勾选的表格 ──────────────────────────── */}}
|
||||
{{/* 一个商品一行(不是一个 SKU 一行),见工单 #41。
|
||||
双击行打开详情弹窗,见 static/js/app.js。 */}}
|
||||
@@ -83,8 +65,7 @@
|
||||
<th>商品 ID</th>
|
||||
<th>图片</th>
|
||||
<th>商品名称</th>
|
||||
<th>蝦皮店铺</th>
|
||||
<th>业务店铺</th>
|
||||
<th>店铺</th>
|
||||
<th>颜色</th>
|
||||
<th>尺码</th>
|
||||
{{/* SKU 数是这个商品报表里实际出现过的规格条数。
|
||||
@@ -112,7 +93,6 @@
|
||||
title 属性让悬停能看完整标题,收窄之后必须留着。 */}}
|
||||
<td class="truncate col-title" title="{{.Title}}">{{.Title}}</td>
|
||||
<td class="truncate col-shop" title="{{.ShopName}}">{{if .ShopName}}{{.ShopName}}{{else}}—{{end}}</td>
|
||||
<td class="truncate col-shop" title="{{.BusinessShopName}}">{{if .ShopUnlinked}}<span class="missing">待关联</span>{{else}}{{.BusinessShopName}}{{end}}</td>
|
||||
<td>{{.ColorCount}}</td>
|
||||
<td>{{.SizeCount}}</td>
|
||||
<td>{{.SKUCount}}</td>
|
||||
@@ -124,9 +104,9 @@
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr class="empty">
|
||||
<td colspan="14">
|
||||
<td colspan="13">
|
||||
{{if .IsFiltered}}
|
||||
当前筛选条件下没有商品。请调整状态、店铺、图片或商品 ID。<br>
|
||||
当前条件下没有商品。请调整状态、分类或关键词。<br>
|
||||
<small><a href="/shopee">清除筛选条件</a></small>
|
||||
{{else}}
|
||||
还没有数据。蝦皮与 PDD 对应数据由第三方脚本通过商品目录接口导入。<br>
|
||||
|
||||
Reference in New Issue
Block a user