Files
tk-factory-services/system1-factory/web/css/purchase-mobile.css
Hyungi Ahn cf75462380 feat(purchase): 소모품 신청 시스템 v2 — 모바일 최적화, 스마트 검색, 그룹화, 입고 알림
- 4단계 상태 플로우: pending → grouped → purchased → received
- 한국어 스마트 검색: 초성 매칭(ㅁㅈㄱ→면장갑), 별칭 테이블, 인메모리 캐시
- 모바일 전용 신청 페이지: 바텀시트 UI, FAB, 카드 리스트, 스크롤 페이지네이션
- 인라인 품목 등록: 미등록 품목 검색→등록→신청 단일 트랜잭션
- 관리자 그룹화: 체크박스 다중 선택, 구매 그룹(batch) 생성/일괄 구매/입고
- 입고 처리: 사진+보관위치 등록, 부분 입고 허용, batch 자동 상태 전환
- 알림: notifyHelper에 target_user_ids 추가, 구매진행중/입고완료 시 신청자 ntfy+push

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 09:21:20 +09:00

318 lines
6.5 KiB
CSS

/* purchase-mobile.css — 소모품 신청 모바일 전용 */
/* 메인 컨텐츠 (하단 네비 여유) */
.pm-content {
padding-bottom: calc(76px + env(safe-area-inset-bottom));
min-height: 100vh;
}
/* 상태 탭 */
.pm-tabs {
display: flex;
gap: 6px;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
padding: 8px 16px;
background: white;
border-bottom: 1px solid #e5e7eb;
}
.pm-tabs::-webkit-scrollbar { display: none; }
.pm-tab {
flex-shrink: 0;
padding: 6px 14px;
border-radius: 20px;
font-size: 13px;
font-weight: 500;
background: #f3f4f6;
color: #6b7280;
border: none;
cursor: pointer;
white-space: nowrap;
}
.pm-tab.active {
background: #ea580c;
color: white;
}
.pm-tab .tab-count {
margin-left: 4px;
font-size: 11px;
opacity: 0.8;
}
/* 카드 리스트 */
.pm-cards {
display: flex;
flex-direction: column;
gap: 8px;
padding: 12px 16px;
}
.pm-card {
background: white;
border: 1px solid #e5e7eb;
border-radius: 12px;
padding: 14px;
cursor: pointer;
transition: box-shadow 0.15s;
}
.pm-card:active { box-shadow: 0 0 0 2px rgba(234,88,12,0.2); }
.pm-card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 8px;
}
.pm-card-name {
font-size: 15px;
font-weight: 600;
color: #1f2937;
line-height: 1.3;
}
.pm-card-custom { font-size: 11px; color: #ea580c; margin-left: 4px; }
.pm-card-meta {
display: flex;
gap: 10px;
margin-top: 8px;
font-size: 12px;
color: #9ca3af;
}
.pm-card-qty { color: #374151; font-weight: 600; }
/* FAB */
.pm-fab {
position: fixed;
bottom: calc(84px + env(safe-area-inset-bottom));
right: 20px;
width: 56px;
height: 56px;
border-radius: 50%;
background: #ea580c;
color: white;
border: none;
box-shadow: 0 4px 12px rgba(234,88,12,0.35);
font-size: 24px;
cursor: pointer;
z-index: 30;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.15s;
}
.pm-fab:active { transform: scale(0.92); }
/* 바텀시트 */
.pm-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.4);
z-index: 100;
opacity: 0;
pointer-events: none;
transition: opacity 0.25s;
}
.pm-overlay.open { opacity: 1; pointer-events: auto; }
.pm-sheet {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: white;
border-radius: 16px 16px 0 0;
z-index: 101;
max-height: 92vh;
overflow-y: auto;
transform: translateY(100%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
padding-bottom: env(safe-area-inset-bottom);
}
.pm-sheet.open { transform: translateY(0); }
.pm-sheet-handle {
width: 36px;
height: 4px;
background: #d1d5db;
border-radius: 2px;
margin: 8px auto;
}
.pm-sheet-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 20px 8px;
}
.pm-sheet-title { font-size: 17px; font-weight: 700; color: #1f2937; }
.pm-sheet-close {
width: 32px;
height: 32px;
border: none;
background: #f3f4f6;
border-radius: 50%;
font-size: 16px;
color: #6b7280;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.pm-sheet-body { padding: 0 20px 20px; }
/* 검색 */
.pm-search-wrap { position: relative; margin-bottom: 12px; }
.pm-search-input {
width: 100%;
padding: 12px 40px 12px 14px;
border: 1.5px solid #e5e7eb;
border-radius: 10px;
font-size: 16px;
outline: none;
box-sizing: border-box;
}
.pm-search-input:focus { border-color: #ea580c; }
.pm-search-spinner {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
display: none;
}
.pm-search-spinner.show { display: block; }
.pm-search-results {
max-height: 200px;
overflow-y: auto;
border: 1px solid #e5e7eb;
border-radius: 8px;
display: none;
}
.pm-search-results.open { display: block; }
.pm-search-item {
padding: 10px 12px;
font-size: 14px;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
border-bottom: 1px solid #f3f4f6;
}
.pm-search-item:last-child { border-bottom: none; }
.pm-search-item:active { background: #fff7ed; }
.pm-search-item .match-type {
font-size: 10px;
padding: 1px 5px;
border-radius: 4px;
background: #f3f4f6;
color: #9ca3af;
flex-shrink: 0;
}
.pm-search-register {
padding: 10px 12px;
font-size: 14px;
cursor: pointer;
color: #ea580c;
font-weight: 500;
display: flex;
align-items: center;
gap: 6px;
}
.pm-search-register:active { background: #fff7ed; }
/* 폼 필드 */
.pm-field { margin-bottom: 12px; }
.pm-label { display: block; font-size: 12px; font-weight: 600; color: #6b7280; margin-bottom: 4px; }
.pm-input {
width: 100%;
padding: 10px 12px;
border: 1.5px solid #e5e7eb;
border-radius: 8px;
font-size: 16px;
outline: none;
box-sizing: border-box;
}
.pm-input:focus { border-color: #ea580c; }
.pm-select {
width: 100%;
padding: 10px 12px;
border: 1.5px solid #e5e7eb;
border-radius: 8px;
font-size: 16px;
background: white;
outline: none;
box-sizing: border-box;
}
/* 사진 */
.pm-photo-btn {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 14px;
border: 1.5px dashed #d1d5db;
border-radius: 8px;
background: #fafafa;
cursor: pointer;
font-size: 14px;
color: #6b7280;
min-height: 44px;
}
.pm-photo-preview {
width: 60px;
height: 60px;
border-radius: 8px;
object-fit: cover;
margin-top: 8px;
}
/* 제출 */
.pm-submit {
width: 100%;
padding: 14px;
border: none;
border-radius: 10px;
background: #ea580c;
color: white;
font-size: 16px;
font-weight: 600;
cursor: pointer;
margin-top: 16px;
min-height: 48px;
}
.pm-submit:active { background: #c2410c; }
.pm-submit:disabled { background: #d1d5db; cursor: not-allowed; }
/* 상세 시트 */
.pm-detail-row {
display: flex;
justify-content: space-between;
padding: 8px 0;
font-size: 14px;
border-bottom: 1px solid #f3f4f6;
}
.pm-detail-label { color: #9ca3af; }
.pm-detail-value { color: #1f2937; font-weight: 500; }
.pm-received-photo {
width: 100%;
max-height: 200px;
object-fit: cover;
border-radius: 10px;
margin-top: 12px;
}
/* 빈 상태 */
.pm-empty {
text-align: center;
padding: 48px 16px;
color: #9ca3af;
}
.pm-empty i { font-size: 32px; margin-bottom: 8px; display: block; }
/* 로딩 */
.pm-loading {
text-align: center;
padding: 24px;
color: #9ca3af;
font-size: 14px;
}
/* 스피너 애니메이션 */
@keyframes pm-spin { to { transform: translateY(-50%) rotate(360deg); } }
.pm-search-spinner.show i { animation: pm-spin 0.8s linear infinite; }