feat(performance): upload manual-input sales from an Excel file

- [엑셀 업로드] button on the daily x marketplace table opens a popup with
  a sample download (module upload_sample.xlsx) and a file picker
- Format: column 1 = date, columns 2+ = marketplace names as headers
  (setting name / short name / code, spaces and case ignored)
- Only filled cells of marketplaces with manual input ON are saved
  (overwrite same day, blank cells keep existing values); other columns
  are skipped and reported
- Any bad cell (not a number, unreadable/future date, duplicate day) rejects
  the whole file with cell references; saving is one transaction
- Ignore Excel lock files (~$*)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-13 04:58:00 +09:00
parent 410d4fe05c
commit 1d3573a44a
13 changed files with 503 additions and 8 deletions
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/performance.css?v=20261012c" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/performance.css?v=20261013a" />{% endblock %}
{%- macro won(v) -%}
{%- if v is none -%}<span class="perf-na"></span>
@@ -107,6 +107,10 @@
<div class="erp-card perf-card">
<div class="perf-card-head">
<h2 class="perf-h">{% if period_kind == 'year' %}월별 × 쇼핑몰{% else %}일자별 × 쇼핑몰{% endif %}</h2>
{% if manual_upload_names %}
<button type="button" class="erp-btn erp-btn-outline erp-btn-sm perf-manual-upload-btn" id="perf-manual-upload"
title="수동 입력 쇼핑몰 매출을 엑셀 파일로 한 번에 입력">엑셀 업로드</button>
{% endif %}
<div class="perf-metric" role="group" aria-label="표시 기준">
<button type="button" class="perf-seg" data-metric="gross">총매출</button>
<button type="button" class="perf-seg" data-metric="commission">수수료</button>
@@ -246,8 +250,9 @@
"period_kind": period_kind,
"period_start": period.start.isoformat(),
"period_end": period.end.isoformat(),
"today": today
"today": today,
"manual_upload_names": manual_upload_names
} | tojson }}</script>
{% endblock %}
{% block scripts %}<script src="/static/performance.js?v=20261012b" defer></script>{% endblock %}
{% block scripts %}<script src="/static/performance.js?v=20261013a" defer></script>{% endblock %}