v1.0.50: 碎片处理6项修改 - 1)硬数据板块改名为「硬数据碎片新增与处理」;2)硬数据彻底移除「状态」字段(查看弹窗/数据表status列/列表接口全部删除,已转换以converted_id非空标识,preliminary旧页同步清理);3)硬数据操作列「继续补全」改「手动补全」+新增「AI补全」占位;4)软数据操作列「补全」改「手动补全」+新增「AI补全」占位;5)硬数据「废弃」改为从preliminary_data彻底硬删除;6)人员性别枚举收敛为男/女/未知(迁移归并其他/保密)

This commit is contained in:
nanguaboss
2026-08-11 00:09:33 +08:00
parent 9f06ee1cd9
commit 69fd4246c2
15 changed files with 92 additions and 85 deletions
+28 -15
View File
@@ -1,7 +1,7 @@
/**
* fragment.js - 碎片处理中心(v1.0.27)
* fragment.js - 碎片处理中心(v1.0.50)
* 布局:顶部指标卡 + 【硬碎片】独立区块 + 【软碎片】独立区块(不用 Tab)
* 硬碎片:preliminary_data 中未终结记录(完整度/类型/内容摘要/来源/录入人/时间/状态/操作)
* 硬碎片:preliminary_data 中未转换记录(完整度/类型/内容摘要/来源/录入人/时间/操作;废弃即硬删除,无状态字段)
* 软碎片:四张主表 is_incomplete=1 记录(完整度/缺失层级标签/名称/缺失字段/所属表/时间/操作)
*/
$(function () {
@@ -42,8 +42,8 @@ $(function () {
// ================= 硬碎片 =================
'<div class="card" style="margin-top:14px;">' +
' <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;">' +
' <b style="font-size:15px;color:#1e2a3a;">硬数据新增与处理</b>' +
' <span style="font-size:12px;color:#8a94a6;">关键字段缺失、未入主表的原始线索(不含已转换/已废弃)</span>' +
' <b style="font-size:15px;color:#1e2a3a;">硬数据碎片新增与处理</b>' +
' <span style="font-size:12px;color:#8a94a6;">关键字段缺失、未入主表的原始线索(不含已转换)</span>' +
' </div>' +
' <div class="toolbar">' +
' <select id="hard-type"><option value="">全部类型</option>' +
@@ -147,7 +147,8 @@ $(function () {
'<td>' + fmtDate(r.updated_at) + '</td>' +
'<td class="ops">' +
' <a onclick="viewHard(' + r.id + ')">查看</a>' +
' <a onclick="convertHard(' + r.id + ')">继续补全</a>' +
' <a onclick="convertHard(' + r.id + ')">手动补全</a>' +
' <a onclick="aiCompleteHard(' + r.id + ')">AI补全</a>' +
' <a onclick="convertHardQuick(' + r.id + ')">转软碎片</a>' +
' <a onclick="discardHard(' + r.id + ')">废弃</a>' +
'</td></tr>';
@@ -184,7 +185,9 @@ $(function () {
'<td style="max-width:240px;">' + escHtml(missing) + '</td>' +
'<td>' + escHtml(r.table_label) + '</td>' +
'<td>' + fmtDate(r.updated_at) + '</td>' +
'<td class="ops"><a onclick="completeSoft(\'' + r.table + '\',' + r.id + ')">补全</a></td></tr>';
'<td class="ops">' +
' <a onclick="completeSoft(\'' + r.table + '\',' + r.id + ')">手动补全</a>' +
' <a onclick="aiCompleteSoft(\'' + r.table + '\',' + r.id + ')">AI补全</a></td></tr>';
});
if (!softRows.length) {
html = '<tr><td colspan="8" class="empty-tip" style="padding:30px 0;">暂无软碎片</td></tr>';
@@ -301,7 +304,7 @@ $(function () {
var fields = [
['类型', d.source_type_label], ['公司名称', d.company_name], ['联系人', d.person_name],
['联系电话', d.contact_phone], ['联系邮箱', d.contact_email],
['来源渠道', d.source_channel], ['录入人', d.recorded_by], ['状态', d.status],
['来源渠道', d.source_channel], ['录入人', d.recorded_by],
['录入时间', d.created_at], ['处理时间', d.processed_at]
];
fields.forEach(function (f) {
@@ -354,7 +357,7 @@ $(function () {
'</form>';
var idx = Dialog.open({
title: '硬数据继续补全',
title: '硬数据手动补全',
area: ['640px', 'auto'],
content: content,
btn: false
@@ -429,24 +432,24 @@ $(function () {
target = d.company_name ? 'company' : (d.person_name ? 'person' : '');
}
if (!target) {
Dialog.error('该碎片缺少可转换信息,请使用「继续补全」');
Dialog.error('该碎片缺少可转换信息,请使用「手动补全」');
return;
}
// 各类型转软碎片基本要求预检
if (target === 'company' && (!d.industry || !d.registration_number)) {
Dialog.error('企业类型转软碎片:请先「继续补全」填写行业和注册号');
Dialog.error('企业类型转软碎片:请先「手动补全」填写行业和注册号');
return;
}
if (target === 'person' && !d.person_name) {
Dialog.error('人员类型转软碎片:请先「继续补全」填写姓名');
Dialog.error('人员类型转软碎片:请先「手动补全」填写姓名');
return;
}
if (target === 'product' && !d.company_name) {
Dialog.error('产品类型转软碎片:请先「继续补全」填写公司名称');
Dialog.error('产品类型转软碎片:请先「手动补全」填写公司名称');
return;
}
if (target === 'need' && !d.company_name) {
Dialog.error('需求类型转软碎片:请先「继续补全」填写公司名称');
Dialog.error('需求类型转软碎片:请先「手动补全」填写公司名称');
return;
}
Dialog.confirm('确定将该硬数据直接转换为软数据碎片吗?', function () {
@@ -461,9 +464,14 @@ $(function () {
});
};
/* ================= 硬碎片:废弃 ================= */
/* ================= 硬碎片:AI补全(占位,后续开发) ================= */
window.aiCompleteHard = function (id) {
Dialog.alert('AI补全功能开发中,敬请期待');
};
/* ================= 硬碎片:废弃(彻底硬删除) ================= */
window.discardHard = function (id) {
Dialog.confirm('确定废弃该碎片吗?废弃后不可恢复。', function () {
Dialog.confirm('确定废弃该碎片吗?将从数据表中彻底删除,不可恢复。', function () {
httpPost('fragment/hard_discard.php', { id: id }).then(function () {
Dialog.success('已废弃', function () {
loadStats();
@@ -473,6 +481,11 @@ $(function () {
});
};
/* ================= 软碎片:AI补全(占位,后续开发) ================= */
window.aiCompleteSoft = function (table, id) {
Dialog.alert('AI补全功能开发中,敬请期待');
};
/* ================= 软碎片:补全 ================= */
window.completeSoft = function (table, id) {
httpGet('fragment/soft_detail.php', { table: table, id: id }).then(function (d) {