Files
guoju0808/proto/html/components/new-project.html
T
郭庆泰 cf5790229a refactor: 合并 biz_support_unit/biz_execution_unit/biz_service_org 为 biz_org, 删除 2 张孤儿表, 改 biz_person.work_unit → org_id FK
主要改动:
- SQL: biz_support_unit → biz_org, 加 org_type, 加 business_nature; 删 biz_execution_unit, biz_service_org
- SQL: biz_project.support_unit_id/name + service_org_id/name → org_id/name/type
- SQL: biz_meeting.support_unit_name → org_name
- SQL: biz_person.work_unit → org_id (FK)
- 后端: 新 BizOrg entity/mapper/service/controller
- 后端: BizProject/BizMeeting 字段重命名
- 后端: 删 12 个 BizSupportUnit/BizExecutionUnit/BizServiceOrg Java 文件
- 后端: BizPersonImportVO.workUnit → orgName (导入时查 biz_org 取 org_id)
- 后端: BizAuthController.registerExecutor 完整实现 (原 registerSupplier stub)
- 前端: 新 admin/Orgs.vue + manager/Orgs.vue (原 SupportUnits)
- 前端: RegisterExecutor.vue (原 RegisterSupplier, 单页 2 步)
- 前端: sponsor/executor/manager 多个文件 workUnit → orgId/orgName 重命名
- 前端: 统一 supplier → executor, 业务命名 sponsor(赞助方) / executor(执行方=供应商)
- 前端: 全工程 execution → executor (company type / role / person unit_type)
2026-08-15 12:41:10 +08:00

