v1.0.42: 硬数据列表调整 - 删状态列+操作改(查看/继续补全/转软碎片/废弃)+新增转软碎片快捷转换(不弹窗直接转,混合类型自动判定)+新增弹窗来源渠道与字典一致(去掉硬加的手动录入选项)

This commit is contained in:
nanguaboss
2026-08-10 00:20:14 +08:00
parent 7fc0546a1e
commit 03891db798
2 changed files with 31 additions and 8 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ var BASE_URL = '/api/';
var PAGE_SIZE = 20;
/** 系统版本号(logo旁展示):修改代码后运行 tools/bump_version.php 自动递增 */
var APP_VERSION = 'v1.0.41';
var APP_VERSION = 'v1.0.42';
/** 页脚版权/备案信息(在 config.js 中修改) */
var FOOTER_TEXT = '© 2026 SuperLink 管理系统 版权所有 | 备案号:请替换为真实备案号';
+30 -7
View File
@@ -60,7 +60,7 @@ $(function () {
' <button class="btn btn-success" id="hard-add">+ 新增碎片</button>' +
' </div>' +
' <div class="table-wrap"><table class="grid">' +
' <thead><tr><th>完整度</th><th>类型</th><th>内容摘要</th><th>来源</th><th>录入人</th><th>录入时间</th><th>状态</th><th>操作</th></tr></thead>' +
' <thead><tr><th>完整度</th><th>类型</th><th>内容摘要</th><th>来源</th><th>录入人</th><th>录入时间</th><th>操作</th></tr></thead>' +
' <tbody id="hard-tbody"></tbody>' +
' </table></div>' +
' <div class="pagination" id="hard-pagination"></div>' +
@@ -149,15 +149,15 @@ $(function () {
'<td>' + escHtml(r.source_channel || '-') + '</td>' +
'<td>' + escHtml(r.recorded_by || '-') + '</td>' +
'<td>' + fmtDate(r.created_at) + '</td>' +
'<td>' + escHtml(r.status || '-') + '</td>' +
'<td class="ops">' +
' <a onclick="viewHard(' + r.id + ')">查看</a>' +
' <a onclick="convertHard(' + r.id + ')">补全录入</a>' +
' <a onclick="convertHard(' + r.id + ')">继续补全</a>' +
' <a onclick="convertHardQuick(' + r.id + ')">转软碎片</a>' +
' <a onclick="discardHard(' + r.id + ')">废弃</a>' +
'</td></tr>';
});
if (!hardRows.length) {
html = '<tr><td colspan="8" class="empty-tip" style="padding:30px 0;">暂无硬碎片</td></tr>';
html = '<tr><td colspan="7" class="empty-tip" style="padding:30px 0;">暂无硬碎片</td></tr>';
}
$('#hard-tbody').html(html);
renderPagination($('#hard-pagination'), d, loadHardList);
@@ -212,7 +212,7 @@ $(function () {
' <div class="form-item"><label>联系电话</label><input type="text" name="contact_phone" placeholder="如:13812345678"></div>' +
' <div class="form-item"><label>联系邮箱</label><input type="text" name="contact_email" placeholder="如:a@b.com"></div>' +
' <div class="form-item" id="ha-f-idnumber"><label>身份证号码</label><input type="text" name="id_number" placeholder="15 或 18 位"></div>' +
' <div class="form-item"><label>来源渠道</label><select name="source_channel" id="ha-source"><option value="手动录入">手动录入</option></select></div>' +
' <div class="form-item"><label>来源渠道</label><select name="source_channel" id="ha-source"><option value="">-</option></select></div>' +
' <div class="form-item" id="ha-f-platform"><label>社媒平台</label><select name="platform" id="ha-platform"><option value="">-</option>' +
' <option value="wechat">微信</option><option value="weibo">微博</option><option value="douyin">抖音</option>' +
' <option value="bilibili">B站</option><option value="linkedin">领英</option><option value="xiaohongshu">小红书</option>' +
@@ -232,9 +232,9 @@ $(function () {
btn: false
});
// 来源渠道选项
// 来源渠道选项(与 source_channels 字典保持一致,不额外添加选项)
httpGet('common/dicts.php', { type: 'all' }).then(function (d) {
var html = '<option value="手动录入">手动录入</option>';
var html = '<option value="">-</option>';
(d.source_channels || []).forEach(function (c) {
html += '<option value="' + escHtml(c.name) + '">' + escHtml(c.name) + '</option>';
});
@@ -369,6 +369,29 @@ $(function () {
});
};
/* ================= 硬碎片:转软碎片(不弹窗,直接转换) ================= */
window.convertHardQuick = function (id) {
httpGet('fragment/hard_detail.php', { id: id }).then(function (d) {
var target = d.source_type;
if (target === 'mixed') {
target = d.company_name ? 'company' : (d.person_name ? 'person' : '');
}
if (!target) {
Dialog.error('该碎片缺少可转换信息,请使用「继续补全」');
return;
}
Dialog.confirm('确定将该硬数据直接转换为软数据碎片吗?', function () {
httpPost('fragment/hard_convert.php', { id: id, target_type: target }).then(function () {
Dialog.success('已转为软碎片', function () {
loadStats();
loadHardList(hardPage);
loadSoftList(1);
});
});
});
});
};
/* ================= 硬碎片:废弃 ================= */
window.discardHard = function (id) {
Dialog.confirm('确定废弃该碎片吗?废弃后不可恢复。', function () {