更新积分商城相关页面
删除了以下已选择商品和添加商品相关页面: - 已选择商品-弹窗.html - 添加商品.html - 积分兑换商城.html - 总订单查看.html 新增了以下积分商城页面: - 添加商品-弹窗-后续编辑.html - 添加商品-弹窗-首次设置.html - 积分优惠-添加商品.html - 积分商城.html
This commit is contained in:
		
							parent
							
								
									561570b11b
								
							
						
					
					
						commit
						50f605cbec
					
				|  | @ -0,0 +1,552 @@ | |||
| <!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-color: rgba(0, 0, 0, 0.5); | ||||
|             display: flex; | ||||
|             justify-content: center; | ||||
|             align-items: center; | ||||
|             min-height: 100vh; | ||||
|             padding: 20px; | ||||
|         } | ||||
| 
 | ||||
|         .modal { | ||||
|             background: white; | ||||
|             border-radius: 8px; | ||||
|             box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); | ||||
|             width: 100%; | ||||
|             max-width: 500px; | ||||
|             position: relative; | ||||
|             overflow: hidden; | ||||
|         } | ||||
| 
 | ||||
|         .modal-header { | ||||
|             display: flex; | ||||
|             justify-content: space-between; | ||||
|             align-items: center; | ||||
|             padding: 20px 24px; | ||||
|             border-bottom: 1px solid #f0f0f0; | ||||
|             background-color: #fafafa; | ||||
|         } | ||||
| 
 | ||||
|         .modal-title { | ||||
|             font-size: 18px; | ||||
|             font-weight: 600; | ||||
|             color: #333; | ||||
|         } | ||||
| 
 | ||||
|         .close-btn { | ||||
|             width: 24px; | ||||
|             height: 24px; | ||||
|             border: none; | ||||
|             background: none; | ||||
|             cursor: pointer; | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             justify-content: center; | ||||
|             color: #666; | ||||
|             font-size: 18px; | ||||
|             border-radius: 4px; | ||||
|             transition: background-color 0.2s; | ||||
|         } | ||||
| 
 | ||||
|         .close-btn:hover { | ||||
|             background-color: #f5f5f5; | ||||
|         } | ||||
| 
 | ||||
|         .modal-content { | ||||
|             padding: 24px; | ||||
|         } | ||||
| 
 | ||||
|         .product-info { | ||||
|             margin-bottom: 24px; | ||||
|             padding: 16px; | ||||
|             background-color: #f8f9fa; | ||||
|             border-radius: 6px; | ||||
|             border: 1px solid #e9ecef; | ||||
|         } | ||||
| 
 | ||||
|         .info-row { | ||||
|             display: flex; | ||||
|             margin-bottom: 8px; | ||||
|             font-size: 14px; | ||||
|         } | ||||
| 
 | ||||
|         .info-row:last-child { | ||||
|             margin-bottom: 0; | ||||
|         } | ||||
| 
 | ||||
|         .info-label { | ||||
|             color: #666; | ||||
|             width: 80px; | ||||
|             flex-shrink: 0; | ||||
|         } | ||||
| 
 | ||||
|         .info-value { | ||||
|             color: #333; | ||||
|             flex: 1; | ||||
|         } | ||||
| 
 | ||||
|         .form-group { | ||||
|             margin-bottom: 20px; | ||||
|         } | ||||
| 
 | ||||
|         .form-label { | ||||
|             display: block; | ||||
|             margin-bottom: 8px; | ||||
|             font-size: 14px; | ||||
|             color: #333; | ||||
|             font-weight: 500; | ||||
|         } | ||||
| 
 | ||||
|         .required { | ||||
|             color: #ff4757; | ||||
|         } | ||||
| 
 | ||||
|         .input-wrapper { | ||||
|             position: relative; | ||||
|         } | ||||
| 
 | ||||
|         .form-input { | ||||
|             width: 100%; | ||||
|             padding: 10px 12px; | ||||
|             border: 1px solid #d9d9d9; | ||||
|             border-radius: 4px; | ||||
|             font-size: 14px; | ||||
|             transition: border-color 0.2s; | ||||
|         } | ||||
| 
 | ||||
|         .form-input:focus { | ||||
|             outline: none; | ||||
|             border-color: #1890ff; | ||||
|             box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2); | ||||
|         } | ||||
| 
 | ||||
|         .number-input-group { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             border: 1px solid #d9d9d9; | ||||
|             border-radius: 4px; | ||||
|             overflow: hidden; | ||||
|             background: white; | ||||
|         } | ||||
| 
 | ||||
|         .number-input-group:focus-within { | ||||
|             border-color: #1890ff; | ||||
|             box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2); | ||||
|         } | ||||
| 
 | ||||
|         .number-btn { | ||||
|             width: 32px; | ||||
|             height: 40px; | ||||
|             border: none; | ||||
|             background: #fafafa; | ||||
|             cursor: pointer; | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             justify-content: center; | ||||
|             font-size: 16px; | ||||
|             color: #666; | ||||
|             transition: background-color 0.2s; | ||||
|         } | ||||
| 
 | ||||
|         .number-btn:hover { | ||||
|             background-color: #f0f0f0; | ||||
|         } | ||||
| 
 | ||||
|         .number-btn:disabled { | ||||
|             cursor: not-allowed; | ||||
|             color: #ccc; | ||||
|         } | ||||
| 
 | ||||
|         .number-input { | ||||
|             flex: 1; | ||||
|             border: none; | ||||
|             padding: 10px 12px; | ||||
|             font-size: 14px; | ||||
|             text-align: center; | ||||
|             outline: none; | ||||
|         } | ||||
| 
 | ||||
|         .select-wrapper { | ||||
|             position: relative; | ||||
|         } | ||||
| 
 | ||||
|         .form-select { | ||||
|             width: 100%; | ||||
|             padding: 10px 32px 10px 12px; | ||||
|             border: 1px solid #d9d9d9; | ||||
|             border-radius: 4px; | ||||
|             font-size: 14px; | ||||
|             background: white; | ||||
|             cursor: pointer; | ||||
|             appearance: none; | ||||
|             -webkit-appearance: none; | ||||
|             -moz-appearance: none; | ||||
|         } | ||||
| 
 | ||||
