ly #10

Merged
ly merged 2 commits from ly into KH 1 month ago
  1. 144
      web/src/main/resources/static/index.html
  2. 6
      web/src/main/resources/static/login.html

144
web/src/main/resources/static/index.html

@ -1755,21 +1755,21 @@
</div>
<select id="followupType" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; cursor: pointer; transition: all 0.3s ease;">
<option value="">请选择客户类型</option>
<option value="wholesale">批发贸易类</option>
<option value="e-commerce">电商平台类</option>
<option value="delivery_retail">配送零售类</option>
<option value="defective_egg">次品蛋专项类</option>
<option value="other">其他类型</option>
<option value="批发贸易类">批发贸易类</option>
<option value="电商平台类">电商平台类</option>
<option value="配送零售类">配送零售类</option>
<option value="次品蛋专项类">次品蛋专项类</option>
<option value="其他类型">其他类型</option>
</select>
</div>
<div style="margin-bottom: 20px;">
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: #666;"><span style="color: #ff4d4f;">*</span> 客户等级</label>
<select id="followupLevel" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; cursor: pointer; transition: all 0.3s ease;">
<option value="">请选择客户等级</option>
<option value="important">A-重要客户</option>
<option value="ordinary">B-普通客户</option>
<option value="low_value">C-低价值客户</option>
<option value="logistics">D-物流自提客户</option>
<option value="A-重要客户">A-重要客户</option>
<option value="B-普通客户">B-普通客户</option>
<option value="C-低价值客户">C-低价值客户</option>
<option value="D-物流自提客户">D-物流自提客户</option>
</select>
</div>
<div style="margin-bottom: 20px;">
@ -2052,15 +2052,15 @@
</div>
<div style="margin-bottom: 20px;">
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: #666;">详细地址</label>
<input type="text" id="followupDetailedAddress" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; transition: all 0.3s ease;">
<input type="text" id="followupDetailedAddress" placeholder="请输入详细地址" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; transition: all 0.3s ease;">
</div>
<div style="margin-bottom: 20px;">
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: #666;"><span style="color: #ff4d4f;">*</span> 客户公司</label>
<input type="text" id="followupCompany" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; transition: all 0.3s ease;">
<input type="text" id="followupCompany" placeholder="请输入客户公司" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; transition: all 0.3s ease;">
</div>
<div style="margin-bottom: 24px;">
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: #666;"><span style="color: #ff4d4f;">*</span> 跟进内容</label>
<textarea id="followupContent" rows="3" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; resize: vertical; transition: all 0.3s ease;"></textarea>
<textarea id="followupContent" placeholder="请输入跟进内容" rows="3" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; resize: vertical; transition: all 0.3s ease;"></textarea>
</div>
<div style="text-align: right; margin-top: 24px;">
<button onclick="closeFollowupModal()" style="padding: 10px 16px; margin-right: 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; color: #666; background-color: white; cursor: pointer; transition: all 0.3s ease;">取消</button>
@ -2446,6 +2446,12 @@
}
function mapUserType(type) {
// 如果已经是中文,则直接返回
var chineseTypes = ['大贸易客户', '供应商', '两者都是', '小品种客户', '批发贸易类', '电商平台类', '配送零售类', '次品蛋专项类', '其他类型'];
if (chineseTypes.includes(type)) {
return type;
}
var typeMap = {
'buyer': '大贸易客户',
'seller': '供应商',
@ -2461,6 +2467,12 @@
}
function mapUserLevel(level) {
// 如果已经是中文,则直接返回
var chineseLevels = ['A-重要客户', 'B-普通客户', 'C-低价值客户', 'D-物流自提客户', '-'];
if (chineseLevels.includes(level)) {
return level;
}
var levelMap = {
'important': 'A-重要客户',
'ordinary': 'B-普通客户',
@ -2748,7 +2760,113 @@
document.getElementById('followupUserId').value = userId;
document.getElementById('followupUserName').value = userName;
document.getElementById('followupPhone').value = phone;
document.getElementById('followupContent').value = '';
// 查找用户数据
var user = null;
// 首先在个人数据中查找
if (allPersonalData.length > 0) {
for (var i = 0; i < allPersonalData.length; i++) {
if (allPersonalData[i].userId === userId) {
user = allPersonalData[i];
break;
}
}
}
// 如果在个人数据中找不到,尝试在公海池数据中查找
if (!user && allPublicData.length > 0) {
for (var i = 0; i < allPublicData.length; i++) {
if (allPublicData[i].userId === userId) {
user = allPublicData[i];
break;
}
}
}
// 填充表单数据
if (user) {
// 客户类型 - 处理中英文映射
var typeValue = user.type || '';
// 检查是否为英文值,如果是则转换为中文
var typeMap = {
'buyer': '大贸易客户',
'seller': '供应商',
'both': '两者都是',
'smalls': '小品种客户',
'wholesale': '批发贸易类',
'e-commerce': '电商平台类',
'delivery_retail': '配送零售类',
'defective_egg': '次品蛋专项类',
'other': '其他类型'
};
typeValue = typeMap[typeValue] || typeValue;
// 检查是否在下拉选项中存在,如果不存在则设为空
var typeOptions = ['批发贸易类', '电商平台类', '配送零售类', '次品蛋专项类', '其他类型'];
if (!typeOptions.includes(typeValue)) {
typeValue = '';
}
document.getElementById('followupType').value = typeValue;
// 客户等级 - 处理中英文映射
var levelValue = user.level || '';
// 检查是否为英文值,如果是则转换为中文
var levelMap = {
'important': 'A-重要客户',
'ordinary': 'B-普通客户',
'low_value': 'C-低价值客户',
'logistics': 'D-物流自提客户',
'unclassified': ''
};
levelValue = levelMap[levelValue] || levelValue;
// 检查是否在下拉选项中存在,如果不存在则设为空
var levelOptions = ['A-重要客户', 'B-普通客户', 'C-低价值客户', 'D-物流自提客户'];
if (!levelOptions.includes(levelValue)) {
levelValue = '';
}
document.getElementById('followupLevel').value = levelValue;
// 客户需求
var demandValue = user.demand || '';
// 检查是否在下拉选项中存在,如果不存在则设为空
var demandOptions = ['粉蛋', '粉三', '红蛋', '绿壳', '土鸡蛋', '次品', '白壳'];
if (!demandOptions.includes(demandValue)) {
demandValue = '';
}
document.getElementById('followupDemand').value = demandValue;
// 客户地区(特殊处理)
if (user.region) {
document.getElementById('followupRegion').value = user.region;
document.getElementById('followupRegionDisplay').textContent = user.region;
document.getElementById('followupRegionDisplay').style.color = '#333';
} else {
document.getElementById('followupRegion').value = '';
document.getElementById('followupRegionDisplay').textContent = '请选择客户地区';
document.getElementById('followupRegionDisplay').style.color = '#999';
}
// 详细地址
document.getElementById('followupDetailedAddress').value = user.detailedaddress || '';
// 客户公司
document.getElementById('followupCompany').value = user.company || '';
// 跟进内容
document.getElementById('followupContent').value = user.followup || '';
} else {
// 如果没有找到用户数据,清空表单
document.getElementById('followupType').value = '';
document.getElementById('followupLevel').value = '';
document.getElementById('followupDemand').value = '';
document.getElementById('followupRegion').value = '';
document.getElementById('followupRegionDisplay').textContent = '请选择客户地区';
document.getElementById('followupRegionDisplay').style.color = '#999';
document.getElementById('followupDetailedAddress').value = '';
document.getElementById('followupCompany').value = '';
document.getElementById('followupContent').value = '';
}
document.getElementById('followupModal').style.display = 'block';
// 防止背景滚动
document.body.style.overflow = 'hidden';

6
web/src/main/resources/static/login.html

@ -89,15 +89,15 @@
<form id="loginForm">
<div class="form-group">
<label for="projectName">职位名称</label>
<input type="text" id="projectName" name="projectName" required>
<input type="text" id="projectName" name="projectName" placeholder="请输入职位名称" required>
</div>
<div class="form-group">
<label for="userName">用户名</label>
<input type="text" id="userName" name="userName" required>
<input type="text" id="userName" name="userName" placeholder="请输入用户名" required>
</div>
<div class="form-group">
<label for="password">密码</label>
<input type="password" id="password" name="password" required>
<input type="password" id="password" name="password" placeholder="请输入密码" required>
</div>
<button type="submit">登录</button>
<div id="errorMessage" class="error-message"></div>

Loading…
Cancel
Save