|
|
@ -338,19 +338,18 @@ |
|
|
color: white; |
|
|
color: white; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 模态框 */ |
|
|
/* 模态框 - 改为全屏样式 */ |
|
|
.modal { |
|
|
.modal { |
|
|
position: fixed; |
|
|
position: fixed; |
|
|
top: 0; |
|
|
top: 0; |
|
|
left: 0; |
|
|
left: 0; |
|
|
right: 0; |
|
|
right: 0; |
|
|
bottom: 0; |
|
|
bottom: 0; |
|
|
background-color: rgba(0, 0, 0, 0.5); |
|
|
background-color: white; |
|
|
display: none; |
|
|
display: none; |
|
|
justify-content: center; |
|
|
flex-direction: column; |
|
|
align-items: flex-start; |
|
|
|
|
|
padding-top: 50px; |
|
|
|
|
|
z-index: 1000; |
|
|
z-index: 1000; |
|
|
|
|
|
overflow: hidden; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.modal.active { |
|
|
.modal.active { |
|
|
@ -359,12 +358,15 @@ |
|
|
|
|
|
|
|
|
.modal-content { |
|
|
.modal-content { |
|
|
background-color: white; |
|
|
background-color: white; |
|
|
width: 90%; |
|
|
width: 100%; |
|
|
max-width: 600px; |
|
|
height: 100%; |
|
|
max-height: 85vh; |
|
|
max-width: none; |
|
|
border-radius: 12px; |
|
|
max-height: none; |
|
|
|
|
|
border-radius: 0; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); |
|
|
box-shadow: none; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.modal-header { |
|
|
.modal-header { |
|
|
@ -398,8 +400,9 @@ |
|
|
|
|
|
|
|
|
.modal-body { |
|
|
.modal-body { |
|
|
padding: 20px; |
|
|
padding: 20px; |
|
|
max-height: 65vh; |
|
|
|
|
|
overflow-y: auto; |
|
|
overflow-y: auto; |
|
|
|
|
|
max-height: none; |
|
|
|
|
|
flex: 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 修复select下拉框向上显示问题 */ |
|
|
/* 修复select下拉框向上显示问题 */ |
|
|
@ -1588,14 +1591,14 @@ |
|
|
<!-- 商品图片 --> |
|
|
<!-- 商品图片 --> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label class="form-label">商品图片</label> |
|
|
<label class="form-label">商品图片</label> |
|
|
<div id="editUploadImages" class="upload-images" style="display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px;"> |
|
|
<div class="upload-area"> |
|
|
<!-- 图片将通过JavaScript动态加载 --> |
|
|
<div id="editUploadImages" class="upload-images" style="display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px;"> |
|
|
|
|
|
<!-- 图片将通过JavaScript动态加载 --> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-image" onclick="triggerEditImageUpload()">+</div> |
|
|
|
|
|
<input type="file" id="editImageUpload" multiple accept="image/*" style="display: none;" onchange="handleEditImageUpload(event)"> |
|
|
|
|
|
<div style="font-size: 12px; color: #999; margin-top: 10px; text-align: left;">最多上传2张图片</div> |
|
|
</div> |
|
|
</div> |
|
|
<div style="font-size: 12px; color: #999; margin-top: 10px;">最多上传2张图片</div> |
|
|
|
|
|
<input type="file" id="editImageUpload" multiple accept="image/*" style="display: none;" onchange="handleEditImageUpload(event)"> |
|
|
|
|
|
<button type="button" onclick="triggerEditImageUpload()" style="margin-top: 10px; padding: 8px 16px; background-color: #f0f0f0; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; cursor: pointer;"> |
|
|
|
|
|
添加图片 |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 货源类型 --> |
|
|
<!-- 货源类型 --> |
|
|
@ -3974,7 +3977,7 @@ |
|
|
'published': { text: '已上架', class: 'status-published' }, |
|
|
'published': { text: '已上架', class: 'status-published' }, |
|
|
'pending_review': { text: '审核中', class: 'status-pending' }, |
|
|
'pending_review': { text: '审核中', class: 'status-pending' }, |
|
|
'rejected': { text: '审核失败', class: 'status-rejected' }, |
|
|
'rejected': { text: '审核失败', class: 'status-rejected' }, |
|
|
'hidden': { text: '已隐藏', class: 'status-draft' }, |
|
|
'hidden': { text: '已下架', class: 'status-draft' }, |
|
|
'sold_out': { text: '已下架', class: 'status-draft' } |
|
|
'sold_out': { text: '已下架', class: 'status-draft' } |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
@ -4064,7 +4067,7 @@ |
|
|
<div style="flex: 1;"> |
|
|
<div style="flex: 1;"> |
|
|
<div class="supply-name"> |
|
|
<div class="supply-name"> |
|
|
${supply.productName} |
|
|
${supply.productName} |
|
|
<span class="supply-status ${status.class}">${status.text}</span> |
|
|
${(supply.status === 'hidden' || supply.status === 'sold_out') ? '' : `<span class="supply-status ${status.class}">${status.text}</span>`} |
|
|
${supply.autoOfflineHours && supply.autoOfflineHours !== '' && supply.autoOfflineHours !== null ? `<span class="countdown-badge" data-id="${supply.id}" style="margin-left: 8px; padding: 4px 12px; background: linear-gradient(135deg, #ff6b6b, #ee5a6f); color: white; border-radius: 16px; font-size: 12px; font-weight: 500; box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3); display: inline-flex; align-items: center; gap: 4px;">⏰ 计算中...</span>` : ''} |
|
|
${supply.autoOfflineHours && supply.autoOfflineHours !== '' && supply.autoOfflineHours !== null ? `<span class="countdown-badge" data-id="${supply.id}" style="margin-left: 8px; padding: 4px 12px; background: linear-gradient(135deg, #ff6b6b, #ee5a6f); color: white; border-radius: 16px; font-size: 12px; font-weight: 500; box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3); display: inline-flex; align-items: center; gap: 4px;">⏰ 计算中...</span>` : ''} |
|
|
<button class="copy-supply-btn" onclick="copySupply('${supply.id}')">复制</button> |
|
|
<button class="copy-supply-btn" onclick="copySupply('${supply.id}')">复制</button> |
|
|
</div> |
|
|
</div> |
|
|
@ -4463,7 +4466,9 @@ |
|
|
|
|
|
|
|
|
// 显示创建货源模态框 |
|
|
// 显示创建货源模态框 |
|
|
function showAddSupplyModal() { |
|
|
function showAddSupplyModal() { |
|
|
document.getElementById('createSupplyModal').style.display = 'flex'; |
|
|
document.getElementById('createSupplyModal').classList.add('active'); |
|
|
|
|
|
// 隐藏body滚动条,避免双滚动条 |
|
|
|
|
|
document.body.style.overflow = 'hidden'; |
|
|
|
|
|
|
|
|
// 重新加载联系人数据,确保最新 |
|
|
// 重新加载联系人数据,确保最新 |
|
|
loadContacts(); |
|
|
loadContacts(); |
|
|
@ -4602,7 +4607,9 @@ |
|
|
function hideAddSupplyModal() { |
|
|
function hideAddSupplyModal() { |
|
|
// 保存当前表单状态 |
|
|
// 保存当前表单状态 |
|
|
saveFormData(); |
|
|
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) { |
|
|
} catch (error) { |
|
|
console.error('显示编辑货源失败:', error); |
|
|
console.error('显示编辑货源失败:', error); |
|
|
alert('显示编辑货源失败'); |
|
|
alert('显示编辑货源失败'); |
|
|
@ -5773,10 +5782,12 @@ |
|
|
|
|
|
|
|
|
// 隐藏编辑货源模态框 |
|
|
// 隐藏编辑货源模态框 |
|
|
function hideEditSupplyModal() { |
|
|
function hideEditSupplyModal() { |
|
|
document.getElementById('editSupplyModal').style.display = 'none'; |
|
|
document.getElementById('editSupplyModal').classList.remove('active'); |
|
|
currentEditSupplyId = null; |
|
|
currentEditSupplyId = null; |
|
|
// 重置发布模式状态 |
|
|
// 重置发布模式状态 |
|
|
window.currentEditPublishMode = false; |
|
|
window.currentEditPublishMode = false; |
|
|
|
|
|
// 恢复body滚动条 |
|
|
|
|
|
document.body.style.overflow = 'auto'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 编辑后上架货源 |
|
|
// 编辑后上架货源 |
|
|
|