diff --git a/supply.html b/supply.html index 591ca99..44dcf09 100644 --- a/supply.html +++ b/supply.html @@ -338,19 +338,18 @@ color: white; } - /* 模态框 */ + /* 模态框 - 改为全屏样式 */ .modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; - background-color: rgba(0, 0, 0, 0.5); + background-color: white; display: none; - justify-content: center; - align-items: flex-start; - padding-top: 50px; + flex-direction: column; z-index: 1000; + overflow: hidden; } .modal.active { @@ -359,12 +358,15 @@ .modal-content { background-color: white; - width: 90%; - max-width: 600px; - max-height: 85vh; - border-radius: 12px; + width: 100%; + height: 100%; + max-width: none; + max-height: none; + border-radius: 0; overflow: hidden; - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); + box-shadow: none; + display: flex; + flex-direction: column; } .modal-header { @@ -398,8 +400,9 @@ .modal-body { padding: 20px; - max-height: 65vh; overflow-y: auto; + max-height: none; + flex: 1; } /* 修复select下拉框向上显示问题 */ @@ -1588,14 +1591,14 @@
-
- +
+
+ +
+
+
+ +
最多上传2张图片
-
最多上传2张图片
- -
@@ -3974,7 +3977,7 @@ 'published': { text: '已上架', class: 'status-published' }, 'pending_review': { text: '审核中', class: 'status-pending' }, 'rejected': { text: '审核失败', class: 'status-rejected' }, - 'hidden': { text: '已隐藏', class: 'status-draft' }, + 'hidden': { text: '已下架', class: 'status-draft' }, 'sold_out': { text: '已下架', class: 'status-draft' } }; @@ -4064,7 +4067,7 @@
${supply.productName} - ${status.text} + ${(supply.status === 'hidden' || supply.status === 'sold_out') ? '' : `${status.text}`} ${supply.autoOfflineHours && supply.autoOfflineHours !== '' && supply.autoOfflineHours !== null ? `⏰ 计算中...` : ''}
@@ -4463,7 +4466,9 @@ // 显示创建货源模态框 function showAddSupplyModal() { - document.getElementById('createSupplyModal').style.display = 'flex'; + document.getElementById('createSupplyModal').classList.add('active'); + // 隐藏body滚动条,避免双滚动条 + document.body.style.overflow = 'hidden'; // 重新加载联系人数据,确保最新 loadContacts(); @@ -4602,7 +4607,9 @@ function hideAddSupplyModal() { // 保存当前表单状态 saveFormData(); - document.getElementById('createSupplyModal').style.display = 'none'; + document.getElementById('createSupplyModal').classList.remove('active'); + // 恢复body滚动条 + document.body.style.overflow = 'auto'; } // 触发图片上传 @@ -5764,7 +5771,9 @@ } // 显示编辑模态框 - document.getElementById('editSupplyModal').style.display = 'flex'; + document.getElementById('editSupplyModal').classList.add('active'); + // 隐藏body滚动条,避免双滚动条 + document.body.style.overflow = 'hidden'; } catch (error) { console.error('显示编辑货源失败:', error); alert('显示编辑货源失败'); @@ -5773,10 +5782,12 @@ // 隐藏编辑货源模态框 function hideEditSupplyModal() { - document.getElementById('editSupplyModal').style.display = 'none'; + document.getElementById('editSupplyModal').classList.remove('active'); currentEditSupplyId = null; // 重置发布模式状态 window.currentEditPublishMode = false; + // 恢复body滚动条 + document.body.style.overflow = 'auto'; } // 编辑后上架货源