Files
cmautobuy/admin/templates/task/detail_modal.html
T

94 lines
3.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{define "task/detail_modal"}}
{{/* 双击一行时弹出的内容。
这是一个**片段**,不是整页——外面的弹窗壳子在 task/list.html 里。
`[必须]` 字段只读:弹窗不直接改派、重试、取消或复制旧任务;失败/取消采购
只允许导航回原顺运宝明细重新确认,见 #186。采购专有字段在采集任务这里
**整段隐藏**,不显示空行。 */}}
{{with .D}}
<div class="modal-head">
<h2>任务 {{.TaskID}}</h2>
<button type="button" class="modal-x" data-modal-close aria-label="关闭">×</button>
</div>
<div class="modal-body">
<dl class="detail">
<dt>类型</dt><dd>{{.TypeText}}</dd>
<dt>执行模式</dt><dd>{{.ExecutionModeText}}</dd>
<dt>状态</dt><dd>{{.StatusText}}</dd>
<dt>客户端名称</dt><dd>{{.ClientText}}</dd>
<dt>客户端 ID</dt><dd>{{.ClientIDText}}</dd>
<dt>创建人</dt><dd>{{.CreatorText}}</dd>
<dt>领取时间</dt><dd>{{.ClaimedAt}}</dd>
<dt>完成时间</dt><dd>{{.FinishedAt}}</dd>
</dl>
{{if .IsPurchase}}
<h3>来源信息</h3>
<dl class="detail">
<dt>蝦皮订单号</dt><dd>{{.ShopeeOrderNo}}</dd>
<dt>顺运宝明细 ID</dt><dd>{{.SybID}}</dd>
<dt>蝦皮商品 ID</dt><dd>{{.ShopeeGoodsID}}</dd>
<dt>PDD 商品 ID</dt><dd>{{.PddGoodsID}}</dd>
</dl>
{{end}}
<h3>执行参数</h3>
<dl class="detail">
<dt>PDD 链接</dt>
<dd><a href="{{.PddGoodsURL}}" target="_blank" rel="noopener noreferrer">{{.PddGoodsURL}}</a></dd>
<dt>PDD 店铺</dt><dd>{{.PddShopText}}</dd>
{{/* 下面三项只有采购任务才有;采集任务这里整段不出现,不显示空行 */}}
{{if .IsPurchase}}
<dt>目标规格</dt><dd>{{.SpecText}}</dd>
<dt>数量</dt><dd>{{.QuantityText}}</dd>
<dt>订单总价上限</dt><dd>{{.PriceLimitText}}</dd>
{{end}}
</dl>
{{if .IsPurchase}}
<h3>PDD 核单结果</h3>
{{if .HasPddOrder}}
<dl class="detail">
<dt>PDD 订单编号</dt><dd>{{.PddOrderNo}}</dd>
<dt>下单时间</dt><dd>{{.PddOrderedAt}}</dd>
<dt>上报时付款状态</dt><dd>{{.PddPaymentStatusText}}</dd>
</dl>
<p class="hint">{{.PddOrderResultText}}</p>
{{else}}
<p class="hint">{{.PddOrderResultText}}</p>
{{end}}
{{end}}
{{if .HasError}}
<h3>错误</h3>
<dl class="detail">
<dt>错误码</dt><dd>{{.ErrorCode}}</dd>
<dt>错误说明</dt><dd>{{.ErrorMessage}}</dd>
</dl>
{{end}}
{{if .HasResult}}
{{/* 完整结果默认折叠,避免一进来就糊一屏 JSON;超长时已经在 service 层
截断过,这里如实告诉操作员被截断了。 */}}
<details>
<summary>完整结果(result_data)</summary>
<pre class="result-data">{{.ResultData}}{{if .ResultTruncated}}……(已截断,仅显示前 4000 字符){{end}}</pre>
</details>
{{end}}
</div>
<div class="modal-foot">
{{if .HasSybSource}}
<span class="grow"></span>
<a class="button-link" href="{{.ViewSybURL}}">查看原货运单</a>
{{if .CanRecreatePurchase}}
<a class="button-link primary" href="{{.RecreatePurchaseURL}}">重新创建采购任务</a>
{{end}}
{{end}}
<button type="button" data-modal-close>关闭</button>
</div>
{{end}}
{{end}}