| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>商品定价</title>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- body {
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
- background: #f9fafb;
- min-height: 100vh;
- }
- .page-content {
- padding: 24px;
- }
- .section {
- background: #fff;
- border-radius: 12px;
- padding: 20px;
- margin-bottom: 20px;
- box-shadow: 0 1px 3px rgba(0,0,0,0.08);
- }
- .section-title {
- font-size: 15px;
- font-weight: 600;
- color: #111;
- margin-bottom: 16px;
- }
- .product-list {
- display: flex;
- flex-direction: column;
- gap: 16px;
- }
- .product-item {
- display: flex;
- align-items: center;
- gap: 20px;
- padding: 16px;
- background: #fafafa;
- border-radius: 8px;
- border: 1px solid #eee;
- }
- .product-info {
- flex: 1;
- }
- .product-name {
- font-size: 16px;
- font-weight: 600;
- color: #111;
- margin-bottom: 8px;
- }
- .product-desc {
- font-size: 13px;
- color: #666;
- }
- .product-price {
- display: flex;
- align-items: center;
- gap: 12px;
- }
- .price-label {
- font-size: 13px;
- color: #666;
- }
- .price-input-wrapper {
- display: flex;
- align-items: center;
- gap: 6px;
- }
- .price-input {
- width: 100px;
- padding: 8px 12px;
- border: 1px solid #ddd;
- border-radius: 6px;
- font-size: 14px;
- outline: none;
- transition: border-color 0.2s;
- }
- .price-input:focus {
- border-color: #667eea;
- }
- .price-unit {
- font-size: 13px;
- color: #999;
- }
- .btn-confirm {
- display: none;
- width: 32px;
- height: 32px;
- background: #10b981;
- color: #fff;
- border: none;
- border-radius: 50%;
- cursor: pointer;
- font-size: 16px;
- align-items: center;
- justify-content: center;
- transition: all 0.2s;
- }
- .btn-confirm:hover {
- background: #059669;
- transform: scale(1.1);
- }
- .btn-confirm.show {
- display: flex;
- }
- .msg {
- padding: 12px 16px;
- border-radius: 6px;
- margin-bottom: 16px;
- font-size: 13px;
- display: none;
- }
- .msg.success {
- background: #f0fdf4;
- color: #16a34a;
- display: block;
- }
- .msg.error {
- background: #fef2f2;
- color: #ef4444;
- display: block;
- }
- </style>
- </head>
- <body>
- <div class="page-content">
- <div id="msgBox" class="msg"></div>
- <div class="section">
- <h3 class="section-title">商品定价配置</h3>
- <div class="product-list" id="productList"></div>
- </div>
- </div>
- <script src="../../js/product-pricing/product-pricing.js"></script>
- <script>
- (function() {
- let apiBaseUrl = 'http://localhost:3000';
- try {
- if (window.parent && window.parent.getApiBaseUrl) {
- apiBaseUrl = window.parent.getApiBaseUrl();
- }
- } catch (e) {}
-
- window.productPricingManager = new ProductPricingManager({ apiBaseUrl });
- })();
- </script>
- </body>
- </html>
|