Files
order_system/po_app/templates/order_new.html
T

36 lines
1.6 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.
{% extends "base.html" %}
{% block body %}
<h1 class="page">新建订单</h1>
<div class="card">
<div class="hint">先选单据类型与供应商,系统会带出供应商资料并生成单号,下一步填写物料明细。</div>
<form method="post">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="request_key" value="{{ request_key() }}">
<div class="form-grid two">
<div>
<label>单据类型</label>
<select name="doc_type">
{% for k, v in DOC_TYPES.items() %}<option value="{{ k }}">{{ v }}</option>{% endfor %}
</select>
</div>
<div>
<label>供应商(留空则手工填写)</label>
<input type="search" id="supplierSearch" placeholder="搜索名称、简称或编号" aria-label="搜索供应商">
<select name="supplier_id" id="supplierPickNew" style="margin-top:4px;">
<option value="">-- 手工填写 --</option>
{% for s in suppliers %}
<option value="{{ s.id }}" data-search="{{ s.short_name or '' }} {{ s.code or '' }}">{{ s.name }}{{ '(' ~ s.short_name ~ ')' if s.short_name else '' }}</option>
{% endfor %}
</select>
</div>
</div>
<div style="margin-top:16px;">
<button class="btn primary">创建并填写明细</button>
<a class="btn" href="{{ url_for('orders') }}">取消</a>
</div>
</form>
</div>
<script src="{{ url_for('static', filename='search_select.js') }}"></script>
<script>POFilterSelect.bind(document.getElementById('supplierSearch'), document.getElementById('supplierPickNew'));</script>
{% endblock %}