|
|
|
@ -4611,7 +4611,7 @@ |
|
|
|
// 处理操作按钮 |
|
|
|
let actionsHTML = ''; |
|
|
|
if (supply.status === 'published') { |
|
|
|
actionsHTML = `<button class="btn-primary" onclick="unpublishSupply('${supply.id}')">下架</button>`; |
|
|
|
actionsHTML = `<button class="btn-primary" onclick="unpublishSupply('${supply.id}')">下架</button> <button class="btn-warning" onclick="showEditSupply('${supply.id}')">编辑</button>`; |
|
|
|
} else if (supply.status === 'pending_review') { |
|
|
|
actionsHTML = ` |
|
|
|
<button class="btn-warning" onclick="showEditSupply('${supply.id}')">编辑</button> |
|
|
|
@ -6100,14 +6100,14 @@ |
|
|
|
const autoOfflineTime = new Date(); |
|
|
|
autoOfflineTime.setMinutes(autoOfflineTime.getMinutes() + minutes); |
|
|
|
// 格式化为数据库存储的北京时间格式 (YYYY-MM-DD HH:mm:ss) |
|
|
|
const autoOfflineTimeStr = autoOfflineTime.getFullYear() + '-' + |
|
|
|
String(autoOfflineTime.getMonth() + 1).padStart(2, '0') + '-' + |
|
|
|
String(autoOfflineTime.getDate()).padStart(2, '0') + ' ' + |
|
|
|
String(autoOfflineTime.getHours()).padStart(2, '0') + ':' + |
|
|
|
String(autoOfflineTime.getMinutes()).padStart(2, '0') + ':' + |
|
|
|
String(autoOfflineTime.getSeconds()).padStart(2, '0'); |
|
|
|
|
|
|
|
const formData = { |
|
|
|
const autoOfflineTimeStr = autoOfflineTime.getFullYear() + '-' + |
|
|
|
String(autoOfflineTime.getMonth() + 1).padStart(2, '0') + '-' + |
|
|
|
String(autoOfflineTime.getDate()).padStart(2, '0') + ' ' + |
|
|
|
String(autoOfflineTime.getHours()).padStart(2, '0') + ':' + |
|
|
|
String(autoOfflineTime.getMinutes()).padStart(2, '0') + ':' + |
|
|
|
String(autoOfflineTime.getSeconds()).padStart(2, '0'); |
|
|
|
|
|
|
|
const formData = { |
|
|
|
productName: document.getElementById('productName').value, |
|
|
|
category: document.getElementById('category').value, |
|
|
|
price: document.getElementById('price').value, |
|
|
|
@ -7966,6 +7966,9 @@ |
|
|
|
String(autoOfflineTime.getMinutes()).padStart(2, '0') + ':' + |
|
|
|
String(autoOfflineTime.getSeconds()).padStart(2, '0'); |
|
|
|
|
|
|
|
// 获取当前编辑的货源信息,用于保留原联系人数据 |
|
|
|
const currentSupply = supplyData.supplies.find(s => String(s.id) === String(currentEditSupplyId)); |
|
|
|
|
|
|
|
const formData = { |
|
|
|
productName: document.getElementById('editProductName').value, |
|
|
|
sourceType: document.getElementById('editSourceType').value, |
|
|
|
|