@@ -4,31 +4,24 @@
|
||||
<div class="toolbar">
|
||||
<form class="inline grow" method="post" action="/shops/create">
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
||||
<label for="display-name">业务店铺</label>
|
||||
<input id="display-name" type="text" name="display_name" maxlength="500" required placeholder="页面统一显示名称">
|
||||
<label for="syb-alias">SYB 名称</label>
|
||||
<input id="syb-alias" type="text" name="syb_alias" maxlength="500" placeholder="与 SYB shopName 完全一致">
|
||||
<label for="shopee-alias">蝦皮名称</label>
|
||||
<input id="shopee-alias" type="text" name="shopee_alias" maxlength="500" placeholder="与导入店铺名完全一致">
|
||||
<label for="shop-name">店铺名称</label>
|
||||
<input id="shop-name" type="text" name="shop_name" maxlength="500" required placeholder="与 SYB 和蝦皮店铺名称完全一致">
|
||||
<button type="submit" class="primary">新增并启用</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{if .Message}}<p class="hint" role="status">{{.Message}}</p>{{end}}
|
||||
{{if .Error}}<p class="missing" role="alert">{{.Error}}</p>{{end}}
|
||||
<p class="hint">业务店铺是统一名称;SYB 和蝦皮名称是各渠道原始名称。系统只做忽略首尾空白后的精确匹配,不会模糊猜测。当前有 {{.UnlinkedShopeeCount}} 个蝦皮商品待关联。</p>
|
||||
<p class="hint">同一个名称用于 SYB 同步过滤和蝦皮商品关联。系统只忽略首尾空白并做精确匹配,不会模糊猜测。<a href="/shopee?unlinked=1">未登记商品 {{.UnlinkedShopeeCount}} 个</a>。</p>
|
||||
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead><tr><th>业务店铺</th><th>全局状态</th><th>SYB 名称</th><th>SYB 同步</th><th>蝦皮名称</th><th>蝦皮商品</th><th>更新时间</th><th>操作</th></tr></thead>
|
||||
<thead><tr><th>店铺名称</th><th>状态</th><th>蝦皮商品</th><th>更新时间</th><th>操作</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Rows}}
|
||||
<tr>
|
||||
<td><input name="display_name" value="{{.DisplayName}}" maxlength="500" required form="shop-edit-{{.ShopID}}"></td>
|
||||
<td><input name="shop_name" value="{{.DisplayName}}" maxlength="500" required form="shop-edit-{{.ShopID}}"></td>
|
||||
<td>{{if .Enabled}}启用{{else}}停用{{end}}</td>
|
||||
<td><input name="syb_alias" value="{{.SybAlias}}" maxlength="500" placeholder="未配置" form="shop-edit-{{.ShopID}}"></td>
|
||||
<td>{{if .SybAlias}}{{if and .Enabled .SybSyncEnabled}}同步{{else}}不进入同步{{end}}{{else}}—{{end}}</td>
|
||||
<td><input name="shopee_alias" value="{{.ShopeeAlias}}" maxlength="500" placeholder="未配置" form="shop-edit-{{.ShopID}}"></td>
|
||||
<td>{{.ShopeeProductCount}}</td>
|
||||
<td>{{.UpdatedAt}}</td>
|
||||
<td>
|
||||
@@ -40,12 +33,6 @@
|
||||
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}"><input type="hidden" name="shop_id" value="{{.ShopID}}"><input type="hidden" name="enabled" value="{{if .Enabled}}0{{else}}1{{end}}">
|
||||
<button type="submit">{{if .Enabled}}停用店铺{{else}}启用店铺{{end}}</button>
|
||||
</form>
|
||||
{{if .SybAlias}}
|
||||
<form class="inline" method="post" action="/shops/syb-status">
|
||||
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}"><input type="hidden" name="shop_id" value="{{.ShopID}}"><input type="hidden" name="enabled" value="{{if .SybSyncEnabled}}0{{else}}1{{end}}">
|
||||
<button type="submit">{{if .SybSyncEnabled}}停用 SYB{{else}}启用 SYB{{end}}</button>
|
||||
</form>
|
||||
{{end}}
|
||||
{{if not .Enabled}}
|
||||
<form class="inline" method="post" action="/shops/delete" data-confirm-submit="确定删除停用店铺“{{.DisplayName}}”吗?有关联商品或货运单时系统会拒绝删除。">
|
||||
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}"><input type="hidden" name="shop_id" value="{{.ShopID}}"><button type="submit" class="danger">删除</button>
|
||||
@@ -54,11 +41,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr class="empty"><td colspan="8">还没有业务店铺。至少填写一个渠道名称后即可新增。</td></tr>
|
||||
<tr class="empty"><td colspan="5">还没有店铺。填写与 SYB、蝦皮数据一致的店铺名称即可新增。</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="statusbar"><span class="grow"></span><span>共 {{len .Rows}} 个业务店铺</span></div>
|
||||
<div class="statusbar"><span class="grow"></span><span>共 {{len .Rows}} 个店铺</span></div>
|
||||
{{template "footer" .}}
|
||||
{{end}}
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
<form method="post" action="/shopee/save" class="form-stack">
|
||||
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
|
||||
<input type="hidden" name="shopee_goods_id" value="{{.GoodsID}}">
|
||||
<input type="hidden" name="list_goods_id" value="{{$.Keyword}}">
|
||||
<input type="hidden" name="list_shop_name" value="{{$.ShopNameKeyword}}">
|
||||
<input type="hidden" name="q" value="{{$.Keyword}}">
|
||||
<input type="hidden" name="search_field" value="{{$.SearchField}}">
|
||||
<input type="hidden" name="status" value="{{$.StatusFilter}}">
|
||||
<input type="hidden" name="shop" value="{{$.ShopFilter}}">
|
||||
<input type="hidden" name="image" value="{{$.ImageFilter}}">
|
||||
<input type="hidden" name="deleted" value="{{if $.DeletedFilter}}1{{end}}">
|
||||
<input type="hidden" name="unlinked" value="{{if $.UnlinkedFilter}}1{{end}}">
|
||||
<input type="hidden" name="page" value="{{$.CurrentPage}}">
|
||||
<div class="field">
|
||||
<label for="shopee-pdd-url">PDD 商品链接</label>
|
||||
@@ -45,11 +45,11 @@
|
||||
<form method="post" action="/shopee/collect" class="inline">
|
||||
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
|
||||
<input type="hidden" name="shopee_goods_id" value="{{.GoodsID}}">
|
||||
<input type="hidden" name="list_goods_id" value="{{$.Keyword}}">
|
||||
<input type="hidden" name="list_shop_name" value="{{$.ShopNameKeyword}}">
|
||||
<input type="hidden" name="q" value="{{$.Keyword}}">
|
||||
<input type="hidden" name="search_field" value="{{$.SearchField}}">
|
||||
<input type="hidden" name="status" value="{{$.StatusFilter}}">
|
||||
<input type="hidden" name="shop" value="{{$.ShopFilter}}">
|
||||
<input type="hidden" name="image" value="{{$.ImageFilter}}">
|
||||
<input type="hidden" name="deleted" value="{{if $.DeletedFilter}}1{{end}}">
|
||||
<input type="hidden" name="unlinked" value="{{if $.UnlinkedFilter}}1{{end}}">
|
||||
<input type="hidden" name="page" value="{{$.CurrentPage}}">
|
||||
{{if .CanCollect}}
|
||||
<button type="submit">{{if eq .CollectStatus "failed"}}重新创建采集任务{{else}}创建采集任务{{end}}</button>
|
||||
|
||||
@@ -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