fix: 采购价格上限按数量计算总价 (#181)
This commit is contained in:
@@ -230,18 +230,24 @@
|
||||
</select>
|
||||
{{if eq .PurchaseClientCount 0}}<small class="missing">当前账号没有可见的客户端,请先联系管理员绑定客户端。</small>{{else}}<small>所有当前账号可见的客户端均可指派;未就绪或离线客户端会等待其就绪后领取。</small>{{end}}
|
||||
</div>
|
||||
<p class="hint">价格上限单位是人民币元,默认取已映射 PDD 规格的采集价;不会使用顺运宝的台币售价。</p>
|
||||
<p class="hint">单价上限默认取已映射 PDD 规格的人民币采集价;订单总价上限按单价乘以顺运宝数量自动计算,不使用顺运宝的台币售价。</p>
|
||||
{{range .Rows}}
|
||||
<div class="purchase-confirm-row" data-purchase-row="{{.SybID}}" hidden>
|
||||
<div class="purchase-confirm-row" data-purchase-row="{{.SybID}}" data-purchase-quantity="{{.Quantity}}" hidden>
|
||||
<input type="hidden" name="ids" value="{{.SybID}}" disabled>
|
||||
<input type="hidden" name="mapping_option_key" value="{{.MappingOptionKey}}" disabled>
|
||||
<input type="hidden" name="context_version" value="{{.ContextVersion}}" disabled>
|
||||
<div><strong>{{.OrderNo}}</strong> · {{.Title}} × {{.Quantity}}</div>
|
||||
<div class="hint">顺运宝规格:{{.ProductSpec}}</div>
|
||||
<div><strong>已选 PDD 规格:</strong>{{.MappedPddChoice}}</div>
|
||||
<label>选定颜色的人民币价格上限(元)
|
||||
<input type="number" name="max_price_yuan" min="0.01" step="0.01" value="{{.DefaultMaxPrice}}" required disabled>
|
||||
</label>
|
||||
<label for="purchase-unit-price-{{.SybID}}">选定规格的人民币单价上限(元)</label>
|
||||
<input id="purchase-unit-price-{{.SybID}}" type="number" name="unit_price_limit_yuan"
|
||||
min="0.01" step="0.01" value="{{.DefaultUnitPrice}}" required disabled
|
||||
data-unit-price-input aria-describedby="purchase-price-help-{{.SybID}}">
|
||||
<p class="hint" id="purchase-price-help-{{.SybID}}">
|
||||
数量:{{.Quantity}} 件 · 订单总价上限:
|
||||
<output data-total-price-output aria-live="polite">{{if .DefaultTotalPrice}}¥{{.DefaultTotalPrice}}{{else}}—{{end}}</output>
|
||||
</p>
|
||||
<p class="hint">提交时后端会按最新数量重新计算订单总价上限。</p>
|
||||
</div>
|
||||
{{end}}
|
||||
<p class="missing" data-purchase-empty hidden>没有选择可采购的明细,请关闭后重新勾选。</p>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
这是一个**片段**,不是整页——外面的弹窗壳子在 task/list.html 里。
|
||||
|
||||
`[必须]` 只读:本工单不做改派、重试、取消,弹窗里不放对应的表单和按钮,
|
||||
见 #19。采购专有字段(目标规格/数量/价格上限)在采集任务这里
|
||||
见 #19。采购专有字段(目标规格/数量/订单总价上限)在采集任务这里
|
||||
**整段隐藏**,不显示空行。 */}}
|
||||
{{with .D}}
|
||||
<div class="modal-head">
|
||||
@@ -33,7 +33,7 @@
|
||||
{{if .IsPurchase}}
|
||||
<dt>目标规格</dt><dd>{{.SpecText}}</dd>
|
||||
<dt>数量</dt><dd>{{.QuantityText}}</dd>
|
||||
<dt>价格上限</dt><dd>{{.PriceLimitText}}</dd>
|
||||
<dt>订单总价上限</dt><dd>{{.PriceLimitText}}</dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user