新增赋能中心一楼活动照片记录、每日清点和物品借出审批
This commit is contained in:
Vendored
+12
@@ -579,3 +579,15 @@ button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px s
|
||||
.duty-row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
|
||||
.settings-divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
|
||||
@media (max-width: 520px) { .duty-reminder-row { flex-wrap: wrap; } .duty-row-actions { width: 100%; } }
|
||||
|
||||
.activity-photos { display:flex; gap:10px; flex-wrap:wrap; margin:14px 0; }
|
||||
.activity-photos:empty { display:none; }
|
||||
.activity-photos img { width:120px; height:90px; object-fit:cover; border-radius:8px; border:1px solid var(--line); cursor:zoom-in; }
|
||||
.center-toolbar { margin-bottom:24px; }
|
||||
.center-tabs { max-width:500px; margin-bottom:24px; }
|
||||
.center-check-status { padding:18px 20px; background:var(--primary-soft); border:1px solid #d5e5da; border-radius:12px; margin-bottom:20px; }
|
||||
.center-subhead { margin-top:32px; }
|
||||
.center-history { margin-top:28px; }
|
||||
.center-history summary { cursor:pointer; padding:12px 0; }
|
||||
.center-history .acard { margin-top:12px; }
|
||||
@media (min-width:761px) and (max-width:1000px) { .topbar-inner { flex-wrap:wrap; } #nav { order:3; flex-basis:100%; } }
|
||||
|
||||
Vendored
+22
-2
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>WorkLog · 活动记录</title>
|
||||
<meta name="theme-color" content="#f5f7f5" />
|
||||
<link rel="stylesheet" href="/assets/styles.css?v=15" />
|
||||
<link rel="stylesheet" href="/assets/styles.css?v=16" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
@@ -16,6 +16,7 @@
|
||||
<nav id="nav" aria-label="主导航">
|
||||
<a href="#" data-view="feed">活动墙</a>
|
||||
<a href="#" data-view="mine">我的记录</a>
|
||||
<a href="#" data-view="center">赋能中心一楼</a>
|
||||
<a href="#" data-view="members">成员</a>
|
||||
<a href="#" data-view="profile">设置</a>
|
||||
</nav>
|
||||
@@ -123,6 +124,7 @@
|
||||
<option value="joined">我参加的</option>
|
||||
<option value="upcoming">未开始的</option>
|
||||
</select>
|
||||
<select id="feed-type" aria-label="活动记录类型"><option value="">全部活动类型</option><option value="normal">普通活动记录</option><option value="center">赋能中心一楼活动记录</option></select>
|
||||
<button class="btn" id="feed-refresh">刷新</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,6 +140,24 @@
|
||||
</main>
|
||||
|
||||
<!-- 我的记录 -->
|
||||
<main id="center-view" class="view hidden">
|
||||
<div class="container">
|
||||
<div class="page-head"><div><h2>赋能中心一楼</h2><p class="muted">记录活动,管理物品流转,完成每日清点</p></div></div>
|
||||
<div class="tabs center-tabs"><button class="tab active" data-center-tab="records">活动记录</button><button class="tab" data-center-tab="assets">物品清点与借出</button></div>
|
||||
<section id="center-records">
|
||||
<div class="filters center-toolbar"><input id="center-q" type="search" aria-label="搜索活动主题" placeholder="搜索活动主题" /><input id="center-from" type="date" aria-label="活动起始日期" /><input id="center-to" type="date" aria-label="活动截止日期" /><button id="center-new" class="btn primary">+ 记录一楼活动</button></div>
|
||||
<div id="center-record-list" class="card-list"></div>
|
||||
</section>
|
||||
<section id="center-assets" class="hidden">
|
||||
<div class="center-check-status" id="center-check-status" role="status"></div>
|
||||
<div class="filters center-toolbar"><input id="center-item-q" type="search" aria-label="搜索物品" placeholder="搜索物品名称" /><button id="center-add-item" class="btn">添加物品</button><button id="center-check" class="btn primary">完成今日清点</button><button id="center-refresh" class="btn">刷新</button></div>
|
||||
<div id="center-items" class="member-grid"></div>
|
||||
<div class="page-head center-subhead"><h3>借用记录</h3><select id="center-loan-status" aria-label="借用状态"><option value="all">全部借用</option><option value="pending">待审批</option><option value="rejected">已驳回</option><option value="borrowed">借出未归还</option><option value="returned">已归还</option></select></div>
|
||||
<div id="center-loans" class="card-list"></div>
|
||||
<details class="center-history"><summary>每日清点记录</summary><div id="center-checks"></div></details>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
<main id="mine-view" class="view hidden">
|
||||
<div class="container">
|
||||
<div class="page-head">
|
||||
@@ -272,7 +292,7 @@
|
||||
|
||||
<div id="toast" class="toast hidden" role="status" aria-live="polite"></div>
|
||||
|
||||
<script src="/js/app.js?v=22"></script>
|
||||
<script src="/js/app.js?v=23"></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Vendored
+132
-2
@@ -121,7 +121,7 @@
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------- 视图切换
|
||||
const VIEWS = ["auth", "feed", "mine", "members", "user", "profile"];
|
||||
const VIEWS = ["auth", "feed", "mine", "members", "user", "profile", "center"];
|
||||
function show(view) {
|
||||
state.view = view;
|
||||
VIEWS.forEach((v) => $(`#${v}-view`).classList.toggle("hidden", v !== view));
|
||||
@@ -138,6 +138,7 @@
|
||||
if (view === "mine") loadMine();
|
||||
if (view === "members") loadMembers();
|
||||
if (view === "profile") fillProfile();
|
||||
if (view === "center") loadCenter();
|
||||
}
|
||||
const showAuth = () => show("auth");
|
||||
|
||||
@@ -436,6 +437,8 @@
|
||||
</div>
|
||||
</div>
|
||||
${a.description ? `<p class="acard-desc">${esc(a.description).slice(0, 160)}${a.description.length > 160 ? "…" : ""}</p>` : ""}
|
||||
${a.record_type === 'center' ? '<span class="tag cat">赋能中心一楼活动记录</span>' : ''}
|
||||
${(a.photo_ids || []).length ? `<div class="activity-photos">${a.photo_ids.map(id => `<img data-photo="${esc(id)}" alt="活动照片" loading="lazy" />`).join('')}</div>` : ''}
|
||||
<div class="acard-foot">
|
||||
<div class="faces">
|
||||
${faces}${more}
|
||||
@@ -447,6 +450,7 @@
|
||||
}
|
||||
|
||||
function bindCardEvents(container) {
|
||||
loadPhotos(container);
|
||||
container.querySelectorAll(".acard").forEach((card) => {
|
||||
const id = card.dataset.id;
|
||||
const activity = findActivity(id);
|
||||
@@ -481,6 +485,7 @@
|
||||
function findActivity(id) {
|
||||
return (
|
||||
state.feed.items.find((x) => x.id === id) ||
|
||||
centerRecords.find((x) => x.id === id) ||
|
||||
state.mine.items.find((x) => x.id === id) ||
|
||||
(state.user.data && state.user.data.items.find((x) => x.id === id)) ||
|
||||
null
|
||||
@@ -492,6 +497,7 @@
|
||||
else if (state.view === "mine") loadMine();
|
||||
else if (state.view === "user" && state.user.id) loadUser(state.user.id);
|
||||
else if (state.view === "members") loadMembers();
|
||||
else if (state.view === "center") loadCenter();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------- 活动墙
|
||||
@@ -500,12 +506,14 @@
|
||||
if (state.feed.q) p.set("q", state.feed.q);
|
||||
if (state.feed.department) p.set("department", state.feed.department);
|
||||
if (state.feed.scope && state.feed.scope !== "all") p.set("scope", state.feed.scope);
|
||||
if ($("#feed-type").value) p.set("record_type", $("#feed-type").value);
|
||||
const data = await api(`/activities?${p}`);
|
||||
state.feed.items = data.items;
|
||||
$("#feed-list").innerHTML = data.items.map((a) => activityCard(a, { showOrganizer: true })).join("");
|
||||
$("#feed-list").classList.toggle("hidden", !data.items.length);
|
||||
$("#feed-empty").classList.toggle("hidden", !!data.items.length);
|
||||
bindCardEvents($("#feed-list"));
|
||||
loadPhotos($("#feed-list"));
|
||||
try {
|
||||
const ov = await api("/stats/overview");
|
||||
$("#feed-stats").innerHTML = `
|
||||
@@ -520,6 +528,7 @@
|
||||
$("#feed-dept").addEventListener("change", () => { state.feed.department = $("#feed-dept").value; loadFeed(); });
|
||||
$("#feed-scope").addEventListener("change", () => { state.feed.scope = $("#feed-scope").value; loadFeed(); });
|
||||
$("#feed-refresh").addEventListener("click", () => { loadFeed(); loadDutyStatus(); });
|
||||
$("#feed-type").addEventListener("change", loadFeed);
|
||||
|
||||
// 倒计时以服务端时间和浏览器单调时钟计算,不依赖用户电脑校时。
|
||||
let dutySnapshot = null;
|
||||
@@ -785,18 +794,20 @@
|
||||
const closeModal = () => { $("#modal-root").innerHTML = ""; document.removeEventListener("keydown", escListener); };
|
||||
|
||||
// ---- 新建 / 编辑活动
|
||||
function openActivityForm(existing = null) {
|
||||
function openActivityForm(existing = null, defaultType = 'normal') {
|
||||
const isEdit = !!existing;
|
||||
modal(`
|
||||
<h3>${isEdit ? "编辑活动" : "记录一场活动"}</h3>
|
||||
<p class="modal-sub muted">提交后立即生效,所有人可见。</p>
|
||||
<form id="act-form">
|
||||
<label>记录类型<select name="record_type"><option value="normal">普通活动记录</option><option value="center">赋能中心一楼活动记录</option></select></label>
|
||||
<label>活动名称 *<input name="title" required maxlength="120" value="${esc(existing?.title || "")}" placeholder="例如:周三晚例会" /></label>
|
||||
<div class="form-row">
|
||||
<label>开始时间 *<input name="start_at" type="datetime-local" required value="${existing ? toLocalInput(existing.start_at) : ""}" /></label>
|
||||
<label>地点<input name="location" maxlength="120" value="${esc(existing?.location || "")}" placeholder="如:3 号会议室" /></label>
|
||||
</div>
|
||||
<label>备注 <span class="hint-inline">(选填)</span><textarea name="description" rows="3" maxlength="2000" placeholder="做什么、带什么、注意事项…">${esc(existing?.description || "")}</textarea></label>
|
||||
<div id="act-photo-fields" class="hidden"><label>活动照片(必填,1–5 张)<input name="photos" type="file" accept="image/jpeg,image/png,image/webp" multiple /></label><p class="muted">每张不超过 8MB。编辑时不选新照片会保留原照片;选择新照片会替换原组。</p><div id="act-photo-preview" class="activity-photos">${(existing?.photo_ids || []).map(id => `<img data-photo="${esc(id)}" alt="活动照片" />`).join('')}</div></div>
|
||||
<label class="checkline"><input type="checkbox" name="visibility" ${!existing || existing.visibility === "public" ? "checked" : ""} /> 公开活动(所有人可见;不勾选则仅参加者可见)</label>
|
||||
<div class="form-error" id="act-error"></div>
|
||||
<div class="form-actions">
|
||||
@@ -804,6 +815,19 @@
|
||||
<button class="btn primary" type="submit" id="act-submit">${isEdit ? "保存修改" : "提交记录"}</button>
|
||||
</div>
|
||||
</form>`);
|
||||
const activityForm = $('#act-form');
|
||||
activityForm.record_type.value = existing?.record_type || defaultType;
|
||||
const togglePhotos = () => $('#act-photo-fields').classList.toggle('hidden', activityForm.record_type.value !== 'center');
|
||||
activityForm.record_type.addEventListener('change', togglePhotos); togglePhotos();
|
||||
loadPhotos($('#act-photo-preview'));
|
||||
activityForm.photos.addEventListener('change', () => {
|
||||
$('#act-photo-preview').replaceChildren();
|
||||
for (const file of [...activityForm.photos.files].slice(0, 5)) {
|
||||
const img = document.createElement('img'); const url = URL.createObjectURL(file);
|
||||
img.alt = file.name; img.src = url; img.onload = img.onerror = () => URL.revokeObjectURL(url);
|
||||
$('#act-photo-preview').append(img);
|
||||
}
|
||||
});
|
||||
|
||||
$("#act-cancel").addEventListener("click", closeModal);
|
||||
$("#act-form").addEventListener("submit", async (e) => {
|
||||
@@ -818,9 +842,22 @@
|
||||
location: f.location.value.trim(),
|
||||
description: f.description.value.trim(),
|
||||
visibility: f.visibility.checked ? "public" : "private",
|
||||
record_type: f.record_type.value,
|
||||
};
|
||||
btn.disabled = true;
|
||||
try {
|
||||
const files = [...f.photos.files];
|
||||
if (body.record_type === 'center') {
|
||||
if (files.length > 5 || files.some(file => file.size > 8 * 1024 * 1024)) throw new Error('最多5张照片,每张不超过8MB');
|
||||
body.photo_ids = files.length ? [] : [...(existing?.photo_ids || [])];
|
||||
if (!files.length && !body.photo_ids.length) throw new Error('一楼活动记录需要至少一张照片');
|
||||
for (const file of files) {
|
||||
const response = await fetch('/api/center/photos', { method: 'POST', headers: { Authorization: `Bearer ${getToken()}`, 'Content-Type': file.type }, body: file });
|
||||
const result = await response.json();
|
||||
if (!response.ok) throw new Error(typeof result.detail === 'string' ? result.detail : '照片上传失败');
|
||||
body.photo_ids.push(result.id);
|
||||
}
|
||||
} else body.photo_ids = [];
|
||||
if (isEdit) {
|
||||
await api(`/activities/${existing.id}`, { method: "PATCH", body });
|
||||
toast("已保存");
|
||||
@@ -897,6 +934,7 @@
|
||||
<div><span class="lbl">人数</span>${a.participant_count}${a.capacity ? ` / ${a.capacity}` : ""} · 已参加 ${a.attended_count}</div>
|
||||
</div>
|
||||
${a.description ? `<div class="detail-desc">${esc(a.description)}</div>` : ""}
|
||||
<div class="activity-photos">${(a.photo_ids || []).map(id => `<img data-photo="${esc(id)}" alt="活动照片" />`).join('')}</div>
|
||||
${noteRow}
|
||||
<h4 style="margin:14px 0 2px">一起参加过(${a.participant_count})</h4>
|
||||
<ul class="p-list">${rows || '<li class="muted">还没有其他人的参加记录</li>'}</ul>
|
||||
@@ -924,6 +962,7 @@
|
||||
try { await api(`/activities/${id}`, { method: "DELETE" }); toast("已删除"); closeModal(); refreshCurrent(); } catch (err) { toast(err.message, true); }
|
||||
});
|
||||
|
||||
loadPhotos($("#modal-root"));
|
||||
const noteInput = $("#d-note");
|
||||
if (noteInput) {
|
||||
let timer = null;
|
||||
@@ -958,6 +997,97 @@
|
||||
);
|
||||
}
|
||||
|
||||
const photoUrls = new Map();
|
||||
async function loadPhotos(container) {
|
||||
if (!container) return;
|
||||
for (const img of container.querySelectorAll('[data-photo]')) {
|
||||
if (img.dataset.loading) continue;
|
||||
img.dataset.loading = 'true';
|
||||
const id = img.dataset.photo;
|
||||
try {
|
||||
if (!photoUrls.has(id)) {
|
||||
photoUrls.set(id, fetch(`/api/center/photos/${encodeURIComponent(id)}`, { headers: { Authorization: `Bearer ${getToken()}` } }).then(async r => {
|
||||
if (!r.ok) throw new Error('照片加载失败');
|
||||
return URL.createObjectURL(await r.blob());
|
||||
}));
|
||||
}
|
||||
const url = await photoUrls.get(id); img.src = url;
|
||||
img.addEventListener('click', () => window.open(url, '_blank', 'noopener'));
|
||||
} catch { photoUrls.delete(id); img.alt = '照片暂时无法加载'; }
|
||||
}
|
||||
}
|
||||
|
||||
let centerTab = 'records';
|
||||
let centerItems = [];
|
||||
let centerCanReview = false;
|
||||
let centerRecords = [];
|
||||
async function loadCenter() {
|
||||
try {
|
||||
if (centerTab === 'records') {
|
||||
const p = new URLSearchParams({ record_type: 'center', q: $('#center-q').value });
|
||||
if ($('#center-from').value) p.set('date_from', Date.parse($('#center-from').value + 'T00:00:00+08:00'));
|
||||
if ($('#center-to').value) p.set('date_to', Date.parse($('#center-to').value + 'T23:59:59.999+08:00'));
|
||||
const data = await api(`/activities?${p}`); centerRecords = data.items;
|
||||
$('#center-record-list').innerHTML = data.items.map(a => activityCard(a)).join('') || '<div class="empty">暂无匹配的一楼活动,记录活动时请上传照片。</div>';
|
||||
bindCardEvents($('#center-record-list'));
|
||||
} else {
|
||||
const data = await api(`/center/items?q=${encodeURIComponent($('#center-item-q').value)}`); centerItems = data.items; centerCanReview = data.can_review;
|
||||
$('#center-check-status').textContent = `${data.day} · ${data.checked_today ? '今日清点已完成' : '今日待清点,请逐项核对实际在库数量'}${data.approval_configured ? '' : ' · 负责人待配置,借出申请将保持待审批'}`;
|
||||
$('#center-check').disabled = data.checked_today;
|
||||
$('#center-items').innerHTML = data.items.map(item => `<div class="mcard"><b>${esc(item.name)}</b><p class="muted">总数 ${item.quantity} · 已借出 ${item.borrowed} · 在库 ${item.available}</p><button class="btn sm" data-borrow="${item.id}" ${item.available ? '' : 'disabled'}>申请借出</button></div>`).join('') || '<div class="empty">还没有物品,请先添加物品。</div>';
|
||||
const loans = await api(`/center/loans?status=${$('#center-loan-status').value}`);
|
||||
$('#center-loans').innerHTML = loans.items.map(r => `<div class="acard"><b>${esc(r.item_name)} × ${r.quantity}</b> <span class="tag ${r.returned_at ? 'attended' : 'joined'}">${({pending:'待审批',approved:'借出中',returned:'已归还',rejected:'已驳回'})[r.status] || r.status}</span><p class="muted">${esc(r.display_name)} · ${fmtDate(r.created_at)}</p><p>${esc(r.reason)}</p>${r.contact ? `<p class="muted">联系方式:${esc(r.contact)}</p>` : ''}<p class="muted">${esc(r.review_note || '')}</p>${r.status === 'pending' && centerCanReview ? `<button class="btn primary sm" data-review="${r.id}" data-action="approve">批准</button> <button class="btn sm" data-review="${r.id}" data-action="reject">驳回</button>` : ''}${r.status === 'approved' && r.user_id === state.me.id ? `<button class="btn sm" data-return="${r.id}">登记归还</button>` : ''}</div>`).join('') || '<div class="empty">暂无借用记录。</div>';
|
||||
const checks = await api('/center/checks');
|
||||
$('#center-checks').innerHTML = checks.items.map(r => `<div class="acard"><b>${esc(r.day)}</b><p class="muted">${esc(r.display_name)} · ${fmtDate(r.created_at)}</p>${r.details.map(d => `<p>${esc(d.name)}:应在库 ${d.expected},实点 ${d.actual},借出 ${d.borrowed}</p>`).join('')}<p>${esc(r.note)}</p></div>`).join('') || '<p class="muted">暂无清点记录。</p>';
|
||||
}
|
||||
} catch (error) { toast(error.message, true); }
|
||||
}
|
||||
$$('[data-center-tab]').forEach(button => button.addEventListener('click', () => {
|
||||
centerTab = button.dataset.centerTab;
|
||||
$$('[data-center-tab]').forEach(b => b.classList.toggle('active', b === button));
|
||||
$('#center-records').classList.toggle('hidden', centerTab !== 'records');
|
||||
$('#center-assets').classList.toggle('hidden', centerTab !== 'assets');
|
||||
loadCenter();
|
||||
}));
|
||||
$('#center-new').addEventListener('click', () => openActivityForm(null, 'center'));
|
||||
for (const id of ['center-q', 'center-item-q']) $('#' + id).addEventListener('input', debounce(loadCenter, 300));
|
||||
for (const id of ['center-from', 'center-to', 'center-loan-status']) $('#' + id).addEventListener('change', loadCenter);
|
||||
$('#center-refresh').addEventListener('click', loadCenter);
|
||||
function centerForm(title, fields, save) {
|
||||
modal(`<h3>${title}</h3><form id="center-form">${fields}<div class="form-error" role="alert"></div><div class="form-actions"><button type="button" class="btn" id="center-cancel">取消</button><button class="btn primary" type="submit">提交</button></div></form>`);
|
||||
$('#center-cancel').addEventListener('click', closeModal);
|
||||
$('#center-form').addEventListener('submit', async event => {
|
||||
event.preventDefault(); const f = event.target; const button = f.querySelector('[type=submit]'); button.disabled = true;
|
||||
try { await save(f); closeModal(); await loadCenter(); }
|
||||
catch (error) { f.querySelector('.form-error').textContent = error.message; button.disabled = false; }
|
||||
});
|
||||
}
|
||||
$('#center-add-item').addEventListener('click', () => centerForm('添加一楼物品', '<label>物品名称<input name="item_name" required maxlength="100" /></label><label>物品总数<input name="quantity" type="number" min="0" max="100000" value="1" required /></label>', f => api('/center/items', { method: 'POST', body: { name: f.item_name.value, quantity: Number(f.quantity.value) } })));
|
||||
$('#center-items').addEventListener('click', event => {
|
||||
const button = event.target.closest('[data-borrow]'); if (!button || button.disabled) return;
|
||||
const item = centerItems.find(r => r.id === button.dataset.borrow);
|
||||
centerForm(`借出 · ${esc(item.name)}`, `<p class="muted">提交后等待负责人审批。联系方式仅本人和负责人可见,便于联系归还。</p><label>借出数量<input name="quantity" type="number" min="1" max="${item.available}" value="1" required /></label><label>申请理由<textarea name="reason" required maxlength="500"></textarea></label><label>联系方式<input name="contact" required maxlength="200" placeholder="电话、微信或邮箱" /></label>`, f => api(`/center/items/${item.id}/loans`, { method: 'POST', body: { quantity: Number(f.quantity.value), reason: f.reason.value, contact: f.contact.value } }));
|
||||
});
|
||||
$('#center-loans').addEventListener('click', async event => {
|
||||
const review = event.target.closest('[data-review]');
|
||||
if (review && !review.disabled) {
|
||||
centerForm(review.dataset.action === 'approve' ? '批准借出申请' : '驳回借出申请', '<label>审批说明<textarea name="note" maxlength="500"></textarea></label>', f => api(`/center/loans/${review.dataset.review}/review`, { method: 'POST', body: { action: review.dataset.action, note: f.note.value } }));
|
||||
return;
|
||||
}
|
||||
const button = event.target.closest('[data-return]'); if (!button || button.disabled) return;
|
||||
button.disabled = true;
|
||||
try { await api(`/center/loans/${button.dataset.return}/return`, { method: 'POST' }); await loadCenter(); }
|
||||
catch (error) { toast(error.message, true); button.disabled = false; }
|
||||
});
|
||||
$('#center-check').addEventListener('click', async () => {
|
||||
try {
|
||||
const data = await api('/center/items');
|
||||
if (data.checked_today) return toast('今天已完成清点');
|
||||
if (!data.items.length) return toast('请先添加物品', true);
|
||||
centerForm('今日物品清点', '<p class="muted">填写实际在库数量,已借出物品不计入实点。同一天全场仅提交一次。</p>' + data.items.map(item => `<label>${esc(item.name)}(应在库 ${item.available})<input name="count-${item.id}" type="number" min="0" max="100000" value="${item.available}" required /></label>`).join('') + '<label>差异说明 / 备注<textarea name="note" maxlength="1000"></textarea></label>', f => api('/center/checks', { method: 'POST', body: { quantities: Object.fromEntries(data.items.map(item => [item.id, Number(f.elements['count-' + item.id].value)])), note: f.note.value } }));
|
||||
} catch (error) { toast(error.message, true); }
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------- 设置
|
||||
const emailChangeCooldowns = new Map();
|
||||
let emailChangePending = false;
|
||||
|
||||
Reference in New Issue
Block a user