feat: 실시간 POS 품목별 OTC 용법 라벨 인쇄 버튼 추가

POS 상세 패널:
- 품목 목록에 💊 인쇄 버튼 추가
- 프리셋 있으면 → 바로 인쇄
- 프리셋 없으면 → 새 창으로 등록 페이지 열기

API:
- /api/admin/pos-live/detail에 barcode 필드 추가

OTC 라벨 관리 페이지:
- URL 파라미터(barcode, name) 자동 처리
- POS에서 넘어올 때 자동으로 해당 약품 로드
This commit is contained in:
thug0bin
2026-03-02 17:14:45 +09:00
parent c154537c87
commit 887aba3a03
3 changed files with 103 additions and 3 deletions

View File

@@ -5070,14 +5070,15 @@ def api_admin_pos_live_detail(order_no):
mssql_conn = mssql_engine.raw_connection()
cursor = mssql_conn.cursor()
# 품목 상세 조회
# 품목 상세 조회 (바코드 포함)
cursor.execute("""
SELECT
S.DrugCode AS drug_code,
ISNULL(G.GoodsName, '(약품명 없음)') AS product_name,
S.SL_NM_item AS quantity,
S.SL_NM_cost_a AS unit_price,
S.SL_TOTAL_PRICE AS total_price
S.SL_TOTAL_PRICE AS total_price,
G.Barcode AS barcode
FROM SALE_SUB S
LEFT JOIN PM_DRUG.dbo.CD_GOODS G ON S.DrugCode = G.DrugCode
WHERE S.SL_NO_order = ?
@@ -5092,7 +5093,8 @@ def api_admin_pos_live_detail(order_no):
'product_name': row[1],
'quantity': int(row[2]) if row[2] else 0,
'unit_price': float(row[3]) if row[3] else 0,
'total_price': float(row[4]) if row[4] else 0
'total_price': float(row[4]) if row[4] else 0,
'barcode': row[5] or ''
})
return jsonify({