|         .form-select:focus { | ||||
|             outline: none; | ||||
|             border-color: #1890ff; | ||||
|             box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2); | ||||
|         } | ||||
| 
 | ||||
|         .select-arrow { | ||||
|             position: absolute; | ||||
|             right: 12px; | ||||
|             top: 50%; | ||||
|             transform: translateY(-50%); | ||||
|             pointer-events: none; | ||||
|             color: #666; | ||||
|         } | ||||
| 
 | ||||
|         .limit-setting { | ||||
|             display: flex; | ||||
|             gap: 12px; | ||||
|             align-items: flex-end; | ||||
|         } | ||||
| 
 | ||||
|         .limit-input { | ||||
|             flex: 1; | ||||
|         } | ||||
| 
 | ||||
|         .limit-select { | ||||
|             flex: 0 0 100px; | ||||
|         } | ||||
| 
 | ||||
|         .radio-group { | ||||
|             display: flex; | ||||
|             gap: 20px; | ||||
|             margin-top: 8px; | ||||
|         } | ||||
| 
 | ||||
|         .radio-option { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             cursor: pointer; | ||||
|             position: relative; | ||||
|         } | ||||
| 
 | ||||
|         .radio-option input[type="radio"] { | ||||
|             margin: 0; | ||||
|             margin-right: 8px; | ||||
|             width: 16px; | ||||
|             height: 16px; | ||||
|             cursor: pointer; | ||||
|         } | ||||
| 
 | ||||
|         .radio-option label { | ||||
|             font-size: 14px; | ||||
|             color: #333; | ||||
|             cursor: pointer; | ||||
|             margin: 0; | ||||
|         } | ||||
| 
 | ||||
|         .exchange-only, | ||||
|         .discount-only { | ||||
|             transition: opacity 0.3s ease; | ||||
|         } | ||||
| 
 | ||||
|         .modal-footer { | ||||
|             padding: 16px 24px; | ||||
|             border-top: 1px solid #f0f0f0; | ||||
|             display: flex; | ||||
|             gap: 12px; | ||||
|             justify-content: flex-end; | ||||
|         } | ||||
| 
 | ||||
|         .btn { | ||||
|             padding: 8px 24px; | ||||
|             border-radius: 4px; | ||||
|             font-size: 14px; | ||||
|             cursor: pointer; | ||||
|             transition: all 0.2s; | ||||
|             border: 1px solid; | ||||
|             min-width: 80px; | ||||
|         } | ||||
| 
 | ||||
|         .btn-cancel { | ||||
|             background: white; | ||||
|             color: #666; | ||||
|             border-color: #d9d9d9; | ||||
|         } | ||||
| 
 | ||||
|         .btn-cancel:hover { | ||||
|             background: #f5f5f5; | ||||
|             border-color: #bfbfbf; | ||||
|         } | ||||
| 
 | ||||
|         .btn-primary { | ||||
|             background: #1890ff; | ||||
|             color: white; | ||||
|             border-color: #1890ff; | ||||
|         } | ||||
| 
 | ||||
|         .btn-primary:hover { | ||||
|             background: #40a9ff; | ||||
|             border-color: #40a9ff; | ||||
|         } | ||||
| 
 | ||||
|         @media (max-width: 480px) { | ||||
|             .modal { | ||||
|                 margin: 0; | ||||
|                 border-radius: 0; | ||||
|                 height: 100vh; | ||||
|                 max-width: none; | ||||
|             } | ||||
|              | ||||
|             .modal-content { | ||||
|                 padding: 20px; | ||||
|             } | ||||
|              | ||||
|             .modal-footer { | ||||
|                 padding: 16px 20px; | ||||
|             } | ||||
|              | ||||
|             .btn { | ||||
|                 flex: 1; | ||||
|             } | ||||
|         } | ||||
|     </style> | ||||
| </head> | ||||
| <body> | ||||
|     <div class="modal"> | ||||
|         <div class="modal-header"> | ||||
|             <h2 class="modal-title">已选择商品</h2> | ||||
|             <button class="close-btn" onclick="closeModal()">×</button> | ||||
|         </div> | ||||
|          | ||||
|         <div class="modal-content"> | ||||
|             <div class="product-info"> | ||||
|                 <div class="info-row"> | ||||
|                     <span class="info-label">商品ID:</span> | ||||
|                     <span class="info-value">192401649879976960</span> | ||||
|                 </div> | ||||
|                 <div class="info-row"> | ||||
|                     <span class="info-label">商品名称:</span> | ||||
|                     <span class="info-value">黑木耳</span> | ||||
|                 </div> | ||||
|                 <div class="info-row"> | ||||
|                     <span class="info-label">归属摊位:</span> | ||||
|                     <span class="info-value">牛生蔬菜店</span> | ||||
|                 </div> | ||||
|                 <div class="info-row"> | ||||
|                     <span class="info-label">规格名称:</span> | ||||
|                     <span class="info-value">小份</span> | ||||
|                 </div> | ||||
|                 <div class="info-row"> | ||||
|                     <span class="info-label">SKU-ID:</span> | ||||
|                     <span class="info-value">194105142774503836</span> | ||||
|                 </div> | ||||
|                 <div class="info-row"> | ||||
|                     <span class="info-label">商品原价:</span> | ||||
|                     <span class="info-value">¥12.80</span> | ||||
|                 </div> | ||||
|                 <div class="info-row"> | ||||
|                     <span class="info-label">当前剩余库存:</span> | ||||
|                     <span class="info-value">50</span> | ||||
|                 </div> | ||||
|             </div> | ||||
| 
 | ||||
|             <div class="form-group"> | ||||
|                 <label class="form-label">添加库存(负数代表减少库存) <span class="required">*</span></label> | ||||
|                 <div class="number-input-group"> | ||||
|                     <button class="number-btn" onclick="decreaseStock()">-</button> | ||||
|                     <input type="number" class="number-input" id="stockInput" value="10" min="0"> | ||||
|                     <button class="number-btn" onclick="increaseStock()">+</button> | ||||
|                 </div> | ||||
|             </div> | ||||
| 
 | ||||
