合约代码改为下拉选择月份,名称简化为年月
This commit is contained in:
@@ -140,12 +140,17 @@
|
||||
<form method="post" action="/admin/contract" style="display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;">
|
||||
<input type="hidden" name="product_id" value="{{ p.id }}">
|
||||
<div class="form-group" style="margin-bottom:0;flex:1;min-width:140px;">
|
||||
<label>合约代码 <span style="font-weight:400;color:var(--sub);font-size:0.75rem;">品种代码 + 月份</span></label>
|
||||
<input type="text" name="code" required placeholder="如 {{ p.code }}2609" maxlength="10" style="text-transform:uppercase;">
|
||||
<label>合约代码</label>
|
||||
<select name="code" required style="text-transform:uppercase;">
|
||||
<option value="">-- 选择月份 --</option>
|
||||
{% for ym in ['2609','2610','2611','2612','2701','2702','2703','2704','2705','2706','2707','2708'] %}
|
||||
<option value="{{ p.code }}{{ ym }}">{{ p.code }}{{ ym }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom:0;flex:2;min-width:160px;">
|
||||
<label>合约名称 <span style="font-weight:400;color:var(--sub);font-size:0.75rem;">品种名 + 月份</span></label>
|
||||
<input type="text" name="name" required placeholder="如 {{ p.name }}2609">
|
||||
<div class="form-group" style="margin-bottom:0;flex:1;min-width:100px;">
|
||||
<label>名称</label>
|
||||
<input type="text" name="name" required placeholder="2609" maxlength="4" style="text-transform:uppercase;">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">添加合约</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user