product-pricing.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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: #f9fafb;
  16. min-height: 100vh;
  17. }
  18. .page-content {
  19. padding: 24px;
  20. }
  21. .section {
  22. background: #fff;
  23. border-radius: 12px;
  24. padding: 20px;
  25. margin-bottom: 20px;
  26. box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  27. }
  28. .section-title {
  29. font-size: 15px;
  30. font-weight: 600;
  31. color: #111;
  32. margin-bottom: 16px;
  33. }
  34. .product-list {
  35. display: flex;
  36. flex-direction: column;
  37. gap: 16px;
  38. }
  39. .product-item {
  40. display: flex;
  41. align-items: center;
  42. gap: 20px;
  43. padding: 16px;
  44. background: #fafafa;
  45. border-radius: 8px;
  46. border: 1px solid #eee;
  47. }
  48. .product-info {
  49. flex: 1;
  50. }
  51. .product-name {
  52. font-size: 16px;
  53. font-weight: 600;
  54. color: #111;
  55. margin-bottom: 8px;
  56. }
  57. .product-desc {
  58. font-size: 13px;
  59. color: #666;
  60. }
  61. .product-price {
  62. display: flex;
  63. align-items: center;
  64. gap: 12px;
  65. }
  66. .price-label {
  67. font-size: 13px;
  68. color: #666;
  69. }
  70. .price-input-wrapper {
  71. display: flex;
  72. align-items: center;
  73. gap: 6px;
  74. }
  75. .price-input {
  76. width: 100px;
  77. padding: 8px 12px;
  78. border: 1px solid #ddd;
  79. border-radius: 6px;
  80. font-size: 14px;
  81. outline: none;
  82. transition: border-color 0.2s;
  83. }
  84. .price-input:focus {
  85. border-color: #667eea;
  86. }
  87. .price-unit {
  88. font-size: 13px;
  89. color: #999;
  90. }
  91. .btn-confirm {
  92. display: none;
  93. width: 32px;
  94. height: 32px;
  95. background: #10b981;
  96. color: #fff;
  97. border: none;
  98. border-radius: 50%;
  99. cursor: pointer;
  100. font-size: 16px;
  101. align-items: center;
  102. justify-content: center;
  103. transition: all 0.2s;
  104. }
  105. .btn-confirm:hover {
  106. background: #059669;
  107. transform: scale(1.1);
  108. }
  109. .btn-confirm.show {
  110. display: flex;
  111. }
  112. .msg {
  113. padding: 12px 16px;
  114. border-radius: 6px;
  115. margin-bottom: 16px;
  116. font-size: 13px;
  117. display: none;
  118. }
  119. .msg.success {
  120. background: #f0fdf4;
  121. color: #16a34a;
  122. display: block;
  123. }
  124. .msg.error {
  125. background: #fef2f2;
  126. color: #ef4444;
  127. display: block;
  128. }
  129. </style>
  130. </head>
  131. <body>
  132. <div class="page-content">
  133. <div id="msgBox" class="msg"></div>
  134. <div class="section">
  135. <h3 class="section-title">商品定价配置</h3>
  136. <div class="product-list" id="productList"></div>
  137. </div>
  138. </div>
  139. <script src="../../js/product-pricing/product-pricing.js"></script>
  140. <script>
  141. (function() {
  142. let apiBaseUrl = 'http://localhost:3000';
  143. try {
  144. if (window.parent && window.parent.getApiBaseUrl) {
  145. apiBaseUrl = window.parent.getApiBaseUrl();
  146. }
  147. } catch (e) {}
  148. window.productPricingManager = new ProductPricingManager({ apiBaseUrl });
  149. })();
  150. </script>
  151. </body>
  152. </html>