feat: 100처방 UI, 처방 가감 표시, 어울림 스타일링

- 처방 관리 페이지에 100처방 원방 마스터 섹션 추가 (검색 포함)
- 100처방 상세 모달 (구성약재, 참고자료 편집, 내 처방으로 등록)
- 내 처방 목록에 100처방 뱃지 및 가감 정보 표시
  - 변경: 파란 뱃지, 추가: 초록 뱃지, 제거: 빨간 뱃지
  - 원방 그대로: 회색 뱃지
- "어울림" 접두어 초록색 볼드 스타일링
- stock_ledger에 RETURN(반환)/DISCARD(폐기) 한글 라벨 추가
- 수동입고 원산지 드롭다운 변경, 재고 상세 유통기한 표시

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 14:15:44 +00:00
parent 51e0c99c77
commit 1679f75d33
2 changed files with 612 additions and 35 deletions

View File

@@ -355,13 +355,17 @@
<!-- Formulas Page -->
<div id="formulas" class="main-content">
<!-- 내 처방 목록 -->
<div class="d-flex justify-content-between align-items-center mb-4">
<h3>처방 관리</h3>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#formulaModal">
<i class="bi bi-plus-circle"></i> 새 처방 등록
</button>
</div>
<div class="card">
<div class="card mb-4">
<div class="card-header bg-white">
<h6 class="mb-0"><i class="bi bi-journal-medical"></i> 내 처방 목록</h6>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
@@ -380,6 +384,35 @@
</table>
</div>
</div>
<!-- 100처방 원방 마스터 -->
<div class="card">
<div class="card-header bg-white d-flex justify-content-between align-items-center">
<h6 class="mb-0"><i class="bi bi-book"></i> 100처방 원방 마스터 <span class="badge bg-secondary" id="officialFormulaCount">0</span></h6>
<div style="width: 300px;">
<input type="text" class="form-control form-control-sm" id="officialFormulaSearch"
placeholder="처방명/출전 검색...">
</div>
</div>
<div class="card-body p-0">
<div class="table-responsive" style="max-height: 500px; overflow-y: auto;">
<table class="table table-hover table-sm mb-0">
<thead class="table-light" style="position: sticky; top: 0; z-index: 1;">
<tr>
<th width="60">연번</th>
<th>처방명</th>
<th>한자명</th>
<th>출전</th>
<th width="80">상태</th>
</tr>
</thead>
<tbody id="officialFormulasList">
<!-- Dynamic content -->
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Compound Page -->
@@ -1667,6 +1700,78 @@
</div>
</div>
<!-- 100처방 상세/참고자료 모달 -->
<div class="modal fade" id="officialFormulaModal" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header bg-info text-white">
<h5 class="modal-title">
<i class="bi bi-book"></i>
<span id="ofModalNumber"></span>. <span id="ofModalName"></span>
<small id="ofModalHanja" class="ms-2"></small>
</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label fw-bold">출전</label>
<p id="ofModalSource" class="text-muted">-</p>
</div>
<div class="col-md-6">
<label class="form-label fw-bold">한자명</label>
<input type="text" class="form-control form-control-sm" id="ofEditHanja" placeholder="예: 加味溫膽湯">
</div>
</div>
<div class="mb-3">
<label class="form-label fw-bold">설명/효능</label>
<textarea class="form-control" id="ofEditDescription" rows="2" placeholder="처방의 주요 효능..."></textarea>
</div>
<!-- 원방 구성 약재 -->
<div class="mb-3" id="ofIngredientsSection" style="display:none;">
<label class="form-label fw-bold">
<i class="bi bi-list-ul"></i> 원방 구성
<span class="badge bg-secondary ms-1" id="ofIngredientCount">0</span>
<span class="badge bg-primary ms-1" id="ofTotalGrams">0</span>g/첩
</label>
<div class="table-responsive" style="max-height: 300px; overflow-y: auto;">
<table class="table table-sm table-hover mb-0">
<thead class="table-light" style="position: sticky; top: 0;">
<tr>
<th width="40">#</th>
<th>약재명</th>
<th width="80" class="text-end">첩당</th>
<th>역할</th>
</tr>
</thead>
<tbody id="ofIngredientsList">
</tbody>
</table>
</div>
</div>
<div class="mb-3">
<label class="form-label fw-bold">
<i class="bi bi-lightbulb"></i> 상담 참고자료
<small class="text-muted fw-normal">(OTC 대비 차별점, 구성 해설, 업셀링 포인트 등)</small>
</label>
<textarea class="form-control" id="ofEditReferenceNotes" rows="10"
placeholder="예: 경악전서의 가미패독산은 일반 패독산과 달리...&#10;&#10;• OTC 대비 차별점&#10;• 구성 약재 해설&#10;• 적응증 상세&#10;• 상담 시 활용 포인트"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" id="createFromOfficialBtn">
<i class="bi bi-plus-circle"></i> 내 처방으로 등록
</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<button type="button" class="btn btn-info text-white" id="saveOfficialFormulaBtn">
<i class="bi bi-check-lg"></i> 저장
</button>
</div>
</div>
</div>
</div>
<!-- Formula Detail Modal (처방 상세 모달) -->
<div class="modal fade" id="formulaDetailModal" tabindex="-1">
<div class="modal-dialog modal-xl">