Commit 51f6da09 authored by dll's avatar dll

完成职位管理 打卡记录

parent 3006d946
......@@ -38,7 +38,7 @@ instance.interceptors.request.use(config => {
// 代
// http://192.168.0.108/17500
const hostname = '192.168.0.108'
const hostname = '192.168.0.116'
const port = '17500'
// const hostname = '192.168.0.108'
......
......@@ -81,13 +81,13 @@
fuzzy: false
},
{
name: "deptId",
name: "groupId",
type: "select",
label: "全部考勤组",
fuzzy: false
},
{
name: "deptId",
name: "classId",
type: "select",
label: "全部班次",
fuzzy: false
......@@ -105,15 +105,15 @@
fuzzy: false
},
{
name:'startTime',
name:'attendanceDateStart',
type: "date",
label: "考勤开始时间",
label: "异常开始时间",
fuzzy: false
},
{
name:'endTime',
name:'attendanceDateEnd',
type: "date",
label: "考勤结束时间",
label: "异常结束时间",
fuzzy: false
},
{
......
......@@ -311,43 +311,43 @@
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: true
fuzzy: false
},
{
name: "phone",
type: "text",
label: "手机号",
fuzzy: true
fuzzy: false
},
{
name: "deptId",
type: "select",
label: "所属部门",
fuzzy: true
fuzzy: false
},
{
name: "groupId",
type: "select",
label: "所属考勤组",
fuzzy: true
fuzzy: false
},
{
name: "classId",
type: "select",
label: "班次",
fuzzy: true
fuzzy: false
},
{
name:'attendanceDateStart',
type: "date",
label: "考勤开始时间",
fuzzy: true
fuzzy: false
},
{
name:'attendanceDateEnd',
type: "date",
label: "考勤结束时间",
fuzzy: true
fuzzy: false
}
],
columns: [
......@@ -355,10 +355,10 @@
{type: "index",label: "序号",width: 50},
{label: "打卡日期", prop: "attendanceDate", formatter: this.formatterDate},
{label: "员工姓名", prop: "staffName"},
{label: "考勤组", prop: "attendanceGroupName"},
{label: "部门", prop: "deptName"},
{label: "职位", prop: "positionName"},
{label: "班次", prop: "shiftsName"},
{label: "考勤组", prop: "attendanceGroupName",formatter:this.formatters},
{label: "部门", prop: "deptName",formatter:this.formatters},
{label: "职位", prop: "positionName",formatter:this.formatters},
{label: "班次", prop: "shiftsName",formatter:this.formatters},
// {label: "考勤打卡记录详细信息",
// width: 120,
// prop: "subColumns",
......
......@@ -123,25 +123,25 @@
fuzzy: false
},
{
name: "deptId",
name: "groupId",
type: "select",
label: "全部考勤组",
fuzzy: false
},
{
name: "deptId",
name: "classId",
type: "select",
label: "全部班次",
fuzzy: false
},
{
name:'startTime',
name:'attendanceDateStart',
type: "date",
label: "考勤开始时间",
fuzzy: false
},
{
name:'endTime',
name:'attendanceDateEnd',
type: "date",
label: "考勤结束时间",
fuzzy: false
......
<template>
<div className="page">
<el-card style="height:80vh">
<el-card style="height:80vh;overflow:scroll-y">
<LayoutTable notPagination :data="tableData" ref="layoutTable" :config="tableConfig" notSearch></LayoutTable>
</el-card>
<drawer-show ref="drawerform" @ok="getData" />
......
<template>
<!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="分组id" prop="groupId" v-model="form.groupId" placeholder="请输入分组id"/>
<Field label="分组名称" prop="groupName" v-model="form.groupName" placeholder="请输入分组名称"/>
<Field label="职位编码" prop="jobCode" v-model="form.jobCode" placeholder="请输入职位编码"/>
<Field label="职位名称" prop="jobName" v-model="form.jobName" placeholder="请输入职位名称"/>
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="pageInfo.type !== 'view'" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow";
export default {
mixins: [form],
components: {
dialogShow ,
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "职位信息",
// 是否显示弹出层
open: false,
toString:[
],
// 表单校验
rules: {
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="job/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改职位信息";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "job/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增职位信息";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="job/view";
this.getData();
this.pageInfo.type="view"
this.title = "职位信息详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
groupId : null,
groupName : "",
jobCode : "",
jobName : "",
remark : "",
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
......@@ -7,13 +7,13 @@
size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" style="padding:20px">
<el-row>
<Field v-if="title == '新增职位信息'" label="分组" prop="groupId" v-model="form.groupId"
<Field v-if="from == 'job'" label="分组" prop="groupId" v-model="form.groupId"
:enumData="dict.group" type="select" placeholder="请选择分组"/>
<Field label="分组名称" prop="groupName" v-model="form.groupName" placeholder="请输入分组名称" :maxLength="10" v-if="title == '新增分组信息'"/>
<Field label="分组名称" prop="groupName" v-model="form.groupName" placeholder="请输入分组名称" :maxLength="10" v-if="from == 'group'"/>
<Field label="职位编码" prop="jobCode" :maxLength="10" v-model="form.jobCode" placeholder="请输入职位编码" v-if="title == '新增职位信息'"/>
<Field label="职位名称" prop="jobName" :maxLength="10" v-model="form.jobName" placeholder="请输入职位名称" v-if="title == '新增职位信息'" />
<Field label="职位编码" prop="jobCode" :maxLength="10" v-model="form.jobCode" placeholder="请输入职位编码" v-if="from == 'job'"/>
<Field label="职位名称" prop="jobName" :maxLength="10" v-model="form.jobName" placeholder="请输入职位名称" v-if="from == 'job'" />
<Field label="类型" disabled prop="type" v-model="form.type" type="select" :enumData="dict.type" placeholder="请选择类型"/>
<Field label="备注" prop="remark" :maxLength="50" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
......@@ -57,17 +57,19 @@
methods: {
/** 编辑 */
edit(row) {
edit(from,row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="job/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改职位信息";
this.from = from
this.title = from === 'group'?"修改分组信息":'修改职位信息';
},
/** 新增 */
add(row) {
// console.log(row,'添加')
console.log(row,'添加')
this.from = row
this.title = row === 'group'?"新增分组信息":'新增职位信息';
this.reset()
......@@ -93,7 +95,7 @@
afterRender(data) {
// 固定新增类型
if(this.title === '新增分组信息'){
if(this.from == 'group'){
this.form.type = '1'
}else{
this.form.type = '2'
......
......@@ -19,7 +19,7 @@
<Field label="工号" :maxLength="15" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/>
</el-row>
<form-buttons @submit='submitForm' noCancelBtn />
<form-buttons @submit='submitFormStaff' noCancelBtn />
</el-form>
</el-drawer>
<!-- 部门选择 -->
......@@ -67,6 +67,7 @@
<script>
import form from "@/assets/mixins/formdialog";
import f from '../codeGen/form';
export default {
name: "StaffDetail",
mixins: [form],
......@@ -121,11 +122,20 @@
icon: "icon",
},
ishowBumen:false,
deptnode:{}
deptnode:{},
jobid:''//当前职位
}
},
methods: {
submitFormStaff(){
this.$post('/staff/save',this.form).then(res => {
if(res.code == 1){
this.open = false
this.$emit('ok')
}
})
},
renderContent: function (h, { node, data, store }) {
return (
<span>
......@@ -163,6 +173,7 @@
this.reset()
this.urls.currUrl = "staff/add";
this.getData();
this.jobid = row
this.pageInfo.type="add"
this.title = "新增员工基本信息";
},
......@@ -181,6 +192,7 @@
},
/**获取数据后弹框 */
afterRender(data) {
this.form.positionId = this.jobid.toString()
this.open = true;
},
......
......@@ -67,7 +67,7 @@
<span class="freshTime" slot="table-head-left2">
<i class="el-icon-refresh"></i>
<span>上次同步时间:2023-04-09 09:00:00</span>
<span>上次同步时间:{{tableData.staff.refreshDate}}</span>
</span>
</LayoutTable>
</el-row>
......@@ -151,6 +151,7 @@
</template>
<script>
import {timestampToTime} from '@/assets/utils/dateFormat.js'
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
......@@ -250,6 +251,9 @@
submitFileForm() {
this.$refs.upload.submit();
},
afterRender(data){
this.tableData.staff.refreshDate = timestampToTime(this.tableData.staff.refreshDate)
}
},
data() {
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment