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

210 lines
10 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. 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">
<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;
}
 background: #409EFF; }
.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;
}
.el-menu {
border-right: none;
}
.menu-item { padding: 12px 24px; cursor: pointer; }
.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; }
.page-title { font-size: 20px; font-weight: 500; }
.form-card { background: white; border-radius: 4px; padding: 24px; }
.form-section { margin-bottom: 24px; }
.form-section-title { font-size: 16px; font-weight: 500; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-item { flex: 1; }
.form-label { display: block; margin-bottom: 8px; color: #333; font-size: 14px; }
.form-label .required { color: #ff4d4f; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; }
.form-textarea { min-height: 100px; resize: vertical; }
.upload-area { border: 2px dashed #d9d9d9; border-radius: 4px; padding: 24px; text-align: center; cursor: pointer; }
.btn { padding: 8px 24px; border: none; border-radius: 4px; cursor: pointer; }
.btn-primary { background: #409EFF; color: white; }
.btn-default { background: white; color: #333; border: 1px solid #d9d9d9; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 24px; border-top: 1px solid #f0f0f0; }
</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 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 active">成果提交</div>
<div class="menu-item" onclick="window.location.href='progress-query.html'">进度查询</div>
</div>
<div class="content">
<div class="page-header">
<div class="page-title">成果提交</div>
</div>
<div class="form-card">
<form id="outputForm">
<div class="form-section">
<div id="multiSubmitTip" style="background: #e6f7ff; padding: 12px; border-radius: 4px; margin-bottom: 16px; display: none;">
<div style="font-weight: 500; color: #1890ff; margin-bottom: 8px;">📋 多人提交提示</div>
<div style="font-size: 13px; color: #666; line-height: 1.6;">
<div>当前项目已分配人员:<span id="assignedStaff">-</span></div>
<div>已提交成果人员:<span id="submittedStaff">-</span></div>
<div>待提交人员:<span id="pendingStaff">-</span></div>
<div style="margin-top: 8px; color: #1890ff;">💡 等待所有人员提交完成后,将自动进入组长审核环节</div>
</div>
</div>
<div class="form-row">
<div class="form-item">
<label class="form-label">
<span class="required">*</span>项目编号
</label>
<select id="projectSelect" class="form-select" required onchange="onProjectChange()">
<option value="">请选择项目</option>
<option value="25-1" data-staff="张三,李四" data-submitted="张三">25-1 - XX工程项目</option>
<option value="25-2" data-staff="王五,赵六" data-submitted="">25-2 - YY工程项目</option>
</select>
</div>
<div class="form-item">
<label class="form-label">
<span class="required">*</span>成果类型
</label>
<select class="form-select" required>
<option value="">请选择成果类型</option>
<option value="draft">初稿</option>
<option value="reconciliation">对账</option>
<option value="final">最终成果</option>
</select>
</div>
</div>
<div class="form-row">
<div class="form-item">
<label class="form-label">
<span class="required">*</span>成果金额(元)
</label>
<input type="number" class="form-input" placeholder="请输入成果金额" required>
</div>
<div class="form-item">
<label class="form-label">提交时间</label>
<input type="date" class="form-input" value="2025-01-15">
</div>
</div>
<div class="form-item">
<label class="form-label">完成情况说明</label>
<textarea class="form-textarea" placeholder="请输入完成情况说明"></textarea>
</div>
</div>
<div class="form-section">
<div class="form-section-title">成果附件</div>
<div class="upload-area" onclick="document.getElementById('fileInput').click()">
<div style="font-size: 48px; margin-bottom: 8px;">📎</div>
<div style="color: #666;">点击上传或拖拽文件到此处</div>
<input type="file" id="fileInput" multiple style="display: none;">
</div>
</div>
<div class="form-actions">
<button type="button" class="btn btn-default" onclick="resetForm()">重置</button>
<button type="submit" class="btn btn-primary">提交审核</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script src="common.js"></script>
<script>
// 项目选择变化事件
function onProjectChange() {
const select = document.getElementById('projectSelect');
const selectedOption = select.options[select.selectedIndex];
const tip = document.getElementById('multiSubmitTip');
if (!selectedOption.value) {
tip.style.display = 'none';
return;
}
const allStaff = selectedOption.getAttribute('data-staff') || '';
const submittedStaff = selectedOption.getAttribute('data-submitted') || '';
const staffList = allStaff.split(',').filter(s => s.trim());
const submittedList = submittedStaff ? submittedStaff.split(',').filter(s => s.trim()) : [];
const pendingList = staffList.filter(s => !submittedList.includes(s));
document.getElementById('assignedStaff').textContent = staffList.length > 0 ? staffList.join('、') : '无';
document.getElementById('submittedStaff').textContent = submittedList.length > 0 ? submittedList.join('、') : '无';
document.getElementById('pendingStaff').textContent = pendingList.length > 0 ? pendingList.join('、') : '无';
tip.style.display = 'block';
}
function resetForm() {
CommonUtils.confirm('确认重置表单?', () => {
document.getElementById('outputForm').reset();
document.getElementById('multiSubmitTip').style.display = 'none';
});
}
document.getElementById('outputForm').addEventListener('submit', function(e) {
e.preventDefault();
CommonUtils.confirm('确认提交成果?', () => {
CommonUtils.showMessage('提交成功!等待审核');
setTimeout(() => window.location.href = 'progress-query.html', 1000);
});
});
</script>
<script src="unified-layout.js"></script>
<script>
initUnifiedLayout('process');
</script>
</div>
</body>
</html>