645 lines
23 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>新建项目 - 项目管理系统</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
color: #333;
background: #fafafa;
min-height: 100vh;
}
.content {
padding: 24px 32px;
}
/* ============= 面包屑 ============= */
.breadcrumb {
font-size: 13px;
color: #8c8c8c;
margin-bottom: 12px;
}
.breadcrumb a {
color: #1890ff;
text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
/* ============= 页头 ============= */
.page-header {
margin-bottom: 20px;
}
.page-title {
font-size: 22px;
font-weight: 600;
color: #1a1a1a;
margin-bottom: 4px;
}
.page-subtitle {
font-size: 13px;
color: #8c8c8c;
}
/* ============= 卡片 ============= */
.card {
background: #fff;
border-radius: 8px;
padding: 20px 24px;
margin-bottom: 16px;
border: 1px solid #f0f0f0;
}
.card-title {
font-size: 15px;
font-weight: 600;
color: #1a1a1a;
margin-bottom: 16px;
padding-left: 10px;
border-left: 3px solid #1890ff;
line-height: 1;
}
/* ============= 红色提示 ============= */
.hint-text {
font-size: 12px;
color: #ff4d4f;
margin: 8px 0;
line-height: 1.6;
}
.hint-text p { margin-bottom: 4px; }
.hint-text p:last-child { margin-bottom: 0; }
/* ============= 筛选 / 表单行(沿用其他页面 .filter-row 风格)============= */
.filter-row {
display: grid;
gap: 12px;
align-items: center;
}
.filter-row.row-2 {
grid-template-columns: 1fr 1fr;
margin-top: 12px;
}
.filter-row.row-3 {
grid-template-columns: 1fr 1fr;
margin-top: 12px;
}
.filter-row.row-4 {
grid-template-columns: 1fr 1fr;
margin-top: 12px;
}
.filter-row.row-5 {
grid-template-columns: 1fr 1fr;
margin-top: 12px;
}
.filter-row.row-1 {
grid-template-columns: 1fr 1fr;
}
.filter-field {
display: flex;
align-items: center;
gap: 8px;
}
.filter-label {
font-size: 14px;
color: #595959;
white-space: nowrap;
flex-shrink: 0;
min-width: 110px;
text-align: right;
}
.filter-label .required {
color: #ff4d4f;
margin-right: 4px;
}
.filter-input,
.filter-select {
flex: 1;
height: 32px;
padding: 0 10px;
border: 1px solid #d9d9d9;
border-radius: 4px;
font-size: 13px;
color: #333;
background: #fff;
outline: none;
}
.filter-input:focus,
.filter-select:focus {
border-color: #1890ff;
box-shadow: 0 0 0 3px rgba(24,144,255,0.1);
}
.filter-select {
cursor: pointer;
appearance: none;
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 10px center;
background-size: 14px;
padding-right: 24px;
}
/* ============= 操作按钮 ============= */
.filter-actions {
display: flex;
justify-content: flex-end;
gap: 12px;
margin-bottom: 16px;
flex-wrap: wrap;
}
.filter-btn {
height: 32px;
padding: 0 16px;
background: #1890ff;
color: #fff;
border: none;
border-radius: 4px;
font-size: 13px;
cursor: pointer;
white-space: nowrap;
}
.filter-btn:hover { background: #096dd9; }
.filter-btn.default {
background: #fff;
color: #333;
border: 1px solid #d9d9d9;
}
.filter-btn.default:hover {
border-color: #1890ff;
color: #1890ff;
}
/* ============= 角色劳务设置 ============= */
.role-grid {
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 4px;
}
.role-row {
display: flex;
align-items: center;
gap: 12px;
}
.role-row .role-select {
width: 200px;
height: 32px;
padding: 0 10px;
border: 1px solid #d9d9d9;
border-radius: 4px;
font-size: 13px;
color: #333;
background: #fff;
outline: none;
cursor: pointer;
appearance: none;
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 10px center;
background-size: 14px;
padding-right: 24px;
}
.role-row .role-amount {
width: 180px;
height: 32px;
padding: 0 10px;
border: 1px solid #d9d9d9;
border-radius: 4px;
font-size: 13px;
color: #333;
background: #fff;
outline: none;
}
/* 默认隐藏角色名输入框,选中「其他」时显示 */
.role-row .role-custom { display: none; flex: 1; min-width: 120px; max-width: 180px; height: 32px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; color: #333; background: #fff; outline: none; }
.role-row.has-other .role-custom { display: block; }
.role-row .role-select:focus,
.role-row .role-amount:focus,
.role-row .role-custom:focus {
border-color: #1890ff;
box-shadow: 0 0 0 3px rgba(24,144,255,0.1);
}
.role-actions {
display: flex;
gap: 16px;
margin-left: auto;
}
.op-link {
color: #1890ff;
background: none;
border: none;
padding: 0;
cursor: pointer;
font-size: 13px;
}
.op-link:hover { text-decoration: underline; }
/* ============= 公告文件 ============= */
.notice-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.notice-item {
display: flex;
align-items: center;
gap: 12px;
}
.check-label {
display: flex;
align-items: center;
gap: 6px;
font-size: 14px;
color: #333;
width: 90px;
cursor: pointer;
user-select: none;
}
.check-label input {
width: 14px;
height: 14px;
accent-color: #1890ff;
}
.file-input {
flex: 1;
height: 32px;
padding: 0 10px;
border: 1px solid #d9d9d9;
border-radius: 4px;
font-size: 13px;
color: #333;
background: #fff;
outline: none;
}
.file-input:focus {
border-color: #1890ff;
box-shadow: 0 0 0 3px rgba(24,144,255,0.1);
}
/* ============= 底部按钮 ============= */
.form-actions {
display: flex;
justify-content: center;
gap: 16px;
padding: 24px 0;
}
@media (max-width: 768px) {
.content { padding: 16px; }
.filter-row,
.filter-row.row-1,
.filter-row.row-2,
.filter-row.row-3,
.filter-row.row-4,
.filter-row.row-5 { grid-template-columns: 1fr; }
.role-row { flex-wrap: wrap; }
.role-row .role-select,
.role-row .role-amount { width: 100%; }
.form-actions { flex-wrap: wrap; }
}
</style>
</head>
<body>
<main class="content">
<!-- ============= 面包屑 ============= -->
<div class="breadcrumb">
<a href="javascript:void(0)" onclick="history.back()">项目管理</a> &gt; 新建项目
</div>
<!-- ============= 页头 ============= -->
<div class="page-header">
<h1 class="page-title">新建项目</h1>
<p class="page-subtitle">填写项目基本信息、角色劳务设置与公告文件</p>
</div>
<!-- ============= 顶部:同步数据 ============= -->
<div class="filter-actions">
<button class="filter-btn default" type="button">同步数据</button>
</div>
<!-- ============= 第一区块:项目基本信息 ============= -->
<div class="card">
<div class="card-title">项目信息</div>
<div class="filter-row row-1">
<div class="filter-field">
<span class="filter-label"><span class="required">*</span>项目名称</span>
<input type="text" class="filter-input" placeholder="请输入项目名称">
</div>
<div class="filter-field">
<span class="filter-label"><span class="required">*</span>项目编号</span>
<input type="text" class="filter-input" placeholder="请输入项目编号">
</div>
</div>
<div class="filter-row row-2">
<div class="filter-field">
<span class="filter-label"><span class="required">*</span>项目负责人</span>
<select class="filter-select">
<option value="">请选择</option>
<option value="1">张三</option>
<option value="2">李四</option>
</select>
</div>
<div class="filter-field">
<span class="filter-label"><span class="required">*</span>项目形式</span>
<select class="filter-select">
<option value="">请选择</option>
<option value="online">线上</option>
<option value="offline">线下</option>
<option value="both">线上+线下</option>
<option value="other">其他</option>
</select>
</div>
</div>
<div class="filter-row row-3">
<div class="filter-field">
<span class="filter-label"><span class="required">*</span>总场次/总期数</span>
<input type="number" class="filter-input" placeholder="请输入总场次/总期数">
</div>
<div class="filter-field">
<span class="filter-label"><span class="required">*</span>总金额</span>
<input type="text" class="filter-input" placeholder="请输入总金额">
</div>
</div>
<div class="filter-row row-4">
<div class="filter-field">
<span class="filter-label"><span class="required">*</span>项目开始时间</span>
<input type="text" class="filter-input" placeholder="选择开始时间">
</div>
<div class="filter-field">
<span class="filter-label"><span class="required">*</span>项目结束时间</span>
<input type="text" class="filter-input" placeholder="选择结束时间">
</div>
</div>
<div class="filter-row row-5">
<div class="filter-field">
<span class="filter-label"><span class="required">*</span>是否招标项目</span>
<select class="filter-select">
<option value="">请选择</option>
<option value="yes"></option>
<option value="no"></option>
</select>
</div>
</div>
</div>
<!-- ============= 第二区块:角色劳务设置 ============= -->
<div class="card">
<div class="card-title">角色劳务设置</div>
<div class="hint-text">
<p>*角色劳务设置针对该项目所有会议生效,</p>
<p>专家劳务明细当会议劳务金额超过角色劳务设置时,</p>
<p>该劳务金额为税后金额,则系统进行提示:该角色劳务金额已超</p>
</div>
<div class="role-grid" id="roleGrid">
<div class="role-row">
<select class="role-select">
<option value="">请选择</option>
<option value="chair">主席</option>
<option value="host">主持</option>
<option value="speaker">讲者</option>
<option value="reviewer">点评/评审</option>
<option value="discuss">讨论</option>
<option value="other">其他</option>
</select>
<input type="text" class="role-custom" placeholder="角色名">
<input type="text" class="role-amount" placeholder="劳务金额">
</div>
<div class="role-row">
<select class="role-select">
<option value="">请选择</option>
<option value="chair">主席</option>
<option value="host">主持</option>
<option value="speaker">讲者</option>
<option value="reviewer">点评/评审</option>
<option value="discuss">讨论</option>
<option value="other">其他</option>
</select>
<input type="text" class="role-custom" placeholder="角色名">
<input type="text" class="role-amount" placeholder="劳务金额">
</div>
<div class="role-row">
<select class="role-select">
<option value="">请选择</option>
<option value="chair">主席</option>
<option value="host">主持</option>
<option value="speaker">讲者</option>
<option value="reviewer">点评/评审</option>
<option value="discuss">讨论</option>
<option value="other">其他</option>
</select>
<input type="text" class="role-custom" placeholder="角色名">
<input type="text" class="role-amount" placeholder="劳务金额">
</div>
<div class="role-row">
<select class="role-select">
<option value="">请选择</option>
<option value="chair">主席</option>
<option value="host">主持</option>
<option value="speaker">讲者</option>
<option value="reviewer">点评/评审</option>
<option value="discuss">讨论</option>
<option value="other">其他</option>
</select>
<input type="text" class="role-custom" placeholder="角色名">
<input type="text" class="role-amount" placeholder="劳务金额">
</div>
<div class="role-row">
<select class="role-select">
<option value="">请选择</option>
<option value="chair">主席</option>
<option value="host">主持</option>
<option value="speaker">讲者</option>
<option value="reviewer">点评/评审</option>
<option value="discuss">讨论</option>
<option value="other">其他</option>
</select>
<input type="text" class="role-custom" placeholder="角色名">
<input type="text" class="role-amount" placeholder="劳务金额">
</div>
<div class="role-row">
<select class="role-select">
<option value="">请选择</option>
<option value="chair">主席</option>
<option value="host">主持</option>
<option value="speaker">讲者</option>
<option value="reviewer">点评/评审</option>
<option value="discuss">讨论</option>
<option value="other">其他</option>
</select>
<input type="text" class="role-custom" placeholder="角色名">
<input type="text" class="role-amount" placeholder="劳务金额">
</div>
</div>
<div class="role-actions" style="margin: 12px 0 0; justify-content: flex-end;">
<button type="button" class="op-link" id="addRoleBtn">增加角色</button>
<button type="button" class="op-link" id="removeRoleBtn">删除角色</button>
</div>
<p class="hint-text">*当选择其他时,需手动填写角色名称,显示填写框</p>
</div>
<!-- ============= 第三区块:公告文件 ============= -->
<div class="card">
<div class="card-title">公告文件</div>
<div class="notice-list">
<div class="notice-item">
<label class="check-label">
<input type="checkbox"> 邀请函
</label>
<input type="text" class="file-input" placeholder="选择文件">
<button type="button" class="filter-btn default">上传</button>
</div>
<div class="notice-item">
<label class="check-label">
<input type="checkbox"> 支持函
</label>
<input type="text" class="file-input" placeholder="选择文件">
<button type="button" class="filter-btn default">上传</button>
</div>
<div class="notice-item">
<label class="check-label">
<input type="checkbox"> 通知
</label>
<input type="text" class="file-input" placeholder="选择文件">
<button type="button" class="filter-btn default">上传</button>
</div>
<div class="notice-item">
<label class="check-label">
<input type="checkbox"> 日程
</label>
<input type="text" class="file-input" placeholder="选择文件">
<button type="button" class="filter-btn default">上传</button>
</div>
</div>
<p class="hint-text">*名称规则:公告文件类型+取项目编号的后两段+项目名称</p>
</div>
<!-- ============= 底部按钮 ============= -->
<div class="form-actions">
<button type="button" class="filter-btn" id="btnSave">保存</button>
<button type="button" class="filter-btn default" id="btnSavePublish">保存并发布公告</button>
<button type="button" class="filter-btn default" id="btnCancel">取消</button>
</div>
</main>
<script>
// ============= 角色下拉 change 事件(事件委托,处理现有+新增行)=============
document.getElementById('roleGrid').addEventListener('change', function(e) {
if (e.target.classList.contains('role-select')) {
const row = e.target.closest('.role-row');
if (e.target.value === 'other') {
row.classList.add('has-other');
} else {
row.classList.remove('has-other');
const customInput = row.querySelector('.role-custom');
if (customInput) customInput.value = '';
}
}
});
// ============= 增加角色 =============
document.getElementById('addRoleBtn').addEventListener('click', () => {
const grid = document.getElementById('roleGrid');
const row = document.createElement('div');
row.className = 'role-row';
row.innerHTML = `
<select class="role-select">
<option value="">请选择</option>
<option value="chair">主席</option>
<option value="host">主持</option>
<option value="speaker">讲者</option>
<option value="reviewer">点评/评审</option>
<option value="discuss">讨论</option>
<option value="other">其他</option>
</select>
<input type="text" class="role-custom" placeholder="角色名">
<input type="text" class="role-amount" placeholder="劳务金额">
`;
grid.appendChild(row);
});
// ============= 删除最后一行 =============
document.getElementById('removeRoleBtn').addEventListener('click', () => {
const grid = document.getElementById('roleGrid');
const rows = grid.querySelectorAll('.role-row');
if (rows.length > 1) {
rows[rows.length - 1].remove();
} else {
alert('至少保留一行');
}
});
// ============= 底部按钮 =============
document.getElementById('btnSave').addEventListener('click', () => {
alert('保存成功');
});
document.getElementById('btnSavePublish').addEventListener('click', () => {
alert('保存并发布公告');
});
document.getElementById('btnCancel').addEventListener('click', () => {
if (confirm('确定取消新建项目?未保存的内容将丢失')) {
history.back();
}
});
</script>
</body>
</html>