You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
331 lines
14 KiB
331 lines
14 KiB
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>采购管理 - 资金使用管理系统</title>
|
|
<link href="https://cdn.staticfile.org/bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdn.staticfile.org/bootstrap-icons/1.11.0/font/bootstrap-icons.min.css">
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
|
|
background-color: #f5f7fa;
|
|
padding: 20px;
|
|
}
|
|
|
|
.page-header {
|
|
background: white;
|
|
padding: 25px 30px;
|
|
border-radius: 10px;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin: 0;
|
|
}
|
|
|
|
.page-title i {
|
|
margin-right: 10px;
|
|
color: #667eea;
|
|
}
|
|
|
|
.main-content {
|
|
background: white;
|
|
border-radius: 10px;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
|
padding: 30px;
|
|
}
|
|
|
|
.form-section {
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 20px;
|
|
padding-bottom: 10px;
|
|
border-bottom: 2px solid #e5e7eb;
|
|
}
|
|
|
|
.form-label {
|
|
font-weight: 500;
|
|
color: #333;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.form-label .required {
|
|
color: #ef4444;
|
|
margin-left: 3px;
|
|
}
|
|
|
|
.form-control, .form-select {
|
|
border: 1px solid #d1d5db;
|
|
border-radius: 6px;
|
|
padding: 10px 12px;
|
|
}
|
|
|
|
.form-control:focus, .form-select:focus {
|
|
border-color: #667eea;
|
|
box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
|
|
}
|
|
|
|
.btn-submit {
|
|
padding: 12px 30px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.btn-cancel {
|
|
padding: 12px 30px;
|
|
}
|
|
|
|
.tab-content {
|
|
margin-top: 20px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- 页面头部 -->
|
|
<div class="page-header">
|
|
<h1 class="page-title">
|
|
<i class="bi bi-cart"></i> 采购管理
|
|
</h1>
|
|
<button class="btn btn-outline-primary" onclick="viewList()">
|
|
<i class="bi bi-list"></i> 查看列表
|
|
</button>
|
|
</div>
|
|
|
|
<!-- 主要内容 -->
|
|
<div class="main-content">
|
|
<!-- 采购类型选择 -->
|
|
<ul class="nav nav-tabs" id="procurementTabs" role="tablist">
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link active" id="project-tab" data-bs-toggle="tab" data-bs-target="#project" type="button">
|
|
课题
|
|
</button>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link" id="non-project-tab" data-bs-toggle="tab" data-bs-target="#non-project" type="button">
|
|
非课题
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="tab-content" id="procurementTabContent">
|
|
<!-- 课题采购 -->
|
|
<div class="tab-pane fade show active" id="project" role="tabpanel">
|
|
<form id="projectProcurementForm">
|
|
<div class="form-section">
|
|
<h3 class="section-title">基本信息</h3>
|
|
<div class="row g-3">
|
|
<div class="col-md-6">
|
|
<label class="form-label">采购类型<span class="required">*</span></label>
|
|
<select class="form-select" id="projectProcurementType" required>
|
|
<option value="">请选择</option>
|
|
<option value="government">政府采购(需经省厅审批)</option>
|
|
<option value="general">一般采购</option>
|
|
<option value="mall">服务商城采购审批表</option>
|
|
<option value="outsource">外包、分包(服务)申请</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label">课题名称<span class="required">*</span></label>
|
|
<input type="text" class="form-control" required>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label">采购金额<span class="required">*</span></label>
|
|
<input type="number" class="form-control" step="0.01" required>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label">采购方式</label>
|
|
<select class="form-select" id="projectProcurementMethod">
|
|
<option value="">请选择</option>
|
|
<option value="one-time">一次性采购单</option>
|
|
<option value="compare">比价</option>
|
|
<option value="inquiry">询价</option>
|
|
<option value="bidding">公开招标</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<label class="form-label">采购内容<span class="required">*</span></label>
|
|
<textarea class="form-control" rows="4" required></textarea>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<label class="form-label">采购理由<span class="required">*</span></label>
|
|
<textarea class="form-control" rows="3" required></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-section">
|
|
<h3 class="section-title">附件上传</h3>
|
|
<div class="mb-3">
|
|
<label class="form-label">相关文件</label>
|
|
<input type="file" class="form-control" multiple accept=".pdf,.doc,.docx,.xls,.xlsx">
|
|
<small class="text-muted">支持PDF、Word、Excel格式</small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-end gap-3">
|
|
<button type="button" class="btn btn-secondary btn-cancel" onclick="cancelForm()">取消</button>
|
|
<button type="button" class="btn btn-outline-primary" onclick="saveDraft()">保存草稿</button>
|
|
<button type="submit" class="btn btn-primary btn-submit">提交申请</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- 非课题采购 -->
|
|
<div class="tab-pane fade" id="non-project" role="tabpanel">
|
|
<form id="nonProjectProcurementForm">
|
|
<div class="form-section">
|
|
<h3 class="section-title">基本信息</h3>
|
|
<div class="row g-3">
|
|
<div class="col-md-6">
|
|
<label class="form-label">采购类型<span class="required">*</span></label>
|
|
<select class="form-select" id="nonProjectProcurementType" required>
|
|
<option value="">请选择</option>
|
|
<option value="government">政府采购(需经省厅审批)</option>
|
|
<option value="general">一般采购</option>
|
|
<option value="mall">服务商城采购审批表</option>
|
|
<option value="outsource">外包、分包(服务)申请</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label">申请部门<span class="required">*</span></label>
|
|
<input type="text" class="form-control" required>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label">采购金额<span class="required">*</span></label>
|
|
<input type="number" class="form-control" step="0.01" required>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label">采购方式</label>
|
|
<select class="form-select" id="nonProjectProcurementMethod">
|
|
<option value="">请选择</option>
|
|
<option value="one-time">一次性采购单</option>
|
|
<option value="compare">比价</option>
|
|
<option value="inquiry">询价</option>
|
|
<option value="bidding">公开招标</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<label class="form-label">采购内容<span class="required">*</span></label>
|
|
<textarea class="form-control" rows="4" required></textarea>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<label class="form-label">采购理由<span class="required">*</span></label>
|
|
<textarea class="form-control" rows="3" required></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-section">
|
|
<h3 class="section-title">附件上传</h3>
|
|
<div class="mb-3">
|
|
<label class="form-label">相关文件</label>
|
|
<input type="file" class="form-control" multiple accept=".pdf,.doc,.docx,.xls,.xlsx">
|
|
<small class="text-muted">支持PDF、Word、Excel格式</small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-end gap-3">
|
|
<button type="button" class="btn btn-secondary btn-cancel" onclick="cancelForm()">取消</button>
|
|
<button type="button" class="btn btn-outline-primary" onclick="saveDraft()">保存草稿</button>
|
|
<button type="submit" class="btn btn-primary btn-submit">提交申请</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.staticfile.org/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
|
|
<script>
|
|
// 根据金额自动选择采购方式
|
|
function updateProcurementMethod(amountInput, methodSelect) {
|
|
const amount = parseFloat(amountInput.value);
|
|
if (isNaN(amount)) return;
|
|
|
|
if (amount < 2000) {
|
|
methodSelect.value = 'one-time';
|
|
} else if (amount < 100000) {
|
|
methodSelect.value = 'compare';
|
|
} else if (amount < 300000) {
|
|
methodSelect.value = 'inquiry';
|
|
} else {
|
|
methodSelect.value = 'bidding';
|
|
}
|
|
}
|
|
|
|
// 监听金额输入
|
|
document.querySelectorAll('input[type="number"]').forEach(input => {
|
|
if (input.previousElementSibling && input.previousElementSibling.textContent.includes('金额')) {
|
|
input.addEventListener('input', function() {
|
|
const form = this.closest('form');
|
|
const methodSelect = form.querySelector('select[id$="ProcurementMethod"]');
|
|
if (methodSelect) {
|
|
updateProcurementMethod(this, methodSelect);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
document.getElementById('projectProcurementForm').addEventListener('submit', function(e) {
|
|
e.preventDefault();
|
|
if (confirm('确定要提交采购申请吗?')) {
|
|
alert('提交成功!');
|
|
}
|
|
});
|
|
|
|
document.getElementById('nonProjectProcurementForm').addEventListener('submit', function(e) {
|
|
e.preventDefault();
|
|
if (confirm('确定要提交采购申请吗?')) {
|
|
alert('提交成功!');
|
|
}
|
|
});
|
|
|
|
function cancelForm() {
|
|
if (confirm('确定要取消吗?未保存的数据将丢失。')) {
|
|
window.history.back();
|
|
}
|
|
}
|
|
|
|
function saveDraft() {
|
|
alert('草稿已保存');
|
|
}
|
|
|
|
function viewList() {
|
|
parent.loadPage('pages/pre-approval/process-query.html');
|
|
}
|
|
|
|
// 根据URL参数切换tab
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
const type = urlParams.get('type');
|
|
|
|
if (type === 'non-project') {
|
|
const nonProjectTab = document.getElementById('non-project-tab');
|
|
if (nonProjectTab) {
|
|
const tab = new bootstrap.Tab(nonProjectTab);
|
|
tab.show();
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|