You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
3.6 KiB
71 lines
3.6 KiB
{% set quick_entry_gift_method_id = default_gift_method_id or household.gift_method_option_id %}
|
|
{% set quick_entry_gift_scene_id = default_gift_scene_id or household.gift_scene_option_id %}
|
|
{% set modal_mode = modal_mode|default(false) %}
|
|
|
|
<form
|
|
id="quick-entry-household-edit-form"
|
|
action="{{ url_for('quick_entry.update_household', household_id=household.id) }}"
|
|
method="post"
|
|
class="space-y-4"
|
|
>
|
|
<input type="hidden" name="version" value="{{ household.version }}">
|
|
<input type="hidden" name="q" value="{{ search_term }}">
|
|
<input type="hidden" name="include_bride_side" value="{{ '1' if include_bride_side else '0' }}">
|
|
<input type="hidden" name="phone" value="{{ household.phone or '' }}">
|
|
<input type="hidden" name="attendance_status" value="attending">
|
|
<input type="hidden" name="actual_attendee_count" value="{{ household.actual_attendee_count }}">
|
|
<input type="hidden" name="child_count" value="{{ household.child_count }}">
|
|
<input type="hidden" name="red_packet_child_count" value="{{ household.red_packet_child_count }}">
|
|
<input type="hidden" name="gift_method_option_id" value="{{ quick_entry_gift_method_id or '' }}">
|
|
<input type="hidden" name="gift_scene_option_id" value="{{ quick_entry_gift_scene_id or '' }}">
|
|
<input type="hidden" name="favor_status" value="{{ household.favor_status }}">
|
|
<input type="hidden" name="candy_status" value="{{ household.candy_status }}">
|
|
<input type="hidden" name="child_red_packet_status" value="{{ household.child_red_packet_status }}">
|
|
|
|
<div class="rounded-2xl border border-neutral-200 bg-white p-4 shadow-sm dark:border-neutral-700 dark:bg-neutral-900/70">
|
|
<label for="head_name" class="form-label">户主姓名</label>
|
|
<input
|
|
class="form-input"
|
|
id="head_name"
|
|
name="head_name"
|
|
type="text"
|
|
value="{{ household.head_name }}"
|
|
maxlength="80"
|
|
required
|
|
>
|
|
</div>
|
|
|
|
<div class="rounded-2xl border border-neutral-200 bg-white p-4 shadow-sm dark:border-neutral-700 dark:bg-neutral-900/70">
|
|
<label for="total_gift_amount" class="form-label">礼金金额</label>
|
|
<div class="relative">
|
|
<span class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-4 text-lg font-semibold text-accent-600 dark:text-accent-300">¥</span>
|
|
<input
|
|
class="form-input pl-10 text-lg font-semibold tabular-nums"
|
|
id="total_gift_amount"
|
|
name="total_gift_amount"
|
|
type="number"
|
|
min="0"
|
|
step="0.01"
|
|
value="{{ '%.2f'|format(household.total_gift_amount) }}"
|
|
placeholder="0.00"
|
|
inputmode="decimal"
|
|
autofocus
|
|
>
|
|
</div>
|
|
<p class="mt-2 text-xs text-neutral-500 dark:text-neutral-400">默认按现金方式、婚礼当天记录。</p>
|
|
</div>
|
|
|
|
<div class="rounded-2xl border border-neutral-200 bg-white p-4 shadow-sm dark:border-neutral-700 dark:bg-neutral-900/70">
|
|
<label for="note" class="form-label">备注</label>
|
|
<textarea class="form-textarea min-h-28" id="note" name="note" rows="4" placeholder="可选,补充来宾说明或礼金备注。">{{ household.note or '' }}</textarea>
|
|
</div>
|
|
|
|
<div class="flex flex-wrap items-center justify-end gap-3 pt-1">
|
|
{% if modal_mode %}
|
|
<button type="button" class="btn btn-secondary order-2 sm:order-1" data-quick-entry-modal-close>取消</button>
|
|
{% else %}
|
|
<a class="btn btn-secondary order-2 sm:order-1" href="{{ url_for('quick_entry.index', q=search_term) if search_term else url_for('quick_entry.index') }}">取消</a>
|
|
{% endif %}
|
|
<button type="submit" class="btn btn-primary min-w-36 order-1 sm:order-2">保存并返回搜索</button>
|
|
</div>
|
|
</form>
|
|
|