Browse Source

修复客户需求下拉框不显示'其他需求'的问题

pull/12/head
Default User 1 month ago
parent
commit
25398e979c
  1. 149
      web/src/main/resources/static/index.html

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

@ -36,6 +36,12 @@
display: flex;
align-items: center;
gap: 15px;
background: rgba(255, 255, 255, 0.1);
padding: 8px 16px;
border-radius: 20px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
transition: all 0.3s ease;
}
.user-info span {
@ -1743,10 +1749,102 @@
.join('&');
}
// 添加表单元素悬停样式
var formHoverStyles = `
<style>
/* 美化所有下拉选择框 */
select {
appearance: none !important;
-webkit-appearance: none !important;
-moz-appearance: none !important;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
background-repeat: no-repeat !important;
background-position: right 12px center !important;
background-size: 12px 12px !important;
padding-right: 36px !important;
border: 1px solid #d9d9d9 !important;
border-radius: 8px !important;
font-size: 14px !important;
font-weight: 400 !important;
color: #333 !important;
background-color: white !important;
cursor: pointer !important;
transition: all 0.3s ease !important;
box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}
/* 为跟进模态框中的表单元素添加悬停效果 */
#followupType:hover,
#followupLevel:hover,
#followupDemand:hover,
#followupDetailedAddress:hover,
#followupCompany:hover,
#followupContent:hover {
border-color: #1890ff !important;
box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15) !important;
}
/* 下拉选择框聚焦样式 */
select:focus {
outline: none !important;
border-color: #1890ff !important;
box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2) !important;
}
/* 下拉选择框禁用样式 */
select:disabled {
background-color: #f5f5f5 !important;
cursor: not-allowed !important;
opacity: 0.6 !important;
}
/* 为所有按钮添加更明显的悬停效果 */
button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}
/* 为搜索选择组件添加悬停效果 */
.search-select-input:hover {
border-color: #1890ff !important;
}
/* 为搜索选择下拉选项添加悬停效果 */
.search-select-option:hover {
background-color: #e6f7ff !important;
color: #1890ff !important;
}
/* 输入框统一美化 */
input[type="text"],
textarea {
border: 1px solid #d9d9d9 !important;
border-radius: 8px !important;
font-size: 14px !important;
font-weight: 400 !important;
color: #333 !important;
background-color: white !important;
transition: all 0.3s ease !important;
box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}
/* 输入框聚焦样式 */
input[type="text"]:focus,
textarea:focus {
outline: none !important;
border-color: #1890ff !important;
box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2) !important;
}
</style>
`;
// 将样式添加到页面头部
document.head.insertAdjacentHTML('beforeend', formHoverStyles);
// 跟进弹窗HTML
var followupModalHTML = `
<div id="followupModal" style="position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0,0,0,0.5); display: none; z-index: 9999; animation: fadeIn 0.3s ease; overflow: hidden; pointer-events: auto;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 8px; width: 450px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease; max-height: 90vh; overflow-y: auto;">
<div id="followupModal" style="position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.7) 100%); backdrop-filter: blur(5px); display: none; z-index: 9999; animation: fadeIn 0.3s ease; overflow: hidden; pointer-events: auto;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 12px; width: 450px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.18); animation: slideIn 0.3s ease; max-height: 90vh; overflow-y: auto; transition: all 0.3s ease;">
<h3 style="margin: 0 0 20px 0; font-size: 18px; font-weight: 600; color: #333; text-align: center;">跟进客户</h3>
<input type="hidden" id="followupUserId">
<div style="margin-bottom: 20px;">
@ -1762,7 +1860,7 @@
<label style="font-size: 14px; font-weight: 500; color: #666;"><span style="color: #ff4d4f;">*</span> 客户类型</label>
<button onclick="showTypeHelp()" style="width: 20px; height: 20px; border-radius: 50%; border: 1px solid #1890ff; background-color: white; color: #1890ff; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; padding: 0; transition: all 0.3s ease;">?</button>
</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;">
<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; background-color: white;">
<option value="">请选择客户类型</option>
<option value="批发贸易类">批发贸易类</option>
<option value="电商平台类">电商平台类</option>
@ -1773,7 +1871,7 @@
</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;">
<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; background-color: white;">
<option value="">请选择客户等级</option>
<option value="A-重要客户">A-重要客户</option>
<option value="B-普通客户">B-普通客户</option>
@ -1783,7 +1881,7 @@
</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="followupDemand" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; cursor: pointer; transition: all 0.3s ease;">
<select id="followupDemand" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; cursor: pointer; transition: all 0.3s ease; background-color: white;">
<option value="">请选择客户需求</option>
<option value="粉蛋">粉蛋</option>
<option value="粉三">粉三</option>
@ -1792,6 +1890,7 @@
<option value="土鸡蛋">土鸡蛋</option>
<option value="次品">次品</option>
<option value="白壳">白壳</option>
<option value="其他需求">其他需求</option>
</select>
</div>
<div style="margin-bottom: 20px;">
@ -2061,19 +2160,19 @@
</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" placeholder="请输入详细地址" 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; background-color: white;">
</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" placeholder="请输入客户公司" 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; background-color: white;">
</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" 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>
<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; background-color: white;"></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>
<button onclick="saveFollowup()" style="padding: 10px 16px; border: none; border-radius: 4px; font-size: 14px; color: white; background-color: #1890ff; cursor: pointer; transition: all 0.3s ease;">保存</button>
<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; box-shadow: 0 2px 4px rgba(0,0,0,0.05);">取消</button>
<button onclick="saveFollowup()" style="padding: 10px 16px; border: none; border-radius: 4px; font-size: 14px; color: white; background-color: #1890ff; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 2px 4px rgba(24,144,255,0.3);">保存</button>
</div>
</div>
</div>
@ -2081,8 +2180,8 @@
// 归还弹窗HTML
var returnModalHTML = `
<div id="returnModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); display: none; z-index: 1000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 8px; width: 450px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease;">
<div id="returnModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.7) 100%); backdrop-filter: blur(5px); display: none; z-index: 1000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 12px; width: 450px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.18); animation: slideIn 0.3s ease; transition: all 0.3s ease;">
<h3 style="margin: 0 0 20px 0; font-size: 18px; font-weight: 600; color: #333; text-align: center;">归还客户</h3>
<input type="hidden" id="returnUserId">
<div style="margin-bottom: 20px;">
@ -2095,7 +2194,7 @@
</div>
<div style="margin-bottom: 24px;">
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: #666;">客户类型</label>
<select id="returnType" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; cursor: pointer; transition: all 0.3s ease;">
<select id="returnType" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; cursor: pointer; transition: all 0.3s ease; background-color: white;">
<option value="buyer">大贸易客户</option>
<option value="seller">供应商</option>
<option value="both">两者都是</option>
@ -2112,8 +2211,8 @@
// 简道云弹窗HTML
var jianDaoYunModalHTML = `
<div id="jianDaoYunModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); display: none; z-index: 1000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 8px; width: 400px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease;">
<div id="jianDaoYunModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.7) 100%); backdrop-filter: blur(5px); display: none; z-index: 1000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 12px; width: 400px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.18); animation: slideIn 0.3s ease; transition: all 0.3s ease;">
<h3 style="margin: 0 0 20px 0; font-size: 18px; font-weight: 600; color: #333; text-align: center;">简道云</h3>
<input type="hidden" id="jianDaoYunUserId">
<div style="margin-bottom: 24px; text-align: center;">
@ -2129,8 +2228,8 @@
// 详情弹窗HTML
var detailModalHTML = `
<div id="detailModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); display: none; z-index: 1000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 8px; width: 600px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease; max-height: 90vh; overflow-y: auto;">
<div id="detailModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.7) 100%); backdrop-filter: blur(5px); display: none; z-index: 1000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 12px; width: 600px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.18); animation: slideIn 0.3s ease; max-height: 90vh; overflow-y: auto; transition: all 0.3s ease;">
<h3 style="margin: 0 0 20px 0; font-size: 18px; font-weight: 600; color: #333; text-align: center;">客户详情</h3>
<div style="margin-bottom: 24px;">
<div style="margin-bottom: 16px;">
@ -2227,8 +2326,8 @@
// 分配弹窗HTML
var assignModalHTML = `
<div id="assignModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); display: none; z-index: 1000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 8px; width: 500px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease;">
<div id="assignModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.7) 100%); backdrop-filter: blur(5px); display: none; z-index: 1000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 12px; width: 500px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.18); animation: slideIn 0.3s ease; transition: all 0.3s ease;">
<h3 style="margin: 0 0 20px 0; font-size: 18px; font-weight: 600; color: #333; text-align: center;">分配客户</h3>
<div style="margin-bottom: 20px;">
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: #666;">选中客户数量</label>
@ -2236,7 +2335,7 @@
</div>
<div style="margin-bottom: 24px;">
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: #666;">选择负责人</label>
<select id="managerSelect" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; cursor: pointer; transition: all 0.3s ease;">
<select id="managerSelect" style="width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; cursor: pointer; transition: all 0.3s ease; background-color: white;">
<option value="">请选择负责人</option>
</select>
</div>
@ -2250,8 +2349,8 @@
// 提示弹窗HTML
var alertModalHTML = `
<div id="alertModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); display: none; z-index: 10000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 8px; width: 350px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease;">
<div id="alertModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.7) 100%); backdrop-filter: blur(5px); display: none; z-index: 10000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 12px; width: 350px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.18); animation: slideIn 0.3s ease; transition: all 0.3s ease;">
<h3 style="margin: 0 0 20px 0; font-size: 16px; font-weight: 600; color: #333; text-align: center;">提示</h3>
<div style="margin-bottom: 24px; text-align: center;">
<p id="alertMessage" style="font-size: 14px; color: #666;"></p>
@ -2265,8 +2364,8 @@
// 客户类型说明弹窗HTML
var typeHelpModalHTML = `
<div id="typeHelpModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); display: none; z-index: 10000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 8px; width: 500px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease; max-height: 80vh; overflow-y: auto;">
<div id="typeHelpModal" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.7) 100%); backdrop-filter: blur(5px); display: none; z-index: 10000; animation: fadeIn 0.3s ease;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 24px; border-radius: 12px; width: 500px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.18); animation: slideIn 0.3s ease; max-height: 80vh; overflow-y: auto; transition: all 0.3s ease;">
<h3 style="margin: 0 0 20px 0; font-size: 18px; font-weight: 600; color: #333; text-align: center;">客户类型说明</h3>
<div style="margin-bottom: 20px;">
<h4 style="font-size: 16px; font-weight: 600; color: #1890ff; margin-bottom: 10px;">批发贸易类</h4>
@ -2838,7 +2937,7 @@
// 客户需求
var demandValue = user.demand || '';
// 检查是否在下拉选项中存在,如果不存在则设为空
var demandOptions = ['粉蛋', '粉三', '红蛋', '绿壳', '土鸡蛋', '次品', '白壳'];
var demandOptions = ['粉蛋', '粉三', '红蛋', '绿壳', '土鸡蛋', '次品', '白壳', '其他需求'];
if (!demandOptions.includes(demandValue)) {
demandValue = '';
}

Loading…
Cancel
Save