|
|
|
@ -2708,6 +2708,8 @@ |
|
|
|
var key = trace.userId || (trace.phoneNumber || trace.nickName); |
|
|
|
if (!groupedTraces[key]) { |
|
|
|
groupedTraces[key] = { |
|
|
|
userId: trace.userId, |
|
|
|
traceId: trace.id, // 保存traceId |
|
|
|
nickName: trace.nickName, |
|
|
|
phoneNumber: trace.phoneNumber, |
|
|
|
followup: trace.followup, |
|
|
|
@ -2893,7 +2895,7 @@ |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
${mergedTraces.map((trace, index) => ` |
|
|
|
<tr data-trace-id="${traces[index].id || ''}" data-user-id="${trace.userId || ''}"> |
|
|
|
<tr data-trace-id="${trace.traceId || ''}" data-user-id="${trace.userId || ''}"> |
|
|
|
<td style="padding: 8px; border: 1px solid #e8e8e8; white-space: nowrap; vertical-align: top;">${trace.nickName || '-'}</td> |
|
|
|
<td style="padding: 8px; border: 1px solid #e8e8e8; white-space: nowrap; vertical-align: top;">${trace.phoneNumber || '-'}</td> |
|
|
|
<td style="padding: 8px; border: 1px solid #e8e8e8; vertical-align: top;"> |
|
|
|
@ -2903,7 +2905,7 @@ |
|
|
|
<td style="padding: 8px; border: 1px solid #e8e8e8; white-space: nowrap; vertical-align: top;">${trace.responseTime || '-'}</td> |
|
|
|
<td style="padding: 8px; border: 1px solid #e8e8e8; white-space: nowrap; vertical-align: top;">${trace.managerName || '-'}</td> |
|
|
|
<td style="padding: 8px; border: 1px solid #e8e8e8; white-space: nowrap; vertical-align: top;"> |
|
|
|
${!isAdmin ? `<button onclick="applyCustomer('${trace.userId || ''}', '${trace.nickName || ''}', this, '${traces[index].id || ''}'); event.stopPropagation();" style="padding: 4px 8px; background-color: #722ed1; color: white; border: none; border-radius: 4px; font-size: 12px;">申请</button>` : '-'} |
|
|
|
${!isAdmin ? `<button onclick="applyCustomer('${trace.userId || ''}', '${trace.nickName || ''}', this, '${trace.traceId || ''}'); event.stopPropagation();" style="padding: 4px 8px; background-color: #722ed1; color: white; border: none; border-radius: 4px; font-size: 12px;">申请</button>` : '-'} |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
`).join('')} |
|
|
|
@ -4125,8 +4127,8 @@ |
|
|
|
<thead> |
|
|
|
<tr style="background-color: #f5f5f5;"> |
|
|
|
<th style="padding: 12px; border: 1px solid #e8e8e8; text-align: left;">申请ID</th> |
|
|
|
<th style="padding: 12px; border: 1px solid #e8e8e8; text-align: left;">客户ID</th> |
|
|
|
<th style="padding: 12px; border: 1px solid #e8e8e8; text-align: left;">业务员</th> |
|
|
|
<th style="padding: 12px; border: 1px solid #e8e8e8; text-align: left;">电话号码</th> |
|
|
|
<th style="padding: 12px; border: 1px solid #e8e8e8; text-align: left;">申请人</th> |
|
|
|
<th style="padding: 12px; border: 1px solid #e8e8e8; text-align: left;">原负责人</th> |
|
|
|
<th style="padding: 12px; border: 1px solid #e8e8e8; text-align: left;">申请时间</th> |
|
|
|
<th style="padding: 12px; border: 1px solid #e8e8e8; text-align: left;">状态</th> |
|
|
|
@ -4257,7 +4259,7 @@ |
|
|
|
<thead> |
|
|
|
<tr style="background-color: #f5f5f5;"> |
|
|
|
<th style="padding: 10px; border: 1px solid #e8e8e8; text-align: left; width: 80px; white-space: nowrap;">申请ID</th> |
|
|
|
<th style="padding: 10px; border: 1px solid #e8e8e8; text-align: left; width: 180px; white-space: nowrap;">客户ID</th> |
|
|
|
<th style="padding: 10px; border: 1px solid #e8e8e8; text-align: left; width: 180px; white-space: nowrap;">电话号码</th> |
|
|
|
<th style="padding: 10px; border: 1px solid #e8e8e8; text-align: left; width: 140px; white-space: nowrap;">申请时间</th> |
|
|
|
<th style="padding: 10px; border: 1px solid #e8e8e8; text-align: left; width: 80px; white-space: nowrap;">状态</th> |
|
|
|
<th style="padding: 10px; border: 1px solid #e8e8e8; text-align: left; width: 140px; white-space: nowrap;">审批时间</th> |
|
|
|
@ -6388,7 +6390,7 @@ |
|
|
|
var row = ` |
|
|
|
<tr> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8; white-space: nowrap;">${apply.id}</td> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">${apply.user_id}</td> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8; white-space: nowrap;">${apply.phone || '-'}</td> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8;">${apply.sales_name}</td> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8;">${apply.original_manager_name || '-'}</td> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8; white-space: nowrap;">${formatDateTime(apply.apply_time)}</td> |
|
|
|
@ -6527,7 +6529,7 @@ |
|
|
|
var row = ` |
|
|
|
<tr> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8; white-space: nowrap;">${apply.id}</td> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">${apply.user_id}</td> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">${apply.phone || '-'}</td> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8; white-space: nowrap;">${formatDateTime(apply.apply_time)}</td> |
|
|
|
<td style="padding: 10px; border: 1px solid #e8e8e8; white-space: nowrap;"> |
|
|
|
<span style="display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; color: white; background-color: ${statusColor};">${statusText}</span> |
|
|
|
|