339 lines
14 KiB
HTML
339 lines
14 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>成果详情 - OA系统</title>
|
||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||
<!-- 统一布局样式 -->
|
||
<link rel="stylesheet" href="unified-layout.css">
|
||
<style>
|
||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||
body {
|
||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
|
||
background: #f0f2f5;
|
||
overflow: hidden;
|
||
}
|
||
.layout-container {
|
||
height: 100vh;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.main-container {
|
||
flex: 1;
|
||
display: flex;
|
||
overflow: hidden;
|
||
}
|
||
.app-main {
|
||
flex: 1;
|
||
overflow: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background: #f0f2f5;
|
||
}
|
||
.sidebar {
|
||
width: 210px;
|
||
background: #fff;
|
||
border-right: 1px solid #e6e6e6;
|
||
overflow-y: auto;
|
||
}
|
||
.menu-item { padding: 12px 24px; cursor: pointer; transition: background 0.3s; color: #303133; }
|
||
.menu-item:hover {
|
||
background: #ecf5ff;
|
||
color: #409EFF;
|
||
}
|
||
.menu-item.active { background: #409EFF; color: #fff; }
|
||
.content {
|
||
flex: 1;
|
||
padding: 20px;
|
||
overflow-y: auto;
|
||
background: #fff;
|
||
margin: 10px;
|
||
border-radius: 4px;
|
||
}
|
||
.page-header {
|
||
margin-bottom: 24px;
|
||
padding-bottom: 16px;
|
||
border-bottom: 1px solid #f0f0f0;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
}
|
||
.page-title { font-size: 20px; font-weight: 500; color: #303133; }
|
||
.info-card {
|
||
background: #fff;
|
||
border: 1px solid #e6e6e6;
|
||
border-radius: 4px;
|
||
padding: 20px;
|
||
margin-bottom: 20px;
|
||
}
|
||
.info-section-title {
|
||
font-size: 16px;
|
||
font-weight: 500;
|
||
margin-bottom: 16px;
|
||
padding-bottom: 12px;
|
||
border-bottom: 1px solid #f0f0f0;
|
||
color: #303133;
|
||
}
|
||
.info-row {
|
||
display: flex;
|
||
padding: 12px 0;
|
||
border-bottom: 1px solid #f5f5f5;
|
||
}
|
||
.info-row:last-child { border-bottom: none; }
|
||
.info-label {
|
||
width: 120px;
|
||
color: #909399;
|
||
font-size: 14px;
|
||
}
|
||
.info-value {
|
||
flex: 1;
|
||
color: #303133;
|
||
font-size: 14px;
|
||
}
|
||
.status-badge {
|
||
padding: 4px 12px;
|
||
border-radius: 4px;
|
||
font-size: 12px;
|
||
display: inline-block;
|
||
}
|
||
.status-pending { background: #fff7e6; color: #d46b08; }
|
||
.status-approved { background: #f6ffed; color: #52c41a; }
|
||
.file-list {
|
||
margin-top: 12px;
|
||
}
|
||
.file-item {
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 8px 12px;
|
||
background: #fafafa;
|
||
border-radius: 4px;
|
||
margin-bottom: 8px;
|
||
}
|
||
.file-icon {
|
||
width: 32px;
|
||
height: 32px;
|
||
background: #409EFF;
|
||
border-radius: 4px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #fff;
|
||
margin-right: 12px;
|
||
font-size: 14px;
|
||
}
|
||
.file-info {
|
||
flex: 1;
|
||
}
|
||
.file-name {
|
||
font-size: 14px;
|
||
color: #303133;
|
||
margin-bottom: 4px;
|
||
}
|
||
.file-size {
|
||
font-size: 12px;
|
||
color: #909399;
|
||
}
|
||
.file-action {
|
||
color: #409EFF;
|
||
cursor: pointer;
|
||
font-size: 14px;
|
||
}
|
||
.btn {
|
||
padding: 10px 20px;
|
||
border: none;
|
||
border-radius: 4px;
|
||
font-size: 14px;
|
||
cursor: pointer;
|
||
transition: all 0.3s;
|
||
}
|
||
.btn-default {
|
||
background: white;
|
||
color: #606266;
|
||
border: 1px solid #dcdfe6;
|
||
}
|
||
.btn-default:hover {
|
||
color: #409EFF;
|
||
border-color: #409EFF;
|
||
}
|
||
</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>
|
||
<script src="common.js"></script>
|
||
</head>
|
||
<body>
|
||
<div id="app">
|
||
<div class="layout-container">
|
||
<div class="main-container">
|
||
<div class="sidebar">
|
||
<div class="menu-item" onclick="window.location.href='project-start.html'">启动申请</div>
|
||
<div class="menu-item" onclick="window.location.href='output-submit.html'">成果提交</div>
|
||
<div class="menu-item active">成果详情</div>
|
||
<div class="menu-item" onclick="window.location.href='progress-query.html'">进度查询</div>
|
||
</div>
|
||
|
||
<div class="app-main">
|
||
<div class="content">
|
||
<div class="page-header">
|
||
<div class="page-title">成果详情</div>
|
||
<button class="btn btn-default" onclick="window.location.href='progress-query.html'">返回列表</button>
|
||
</div>
|
||
|
||
<!-- 成果信息 -->
|
||
<div class="info-card">
|
||
<div class="info-section-title">成果信息</div>
|
||
<div class="info-row">
|
||
<div class="info-label">项目编号</div>
|
||
<div class="info-value">25-1</div>
|
||
</div>
|
||
<div class="info-row">
|
||
<div class="info-label">项目名称</div>
|
||
<div class="info-value">XX工程项目</div>
|
||
</div>
|
||
<div class="info-row">
|
||
<div class="info-label">项目类型</div>
|
||
<div class="info-value" id="project-type-value">结算审计</div>
|
||
</div>
|
||
<div class="info-row">
|
||
<div class="info-label">成果类型</div>
|
||
<div class="info-value" id="output-type-value">最终成果</div>
|
||
</div>
|
||
<div class="info-row" id="amount-comparison-row" style="display: none;">
|
||
<div class="info-label">金额对比</div>
|
||
<div class="info-value">
|
||
<div style="display: flex; gap: 24px; align-items: center;">
|
||
<div>
|
||
<span style="color: #909399; font-size: 12px;">初稿金额:</span>
|
||
<span id="draft-amount" style="font-size: 14px; color: #303133;">-</span>
|
||
</div>
|
||
<div>
|
||
<span style="color: #909399; font-size: 12px;">对账金额:</span>
|
||
<span id="reconciliation-amount" style="font-size: 14px; color: #303133;">-</span>
|
||
</div>
|
||
<div id="amount-warning" style="display: none; padding: 8px 12px; background: #fff7e6; border: 1px solid #ffd591; border-radius: 4px; color: #d46b08; font-size: 13px;">
|
||
⚠️ 金额差距过大,请核实
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="info-row">
|
||
<div class="info-label">成果金额</div>
|
||
<div class="info-value" style="color: #f56c6c; font-size: 16px; font-weight: 500;">¥100,000</div>
|
||
</div>
|
||
<div class="info-row">
|
||
<div class="info-label">提交人</div>
|
||
<div class="info-value">张三</div>
|
||
</div>
|
||
<div class="info-row">
|
||
<div class="info-label">提交时间</div>
|
||
<div class="info-value">2025-01-20 14:30</div>
|
||
</div>
|
||
<div class="info-row">
|
||
<div class="info-label">审核状态</div>
|
||
<div class="info-value">
|
||
<span class="status-badge status-pending">待审核</span>
|
||
</div>
|
||
</div>
|
||
<div class="info-row">
|
||
<div class="info-label">完成情况</div>
|
||
<div class="info-value">已完成项目所有咨询服务工作,成果文件已提交。</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 成果附件 -->
|
||
<div class="info-card">
|
||
<div class="info-section-title">成果附件</div>
|
||
<div class="file-list">
|
||
<div class="file-item">
|
||
<div class="file-icon">📄</div>
|
||
<div class="file-info">
|
||
<div class="file-name">项目成果报告.pdf</div>
|
||
<div class="file-size">8.5 MB</div>
|
||
</div>
|
||
<div class="file-action" onclick="downloadFile('output1')">下载</div>
|
||
</div>
|
||
<div class="file-item">
|
||
<div class="file-icon">📊</div>
|
||
<div class="file-info">
|
||
<div class="file-name">成果数据表.xlsx</div>
|
||
<div class="file-size">256 KB</div>
|
||
</div>
|
||
<div class="file-action" onclick="downloadFile('output2')">下载</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script src="common.js"></script>
|
||
<script>
|
||
// 页面加载时检查金额对比
|
||
window.onload = function() {
|
||
// 从页面获取项目类型和成果类型
|
||
const projectTypeEl = document.getElementById('project-type-value');
|
||
const outputTypeEl = document.getElementById('output-type-value');
|
||
|
||
if (!projectTypeEl || !outputTypeEl) return;
|
||
|
||
const projectType = projectTypeEl.textContent.trim();
|
||
const outputType = outputTypeEl.textContent.trim();
|
||
|
||
// 结算类型项目:结算审计、概算编制及审核、清单控制价编制及审核
|
||
const isSettlementProject = ['结算审计', '概算编制及审核', '清单控制价编制及审核'].includes(projectType);
|
||
|
||
// 如果是结算类型项目,且有对账或最终成果,显示金额对比
|
||
if (isSettlementProject && (outputType === '对账' || outputType === '最终成果')) {
|
||
// 模拟数据:实际应从后端获取
|
||
const draftAmount = 85000; // 初稿金额
|
||
const reconciliationAmount = 100000; // 对账金额
|
||
const finalAmount = 100000; // 最终成果金额
|
||
|
||
// 显示金额对比行
|
||
document.getElementById('amount-comparison-row').style.display = 'flex';
|
||
document.getElementById('draft-amount').textContent = '¥' + draftAmount.toLocaleString();
|
||
|
||
if (outputType === '对账') {
|
||
document.getElementById('reconciliation-amount').textContent = '¥' + reconciliationAmount.toLocaleString();
|
||
|
||
// 检查金额差距(阈值20%)
|
||
checkAmountDifference(draftAmount, reconciliationAmount);
|
||
} else if (outputType === '最终成果') {
|
||
document.getElementById('reconciliation-amount').textContent = '¥' + finalAmount.toLocaleString();
|
||
|
||
// 检查金额差距
|
||
checkAmountDifference(draftAmount, finalAmount);
|
||
}
|
||
}
|
||
};
|
||
|
||
// 检查金额差距函数
|
||
function checkAmountDifference(draftAmount, currentAmount) {
|
||
const threshold = 0.2; // 20%阈值
|
||
const diff = Math.abs(currentAmount - draftAmount);
|
||
const diffPercent = draftAmount > 0 ? diff / draftAmount : 0;
|
||
|
||
if (diffPercent > threshold) {
|
||
const warningEl = document.getElementById('amount-warning');
|
||
warningEl.style.display = 'block';
|
||
warningEl.textContent = `⚠️ 金额差距过大(${(diffPercent * 100).toFixed(1)}%),请核实`;
|
||
}
|
||
}
|
||
|
||
function downloadFile(fileId) {
|
||
const fileName = event.target.closest('.file-item').querySelector('.file-name').textContent;
|
||
CommonUtils.downloadFile(fileName, fileId);
|
||
}
|
||
</script>
|
||
<script src="unified-layout.js"></script>
|
||
<script>
|
||
initUnifiedLayout('process');
|
||
</script>
|
||
</body>
|
||
</html>
|
||
|