原型预览.html 94 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>羽毛球活动管理系统 - 原型预览</title>
  7. <style>
  8. * {
  9. margin: 0;
  10. padding: 0;
  11. box-sizing: border-box;
  12. }
  13. body {
  14. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  15. background: #f5f7fa;
  16. min-height: 100vh;
  17. }
  18. /* 布局 */
  19. .app-container {
  20. display: flex;
  21. min-height: 100vh;
  22. }
  23. /* 侧边栏 */
  24. .sidebar {
  25. width: 220px;
  26. background: linear-gradient(180deg, #1e3a5f 0%, #2c5282 100%);
  27. color: #fff;
  28. position: fixed;
  29. height: 100vh;
  30. overflow-y: auto;
  31. z-index: 100;
  32. }
  33. .logo {
  34. height: 60px;
  35. display: flex;
  36. align-items: center;
  37. justify-content: center;
  38. font-size: 18px;
  39. font-weight: bold;
  40. border-bottom: 1px solid rgba(255,255,255,0.1);
  41. background: rgba(0,0,0,0.2);
  42. }
  43. .logo-icon {
  44. font-size: 24px;
  45. margin-right: 8px;
  46. }
  47. .menu {
  48. padding: 10px 0;
  49. }
  50. .menu-item {
  51. padding: 12px 20px;
  52. cursor: pointer;
  53. display: flex;
  54. align-items: center;
  55. transition: all 0.3s;
  56. color: rgba(255,255,255,0.8);
  57. }
  58. .menu-item:hover {
  59. background: rgba(255,255,255,0.1);
  60. color: #fff;
  61. }
  62. .menu-item.active {
  63. background: rgba(64, 158, 255, 0.3);
  64. color: #fff;
  65. border-right: 3px solid #409eff;
  66. }
  67. .menu-icon {
  68. margin-right: 10px;
  69. font-size: 18px;
  70. }
  71. .menu-item span {
  72. font-size: 14px;
  73. }
  74. /* 主内容区 */
  75. .main-content {
  76. flex: 1;
  77. margin-left: 220px;
  78. min-height: 100vh;
  79. }
  80. /* 顶部导航 */
  81. .header {
  82. height: 60px;
  83. background: #fff;
  84. box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  85. display: flex;
  86. align-items: center;
  87. justify-content: space-between;
  88. padding: 0 24px;
  89. position: sticky;
  90. top: 0;
  91. z-index: 50;
  92. }
  93. .breadcrumb {
  94. font-size: 14px;
  95. color: #909399;
  96. }
  97. .header-right {
  98. display: flex;
  99. align-items: center;
  100. gap: 20px;
  101. }
  102. .user-info {
  103. display: flex;
  104. align-items: center;
  105. gap: 8px;
  106. cursor: pointer;
  107. }
  108. .avatar {
  109. width: 36px;
  110. height: 36px;
  111. border-radius: 50%;
  112. background: #409eff;
  113. color: #fff;
  114. display: flex;
  115. align-items: center;
  116. justify-content: center;
  117. font-size: 14px;
  118. }
  119. .user-name {
  120. font-size: 14px;
  121. color: #303133;
  122. }
  123. /* 页面内容 */
  124. .page-content {
  125. padding: 20px;
  126. }
  127. .page {
  128. display: none;
  129. }
  130. .page.active {
  131. display: block;
  132. }
  133. /* 卡片 */
  134. .card {
  135. background: #fff;
  136. border-radius: 4px;
  137. box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  138. }
  139. .card-header {
  140. padding: 16px 20px;
  141. border-bottom: 1px solid #ebeef5;
  142. display: flex;
  143. justify-content: space-between;
  144. align-items: center;
  145. }
  146. .card-title {
  147. font-size: 16px;
  148. font-weight: 500;
  149. color: #303133;
  150. }
  151. .card-body {
  152. padding: 20px;
  153. }
  154. /* 统计卡片 */
  155. .stat-cards {
  156. display: grid;
  157. grid-template-columns: repeat(4, 1fr);
  158. gap: 20px;
  159. margin-bottom: 20px;
  160. }
  161. .stat-card {
  162. background: #fff;
  163. border-radius: 4px;
  164. padding: 20px;
  165. box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  166. display: flex;
  167. align-items: center;
  168. }
  169. .stat-icon {
  170. width: 56px;
  171. height: 56px;
  172. border-radius: 8px;
  173. display: flex;
  174. align-items: center;
  175. justify-content: center;
  176. font-size: 24px;
  177. margin-right: 16px;
  178. }
  179. .stat-icon.blue { background: #e6f4ff; color: #409eff; }
  180. .stat-icon.green { background: #e6ffed; color: #52c41a; }
  181. .stat-icon.orange { background: #fff7e6; color: #fa8c16; }
  182. .stat-icon.purple { background: #f9f0ff; color: #722ed1; }
  183. .stat-info h3 {
  184. font-size: 28px;
  185. font-weight: 600;
  186. color: #303133;
  187. margin-bottom: 4px;
  188. }
  189. .stat-info p {
  190. font-size: 14px;
  191. color: #909399;
  192. }
  193. /* 按钮 */
  194. .btn {
  195. padding: 8px 16px;
  196. border-radius: 4px;
  197. font-size: 14px;
  198. cursor: pointer;
  199. border: none;
  200. transition: all 0.3s;
  201. display: inline-flex;
  202. align-items: center;
  203. gap: 6px;
  204. }
  205. .btn-primary {
  206. background: #409eff;
  207. color: #fff;
  208. }
  209. .btn-primary:hover {
  210. background: #66b1ff;
  211. }
  212. .btn-success {
  213. background: #52c41a;
  214. color: #fff;
  215. }
  216. .btn-success:hover {
  217. background: #73d13d;
  218. }
  219. .btn-warning {
  220. background: #faad14;
  221. color: #fff;
  222. }
  223. .btn-danger {
  224. background: #f56c6c;
  225. color: #fff;
  226. }
  227. .btn-default {
  228. background: #fff;
  229. border: 1px solid #dcdfe6;
  230. color: #606266;
  231. }
  232. .btn-default:hover {
  233. border-color: #c6e2ff;
  234. color: #409eff;
  235. }
  236. .btn-large {
  237. padding: 12px 32px;
  238. font-size: 16px;
  239. }
  240. /* 表单 */
  241. .form-group {
  242. margin-bottom: 16px;
  243. }
  244. .form-label {
  245. display: block;
  246. font-size: 14px;
  247. color: #606266;
  248. margin-bottom: 8px;
  249. }
  250. .form-input {
  251. width: 100%;
  252. height: 36px;
  253. padding: 0 12px;
  254. border: 1px solid #dcdfe6;
  255. border-radius: 4px;
  256. font-size: 14px;
  257. transition: border-color 0.3s;
  258. }
  259. .form-input:focus {
  260. border-color: #409eff;
  261. outline: none;
  262. }
  263. .form-select {
  264. width: 100%;
  265. height: 36px;
  266. padding: 0 12px;
  267. border: 1px solid #dcdfe6;
  268. border-radius: 4px;
  269. font-size: 14px;
  270. background: #fff;
  271. }
  272. /* 表格 */
  273. .table-container {
  274. overflow-x: auto;
  275. }
  276. table {
  277. width: 100%;
  278. border-collapse: collapse;
  279. }
  280. th, td {
  281. padding: 12px 16px;
  282. text-align: left;
  283. border-bottom: 1px solid #ebeef5;
  284. font-size: 14px;
  285. }
  286. th {
  287. background: #fafafa;
  288. color: #909399;
  289. font-weight: 500;
  290. }
  291. tr:hover {
  292. background: #f5f7fa;
  293. }
  294. /* 标签 */
  295. .tag {
  296. display: inline-block;
  297. padding: 2px 8px;
  298. border-radius: 4px;
  299. font-size: 12px;
  300. }
  301. .tag-success { background: #e6ffed; color: #52c41a; }
  302. .tag-warning { background: #fff7e6; color: #fa8c16; }
  303. .tag-danger { background: #ffe6e6; color: #f56c6c; }
  304. .tag-info { background: #f4f4f5; color: #909399; }
  305. /* 签到按钮 */
  306. .checkin-area {
  307. text-align: center;
  308. padding: 60px 20px;
  309. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  310. border-radius: 12px;
  311. color: #fff;
  312. margin-bottom: 24px;
  313. }
  314. .checkin-btn {
  315. width: 140px;
  316. height: 140px;
  317. border-radius: 50%;
  318. background: #fff;
  319. color: #667eea;
  320. font-size: 20px;
  321. font-weight: bold;
  322. border: none;
  323. cursor: pointer;
  324. box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  325. transition: all 0.3s;
  326. margin: 20px auto;
  327. display: flex;
  328. flex-direction: column;
  329. align-items: center;
  330. justify-content: center;
  331. }
  332. .checkin-btn:hover {
  333. transform: scale(1.05);
  334. box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  335. }
  336. .checkin-btn.checked {
  337. background: #52c41a;
  338. color: #fff;
  339. cursor: default;
  340. }
  341. .checkin-btn i {
  342. font-size: 48px;
  343. margin-bottom: 8px;
  344. }
  345. .checkin-time {
  346. font-size: 14px;
  347. opacity: 0.9;
  348. }
  349. /* 签到列表 */
  350. .signin-list {
  351. display: grid;
  352. grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  353. gap: 16px;
  354. }
  355. .signin-card {
  356. background: #fff;
  357. border-radius: 8px;
  358. padding: 16px;
  359. box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  360. display: flex;
  361. align-items: center;
  362. gap: 12px;
  363. }
  364. .signin-avatar {
  365. width: 48px;
  366. height: 48px;
  367. border-radius: 50%;
  368. background: #409eff;
  369. color: #fff;
  370. display: flex;
  371. align-items: center;
  372. justify-content: center;
  373. font-size: 18px;
  374. }
  375. .signin-info {
  376. flex: 1;
  377. }
  378. .signin-name {
  379. font-size: 16px;
  380. font-weight: 500;
  381. color: #303133;
  382. margin-bottom: 4px;
  383. }
  384. .signin-time {
  385. font-size: 13px;
  386. color: #909399;
  387. }
  388. .signin-status {
  389. padding: 4px 10px;
  390. border-radius: 12px;
  391. font-size: 12px;
  392. }
  393. /* Tab标签 */
  394. .tabs {
  395. display: flex;
  396. border-bottom: 1px solid #e4e7ed;
  397. margin-bottom: 20px;
  398. }
  399. .tab-item {
  400. padding: 12px 24px;
  401. cursor: pointer;
  402. color: #909399;
  403. font-size: 14px;
  404. border-bottom: 2px solid transparent;
  405. transition: all 0.3s;
  406. }
  407. .tab-item:hover {
  408. color: #409eff;
  409. }
  410. .tab-item.active {
  411. color: #409eff;
  412. border-bottom-color: #409eff;
  413. }
  414. /* 弹窗 */
  415. .modal {
  416. display: none;
  417. position: fixed;
  418. top: 0;
  419. left: 0;
  420. width: 100%;
  421. height: 100%;
  422. background: rgba(0,0,0,0.5);
  423. z-index: 1000;
  424. align-items: center;
  425. justify-content: center;
  426. }
  427. .modal.show {
  428. display: flex;
  429. }
  430. .modal-content {
  431. background: #fff;
  432. border-radius: 8px;
  433. width: 600px;
  434. max-height: 80vh;
  435. overflow-y: auto;
  436. animation: modalSlideIn 0.3s;
  437. }
  438. @keyframes modalSlideIn {
  439. from {
  440. opacity: 0;
  441. transform: translateY(-20px);
  442. }
  443. to {
  444. opacity: 1;
  445. transform: translateY(0);
  446. }
  447. }
  448. .modal-header {
  449. padding: 16px 20px;
  450. border-bottom: 1px solid #e4e7ed;
  451. display: flex;
  452. justify-content: space-between;
  453. align-items: center;
  454. }
  455. .modal-title {
  456. font-size: 18px;
  457. font-weight: 500;
  458. }
  459. .modal-close {
  460. font-size: 20px;
  461. cursor: pointer;
  462. color: #909399;
  463. }
  464. .modal-body {
  465. padding: 20px;
  466. }
  467. .modal-footer {
  468. padding: 16px 20px;
  469. border-top: 1px solid #e4e7ed;
  470. display: flex;
  471. justify-content: flex-end;
  472. gap: 12px;
  473. }
  474. /* 进度条 */
  475. .progress {
  476. height: 8px;
  477. background: #e4e7ed;
  478. border-radius: 4px;
  479. overflow: hidden;
  480. }
  481. .progress-bar {
  482. height: 100%;
  483. background: #409eff;
  484. border-radius: 4px;
  485. transition: width 0.3s;
  486. }
  487. /* 步骤条 */
  488. .steps {
  489. display: flex;
  490. justify-content: space-between;
  491. margin-bottom: 40px;
  492. }
  493. .step {
  494. flex: 1;
  495. text-align: center;
  496. position: relative;
  497. }
  498. .step:not(:last-child)::after {
  499. content: '';
  500. position: absolute;
  501. top: 20px;
  502. left: 50%;
  503. width: 100%;
  504. height: 2px;
  505. background: #e4e7ed;
  506. }
  507. .step:not(:last-child).done::after {
  508. background: #52c41a;
  509. }
  510. .step-icon {
  511. width: 40px;
  512. height: 40px;
  513. border-radius: 50%;
  514. background: #e4e7ed;
  515. color: #909399;
  516. display: flex;
  517. align-items: center;
  518. justify-content: center;
  519. margin: 0 auto 8px;
  520. position: relative;
  521. z-index: 1;
  522. }
  523. .step.active .step-icon {
  524. background: #409eff;
  525. color: #fff;
  526. }
  527. .step.done .step-icon {
  528. background: #52c41a;
  529. color: #fff;
  530. }
  531. .step-label {
  532. font-size: 14px;
  533. color: #909399;
  534. }
  535. .step.active .step-label {
  536. color: #409eff;
  537. }
  538. /* 筛选表单 */
  539. .filter-form {
  540. display: flex;
  541. gap: 16px;
  542. flex-wrap: wrap;
  543. margin-bottom: 20px;
  544. }
  545. .filter-item {
  546. display: flex;
  547. align-items: center;
  548. gap: 8px;
  549. }
  550. /* 时间线 */
  551. .timeline {
  552. padding-left: 20px;
  553. }
  554. .timeline-item {
  555. position: relative;
  556. padding-bottom: 20px;
  557. }
  558. .timeline-item::before {
  559. content: '';
  560. position: absolute;
  561. left: -20px;
  562. top: 6px;
  563. width: 8px;
  564. height: 8px;
  565. border-radius: 50%;
  566. background: #409eff;
  567. }
  568. .timeline-item::after {
  569. content: '';
  570. position: absolute;
  571. left: -16px;
  572. top: 14px;
  573. width: 2px;
  574. height: calc(100% - 8px);
  575. background: #e4e7ed;
  576. }
  577. .timeline-item:last-child::after {
  578. display: none;
  579. }
  580. .timeline-time {
  581. font-size: 12px;
  582. color: #909399;
  583. margin-bottom: 4px;
  584. }
  585. .timeline-content {
  586. font-size: 14px;
  587. color: #303133;
  588. }
  589. /* 搜索框 */
  590. .search-box {
  591. position: relative;
  592. width: 280px;
  593. }
  594. .search-input {
  595. width: 100%;
  596. height: 36px;
  597. padding: 0 36px 0 12px;
  598. border: 1px solid #dcdfe6;
  599. border-radius: 18px;
  600. font-size: 14px;
  601. }
  602. .search-icon {
  603. position: absolute;
  604. right: 12px;
  605. top: 50%;
  606. transform: translateY(-50%);
  607. color: #909399;
  608. }
  609. /* 用户头像组 */
  610. .avatar-group {
  611. display: flex;
  612. }
  613. .avatar-group .avatar {
  614. margin-left: -8px;
  615. border: 2px solid #fff;
  616. }
  617. .avatar-group .avatar:first-child {
  618. margin-left: 0;
  619. }
  620. /* 空状态 */
  621. .empty-state {
  622. text-align: center;
  623. padding: 60px 20px;
  624. color: #909399;
  625. }
  626. .empty-state i {
  627. font-size: 64px;
  628. margin-bottom: 16px;
  629. opacity: 0.5;
  630. }
  631. /* 警告提示 */
  632. .alert {
  633. padding: 12px 16px;
  634. border-radius: 4px;
  635. margin-bottom: 16px;
  636. display: flex;
  637. align-items: center;
  638. gap: 8px;
  639. }
  640. .alert-warning {
  641. background: #fff7e6;
  642. border: 1px solid #ffd591;
  643. color: #d48806;
  644. }
  645. .alert-success {
  646. background: #e6ffed;
  647. border: 1px solid #b7eb8f;
  648. color: #52c41a;
  649. }
  650. .alert-danger {
  651. background: #ffe6e6;
  652. border: 1px solid #ffccc7;
  653. color: #f56c6c;
  654. }
  655. /* 价格显示 */
  656. .price {
  657. font-size: 20px;
  658. font-weight: 600;
  659. color: #f56c6c;
  660. }
  661. .price-unit {
  662. font-size: 14px;
  663. font-weight: normal;
  664. color: #909399;
  665. }
  666. /* 复选框 */
  667. .checkbox {
  668. display: inline-flex;
  669. align-items: center;
  670. gap: 6px;
  671. cursor: pointer;
  672. }
  673. .checkbox input {
  674. width: 16px;
  675. height: 16px;
  676. }
  677. /* 响应式 */
  678. @media (max-width: 1200px) {
  679. .stat-cards {
  680. grid-template-columns: repeat(2, 1fr);
  681. }
  682. }
  683. @media (max-width: 768px) {
  684. .sidebar {
  685. transform: translateX(-100%);
  686. }
  687. .main-content {
  688. margin-left: 0;
  689. }
  690. .stat-cards {
  691. grid-template-columns: 1fr;
  692. }
  693. }
  694. /* 快捷操作区 */
  695. .quick-actions {
  696. display: flex;
  697. gap: 12px;
  698. margin-bottom: 20px;
  699. }
  700. /* 库存预警 */
  701. .stock-warning {
  702. background: #fff7e6;
  703. border: 1px solid #ffd591;
  704. border-radius: 4px;
  705. padding: 12px 16px;
  706. margin-bottom: 16px;
  707. display: flex;
  708. align-items: center;
  709. justify-content: space-between;
  710. }
  711. .stock-warning-item {
  712. display: flex;
  713. align-items: center;
  714. gap: 8px;
  715. }
  716. /* 账单卡片 */
  717. .bill-card {
  718. background: #fff;
  719. border-radius: 8px;
  720. padding: 20px;
  721. box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  722. margin-bottom: 16px;
  723. }
  724. .bill-header {
  725. display: flex;
  726. justify-content: space-between;
  727. align-items: flex-start;
  728. margin-bottom: 16px;
  729. padding-bottom: 16px;
  730. border-bottom: 1px solid #ebeef5;
  731. }
  732. .bill-user {
  733. display: flex;
  734. align-items: center;
  735. gap: 12px;
  736. }
  737. .bill-amount {
  738. text-align: right;
  739. }
  740. .bill-total {
  741. font-size: 24px;
  742. font-weight: 600;
  743. color: #f56c6c;
  744. }
  745. .bill-paid {
  746. font-size: 13px;
  747. color: #52c41a;
  748. }
  749. .bill-progress {
  750. margin-top: 12px;
  751. }
  752. /* 用户选择器 */
  753. .user-selector {
  754. display: flex;
  755. flex-wrap: wrap;
  756. gap: 12px;
  757. }
  758. .user-option {
  759. width: 100px;
  760. text-align: center;
  761. padding: 12px 8px;
  762. border: 2px solid #e4e7ed;
  763. border-radius: 8px;
  764. cursor: pointer;
  765. transition: all 0.3s;
  766. }
  767. .user-option:hover {
  768. border-color: #409eff;
  769. }
  770. .user-option.selected {
  771. border-color: #409eff;
  772. background: #e6f4ff;
  773. }
  774. .user-option .avatar {
  775. margin: 0 auto 8px;
  776. }
  777. /* 批次选择器 */
  778. .batch-selector {
  779. border: 1px solid #e4e7ed;
  780. border-radius: 8px;
  781. padding: 12px;
  782. background: #fafafa;
  783. }
  784. .batch-item {
  785. display: flex;
  786. align-items: center;
  787. justify-content: space-between;
  788. padding: 10px 12px;
  789. border-radius: 6px;
  790. margin-bottom: 8px;
  791. background: #fff;
  792. cursor: pointer;
  793. transition: all 0.3s;
  794. border: 2px solid transparent;
  795. }
  796. .batch-item:hover {
  797. border-color: #409eff;
  798. }
  799. .batch-item.selected {
  800. border-color: #409eff;
  801. background: #e6f4ff;
  802. }
  803. .batch-item:last-child {
  804. margin-bottom: 0;
  805. }
  806. .batch-info {
  807. display: flex;
  808. align-items: center;
  809. gap: 12px;
  810. }
  811. .batch-radio {
  812. width: 18px;
  813. height: 18px;
  814. border: 2px solid #dcdfe6;
  815. border-radius: 50%;
  816. display: flex;
  817. align-items: center;
  818. justify-content: center;
  819. }
  820. .batch-item.selected .batch-radio {
  821. border-color: #409eff;
  822. background: #409eff;
  823. }
  824. .batch-item.selected .batch-radio::after {
  825. content: '';
  826. width: 6px;
  827. height: 6px;
  828. background: #fff;
  829. border-radius: 50%;
  830. }
  831. .batch-name {
  832. font-weight: 500;
  833. color: #303133;
  834. }
  835. .batch-details {
  836. font-size: 12px;
  837. color: #909399;
  838. }
  839. .batch-stock {
  840. font-size: 14px;
  841. font-weight: 500;
  842. color: #52c41a;
  843. }
  844. .batch-stock.low {
  845. color: #fa8c16;
  846. }
  847. .cost-preview {
  848. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  849. border-radius: 8px;
  850. padding: 16px;
  851. color: #fff;
  852. margin-top: 16px;
  853. }
  854. .cost-preview h4 {
  855. font-size: 14px;
  856. margin-bottom: 12px;
  857. opacity: 0.9;
  858. }
  859. .cost-row {
  860. display: flex;
  861. justify-content: space-between;
  862. margin-bottom: 8px;
  863. font-size: 14px;
  864. }
  865. .cost-total {
  866. font-size: 24px;
  867. font-weight: 600;
  868. margin-top: 12px;
  869. padding-top: 12px;
  870. border-top: 1px solid rgba(255,255,255,0.2);
  871. }
  872. /* 批次标签 */
  873. .batch-tag {
  874. display: inline-flex;
  875. align-items: center;
  876. gap: 4px;
  877. padding: 2px 8px;
  878. background: #e6f4ff;
  879. color: #409eff;
  880. border-radius: 4px;
  881. font-size: 12px;
  882. }
  883. /* 多批次选择样式 */
  884. .batch-item.multi-batch {
  885. flex-wrap: wrap;
  886. }
  887. .batch-item.multi-batch .batch-info {
  888. flex: 1;
  889. min-width: 200px;
  890. }
  891. .batch-checkbox {
  892. width: 20px;
  893. height: 20px;
  894. border: 2px solid #dcdfe6;
  895. border-radius: 4px;
  896. display: flex;
  897. align-items: center;
  898. justify-content: center;
  899. margin-right: 10px;
  900. font-size: 14px;
  901. color: transparent;
  902. transition: all 0.2s;
  903. flex-shrink: 0;
  904. }
  905. .batch-item.multi-batch.selected .batch-checkbox {
  906. background: #409eff;
  907. border-color: #409eff;
  908. color: #fff;
  909. }
  910. .batch-item.multi-batch.selected {
  911. background: #e6f4ff;
  912. border-color: #409eff;
  913. }
  914. .batch-item.multi-batch input[type="number"] {
  915. border-color: #dcdfe6;
  916. background: #fff;
  917. }
  918. .batch-item.multi-batch.selected input[type="number"] {
  919. border-color: #409eff;
  920. }
  921. .batch-item.multi-batch input[type="number"]:focus {
  922. border-color: #409eff;
  923. outline: none;
  924. }
  925. /* 批次汇总样式 */
  926. .batch-summary-item {
  927. display: flex;
  928. justify-content: space-between;
  929. padding: 6px 0;
  930. border-bottom: 1px dashed #e4e7ed;
  931. }
  932. .batch-summary-item:last-child {
  933. border-bottom: none;
  934. }
  935. .batch-summary-name {
  936. color: #303133;
  937. }
  938. .batch-summary-qty {
  939. color: #606266;
  940. }
  941. .batch-summary-cost {
  942. color: #f56c6c;
  943. font-weight: 500;
  944. }
  945. .batch-summary-total {
  946. display: flex;
  947. justify-content: space-between;
  948. margin-top: 8px;
  949. padding-top: 8px;
  950. border-top: 2px solid #409eff;
  951. font-weight: 600;
  952. color: #409eff;
  953. }
  954. </style>
  955. </head>
  956. <body>
  957. <div class="app-container">
  958. <!-- 侧边栏 -->
  959. <aside class="sidebar">
  960. <div class="logo">
  961. <span class="logo-icon">🏸</span>
  962. <span>羽毛球管理</span>
  963. </div>
  964. <nav class="menu">
  965. <div class="menu-item active" onclick="showPage('signin')">
  966. <span class="menu-icon">📝</span>
  967. <span>签到</span>
  968. </div>
  969. <div class="menu-item" onclick="showPage('activity')">
  970. <span class="menu-icon">📋</span>
  971. <span>活动记录</span>
  972. </div>
  973. <div class="menu-item" onclick="showPage('procurement')">
  974. <span class="menu-icon">🛒</span>
  975. <span>采购管理</span>
  976. </div>
  977. <div class="menu-item" onclick="showPage('billing')">
  978. <span class="menu-icon">💰</span>
  979. <span>账单管理</span>
  980. </div>
  981. <div class="menu-item" onclick="showPage('statistics')">
  982. <span class="menu-icon">📊</span>
  983. <span>数据统计</span>
  984. </div>
  985. <div class="menu-item" onclick="showPage('stock')">
  986. <span class="menu-icon">📦</span>
  987. <span>库存管理</span>
  988. </div>
  989. </nav>
  990. </aside>
  991. <!-- 主内容区 -->
  992. <main class="main-content">
  993. <!-- 顶部导航 -->
  994. <header class="header">
  995. <div class="breadcrumb">
  996. 首页 / <span id="currentPage">签到</span>
  997. </div>
  998. <div class="header-right">
  999. <span>🔔</span>
  1000. <div class="user-info">
  1001. <div class="avatar">管</div>
  1002. <span class="user-name">管理员</span>
  1003. </div>
  1004. </div>
  1005. </header>
  1006. <div class="page-content">
  1007. <!-- 签到页面 -->
  1008. <div id="page-signin" class="page active">
  1009. <div class="stat-cards">
  1010. <div class="stat-card">
  1011. <div class="stat-icon blue">📅</div>
  1012. <div class="stat-info">
  1013. <h3>2024-01-15</h3>
  1014. <p>今日日期</p>
  1015. </div>
  1016. </div>
  1017. <div class="stat-card">
  1018. <div class="stat-icon green">✅</div>
  1019. <div class="stat-info">
  1020. <h3>12</h3>
  1021. <p>已签到人数</p>
  1022. </div>
  1023. </div>
  1024. <div class="stat-card">
  1025. <div class="stat-icon orange">📊</div>
  1026. <div class="stat-info">
  1027. <h3>15</h3>
  1028. <p>报名人数</p>
  1029. </div>
  1030. </div>
  1031. <div class="stat-card">
  1032. <div class="stat-icon purple">🏸</div>
  1033. <div class="stat-info">
  1034. <h3>6</h3>
  1035. <p>预计用球(个)</p>
  1036. </div>
  1037. </div>
  1038. </div>
  1039. <div class="card">
  1040. <div class="card-header">
  1041. <span class="card-title">今日签到</span>
  1042. <button class="btn btn-primary" onclick="openModal('checkinModal')">+ 添加签到</button>
  1043. </div>
  1044. <div class="card-body">
  1045. <div class="checkin-area">
  1046. <p>周一例行活动 · 体育中心羽毛球馆</p>
  1047. <button class="checkin-btn" id="checkinBtn" onclick="doCheckin()">
  1048. <span>📝</span>
  1049. 签到
  1050. </button>
  1051. <p class="checkin-time" id="checkinTime">点击上方按钮完成签到</p>
  1052. </div>
  1053. <h4 style="margin-bottom: 16px; color: #303133;">签到名单</h4>
  1054. <div class="signin-list" id="signinList">
  1055. <!-- 动态生成 -->
  1056. </div>
  1057. </div>
  1058. </div>
  1059. </div>
  1060. <!-- 活动记录页面 -->
  1061. <div id="page-activity" class="page">
  1062. <div class="card">
  1063. <div class="card-header">
  1064. <span class="card-title">活动记录</span>
  1065. <div style="display: flex; gap: 12px;">
  1066. <select class="form-select" style="width: 150px;">
  1067. <option>全部状态</option>
  1068. <option>已完成</option>
  1069. <option>草稿</option>
  1070. </select>
  1071. <button class="btn btn-primary" onclick="openModal('activityModal')">+ 新建活动</button>
  1072. </div>
  1073. </div>
  1074. <div class="card-body">
  1075. <div class="filter-form">
  1076. <div class="filter-item">
  1077. <label class="form-label">日期:</label>
  1078. <input type="date" class="form-input" value="2024-01-15">
  1079. <span>至</span>
  1080. <input type="date" class="form-input" value="2024-01-15">
  1081. </div>
  1082. <div class="filter-item">
  1083. <input type="text" class="form-input" placeholder="搜索活动标题..." style="width: 200px;">
  1084. </div>
  1085. <button class="btn btn-primary">查询</button>
  1086. <button class="btn btn-default">重置</button>
  1087. </div>
  1088. <div class="table-container">
  1089. <table>
  1090. <thead>
  1091. <tr>
  1092. <th>活动日期</th>
  1093. <th>活动标题</th>
  1094. <th>场地</th>
  1095. <th>参与人数</th>
  1096. <th>羽毛球消耗</th>
  1097. <th>总费用</th>
  1098. <th>人均费用</th>
  1099. <th>状态</th>
  1100. <th>操作</th>
  1101. </tr>
  1102. </thead>
  1103. <tbody>
  1104. <tr>
  1105. <td>2024-01-15</td>
  1106. <td>周一例行活动</td>
  1107. <td>体育中心羽毛球馆</td>
  1108. <td>12人</td>
  1109. <td>6个</td>
  1110. <td><span class="price">¥240.00</span></td>
  1111. <td>¥20.00</td>
  1112. <td><span class="tag tag-success">已完成</span></td>
  1113. <td>
  1114. <button class="btn btn-default" style="padding: 4px 8px;">查看</button>
  1115. <button class="btn btn-default" style="padding: 4px 8px;">编辑</button>
  1116. </td>
  1117. </tr>
  1118. <tr>
  1119. <td>2024-01-13</td>
  1120. <td>周六友谊赛</td>
  1121. <td>社区活动中心</td>
  1122. <td>8人</td>
  1123. <td>4个</td>
  1124. <td><span class="price">¥160.00</span></td>
  1125. <td>¥20.00</td>
  1126. <td><span class="tag tag-success">已完成</span></td>
  1127. <td>
  1128. <button class="btn btn-default" style="padding: 4px 8px;">查看</button>
  1129. <button class="btn btn-default" style="padding: 4px 8px;">编辑</button>
  1130. </td>
  1131. </tr>
  1132. <tr>
  1133. <td>2024-01-08</td>
  1134. <td>周一例行活动</td>
  1135. <td>体育中心羽毛球馆</td>
  1136. <td>10人</td>
  1137. <td>5个</td>
  1138. <td><span class="price">¥200.00</span></td>
  1139. <td>¥20.00</td>
  1140. <td><span class="tag tag-success">已完成</span></td>
  1141. <td>
  1142. <button class="btn btn-default" style="padding: 4px 8px;">查看</button>
  1143. <button class="btn btn-default" style="padding: 4px 8px;">编辑</button>
  1144. </td>
  1145. </tr>
  1146. </tbody>
  1147. </table>
  1148. </div>
  1149. </div>
  1150. </div>
  1151. </div>
  1152. <!-- 采购管理页面 -->
  1153. <div id="page-procurement" class="page">
  1154. <div class="stat-cards">
  1155. <div class="stat-card">
  1156. <div class="stat-icon blue">🛒</div>
  1157. <div class="stat-info">
  1158. <h3>8</h3>
  1159. <p>本月采购次数</p>
  1160. </div>
  1161. </div>
  1162. <div class="stat-card">
  1163. <div class="stat-icon green">💵</div>
  1164. <div class="stat-info">
  1165. <h3>¥1,250</h3>
  1166. <p>本月采购金额</p>
  1167. </div>
  1168. </div>
  1169. <div class="stat-card">
  1170. <div class="stat-icon orange">📦</div>
  1171. <div class="stat-info">
  1172. <h3>240</h3>
  1173. <p>羽毛球库存</p>
  1174. </div>
  1175. </div>
  1176. <div class="stat-card">
  1177. <div class="stat-icon purple">⚠️</div>
  1178. <div class="stat-info">
  1179. <h3>2</h3>
  1180. <p>库存预警</p>
  1181. </div>
  1182. </div>
  1183. </div>
  1184. <div class="stock-warning">
  1185. <div class="stock-warning-item">
  1186. <span>⚠️</span>
  1187. <span>库存不足预警:</span>
  1188. </div>
  1189. <div class="stock-warning-item">
  1190. <span class="tag tag-danger">手胶 剩余15个</span>
  1191. <span class="tag tag-danger">运动饮料 剩余8瓶</span>
  1192. </div>
  1193. <button class="btn btn-warning">立即采购</button>
  1194. </div>
  1195. <div class="card">
  1196. <div class="card-header">
  1197. <span class="card-title">采购记录</span>
  1198. <button class="btn btn-primary" onclick="openModal('procurementModal')">+ 新建采购</button>
  1199. </div>
  1200. <div class="card-body">
  1201. <div class="filter-form">
  1202. <select class="form-select" style="width: 150px;">
  1203. <option>全部分类</option>
  1204. <option>羽毛球</option>
  1205. <option>球拍</option>
  1206. <option>手胶</option>
  1207. <option>饮料</option>
  1208. </select>
  1209. <input type="text" class="form-input" placeholder="搜索商品名称..." style="width: 200px;">
  1210. <button class="btn btn-primary">查询</button>
  1211. </div>
  1212. <div class="table-container">
  1213. <table>
  1214. <thead>
  1215. <tr>
  1216. <th>采购日期</th>
  1217. <th>批次号</th>
  1218. <th>商品名称</th>
  1219. <th>分类</th>
  1220. <th>规格</th>
  1221. <th>数量</th>
  1222. <th>单价</th>
  1223. <th>金额</th>
  1224. <th>状态</th>
  1225. <th>操作</th>
  1226. </tr>
  1227. </thead>
  1228. <tbody>
  1229. <tr>
  1230. <td>2024-01-10</td>
  1231. <td><span class="batch-tag">PC-20240110-001</span></td>
  1232. <td>亚狮龙10号羽毛球</td>
  1233. <td>羽毛球</td>
  1234. <td>12个/筒</td>
  1235. <td>10筒</td>
  1236. <td>¥15.00</td>
  1237. <td>¥150.00</td>
  1238. <td><span class="tag tag-success">已入库</span></td>
  1239. <td>
  1240. <button class="btn btn-default" style="padding: 4px 8px;">查看</button>
  1241. <button class="btn btn-default" style="padding: 4px 8px;">编辑</button>
  1242. </td>
  1243. </tr>
  1244. <tr>
  1245. <td>2024-01-10</td>
  1246. <td><span class="batch-tag">PC-20240110-002</span></td>
  1247. <td>亚狮龙10号羽毛球</td>
  1248. <td>羽毛球</td>
  1249. <td>12个/筒</td>
  1250. <td>5筒</td>
  1251. <td>¥16.00</td>
  1252. <td>¥80.00</td>
  1253. <td><span class="tag tag-success">已入库</span></td>
  1254. <td>
  1255. <button class="btn btn-default" style="padding: 4px 8px;">查看</button>
  1256. <button class="btn btn-default" style="padding: 4px 8px;">编辑</button>
  1257. </td>
  1258. </tr>
  1259. <tr>
  1260. <td>2024-01-05</td>
  1261. <td><span class="batch-tag">PC-20240105-001</span></td>
  1262. <td>尤尼克斯手胶</td>
  1263. <td>手胶</td>
  1264. <td>30个/包</td>
  1265. <td>2包</td>
  1266. <td>¥45.00</td>
  1267. <td>¥90.00</td>
  1268. <td><span class="tag tag-success">已入库</span></td>
  1269. <td>
  1270. <button class="btn btn-default" style="padding: 4px 8px;">查看</button>
  1271. <button class="btn btn-default" style="padding: 4px 8px;">编辑</button>
  1272. </td>
  1273. </tr>
  1274. <tr>
  1275. <td>2024-01-02</td>
  1276. <td><span class="batch-tag">PC-20240102-001</span></td>
  1277. <td>红牛运动饮料</td>
  1278. <td>饮料</td>
  1279. <td>24罐/箱</td>
  1280. <td>1箱</td>
  1281. <td>¥68.00</td>
  1282. <td>¥68.00</td>
  1283. <td><span class="tag tag-warning">未入库</span></td>
  1284. <td>
  1285. <button class="btn btn-default" style="padding: 4px 8px;">查看</button>
  1286. <button class="btn btn-success" style="padding: 4px 8px;">入库</button>
  1287. </td>
  1288. </tr>
  1289. </tbody>
  1290. </table>
  1291. </div>
  1292. </div>
  1293. </div>
  1294. </div>
  1295. <!-- 账单管理页面 -->
  1296. <div id="page-billing" class="page">
  1297. <div class="stat-cards">
  1298. <div class="stat-card">
  1299. <div class="stat-icon blue">📄</div>
  1300. <div class="stat-info">
  1301. <h3>15</h3>
  1302. <p>本月账单数</p>
  1303. </div>
  1304. </div>
  1305. <div class="stat-card">
  1306. <div class="stat-icon green">💰</div>
  1307. <div class="stat-info">
  1308. <h3>¥5,250</h3>
  1309. <p>账单总金额</p>
  1310. </div>
  1311. </div>
  1312. <div class="stat-card">
  1313. <div class="stat-icon orange">✅</div>
  1314. <div class="stat-info">
  1315. <h3>¥3,800</h3>
  1316. <p>已付金额</p>
  1317. </div>
  1318. </div>
  1319. <div class="stat-card">
  1320. <div class="stat-icon purple">⏳</div>
  1321. <div class="stat-info">
  1322. <h3>¥1,450</h3>
  1323. <p>待付金额</p>
  1324. </div>
  1325. </div>
  1326. </div>
  1327. <div class="card">
  1328. <div class="card-header">
  1329. <span class="card-title">账单管理 - 2024年1月</span>
  1330. <button class="btn btn-primary" onclick="openModal('billModal')">生成账单</button>
  1331. </div>
  1332. <div class="card-body">
  1333. <div class="bill-card">
  1334. <div class="bill-header">
  1335. <div class="bill-user">
  1336. <div class="avatar" style="width: 48px; height: 48px; font-size: 18px;">张</div>
  1337. <div>
  1338. <div style="font-weight: 500; font-size: 16px;">张三</div>
  1339. <div style="color: #909399; font-size: 13px;">参与8次活动</div>
  1340. </div>
  1341. </div>
  1342. <div class="bill-amount">
  1343. <div class="bill-total">¥280.00</div>
  1344. <div class="bill-paid">已付 ¥200.00</div>
  1345. </div>
  1346. </div>
  1347. <div class="bill-progress">
  1348. <div style="display: flex; justify-content: space-between; margin-bottom: 4px;">
  1349. <span style="font-size: 13px; color: #909399;">付款进度</span>
  1350. <span style="font-size: 13px; color: #52c41a;">71%</span>
  1351. </div>
  1352. <div class="progress">
  1353. <div class="progress-bar" style="width: 71%; background: #52c41a;"></div>
  1354. </div>
  1355. </div>
  1356. </div>
  1357. <div class="bill-card">
  1358. <div class="bill-header">
  1359. <div class="bill-user">
  1360. <div class="avatar" style="width: 48px; height: 48px; font-size: 18px; background: #52c41a;">李</div>
  1361. <div>
  1362. <div style="font-weight: 500; font-size: 16px;">李四</div>
  1363. <div style="color: #909399; font-size: 13px;">参与6次活动</div>
  1364. </div>
  1365. </div>
  1366. <div class="bill-amount">
  1367. <div class="bill-total">¥210.00</div>
  1368. <div class="bill-paid">已付 ¥210.00</div>
  1369. </div>
  1370. </div>
  1371. <div class="bill-progress">
  1372. <div style="display: flex; justify-content: space-between; margin-bottom: 4px;">
  1373. <span style="font-size: 13px; color: #909399;">付款进度</span>
  1374. <span style="font-size: 13px; color: #52c41a;">100%</span>
  1375. </div>
  1376. <div class="progress">
  1377. <div class="progress-bar" style="width: 100%; background: #52c41a;"></div>
  1378. </div>
  1379. </div>
  1380. </div>
  1381. <div class="bill-card">
  1382. <div class="bill-header">
  1383. <div class="bill-user">
  1384. <div class="avatar" style="width: 48px; height: 48px; font-size: 18px; background: #fa8c16;">王</div>
  1385. <div>
  1386. <div style="font-weight: 500; font-size: 16px;">王五</div>
  1387. <div style="color: #909399; font-size: 13px;">参与5次活动</div>
  1388. </div>
  1389. </div>
  1390. <div class="bill-amount">
  1391. <div class="bill-total">¥175.00</div>
  1392. <div class="bill-paid">已付 ¥0.00</div>
  1393. </div>
  1394. </div>
  1395. <div class="bill-progress">
  1396. <div style="display: flex; justify-content: space-between; margin-bottom: 4px;">
  1397. <span style="font-size: 13px; color: #909399;">付款进度</span>
  1398. <span style="font-size: 13px; color: #f56c6c;">0%</span>
  1399. </div>
  1400. <div class="progress">
  1401. <div class="progress-bar" style="width: 0%; background: #f56c6c;"></div>
  1402. </div>
  1403. </div>
  1404. </div>
  1405. </div>
  1406. </div>
  1407. </div>
  1408. <!-- 数据统计页面 -->
  1409. <div id="page-statistics" class="page">
  1410. <div class="stat-cards">
  1411. <div class="stat-card">
  1412. <div class="stat-icon blue">📝</div>
  1413. <div class="stat-info">
  1414. <h3>25</h3>
  1415. <p>本月签到次数</p>
  1416. </div>
  1417. </div>
  1418. <div class="stat-card">
  1419. <div class="stat-icon green">🏸</div>
  1420. <div class="stat-info">
  1421. <h3>18</h3>
  1422. <p>本月活动场次</p>
  1423. </div>
  1424. </div>
  1425. <div class="stat-card">
  1426. <div class="stat-icon orange">📦</div>
  1427. <div class="stat-info">
  1428. <h3>96</h3>
  1429. <p>羽毛球消耗(个)</p>
  1430. </div>
  1431. </div>
  1432. <div class="stat-card">
  1433. <div class="stat-icon purple">💰</div>
  1434. <div class="stat-info">
  1435. <h3>¥5,250</h3>
  1436. <p>本月总支出</p>
  1437. </div>
  1438. </div>
  1439. </div>
  1440. <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;">
  1441. <div class="card">
  1442. <div class="card-header">
  1443. <span class="card-title">月度活动趋势</span>
  1444. </div>
  1445. <div class="card-body">
  1446. <div style="height: 250px; display: flex; align-items: flex-end; justify-content: space-around; padding: 20px;">
  1447. <div style="text-align: center;">
  1448. <div style="width: 40px; height: 120px; background: linear-gradient(180deg, #409eff 0%, #66b1ff 100%); border-radius: 4px 4px 0 0; margin: 0 auto 8px;"></div>
  1449. <div style="font-size: 12px; color: #909399;">8月</div>
  1450. </div>
  1451. <div style="text-align: center;">
  1452. <div style="width: 40px; height: 140px; background: linear-gradient(180deg, #409eff 0%, #66b1ff 100%); border-radius: 4px 4px 0 0; margin: 0 auto 8px;"></div>
  1453. <div style="font-size: 12px; color: #909399;">9月</div>
  1454. </div>
  1455. <div style="text-align: center;">
  1456. <div style="width: 40px; height: 100px; background: linear-gradient(180deg, #409eff 0%, #66b1ff 100%); border-radius: 4px 4px 0 0; margin: 0 auto 8px;"></div>
  1457. <div style="font-size: 12px; color: #909399;">10月</div>
  1458. </div>
  1459. <div style="text-align: center;">
  1460. <div style="width: 40px; height: 160px; background: linear-gradient(180deg, #409eff 0%, #66b1ff 100%); border-radius: 4px 4px 0 0; margin: 0 auto 8px;"></div>
  1461. <div style="font-size: 12px; color: #909399;">11月</div>
  1462. </div>
  1463. <div style="text-align: center;">
  1464. <div style="width: 40px; height: 180px; background: linear-gradient(180deg, #409eff 0%, #66b1ff 100%); border-radius: 4px 4px 0 0; margin: 0 auto 8px;"></div>
  1465. <div style="font-size: 12px; color: #909399;">12月</div>
  1466. </div>
  1467. <div style="text-align: center;">
  1468. <div style="width: 40px; height: 150px; background: linear-gradient(180deg, #409eff 0%, #66b1ff 100%); border-radius: 4px 4px 0 0; margin: 0 auto 8px;"></div>
  1469. <div style="font-size: 12px; color: #909399;">1月</div>
  1470. </div>
  1471. </div>
  1472. </div>
  1473. </div>
  1474. <div class="card">
  1475. <div class="card-header">
  1476. <span class="card-title">消耗占比</span>
  1477. </div>
  1478. <div class="card-body">
  1479. <div style="height: 250px; display: flex; align-items: center; justify-content: center;">
  1480. <div style="width: 180px; height: 180px; border-radius: 50%; background: conic-gradient(#409eff 0deg 200deg, #52c41a 200deg 290deg, #fa8c16 290deg 340deg, #722ed1 340deg 360deg); position: relative;">
  1481. <div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100px; height: 100px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column;">
  1482. <span style="font-size: 20px; font-weight: 600; color: #303133;">¥5,250</span>
  1483. <span style="font-size: 12px; color: #909399;">总支出</span>
  1484. </div>
  1485. </div>
  1486. </div>
  1487. <div style="display: flex; justify-content: center; gap: 20px; margin-top: 16px;">
  1488. <div style="display: flex; align-items: center; gap: 6px;">
  1489. <span style="width: 12px; height: 12px; background: #409eff; border-radius: 2px;"></span>
  1490. <span style="font-size: 13px;">羽毛球 56%</span>
  1491. </div>
  1492. <div style="display: flex; align-items: center; gap: 6px;">
  1493. <span style="width: 12px; height: 12px; background: #52c41a; border-radius: 2px;"></span>
  1494. <span style="font-size: 13px;">场地 25%</span>
  1495. </div>
  1496. <div style="display: flex; align-items: center; gap: 6px;">
  1497. <span style="width: 12px; height: 12px; background: #fa8c16; border-radius: 2px;"></span>
  1498. <span style="font-size: 13px;">饮料 14%</span>
  1499. </div>
  1500. <div style="display: flex; align-items: center; gap: 6px;">
  1501. <span style="width: 12px; height: 12px; background: #722ed1; border-radius: 2px;"></span>
  1502. <span style="font-size: 13px;">其他 5%</span>
  1503. </div>
  1504. </div>
  1505. </div>
  1506. </div>
  1507. </div>
  1508. <div class="card">
  1509. <div class="card-header">
  1510. <span class="card-title">活动排行榜</span>
  1511. </div>
  1512. <div class="card-body">
  1513. <div class="table-container">
  1514. <table>
  1515. <thead>
  1516. <tr>
  1517. <th>排名</th>
  1518. <th>用户</th>
  1519. <th>参与次数</th>
  1520. <th>签到率</th>
  1521. <th>累计消费</th>
  1522. </tr>
  1523. </thead>
  1524. <tbody>
  1525. <tr>
  1526. <td>🥇 1</td>
  1527. <td>张三</td>
  1528. <td>15次</td>
  1529. <td>95%</td>
  1530. <td>¥525.00</td>
  1531. </tr>
  1532. <tr>
  1533. <td>🥈 2</td>
  1534. <td>李四</td>
  1535. <td>12次</td>
  1536. <td>90%</td>
  1537. <td>¥420.00</td>
  1538. </tr>
  1539. <tr>
  1540. <td>🥉 3</td>
  1541. <td>王五</td>
  1542. <td>10次</td>
  1543. <td>85%</td>
  1544. <td>¥350.00</td>
  1545. </tr>
  1546. <tr>
  1547. <td>4</td>
  1548. <td>赵六</td>
  1549. <td>8次</td>
  1550. <td>80%</td>
  1551. <td>¥280.00</td>
  1552. </tr>
  1553. <tr>
  1554. <td>5</td>
  1555. <td>钱七</td>
  1556. <td>6次</td>
  1557. <td>75%</td>
  1558. <td>¥210.00</td>
  1559. </tr>
  1560. </tbody>
  1561. </table>
  1562. </div>
  1563. </div>
  1564. </div>
  1565. </div>
  1566. <!-- 库存管理页面 -->
  1567. <div id="page-stock" class="page">
  1568. <div class="stat-cards">
  1569. <div class="stat-card">
  1570. <div class="stat-icon blue">📦</div>
  1571. <div class="stat-info">
  1572. <h3>8</h3>
  1573. <p>耗材种类</p>
  1574. </div>
  1575. </div>
  1576. <div class="stat-card">
  1577. <div class="stat-icon green">🎯</div>
  1578. <div class="stat-info">
  1579. <h3>485</h3>
  1580. <p>总库存数量</p>
  1581. </div>
  1582. </div>
  1583. <div class="stat-card">
  1584. <div class="stat-icon orange">💵</div>
  1585. <div class="stat-info">
  1586. <h3>¥4,200</h3>
  1587. <p>库存价值</p>
  1588. </div>
  1589. </div>
  1590. <div class="stat-card">
  1591. <div class="stat-icon purple">⚠️</div>
  1592. <div class="stat-info">
  1593. <h3>2</h3>
  1594. <p>需要补货</p>
  1595. </div>
  1596. </div>
  1597. </div>
  1598. <div class="card">
  1599. <div class="card-header">
  1600. <span class="card-title">库存列表</span>
  1601. <button class="btn btn-primary">导出库存</button>
  1602. </div>
  1603. <div class="card-body">
  1604. <div class="table-container">
  1605. <table>
  1606. <thead>
  1607. <tr>
  1608. <th>商品名称</th>
  1609. <th>分类</th>
  1610. <th>当前库存</th>
  1611. <th>单位</th>
  1612. <th>平均单价</th>
  1613. <th>库存价值</th>
  1614. <th>最近采购</th>
  1615. <th>状态</th>
  1616. <th>操作</th>
  1617. </tr>
  1618. </thead>
  1619. <tbody>
  1620. <tr>
  1621. <td>亚狮龙10号羽毛球</td>
  1622. <td>羽毛球</td>
  1623. <td style="color: #52c41a; font-weight: 500;">240</td>
  1624. <td>个</td>
  1625. <td>¥15.00</td>
  1626. <td>¥3,600.00</td>
  1627. <td>2024-01-10</td>
  1628. <td><span class="tag tag-success">充足</span></td>
  1629. <td>
  1630. <button class="btn btn-default" style="padding: 4px 8px;">采购</button>
  1631. <button class="btn btn-default" style="padding: 4px 8px;">调整</button>
  1632. </td>
  1633. </tr>
  1634. <tr>
  1635. <td>尤尼克斯手胶</td>
  1636. <td>手胶</td>
  1637. <td style="color: #f56c6c; font-weight: 500;">15</td>
  1638. <td>个</td>
  1639. <td>¥1.50</td>
  1640. <td>¥22.50</td>
  1641. <td>2024-01-05</td>
  1642. <td><span class="tag tag-danger">不足</span></td>
  1643. <td>
  1644. <button class="btn btn-warning" style="padding: 4px 8px;">采购</button>
  1645. <button class="btn btn-default" style="padding: 4px 8px;">调整</button>
  1646. </td>
  1647. </tr>
  1648. <tr>
  1649. <td>红牛运动饮料</td>
  1650. <td>饮料</td>
  1651. <td style="color: #f56c6c; font-weight: 500;">8</td>
  1652. <td>瓶</td>
  1653. <td>¥5.67</td>
  1654. <td>¥45.36</td>
  1655. <td>2024-01-02</td>
  1656. <td><span class="tag tag-danger">不足</span></td>
  1657. <td>
  1658. <button class="btn btn-warning" style="padding: 4px 8px;">采购</button>
  1659. <button class="btn btn-default" style="padding: 4px 8px;">调整</button>
  1660. </td>
  1661. </tr>
  1662. <tr>
  1663. <td>场地费</td>
  1664. <td>场地</td>
  1665. <td>-</td>
  1666. <td>次</td>
  1667. <td>¥150.00</td>
  1668. <td>-</td>
  1669. <td>2024-01-15</td>
  1670. <td><span class="tag tag-info">-</span></td>
  1671. <td>
  1672. <button class="btn btn-default" style="padding: 4px 8px;">查看</button>
  1673. </td>
  1674. </tr>
  1675. </tbody>
  1676. </table>
  1677. </div>
  1678. </div>
  1679. </div>
  1680. </div>
  1681. </div>
  1682. </main>
  1683. </div>
  1684. <!-- 弹窗 -->
  1685. <!-- 签到弹窗 -->
  1686. <div id="checkinModal" class="modal">
  1687. <div class="modal-content" style="width: 400px;">
  1688. <div class="modal-header">
  1689. <span class="modal-title">添加签到</span>
  1690. <span class="modal-close" onclick="closeModal('checkinModal')">&times;</span>
  1691. </div>
  1692. <div class="modal-body">
  1693. <div class="form-group">
  1694. <label class="form-label">选择用户</label>
  1695. <select class="form-select">
  1696. <option>请选择用户</option>
  1697. <option>张三</option>
  1698. <option>李四</option>
  1699. <option>王五</option>
  1700. <option>赵六</option>
  1701. </select>
  1702. </div>
  1703. <div class="form-group">
  1704. <label class="form-label">备注</label>
  1705. <textarea class="form-input" rows="3" placeholder="可选"></textarea>
  1706. </div>
  1707. </div>
  1708. <div class="modal-footer">
  1709. <button class="btn btn-default" onclick="closeModal('checkinModal')">取消</button>
  1710. <button class="btn btn-primary">确认签到</button>
  1711. </div>
  1712. </div>
  1713. </div>
  1714. <!-- 活动弹窗 -->
  1715. <div id="activityModal" class="modal">
  1716. <div class="modal-content" style="width: 800px;">
  1717. <div class="modal-header">
  1718. <span class="modal-title">新建活动</span>
  1719. <span class="modal-close" onclick="closeModal('activityModal')">&times;</span>
  1720. </div>
  1721. <div class="modal-body">
  1722. <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px;">
  1723. <div>
  1724. <div class="form-group">
  1725. <label class="form-label">活动日期 <span style="color: #f56c6c;">*</span></label>
  1726. <input type="date" class="form-input" value="2024-01-15">
  1727. </div>
  1728. <div class="form-group">
  1729. <label class="form-label">活动标题 <span style="color: #f56c6c;">*</span></label>
  1730. <input type="text" class="form-input" placeholder="请输入活动标题">
  1731. </div>
  1732. <div class="form-group">
  1733. <label class="form-label">场地</label>
  1734. <input type="text" class="form-input" placeholder="请输入场地">
  1735. </div>
  1736. <div class="form-group">
  1737. <label class="form-label">天气</label>
  1738. <select class="form-select">
  1739. <option>晴</option>
  1740. <option>阴</option>
  1741. <option>多云</option>
  1742. <option>小雨</option>
  1743. </select>
  1744. </div>
  1745. <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 12px;">
  1746. <div class="form-group">
  1747. <label class="form-label">开始时间</label>
  1748. <input type="time" class="form-input" value="19:00">
  1749. </div>
  1750. <div class="form-group">
  1751. <label class="form-label">结束时间</label>
  1752. <input type="time" class="form-input" value="22:00">
  1753. </div>
  1754. </div>
  1755. <div class="form-group">
  1756. <label class="form-label">其他费用 <span style="color: #909399; font-weight: normal;">(元)</span></label>
  1757. <input type="number" class="form-input" id="otherCost" placeholder="请输入其他费用" min="0" step="0.01" value="150" oninput="calculateMultiBatchCost()">
  1758. </div>
  1759. <div class="form-group">
  1760. <label class="form-label">参与人员</label>
  1761. <div class="user-selector">
  1762. <div class="user-option selected">
  1763. <div class="avatar" style="width: 40px; height: 40px; margin: 0 auto 4px;">张</div>
  1764. <div style="font-size: 12px;">张三</div>
  1765. </div>
  1766. <div class="user-option selected">
  1767. <div class="avatar" style="width: 40px; height: 40px; margin: 0 auto 4px; background: #52c41a;">李</div>
  1768. <div style="font-size: 12px;">李四</div>
  1769. </div>
  1770. <div class="user-option selected">
  1771. <div class="avatar" style="width: 40px; height: 40px; margin: 0 auto 4px; background: #fa8c16;">王</div>
  1772. <div style="font-size: 12px;">王五</div>
  1773. </div>
  1774. <div class="user-option">
  1775. <div class="avatar" style="width: 40px; height: 40px; margin: 0 auto 4px; background: #722ed1;">赵</div>
  1776. <div style="font-size: 12px;">赵六</div>
  1777. </div>
  1778. <div class="user-option">
  1779. <div class="avatar" style="width: 40px; height: 40px; margin: 0 auto 4px; background: #13c2c2;">钱</div>
  1780. <div style="font-size: 12px;">钱七</div>
  1781. </div>
  1782. </div>
  1783. </div>
  1784. </div>
  1785. <div>
  1786. <div class="form-group">
  1787. <label class="form-label">选择羽毛球批次(可多选)</label>
  1788. <div class="batch-selector" id="batchSelector">
  1789. <!-- 批次1 -->
  1790. <div class="batch-item multi-batch" id="batch-item-1" onclick="toggleBatch(1, 15, 120)">
  1791. <div class="batch-info">
  1792. <div class="batch-checkbox" id="batch-checkbox-1">✓</div>
  1793. <div style="flex: 1;">
  1794. <div class="batch-name">PC-20240110-001</div>
  1795. <div class="batch-details">亚狮龙10号 | ¥15.00/个 | 剩余 120个</div>
  1796. </div>
  1797. </div>
  1798. <div style="display: flex; align-items: center; gap: 8px;">
  1799. <input type="number" class="form-input" id="batch-qty-1" placeholder="数量" min="0" max="120" style="width: 70px;" oninput="calculateMultiBatchCost()" onclick="event.stopPropagation()">
  1800. <span style="color: #909399; font-size: 12px;">个</span>
  1801. </div>
  1802. </div>
  1803. <!-- 批次2 -->
  1804. <div class="batch-item multi-batch" id="batch-item-2" onclick="toggleBatch(2, 16, 60)">
  1805. <div class="batch-info">
  1806. <div class="batch-checkbox" id="batch-checkbox-2">✓</div>
  1807. <div style="flex: 1;">
  1808. <div class="batch-name">PC-20240110-002</div>
  1809. <div class="batch-details">亚狮龙10号 | ¥16.00/个 | 剩余 60个</div>
  1810. </div>
  1811. </div>
  1812. <div style="display: flex; align-items: center; gap: 8px;">
  1813. <input type="number" class="form-input" id="batch-qty-2" placeholder="数量" min="0" max="60" style="width: 70px;" oninput="calculateMultiBatchCost()" onclick="event.stopPropagation()">
  1814. <span style="color: #909399; font-size: 12px;">个</span>
  1815. </div>
  1816. </div>
  1817. <!-- 批次3 -->
  1818. <div class="batch-item multi-batch" id="batch-item-3" onclick="toggleBatch(3, 18, 30)">
  1819. <div class="batch-info">
  1820. <div class="batch-checkbox" id="batch-checkbox-3">✓</div>
  1821. <div style="flex: 1;">
  1822. <div class="batch-name">PC-20240105-001</div>
  1823. <div class="batch-details">尤尼克斯比赛级 | ¥18.00/个 | 剩余 30个</div>
  1824. </div>
  1825. </div>
  1826. <div style="display: flex; align-items: center; gap: 8px;">
  1827. <input type="number" class="form-input" id="batch-qty-3" placeholder="数量" min="0" max="30" style="width: 70px;" oninput="calculateMultiBatchCost()" onclick="event.stopPropagation()">
  1828. <span style="color: #909399; font-size: 12px;">个</span>
  1829. </div>
  1830. </div>
  1831. </div>
  1832. </div>
  1833. <div class="form-group">
  1834. <label class="form-label">已选批次汇总</label>
  1835. <div id="selectedBatchesSummary" style="background: #f5f7fa; border-radius: 6px; padding: 12px; font-size: 13px;">
  1836. <div style="color: #909399; text-align: center;">请选择批次并输入消耗数量</div>
  1837. </div>
  1838. </div>
  1839. <div class="cost-preview" id="costPreview">
  1840. <h4>费用预览</h4>
  1841. <div class="cost-row">
  1842. <span>羽毛球费用</span>
  1843. <span>¥<span id="shuttleCost">0.00</span></span>
  1844. </div>
  1845. <div class="cost-row">
  1846. <span>其他费用</span>
  1847. <span>¥<span id="otherCostPreview">150.00</span></span>
  1848. </div>
  1849. <div class="cost-row">
  1850. <span>消耗总数</span>
  1851. <span><span id="totalShuttleCount">0</span>个</span>
  1852. </div>
  1853. <div class="cost-row">
  1854. <span>参与人数</span>
  1855. <span><span id="participantCount">3</span>人</span>
  1856. </div>
  1857. <div class="cost-row cost-total">
  1858. <span>总费用</span>
  1859. <span>¥<span id="totalCost">150.00</span></span>
  1860. </div>
  1861. <div class="cost-row" style="margin-top: 8px; font-size: 13px; opacity: 0.8;">
  1862. <span>人均费用</span>
  1863. <span>¥<span id="avgCost">50.00</span></span>
  1864. </div>
  1865. </div>
  1866. </div>
  1867. </div>
  1868. </div>
  1869. <div class="modal-footer">
  1870. <button class="btn btn-default" onclick="closeModal('activityModal')">取消</button>
  1871. <button class="btn btn-primary">保存活动</button>
  1872. </div>
  1873. </div>
  1874. </div>
  1875. <!-- 采购弹窗 -->
  1876. <div id="procurementModal" class="modal">
  1877. <div class="modal-content">
  1878. <div class="modal-header">
  1879. <span class="modal-title">新建采购</span>
  1880. <span class="modal-close" onclick="closeModal('procurementModal')">&times;</span>
  1881. </div>
  1882. <div class="modal-body">
  1883. <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 16px;">
  1884. <div class="form-group">
  1885. <label class="form-label">采购日期 <span style="color: #f56c6c;">*</span></label>
  1886. <input type="date" class="form-input" value="2024-01-15">
  1887. </div>
  1888. <div class="form-group">
  1889. <label class="form-label">耗材分类 <span style="color: #f56c6c;">*</span></label>
  1890. <select class="form-select">
  1891. <option>请选择分类</option>
  1892. <option>羽毛球</option>
  1893. <option>球拍</option>
  1894. <option>手胶</option>
  1895. <option>饮料</option>
  1896. <option>其他</option>
  1897. </select>
  1898. </div>
  1899. <div class="form-group">
  1900. <label class="form-label">商品名称 <span style="color: #f56c6c;">*</span></label>
  1901. <input type="text" class="form-input" placeholder="请输入商品名称">
  1902. </div>
  1903. <div class="form-group">
  1904. <label class="form-label">规格型号</label>
  1905. <input type="text" class="form-input" placeholder="如:12个/筒">
  1906. </div>
  1907. <div class="form-group">
  1908. <label class="form-label">计量单位 <span style="color: #f56c6c;">*</span></label>
  1909. <select class="form-select">
  1910. <option>个</option>
  1911. <option>筒</option>
  1912. <option>箱</option>
  1913. <option>瓶</option>
  1914. <option>包</option>
  1915. </select>
  1916. </div>
  1917. <div class="form-group">
  1918. <label class="form-label">采购数量 <span style="color: #f56c6c;">*</span></label>
  1919. <input type="number" class="form-input" placeholder="请输入数量" min="1">
  1920. </div>
  1921. <div class="form-group">
  1922. <label class="form-label">单价 <span style="color: #f56c6c;">*</span> (元)</label>
  1923. <input type="number" class="form-input" placeholder="请输入单价" min="0" step="0.01">
  1924. </div>
  1925. <div class="form-group">
  1926. <label class="form-label">供应商</label>
  1927. <input type="text" class="form-input" placeholder="请输入供应商">
  1928. </div>
  1929. </div>
  1930. <div class="form-group">
  1931. <label class="form-label">备注</label>
  1932. <textarea class="form-input" rows="2" placeholder="可选"></textarea>
  1933. </div>
  1934. <div class="alert alert-success">
  1935. 💡 采购入库后自动更新库存
  1936. </div>
  1937. </div>
  1938. <div class="modal-footer">
  1939. <button class="btn btn-default" onclick="closeModal('procurementModal')">取消</button>
  1940. <button class="btn btn-primary">提交采购</button>
  1941. </div>
  1942. </div>
  1943. </div>
  1944. <!-- 账单弹窗 -->
  1945. <div id="billModal" class="modal">
  1946. <div class="modal-content" style="width: 500px;">
  1947. <div class="modal-header">
  1948. <span class="modal-title">生成账单</span>
  1949. <span class="modal-close" onclick="closeModal('billModal')">&times;</span>
  1950. </div>
  1951. <div class="modal-body">
  1952. <div class="steps">
  1953. <div class="step done">
  1954. <div class="step-icon">✓</div>
  1955. <div class="step-label">选择月份</div>
  1956. </div>
  1957. <div class="step done">
  1958. <div class="step-icon">✓</div>
  1959. <div class="step-label">确认用户</div>
  1960. </div>
  1961. <div class="step active">
  1962. <div class="step-icon">3</div>
  1963. <div class="step-label">预览生成</div>
  1964. </div>
  1965. </div>
  1966. <div class="alert alert-success">
  1967. ✓ 系统将根据2024年1月的活动记录自动生成账单
  1968. </div>
  1969. <div style="background: #f5f7fa; padding: 16px; border-radius: 8px; margin-bottom: 16px;">
  1970. <div style="display: flex; justify-content: space-between; margin-bottom: 8px;">
  1971. <span style="color: #909399;">账单月份</span>
  1972. <span style="font-weight: 500;">2024年1月</span>
  1973. </div>
  1974. <div style="display: flex; justify-content: space-between; margin-bottom: 8px;">
  1975. <span style="color: #909399;">参与用户</span>
  1976. <span style="font-weight: 500;">15人</span>
  1977. </div>
  1978. <div style="display: flex; justify-content: space-between; margin-bottom: 8px;">
  1979. <span style="color: #909399;">活动场次</span>
  1980. <span style="font-weight: 500;">18场</span>
  1981. </div>
  1982. <div style="display: flex; justify-content: space-between;">
  1983. <span style="color: #909399;">预计总金额</span>
  1984. <span style="font-weight: 500; color: #f56c6c; font-size: 18px;">¥5,250.00</span>
  1985. </div>
  1986. </div>
  1987. </div>
  1988. <div class="modal-footer">
  1989. <button class="btn btn-default" onclick="closeModal('billModal')">取消</button>
  1990. <button class="btn btn-primary">确认生成</button>
  1991. </div>
  1992. </div>
  1993. </div>
  1994. <script>
  1995. // 签到数据
  1996. const signinData = [
  1997. { name: '张三', avatar: '张', time: '18:30:25', status: '已签到' },
  1998. { name: '李四', avatar: '李', time: '18:35:10', status: '已签到' },
  1999. { name: '王五', avatar: '王', time: '18:42:08', status: '已签到' },
  2000. { name: '赵六', avatar: '赵', time: '18:50:33', status: '已签到' },
  2001. { name: '钱七', avatar: '钱', time: '19:05:22', status: '已签到' },
  2002. { name: '孙八', avatar: '孙', time: '19:12:45', status: '已签到' },
  2003. ];
  2004. let isCheckedIn = false;
  2005. // 批次数据
  2006. const batchData = {
  2007. 1: { name: 'PC-20240110-001', item: '亚狮龙10号', price: 15.00, stock: 120 },
  2008. 2: { name: 'PC-20240110-002', item: '亚狮龙10号', price: 16.00, stock: 60 },
  2009. 3: { name: 'PC-20240105-001', item: '尤尼克斯比赛级', price: 18.00, stock: 30 }
  2010. };
  2011. // 渲染签到列表
  2012. function renderSigninList() {
  2013. const list = document.getElementById('signinList');
  2014. list.innerHTML = signinData.map(item => `
  2015. <div class="signin-card">
  2016. <div class="signin-avatar">${item.avatar}</div>
  2017. <div class="signin-info">
  2018. <div class="signin-name">${item.name}</div>
  2019. <div class="signin-time">签到时间: ${item.time}</div>
  2020. </div>
  2021. <span class="tag tag-success">${item.status}</span>
  2022. </div>
  2023. `).join('');
  2024. }
  2025. // 页面切换
  2026. function showPage(pageName) {
  2027. document.querySelectorAll('.page').forEach(p => p.classList.remove('active'));
  2028. document.querySelectorAll('.menu-item').forEach(m => m.classList.remove('active'));
  2029. document.getElementById('page-' + pageName).classList.add('active');
  2030. event.target.closest('.menu-item').classList.add('active');
  2031. const pageNames = {
  2032. 'signin': '签到',
  2033. 'activity': '活动记录',
  2034. 'procurement': '采购管理',
  2035. 'billing': '账单管理',
  2036. 'statistics': '数据统计',
  2037. 'stock': '库存管理'
  2038. };
  2039. document.getElementById('currentPage').textContent = pageNames[pageName];
  2040. }
  2041. // 签到
  2042. function doCheckin() {
  2043. if (isCheckedIn) return;
  2044. isCheckedIn = true;
  2045. const btn = document.getElementById('checkinBtn');
  2046. const time = document.getElementById('checkinTime');
  2047. btn.classList.add('checked');
  2048. btn.innerHTML = '<span>✓</span>已签到';
  2049. time.textContent = '签到时间: ' + new Date().toLocaleTimeString('zh-CN', { hour12: false });
  2050. const newSignin = {
  2051. name: '我',
  2052. avatar: '我',
  2053. time: new Date().toLocaleTimeString('zh-CN', { hour12: false }),
  2054. status: '已签到'
  2055. };
  2056. signinData.unshift(newSignin);
  2057. renderSigninList();
  2058. }
  2059. // 切换批次选择(多选)
  2060. function toggleBatch(batchId, price, stock) {
  2061. const item = document.getElementById('batch-item-' + batchId);
  2062. const qtyInput = document.getElementById('batch-qty-' + batchId);
  2063. // 切换选中状态
  2064. item.classList.toggle('selected');
  2065. // 如果选中但没有数量,默认设为1
  2066. if (item.classList.contains('selected') && !qtyInput.value) {
  2067. qtyInput.value = 1;
  2068. }
  2069. // 重新计算费用
  2070. calculateMultiBatchCost();
  2071. }
  2072. // 多批次费用计算
  2073. function calculateMultiBatchCost() {
  2074. let totalShuttleCost = 0;
  2075. let totalShuttleCount = 0;
  2076. const selectedBatches = [];
  2077. // 遍历所有批次
  2078. for (let id in batchData) {
  2079. const item = document.getElementById('batch-item-' + id);
  2080. const qtyInput = document.getElementById('batch-qty-' + id);
  2081. const batch = batchData[id];
  2082. if (item.classList.contains('selected')) {
  2083. const qty = parseInt(qtyInput.value) || 0;
  2084. if (qty > 0) {
  2085. const cost = qty * batch.price;
  2086. totalShuttleCost += cost;
  2087. totalShuttleCount += qty;
  2088. selectedBatches.push({
  2089. name: batch.name,
  2090. item: batch.item,
  2091. price: batch.price,
  2092. qty: qty,
  2093. cost: cost,
  2094. stock: batch.stock
  2095. });
  2096. // 检查库存
  2097. if (qty > batch.stock) {
  2098. qtyInput.style.borderColor = '#f56c6c';
  2099. } else {
  2100. qtyInput.style.borderColor = '#52c41a';
  2101. }
  2102. } else {
  2103. qtyInput.style.borderColor = '#dcdfe6';
  2104. }
  2105. } else {
  2106. qtyInput.style.borderColor = '#dcdfe6';
  2107. }
  2108. }
  2109. // 获取其他费用
  2110. const otherCost = parseFloat(document.getElementById('otherCost').value) || 0;
  2111. // 获取参与人数
  2112. const participantCount = document.querySelectorAll('.user-selector .user-option.selected').length;
  2113. // 计算总费用和人均费用
  2114. const totalCost = totalShuttleCost + otherCost;
  2115. const avgCost = participantCount > 0 ? (totalCost / participantCount).toFixed(2) : '0.00';
  2116. // 更新费用显示
  2117. document.getElementById('shuttleCost').textContent = totalShuttleCost.toFixed(2);
  2118. document.getElementById('otherCostPreview').textContent = otherCost.toFixed(2);
  2119. document.getElementById('totalShuttleCount').textContent = totalShuttleCount;
  2120. document.getElementById('participantCount').textContent = participantCount;
  2121. document.getElementById('totalCost').textContent = totalCost.toFixed(2);
  2122. document.getElementById('avgCost').textContent = avgCost;
  2123. // 更新已选批次汇总
  2124. updateSelectedBatchesSummary(selectedBatches);
  2125. }
  2126. // 更新已选批次汇总显示
  2127. function updateSelectedBatchesSummary(batches) {
  2128. const summaryDiv = document.getElementById('selectedBatchesSummary');
  2129. if (batches.length === 0) {
  2130. summaryDiv.innerHTML = '<div style="color: #909399; text-align: center;">请选择批次并输入消耗数量</div>';
  2131. return;
  2132. }
  2133. let html = batches.map(b => `
  2134. <div class="batch-summary-item">
  2135. <span class="batch-summary-name">${b.name}</span>
  2136. <span class="batch-summary-qty">${b.qty}个 × ¥${b.price.toFixed(2)}</span>
  2137. <span class="batch-summary-cost">¥${b.cost.toFixed(2)}</span>
  2138. </div>
  2139. `).join('');
  2140. const totalCost = batches.reduce((sum, b) => sum + b.cost, 0);
  2141. html += `
  2142. <div class="batch-summary-total">
  2143. <span>羽毛球合计</span>
  2144. <span>¥${totalCost.toFixed(2)}</span>
  2145. </div>
  2146. `;
  2147. summaryDiv.innerHTML = html;
  2148. }
  2149. // 弹窗控制
  2150. function openModal(modalId) {
  2151. document.getElementById(modalId).classList.add('show');
  2152. }
  2153. function closeModal(modalId) {
  2154. document.getElementById(modalId).classList.remove('show');
  2155. }
  2156. // 点击弹窗外部关闭
  2157. document.querySelectorAll('.modal').forEach(modal => {
  2158. modal.addEventListener('click', function(e) {
  2159. if (e.target === this) {
  2160. this.classList.remove('show');
  2161. }
  2162. });
  2163. });
  2164. // 初始化
  2165. renderSigninList();
  2166. // 初始计算费用
  2167. setTimeout(calculateMultiBatchCost, 100);
  2168. </script>
  2169. </body>
  2170. </html>