someone-oa/pc/finance-invoice.html
2025-12-11 15:21:16 +08:00

253 lines
11 KiB
HTML
Raw 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.

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">
<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;
}
.navbar {
height: 50px;
background: #fff;
border-bottom: 1px solid #e6e6e6;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
box-shadow: 0 1px 4px rgba(0,21,41,.08);
}
.navbar-left {
display: flex;
align-items: center;
}
.logo {
font-size: 20px;
font-weight: bold;
color: #409EFF;
}
.nav-menu { display: flex; gap: 8px; }
.nav-item { padding: 8px 16px; cursor: pointer; border-radius: 4px; }
.nav-item:hover {
background: #ecf5ff;
color: #409EFF;
}
 background: #409EFF; }
.navbar-right {
display: flex;
align-items: center;
gap: 20px;
}
.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; display: flex; justify-content: space-between; }
.page-title { font-size: 20px; font-weight: 500; }
.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-input, .form-select { width: 100%; padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 4px; }
.btn { padding: 6px 16px; border: none; border-radius: 4px; cursor: pointer; }
.btn-primary { background: #409EFF; color: white; }
.btn-default { background: white; color: #333; border: 1px solid #d9d9d9; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background: #fafafa; font-weight: 500; }
.action-link { color: #409EFF; cursor: pointer; margin-right: 12px; }
</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="navbar">
<div class="navbar-left">
<div class="logo">OA系统</div>
<div class="nav-menu">
<div class="nav-item" onclick="window.location.href='project-initiation.html'">商机管理</div>
<div class="nav-item" onclick="window.location.href='project-start.html'">过程管理</div>
<div class="nav-item active">财务管理</div>
<div class="nav-item" onclick="window.location.href='report-project-detail.html'">报表管理</div>
</div>
</div>
<div class="navbar-right">
<span style="color: #303133;">张三</span><span style="color: #909399; margin: 0 8px;">|</span>
<a href="profile.html" style="color: #409EFF; text-decoration: none;">个人中心</a>
<span>|</span>
<a href="login.html" style="color: #409EFF; text-decoration: none;">退出</a>
</div>
</div>
<div class="main-container">
<div class="sidebar">
<div class="menu-item active">开票管理</div>
<div class="menu-item" onclick="window.location.href='finance-payment.html'">回款管理</div>
<div class="menu-item" onclick="window.location.href='finance-request.html'">请款管理</div>
</div>
<div class="content">
<div class="page-header">
<div class="page-title">开票管理</div>
<button class="btn btn-primary" onclick="applyInvoice()">+ 开票申请</button>
</div>
<div class="search-form">
<div class="form-row">
<div class="form-item">
<input type="text" class="form-input" placeholder="项目编号/名称">
</div>
<div class="form-item">
<select class="form-select">
<option>全部状态</option>
<option>待开票</option>
<option>已开票</option>
</select>
</div>
<div class="form-item" style="display: flex; gap: 8px;">
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
</div>
</div>
</div>
<table>
<thead>
<tr>
<th>项目编号</th>
<th>项目名称</th>
<th>开票金额</th>
<th>开票时间</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>25-1</td>
<td>XX工程项目</td>
<td>¥100,000</td>
<td>2025-01-15</td>
<td>已开票</td>
<td>
<span class="action-link" onclick="window.location.href='invoice-detail.html?id=FP-2025-001'">查看详情</span>
<span class="action-link" onclick="downloadInvoice('FP-2025-001')">下载</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script src="common.js"></script>
<script>
function downloadInvoice(id) {
CommonUtils.downloadFile('发票_' + id + '.pdf', id);
}
function applyInvoice() {
const content = `
<div style="padding: 20px;">
<div style="margin-bottom: 16px;">
<label style="display: block; margin-bottom: 8px; color: #606266;">
<span style="color: #ff4d4f;">*</span>选择项目
</label>
<select id="invoice-project" class="form-select" style="width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px;">
<option value="">请选择项目</option>
<option value="25-1">25-1 - XX工程项目已签合同</option>
<option value="25-2">25-2 - YY工程项目已提交正式成果</option>
<option value="25-3">25-3 - ZZ工程项目已签合同</option>
</select>
<div style="font-size: 12px; color: #999; margin-top: 4px;">仅显示有合同或已提交正式成果的项目</div>
</div>
<div style="margin-bottom: 16px;">
<label style="display: block; margin-bottom: 8px; color: #606266;">
<span style="color: #ff4d4f;">*</span>开票金额(元)
</label>
<input type="number" id="invoice-amount" class="form-input" placeholder="请输入开票金额" style="width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px;">
</div>
<div style="margin-bottom: 16px;">
<label style="display: block; margin-bottom: 8px; color: #606266;">
<span style="color: #ff4d4f;">*</span>发票类型
</label>
<select id="invoice-type" class="form-select" style="width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px;">
<option value="normal">增值税普通发票</option>
<option value="special">增值税专用发票</option>
</select>
</div>
<div style="margin-bottom: 16px;">
<label style="display: block; margin-bottom: 8px; color: #606266;">开票说明</label>
<textarea id="invoice-desc" class="form-textarea" placeholder="请输入开票说明" style="width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; min-height: 80px; resize: vertical;"></textarea>
</div>
</div>
`;
CommonUtils.createModal('开票申请', content, () => {
const project = document.getElementById('invoice-project').value;
const amount = document.getElementById('invoice-amount').value;
const type = document.getElementById('invoice-type').value;
if (!project) {
CommonUtils.showMessage('请选择项目', 'error');
return false;
}
if (!amount || parseFloat(amount) <= 0) {
CommonUtils.showMessage('请输入有效的开票金额', 'error');
return false;
}
CommonUtils.showMessage('开票申请已提交,等待审核');
setTimeout(() => location.reload(), 1000);
return true;
});
}
</script>
<script src="layout.js"></script>
<script>
injectLayout('finance');
</script>
</body>
</html>