左侧导航栏element -2024/11/27

news/2024/11/27 23:39:28/文章来源:https://www.cnblogs.com/XYu1230/p/18573327
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>首页</title><style>.demo-table-expand {font-size: 0;}.demo-table-expand label {width: 90px;color: #99a9bf;}.demo-table-expand .el-form-item {margin-right: 0;margin-bottom: 0;width: 50%;}</style>
</head>
<body>
<div id="app"><el-menu:default-active="activeIndex"class="el-menu-demo"mode="horizontal"@select="handleSelect"background-color="#545c64"text-color="#fff"active-text-color="#ffd04b"><el-menu-item index="1">首页</el-menu-item><el-menu-item index="2" v-if="staff.position==='普通职员' || staff.position==='部门经理'">出差申请</el-menu-item><el-menu-item index="3" v-if="staff.position==='普通职员' || staff.position==='部门经理'">报销差旅费</el-menu-item><el-submenu index="4" v-if="staff.position==='总经理' || staff.position==='部门经理'"><template slot="title">出差审批</template><el-menu-item index="4-1">审批申请</el-menu-item><el-menu-item index="4-2">审批报销</el-menu-item><el-menu-item index="4-3">审核单据</el-menu-item><el-menu-item index="4-4">报销制证</el-menu-item></el-submenu><el-submenu index="5" v-if="staff.position==='财务人员'"><template slot="title">汇总统计</template><el-menu-item index="5-1">查询进度</el-menu-item><el-menu-item index="5-2">汇总统计</el-menu-item></el-submenu><el-menu-item index="6"><a href = "http://localhost:8080/travel-recover/index.html" target="_self">退出登录</a></el-menu-item></el-menu><center><span style="font: bold 30px/40px 宋体 ">欢迎使用差旅费报销管理信息系统</span><br></center><div style="width: 100%;height: 500px;" id="homePage"><span style="font: bold 30px/40px 宋体 ">员工编号:</span><span style="font: bold 30px/40px 宋体 ">{{staff.userId}}</span><br><span style="font: bold 30px/40px 宋体 ">姓名:</span><span style="font: bold 30px/40px 宋体 ">{{staff.userName}}</span><br><span style="font: bold 30px/40px 宋体 ">部门:</span><span style="font: bold 30px/40px 宋体 ">{{staff.department}}</span><br><span style="font: bold 30px/40px 宋体 ">职位:</span><span style="font: bold 30px/40px 宋体 ">{{staff.position}}</span></div><!--    出差申请界面--><div style="width: 100%;height: 500px; display: none;" id="apply" ><el-button type="primary" @click="travelApply()">出差申请</el-button><el-button type="primary" @click="travelApply()">进度查询</el-button><el-divider></el-divider><span>我的出差申请</span><!--表格--><template><el-table:data="tableData.filter(row => row.name === this.staff.userName)"style="width: 100%":row-class-name="tableRowClassName"><el-table-columntype="index"width="40"></el-table-column><el-table-columnprop="requestId"label="申请编号"align="center"></el-table-column><el-table-columnprop="name"label="姓名"align="center"></el-table-column><el-table-columnprop="department"align="center"label="部门"></el-table-column><el-table-columnprop="destination"align="center"label="目的地"></el-table-column><el-table-columnprop="departureDate"align="center"label="出发日期"></el-table-column><el-table-columnprop="type"align="center"label="出差类别"></el-table-column><el-table-columnprop="statusStr"align="center"label="状态"></el-table-column><el-table-columnprop="id"align="center"label="操作"><template slot-scope="scope"><el-row><el-button type="primary" @click="detail(scope.row)">详情</el-button><el-button type="primary" @click="update(scope.row)">修改</el-button><el-button type="danger" @click="withdraw(scope.row.requestId)">撤回</el-button></el-row></template></el-table-column></el-table></template></div><!--    出差审批界面--><div style="width: 100%;height: 500px; display: none;" id = "approval"><span>审批出差申请</span><el-table :data="tableData" style="width: 100%"><el-table-columnprop="name"align="center"label="出差人姓名"></el-table-column><el-table-columnprop="department"align="center"label="部门"></el-table-column><el-table-columnprop="destination"align="center"label="目的地"></el-table-column><el-table-columnprop="departureDate"align="center"label="出发日期"></el-table-column><el-table-columnprop="statusStr"align="center"label="状态"></el-table-column><el-table-columnprop="id"align="center"label="操作"><template slot-scope="scope"><el-row><el-button type="primary" @click="approvalRequest(scope.row)">审批</el-button></el-row></template></el-table-column></el-table></div><!--    报销差旅费界面--><div style="width: 100%;height: 500px; display: none;" id = "reimbursement"><el-button type="primary" @click="openRecover()">报销差旅费</el-button><el-button type="primary" @click="openRecover()">查看报销进度</el-button><el-divider></el-divider><span>我的报销单据</span><template><el-table:data="recoverTableData"style="width: 100%"><el-table-column type="expand"><template slot-scope="recover"><el-form label-position="left" inline class="demo-table-expand"><el-form-item label="目的地"><span>{{ recover.row.name }}</span></el-form-item><el-form-item label="出发日期"><span>{{ recover.row.departureDate }}</span></el-form-item><el-form-item label="返回日期"><span>{{ recover.row.returnDate }}</span></el-form-item><el-form-item label="出差事由"><span>{{ recover.row.reason }}</span></el-form-item><el-form-item label="出发车费"><span>{{ recover.row.startFare }}</span></el-form-item><el-form-item label="返回车费"><span>{{ recover.row.returnFare }}</span></el-form-item><el-form-item label="伙食补助"><span>{{ recover.row.foodAllowance }}</span></el-form-item><el-form-item label="公杂补助"><span>{{ recover.row.localTrans }}</span></el-form-item><el-form-item label="住宿费"><span>{{ recover.row.accommodation }}</span></el-form-item><el-form-item label="总金额"><span>{{ recover.row.totalAmount }}</span></el-form-item><el-form-item label="报销状态"><span>{{ recover.row.scheduleStr }}</span></el-form-item><el-form-item label="审批理由"><span>{{ recover.row.scheduleReason }}</span></el-form-item></el-form></template></el-table-column><el-table-columnlabel="报销编号"prop="recoverId"></el-table-column><el-table-columnlabel="出差人姓名"prop="name"></el-table-column><el-table-columnlabel="部门"prop="department"></el-table-column><el-table-column><template slot-scope="scope"><el-button type="primary" @click="recoverRequest(scope.row)">修改</el-button><el-button type="danger" @click="recoverDelete(scope.row)">撤回</el-button></template></el-table-column></el-table></template></div><!-- 出差申请对话框表单 --><el-dialog title="出差申请" :visible.sync="dialogFormVisible"><el-form :model="request"><el-form-item label="出差人姓名" label-width="120px"><el-input v-model="request.name"></el-input></el-form-item><el-form-item label="部门" label-width="120px"><el-input v-model="request.department"></el-input></el-form-item><el-form-item label="目的地" label-width="120px"><el-input v-model="request.destination"></el-input></el-form-item><el-form-item label="暂定出发日期" label-width="120px"><el-input v-model="request.departureDate"></el-input></el-form-item><el-form-item label="预计返回日期" label-width="120px"><el-input v-model="request.returnDate"></el-input></el-form-item><el-form-item label="出差类别"><el-radio-group v-model="request.type"><el-radio label="业务洽谈"></el-radio><el-radio label="培训"></el-radio><el-radio label="会议"></el-radio><el-radio label="其他"></el-radio></el-radio-group></el-form-item><el-form-item label="其他(如果出差类别选择其他请填写)"><el-input type="textarea" v-model="request.typeContent"></el-input></el-form-item><el-form-item label="出差事由"><el-input type="textarea" v-model="request.reason"></el-input></el-form-item></el-form><div slot="footer" class="dialog-footer"><el-button @click="dialogFormVisible = false">取 消</el-button><el-button type="primary" @click="summitRequest">提 交</el-button></div></el-dialog><!--    修改申请对话框表单--><el-dialog title="修改出差申请" :visible.sync="dialogFormVisible2"><el-form :model="request"><el-form-item label="出差人姓名" label-width="120px"><el-input v-model="request.name"></el-input></el-form-item><el-form-item label="部门" label-width="120px"><el-input v-model="request.department"></el-input></el-form-item><el-form-item label="目的地" label-width="120px"><el-input v-model="request.destination"></el-input></el-form-item><el-form-item label="暂定出发日期" label-width="120px"><el-input v-model="request.departureDate"></el-input></el-form-item><el-form-item label="预计返回日期" label-width="120px"><el-input v-model="request.returnDate"></el-input></el-form-item><el-form-item label="出差类别"><el-radio-group v-model="request.type"><el-radio label="业务洽谈"></el-radio><el-radio label="培训"></el-radio><el-radio label="会议"></el-radio><el-radio label="其他"></el-radio></el-radio-group></el-form-item><el-form-item label="其他(如果出差类别选择其他请填写)"><el-input type="textarea" v-model="request.typeContent"></el-input></el-form-item><el-form-item label="出差事由"><el-input type="textarea" v-model="request.reason"></el-input></el-form-item></el-form><div slot="footer" class="dialog-footer"><el-button @click="dialogFormVisible2 = false">取 消</el-button><el-button type="primary" @click="updateRequest">提 交</el-button></div></el-dialog><!--    审批对话框表单--><el-dialog title="审批出差申请" :visible.sync="dialogFormVisible3"><el-form :model="request"><el-form-item label="出差人姓名" label-width="120px"><el-input v-model="request.name" disabled></el-input></el-form-item><el-form-item label="部门" label-width="120px"><el-input v-model="request.department" disabled></el-input></el-form-item><el-form-item label="目的地" label-width="120px"><el-input v-model="request.destination" disabled></el-input></el-form-item><el-form-item label="暂定出发日期" label-width="120px"><el-input v-model="request.departureDate" disabled></el-input></el-form-item><el-form-item label="预计返回日期" label-width="120px"><el-input v-model="request.returnDate" disabled></el-input></el-form-item><el-form-item label="出差类别"><el-radio-group v-model="request.type" disabled><el-radio label="业务洽谈"></el-radio><el-radio label="培训"></el-radio><el-radio label="会议"></el-radio><el-radio label="其他"></el-radio></el-radio-group></el-form-item><el-form-item label="其他(如果出差类别选择其他请填写)"><el-input type="textarea" v-model="request.typeContent" disabled></el-input></el-form-item><el-form-item label="出差事由"><el-input type="textarea" v-model="request.reason" disabled></el-input></el-form-item><el-form-item label="审批理由(退回需要填写退回理由)"><el-input type="textarea" v-model="request.stateReason"></el-input></el-form-item></el-form><div slot="footer" style="text-align: center;"><el-button @click="returnRequest()">退 回</el-button><el-button type="primary" @click="approval()">通 过</el-button></div></el-dialog><!--    详细查看对话框表单--><el-dialog title="详细" :visible.sync="dialogFormVisible4"><el-form :model="request"><el-form-item label="出差人姓名" label-width="120px"><el-input v-model="request.name" disabled></el-input></el-form-item><el-form-item label="部门" label-width="120px"><el-input v-model="request.department" disabled></el-input></el-form-item><el-form-item label="目的地" label-width="120px"><el-input v-model="request.destination" disabled></el-input></el-form-item><el-form-item label="暂定出发日期" label-width="120px"><el-input v-model="request.departureDate" disabled></el-input></el-form-item><el-form-item label="预计返回日期" label-width="120px"><el-input v-model="request.returnDate" disabled></el-input></el-form-item><el-form-item label="出差类别"><el-radio-group v-model="request.type" disabled><el-radio label="业务洽谈"></el-radio><el-radio label="培训"></el-radio><el-radio label="会议"></el-radio><el-radio label="其他"></el-radio></el-radio-group></el-form-item><el-form-item label="其他(如果出差类别选择其他请填写)"><el-input type="textarea" v-model="request.typeContent" disabled></el-input></el-form-item><el-form-item label="出差事由"><el-input type="textarea" v-model="request.reason" disabled></el-input></el-form-item><el-form-item label="审批理由(退回需要填写退回理由)"><el-input type="textarea" v-model="request.stateReason" disabled></el-input></el-form-item></el-form><div slot="footer" style="text-align: center;"><el-button @click="dialogFormVisible4 = false">返 回</el-button></div></el-dialog><!--    报销差旅费对话框表单--><el-dialog title="报销差旅费" :visible.sync="dialogFormVisible5"><el-form :model="recover"><el-form-item label="出差人姓名" label-width="120px"><el-input v-model="recover.name"></el-input></el-form-item><el-form-item label="部门" label-width="120px"><el-input v-model="recover.department"></el-input></el-form-item><el-form-item label="目的地" label-width="120px"><el-input v-model="recover.destination"></el-input></el-form-item><el-form-item label="出发日期" label-width="120px"><el-input v-model="recover.departureDate"></el-input></el-form-item><el-form-item label="返回日期" label-width="120px"><el-input v-model="recover.returnDate"></el-input></el-form-item><el-form-item label="出差事由"><el-input type="textarea" v-model="recover.reason"></el-input></el-form-item><el-form-item label="出发车费" label-width="120px"><el-input v-model="recover.startFare"></el-input></el-form-item><el-form-item label="返回车费" label-width="120px"><el-input v-model="recover.returnFare"></el-input></el-form-item><el-form-item label="伙食补助" label-width="120px"><el-input v-model="recover.foodAllowance"></el-input></el-form-item><el-form-item label="公杂补助" label-width="120px"><el-input v-model="recover.localTrans"></el-input></el-form-item><el-form-item label="住宿费" label-width="120px"><el-input v-model="recover.accommodation"></el-input></el-form-item></el-form><div slot="footer" class="dialog-footer"><el-button @click="dialogFormVisible5 = false">取 消</el-button><el-button type="primary" @click="addRecover">提 交</el-button></div></el-dialog></div><script src="js/vue.js"></script>
<script src="js/axios-0.18.0.js"></script>
<script src="element-ui/lib/index.js"></script>
<link rel="stylesheet" href="element-ui/lib/theme-chalk/index.css">
<script>new Vue({el: '#app',data() {return {// 修改弹框dialogFormVisible2:false,// 审批弹框dialogFormVisible3:false,// 详情弹框dialogFormVisible4:false,// 报销差旅费弹框dialogFormVisible5:false,activeIndex: '1',staff:{userId:'1',userName:'1',position:'1',department:'1'},dialogFormVisible: false,request: {name: '',typeContent: '',department: '',destination:'',departureDate: '',returnDate: '',type: '',reason: '',stateReason:''},//报销数据recover:{recoverId:'',name:'',department:'',destination:'',departureDate:'',returnDate:'',reason:'',startFare:'',returnFare:'',foodAllowance:'',localTrans:'',accommodation:'',totalAmount:'',schedule:'',scheduleReason:'',scheduleStr:''},// 表格数据tableData: [],recoverTableData:[],}},methods: {addRecover(){axios({method:'post',url:"http://localhost:8080/travel-recover/recover/addRecover",data:this.recover}).then(res=>{console.log(res.data);if(res.data != null){this.$message({message: '报销申请提交成功',type: 'success'});this.dialogFormVisible5 = false;}})this.selectAll();},// 报销差旅费申请openRecover(){this.dialogFormVisible5 = true;},// 详情detail(row){this.request = row;this.dialogFormVisible4 = true;},// 退回returnRequest(){this.request.state = 2;this.updateRequest();this.dialogFormVisible3 = false;},// 通过approval(){this.request.state = 1;this.updateRequest();this.dialogFormVisible3 = false;},// 审批approvalRequest(row){this.request = row;this.dialogFormVisible3 = true;},// 撤回withdraw(id){console.log(id);this.$confirm('是否撤回此条出差申请?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {axios({method:'get',url:"http://localhost:8080/travel-recover/request/withdraw",params:{id:id}}).then(res=>{if(res.data == "success"){this.selectAll();this.$message({message: '撤回成功',type: 'success'});}})}).catch(() => {this.$message({type: 'info',message: '已取消撤回'});});},// 修改出出差申请updateRequest(){axios({method:'post',url:"http://localhost:8080/travel-recover/request/update",data:this.request}).then(res=>{if(res.data == "success"){this.dialogFormVisible2 = false;this.selectAll();this.$message({message: '修改成功',type: 'success'});}})},//修改update(row){this.dialogFormVisible2 = true;this.request = row;},// 表格样式tableRowClassName({row, rowIndex}) {if (rowIndex === 1) {return 'warning-row';} else if (rowIndex === 3) {return 'success-row';}return '';},//查询出差申请selectAll(){axios({method:'get',url:"http://localhost:8080/travel-recover/request/selectAll"}).then(res=>{console.log(res.data);this.tableData = res.data;})axios({method:'get',url:"http://localhost:8080/travel-recover/recover/selectAll"}).then(res=>{console.log(res.data);this.recoverTableData = res.data;})},summitRequest(){console.log(this.request);axios({method:'post',url:"http://localhost:8080/travel-recover/request/addRequest",data:this.request}).then(res=>{if(res.data == "success"){this.dialogFormVisible = false;this.$message({message: '出差申请提交成功',type: 'success'});this.selectAll();}})},//出差申请travelApply(){this.dialogFormVisible = true;},//切换导航栏handleSelect(key, keyPath) {console.log(key);if(key == "1"){document.getElementById("homePage").style.display = "block";document.getElementById("apply").style.display = "none";document.getElementById("approval").style.display = "none";document.getElementById("reimbursement").style.display = "none";}else if(key == "2"){this.selectAll();document.getElementById("reimbursement").style.display = "none";document.getElementById("homePage").style.display = "none";document.getElementById("approval").style.display = "none";document.getElementById("apply").style.display = "block";// window.location.href = "http://localhost:8080/travel-recover/travelApply.html";}else if(key == "3"){this.selectAll();document.getElementById("homePage").style.display = "none";document.getElementById("approval").style.display = "none";document.getElementById("apply").style.display = "none";document.getElementById("reimbursement").style.display = "block";}else if(key == "4-1"){this.selectAll();document.getElementById("reimbursement").style.display = "none";document.getElementById("homePage").style.display = "none";document.getElementById("apply").style.display = "none";document.getElementById("approval").style.display = "block";}},},mounted(){this.$message({message: '登录成功',type: 'success'});this.staff.userId = sessionStorage.getItem("userId");this.staff.userName = sessionStorage.getItem("userName");this.staff.position = sessionStorage.getItem("position");this.staff.department = sessionStorage.getItem("department");}})</script>
</body>
</html>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/842567.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

考研打卡(28)

开局(28) 开始时间 2024-11-27 22:50:07 结束时间 2024-11-27 23:25:29明天是1124刚才和室友去吃了一百一的羊肉火锅数据结构 设哈希表长m=14,哈希函数H(key)=key MOD 11。 表中已有4个节点addr(15)=4,addr(38)=5,addr(61)=6,addr(84)=7, 其余地址为空,如用二次探查再散…

ThreeJs-04详解材质与纹理

一.matcap材质 这个材质不会受到光照影响,但是如果图片本身有光就可以一直渲染这个图片本来的样子,用来将一个图片纹理渲染到物体上的材质代码实现 加载模型后,开启纹理渲染,并把它的材质变为这个材质,并且贴上纹理图二.Lambert材质 Lambert网格材质是Three.js中最基本和常…

Java学习笔记——2024.11.27

2024.11.27 一、字符类型 1.字符类型初探可以存放一个汉字(2字节)或者数字(这个c4存储的应该是ASCII编码为97的字符,也就是a)2.字符类型细节public class Chardetial {public static void main(String[] args) {char c1 = 97;System.out.println(c1); // achar c2 = a;System.…

JDBC API

1.DriverManager 1》注册驱动,mysql8以上版本可省 2》连接数据库 2.Connection 1》获取执行sql对象 2》管理事务(统一失败)3.Statement 1》执行sql语句4.ResultSet创建集合 List accounts = new ArrayList<类名>();accounts为集合名 往集合中添加类 accounts.add(类名…

linux模拟HID USB设备及wireshark USB抓包配置

目录1. 内核配置2. 设备配置附 wireshark USB抓包配置 linux下模拟USB HID设备的简单记录,其他USB设备类似。 1. 内核配置 内核启用USB Gadget,使用fs配置usb device信息。 Device Drivers ---> [*] USB support ---><*> USB Gadget Support ---><*…

2024御网杯信息安全大赛个人赛wp_2024-11-27

MISC题解 题目附件以及工具链接: 通过网盘分享的文件:御网杯附件 链接: https://pan.baidu.com/s/1LNA6Xz6eZodSV0Io9jGSZg 提取码: jay1 --来自百度网盘超级会员v1的分享一.信息安全大赛的通知 Ctrl+A发现存在隐写:选中中间空白那一部分,把文字变成红色,得出flag二、编码…

设计模式--原型模式及其编程思想

原型模式(Prototype Pattern) 原型模式的核心思想是通过复制(克隆)现有对象来创建新对象。 原型模式通常涉及两个角色:原型对象和具体原型对象。原型对象是需要被复制的对象,而具体原型对象是实现了克隆方法的原型对象。 在Java中,原型模式通常通过实现Cloneable接口和重…

JS-DOM与BOM

DOM DOM(Document Object Model) 文档对象模型是W3C组织制定并推荐的标准, 这个标准提供了一系列操作HTML的统一API(Application Programming Interface) 核心对象是document 浏览器的工作流程浏览器读取HTML文件 在内存中生成DOM树 调用API渲染显示DOM树 DOM树 是将HTML文档映…

C语言中对文件的输入输出

在c中的文件操作 通过读的形式,打开文件用FILE打开 用FILE*类型的指针接受文件指针的首地址 并且我们可以用读或写的方式打开文件 使用r来读取文件当然也要判断是否读取文件成功,若读取成功fopen会传出指针,若失败则会传出空指针,所以要判断读取是否成功 当然,当文件不存在…

linux内核参数

1.查看所有内核参数 grubby --info=ALL2.查看内核参数应没应用,生没生效 cat /proc/cmdline3. /etc/default/grub 里 GRUB_CMDLINE_LINUX 的值

『模拟赛』NOIP2024加赛8

『模拟赛记录』NOIP2024加赛8Rank 唐A. flandre 签。 比较显然,由于 \(k\ge 0\),所以最终的序列一定为不降序列。首先将原序列升序排序,当任取一个子序列时,容易发现最后一个数越大一定越优,那么最后一个数取到最大值时,倒数第二个数一定越大越优,以此类推,最终取出的序…

manim边做边学--圆柱体

Cylinder是Manim中用于创建圆柱体对象的类。 Cylinder类在制作数学、物理或工程领域的动画时,可用于以下的场景中:演示几何概念:使用Cylinder类创建圆柱体,并通过改变其参数和方法来演示圆柱体的各种几何性质,如体积、表面积等。 模拟物理现象:使用Cylinder类来模拟圆柱体…