|             <div class="form-group"> | ||||
|                 <label class="form-label">积分类型 <span class="required">*</span></label> | ||||
|                 <div class="radio-group"> | ||||
|                     <div class="radio-option"> | ||||
|                         <input type="radio" id="pointsDiscount" name="pointsType" value="discount" checked onchange="toggleFieldsByType()"> | ||||
|                         <label for="pointsDiscount">积分优惠购</label> | ||||
|                     </div> | ||||
|                     <div class="radio-option"> | ||||
|                         <input type="radio" id="pointsExchange" name="pointsType" value="exchange" onchange="toggleFieldsByType()"> | ||||
|                         <label for="pointsExchange">积分换购</label> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
| 
 | ||||
|             <!-- 积分换购专用字段 --> | ||||
|             <div class="form-group exchange-only"> | ||||
|                 <label class="form-label">兑换所需积分设置 <span class="required">*</span></label> | ||||
|                 <div class="number-input-group"> | ||||
|                     <button class="number-btn" onclick="decreasePoints()">-</button> | ||||
|                     <input type="number" class="number-input" id="pointsInput" value="1" min="1"> | ||||
|                     <button class="number-btn" onclick="increasePoints()">+</button> | ||||
|                 </div> | ||||
|             </div> | ||||
| 
 | ||||
| 
 | ||||
|             <!-- 积分优惠购专用字段 --> | ||||
|             <div class="form-group discount-only" style="display: none;"> | ||||
|                 <label class="form-label">优惠购所需积分 <span class="required">*</span></label> | ||||
|                 <div class="number-input-group"> | ||||
|                     <button class="number-btn" onclick="decreaseDiscountPoints()">-</button> | ||||
|                     <input type="number" class="number-input" id="discountPointsInput" value="1" min="1"> | ||||
|                     <button class="number-btn" onclick="increaseDiscountPoints()">+</button> | ||||
|                 </div> | ||||
|             </div> | ||||
| 
 | ||||
|             <div class="form-group discount-only" style="display: none;"> | ||||
|                 <label class="form-label">优惠购商品价格 <span class="required">*</span></label> | ||||
|                 <div class="input-wrapper"> | ||||
|                     <input type="number" class="form-input" id="discountPriceInput" placeholder="请输入优惠购价格" step="0.01" min="0"> | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
| 
 | ||||
|         <div class="modal-footer"> | ||||
|             <button class="btn btn-cancel" onclick="closeModal()">取消</button> | ||||
|             <button class="btn btn-primary" onclick="confirmSelection()">确认</button> | ||||
|         </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <script> | ||||
|         // 积分设置(兑换专用) | ||||
|         function increasePoints() { | ||||
|             const input = document.getElementById('pointsInput'); | ||||
|             input.value = parseInt(input.value) + 1; | ||||
|         } | ||||
| 
 | ||||
