feat: 重构顺运宝规格主链路 (#88)
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
聚合成商品级之后,"部分失败"的行光看数字是正常的,
|
||||
不加这一列坏数据就会被悄悄吃掉,见 #41。 */}}
|
||||
<th>待补</th>
|
||||
<th>来源</th>
|
||||
<th>PDD 链接</th>
|
||||
<th>采集状态</th>
|
||||
<th>更新时间</th>
|
||||
@@ -69,13 +70,14 @@
|
||||
<td>{{.SizeCount}}</td>
|
||||
<td>{{.SKUCount}}</td>
|
||||
<td>{{.PendingCount}}</td>
|
||||
<td>{{.SourceText}}</td>
|
||||
<td{{if .PddMissing}} class="missing"{{end}}>{{.PddURL}}</td>
|
||||
<td>{{.StatusText}}</td>
|
||||
<td>{{.UpdatedAt}}</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr class="empty">
|
||||
<td colspan="10">
|
||||
<td colspan="11">
|
||||
{{if .IsFiltered}}
|
||||
没有匹配的数据,换个商品 ID 或商品名称试试。
|
||||
{{else}}
|
||||
|
||||
@@ -11,39 +11,13 @@
|
||||
<dl class="detail">
|
||||
<dt>明细 ID</dt><dd>{{.SybID}}</dd>
|
||||
<dt>商品</dt><dd>{{.Title}}</dd>
|
||||
<dt>顺运宝规格</dt><dd>{{.ProductSpec}}</dd>
|
||||
<dt>顺运宝规格</dt><dd>{{if .ProductSpec}}{{.ProductSpec}}{{else}}—{{end}}</dd>
|
||||
<dt>数量</dt><dd>{{.Quantity}}</dd>
|
||||
<dt>蝦皮商品 ID</dt><dd>{{.ShopeeGoodsID}}</dd>
|
||||
<dt>蝦皮规格 ID</dt><dd>{{if .ShopeeSKUID}}{{.ShopeeSKUID}}{{else}}—{{end}}</dd>
|
||||
</dl>
|
||||
|
||||
{{if not .ShopeeExists}}
|
||||
<p class="missing">蝦皮数据中找不到商品 {{.ShopeeGoodsID}}。请先导入该商品,或核对顺运宝商品链接提取出的 ID。</p>
|
||||
<p><a class="button-link" href="/shopee?goods_id={{.ShopeeGoodsID}}">到蝦皮数据查看</a></p>
|
||||
{{else if and (not .ShopeeSKUID) (not .Candidates)}}
|
||||
<p class="missing">这个蝦皮商品没有可选 SKU。请先在蝦皮数据中补充规格。</p>
|
||||
<p><a class="button-link" href="/shopee?goods_id={{.ShopeeGoodsID}}">到蝦皮数据补充</a></p>
|
||||
{{else if not .ShopeeSKUID}}
|
||||
<form method="post" action="/syb/select-sku" class="form-stack">
|
||||
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
|
||||
<input type="hidden" name="syb_id" value="{{.SybID}}">
|
||||
<input type="hidden" name="order_no" value="{{$.Keyword}}">
|
||||
<input type="hidden" name="stage" value="{{$.StageFilter}}">
|
||||
<input type="hidden" name="page" value="{{$.CurrentPage}}">
|
||||
<div class="field">
|
||||
<label for="syb-shopee-sku">蝦皮规格</label>
|
||||
<select id="syb-shopee-sku" name="shopee_sku_id" required autofocus>
|
||||
<option value="">请选择</option>
|
||||
{{range .Candidates}}
|
||||
<option value="{{.SKUID}}" {{if .Selected}}selected{{end}}>{{.SpecRaw}}({{.Color}} / {{.Size}},ID {{.SKUID}})</option>
|
||||
{{end}}
|
||||
</select>
|
||||
<small>系统只会自动采用唯一精确候选;这里的选择仍会由服务端校验是否属于当前商品。</small>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="primary">确认蝦皮规格</button>
|
||||
</div>
|
||||
</form>
|
||||
{{if eq .Stage "spec_missing"}}
|
||||
<p class="missing" role="alert">顺运宝没有提供规格原文,系统无法安全判断要采购的颜色和尺码。请先核对上游货运单数据。</p>
|
||||
{{else}}
|
||||
<h3>关联采购商品</h3>
|
||||
<form method="post" action="/syb/associate-pdd" class="form-stack">
|
||||
@@ -87,14 +61,14 @@
|
||||
<input type="hidden" name="stage" value="{{$.StageFilter}}">
|
||||
<input type="hidden" name="page" value="{{$.CurrentPage}}">
|
||||
<div class="field">
|
||||
<label for="syb-pdd-option">蝦皮 {{.ProductSpec}} 对应的 PDD 规格</label>
|
||||
<label for="syb-pdd-option">顺运宝 {{.ProductSpec}} 对应的 PDD 规格</label>
|
||||
<select id="syb-pdd-option" name="pdd_option_key" required>
|
||||
<option value="">请选择,不做相似规格猜测</option>
|
||||
{{range .PddChoices}}
|
||||
<option value="{{.Key}}" {{if .Selected}}selected{{end}}>{{.Label}} · {{.PriceText}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
<small>PDD 维度来自采集结果:{{range $i, $name := .PddDimensionNames}}{{if $i}} / {{end}}{{$name}}{{end}}。保存后相同蝦皮 SKU + 当前 PDD 商品会复用。</small>
|
||||
<small>PDD 维度来自采集结果:{{range $i, $name := .PddDimensionNames}}{{if $i}} / {{end}}{{$name}}{{end}}。保存后相同蝦皮商品 + 顺运宝规格 + 当前 PDD 商品会复用。</small>
|
||||
</div>
|
||||
{{if and (not .MappingValid) .PddChoices}}<p class="missing">尚无有效映射,或原映射已不在最新采集结果中,请重新选择。</p>{{end}}
|
||||
<div><button type="submit" class="primary">保存规格映射</button></div>
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
<th>商品标题</th>
|
||||
<th>规格</th>
|
||||
<th>蝦皮商品 ID</th>
|
||||
<th>规格 SKU</th>
|
||||
<th>数量</th>
|
||||
<th>价格</th>
|
||||
<th>图片</th>
|
||||
@@ -112,7 +111,6 @@
|
||||
<td class="truncate" title="{{.Title}}">{{.Title}}</td>
|
||||
<td class="truncate" title="{{.ProductSpec}}">{{.ProductSpec}}</td>
|
||||
<td>{{.ShopeeGoodsID}}</td>
|
||||
<td>{{if .ShopeeSKUID}}{{.ShopeeSKUID}}{{else}}—{{end}}</td>
|
||||
<td>{{.Quantity}}</td>
|
||||
<td>{{.PriceText}}</td>
|
||||
<td>
|
||||
@@ -124,7 +122,7 @@
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr class="empty">
|
||||
<td colspan="13">
|
||||
<td colspan="12">
|
||||
{{if .IsFiltered}}
|
||||
当前筛选条件下没有货运单明细。<br>
|
||||
<small>换个订单号或清空搜索词再试。<a href="/syb">查看全部</a></small>
|
||||
|
||||
Reference in New Issue
Block a user