someone-oa/pc/project-list.html
2025-12-11 19:04:46 +08:00

274 lines
15 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>项目查询 - OA系统</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 统一布局样式 -->
<link rel="stylesheet" href="unified-layout.css">
<!-- 美化样式 -->
<link rel="stylesheet" href="enhanced-styles.css">
<style>
/* 页面特定样式 */
.search-form { background: #fafafa; padding: 16px; border-radius: 4px; margin-bottom: 16px; }
.form-row { display: flex; gap: 16px; margin-bottom: 12px; }
.form-item { flex: 1; }
.form-label { display: block; margin-bottom: 4px; color: #333; font-size: 14px; }
.status-badge { padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.status-initiated { background: #e6f7ff; color: #409EFF; }
.status-bidding { background: #fff7e6; color: #d46b08; }
.status-won { background: #fff1f0; color: #ff4d4f; }
.status-contract { background: #f6ffed; color: #52c41a; }
.status-started { background: #f0f5ff; color: #2f54eb; }
.pagination { margin-top: 16px; text-align: right; }
</style>
<!-- Vue.js -->
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
<!-- Element UI JS -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
</head>
<body>
<div class="layout-container">
<div class="main-container">
<div class="sidebar">
<div class="menu-item" onclick="window.location.href='project-initiation.html'">立项申请</div>
<div class="menu-item active">项目查询</div>
<div class="menu-item" onclick="window.location.href='project-approval.html'">审核管理</div>
<div class="menu-item" onclick="window.location.href='project-bidding.html'">投标管理</div>
<div class="menu-item" onclick="window.location.href='project-contract.html'">合同管理</div>
</div>
<div class="app-main">
<div class="content">
<div class="page-header">
<div class="page-title">项目查询</div>
<div style="display: flex; gap: 8px;">
<button class="btn btn-default" onclick="window.location.href='project-board.html'" style="background: #67c23a; color: white; border-color: #67c23a;">📊 看板视图</button>
<button class="btn btn-default" onclick="importProjects()">📥 批量导入</button>
<button class="btn btn-primary" onclick="window.location.href='project-initiation.html'">+ 新建立项</button>
</div>
</div>
<div class="search-form">
<div class="form-row">
<div class="form-item">
<label class="form-label">项目编号</label>
<input type="text" class="form-input" placeholder="请输入项目编号">
</div>
<div class="form-item">
<label class="form-label">项目名称</label>
<input type="text" class="form-input" placeholder="请输入项目名称">
</div>
<div class="form-item">
<label class="form-label">服务内容</label>
<select class="form-select">
<option value="">全部</option>
<option value="1">结算审计</option>
<option value="2">工程咨询</option>
<option value="3">跟踪审计</option>
<option value="4">项目管理</option>
<option value="5">工程监理</option>
</select>
</div>
</div>
<div class="form-row">
<div class="form-item">
<label class="form-label">项目状态</label>
<select class="form-select">
<option value="">全部</option>
<option value="initiated">已立项</option>
<option value="bidding">投标中</option>
<option value="won">已中标</option>
<option value="contract">已签合同</option>
<option value="started">已启动</option>
</select>
</div>
<div class="form-item" style="display: flex; align-items: flex-end; gap: 8px;">
<button class="btn btn-primary" onclick="searchProjects()">查询</button>
<button class="btn btn-default" onclick="resetSearch()">重置</button>
<button class="btn btn-default" onclick="exportExcel()">导出Excel</button>
</div>
</div>
</div>
<div class="table-container">
<table>
<thead>
<tr>
<th>项目编号</th>
<th>项目名称</th>
<th>客户名称</th>
<th>服务内容</th>
<th>预计金额</th>
<th>项目状态</th>
<th>负责人</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>25-1</td>
<td>XX工程项目</td>
<td>XX公司</td>
<td>工程咨询</td>
<td>¥500,000</td>
<td><span class="status-badge status-started">已启动</span></td>
<td>张三</td>
<td>2025-01-10</td>
<td>
<span class="action-link" onclick="viewDetail('25-1')">查看</span>
<span class="action-link" onclick="editProject('25-1')">编辑</span>
</td>
</tr>
<tr>
<td>25-2</td>
<td>YY工程项目</td>
<td>YY公司</td>
<td>跟踪审计</td>
<td>¥800,000</td>
<td><span class="status-badge status-bidding">投标中</span></td>
<td>李四</td>
<td>2025-01-12</td>
<td>
<span class="action-link" onclick="viewDetail('25-2')">查看</span>
<span class="action-link" onclick="editProject('25-2')">编辑</span>
</td>
</tr>
<tr>
<td>25-4</td>
<td>AA工程项目</td>
<td>AA公司</td>
<td>工程监理</td>
<td>¥1,200,000</td>
<td><span class="status-badge status-won">已中标</span></td>
<td>赵六</td>
<td>2025-01-15</td>
<td>
<span class="action-link" onclick="viewDetail('25-4')">查看</span>
<span class="action-link" onclick="editProject('25-4')">编辑</span>
</td>
</tr>
<tr>
<td>25-3</td>
<td>ZZ工程项目</td>
<td>ZZ公司</td>
<td>结算审计</td>
<td>¥600,000</td>
<td><span class="status-badge status-contract">已签合同</span></td>
<td>王五</td>
<td>2025-01-08</td>
<td>
<span class="action-link" onclick="viewDetail('25-3')">查看</span>
<span class="action-link" onclick="editProject('25-3')">编辑</span>
</td>
</tr>
</tbody>
</table>
<div class="pagination">
<span style="color: #999; margin-right: 16px;">共 3 条记录</span>
<button class="btn btn-default">上一页</button>
<span style="margin: 0 12px;">1 / 1</span>
<button class="btn btn-default">下一页</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="common.js"></script>
<script src="unified-layout.js"></script>
<script>
initUnifiedLayout('project');
</script>
<script>
function searchProjects() {
CommonUtils.showMessage('查询中...');
setTimeout(() => CommonUtils.showMessage('查询完成'), 500);
}
function resetSearch() {
document.querySelectorAll('.form-input, .form-select').forEach(el => el.value = '');
CommonUtils.showMessage('已重置');
}
function exportExcel() {
CommonUtils.exportExcel('项目列表.xlsx');
}
function importProjects() {
const content = `
<div style="margin-bottom: 16px;">
<div style="font-size: 14px; color: #606266; margin-bottom: 12px;">
<strong>导入说明:</strong><br>
1. 请先下载Excel模板<br>
2. 按照模板格式填写项目信息<br>
3. 上传填写好的Excel文件<br>
4. 系统将自动验证并导入数据
</div>
<div style="display: flex; gap: 8px; margin-bottom: 16px;">
<button class="btn btn-default" onclick="downloadTemplate('project')" style="padding: 8px 16px; border: 1px solid #dcdfe6; border-radius: 4px; background: white; color: #606266; cursor: pointer;">📥 下载模板</button>
</div>
<div>
<label style="display: block; margin-bottom: 8px; color: #606266; font-size: 14px;">
<span style="color: #ff4d4f;">*</span>选择Excel文件
</label>
<input type="file" id="importFile" accept=".xlsx,.xls" style="width: 100%; padding: 8px; border: 1px solid #d9d9d9; border-radius: 4px;">
<div style="font-size: 12px; color: #999; margin-top: 4px;">支持.xlsx和.xls格式文件大小不超过10MB</div>
</div>
</div>
<div id="importPreview" style="display: none; margin-top: 16px;">
<div style="font-size: 14px; color: #606266; margin-bottom: 8px;"><strong>数据预览:</strong></div>
<div style="max-height: 200px; overflow-y: auto; border: 1px solid #e6e6e6; border-radius: 4px; padding: 8px; background: #fafafa; font-size: 12px;" id="previewContent"></div>
</div>
`;
CommonUtils.createModal('批量导入项目', content, () => {
const fileInput = document.getElementById('importFile');
const file = fileInput.files[0];
if (!file) {
CommonUtils.showMessage('请选择要导入的Excel文件', 'error');
return false;
}
if (file.size > 10 * 1024 * 1024) {
CommonUtils.showMessage('文件大小不能超过10MB', 'error');
return false;
}
// 模拟数据预览
const previewContent = document.getElementById('previewContent');
previewContent.innerHTML = `
预览数据前5条<br>
1. 25-10 - 测试项目1 - XX公司 - 工程咨询 - ¥500,000<br>
2. 25-11 - 测试项目2 - YY公司 - 跟踪审计 - ¥800,000<br>
3. 25-12 - 测试项目3 - ZZ公司 - 项目管理 - ¥600,000<br>
4. 25-13 - 测试项目4 - AA公司 - 工程监理 - ¥1,200,000<br>
5. 25-14 - 测试项目5 - BB公司 - 工程咨询 - ¥450,000<br>
<br>
<strong>共5条数据全部验证通过</strong>
`;
document.getElementById('importPreview').style.display = 'block';
// 确认导入
CommonUtils.confirm('确认导入这5条项目数据', () => {
CommonUtils.showMessage('导入成功共导入5条项目数据', 'success');
setTimeout(() => {
window.location.reload();
}, 1500);
return true;
});
return false; // 不关闭弹窗,等待用户确认
});
}
function downloadTemplate(type) {
CommonUtils.showMessage('正在下载模板...', 'info');
setTimeout(() => {
CommonUtils.showMessage('模板下载成功', 'success');
// 实际应用中应该下载真实的Excel模板文件
}, 500);
}
function viewDetail(id) { window.location.href = 'project-detail.html?id=' + id; }
function editProject(id) { window.location.href = 'project-initiation.html?edit=' + id; }
</script>
</body>
</html>