|         function decreasePoints() { | ||||
|             const input = document.getElementById('pointsInput'); | ||||
|             const currentValue = parseInt(input.value); | ||||
|             if (currentValue > 1) { | ||||
|                 input.value = currentValue - 1; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         // 优惠购积分设置 | ||||
|         function increaseDiscountPoints() { | ||||
|             const input = document.getElementById('discountPointsInput'); | ||||
|             input.value = parseInt(input.value) + 1; | ||||
|         } | ||||
| 
 | ||||
|         function decreaseDiscountPoints() { | ||||
|             const input = document.getElementById('discountPointsInput'); | ||||
|             const currentValue = parseInt(input.value); | ||||
|             if (currentValue > 1) { | ||||
|                 input.value = currentValue - 1; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         // 库存设置 | ||||
|         function increaseStock() { | ||||
|             const input = document.getElementById('stockInput'); | ||||
|             input.value = parseInt(input.value) + 1; | ||||
|         } | ||||
| 
 | ||||
|         function decreaseStock() { | ||||
|             const input = document.getElementById('stockInput'); | ||||
|             const currentValue = parseInt(input.value); | ||||
|             if (currentValue > 0) { | ||||
|                 input.value = currentValue - 1; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
| 
 | ||||
|         // 关闭弹窗 | ||||
|         function closeModal() { | ||||
|             // 这里可以添加关闭弹窗的逻辑 | ||||
|             console.log('关闭弹窗'); | ||||
|             // 实际应用中可能会隐藏弹窗或者跳转页面 | ||||
|             // window.close(); // 如果是新窗口 | ||||
|             // 或者隐藏弹窗元素 | ||||
|         } | ||||
| 
 | ||||
|         // 切换字段显示 | ||||
|         function toggleFieldsByType() { | ||||
|             const pointsType = document.querySelector('input[name="pointsType"]:checked').value; | ||||
|             const exchangeFields = document.querySelectorAll('.exchange-only'); | ||||
|             const discountFields = document.querySelectorAll('.discount-only'); | ||||
| 
 | ||||
|             if (pointsType === 'exchange') { | ||||
|                 // 积分换购:显示兑换字段,隐藏优惠购字段 | ||||
|                 exchangeFields.forEach(field => field.style.display = 'block'); | ||||
|                 discountFields.forEach(field => field.style.display = 'none'); | ||||
|             } else if (pointsType === 'discount') { | ||||
|                 // 积分优惠购:隐藏兑换字段,显示优惠购字段 | ||||
|                 exchangeFields.forEach(field => field.style.display = 'none'); | ||||
|                 discountFields.forEach(field => field.style.display = 'block'); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         // 确认选择 | ||||
|         function confirmSelection() { | ||||
|             const pointsType = document.querySelector('input[name="pointsType"]:checked').value; | ||||
|             const stock = document.getElementById('stockInput').value; | ||||
|              | ||||
|             let data = { | ||||
|                 productId: '192401649879976960', | ||||
|                 productName: '黑木耳100g', | ||||
|                 shopName: '牛生蔬菜店', | ||||
|                 skuId: '194105142774503836', | ||||
|                 pointsType: pointsType, | ||||
|                 stock: stock | ||||
|             }; | ||||
| 
 | ||||
|             if (pointsType === 'exchange') { | ||||
|                 // 积分换购验证 | ||||
|                 const points = document.getElementById('pointsInput').value; | ||||
|                  | ||||
|                 if (!points || !stock) { | ||||
|                     alert('请填写所有必填项'); | ||||
|                     return; | ||||
|                 } | ||||
|                  | ||||
|                 data.points = points; | ||||
|             } else if (pointsType === 'discount') { | ||||
|                 // 积分优惠购验证 | ||||
|                 const discountPoints = document.getElementById('discountPointsInput').value; | ||||
|                 const discountPrice = document.getElementById('discountPriceInput').value; | ||||
|                  | ||||
|                 if (!discountPoints || !stock || !discountPrice) { | ||||
|                     alert('请填写所有必填项'); | ||||
|                     return; | ||||
|                 } | ||||
|                  | ||||
|                 data.discountPoints = discountPoints; | ||||
|                 data.discountPrice = discountPrice; | ||||
|             } | ||||
| 
 | ||||
|             console.log('提交数据:', data); | ||||
|             alert('设置成功!'); | ||||
|         } | ||||
| 
 | ||||
|         // 键盘事件处理 | ||||
|         document.addEventListener('keydown', function(e) { | ||||
|             if (e.key === 'Escape') { | ||||
|                 closeModal(); | ||||
|             } | ||||
|         }); | ||||
| 
 | ||||
|         // 点击背景关闭弹窗 | ||||
|         document.addEventListener('click', function(e) { | ||||
|             if (e.target === document.body) { | ||||
|                 closeModal(); | ||||
|             } | ||||
|         }); | ||||
| 
 | ||||
|         // 页面加载时初始化字段显示 | ||||
|         document.addEventListener('DOMContentLoaded', function() { | ||||
|             toggleFieldsByType(); | ||||
|         }); | ||||
|     </script> | ||||
| </body> | ||||
| </html> | ||||
|  | @ -375,10 +375,6 @@ | |||
|                         <input type="radio" id="pointsExchange" name="pointsType" value="exchange" onchange="toggleFieldsByType()"> | ||||
|                         <label for="pointsExchange">积分换购</label> | ||||
|                     </div> | ||||
|                     <div class="radio-option"> | ||||
|                         <input type="radio" id="pointsDouble" name="pointsType" value="double" onchange="toggleFieldsByType()"> | ||||
|                         <label for="pointsDouble">双倍积分</label> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
| 
 | ||||
|  | @ -484,10 +480,6 @@ | |||
|                 // 积分优惠购:隐藏兑换字段,显示优惠购字段 | ||||
|                 exchangeFields.forEach(field => field.style.display = 'none'); | ||||
|                 discountFields.forEach(field => field.style.display = 'block'); | ||||
|             } else { | ||||
|                 // 双倍积分:隐藏所有字段 | ||||
|                 exchangeFields.forEach(field => field.style.display = 'none'); | ||||
|                 discountFields.forEach(field => field.style.display = 'none'); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|  | @ -528,7 +520,6 @@ | |||
|                 data.discountPoints = discountPoints; | ||||
|                 data.discountPrice = discountPrice; | ||||
|             } | ||||
|             // 双倍积分无需额外验证 | ||||
| 
 | ||||
|             console.log('提交数据:', data); | ||||
|             alert('设置成功!'); | ||||
|  | @ -276,7 +276,7 @@ | |||
|                             <td> | ||||
|                                 <a href="#" class="action-btn">添加为积分换购商品</a> | ||||
|                                 <a href="#" class="action-btn">添加为积分优惠购商品</a> | ||||
|                                 <a href="#" class="action-btn">添加为双倍积分商品</a> | ||||
|                                  | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|  | @ -288,7 +288,7 @@ | |||
|                             <td> | ||||
|                                 <a href="#" class="action-btn">添加为积分换购商品</a> | ||||
|                                 <a href="#" class="action-btn">添加为积分优惠购商品</a> | ||||
|                                 <a href="#" class="action-btn">添加为双倍积分商品</a> | ||||
|                                  | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|  | @ -300,7 +300,7 @@ | |||
|                             <td> | ||||
|                                 <a href="#" class="action-btn">添加为积分换购商品</a> | ||||
|                                 <a href="#" class="action-btn">添加为积分优惠购商品</a> | ||||
|                                 <a href="#" class="action-btn">添加为双倍积分商品</a> | ||||
|                                  | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                     </tbody> | ||||
|  | @ -423,78 +423,6 @@ | |||
|                             </div> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <input type="checkbox" class="checkbox"> | ||||
|                         </td> | ||||
|                         <td>004</td> | ||||
|                         <td>冬瓜</td> | ||||
|                         <td>大份</td> | ||||
|                         <td>生生蔬菜店</td> | ||||
|                         <td>¥12.00</td> | ||||
|                         <td>上架</td> | ||||
|                         <td>双倍积分</td> | ||||
|                         <td>5</td> | ||||
|                         <td> | ||||
|                             <label class="switch"> | ||||
|                                 <input type="checkbox" checked> | ||||
|                                 <span class="slider"></span> | ||||
|                             </label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <div class="action-buttons"> | ||||
|                                 <button class="btn-edit">编辑</button> | ||||
|                             </div> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <input type="checkbox" class="checkbox"> | ||||
|                         </td> | ||||
|                         <td>005</td> | ||||
|                         <td>土豆</td> | ||||
|                         <td>中份</td> | ||||
|                         <td>生生蔬菜店</td> | ||||
|                         <td>¥6.00</td> | ||||
|                         <td>上架</td> | ||||
|                         <td>双倍积分</td> | ||||
|                         <td>8</td> | ||||
|                         <td> | ||||
|                             <label class="switch"> | ||||
|                                 <input type="checkbox" checked> | ||||
|                                 <span class="slider"></span> | ||||
|                             </label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <div class="action-buttons"> | ||||
|                                 <button class="btn-edit">编辑</button> | ||||
|                             </div> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <input type="checkbox" class="checkbox"> | ||||
|                         </td> | ||||
|                         <td>006</td> | ||||
|                         <td>白萝卜</td> | ||||
|                         <td>大份</td> | ||||
|                         <td>生生蔬菜店</td> | ||||
|                         <td>¥4.50</td> | ||||
|                         <td>上架</td> | ||||
|                         <td>双倍积分</td> | ||||
|                         <td>15</td> | ||||
|                         <td> | ||||
|                             <label class="switch"> | ||||
|                                 <input type="checkbox" checked> | ||||
|                                 <span class="slider"></span> | ||||
|                             </label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <div class="action-buttons"> | ||||
|                                 <button class="btn-edit">编辑</button> | ||||
|                             </div> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                 </tbody> | ||||
|             </table> | ||||
|         </div> | ||||
|  | @ -521,13 +449,20 @@ | |||
|                         <input type="text" class="form-control" placeholder="请输入商品名称"> | ||||
|                     </div> | ||||
|                      | ||||
|                     <div class="form-group"> | ||||
|                         <label>是否启用双倍积分:</label> | ||||
|                         <select class="form-control"> | ||||
|                             <option value="enabled">启用</option> | ||||
|                             <option value="disabled">关闭</option> | ||||
|                             <option value="all" selected>全部</option> | ||||
|                         </select> | ||||
|                     </div> | ||||
|                      | ||||
|                     <div class="form-group"> | ||||
|                         <button class="btn btn-primary">查询</button> | ||||
|                         <button class="btn">重置</button> | ||||
|                     </div> | ||||
|                 </div> | ||||
|                  | ||||
|                 <button class="btn btn-success add-btn">添加</button> | ||||
|             </div> | ||||
|              | ||||
|             <div class="table-container"> | ||||
|  | @ -542,7 +477,7 @@ | |||
|                             <th width="150">归属店铺</th> | ||||
|                             <th width="100">商品原价</th> | ||||
|                             <th width="120">原有商品状态</th> | ||||
|                             <th width="120">操作</th> | ||||
|                             <th width="120">是否启用</th> | ||||
|                         </tr> | ||||
|                     </thead> | ||||
|                     <tbody> | ||||
|  | @ -556,9 +491,10 @@ | |||
|                             <td>¥5.00</td> | ||||
|                             <td>上架</td> | ||||
|                             <td> | ||||
|                                 <div class="action-buttons"> | ||||
|                                     <button class="btn-delete">删除</button> | ||||
|                                 </div> | ||||
|                                 <label class="switch"> | ||||
|                                     <input type="checkbox" checked> | ||||
|                                     <span class="slider"></span> | ||||
|                                 </label> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|  | @ -571,9 +507,10 @@ | |||
|                             <td>¥8.00</td> | ||||
|                             <td>上架</td> | ||||
|                             <td> | ||||
|                                 <div class="action-buttons"> | ||||
|                                     <button class="btn-delete">删除</button> | ||||
|                                 </div> | ||||
|                                 <label class="switch"> | ||||
|                                     <input type="checkbox" checked> | ||||
|                                     <span class="slider"></span> | ||||
|                                 </label> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|  | @ -586,9 +523,10 @@ | |||
|                             <td>¥3.50</td> | ||||
|                             <td>下架</td> | ||||
|                             <td> | ||||
|                                 <div class="action-buttons"> | ||||
|                                     <button class="btn-delete">删除</button> | ||||
|                                 </div> | ||||
|                                 <label class="switch"> | ||||
|                                     <input type="checkbox"> | ||||
|                                     <span class="slider"></span> | ||||
|                                 </label> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|  | @ -601,9 +539,10 @@ | |||
|                             <td>¥12.00</td> | ||||
|                             <td>上架</td> | ||||
|                             <td> | ||||
|                                 <div class="action-buttons"> | ||||
|                                     <button class="btn-delete">删除</button> | ||||
|                                 </div> | ||||
|                                 <label class="switch"> | ||||
|                                     <input type="checkbox" checked> | ||||
|                                     <span class="slider"></span> | ||||
|                                 </label> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|  | @ -616,9 +555,10 @@ | |||
|                             <td>¥6.00</td> | ||||
|                             <td>上架</td> | ||||
|                             <td> | ||||
|                                 <div class="action-buttons"> | ||||
|                                     <button class="btn-delete">删除</button> | ||||
|                                 </div> | ||||
|                                 <label class="switch"> | ||||
|                                     <input type="checkbox" checked> | ||||
|                                     <span class="slider"></span> | ||||
|                                 </label> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|  | @ -631,9 +571,10 @@ | |||
|                             <td>¥4.50</td> | ||||
|                             <td>上架</td> | ||||
|                             <td> | ||||
|                                 <div class="action-buttons"> | ||||
|                                     <button class="btn-delete">删除</button> | ||||
|                                 </div> | ||||
|                                 <label class="switch"> | ||||
|                                     <input type="checkbox" checked> | ||||
|                                     <span class="slider"></span> | ||||
|                                 </label> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                     </tbody> | ||||
|  | @ -1,526 +0,0 @@ | |||
| <!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: 'Microsoft YaHei', sans-serif; | ||||
|             background-color: #f5f5f5; | ||||
|             padding: 20px; | ||||
|         } | ||||
| 
 | ||||
|         .header { | ||||
|             background: white; | ||||
|             padding: 20px; | ||||
|             margin-bottom: 20px; | ||||
|             border-radius: 8px; | ||||
|             box-shadow: 0 2px 4px rgba(0,0,0,0.1); | ||||
|         } | ||||
| 
 | ||||
|         .header h1 { | ||||
|             font-size: 24px; | ||||
|             color: #333; | ||||
|             margin-bottom: 10px; | ||||
|         } | ||||
| 
 | ||||
|         .header p { | ||||
|             color: #666; | ||||
|             font-size: 14px; | ||||
|         } | ||||
| 
 | ||||
|         .order-container { | ||||
|             background: white; | ||||
|             border-radius: 8px; | ||||
|             box-shadow: 0 2px 4px rgba(0,0,0,0.1); | ||||
|             overflow: hidden; | ||||
|         } | ||||
| 
 | ||||
|         /* 第一级表格样式 */ | ||||
|         .level-1-table { | ||||
|             width: 100%; | ||||
|             border-collapse: collapse; | ||||
|             font-size: 14px; | ||||
|         } | ||||
| 
 | ||||
|         .level-1-table th { | ||||
|             background: #f8f9fa; | ||||
|             padding: 12px 8px; | ||||
|             text-align: center; | ||||
|             border-bottom: 2px solid #dee2e6; | ||||
|             font-weight: 600; | ||||
|             color: #495057; | ||||
|             font-size: 13px; | ||||
|         } | ||||
| 
 | ||||
|         .level-1-table td { | ||||
|             padding: 12px 8px; | ||||
|             text-align: center; | ||||
|             border-bottom: 1px solid #dee2e6; | ||||
|             color: #212529; | ||||
|         } | ||||
| 
 | ||||
|         .expandable-row { | ||||
|             cursor: pointer; | ||||
|             transition: background-color 0.2s; | ||||
|         } | ||||
| 
 | ||||
|         .expandable-row:hover { | ||||
|             background-color: #f8f9fa; | ||||
|         } | ||||
| 
 | ||||
|         .expand-icon { | ||||
|             display: inline-block; | ||||
|             width: 16px; | ||||
|             height: 16px; | ||||
|             margin-right: 8px; | ||||
|             transition: transform 0.3s; | ||||
|         } | ||||
| 
 | ||||
|         .expand-icon.expanded { | ||||
|             transform: rotate(90deg); | ||||
|         } | ||||
| 
 | ||||
|         /* 第二级表格样式 - 结算单位订单 */ | ||||
|         .level-2-container { | ||||
|             display: none; | ||||
|             background: #f8f9fa; | ||||
|             border-top: 1px solid #dee2e6; | ||||
|         } | ||||
| 
 | ||||
|         .level-2-table { | ||||
|             width: 100%; | ||||
|             border-collapse: collapse; | ||||
|             margin-left: 30px; | ||||
|             font-size: 14px; | ||||
|             table-layout: auto; | ||||
|         } | ||||
| 
 | ||||
|         .level-2-table th { | ||||
|             background: #e9ecef; | ||||
|             padding: 10px 8px; | ||||
|             text-align: left; | ||||
|             border-bottom: 1px solid #dee2e6; | ||||
|             font-weight: 600; | ||||
|             color: #495057; | ||||
|         } | ||||
| 
 | ||||
|         .level-2-table td { | ||||
|             padding: 10px 8px; | ||||
|             text-align: left; | ||||
|             border-bottom: 1px solid #dee2e6; | ||||
|             color: #212529; | ||||
|         } | ||||
| 
 | ||||
|         /* 第三级表格样式 - 店铺订单 */ | ||||
|         .level-3-container { | ||||
|             display: none; | ||||
|             background: #ffffff; | ||||
|             border-top: 1px solid #dee2e6; | ||||
|         } | ||||
| 
 | ||||
|         .level-3-table { | ||||
|             width: 100%; | ||||
|             border-collapse: collapse; | ||||
|             margin-left: 60px; | ||||
|             font-size: 13px; | ||||
|             table-layout: auto; | ||||
|         } | ||||
| 
 | ||||
|         .level-3-table th { | ||||
|             background: #f1f3f4; | ||||
|             padding: 8px 6px; | ||||
|             text-align: left; | ||||
|             border-bottom: 1px solid #dee2e6; | ||||
|             font-weight: 600; | ||||
|             color: #495057; | ||||
|             font-size: 12px; | ||||
|         } | ||||
| 
 | ||||
|         .level-3-table td { | ||||
|             padding: 8px 6px; | ||||
|             text-align: left; | ||||
|             border-bottom: 1px solid #dee2e6; | ||||
|             color: #212529; | ||||
|         } | ||||
| 
 | ||||
|         /* 第四级表格样式 - 商品订单 */ | ||||
|         .level-4-container { | ||||
|             display: none; | ||||
|             background: #fafafa; | ||||
|             border-top: 1px solid #dee2e6; | ||||
|         } | ||||
| 
 | ||||
|         .level-4-table { | ||||
|             width: 100%; | ||||
|             border-collapse: collapse; | ||||
|             margin-left: 90px; | ||||
|             font-size: 12px; | ||||
|             table-layout: auto; | ||||
|         } | ||||
| 
 | ||||
|         .level-4-table th { | ||||
|             background: #eeeeee; | ||||
|             padding: 6px 4px; | ||||
|             text-align: center; | ||||
|             border-bottom: 1px solid #dee2e6; | ||||
|             font-weight: 600; | ||||
|             color: #495057; | ||||
|             font-size: 11px; | ||||
|         } | ||||
| 
 | ||||
|         .level-4-table td { | ||||
|             padding: 6px 4px; | ||||
|             text-align: center; | ||||
|             border-bottom: 1px solid #dee2e6; | ||||
|             color: #212529; | ||||
|         } | ||||
| 
 | ||||
|         .product-image { | ||||
|             width: 40px; | ||||
|             height: 40px; | ||||
|             object-fit: cover; | ||||
|             border-radius: 4px; | ||||
|             border: 1px solid #dee2e6; | ||||
|         } | ||||
| 
 | ||||
|         /* 响应式设计 */ | ||||
|         @media (max-width: 768px) { | ||||
|             body { | ||||
|                 padding: 10px; | ||||
|             } | ||||
|              | ||||
|             .level-1-table th, | ||||
|             .level-1-table td { | ||||
|                 padding: 8px 4px; | ||||
|                 font-size: 12px; | ||||
|             } | ||||
|              | ||||
|             .level-2-table, | ||||
|             .level-3-table, | ||||
|             .level-4-table { | ||||
|                 margin-left: 15px; | ||||
|             } | ||||
|              | ||||
|             .level-2-table th, | ||||
|             .level-2-table td { | ||||
|                 padding: 8px 4px; | ||||
|                 font-size: 12px; | ||||
|             } | ||||
|              | ||||
|             .level-3-table th, | ||||
|             .level-3-table td { | ||||
|                 padding: 6px 3px; | ||||
|                 font-size: 11px; | ||||
|             } | ||||
|              | ||||
|             .level-4-table th, | ||||
|             .level-4-table td { | ||||
|                 padding: 4px 2px; | ||||
|                 font-size: 10px; | ||||
|             } | ||||
|              | ||||
|             .product-image { | ||||
|                 width: 30px; | ||||
|                 height: 30px; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         /* 层级指示线 */ | ||||
|         .level-indicator { | ||||
|             position: relative; | ||||
|         } | ||||
| 
 | ||||
|         .level-indicator:before { | ||||
|             content: ''; | ||||
|             position: absolute; | ||||
|             left: -20px; | ||||
|             top: 0; | ||||
|             bottom: 0; | ||||
|             width: 3px; | ||||
|             background: #007bff; | ||||
|         } | ||||
| 
 | ||||
|         .level-2-indicator:before { | ||||
|             background: #28a745; | ||||
|         } | ||||
| 
 | ||||
|         .level-3-indicator:before { | ||||
|             background: #ffc107; | ||||
|         } | ||||
| 
 | ||||
|         .level-4-indicator:before { | ||||
|             background: #dc3545; | ||||
|         } | ||||
| 
 | ||||
|         .order-level-badge { | ||||
|             display: inline-block; | ||||
|             padding: 2px 6px; | ||||
|             border-radius: 3px; | ||||
|             font-size: 11px; | ||||
|             font-weight: 600; | ||||
|             margin-right: 8px; | ||||
|         } | ||||
| 
 | ||||
|         .level-1-badge { | ||||
|             background: #e3f2fd; | ||||
|             color: #1976d2; | ||||
|         } | ||||
| 
 | ||||
|         .level-2-badge { | ||||
|             background: #e8f5e8; | ||||
|             color: #388e3c; | ||||
|         } | ||||
| 
 | ||||
|         .level-3-badge { | ||||
|             background: #fff3e0; | ||||
|             color: #f57c00; | ||||
|         } | ||||
| 
 | ||||
|         .level-4-badge { | ||||
|             background: #ffebee; | ||||
|             color: #d32f2f; | ||||
|         } | ||||
|     </style> | ||||
| </head> | ||||
| <body> | ||||
|     <div class="header"> | ||||
|         <h1>总订单查看</h1> | ||||
|     </div> | ||||
| 
 | ||||
|     <div class="order-container"> | ||||
|         <!-- 第一级表格 - 总订单信息 --> | ||||
|         <table class="level-1-table"> | ||||
|             <thead> | ||||
|                 <tr> | ||||
|                     <th>操作</th> | ||||
|                     <th>总订单号</th> | ||||
| 					<th>订单总金额</th> | ||||
| 					<th>优惠券减免</th> | ||||
| 					<th>积分减免</th> | ||||
|                     <th>配送费</th> | ||||
|                     <th>下单时间</th> | ||||
|                     <th>预计送达时间</th> | ||||
|                     <th>距离</th> | ||||
| 					<th>订单状态</th> | ||||
|                 </tr> | ||||
|             </thead> | ||||
|             <tbody> | ||||
|                 <tr class="expandable-row" onclick="toggleLevel2(this)"> | ||||
|                     <td> | ||||
|                         <span class="order-level-badge level-1-badge">总订单</span> | ||||
|                         <span class="expand-icon">▶</span> | ||||
|                     </td> | ||||
|                     <td>111202507191533848089917</td> | ||||
|                     <td>3.8</td> | ||||
|                     <td>0.5</td> | ||||
|                     <td>0.5</td> | ||||
| 					<td>0.2</td> | ||||
|                     <td>2025-07-19 15:34:13</td> | ||||
|                     <td>2025-07-19 16:34:13</td> | ||||
|                     <td>0.125078736989803303</td> | ||||
| 					 <td>已完成</td> | ||||
|                 </tr> | ||||
|                 <tr class="level-2-container"> | ||||
|                     <td colspan="10" class="level-indicator level-2-indicator"> | ||||
|                         <!-- 第二级表格 - 结算单位订单信息 --> | ||||
|                         <table class="level-2-table"> | ||||
|                             <thead> | ||||
|                                 <tr> | ||||
|                                     <th style="width: 1px;"></th> | ||||
|                                     <th style="width: 1px;">序号</th> | ||||
|                                     <th style="width: 180px;">名称</th> | ||||
|                                 </tr> | ||||
|                             </thead> | ||||
|                             <tbody> | ||||
|                                 <tr class="expandable-row" onclick="toggleLevel3(this)"> | ||||
|                                     <td> | ||||
|                                         <span class="order-level-badge level-2-badge">结算单位</span> | ||||
|                                         <span class="expand-icon">▶</span> | ||||
|                                     </td> | ||||
|                                     <td>1</td> | ||||
|                                     <td>大妈集市结算单位</td> | ||||
|                                 </tr> | ||||
|                                 <tr class="level-3-container"> | ||||
|                                     <td colspan="3" class="level-indicator level-3-indicator"> | ||||
|                                         <!-- 第三级表格 - 店铺订单信息 --> | ||||
|                                         <table class="level-3-table"> | ||||
|                                             <thead> | ||||
|                                                 <tr> | ||||
|                                                     <th style="width: 1px;"></th> | ||||
|                                                     <th style="width: 1px;">序号</th> | ||||
|                                                     <th style="width: 180px;">店铺名称</th> | ||||
|                                                 </tr> | ||||
|                                             </thead> | ||||
|                                             <tbody> | ||||
|                                                 <tr class="expandable-row" onclick="toggleLevel4(this)"> | ||||
|                                                     <td> | ||||
|                                                         <span class="order-level-badge level-3-badge">店铺</span> | ||||
|                                                         <span class="expand-icon">▶</span> | ||||
|                                                     </td> | ||||
|                                                     <td>1</td> | ||||
|                                                     <td>牛牛蔬菜店</td> | ||||
|                                                 </tr> | ||||
|                                                 <tr class="level-4-container"> | ||||
|                                                     <td colspan="3" class="level-indicator level-4-indicator"> | ||||
|                                                         <!-- 第四级表格 - 商品订单信息 --> | ||||
|                                                         <table class="level-4-table"> | ||||
|                                                             <thead> | ||||
|                                                                 <tr> | ||||
|                                                                     <th style="width: 60px;">序号</th> | ||||
|                                                                     <th>商品订单号</th> | ||||
|                                                                     <th>商品名称</th> | ||||
|                                                                     <th>商品原价</th> | ||||
| 														<th>优惠券减免</th> | ||||
| 														<th>积分减免</th> | ||||
|                                                                     <th>商品订单金额</th> | ||||
|                                                                     <th>商品图片</th> | ||||
|                                                                 </tr> | ||||
|                                                             </thead> | ||||
|                                                             <tbody> | ||||
|                                                                 <tr> | ||||
|                                                                     <td><span class="order-level-badge level-4-badge">商品</span>1</td> | ||||
|                                                                     <td>11420250719153384802014</td> | ||||
|                                                                     <td>上海青约300g</td> | ||||
|                                                                     <td>2</td> | ||||
|                                                                     <td>0.1</td> | ||||
| 														<td>0.1</td> | ||||
|                                                                     <td>-</td> | ||||
|                                                                     <td> | ||||
|                                                                         <img src=""  | ||||
|                                                                              alt="蔬菜图片" class="product-image"> | ||||
|                                                                     </td> | ||||
|                                                                 </tr> | ||||
|                                                             </tbody> | ||||
|                                                         </table> | ||||
|                                                     </td> | ||||
|                                                 </tr> | ||||
|                                             </tbody> | ||||
|                                         </table> | ||||
|                                     </td> | ||||
|                                 </tr> | ||||
|                             </tbody> | ||||
|                         </table> | ||||
|                     </td> | ||||
|                 </tr> | ||||
|             </tbody> | ||||
|         </table> | ||||
|     </div> | ||||
| 
 | ||||
|     <script> | ||||
|         // 切换第二级表格显示状态 - 结算单位订单 | ||||
|         function toggleLevel2(row) { | ||||
|             const icon = row.querySelector('.expand-icon'); | ||||
|             const nextRow = row.nextElementSibling; | ||||
|              | ||||
|             if (nextRow.style.display === 'none' || !nextRow.style.display) { | ||||
|                 nextRow.style.display = 'table-row'; | ||||
|                 icon.classList.add('expanded'); | ||||
|                 icon.textContent = '▼'; | ||||
|             } else { | ||||
|                 nextRow.style.display = 'none'; | ||||
|                 icon.classList.remove('expanded'); | ||||
|                 icon.textContent = '▶'; | ||||
|                  | ||||
|                 // 关闭所有第三级和第四级表格 | ||||
|                 const level3Containers = nextRow.querySelectorAll('.level-3-container'); | ||||
|                 const level4Containers = nextRow.querySelectorAll('.level-4-container'); | ||||
|                  | ||||
|                 level3Containers.forEach(container => { | ||||
|                     container.style.display = 'none'; | ||||
|                     const level3Icon = container.parentElement.parentElement.querySelector('.expand-icon'); | ||||
|                     if (level3Icon) { | ||||
|                         level3Icon.classList.remove('expanded'); | ||||
|                         level3Icon.textContent = '▶'; | ||||
|                     } | ||||
|                 }); | ||||
|                  | ||||
|                 level4Containers.forEach(container => { | ||||
|                     container.style.display = 'none'; | ||||
|                     const level4Icon = container.parentElement.parentElement.querySelector('.expand-icon'); | ||||
|                     if (level4Icon) { | ||||
|                         level4Icon.classList.remove('expanded'); | ||||
|                         level4Icon.textContent = '▶'; | ||||
|                     } | ||||
|                 }); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         // 切换第三级表格显示状态 - 店铺订单 | ||||
|         function toggleLevel3(row) { | ||||
|             const icon = row.querySelector('.expand-icon'); | ||||
|             const nextRow = row.nextElementSibling; | ||||
|              | ||||
|             if (nextRow.style.display === 'none' || !nextRow.style.display) { | ||||
|                 nextRow.style.display = 'table-row'; | ||||
|                 icon.classList.add('expanded'); | ||||
|                 icon.textContent = '▼'; | ||||
|             } else { | ||||
|                 nextRow.style.display = 'none'; | ||||
|                 icon.classList.remove('expanded'); | ||||
|                 icon.textContent = '▶'; | ||||
|                  | ||||
|                 // 关闭所有第四级表格 | ||||
|                 const level4Containers = nextRow.querySelectorAll('.level-4-container'); | ||||
|                 level4Containers.forEach(container => { | ||||
|                     container.style.display = 'none'; | ||||
|                     const level4Icon = container.parentElement.parentElement.querySelector('.expand-icon'); | ||||
|                     if (level4Icon) { | ||||
|                         level4Icon.classList.remove('expanded'); | ||||
|                         level4Icon.textContent = '▶'; | ||||
|                     } | ||||
|                 }); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         // 切换第四级表格显示状态 - 商品订单 | ||||
|         function toggleLevel4(row) { | ||||
|             const icon = row.querySelector('.expand-icon'); | ||||
|             const nextRow = row.nextElementSibling; | ||||
|              | ||||
|             if (nextRow.style.display === 'none' || !nextRow.style.display) { | ||||
|                 nextRow.style.display = 'table-row'; | ||||
|                 icon.classList.add('expanded'); | ||||
|                 icon.textContent = '▼'; | ||||
|             } else { | ||||
|                 nextRow.style.display = 'none'; | ||||
|                 icon.classList.remove('expanded'); | ||||
|                 icon.textContent = '▶'; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         // 页面加载时初始化所有展开容器为隐藏状态 | ||||
|         document.addEventListener('DOMContentLoaded', function() { | ||||
|             const allContainers = document.querySelectorAll('.level-2-container, .level-3-container, .level-4-container'); | ||||
|             allContainers.forEach(container => { | ||||
|                 container.style.display = 'none'; | ||||
|             }); | ||||
|         }); | ||||
| 
 | ||||
|         // 添加键盘支持 | ||||
|         document.addEventListener('keydown', function(e) { | ||||
|             if (e.key === 'Escape') { | ||||
|                 // 按ESC键收起所有展开的表格 | ||||
|                 const allContainers = document.querySelectorAll('.level-2-container, .level-3-container, .level-4-container'); | ||||
|                 const allIcons = document.querySelectorAll('.expand-icon'); | ||||
|                  | ||||
|                 allContainers.forEach(container => { | ||||
|                     container.style.display = 'none'; | ||||
|                 }); | ||||
|                  | ||||
|                 allIcons.forEach(icon => { | ||||
|                     icon.classList.remove('expanded'); | ||||
|                     icon.textContent = '▶'; | ||||
|                 }); | ||||
|             } | ||||
|         }); | ||||
|     </script> | ||||
| </body> | ||||
| </html> | ||||
		Loading…
	
		Reference in New Issue