feat: 移除 Client 真实采购手工授权 (#114)

This commit is contained in:
chengma
2026-08-10 18:37:35 +08:00
parent 8188153b08
commit 10bb892e6c
29 changed files with 124 additions and 702 deletions
+5 -5
View File
@@ -171,10 +171,10 @@
<div class="field">
<label for="purchase-client">执行客户端</label>
<select id="purchase-client" name="client_id" required autofocus>
<option value="">请选择可执行真实采购的客户端</option>
{{range .AssignableClients}}<option value="{{.ClientID}}" {{if ne .PurchaseMode "live"}}disabled{{else if eq $.LivePurchaseClientCount 1}}selected{{end}}>{{.Name}}({{.ClientID}}){{if ne .PurchaseMode "live"}} — 未启用真实采购{{end}}</option>{{end}}
</select>
{{if eq .LivePurchaseClientCount 0}}<small class="missing">当前没有可执行真实采购的客户端。请先在 Client 设置页启用真实采购并重新登记。</small>{{else}}<small>离线客户端也可以提前指派,待其上线后领取。</small>{{end}}
<option value="">请选择执行客户端</option>
{{range .AssignableClients}}<option value="{{.ClientID}}" {{if eq $.PurchaseClientCount 1}}selected{{end}}>{{.Name}}({{.ClientID}}) — {{.Status}}</option>{{end}}
</select>
{{if eq .PurchaseClientCount 0}}<small class="missing">当前账号没有可见的客户端,请先联系管理员绑定客户端。</small>{{else}}<small>所有当前账号可见的客户端均可指派;未就绪或离线客户端会等待其就绪后领取。</small>{{end}}
</div>
<p class="hint">价格上限单位是人民币元,默认取已映射 PDD 规格的采集价;不会使用顺运宝的台币售价。</p>
{{range .Rows}}
@@ -194,7 +194,7 @@
</div>
<div class="modal-foot">
<button type="button" data-modal-close>取消</button>
<button type="submit" class="primary" data-purchase-submit {{if eq .LivePurchaseClientCount 0}}disabled{{end}}>创建真实采购任务</button>
<button type="submit" class="primary" data-purchase-submit {{if eq .PurchaseClientCount 0}}disabled{{end}}>创建真实采购任务</button>
</div>
</form>
</div>