Commit e8d7c03c authored by 王启林's avatar 王启林
parents db377bd5 b44bba8d
<template> <template>
<span> <span>
<el-button v-if='!noEdit' type="text" icon="el-icon-edit" size='mini' @click='$emit("edit", row)' title="编辑">编辑</el-button> <el-button
v-if="!noEdit"
type="text"
icon="el-icon-edit"
size="mini"
@click="$emit('edit', row)"
title="编辑"
>编辑</el-button
>
<span>&nbsp;</span> <span>&nbsp;</span>
<el-button v-if='!noView' type="text" icon="el-icon-view" size='mini' @click='$emit("view", row)' title="查看">查看</el-button> <el-button
<span>&nbsp;</span> v-if="!noView"
<Confirm @confirm='$emit("del", row.id)' message='确定要删除该条记录吗?'> type="text"
<el-button v-if='!noDel' type="text" icon="el-icon-delete" size='mini' title="删除">删除</el-button> icon="el-icon-view"
size="mini"
@click="$emit('view', row)"
title="查看"
>查看</el-button
>
<span>&nbsp;</span>
<el-button
v-if="reCheck"
type="text"
icon="el-icon-edit"
size="mini"
@click="$emit('edit', row)"
title="核查"
>核查</el-button
>
<span>&nbsp;</span>
<Confirm @confirm="$emit('del', row.id)" message="确定要删除该条记录吗?">
<el-button
v-if="!noDel"
type="text"
icon="el-icon-delete"
size="mini"
title="删除"
>删除</el-button
>
</Confirm> </Confirm>
</span> </span>
</template> </template>
<script> <script>
import Confirm from '@/components/Confirm.vue'; import Confirm from "@/components/Confirm.vue";
export default { export default {
props: { props: {
noEdit: { noEdit: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
noDel: { noDel: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
noAdd: { noAdd: {
type: Boolean, type: Boolean,
default: false default: false,
},
reCheck: {
type: Boolean,
default: false,
}, },
noView: { noView: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
row: { row: {
type: Object, type: Object,
required: true, required: true,
default: () => {} default: () => {},
}, },
}, },
components: { components: {
Confirm, Confirm,
}, },
methods: { methods: {},
},
data() { data() {
return { return {};
},
} };
}
}
</script> </script>
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> >
<div class="dra_content">
<div class="dra_top box">
<div class="title">异常情况</div>
<div class="content">
<el-row>
<el-col :span="12"
>员工:{{ obj.staffName ? obj.staffName : "--" }}</el-col
>
<el-col :span="12"
>所属部门:{{ obj.deptName ? obj.deptName : "--" }}</el-col
>
</el-row>
<el-row>
<el-col :span="12"
>窗口编号:{{ obj.windowNum ? obj.windowNum : "--" }}</el-col
>
<el-col :span="12"
>考勤组:{{
obj.attendanceGroupName ? obj.attendanceGroupName : "--"
}}</el-col
>
</el-row>
<el-row>
<el-col :span="12"
>实际打卡时间:{{
obj.actualAttendTime ? obj.actualAttendTime : "--"
}}</el-col
>
<el-col :span="12"
>上下班时间:{{
obj.goOffTimeStr ? obj.goOffTimeStr : "--"
}}</el-col
>
</el-row>
<el-row>
<el-col :span="12"
>异常时间:{{ obj.errorTime ? obj.errorTime : "--" }}</el-col
>
<el-col :span="12"
>异常结果:{{ obj.errorTime ? obj.errorTime : "--" }}</el-col
>
</el-row>
<el-row>
<el-col :span="12"
>扣分方式:{{ obj.subMethod ? obj.subMethod : "--" }}</el-col
>
<el-col :span="12"
>扣分时间:{{ obj.deductTime ? obj.deductTime : "--" }}</el-col
>
</el-row>
<el-row>
<el-col :span="12"
>扣分人员:{{
obj.deductPerson ? obj.deductPerson : "--"
}}</el-col
>
<el-col :span="12"
>图片凭证:{{ obj.snapPath ? obj.snapPath : "--" }}</el-col
>
</el-row>
</div>
</div>
<div class="dra_down box">
<div class="title">核查情况</div>
<div class="content">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field label="记录ID" prop="recordId" v-model="form.recordId" placeholder="请输入记录ID"/> <el-form-item label="核查结果:">
<Field label="员工ID" prop="staffId" v-model="form.staffId" placeholder="请输入员工ID"/> <p v-if="obj.view == '查看'">{{ obj.checkResult }}</p>
<Field label="员工姓名" prop="staffName" v-model="form.staffName" placeholder="请输入员工姓名"/> <el-radio-group v-model="form.checkResult" v-else>
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/> <el-radio :label="1">扣分</el-radio>
<Field label="所属部门" prop="deptId" v-model="form.deptId" placeholder="请输入所属部门"/> <el-radio :label="2">不扣分</el-radio>
<Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/> </el-radio-group>
<Field label="所属考勤组ID" prop="attendanceGroupId" v-model="form.attendanceGroupId" placeholder="请输入所属考勤组ID"/> </el-form-item>
<Field label="所属考勤组名称" prop="attendanceGroupName" v-model="form.attendanceGroupName" placeholder="请输入所属考勤组名称"/>
<Field label="考勤时间" prop="attendanceDate" v-model="form.attendanceDate" type="date" />
<Field label="绩效规则id" prop="ruleId" v-model="form.ruleId" placeholder="请输入绩效规则id"/>
<Field label="规则名称" prop="ruleName" v-model="form.ruleName" placeholder="请输入规则名称"/>
<Field label="增减类型" prop="subAddType" v-model="form.subAddType" type="select" :enumData="dict.subAddType" placeholder="请选择增减类型"/>
<Field label="扣分或增加分值" prop="score" v-model="form.score" placeholder="请输入扣分或增加分值"/>
<Field label="上下班时间" prop="goOffTimeStr" v-model="form.goOffTimeStr" placeholder="请输入上下班时间"/>
<Field label="异常时间" prop="errorTime" v-model="form.errorTime" type="date" />
<Field label="实际打卡时间" prop="actualAttendTime" v-model="form.actualAttendTime" type="date" />
<Field label="异常处理结果" prop="errorResult" v-model="form.errorResult" placeholder="请输入异常处理结果"/>
<Field label="核查人员" prop="checkPerson" v-model="form.checkPerson" placeholder="请输入核查人员"/>
<Field label="核查时间" prop="checkTime" v-model="form.checkTime" type="date" />
<Field label="核查说明" prop="checkDesc" v-model="form.checkDesc" type="textarea" placeholder="请输入核查说明"/>
<Field label="核查结果" prop="checkResult" v-model="form.checkResult" placeholder="请输入核查结果"/>
<Field label="处理状态" prop="checkStatus" v-model="form.checkStatus" type="select" :enumData="dict.checkStatus" placeholder="请选择处理状态"/>
</el-row> </el-row>
<el-row>
<el-form-item label="绩效规则:">
<p v-if="obj.view == '查看'">{{ obj.ruleName }}</p>
<div v-else>
<el-col :span="22">
<el-select
v-model="form.attendanceGroupId"
style="width: 100%;"
>
<el-option
v-for="item in kaoqinArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option
></el-select>
</el-col>
<el-col :span="22">
<el-select
v-model="form.attendanceGroupId"
style="width: 100%;margin-top: 10px;"
>
<el-option
v-for="item in kaoqinArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option></el-select
></el-col>
</div>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="扣除分值:">
<p v-if="obj.view == '查看'">{{ obj.score }}</p>
<p v-else>{{ form.score }}</p>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="说明:">
<p v-if="obj.view == '查看'">{{ obj.checkDesc }}</p>
<el-input
v-else
v-model="form.checkDesc"
type="textarea"
></el-input>
</el-form-item>
</el-row>
<el-row v-if="obj.view == '查看'">
<el-col :span="24">核查人员:{{ obj.checkPerson }}</el-col>
</el-row>
<el-row v-if="obj.view == '查看'">
<el-col :span="24">核查时间:{{ obj.checkTime }}</el-col>
</el-row>
<form-buttons
v-show="obj.view == '核查'"
@submit="submitForm"
v-if="pageInfo.type != 'view'"
noCancelBtn
/>
</el-form>
</div>
</div>
</div>
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field
label="记录ID"
prop="recordId"
v-model="form.recordId"
placeholder="请输入记录ID"
/>
<Field
label="员工ID"
prop="staffId"
v-model="form.staffId"
placeholder="请输入员工ID"
/>
<Field
label="员工姓名"
prop="staffName"
v-model="form.staffName"
placeholder="请输入员工姓名"
/>
<Field
label="工号"
prop="workNum"
v-model="form.workNum"
placeholder="请输入工号"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
placeholder="请输入所属部门"
/>
<Field
label="所属部门名称"
prop="deptName"
v-model="form.deptName"
placeholder="请输入所属部门名称"
/>
<Field
label="所属考勤组ID"
prop="attendanceGroupId"
v-model="form.attendanceGroupId"
placeholder="请输入所属考勤组ID"
/>
<Field
label="所属考勤组名称"
prop="attendanceGroupName"
v-model="form.attendanceGroupName"
placeholder="请输入所属考勤组名称"
/>
<Field
label="考勤时间"
prop="attendanceDate"
v-model="form.attendanceDate"
type="date"
/>
<Field
label="绩效规则id"
prop="ruleId"
v-model="form.ruleId"
placeholder="请输入绩效规则id"
/>
<Field
label="规则名称"
prop="ruleName"
v-model="form.ruleName"
placeholder="请输入规则名称"
/>
<Field
label="增减类型"
prop="subAddType"
v-model="form.subAddType"
type="select"
:enumData="dict.subAddType"
placeholder="请选择增减类型"
/>
<Field
label="扣分或增加分值"
prop="score"
v-model="form.score"
placeholder="请输入扣分或增加分值"
/>
<Field
label="上下班时间"
prop="goOffTimeStr"
v-model="form.goOffTimeStr"
placeholder="请输入上下班时间"
/>
<Field
label="异常时间"
prop="errorTime"
v-model="form.errorTime"
type="date"
/>
<Field
label="实际打卡时间"
prop="actualAttendTime"
v-model="form.actualAttendTime"
type="date"
/>
<Field
label="异常处理结果"
prop="errorResult"
v-model="form.errorResult"
placeholder="请输入异常处理结果"
/>
<Field
label="核查人员"
prop="checkPerson"
v-model="form.checkPerson"
placeholder="请输入核查人员"
/>
<Field
label="核查时间"
prop="checkTime"
v-model="form.checkTime"
type="date"
/>
<Field
label="核查说明"
prop="checkDesc"
v-model="form.checkDesc"
type="textarea"
placeholder="请输入核查说明"
/>
<Field
label="核查结果"
prop="checkResult"
v-model="form.checkResult"
placeholder="请输入核查结果"
/>
<Field
label="处理状态"
prop="checkStatus"
v-model="form.checkStatus"
type="select"
:enumData="dict.checkStatus"
placeholder="请选择处理状态"
/>
</el-row>
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn /> <form-buttons
</el-form> @submit="submitForm"
v-if="pageInfo.type != 'view'"
</el-drawer> noCancelBtn
/>
</el-form> -->
</el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "CheckAttendRecordDetail", name: "CheckAttendRecordDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("check/attend/record");
created() { },
this.changePath("check/attend/record") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "考勤绩效记录核查信息",
// 弹出层标题 // 是否显示弹出层
title: "考勤绩效记录核查信息", open: false,
// 是否显示弹出层 direction: "rtl",
open: false, toString: ["subAddType", "checkStatus"],
direction:"rtl", toDate: ["attendanceDate", "errorTime", "actualAttendTime", "checkTime"],
toString:[ // 表单校验
"subAddType", rules: {
"checkStatus", staffName: [
], { required: true, message: "请输入员工姓名", trigger: "blur" },
toDate:[ { max: 64, message: "最多只能录入64个字符", trigger: "blur" },
"attendanceDate", ],
"errorTime", createTime: [{ required: true, message: "请选择创建时间" }],
"actualAttendTime", },
"checkTime", obj: {},
], };
// 表单校验 },
rules: {
staffName: [
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() console.log(this.form);
this.query = { id: row.id }; this.obj = row;
this.urls.currUrl ="check/attend/record/edit"; this.reset();
this.getData(); this.query = { id: row.id };
this.pageInfo.type="edit" this.urls.currUrl = "check/attend/record/edit";
this.title = "修改考勤绩效记录核查信息"; this.getData();
}, this.pageInfo.type = "edit";
/** 新增 */ row.view == "核查"
add(row) { ? (this.title = "考勤绩效记录核查")
this.reset() : (this.title = "修改考勤绩效记录核查信息");
this.urls.currUrl = "check/attend/record/add"; },
this.getData(); /** 新增 */
this.pageInfo.type="add" add(row) {
this.title = "新增考勤绩效记录核查信息"; this.reset();
}, this.urls.currUrl = "check/attend/record/add";
/** 查看*/ this.getData();
view(row) { this.pageInfo.type = "add";
this.reset() this.title = "新增考勤绩效记录核查信息";
this.query = { id: row.id }; },
this.urls.currUrl ="check/attend/record/view"; /** 查看*/
this.getData(); view(row) {
this.pageInfo.type="view" this.obj = row;
this.title = "考勤绩效记录核查信息详细"; this.reset();
}, this.query = { id: row.id };
/**取消按钮 */ this.urls.currUrl = "check/attend/record/view";
cancel() { this.getData();
this.open = false; this.pageInfo.type = "view";
}, this.title = "考勤绩效记录核查信息详细";
/**获取数据后弹框 */ },
afterRender(data) { /**取消按钮 */
this.open = true; cancel() {
}, this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
recordId : null, recordId: null,
staffId : null, staffId: null,
staffName : "", staffName: "",
workNum : "", workNum: "",
deptId : null, deptId: null,
deptName : "", deptName: "",
attendanceGroupId : null, attendanceGroupId: null,
attendanceGroupName : "", attendanceGroupName: "",
attendanceDate : null, attendanceDate: null,
ruleId : null, ruleId: null,
ruleName : "", ruleName: "",
subAddType : 1, subAddType: 1,
score : 0.00, score: 0.0,
goOffTimeStr : "", goOffTimeStr: "",
errorTime : null, errorTime: null,
actualAttendTime : null, actualAttendTime: null,
errorResult : "", errorResult: "",
checkPerson : "", checkPerson: "",
checkTime : null, checkTime: null,
checkDesc : "", checkDesc: "",
checkResult : "", checkResult: "",
checkStatus : 1, checkStatus: 1,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, },
}, },
}; };
</script> </script>
<style lang="less" scoped>
.dra_content {
width: 100%;
height: 100%;
padding: 20px;
.box {
width: 100%;
height: auto;
.title {
color: #1890ff;
font-size: 16px;
padding-left: 10px;
position: relative;
margin-bottom: 30px;
&::after {
content: "";
display: block;
border-left: 3px solid #1890ff;
left: 0;
top: 0;
bottom: 0;
position: absolute;
}
}
.content {
width: 100%;
padding: 10px;
font-family: "微软雅黑", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 14px;
margin-left: 0 auto;
margin-bottom: 30px;
/deep/.el-row {
margin-bottom: 20px;
}
}
}
}
</style>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable notAdd notDel :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
<el-button
<el-button slot="table-head-left2"
slot="table-head-left2" style="margin-left: 10px"
style="margin-left: 10px" icon="el-icon-tickets"
icon="el-icon-tickets" size="mini"
size="mini" @click="doExport"
@click="doExport" :disabled="isExport"
:disabled="isExport" >导出</el-button
>导出</el-button> >
</LayoutTable> </LayoutTable>
<!-- 考勤绩效记录核查信息导入对话框 --> <!-- 考勤绩效记录核查信息导入对话框 -->
<el-dialog <el-dialog
:title="upload.title" :title="upload.title"
:visible.sync="upload.open" :visible.sync="upload.open"
width="400px" width="400px"
append-to-body append-to-body
> >
<el-upload <el-upload
ref="upload" ref="upload"
:limit="1" :limit="1"
accept=".xlsx, .xls" accept=".xlsx, .xls"
:headers="upload.headers" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess" :on-success="handleFileSuccess"
:auto-upload="false" :auto-upload="false"
drag drag
> >
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text"> <div class="el-upload__text">
将文件拖到此处,或 将文件拖到此处,或
<em>点击上传</em> <em>点击上传</em>
</div> </div>
<div class="el-upload__tip" slot="tip"> <div class="el-upload__tip" slot="tip">
<el-checkbox <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的数据
v-model="upload.updateSupport" <el-link
/>是否更新已经存在的数据 type="primary"
<el-link type="primary" style="font-size: 14px" @click="downloadTemplate" style="font-size: 14px"
>下载模板</el-link @click="downloadTemplate"
> >下载模板</el-link
</div> >
<div class="el-upload__tip" style="color: red" slot="tip"> </div>
提示:仅允许导入“xls”或“xlsx”格式文件! <div class="el-upload__tip" style="color: red" slot="tip">
</div> 提示:仅允许导入“xls”或“xlsx”格式文件!
</el-upload> </div>
<div slot="footer" class="dialog-footer"> </el-upload>
<el-button type="primary" @click="submitFileForm">确 定</el-button> <div slot="footer" class="dialog-footer">
<el-button @click="upload.open = false">取 消</el-button> <el-button type="primary" @click="submitFileForm">确 定</el-button>
</div> <el-button @click="upload.open = false">取 消</el-button>
</el-dialog> </div>
</el-dialog>
<drawer-show ref="drawerform" @ok="getData" />
</div> <drawer-show ref="drawerform" @ok="getData" />
</div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "CheckAttendRecordList", name: "CheckAttendRecordList",
components: { components: {
drawerShow drawerShow,
}, },
mixins: [table], mixins: [table],
created() { created() {},
methods: {
/** 导入 */
handleImport() {
this.upload.title = "考勤绩效记录核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/attend/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/attend/record/exportExcel",
{
idList: this.selection,
}, },
methods: { { type: "excel" }
/** 导入 */ )
handleImport() { .then(() => (this.isExport = false))
this.upload.title = "考勤绩效记录核查信息导入"; .catch((error) => {
this.upload.open = true; this.isExport = false;
}, this.$message.error(error.message);
/** 下载模板操作 */ });
downloadTemplate() { },
this.isExport = true; /** 重写新增方法 */
this.$download("/check/attend/record/downloadTemplate", {}, { type: "excel" }) toAdd(row) {
.then(() => (this.isExport = false)) this.$refs.drawerform.add(row);
.catch((error) => { },
this.isExport = false; /** 重写编辑方法 */
this.$message.error(error.message); toEdit(row) {
}); row.view = "核查";
}, this.$refs.drawerform.edit(row);
/** 文件上传中处理 */ },
handleFileUploadProgress(event, file, fileList) { /** 重写查看方法 */
this.upload.isUploading = true; toView(row) {
}, row.view = "查看";
/** 文件上传成功处理 */ this.$refs.drawerform.view(row);
handleFileSuccess(response, file, fileList) { },
this.upload.open = false; },
this.upload.isUploading = false; data() {
this.$refs.upload.clearFiles(); return {
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true }); // 用户导入参数
this.getData(); upload: {
}, // 是否显示弹出层(考勤绩效记录核查信息导入)
/** 提交上传文件 */ open: false,
submitFileForm() { // 弹出层标题(考勤绩效记录核查信息导入)
this.$refs.upload.submit(); title: "导入考勤绩效记录核查信息数据",
}, // 是否禁用上传
/** 导出Excel */ isUploading: false,
doExport() { // 是否更新已经存在的数据
this.isExport = true; updateSupport: 0,
this.$download("/check/attend/record/exportExcel", { // 上传的地址
"idList": this.selection, url: "/attendance/check/attend/record/importData",
}, { type: "excel" }).then(() => this.isExport = false).catch(error => { },
this.isExport = false; isExport: false,
this.$message.error(error.message); config: {
}); isshowTabPane: true,
}, search: [
/** 重写新增方法 */ {
toAdd(row) { name: "status",
this.$refs.drawerform.add(row); type: "select",
}, label: "全部状态",
/** 重写编辑方法 */ fuzzy: false,
toEdit(row) { },
this.$refs.drawerform.edit(row); {
}, name: "deptId",
/** 重写查看方法 */ type: "select",
toView(row) { label: "全部部门",
this.$refs.drawerform.view(row); fuzzy: false,
}, },
{
name: "date",
type: "date",
label: "请选择日期",
fuzzy: false,
},
{
name: "staffName",
type: "text",
label: "请输入员工姓名搜索",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 50 },
{ type: "index", label: "序号", width: 50 },
}, { label: "姓名", prop: "staffName" },
data() {
return {
// 用户导入参数
upload: {
// 是否显示弹出层(考勤绩效记录核查信息导入)
open: false,
// 弹出层标题(考勤绩效记录核查信息导入)
title: "导入考勤绩效记录核查信息数据",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 上传的地址
url: "/attendance/check/attend/record/importData",
},
isExport: false,
config: {
isshowTabPane:true,
search: [
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "员工姓名", prop: "staffName"}, { label: "窗口编号", prop: "windowNum" },
{label: "工号", prop: "workNum"}, { label: "所属部门", prop: "deptName" },
{label: "所属部门名称", prop: "deptName"}, { label: "考勤组", prop: "attendanceGroupName" },
{label: "所属考勤组名称", prop: "attendanceGroupName"}, {
label: "异常时间",
prop: "errorTime",
formatter: this.formatterDate,
},
{label: "考勤时间", prop: "attendanceDate", formatter: this.formatterDate}, { label: "上下班时间", prop: "goOffTimeStr" },
{label: "规则名称", prop: "ruleName"}, {
label: "实际打卡时间",
prop: "actualAttendTime",
formatter: this.formatterDate,
},
{label: "增减类型", prop: "subAddType",formatter: this.formatter}, { label: "异常结果", prop: "errorResult" },
{label: "扣分或增加分值",fixed:"right", prop: "score", formatter: this.formatter}, { label: "图片凭证", prop: "snapPath" },
{label: "上下班时间", prop: "goOffTimeStr"}, { label: "绩效规则", prop: "ruleNme" },
{label: "异常时间", prop: "errorTime", formatter: this.formatterDate}, { label: "扣分方式", prop: "subMethod", formatter: this.formatter },
{label: "实际打卡时间", prop: "actualAttendTime", formatter: this.formatterDate}, {
label: "扣分时间",
prop: "deductTime",
formatter: this.formatterDate,
},
{label: "异常处理结果", prop: "errorResult"}, { label: "扣分人员", prop: "deductPerson" },
{label: "核查时间", prop: "checkTime", formatter: this.formatterDate}, { label: "扣分分值", prop: "score", formatter: this.formatter },
{label: "核查说明", prop: "checkDesc"}, {
label: "处理状态",
prop: "processStatus",
formatter: this.formatter,
},
{label: "核查结果", prop: "checkResult"}, {
label: "操作",
{label: "处理状态",fixed:"right", prop: "checkStatus",formatter: this.formatter}, width: 200,
formatter: (row) => {
{label: "创建用户", prop: "createUserId", formatter: this.formatter}, return (
{ <table-buttons
label: "操作", noAdd
fixed:"right", noDel
width: 240, noEdit
formatter: row => { reCheck
return ( row={row}
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> onEdit={this.toEdit}
); onView={this.toView}
} onDel={this.toDel}
} />
] );
} },
}; },
} ],
},
}; };
},
};
</script> </script>
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> >
<el-row> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<Field label="记录ID" prop="recordId" v-model="form.recordId" placeholder="请输入记录ID"/> <el-row>
<Field label="员工ID" prop="staffId" v-model="form.staffId" placeholder="请输入员工ID"/> <Field
<Field label="员工姓名" prop="staffName" v-model="form.staffName" placeholder="请输入员工姓名"/> label="记录ID"
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/> prop="recordId"
<Field label="窗口编号" prop="windowNum" v-model="form.windowNum" placeholder="请输入窗口编号"/> v-model="form.recordId"
<Field label="所属部门" prop="deptId" v-model="form.deptId" placeholder="请输入所属部门"/> placeholder="请输入记录ID"
<Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/> />
<Field label="投诉标题" prop="complainTitle" v-model="form.complainTitle" placeholder="请输入投诉标题"/> <Field
<Field label="投诉内容"><editor v-model="form.complainContent" :min-height="256"/></Field> label="员工ID"
<Field label="投诉人真实姓名" prop="complainRealName" v-model="form.complainRealName" placeholder="请输入投诉人真实姓名"/> prop="staffId"
<Field label="联系电话" prop="contact" v-model="form.contact" placeholder="请输入联系电话"/> v-model="form.staffId"
<Field label="投诉时间" prop="complainTime" v-model="form.complainTime" type="date" /> placeholder="请输入员工ID"
<Field label="投诉来源" prop="complainSource" v-model="form.complainSource" placeholder="请输入投诉来源"/> />
<Field label="投诉设备" prop="complainDevice" v-model="form.complainDevice" placeholder="请输入投诉设备"/> <Field
<Field label="绩效规则id" prop="ruleId" v-model="form.ruleId" placeholder="请输入绩效规则id"/> label="员工姓名"
<Field label="规则名称" prop="ruleName" v-model="form.ruleName" placeholder="请输入规则名称"/> prop="staffName"
<Field label="扣分方式" prop="subMethod" v-model="form.subMethod" type="select" :enumData="dict.subMethod" placeholder="请选择扣分方式"/> v-model="form.staffName"
<Field label="扣分人员" prop="deductPerson" v-model="form.deductPerson" placeholder="请输入扣分人员"/> placeholder="请输入员工姓名"
<Field label="扣分时间" prop="deductTime" v-model="form.deductTime" type="date" /> />
<Field label="扣分或增加分值" prop="score" v-model="form.score" placeholder="请输入扣分或增加分值"/> <Field
<Field label="核查人员" prop="checkPerson" v-model="form.checkPerson" placeholder="请输入核查人员"/> label="工号"
<Field label="核查时间" prop="checkTime" v-model="form.checkTime" type="date" /> prop="workNum"
<Field label="核查说明" prop="checkDesc" v-model="form.checkDesc" type="textarea" placeholder="请输入核查说明"/> v-model="form.workNum"
<Field label="核查结果" prop="checkResult" v-model="form.checkResult" placeholder="请输入核查结果"/> placeholder="请输入工号"
<Field label="处理状态" prop="checkStatus" v-model="form.checkStatus" type="select" :enumData="dict.checkStatus" placeholder="请选择处理状态"/> />
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> <Field
label="窗口编号"
prop="windowNum"
v-model="form.windowNum"
placeholder="请输入窗口编号"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
placeholder="请输入所属部门"
/>
<Field
label="所属部门名称"
prop="deptName"
v-model="form.deptName"
placeholder="请输入所属部门名称"
/>
<Field
label="投诉标题"
prop="complainTitle"
v-model="form.complainTitle"
placeholder="请输入投诉标题"
/>
<Field label="投诉内容"
><editor v-model="form.complainContent" :min-height="256"
/></Field>
<Field
label="投诉人真实姓名"
prop="complainRealName"
v-model="form.complainRealName"
placeholder="请输入投诉人真实姓名"
/>
<Field
label="联系电话"
prop="contact"
v-model="form.contact"
placeholder="请输入联系电话"
/>
<Field
label="投诉时间"
prop="complainTime"
v-model="form.complainTime"
type="date"
/>
<Field
label="投诉来源"
prop="complainSource"
v-model="form.complainSource"
placeholder="请输入投诉来源"
/>
<Field
label="投诉设备"
prop="complainDevice"
v-model="form.complainDevice"
placeholder="请输入投诉设备"
/>
<Field
label="绩效规则id"
prop="ruleId"
v-model="form.ruleId"
placeholder="请输入绩效规则id"
/>
<Field
label="规则名称"
prop="ruleName"
v-model="form.ruleName"
placeholder="请输入规则名称"
/>
<Field
label="扣分方式"
prop="subMethod"
v-model="form.subMethod"
type="select"
:enumData="dict.subMethod"
placeholder="请选择扣分方式"
/>
<Field
label="扣分人员"
prop="deductPerson"
v-model="form.deductPerson"
placeholder="请输入扣分人员"
/>
<Field
label="扣分时间"
prop="deductTime"
v-model="form.deductTime"
type="date"
/>
<Field
label="扣分或增加分值"
prop="score"
v-model="form.score"
placeholder="请输入扣分或增加分值"
/>
<Field
label="核查人员"
prop="checkPerson"
v-model="form.checkPerson"
placeholder="请输入核查人员"
/>
<Field
label="核查时间"
prop="checkTime"
v-model="form.checkTime"
type="date"
/>
<Field
label="核查说明"
prop="checkDesc"
v-model="form.checkDesc"
type="textarea"
placeholder="请输入核查说明"
/>
<Field
label="核查结果"
prop="checkResult"
v-model="form.checkResult"
placeholder="请输入核查结果"
/>
<Field
label="处理状态"
prop="checkStatus"
v-model="form.checkStatus"
type="select"
:enumData="dict.checkStatus"
placeholder="请选择处理状态"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row>
</el-row> <form-buttons
@submit="submitForm"
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn /> v-if="pageInfo.type != 'view'"
</el-form> noCancelBtn
/>
</el-drawer> </el-form>
</el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "CheckComplainRecordDetail", name: "CheckComplainRecordDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("check/complain/record");
created() { },
this.changePath("check/complain/record") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "评价绩效投诉核查信息",
// 弹出层标题 // 是否显示弹出层
title: "评价绩效投诉核查信息", open: false,
// 是否显示弹出层 direction: "rtl",
open: false, toString: ["subMethod", "checkStatus"],
direction:"rtl", toDate: ["complainTime", "deductTime", "checkTime"],
toString:[ // 表单校验
"subMethod", rules: {
"checkStatus", staffName: [
], { required: true, message: "请输入员工姓名", trigger: "blur" },
toDate:[ { max: 64, message: "最多只能录入64个字符", trigger: "blur" },
"complainTime", ],
"deductTime", createTime: [{ required: true, message: "请选择创建时间" }],
"checkTime", },
], };
// 表单校验 },
rules: {
staffName: [
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="check/complain/record/edit"; this.urls.currUrl = "check/complain/record/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改评价绩效投诉核查信息"; row.view == "核查"
}, ? (this.title = "评价绩效投诉核查")
/** 新增 */ : (this.title = "修改评价绩效投诉核查信息");
add(row) { },
this.reset() /** 新增 */
this.urls.currUrl = "check/complain/record/add"; add(row) {
this.getData(); this.reset();
this.pageInfo.type="add" this.urls.currUrl = "check/complain/record/add";
this.title = "新增评价绩效投诉核查信息"; this.getData();
}, this.pageInfo.type = "add";
/** 查看*/ this.title = "新增评价绩效投诉核查信息";
view(row) { },
this.reset() /** 查看*/
this.query = { id: row.id }; view(row) {
this.urls.currUrl ="check/complain/record/view"; this.reset();
this.getData(); this.query = { id: row.id };
this.pageInfo.type="view" this.urls.currUrl = "check/complain/record/view";
this.title = "评价绩效投诉核查信息详细"; this.getData();
}, this.pageInfo.type = "view";
/**取消按钮 */ this.title = "评价绩效投诉核查信息详细";
cancel() { },
this.open = false; /**取消按钮 */
}, cancel() {
/**获取数据后弹框 */ this.open = false;
afterRender(data) { },
this.open = true; /**获取数据后弹框 */
}, afterRender(data) {
this.open = true;
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
recordId : null, recordId: null,
staffId : null, staffId: null,
staffName : "", staffName: "",
workNum : "", workNum: "",
windowNum : "", windowNum: "",
deptId : null, deptId: null,
deptName : "", deptName: "",
complainTitle : "", complainTitle: "",
complainContent : "", complainContent: "",
complainRealName : "", complainRealName: "",
contact : "", contact: "",
complainTime : null, complainTime: null,
complainSource : "", complainSource: "",
complainDevice : "", complainDevice: "",
ruleId : null, ruleId: null,
ruleName : "", ruleName: "",
subMethod : 1, subMethod: 1,
deductPerson : "", deductPerson: "",
deductTime : null, deductTime: null,
score : 0.00, score: 0.0,
checkPerson : "", checkPerson: "",
checkTime : null, checkTime: null,
checkDesc : "", checkDesc: "",
checkResult : "", checkResult: "",
checkStatus : 1, checkStatus: 1,
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, },
}, },
}; };
</script> </script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable notAdd notDel :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
<el-button
<el-button slot="table-head-left2"
slot="table-head-left2" style="margin-left: 10px"
style="margin-left: 10px" icon="el-icon-tickets"
icon="el-icon-tickets" size="mini"
size="mini" @click="doExport"
@click="doExport" :disabled="isExport"
:disabled="isExport" >导出</el-button
>导出</el-button> >
</LayoutTable> </LayoutTable>
<!-- 评价绩效投诉核查信息导入对话框 --> <!-- 评价绩效投诉核查信息导入对话框 -->
<el-dialog <el-dialog
:title="upload.title" :title="upload.title"
:visible.sync="upload.open" :visible.sync="upload.open"
width="400px" width="400px"
append-to-body append-to-body
> >
<el-upload <el-upload
ref="upload" ref="upload"
:limit="1" :limit="1"
accept=".xlsx, .xls" accept=".xlsx, .xls"
:headers="upload.headers" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess" :on-success="handleFileSuccess"
:auto-upload="false" :auto-upload="false"
drag drag
> >
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text"> <div class="el-upload__text">
将文件拖到此处,或 将文件拖到此处,或
<em>点击上传</em> <em>点击上传</em>
</div> </div>
<div class="el-upload__tip" slot="tip"> <div class="el-upload__tip" slot="tip">
<el-checkbox <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的数据
v-model="upload.updateSupport" <el-link
/>是否更新已经存在的数据 type="primary"
<el-link type="primary" style="font-size: 14px" @click="downloadTemplate" style="font-size: 14px"
>下载模板</el-link @click="downloadTemplate"
> >下载模板</el-link
</div> >
<div class="el-upload__tip" style="color: red" slot="tip"> </div>
提示:仅允许导入“xls”或“xlsx”格式文件! <div class="el-upload__tip" style="color: red" slot="tip">
</div> 提示:仅允许导入“xls”或“xlsx”格式文件!
</el-upload> </div>
<div slot="footer" class="dialog-footer"> </el-upload>
<el-button type="primary" @click="submitFileForm">确 定</el-button> <div slot="footer" class="dialog-footer">
<el-button @click="upload.open = false">取 消</el-button> <el-button type="primary" @click="submitFileForm">确 定</el-button>
</div> <el-button @click="upload.open = false">取 消</el-button>
</el-dialog> </div>
</el-dialog>
<drawer-show ref="drawerform" @ok="getData" />
</div> <drawer-show ref="drawerform" @ok="getData" />
</div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "CheckComplainRecordList", name: "CheckComplainRecordList",
components: { components: {
drawerShow drawerShow,
}, },
mixins: [table], mixins: [table],
created() { created() {},
methods: {
/** 导入 */
handleImport() {
this.upload.title = "评价绩效投诉核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/complain/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/complain/record/exportExcel",
{
idList: this.selection,
}, },
methods: { { type: "excel" }
/** 导入 */ )
handleImport() { .then(() => (this.isExport = false))
this.upload.title = "评价绩效投诉核查信息导入"; .catch((error) => {
this.upload.open = true; this.isExport = false;
}, this.$message.error(error.message);
/** 下载模板操作 */ });
downloadTemplate() { },
this.isExport = true; /** 重写新增方法 */
this.$download("/check/complain/record/downloadTemplate", {}, { type: "excel" }) toAdd(row) {
.then(() => (this.isExport = false)) this.$refs.drawerform.add(row);
.catch((error) => { },
this.isExport = false; /** 重写编辑方法 */
this.$message.error(error.message); toEdit(row) {
}); row.view = "核查";
}, this.$refs.drawerform.edit(row);
/** 文件上传中处理 */ },
handleFileUploadProgress(event, file, fileList) { /** 重写查看方法 */
this.upload.isUploading = true; toView(row) {
}, row.view = "查看";
/** 文件上传成功处理 */ this.$refs.drawerform.view(row);
handleFileSuccess(response, file, fileList) { },
this.upload.open = false; },
this.upload.isUploading = false; data() {
this.$refs.upload.clearFiles(); return {
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true }); // 用户导入参数
this.getData(); upload: {
}, // 是否显示弹出层(评价绩效投诉核查信息导入)
/** 提交上传文件 */ open: false,
submitFileForm() { // 弹出层标题(评价绩效投诉核查信息导入)
this.$refs.upload.submit(); title: "导入评价绩效投诉核查信息数据",
}, // 是否禁用上传
/** 导出Excel */ isUploading: false,
doExport() { // 是否更新已经存在的数据
this.isExport = true; updateSupport: 0,
this.$download("/check/complain/record/exportExcel", { // 上传的地址
"idList": this.selection, url: "/m/check/complain/record/importData",
}, { type: "excel" }).then(() => this.isExport = false).catch(error => { },
this.isExport = false; isExport: false,
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
}, config: {
data() { isshowTabPane: true,
return { search: [
// 用户导入参数 {
upload: { name: "status",
// 是否显示弹出层(评价绩效投诉核查信息导入) type: "select",
open: false, label: "全部状态",
// 弹出层标题(评价绩效投诉核查信息导入) fuzzy: false,
title: "导入评价绩效投诉核查信息数据", },
// 是否禁用上传 {
isUploading: false, name: "deptId",
// 是否更新已经存在的数据 type: "select",
updateSupport: 0, label: "全部部门",
// 上传的地址 fuzzy: false,
url: "/m/check/complain/record/importData", },
}, {
isExport: false, name: "source",
type: "select",
config: { label: "全部来源",
isshowTabPane:true, fuzzy: false,
search: [ },
], {
columns: [ name: "date",
{type: "selection", width: 60}, type: "date",
{type: "index",label: "序号",width: 50}, label: "请选择日期",
fuzzy: false,
{label: "员工姓名", prop: "staffName"}, },
{
{label: "所属部门名称", prop: "deptName"}, name: "staffName",
type: "text",
{label: "投诉时间", prop: "complainTime", formatter: this.formatterDate}, label: "请输入员工姓名搜索",
fuzzy: false,
{label: "扣分方式", prop: "subMethod",formatter: this.formatter}, },
],
{label: "扣分时间", prop: "deductTime", formatter: this.formatterDate}, columns: [
{ type: "selection", width: 50 },
{label: "扣分或增加分值", prop: "score", formatter: this.formatter}, { type: "index", label: "序号", width: 50 },
{label: "核查时间", prop: "checkTime", formatter: this.formatterDate}, { label: "姓名", prop: "staffName" },
{label: "处理状态", prop: "checkStatus",formatter: this.formatter}, { label: "窗口编号", prop: "windowNum" },
{label: "创建用户", prop: "createUserId", formatter: this.formatter}, { label: "所属部门", prop: "deptName" },
{
label: "操作", { label: "投诉标题", prop: "complainTitle" },
width: 240,
formatter: row => { { label: "投诉内容", prop: "complainContent" },
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> { label: "投诉人真实姓名", prop: "complainRealName" },
);
} { label: "联系电话", prop: "contact" },
}
] {
} label: "投诉时间",
}; prop: "complainTime",
} formatter: this.formatterDate,
},
{ label: "投诉来源", prop: "complainSource" },
{ label: "图片凭证", prop: "snapPath" },
{ label: "投诉设备", prop: "complainDevice" },
{ label: "绩效规则", prop: "ruleNme" },
{ label: "扣分方式", prop: "subMethod", formatter: this.formatter },
{
label: "扣分时间",
prop: "deductTime",
formatter: this.formatterDate,
},
{ label: "扣分人员", prop: "deductPerson" },
{ label: "扣分分值", prop: "score", formatter: this.formatter },
{
label: "处理状态",
prop: "processStatus",
formatter: this.formatter,
},
{
label: "操作",
width: 200,
formatter: (row) => {
return (
<table-buttons
noAdd
noDel
reCheck
noEdit
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
);
},
},
],
},
}; };
},
};
</script> </script>
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> >
<el-row> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<Field label="记录ID" prop="recordId" v-model="form.recordId" placeholder="请输入记录ID"/> <el-row>
<Field label="员工ID" prop="staffId" v-model="form.staffId" placeholder="请输入员工ID"/> <Field
<Field label="员工姓名" prop="staffName" v-model="form.staffName" placeholder="请输入员工姓名"/> label="记录ID"
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/> prop="recordId"
<Field label="窗口编号" prop="windowNum" v-model="form.windowNum" placeholder="请输入窗口编号"/> v-model="form.recordId"
<Field label="所属部门" prop="deptId" v-model="form.deptId" placeholder="请输入所属部门"/> placeholder="请输入记录ID"
<Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/> />
<Field label="违规类型" prop="irregularType" v-model="form.irregularType" type="select" :enumData="dict.irregularType" placeholder="请选择违规类型"/> <Field
<Field label="发生时间" prop="happenTime" v-model="form.happenTime" type="date" /> label="员工ID"
<Field label="持续时间,秒" prop="duration" v-model="form.duration" placeholder="请输入持续时间,秒"/> prop="staffId"
<Field label="报警时间" prop="alarmTime" v-model="form.alarmTime" type="date" /> v-model="form.staffId"
<Field label="图片凭证地址" prop="snapPath" v-model="form.snapPath" type="textarea" placeholder="请输入图片凭证地址"/> placeholder="请输入员工ID"
<Field label="绩效规则id" prop="ruleId" v-model="form.ruleId" placeholder="请输入绩效规则id"/> />
<Field label="规则名称" prop="ruleName" v-model="form.ruleName" placeholder="请输入规则名称"/> <Field
<Field label="扣分方式" prop="subMethod" v-model="form.subMethod" type="select" :enumData="dict.subMethod" placeholder="请选择扣分方式"/> label="员工姓名"
<Field label="扣分人员" prop="deductPerson" v-model="form.deductPerson" placeholder="请输入扣分人员"/> prop="staffName"
<Field label="扣分时间" prop="deductTime" v-model="form.deductTime" type="date" /> v-model="form.staffName"
<Field label="扣分或增加分值" prop="score" v-model="form.score" placeholder="请输入扣分或增加分值"/> placeholder="请输入员工姓名"
<Field label="核查人员" prop="checkPerson" v-model="form.checkPerson" placeholder="请输入核查人员"/> />
<Field label="核查时间" prop="checkTime" v-model="form.checkTime" type="date" /> <Field
<Field label="核查说明" prop="checkDesc" v-model="form.checkDesc" type="textarea" placeholder="请输入核查说明"/> label="工号"
<Field label="核查结果" prop="checkResult" v-model="form.checkResult" placeholder="请输入核查结果"/> prop="workNum"
<Field label="处理状态" prop="checkStatus" v-model="form.checkStatus" type="select" :enumData="dict.checkStatus" placeholder="请选择处理状态"/> v-model="form.workNum"
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> placeholder="请输入工号"
/>
<Field
label="窗口编号"
prop="windowNum"
v-model="form.windowNum"
placeholder="请输入窗口编号"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
placeholder="请输入所属部门"
/>
<Field
label="所属部门名称"
prop="deptName"
v-model="form.deptName"
placeholder="请输入所属部门名称"
/>
<Field
label="违规类型"
prop="irregularType"
v-model="form.irregularType"
type="select"
:enumData="dict.irregularType"
placeholder="请选择违规类型"
/>
<Field
label="发生时间"
prop="happenTime"
v-model="form.happenTime"
type="date"
/>
<Field
label="持续时间,秒"
prop="duration"
v-model="form.duration"
placeholder="请输入持续时间,秒"
/>
<Field
label="报警时间"
prop="alarmTime"
v-model="form.alarmTime"
type="date"
/>
<Field
label="图片凭证地址"
prop="snapPath"
v-model="form.snapPath"
type="textarea"
placeholder="请输入图片凭证地址"
/>
<Field
label="绩效规则id"
prop="ruleId"
v-model="form.ruleId"
placeholder="请输入绩效规则id"
/>
<Field
label="规则名称"
prop="ruleName"
v-model="form.ruleName"
placeholder="请输入规则名称"
/>
<Field
label="扣分方式"
prop="subMethod"
v-model="form.subMethod"
type="select"
:enumData="dict.subMethod"
placeholder="请选择扣分方式"
/>
<Field
label="扣分人员"
prop="deductPerson"
v-model="form.deductPerson"
placeholder="请输入扣分人员"
/>
<Field
label="扣分时间"
prop="deductTime"
v-model="form.deductTime"
type="date"
/>
<Field
label="扣分或增加分值"
prop="score"
v-model="form.score"
placeholder="请输入扣分或增加分值"
/>
<Field
label="核查人员"
prop="checkPerson"
v-model="form.checkPerson"
placeholder="请输入核查人员"
/>
<Field
label="核查时间"
prop="checkTime"
v-model="form.checkTime"
type="date"
/>
<Field
label="核查说明"
prop="checkDesc"
v-model="form.checkDesc"
type="textarea"
placeholder="请输入核查说明"
/>
<Field
label="核查结果"
prop="checkResult"
v-model="form.checkResult"
placeholder="请输入核查结果"
/>
<Field
label="处理状态"
prop="checkStatus"
v-model="form.checkStatus"
type="select"
:enumData="dict.checkStatus"
placeholder="请选择处理状态"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row>
</el-row> <form-buttons
@submit="submitForm"
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn /> v-if="pageInfo.type != 'view'"
</el-form> noCancelBtn
/>
</el-drawer> </el-form>
</el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "CheckEffectRecordDetail", name: "CheckEffectRecordDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("check/effect/record");
created() { },
this.changePath("check/effect/record") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "效能绩效核查信息",
// 弹出层标题 // 是否显示弹出层
title: "效能绩效核查信息", open: false,
// 是否显示弹出层 direction: "rtl",
open: false, toString: ["irregularType", "subMethod", "checkStatus"],
direction:"rtl", toDate: ["happenTime", "alarmTime", "deductTime", "checkTime"],
toString:[ // 表单校验
"irregularType", rules: {
"subMethod", staffName: [
"checkStatus", { required: true, message: "请输入员工姓名", trigger: "blur" },
], { max: 64, message: "最多只能录入64个字符", trigger: "blur" },
toDate:[ ],
"happenTime", createTime: [{ required: true, message: "请选择创建时间" }],
"alarmTime", },
"deductTime", };
"checkTime", },
],
// 表单校验
rules: {
staffName: [
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="check/effect/record/edit"; this.urls.currUrl = "check/effect/record/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改效能绩效核查信息"; row.view == "核查"
}, ? (this.title = "效能绩效核查")
/** 新增 */ : (this.title = "修改效能绩效核查信息");
add(row) { },
this.reset() /** 新增 */
this.urls.currUrl = "check/effect/record/add"; add(row) {
this.getData(); this.reset();
this.pageInfo.type="add" this.urls.currUrl = "check/effect/record/add";
this.title = "新增效能绩效核查信息"; this.getData();
}, this.pageInfo.type = "add";
/** 查看*/ this.title = "新增效能绩效核查信息";
view(row) { },
this.reset() /** 查看*/
this.query = { id: row.id }; view(row) {
this.urls.currUrl ="check/effect/record/view"; this.reset();
this.getData(); this.query = { id: row.id };
this.pageInfo.type="view" this.urls.currUrl = "check/effect/record/view";
this.title = "效能绩效核查信息详细"; this.getData();
}, this.pageInfo.type = "view";
/**取消按钮 */ this.title = "效能绩效核查信息详细";
cancel() { },
this.open = false; /**取消按钮 */
}, cancel() {
/**获取数据后弹框 */ this.open = false;
afterRender(data) { },
this.open = true; /**获取数据后弹框 */
}, afterRender(data) {
this.open = true;
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
recordId : null, recordId: null,
staffId : null, staffId: null,
staffName : "", staffName: "",
workNum : "", workNum: "",
windowNum : "", windowNum: "",
deptId : null, deptId: null,
deptName : "", deptName: "",
irregularType : null, irregularType: null,
happenTime : null, happenTime: null,
duration : 0, duration: 0,
alarmTime : null, alarmTime: null,
snapPath : "", snapPath: "",
ruleId : null, ruleId: null,
ruleName : "", ruleName: "",
subMethod : 1, subMethod: 1,
deductPerson : "", deductPerson: "",
deductTime : null, deductTime: null,
score : 0.00, score: 0.0,
checkPerson : "", checkPerson: "",
checkTime : null, checkTime: null,
checkDesc : "", checkDesc: "",
checkResult : "", checkResult: "",
checkStatus : 1, checkStatus: 1,
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, },
}, },
}; };
</script> </script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable notAdd notDel :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
<el-button
<el-button slot="table-head-left2"
slot="table-head-left2" style="margin-left: 10px"
style="margin-left: 10px" icon="el-icon-tickets"
icon="el-icon-tickets" size="mini"
size="mini" @click="doExport"
@click="doExport" :disabled="isExport"
:disabled="isExport" >导出</el-button
>导出</el-button> >
</LayoutTable> </LayoutTable>
<!-- 效能绩效核查信息导入对话框 --> <!-- 效能绩效核查信息导入对话框 -->
<el-dialog <el-dialog
:title="upload.title" :title="upload.title"
:visible.sync="upload.open" :visible.sync="upload.open"
width="400px" width="400px"
append-to-body append-to-body
> >
<el-upload <el-upload
ref="upload" ref="upload"
:limit="1" :limit="1"
accept=".xlsx, .xls" accept=".xlsx, .xls"
:headers="upload.headers" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess" :on-success="handleFileSuccess"
:auto-upload="false" :auto-upload="false"
drag drag
> >
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text"> <div class="el-upload__text">
将文件拖到此处,或 将文件拖到此处,或
<em>点击上传</em> <em>点击上传</em>
</div> </div>
<div class="el-upload__tip" slot="tip"> <div class="el-upload__tip" slot="tip">
<el-checkbox <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的数据
v-model="upload.updateSupport" <el-link
/>是否更新已经存在的数据 type="primary"
<el-link type="primary" style="font-size: 14px" @click="downloadTemplate" style="font-size: 14px"
>下载模板</el-link @click="downloadTemplate"
> >下载模板</el-link
</div> >
<div class="el-upload__tip" style="color: red" slot="tip"> </div>
提示:仅允许导入“xls”或“xlsx”格式文件! <div class="el-upload__tip" style="color: red" slot="tip">
</div> 提示:仅允许导入“xls”或“xlsx”格式文件!
</el-upload> </div>
<div slot="footer" class="dialog-footer"> </el-upload>
<el-button type="primary" @click="submitFileForm">确 定</el-button> <div slot="footer" class="dialog-footer">
<el-button @click="upload.open = false">取 消</el-button> <el-button type="primary" @click="submitFileForm">确 定</el-button>
</div> <el-button @click="upload.open = false">取 消</el-button>
</el-dialog> </div>
</el-dialog>
<drawer-show ref="drawerform" @ok="getData" />
</div> <drawer-show ref="drawerform" @ok="getData" />
</div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "CheckEffectRecordList", name: "CheckEffectRecordList",
components: { components: {
drawerShow drawerShow,
}, },
mixins: [table], mixins: [table],
created() { created() {},
}, methods: {
methods: { /** 导入 */
/** 导入 */ handleImport() {
handleImport() { this.upload.title = "效能绩效核查信息导入";
this.upload.title = "效能绩效核查信息导入"; this.upload.open = true;
this.upload.open = true; },
}, /** 下载模板操作 */
/** 下载模板操作 */ downloadTemplate() {
downloadTemplate() { this.isExport = true;
this.isExport = true; this.$download(
this.$download("/check/effect/record/downloadTemplate", {}, { type: "excel" }) "/check/effect/record/downloadTemplate",
.then(() => (this.isExport = false)) {},
.catch((error) => { { type: "excel" }
this.isExport = false; )
this.$message.error(error.message); .then(() => (this.isExport = false))
}); .catch((error) => {
}, this.isExport = false;
/** 文件上传中处理 */ this.$message.error(error.message);
handleFileUploadProgress(event, file, fileList) { });
this.upload.isUploading = true; },
}, /** 文件上传中处理 */
/** 文件上传成功处理 */ handleFileUploadProgress(event, file, fileList) {
handleFileSuccess(response, file, fileList) { this.upload.isUploading = true;
this.upload.open = false; },
this.upload.isUploading = false; /** 文件上传成功处理 */
this.$refs.upload.clearFiles(); handleFileSuccess(response, file, fileList) {
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true }); this.upload.open = false;
this.getData(); this.upload.isUploading = false;
}, this.$refs.upload.clearFiles();
/** 提交上传文件 */ this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
submitFileForm() { this.getData();
this.$refs.upload.submit(); },
}, /** 提交上传文件 */
/** 导出Excel */ submitFileForm() {
doExport() { this.$refs.upload.submit();
this.isExport = true; },
this.$download("/check/effect/record/exportExcel", { /** 导出Excel */
"idList": this.selection, doExport() {
}, { type: "excel" }).then(() => this.isExport = false).catch(error => { this.isExport = true;
this.isExport = false; this.$download(
this.$message.error(error.message); "/check/effect/record/exportExcel",
}); {
}, idList: this.selection,
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
}, },
data() { { type: "excel" }
return { )
// 用户导入参数 .then(() => (this.isExport = false))
upload: { .catch((error) => {
// 是否显示弹出层(效能绩效核查信息导入) this.isExport = false;
open: false, this.$message.error(error.message);
// 弹出层标题(效能绩效核查信息导入) });
title: "导入效能绩效核查信息数据", },
// 是否禁用上传 /** 重写新增方法 */
isUploading: false, toAdd(row) {
// 是否更新已经存在的数据 this.$refs.drawerform.add(row);
updateSupport: 0, },
// 上传的地址 /** 重写编辑方法 */
url: "/m/check/effect/record/importData", toEdit(row) {
}, row.view = "核查";
isExport: false, this.$refs.drawerform.edit(row);
config: { },
isshowTabPane:true, /** 重写查看方法 */
search: [ toView(row) {
], row.view = "查看";
columns: [ this.$refs.drawerform.view(row);
{type: "selection", width: 60}, },
{type: "index",label: "序号",width: 50}, },
data() {
{label: "员工姓名", prop: "staffName"}, return {
// 用户导入参数
{label: "工号", prop: "workNum"}, upload: {
// 是否显示弹出层(效能绩效核查信息导入)
open: false,
// 弹出层标题(效能绩效核查信息导入)
title: "导入效能绩效核查信息数据",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 上传的地址
url: "/m/check/effect/record/importData",
},
isExport: false,
config: {
isshowTabPane: true,
search: [
{
name: "status",
type: "select",
label: "全部状态",
fuzzy: false,
},
{
name: "deptId",
type: "select",
label: "全部部门",
fuzzy: false,
},
{label: "窗口编号", prop: "windowNum"}, {
name: "date",
type: "date",
label: "请选择日期",
fuzzy: false,
},
{
name: "staffName",
type: "text",
label: "请输入员工姓名搜索",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 60 },
{ type: "index", label: "序号", width: 50 },
{label: "所属部门", prop: "deptId", formatter: this.formatter}, { label: "姓名", prop: "staffName" },
{label: "所属部门名称", prop: "deptName"}, { label: "窗口编号", prop: "windowNum" },
{label: "违规类型", prop: "irregularType",formatter: this.formatter}, { label: "所属部门", prop: "deptName" },
{label: "发生时间", prop: "happenTime", formatter: this.formatterDate}, {
label: "违规类型",
prop: "irregularType",
formatter: this.formatter,
},
{label: "持续时间,秒", prop: "duration",formatter: this.formatter}, {
label: "发生时间",
prop: "happenTime",
formatter: this.formatterDate,
},
{label: "报警时间", prop: "alarmTime", formatter: this.formatterDate}, {
label: "时长",
prop: "duration",
formatter: this.formatter,
},
{label: "图片凭证地址", prop: "snapPath"}, {
label: "报警时间",
prop: "alarmTime",
formatter: this.formatterDate,
},
{label: "绩效规则id", prop: "ruleId", formatter: this.formatter}, { label: "图片凭证", prop: "snapPath" },
{label: "规则名称", prop: "ruleName"}, { label: "绩效规则", prop: "ruleName" },
{label: "扣分方式", prop: "subMethod",formatter: this.formatter}, { label: "扣分方式", prop: "subMethod", formatter: this.formatter },
{label: "扣分人员", prop: "deductPerson"}, {
label: "扣分时间",
prop: "deductTime",
formatter: this.formatterDate,
},
{label: "扣分时间", prop: "deductTime", formatter: this.formatterDate}, { label: "扣分人员", prop: "deductPerson" },
{label: "扣分或增加分值", prop: "score", formatter: this.formatter}, { label: "扣分分值", prop: "score", formatter: this.formatter },
{label: "核查人员", prop: "checkPerson"}, {
label: "处理状态",
prop: "processStatus",
formatter: this.formatter,
},
{label: "核查时间", prop: "checkTime", formatter: this.formatterDate}, {
label: "操作",
{label: "核查说明", prop: "checkDesc"}, width: 240,
formatter: (row) => {
{label: "核查结果", prop: "checkResult"}, return (
<table-buttons
{label: "处理状态", prop: "checkStatus",formatter: this.formatter}, noAdd
noDel
{label: "创建用户", prop: "createUserId", formatter: this.formatter}, noEdit
{ reCheck
label: "操作", row={row}
width: 240, onEdit={this.toEdit}
formatter: row => { onView={this.toView}
return ( onDel={this.toDel}
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> />
); );
} },
} },
] ],
} },
};
}
}; };
},
};
</script> </script>
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> >
<el-row> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<Field label="记录ID" prop="recordId" v-model="form.recordId" placeholder="请输入记录ID"/> <el-row>
<Field label="员工ID" prop="staffId" v-model="form.staffId" placeholder="请输入员工ID"/> <Field
<Field label="员工姓名" prop="staffName" v-model="form.staffName" placeholder="请输入员工姓名"/> label="记录ID"
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/> prop="recordId"
<Field label="窗口编号" prop="windowNum" v-model="form.windowNum" placeholder="请输入窗口编号"/> v-model="form.recordId"
<Field label="所属部门" prop="deptId" v-model="form.deptId" placeholder="请输入所属部门"/> placeholder="请输入记录ID"
<Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/> />
<Field label="办件编码" prop="goworkCode" v-model="form.goworkCode" placeholder="请输入办件编码"/> <Field
<Field label="办件所属部门" prop="goworkDepts" v-model="form.goworkDepts" type="textarea" placeholder="请输入办件所属部门"/> label="员工ID"
<Field label="事项名称" prop="matterlName" v-model="form.matterlName" type="textarea" placeholder="请输入事项名称"/> prop="staffId"
<Field label="办理时间" prop="goworkTime" v-model="form.goworkTime" type="date" /> v-model="form.staffId"
<Field label="绩效规则id" prop="ruleId" v-model="form.ruleId" placeholder="请输入绩效规则id"/> placeholder="请输入员工ID"
<Field label="规则名称" prop="ruleName" v-model="form.ruleName" placeholder="请输入规则名称"/> />
<Field label="扣分方式" prop="subMethod" v-model="form.subMethod" type="select" :enumData="dict.subMethod" placeholder="请选择扣分方式"/> <Field
<Field label="扣分人员" prop="deductPerson" v-model="form.deductPerson" placeholder="请输入扣分人员"/> label="员工姓名"
<Field label="扣分时间" prop="deductTime" v-model="form.deductTime" type="date" /> prop="staffName"
<Field label="扣分或增加分值" prop="score" v-model="form.score" placeholder="请输入扣分或增加分值"/> v-model="form.staffName"
<Field label="核查人员" prop="checkPerson" v-model="form.checkPerson" placeholder="请输入核查人员"/> placeholder="请输入员工姓名"
<Field label="核查时间" prop="checkTime" v-model="form.checkTime" type="date" /> />
<Field label="核查说明" prop="checkDesc" v-model="form.checkDesc" type="textarea" placeholder="请输入核查说明"/> <Field
<Field label="核查结果" prop="checkResult" v-model="form.checkResult" placeholder="请输入核查结果"/> label="工号"
<Field label="处理状态" prop="checkStatus" v-model="form.checkStatus" type="select" :enumData="dict.checkStatus" placeholder="请选择处理状态"/> prop="workNum"
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> v-model="form.workNum"
placeholder="请输入工号"
/>
<Field
label="窗口编号"
prop="windowNum"
v-model="form.windowNum"
placeholder="请输入窗口编号"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
placeholder="请输入所属部门"
/>
<Field
label="所属部门名称"
prop="deptName"
v-model="form.deptName"
placeholder="请输入所属部门名称"
/>
<Field
label="办件编码"
prop="goworkCode"
v-model="form.goworkCode"
placeholder="请输入办件编码"
/>
<Field
label="办件所属部门"
prop="goworkDepts"
v-model="form.goworkDepts"
type="textarea"
placeholder="请输入办件所属部门"
/>
<Field
label="事项名称"
prop="matterlName"
v-model="form.matterlName"
type="textarea"
placeholder="请输入事项名称"
/>
<Field
label="办理时间"
prop="goworkTime"
v-model="form.goworkTime"
type="date"
/>
<Field
label="绩效规则id"
prop="ruleId"
v-model="form.ruleId"
placeholder="请输入绩效规则id"
/>
<Field
label="规则名称"
prop="ruleName"
v-model="form.ruleName"
placeholder="请输入规则名称"
/>
<Field
label="扣分方式"
prop="subMethod"
v-model="form.subMethod"
type="select"
:enumData="dict.subMethod"
placeholder="请选择扣分方式"
/>
<Field
label="扣分人员"
prop="deductPerson"
v-model="form.deductPerson"
placeholder="请输入扣分人员"
/>
<Field
label="扣分时间"
prop="deductTime"
v-model="form.deductTime"
type="date"
/>
<Field
label="扣分或增加分值"
prop="score"
v-model="form.score"
placeholder="请输入扣分或增加分值"
/>
<Field
label="核查人员"
prop="checkPerson"
v-model="form.checkPerson"
placeholder="请输入核查人员"
/>
<Field
label="核查时间"
prop="checkTime"
v-model="form.checkTime"
type="date"
/>
<Field
label="核查说明"
prop="checkDesc"
v-model="form.checkDesc"
type="textarea"
placeholder="请输入核查说明"
/>
<Field
label="核查结果"
prop="checkResult"
v-model="form.checkResult"
placeholder="请输入核查结果"
/>
<Field
label="处理状态"
prop="checkStatus"
v-model="form.checkStatus"
type="select"
:enumData="dict.checkStatus"
placeholder="请选择处理状态"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row>
</el-row> <form-buttons
@submit="submitForm"
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn /> v-if="pageInfo.type != 'view'"
</el-form> noCancelBtn
/>
</el-drawer> </el-form>
</el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "CheckGoworkRecordDetail", name: "CheckGoworkRecordDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("check/gowork/record");
created() { },
this.changePath("check/gowork/record") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "办件绩效核查信息",
// 弹出层标题 // 是否显示弹出层
title: "办件绩效核查信息", open: false,
// 是否显示弹出层 direction: "rtl",
open: false, toString: ["subMethod", "checkStatus"],
direction:"rtl", toDate: ["goworkTime", "deductTime", "checkTime"],
toString:[ // 表单校验
"subMethod", rules: {
"checkStatus", staffName: [
], { required: true, message: "请输入员工姓名", trigger: "blur" },
toDate:[ { max: 64, message: "最多只能录入64个字符", trigger: "blur" },
"goworkTime", ],
"deductTime", createTime: [{ required: true, message: "请选择创建时间" }],
"checkTime", },
], };
// 表单校验 },
rules: {
staffName: [
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="check/gowork/record/edit"; this.urls.currUrl = "check/gowork/record/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改办件绩效核查信息"; row.view == "核查"
}, ? (this.title = "办件绩效核查")
/** 新增 */ : (this.title = "修改办件绩效核查信息");
add(row) { },
this.reset() /** 新增 */
this.urls.currUrl = "check/gowork/record/add"; add(row) {
this.getData(); this.reset();
this.pageInfo.type="add" this.urls.currUrl = "check/gowork/record/add";
this.title = "新增办件绩效核查信息"; this.getData();
}, this.pageInfo.type = "add";
/** 查看*/ this.title = "新增办件绩效核查信息";
view(row) { },
this.reset() /** 查看*/
this.query = { id: row.id }; view(row) {
this.urls.currUrl ="check/gowork/record/view"; this.reset();
this.getData(); this.query = { id: row.id };
this.pageInfo.type="view" this.urls.currUrl = "check/gowork/record/view";
this.title = "办件绩效核查信息详细"; this.getData();
}, this.pageInfo.type = "view";
/**取消按钮 */ this.title = "办件绩效核查信息详细";
cancel() { },
this.open = false; /**取消按钮 */
}, cancel() {
/**获取数据后弹框 */ this.open = false;
afterRender(data) { },
this.open = true; /**获取数据后弹框 */
}, afterRender(data) {
this.open = true;
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
recordId : null, recordId: null,
staffId : null, staffId: null,
staffName : "", staffName: "",
workNum : "", workNum: "",
windowNum : "", windowNum: "",
deptId : null, deptId: null,
deptName : "", deptName: "",
goworkCode : "", goworkCode: "",
goworkDepts : "", goworkDepts: "",
matterlName : "", matterlName: "",
goworkTime : null, goworkTime: null,
ruleId : null, ruleId: null,
ruleName : "", ruleName: "",
subMethod : 1, subMethod: 1,
deductPerson : "", deductPerson: "",
deductTime : null, deductTime: null,
score : 0.00, score: 0.0,
checkPerson : "", checkPerson: "",
checkTime : null, checkTime: null,
checkDesc : "", checkDesc: "",
checkResult : "", checkResult: "",
checkStatus : 1, checkStatus: 1,
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, },
}, },
}; };
</script> </script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable notAdd notDel :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
<el-button <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px" style="margin-left: 10px"
icon="el-icon-tickets" icon="el-icon-tickets"
size="mini" size="mini"
@click="doExport" @click="doExport"
:disabled="isExport" :disabled="isExport"
>导出</el-button> >导出</el-button
</LayoutTable> >
</LayoutTable>
<!-- 办件绩效核查信息导入对话框 -->
<el-dialog <!-- 办件绩效核查信息导入对话框 -->
:title="upload.title" <el-dialog
:visible.sync="upload.open" :title="upload.title"
width="400px" :visible.sync="upload.open"
append-to-body width="400px"
> append-to-body
<el-upload >
ref="upload" <el-upload
:limit="1" ref="upload"
accept=".xlsx, .xls" :limit="1"
:headers="upload.headers" accept=".xlsx, .xls"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :headers="upload.headers"
:disabled="upload.isUploading" :action="upload.url + '?updateSupport=' + upload.updateSupport"
:on-progress="handleFileUploadProgress" :disabled="upload.isUploading"
:on-success="handleFileSuccess" :on-progress="handleFileUploadProgress"
:auto-upload="false" :on-success="handleFileSuccess"
drag :auto-upload="false"
> drag
<i class="el-icon-upload"></i> >
<div class="el-upload__text"> <i class="el-icon-upload"></i>
将文件拖到此处,或 <div class="el-upload__text">
<em>点击上传</em> 将文件拖到此处,或
</div> <em>点击上传</em>
<div class="el-upload__tip" slot="tip"> </div>
<el-checkbox <div class="el-upload__tip" slot="tip">
v-model="upload.updateSupport" <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的数据
/>是否更新已经存在的数据 <el-link
<el-link type="primary" style="font-size: 14px" @click="downloadTemplate" type="primary"
>下载模板</el-link style="font-size: 14px"
> @click="downloadTemplate"
</div> >下载模板</el-link
<div class="el-upload__tip" style="color: red" slot="tip"> >
提示:仅允许导入“xls”或“xlsx”格式文件! </div>
</div> <div class="el-upload__tip" style="color: red" slot="tip">
</el-upload> 提示:仅允许导入“xls”或“xlsx”格式文件!
<div slot="footer" class="dialog-footer"> </div>
<el-button type="primary" @click="submitFileForm">确 定</el-button> </el-upload>
<el-button @click="upload.open = false">取 消</el-button> <div slot="footer" class="dialog-footer">
</div> <el-button type="primary" @click="submitFileForm">确 定</el-button>
</el-dialog> <el-button @click="upload.open = false">取 消</el-button>
</div>
<drawer-show ref="drawerform" @ok="getData" /> </el-dialog>
</div>
<drawer-show ref="drawerform" @ok="getData" />
</div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "CheckGoworkRecordList", name: "CheckGoworkRecordList",
components: { components: {
drawerShow drawerShow,
}, },
mixins: [table], mixins: [table],
created() { created() {},
methods: {
/** 导入 */
handleImport() {
this.upload.title = "办件绩效核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/gowork/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/gowork/record/exportExcel",
{
idList: this.selection,
}, },
methods: { { type: "excel" }
/** 导入 */ )
handleImport() { .then(() => (this.isExport = false))
this.upload.title = "办件绩效核查信息导入"; .catch((error) => {
this.upload.open = true; this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
data() {
return {
// 用户导入参数
upload: {
// 是否显示弹出层(办件绩效核查信息导入)
open: false,
// 弹出层标题(办件绩效核查信息导入)
title: "导入办件绩效核查信息数据",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 上传的地址
url: "/m/check/gowork/record/importData",
},
isExport: false,
config: {
isshowTabPane: true,
search: [
{
name: "status",
type: "select",
label: "全部状态",
fuzzy: false,
},
{
name: "deptId",
type: "select",
label: "全部部门",
fuzzy: false,
},
{
name: "date",
type: "date",
label: "请选择日期",
fuzzy: false,
},
{
name: "staffName",
type: "text",
label: "请输入员工姓名搜索",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 50 },
{ type: "index", label: "序号", width: 50 },
{ label: "姓名", prop: "staffName" },
{ label: "窗口编号", prop: "windowNum" },
{ label: "所属部门", prop: "deptName" },
{ label: "办件编码", prop: "goworkCode" },
{ label: "办件所属部门", prop: "goworkDepts" },
{ label: "事项名称", prop: "matterlName" },
{
label: "办理时间",
prop: "goworkTime",
formatter: this.formatterDate,
},
{ label: "图片凭证", prop: "snapPath" },
{ label: "绩效规则", prop: "ruleName" },
{ label: "扣分方式", prop: "subMethod", formatter: this.formatter },
{
label: "扣分时间",
prop: "deductTime",
formatter: this.formatterDate,
},
{ label: "扣分人员", prop: "deductPerson" },
{ label: "扣分分值", prop: "score", formatter: this.formatter },
{
label: "处理状态",
prop: "processStatus",
formatter: this.formatter,
},
{
label: "操作",
width: 240,
formatter: (row) => {
return (
<table-buttons
noAdd
noDel
noEdit
reCheck
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
);
}, },
/** 下载模板操作 */ },
downloadTemplate() { ],
this.isExport = true; },
this.$download("/check/gowork/record/downloadTemplate", {}, { type: "excel" })
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download("/check/gowork/record/exportExcel", {
"idList": this.selection,
}, { type: "excel" }).then(() => this.isExport = false).catch(error => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
},
data() {
return {
// 用户导入参数
upload: {
// 是否显示弹出层(办件绩效核查信息导入)
open: false,
// 弹出层标题(办件绩效核查信息导入)
title: "导入办件绩效核查信息数据",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 上传的地址
url: "/m/check/gowork/record/importData",
},
isExport: false,
config: {
isshowTabPane:true,
search: [
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "员工姓名", prop: "staffName"},
{label: "工号", prop: "workNum"},
{label: "窗口编号", prop: "windowNum"},
{label: "所属部门", prop: "deptId", formatter: this.formatter},
{label: "所属部门名称", prop: "deptName"},
{label: "办件编码", prop: "goworkCode"},
{label: "办件所属部门", prop: "goworkDepts"},
{label: "事项名称", prop: "matterlName"},
{label: "办理时间", prop: "goworkTime", formatter: this.formatterDate},
{label: "绩效规则id", prop: "ruleId", formatter: this.formatter},
{label: "规则名称", prop: "ruleName"},
{label: "扣分方式", prop: "subMethod",formatter: this.formatter},
{label: "扣分人员", prop: "deductPerson"},
{label: "扣分时间", prop: "deductTime", formatter: this.formatterDate},
{label: "扣分或增加分值", prop: "score", formatter: this.formatter},
{label: "核查人员", prop: "checkPerson"},
{label: "核查时间", prop: "checkTime", formatter: this.formatterDate},
{label: "核查说明", prop: "checkDesc"},
{label: "核查结果", prop: "checkResult"},
{label: "处理状态", prop: "checkStatus",formatter: this.formatter},
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
{
label: "操作",
width: 240,
formatter: row => {
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
}
}
]
}
};
}
}; };
},
};
</script> </script>
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> >
<el-row> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<Field label="记录ID" prop="recordId" v-model="form.recordId" placeholder="请输入记录ID"/> <el-row>
<Field label="员工ID" prop="staffId" v-model="form.staffId" placeholder="请输入员工ID"/> <Field
<Field label="员工姓名" prop="staffName" v-model="form.staffName" placeholder="请输入员工姓名"/> label="记录ID"
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/> prop="recordId"
<Field label="所属部门" prop="deptId" v-model="form.deptId" placeholder="请输入所属部门"/> v-model="form.recordId"
<Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/> placeholder="请输入记录ID"
<Field label="窗口编号" prop="windowNum" v-model="form.windowNum" placeholder="请输入窗口编号"/> />
<Field label="违规类型" prop="irregularOtherType" v-model="form.irregularOtherType" type="select" :enumData="dict.irregularOtherType" placeholder="请选择违规类型"/> <Field
<Field label="发生时间" prop="happenTime" v-model="form.happenTime" type="date" /> label="员工ID"
<Field label="持续时间,秒" prop="duration" v-model="form.duration" placeholder="请输入持续时间,秒"/> prop="staffId"
<Field label="绩效规则id" prop="ruleId" v-model="form.ruleId" placeholder="请输入绩效规则id"/> v-model="form.staffId"
<Field label="规则名称" prop="ruleName" v-model="form.ruleName" placeholder="请输入规则名称"/> placeholder="请输入员工ID"
<Field label="评分标准" prop="ruleDesc" v-model="form.ruleDesc" type="textarea" placeholder="请输入评分标准"/> />
<Field label="扣分方式" prop="subMethod" v-model="form.subMethod" type="select" :enumData="dict.subMethod" placeholder="请选择扣分方式"/> <Field
<Field label="扣分人员" prop="deductPerson" v-model="form.deductPerson" placeholder="请输入扣分人员"/> label="员工姓名"
<Field label="扣分时间" prop="deductTime" v-model="form.deductTime" type="date" /> prop="staffName"
<Field label="扣分或增加分值" prop="score" v-model="form.score" placeholder="请输入扣分或增加分值"/> v-model="form.staffName"
<Field label="核查人员" prop="checkPerson" v-model="form.checkPerson" placeholder="请输入核查人员"/> placeholder="请输入员工姓名"
<Field label="核查时间" prop="checkTime" v-model="form.checkTime" type="date" /> />
<Field label="核查说明" prop="checkDesc" v-model="form.checkDesc" type="textarea" placeholder="请输入核查说明"/> <Field
<Field label="核查结果" prop="checkResult" v-model="form.checkResult" placeholder="请输入核查结果"/> label="工号"
<Field label="处理状态" prop="checkStatus" v-model="form.checkStatus" type="select" :enumData="dict.checkStatus" placeholder="请选择处理状态"/> prop="workNum"
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> v-model="form.workNum"
placeholder="请输入工号"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
placeholder="请输入所属部门"
/>
<Field
label="所属部门名称"
prop="deptName"
v-model="form.deptName"
placeholder="请输入所属部门名称"
/>
<Field
label="窗口编号"
prop="windowNum"
v-model="form.windowNum"
placeholder="请输入窗口编号"
/>
<Field
label="违规类型"
prop="irregularOtherType"
v-model="form.irregularOtherType"
type="select"
:enumData="dict.irregularOtherType"
placeholder="请选择违规类型"
/>
<Field
label="发生时间"
prop="happenTime"
v-model="form.happenTime"
type="date"
/>
<Field
label="持续时间,秒"
prop="duration"
v-model="form.duration"
placeholder="请输入持续时间,秒"
/>
<Field
label="绩效规则id"
prop="ruleId"
v-model="form.ruleId"
placeholder="请输入绩效规则id"
/>
<Field
label="规则名称"
prop="ruleName"
v-model="form.ruleName"
placeholder="请输入规则名称"
/>
<Field
label="评分标准"
prop="ruleDesc"
v-model="form.ruleDesc"
type="textarea"
placeholder="请输入评分标准"
/>
<Field
label="扣分方式"
prop="subMethod"
v-model="form.subMethod"
type="select"
:enumData="dict.subMethod"
placeholder="请选择扣分方式"
/>
<Field
label="扣分人员"
prop="deductPerson"
v-model="form.deductPerson"
placeholder="请输入扣分人员"
/>
<Field
label="扣分时间"
prop="deductTime"
v-model="form.deductTime"
type="date"
/>
<Field
label="扣分或增加分值"
prop="score"
v-model="form.score"
placeholder="请输入扣分或增加分值"
/>
<Field
label="核查人员"
prop="checkPerson"
v-model="form.checkPerson"
placeholder="请输入核查人员"
/>
<Field
label="核查时间"
prop="checkTime"
v-model="form.checkTime"
type="date"
/>
<Field
label="核查说明"
prop="checkDesc"
v-model="form.checkDesc"
type="textarea"
placeholder="请输入核查说明"
/>
<Field
label="核查结果"
prop="checkResult"
v-model="form.checkResult"
placeholder="请输入核查结果"
/>
<Field
label="处理状态"
prop="checkStatus"
v-model="form.checkStatus"
type="select"
:enumData="dict.checkStatus"
placeholder="请选择处理状态"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row>
</el-row> <form-buttons
@submit="submitForm"
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn /> v-if="pageInfo.type != 'view'"
</el-form> noCancelBtn
/>
</el-drawer> </el-form>
</el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "CheckOtherRecordDetail", name: "CheckOtherRecordDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("check/other/record");
created() { },
this.changePath("check/other/record") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "其它绩效核查信息",
// 弹出层标题 // 是否显示弹出层
title: "其它绩效核查信息", open: false,
// 是否显示弹出层 direction: "rtl",
open: false, toString: ["irregularOtherType", "subMethod", "checkStatus"],
direction:"rtl", toDate: ["happenTime", "deductTime", "checkTime"],
toString:[ // 表单校验
"irregularOtherType", rules: {
"subMethod", staffName: [
"checkStatus", { required: true, message: "请输入员工姓名", trigger: "blur" },
], { max: 64, message: "最多只能录入64个字符", trigger: "blur" },
toDate:[ ],
"happenTime", createTime: [{ required: true, message: "请选择创建时间" }],
"deductTime", },
"checkTime", };
], },
// 表单校验
rules: {
staffName: [
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="check/other/record/edit"; this.urls.currUrl = "check/other/record/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改其它绩效核查信息"; row.view == "核查"
}, ? (this.title = "其它绩效核查")
/** 新增 */ : (this.title = "修改其它绩效核查信息");
add(row) { },
this.reset() /** 新增 */
this.urls.currUrl = "check/other/record/add"; add(row) {
this.getData(); this.reset();
this.pageInfo.type="add" this.urls.currUrl = "check/other/record/add";
this.title = "新增其它绩效核查信息"; this.getData();
}, this.pageInfo.type = "add";
/** 查看*/ this.title = "新增其它绩效核查信息";
view(row) { },
this.reset() /** 查看*/
this.query = { id: row.id }; view(row) {
this.urls.currUrl ="check/other/record/view"; this.reset();
this.getData(); this.query = { id: row.id };
this.pageInfo.type="view" this.urls.currUrl = "check/other/record/view";
this.title = "其它绩效核查信息详细"; this.getData();
}, this.pageInfo.type = "view";
/**取消按钮 */ this.title = "其它绩效核查信息详细";
cancel() { },
this.open = false; /**取消按钮 */
}, cancel() {
/**获取数据后弹框 */ this.open = false;
afterRender(data) { },
this.open = true; /**获取数据后弹框 */
}, afterRender(data) {
this.open = true;
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
recordId : null, recordId: null,
staffId : null, staffId: null,
staffName : "", staffName: "",
workNum : "", workNum: "",
deptId : null, deptId: null,
deptName : "", deptName: "",
windowNum : "", windowNum: "",
irregularOtherType : null, irregularOtherType: null,
happenTime : null, happenTime: null,
duration : 0, duration: 0,
ruleId : null, ruleId: null,
ruleName : "", ruleName: "",
ruleDesc : "", ruleDesc: "",
subMethod : 1, subMethod: 1,
deductPerson : "", deductPerson: "",
deductTime : null, deductTime: null,
score : 0.00, score: 0.0,
checkPerson : "", checkPerson: "",
checkTime : null, checkTime: null,
checkDesc : "", checkDesc: "",
checkResult : "", checkResult: "",
checkStatus : 1, checkStatus: 1,
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, },
}, },
}; };
</script> </script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable notAdd notDel :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
<el-button
<el-button slot="table-head-left2"
slot="table-head-left2" style="margin-left: 10px"
style="margin-left: 10px" icon="el-icon-tickets"
icon="el-icon-tickets" size="mini"
size="mini" @click="doExport"
@click="doExport" :disabled="isExport"
:disabled="isExport" >导出</el-button
>导出</el-button> >
</LayoutTable> </LayoutTable>
<!-- 其它绩效核查信息导入对话框 --> <!-- 其它绩效核查信息导入对话框 -->
<el-dialog <el-dialog
:title="upload.title" :title="upload.title"
:visible.sync="upload.open" :visible.sync="upload.open"
width="400px" width="400px"
append-to-body append-to-body
> >
<el-upload <el-upload
ref="upload" ref="upload"
:limit="1" :limit="1"
accept=".xlsx, .xls" accept=".xlsx, .xls"
:headers="upload.headers" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess" :on-success="handleFileSuccess"
:auto-upload="false" :auto-upload="false"
drag drag
> >
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text"> <div class="el-upload__text">
将文件拖到此处,或 将文件拖到此处,或
<em>点击上传</em> <em>点击上传</em>
</div> </div>
<div class="el-upload__tip" slot="tip"> <div class="el-upload__tip" slot="tip">
<el-checkbox <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的数据
v-model="upload.updateSupport" <el-link
/>是否更新已经存在的数据 type="primary"
<el-link type="primary" style="font-size: 14px" @click="downloadTemplate" style="font-size: 14px"
>下载模板</el-link @click="downloadTemplate"
> >下载模板</el-link
</div> >
<div class="el-upload__tip" style="color: red" slot="tip"> </div>
提示:仅允许导入“xls”或“xlsx”格式文件! <div class="el-upload__tip" style="color: red" slot="tip">
</div> 提示:仅允许导入“xls”或“xlsx”格式文件!
</el-upload> </div>
<div slot="footer" class="dialog-footer"> </el-upload>
<el-button type="primary" @click="submitFileForm">确 定</el-button> <div slot="footer" class="dialog-footer">
<el-button @click="upload.open = false">取 消</el-button> <el-button type="primary" @click="submitFileForm">确 定</el-button>
</div> <el-button @click="upload.open = false">取 消</el-button>
</el-dialog> </div>
</el-dialog>
<drawer-show ref="drawerform" @ok="getData" />
</div> <drawer-show ref="drawerform" @ok="getData" />
</div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "CheckOtherRecordList", name: "CheckOtherRecordList",
components: { components: {
drawerShow drawerShow,
}, },
mixins: [table], mixins: [table],
created() { created() {},
methods: {
/** 导入 */
handleImport() {
this.upload.title = "其它绩效核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/other/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/other/record/exportExcel",
{
idList: this.selection,
}, },
methods: { { type: "excel" }
/** 导入 */ )
handleImport() { .then(() => (this.isExport = false))
this.upload.title = "其它绩效核查信息导入"; .catch((error) => {
this.upload.open = true; this.isExport = false;
}, this.$message.error(error.message);
/** 下载模板操作 */ });
downloadTemplate() { },
this.isExport = true; /** 重写新增方法 */
this.$download("/check/other/record/downloadTemplate", {}, { type: "excel" }) toAdd(row) {
.then(() => (this.isExport = false)) this.$refs.drawerform.add(row);
.catch((error) => { },
this.isExport = false; /** 重写编辑方法 */
this.$message.error(error.message); toEdit(row) {
}); row.view = "核查";
}, this.$refs.drawerform.edit(row);
/** 文件上传中处理 */ },
handleFileUploadProgress(event, file, fileList) { /** 重写查看方法 */
this.upload.isUploading = true; toView(row) {
}, row.view = "查看";
/** 文件上传成功处理 */ this.$refs.drawerform.view(row);
handleFileSuccess(response, file, fileList) { },
this.upload.open = false; },
this.upload.isUploading = false; data() {
this.$refs.upload.clearFiles(); return {
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true }); // 用户导入参数
this.getData(); upload: {
}, // 是否显示弹出层(其它绩效核查信息导入)
/** 提交上传文件 */ open: false,
submitFileForm() { // 弹出层标题(其它绩效核查信息导入)
this.$refs.upload.submit(); title: "导入其它绩效核查信息数据",
}, // 是否禁用上传
/** 导出Excel */ isUploading: false,
doExport() { // 是否更新已经存在的数据
this.isExport = true; updateSupport: 0,
this.$download("/check/other/record/exportExcel", { // 上传的地址
"idList": this.selection, url: "/m/check/other/record/importData",
}, { type: "excel" }).then(() => this.isExport = false).catch(error => { },
this.isExport = false; isExport: false,
this.$message.error(error.message); config: {
}); isshowTabPane: true,
}, search: [
/** 重写新增方法 */ {
toAdd(row) { name: "status",
this.$refs.drawerform.add(row); type: "select",
}, label: "全部状态",
/** 重写编辑方法 */ fuzzy: false,
toEdit(row) { },
this.$refs.drawerform.edit(row); {
}, name: "deptId",
/** 重写查看方法 */ type: "select",
toView(row) { label: "全部部门",
this.$refs.drawerform.view(row); fuzzy: false,
}, },
{
name: "date",
type: "date",
label: "请选择日期",
fuzzy: false,
},
{
name: "staffName",
type: "text",
label: "请输入员工姓名搜索",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 60 },
{ type: "index", label: "序号", width: 50 },
}, { label: "姓名", prop: "staffName" },
data() {
return { { label: "窗口编号", prop: "windowNum" },
// 用户导入参数
upload: { { label: "所属部门", prop: "deptName" },
// 是否显示弹出层(其它绩效核查信息导入)
open: false, {
// 弹出层标题(其它绩效核查信息导入) label: "违规类型",
title: "导入其它绩效核查信息数据", prop: "irregularOtherType",
// 是否禁用上传 formatter: this.formatter,
isUploading: false, },
// 是否更新已经存在的数据
updateSupport: 0, {
// 上传的地址 label: "发生时间",
url: "/m/check/other/record/importData", prop: "happenTime",
}, formatter: this.formatterDate,
isExport: false, },
config: {
isshowTabPane:true, { label: "评分标准", prop: "ruleDesc" },
search: [
], // {
columns: [ // label: "持续时间,秒",
{type: "selection", width: 60}, // prop: "duration",
{type: "index",label: "序号",width: 50}, // formatter: this.formatter,
// },
{label: "员工姓名", prop: "staffName"},
// { label: "绩效规则id", prop: "ruleId", formatter: this.formatter },
{label: "发生时间", prop: "happenTime", formatter: this.formatterDate}, { label: "图片凭证", prop: "snapPath" },
{label: "扣分方式", prop: "subMethod",formatter: this.formatter}, { label: "绩效规则", prop: "ruleName" },
{label: "扣分时间", prop: "deductTime", formatter: this.formatterDate}, { label: "扣分方式", prop: "subMethod", formatter: this.formatter },
{label: "扣分或增加分值", prop: "score", formatter: this.formatter}, {
label: "扣分时间",
{label: "核查时间", prop: "checkTime", formatter: this.formatterDate}, prop: "deductTime",
formatter: this.formatterDate,
{label: "处理状态", prop: "checkStatus",formatter: this.formatter}, },
{label: "创建用户", prop: "createUserId", formatter: this.formatter}, { label: "扣分人员", prop: "deductPerson" },
{
label: "操作", { label: "扣分分值", prop: "score", formatter: this.formatter },
width: 240,
formatter: row => { {
return ( label: "处理状态",
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> prop: "processStatus",
); formatter: this.formatter,
} },
}
] {
} label: "操作",
}; width: 240,
} formatter: (row) => {
return (
<table-buttons
noAdd
noDel
noEdit
reCheck
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
);
},
},
],
},
}; };
},
};
</script> </script>
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> >
<el-row> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<Field label="记录ID" prop="recordId" v-model="form.recordId" placeholder="请输入记录ID"/> <el-row>
<Field label="员工ID" prop="staffId" v-model="form.staffId" placeholder="请输入员工ID"/> <Field
<Field label="员工姓名" prop="staffName" v-model="form.staffName" placeholder="请输入员工姓名"/> label="记录ID"
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/> prop="recordId"
<Field label="窗口编号" prop="windowNum" v-model="form.windowNum" placeholder="请输入窗口编号"/> v-model="form.recordId"
<Field label="所属部门" prop="deptId" v-model="form.deptId" placeholder="请输入所属部门"/> placeholder="请输入记录ID"
<Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/> />
<Field label="评价结果" prop="reviewResult" v-model="form.reviewResult" type="select" :enumData="dict.reviewResult" placeholder="请选择评价结果"/> <Field
<Field label="评价时间" prop="reviewTime" v-model="form.reviewTime" type="date" /> label="员工ID"
<Field label="评价来源" prop="reviewSource" v-model="form.reviewSource" type="select" :enumData="dict.reviewSource" placeholder="请选择评价来源"/> prop="staffId"
<Field label="评价设备" prop="reviewDevice" v-model="form.reviewDevice" placeholder="请输入评价设备"/> v-model="form.staffId"
<Field label="绩效规则id" prop="ruleId" v-model="form.ruleId" placeholder="请输入绩效规则id"/> placeholder="请输入员工ID"
<Field label="规则名称" prop="ruleName" v-model="form.ruleName" placeholder="请输入规则名称"/> />
<Field label="扣分方式" prop="subMethod" v-model="form.subMethod" type="select" :enumData="dict.subMethod" placeholder="请选择扣分方式"/> <Field
<Field label="扣分人员" prop="deductPerson" v-model="form.deductPerson" placeholder="请输入扣分人员"/> label="员工姓名"
<Field label="扣分时间" prop="deductTime" v-model="form.deductTime" type="date" /> prop="staffName"
<Field label="扣分或增加分值" prop="score" v-model="form.score" placeholder="请输入扣分或增加分值"/> v-model="form.staffName"
<Field label="核查人员" prop="checkPerson" v-model="form.checkPerson" placeholder="请输入核查人员"/> placeholder="请输入员工姓名"
<Field label="核查时间" prop="checkTime" v-model="form.checkTime" type="date" /> />
<Field label="核查说明" prop="checkDesc" v-model="form.checkDesc" type="textarea" placeholder="请输入核查说明"/> <Field
<Field label="核查结果" prop="checkResult" v-model="form.checkResult" placeholder="请输入核查结果"/> label="工号"
<Field label="处理状态" prop="checkStatus" v-model="form.checkStatus" type="select" :enumData="dict.checkStatus" placeholder="请选择处理状态"/> prop="workNum"
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> v-model="form.workNum"
placeholder="请输入工号"
/>
<Field
label="窗口编号"
prop="windowNum"
v-model="form.windowNum"
placeholder="请输入窗口编号"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
placeholder="请输入所属部门"
/>
<Field
label="所属部门名称"
prop="deptName"
v-model="form.deptName"
placeholder="请输入所属部门名称"
/>
<Field
label="评价结果"
prop="reviewResult"
v-model="form.reviewResult"
type="select"
:enumData="dict.reviewResult"
placeholder="请选择评价结果"
/>
<Field
label="评价时间"
prop="reviewTime"
v-model="form.reviewTime"
type="date"
/>
<Field
label="评价来源"
prop="reviewSource"
v-model="form.reviewSource"
type="select"
:enumData="dict.reviewSource"
placeholder="请选择评价来源"
/>
<Field
label="评价设备"
prop="reviewDevice"
v-model="form.reviewDevice"
placeholder="请输入评价设备"
/>
<Field
label="绩效规则id"
prop="ruleId"
v-model="form.ruleId"
placeholder="请输入绩效规则id"
/>
<Field
label="规则名称"
prop="ruleName"
v-model="form.ruleName"
placeholder="请输入规则名称"
/>
<Field
label="扣分方式"
prop="subMethod"
v-model="form.subMethod"
type="select"
:enumData="dict.subMethod"
placeholder="请选择扣分方式"
/>
<Field
label="扣分人员"
prop="deductPerson"
v-model="form.deductPerson"
placeholder="请输入扣分人员"
/>
<Field
label="扣分时间"
prop="deductTime"
v-model="form.deductTime"
type="date"
/>
<Field
label="扣分或增加分值"
prop="score"
v-model="form.score"
placeholder="请输入扣分或增加分值"
/>
<Field
label="核查人员"
prop="checkPerson"
v-model="form.checkPerson"
placeholder="请输入核查人员"
/>
<Field
label="核查时间"
prop="checkTime"
v-model="form.checkTime"
type="date"
/>
<Field
label="核查说明"
prop="checkDesc"
v-model="form.checkDesc"
type="textarea"
placeholder="请输入核查说明"
/>
<Field
label="核查结果"
prop="checkResult"
v-model="form.checkResult"
placeholder="请输入核查结果"
/>
<Field
label="处理状态"
prop="checkStatus"
v-model="form.checkStatus"
type="select"
:enumData="dict.checkStatus"
placeholder="请选择处理状态"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row>
</el-row> <form-buttons
@submit="submitForm"
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn /> v-if="pageInfo.type != 'view'"
</el-form> noCancelBtn
/>
</el-drawer> </el-form>
</el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "CheckReviewRecordDetail", name: "CheckReviewRecordDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("check/review/record");
created() { },
this.changePath("check/review/record") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "评价差评绩效核查信息",
// 弹出层标题 // 是否显示弹出层
title: "评价差评绩效核查信息", open: false,
// 是否显示弹出层 direction: "rtl",
open: false, toString: ["reviewResult", "subMethod", "checkStatus"],
direction:"rtl", toDate: ["reviewTime", "deductTime", "checkTime"],
toString:[ // 表单校验
"reviewResult", rules: {
"subMethod", staffName: [
"checkStatus", { required: true, message: "请输入员工姓名", trigger: "blur" },
], { max: 64, message: "最多只能录入64个字符", trigger: "blur" },
toDate:[ ],
"reviewTime", createTime: [{ required: true, message: "请选择创建时间" }],
"deductTime", },
"checkTime", };
], },
// 表单校验
rules: {
staffName: [
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="check/review/record/edit"; this.urls.currUrl = "check/review/record/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改评价差评绩效核查信息"; row.view == "核查"
}, ? (this.title = "评价差评绩效核查")
/** 新增 */ : (this.title = "修改评价差评绩效核查信息");
add(row) { },
this.reset() /** 新增 */
this.urls.currUrl = "check/review/record/add"; add(row) {
this.getData(); this.reset();
this.pageInfo.type="add" this.urls.currUrl = "check/review/record/add";
this.title = "新增评价差评绩效核查信息"; this.getData();
}, this.pageInfo.type = "add";
/** 查看*/ this.title = "新增评价差评绩效核查信息";
view(row) { },
this.reset() /** 查看*/
this.query = { id: row.id }; view(row) {
this.urls.currUrl ="check/review/record/view"; this.reset();
this.getData(); this.query = { id: row.id };
this.pageInfo.type="view" this.urls.currUrl = "check/review/record/view";
this.title = "评价差评绩效核查信息详细"; this.getData();
}, this.pageInfo.type = "view";
/**取消按钮 */ this.title = "评价差评绩效核查信息详细";
cancel() { },
this.open = false; /**取消按钮 */
}, cancel() {
/**获取数据后弹框 */ this.open = false;
afterRender(data) { },
this.open = true; /**获取数据后弹框 */
}, afterRender(data) {
this.open = true;
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
recordId : null, recordId: null,
staffId : null, staffId: null,
staffName : "", staffName: "",
workNum : "", workNum: "",
windowNum : "", windowNum: "",
deptId : null, deptId: null,
deptName : "", deptName: "",
reviewResult : null, reviewResult: null,
reviewTime : null, reviewTime: null,
reviewSource : "", reviewSource: "",
reviewDevice : "", reviewDevice: "",
ruleId : null, ruleId: null,
ruleName : "", ruleName: "",
subMethod : 1, subMethod: 1,
deductPerson : "", deductPerson: "",
deductTime : null, deductTime: null,
score : 0.00, score: 0.0,
checkPerson : "", checkPerson: "",
checkTime : null, checkTime: null,
checkDesc : "", checkDesc: "",
checkResult : "", checkResult: "",
checkStatus : 1, checkStatus: 1,
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, },
}, },
}; };
</script> </script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable notAdd notDel :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
<el-button
<el-button slot="table-head-left2"
slot="table-head-left2" style="margin-left: 10px"
style="margin-left: 10px" icon="el-icon-tickets"
icon="el-icon-tickets" size="mini"
size="mini" @click="doExport"
@click="doExport" :disabled="isExport"
:disabled="isExport" >导出</el-button
>导出</el-button> >
</LayoutTable> </LayoutTable>
<!-- 评价差评绩效核查信息导入对话框 --> <!-- 评价差评绩效核查信息导入对话框 -->
<el-dialog <el-dialog
:title="upload.title" :title="upload.title"
:visible.sync="upload.open" :visible.sync="upload.open"
width="400px" width="400px"
append-to-body append-to-body
> >
<el-upload <el-upload
ref="upload" ref="upload"
:limit="1" :limit="1"
accept=".xlsx, .xls" accept=".xlsx, .xls"
:headers="upload.headers" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess" :on-success="handleFileSuccess"
:auto-upload="false" :auto-upload="false"
drag drag
> >
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text"> <div class="el-upload__text">
将文件拖到此处,或 将文件拖到此处,或
<em>点击上传</em> <em>点击上传</em>
</div> </div>
<div class="el-upload__tip" slot="tip"> <div class="el-upload__tip" slot="tip">
<el-checkbox <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的数据
v-model="upload.updateSupport" <el-link
/>是否更新已经存在的数据 type="primary"
<el-link type="primary" style="font-size: 14px" @click="downloadTemplate" style="font-size: 14px"
>下载模板</el-link @click="downloadTemplate"
> >下载模板</el-link
</div> >
<div class="el-upload__tip" style="color: red" slot="tip"> </div>
提示:仅允许导入“xls”或“xlsx”格式文件! <div class="el-upload__tip" style="color: red" slot="tip">
</div> 提示:仅允许导入“xls”或“xlsx”格式文件!
</el-upload> </div>
<div slot="footer" class="dialog-footer"> </el-upload>
<el-button type="primary" @click="submitFileForm">确 定</el-button> <div slot="footer" class="dialog-footer">
<el-button @click="upload.open = false">取 消</el-button> <el-button type="primary" @click="submitFileForm">确 定</el-button>
</div> <el-button @click="upload.open = false">取 消</el-button>
</el-dialog> </div>
</el-dialog>
<drawer-show ref="drawerform" @ok="getData" />
</div> <drawer-show ref="drawerform" @ok="getData" />
</div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "CheckReviewRecordList", name: "CheckReviewRecordList",
components: { components: {
drawerShow drawerShow,
}, },
mixins: [table], mixins: [table],
created() { created() {},
}, methods: {
methods: { /** 导入 */
/** 导入 */ handleImport() {
handleImport() { this.upload.title = "评价差评绩效核查信息导入";
this.upload.title = "评价差评绩效核查信息导入"; this.upload.open = true;
this.upload.open = true; },
}, /** 下载模板操作 */
/** 下载模板操作 */ downloadTemplate() {
downloadTemplate() { this.isExport = true;
this.isExport = true; this.$download(
this.$download("/check/review/record/downloadTemplate", {}, { type: "excel" }) "/check/review/record/downloadTemplate",
.then(() => (this.isExport = false)) {},
.catch((error) => { { type: "excel" }
this.isExport = false; )
this.$message.error(error.message); .then(() => (this.isExport = false))
}); .catch((error) => {
}, this.isExport = false;
/** 文件上传中处理 */ this.$message.error(error.message);
handleFileUploadProgress(event, file, fileList) { });
this.upload.isUploading = true; },
}, /** 文件上传中处理 */
/** 文件上传成功处理 */ handleFileUploadProgress(event, file, fileList) {
handleFileSuccess(response, file, fileList) { this.upload.isUploading = true;
this.upload.open = false; },
this.upload.isUploading = false; /** 文件上传成功处理 */
this.$refs.upload.clearFiles(); handleFileSuccess(response, file, fileList) {
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true }); this.upload.open = false;
this.getData(); this.upload.isUploading = false;
}, this.$refs.upload.clearFiles();
/** 提交上传文件 */ this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
submitFileForm() { this.getData();
this.$refs.upload.submit(); },
}, /** 提交上传文件 */
/** 导出Excel */ submitFileForm() {
doExport() { this.$refs.upload.submit();
this.isExport = true; },
this.$download("/check/review/record/exportExcel", { /** 导出Excel */
"idList": this.selection, doExport() {
}, { type: "excel" }).then(() => this.isExport = false).catch(error => { this.isExport = true;
this.isExport = false; this.$download(
this.$message.error(error.message); "/check/review/record/exportExcel",
}); {
}, idList: this.selection,
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
}, },
data() { { type: "excel" }
return { )
// 用户导入参数 .then(() => (this.isExport = false))
upload: { .catch((error) => {
// 是否显示弹出层(评价差评绩效核查信息导入) this.isExport = false;
open: false, this.$message.error(error.message);
// 弹出层标题(评价差评绩效核查信息导入) });
title: "导入评价差评绩效核查信息数据", },
// 是否禁用上传 /** 重写新增方法 */
isUploading: false, toAdd(row) {
// 是否更新已经存在的数据 this.$refs.drawerform.add(row);
updateSupport: 0, },
// 上传的地址 /** 重写编辑方法 */
url: "/m/check/review/record/importData", toEdit(row) {
}, row.view = "核查";
isExport: false, this.$refs.drawerform.edit(row);
config: { },
isshowTabPane:true, /** 重写查看方法 */
search: [ toView(row) {
], row.view = "查看";
columns: [ this.$refs.drawerform.view(row);
{type: "selection", width: 60}, },
{type: "index",label: "序号",width: 50}, },
data() {
{label: "员工姓名", prop: "staffName"}, return {
// 用户导入参数
{label: "工号", prop: "workNum"}, upload: {
// 是否显示弹出层(评价差评绩效核查信息导入)
open: false,
// 弹出层标题(评价差评绩效核查信息导入)
title: "导入评价差评绩效核查信息数据",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 上传的地址
url: "/m/check/review/record/importData",
},
isExport: false,
config: {
isshowTabPane: true,
search: [
{
name: "status",
type: "select",
label: "全部状态",
fuzzy: false,
},
{
name: "deptId",
type: "select",
label: "全部部门",
fuzzy: false,
},
{
name: "source",
type: "select",
label: "全部来源",
fuzzy: false,
},
{
name: "date",
type: "date",
label: "请选择日期",
fuzzy: false,
},
{
name: "staffName",
type: "text",
label: "请输入员工姓名搜索",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 50 },
{ type: "index", label: "序号", width: 50 },
{label: "窗口编号", prop: "windowNum"}, { label: "姓名", prop: "staffName" },
{label: "所属部门", prop: "deptId", formatter: this.formatter}, { label: "窗口编号", prop: "windowNum" },
{label: "所属部门名称", prop: "deptName"}, { label: "所属部门", prop: "deptName" },
{label: "评价结果", prop: "reviewResult",formatter: this.formatter}, {
label: "评价结果",
prop: "reviewResult",
formatter: this.formatter,
},
{label: "评价时间", prop: "reviewTime", formatter: this.formatterDate}, { label: "评价来源", prop: "reviewSource" },
{label: "评价来源", prop: "reviewSource"}, { label: "评价设备", prop: "reviewDevice" },
{label: "评价设备", prop: "reviewDevice"}, {
label: "评价时间",
prop: "reviewTime",
formatter: this.formatterDate,
},
{label: "绩效规则id", prop: "ruleId", formatter: this.formatter}, { label: "图片凭证", prop: "snapPath" },
{label: "规则名称", prop: "ruleName"}, { label: "绩效规则", prop: "ruleNme" },
{label: "扣分方式", prop: "subMethod",formatter: this.formatter}, { label: "扣分方式", prop: "subMethod", formatter: this.formatter },
{label: "扣分人员", prop: "deductPerson"}, {
label: "扣分时间",
prop: "deductTime",
formatter: this.formatterDate,
},
{label: "扣分时间", prop: "deductTime", formatter: this.formatterDate}, { label: "扣分人员", prop: "deductPerson" },
{label: "扣分或增加分值", prop: "score", formatter: this.formatter}, { label: "扣分分值", prop: "score", formatter: this.formatter },
{label: "核查人员", prop: "checkPerson"}, {
label: "处理状态",
prop: "processStatus",
formatter: this.formatter,
},
{label: "核查时间", prop: "checkTime", formatter: this.formatterDate}, {
label: "操作",
{label: "核查说明", prop: "checkDesc"}, width: 200,
formatter: (row) => {
{label: "核查结果", prop: "checkResult"}, return (
<table-buttons
{label: "处理状态", prop: "checkStatus",formatter: this.formatter}, noAdd
noDel
{label: "创建用户", prop: "createUserId", formatter: this.formatter}, noEdit
{ reCheck
label: "操作", row={row}
width: 240, onEdit={this.toEdit}
formatter: row => { onView={this.toView}
return ( onDel={this.toDel}
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> />
); );
} },
} },
] ],
} },
};
}
}; };
},
};
</script> </script>
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
{ {
label: "处理状态", label: "处理状态",
prop: "processStatus", prop: "checkStatus",
formatter: this.formatter, formatter: this.formatter,
}, },
......
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> >
<el-row> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<Field label="员工ID" prop="staffId" v-model="form.staffId" placeholder="请输入员工ID"/> <el-row>
<Field label="员工姓名" prop="staffName" v-model="form.staffName" placeholder="请输入员工姓名"/> <el-col :span="22">
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/> <el-form-item label="姓名:">
<Field label="窗口编号" prop="windowNum" v-model="form.windowNum" placeholder="请输入窗口编号"/> <el-select v-model="form.staffId" style="width: 100%;">
<Field label="所属部门" prop="deptId" v-model="form.deptId" placeholder="请输入所属部门"/> <el-option
<Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/> v-for="item in staffArr"
<Field label="投诉标题" prop="complainTitle" v-model="form.complainTitle" placeholder="请输入投诉标题"/> :key="item.value"
<Field label="投诉内容"><editor v-model="form.complainContent" :min-height="256"/></Field> :label="item.label"
<Field label="投诉人真实姓名" prop="complainRealName" v-model="form.complainRealName" placeholder="请输入投诉人真实姓名"/> :value="item.value"
<Field label="联系电话" prop="contact" v-model="form.contact" placeholder="请输入联系电话"/> >
<Field label="投诉时间" prop="complainTime" v-model="form.complainTime" type="date" /> </el-option
<Field label="投诉来源" prop="complainSource" v-model="form.complainSource" placeholder="请输入投诉来源"/> ></el-select>
<Field label="投诉设备" prop="complainDevice" v-model="form.complainDevice" placeholder="请输入投诉设备"/> </el-form-item>
<Field label="绩效规则id" prop="ruleId" v-model="form.ruleId" placeholder="请输入绩效规则id"/> </el-col>
<Field label="规则名称" prop="ruleName" v-model="form.ruleName" placeholder="请输入规则名称"/> </el-row>
<Field label="扣分方式" prop="subMethod" v-model="form.subMethod" type="select" :enumData="dict.subMethod" placeholder="请选择扣分方式"/> <el-row>
<Field label="扣分人员" prop="deductPerson" v-model="form.deductPerson" placeholder="请输入扣分人员"/> <el-col :span="22">
<Field label="扣分时间" prop="deductTime" v-model="form.deductTime" type="date" /> <el-form-item label="所属部门:">
<Field label="扣分或增加分值" prop="score" v-model="form.score" placeholder="请输入扣分或增加分值"/> <el-select v-model="form.deptId" style="width: 100%;">
<Field label="处理状态" prop="processStatus" v-model="form.processStatus" type="select" :enumData="dict.processStatus" placeholder="请选择处理状态"/> <el-option
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> v-for="item in deptArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="窗口编号:">
<el-input
v-model="form.windowNum"
placeholder="请输入窗口编号"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="投诉来源:">
<el-select
v-model="form.deptId"
style="width: 100%;"
placeholder="请选择投诉来源"
>
<el-option
v-for="item in deptArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="投诉设备:">
<el-input
v-model="form.windowNum"
placeholder="请输入投诉设备"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="投诉标题:">
<el-input
v-model="form.windowNum"
placeholder="请输入投诉标题"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="投诉内容:">
<el-input
v-model="form.windowNum"
placeholder="请输入投诉内容"
type="textarea"
style="width: 100%;"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="真实姓名:">
<el-input
v-model="form.windowNum"
placeholder="请输入真实姓名"
type="textarea"
style="width: 100%;"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="联系电话:">
<el-input
v-model="form.windowNum"
placeholder="请输入联系电话"
type="textarea"
style="width: 100%;"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="投诉时间:">
<el-col :span="11">
<el-date-picker
v-model="dateValue"
type="date"
placeholder="选择日期"
style="width: 100%;"
>
</el-date-picker>
</el-col>
<el-col :span="11">
<el-time-select
v-model="timeValue"
:picker-options="{
start: '06:00',
step: '00:15',
end: '18:30',
}"
placeholder="选择时间"
style="width: 100%;margin-left: 10px;"
>
</el-time-select
></el-col>
</el-form-item>
</el-col>
</el-row>
</el-row> <el-row>
<el-col :span="22">
<el-form-item label="图片凭证:">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
:limit="3"
:on-exceed="handleExceed"
:file-list="fileList"
>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">
只能上传jpg/png等图片文件
</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn /> <el-row>
</el-form> <el-col :span="22">
<el-form-item label="绩效规则:">
<el-col :span="22">
<el-select v-model="form.attendanceGroupId" style="width: 100%;">
<el-option
v-for="item in kaoqinArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option
></el-select>
</el-col>
<el-col :span="22">
<el-select
v-model="form.attendanceGroupId"
style="width: 100%;margin-top: 10px;"
>
<el-option
v-for="item in kaoqinArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option></el-select
></el-col>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="扣分分值:">
<p>{{ form.score }}</p>
</el-form-item>
</el-col>
</el-row>
</el-drawer> <form-buttons
@submit="submitForm"
v-if="pageInfo.type != 'view'"
noCancelBtn
/>
</el-form>
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field
label="员工ID"
prop="staffId"
v-model="form.staffId"
placeholder="请输入员工ID"
/>
<Field
label="员工姓名"
prop="staffName"
v-model="form.staffName"
placeholder="请输入员工姓名"
/>
<Field
label="工号"
prop="workNum"
v-model="form.workNum"
placeholder="请输入工号"
/>
<Field
label="窗口编号"
prop="windowNum"
v-model="form.windowNum"
placeholder="请输入窗口编号"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
placeholder="请输入所属部门"
/>
<Field
label="所属部门名称"
prop="deptName"
v-model="form.deptName"
placeholder="请输入所属部门名称"
/>
<Field
label="投诉标题"
prop="complainTitle"
v-model="form.complainTitle"
placeholder="请输入投诉标题"
/>
<Field label="投诉内容"
><editor v-model="form.complainContent" :min-height="256"
/></Field>
<Field
label="投诉人真实姓名"
prop="complainRealName"
v-model="form.complainRealName"
placeholder="请输入投诉人真实姓名"
/>
<Field
label="联系电话"
prop="contact"
v-model="form.contact"
placeholder="请输入联系电话"
/>
<Field
label="投诉时间"
prop="complainTime"
v-model="form.complainTime"
type="date"
/>
<Field
label="投诉来源"
prop="complainSource"
v-model="form.complainSource"
placeholder="请输入投诉来源"
/>
<Field
label="投诉设备"
prop="complainDevice"
v-model="form.complainDevice"
placeholder="请输入投诉设备"
/>
<Field
label="绩效规则id"
prop="ruleId"
v-model="form.ruleId"
placeholder="请输入绩效规则id"
/>
<Field
label="规则名称"
prop="ruleName"
v-model="form.ruleName"
placeholder="请输入规则名称"
/>
<Field
label="扣分方式"
prop="subMethod"
v-model="form.subMethod"
type="select"
:enumData="dict.subMethod"
placeholder="请选择扣分方式"
/>
<Field
label="扣分人员"
prop="deductPerson"
v-model="form.deductPerson"
placeholder="请输入扣分人员"
/>
<Field
label="扣分时间"
prop="deductTime"
v-model="form.deductTime"
type="date"
/>
<Field
label="扣分或增加分值"
prop="score"
v-model="form.score"
placeholder="请输入扣分或增加分值"
/>
<Field
label="处理状态"
prop="processStatus"
v-model="form.processStatus"
type="select"
:enumData="dict.processStatus"
placeholder="请选择处理状态"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row>
<form-buttons
@submit="submitForm"
v-if="pageInfo.type != 'view'"
noCancelBtn
/>
</el-form> -->
</el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "PerformComplainRecordDetail", name: "PerformComplainRecordDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("perform/complain/record");
created() { },
this.changePath("perform/complain/record") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "评价绩效投诉记录信息",
// 弹出层标题 // 是否显示弹出层
title: "评价绩效投诉记录信息", open: false,
// 是否显示弹出层 direction: "rtl",
open: false, toString: ["subMethod", "processStatus"],
direction:"rtl", toDate: ["complainTime", "deductTime"],
toString:[ // 表单校验
"subMethod", rules: {
"processStatus", staffName: [
], { required: true, message: "请输入员工姓名", trigger: "blur" },
toDate:[ { max: 64, message: "最多只能录入64个字符", trigger: "blur" },
"complainTime", ],
"deductTime", createTime: [{ required: true, message: "请选择创建时间" }],
], },
// 表单校验 };
rules: { },
staffName: [
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="perform/complain/record/edit"; this.urls.currUrl = "perform/complain/record/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改评价绩效投诉记录信息"; this.title = "修改评价绩效投诉记录信息";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset();
this.urls.currUrl = "perform/complain/record/add"; this.urls.currUrl = "perform/complain/record/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type = "add";
this.title = "新增评价绩效投诉记录信息"; this.title = "新增评价绩效投诉记录信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="perform/complain/record/view"; this.urls.currUrl = "perform/complain/record/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type = "view";
this.title = "评价绩效投诉记录信息详细"; this.title = "评价绩效投诉记录信息详细";
}, },
/**取消按钮 */ /**取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
}, },
/**获取数据后弹框 */ /**获取数据后弹框 */
afterRender(data) { afterRender(data) {
this.open = true; this.open = true;
}, },
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
staffId : null, staffId: null,
staffName : "", staffName: "",
workNum : "", workNum: "",
windowNum : "", windowNum: "",
deptId : null, deptId: null,
deptName : "", deptName: "",
complainTitle : "", complainTitle: "",
complainContent : "", complainContent: "",
complainRealName : "", complainRealName: "",
contact : "", contact: "",
complainTime : null, complainTime: null,
complainSource : "", complainSource: "",
complainDevice : "", complainDevice: "",
ruleId : null, ruleId: null,
ruleName : "", ruleName: "",
subMethod : 1, subMethod: 1,
deductPerson : "", deductPerson: "",
deductTime : null, deductTime: null,
score : 0.00, score: 0.0,
processStatus : 1, processStatus: 1,
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, },
}, },
}; };
</script> </script>
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> >
<el-row> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<Field label="员工ID" prop="staffId" v-model="form.staffId" placeholder="请输入员工ID"/> <el-row>
<Field label="员工姓名" prop="staffName" v-model="form.staffName" placeholder="请输入员工姓名"/> <el-col :span="22">
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/> <el-form-item label="姓名:">
<Field label="窗口编号" prop="windowNum" v-model="form.windowNum" placeholder="请输入窗口编号"/> <el-select v-model="form.staffId" style="width: 100%;">
<Field label="所属部门" prop="deptId" v-model="form.deptId" placeholder="请输入所属部门"/> <el-option
<Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/> v-for="item in staffArr"
<Field label="违规类型" prop="irregularType" v-model="form.irregularType" type="select" :enumData="dict.irregularType" placeholder="请选择违规类型"/> :key="item.value"
<Field label="发生时间" prop="happenTime" v-model="form.happenTime" type="date" /> :label="item.label"
<Field label="持续时间,秒" prop="duration" v-model="form.duration" placeholder="请输入持续时间,秒"/> :value="item.value"
<Field label="报警时间" prop="alarmTime" v-model="form.alarmTime" type="date" /> >
<Field label="图片凭证地址" prop="snapPath" v-model="form.snapPath" type="textarea" placeholder="请输入图片凭证地址"/> </el-option
<Field label="绩效规则id" prop="ruleId" v-model="form.ruleId" placeholder="请输入绩效规则id"/> ></el-select>
<Field label="规则名称" prop="ruleName" v-model="form.ruleName" placeholder="请输入规则名称"/> </el-form-item>
<Field label="扣分方式" prop="subMethod" v-model="form.subMethod" type="select" :enumData="dict.subMethod" placeholder="请选择扣分方式"/> </el-col>
<Field label="扣分人员" prop="deductPerson" v-model="form.deductPerson" placeholder="请输入扣分人员"/> </el-row>
<Field label="扣分时间" prop="deductTime" v-model="form.deductTime" type="date" /> <el-row>
<Field label="扣分或增加分值" prop="score" v-model="form.score" placeholder="请输入扣分或增加分值"/> <el-col :span="22">
<Field label="处理状态" prop="processStatus" v-model="form.processStatus" type="select" :enumData="dict.processStatus" placeholder="请选择处理状态"/> <el-form-item label="所属部门:">
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> <el-select v-model="form.deptId" style="width: 100%;">
<el-option
v-for="item in deptArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="窗口编号:">
<el-input
v-model="form.windowNum"
placeholder="请输入窗口编号"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="违规类型:">
<el-select v-model="form.goworkDepts" style="width: 100%;">
<el-option
v-for="item in kaoqinArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
</el-row> <el-row>
<el-col :span="22">
<el-form-item label="发生时间:">
<el-col :span="11">
<el-date-picker
v-model="dateValue"
type="date"
placeholder="选择日期"
style="width: 100%;"
>
</el-date-picker>
</el-col>
<el-col :span="11">
<el-time-select
v-model="timeValue"
:picker-options="{
start: '06:00',
step: '00:15',
end: '18:30',
}"
placeholder="选择时间"
style="width: 100%;margin-left: 10px;"
>
</el-time-select
></el-col>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="时长:">
<el-input
v-model="form.windowNum"
placeholder="请输入时长(xx分xx秒)"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="报警时间:">
<el-col :span="11">
<el-date-picker
v-model="dateValue1"
type="date"
placeholder="选择日期"
style="width: 100%;"
>
</el-date-picker>
</el-col>
<el-col :span="11">
<el-time-select
v-model="timeValue1"
:picker-options="{
start: '06:00',
step: '00:15',
end: '18:30',
}"
placeholder="选择时间"
style="width: 100%;margin-left: 10px;"
>
</el-time-select
></el-col>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="图片凭证:">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
:limit="3"
:on-exceed="handleExceed"
:file-list="fileList"
>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">
只能上传jpg/png等图片文件
</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn /> <el-row>
</el-form> <el-col :span="22">
<el-form-item label="绩效规则:">
<el-col :span="22">
<el-select v-model="form.attendanceGroupId" style="width: 100%;">
<el-option
v-for="item in kaoqinArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option
></el-select>
</el-col>
<el-col :span="22">
<el-select
v-model="form.attendanceGroupId"
style="width: 100%;margin-top: 10px;"
>
<el-option
v-for="item in kaoqinArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option></el-select
></el-col>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="扣分分值:">
<p>{{ form.score }}</p>
</el-form-item>
</el-col>
</el-row>
</el-drawer> <form-buttons
@submit="submitForm"
v-if="pageInfo.type != 'view'"
noCancelBtn
/>
</el-form>
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field
label="员工ID"
prop="staffId"
v-model="form.staffId"
placeholder="请输入员工ID"
/>
<Field
label="员工姓名"
prop="staffName"
v-model="form.staffName"
placeholder="请输入员工姓名"
/>
<Field
label="工号"
prop="workNum"
v-model="form.workNum"
placeholder="请输入工号"
/>
<Field
label="窗口编号"
prop="windowNum"
v-model="form.windowNum"
placeholder="请输入窗口编号"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
placeholder="请输入所属部门"
/>
<Field
label="所属部门名称"
prop="deptName"
v-model="form.deptName"
placeholder="请输入所属部门名称"
/>
<Field
label="违规类型"
prop="irregularType"
v-model="form.irregularType"
type="select"
:enumData="dict.irregularType"
placeholder="请选择违规类型"
/>
<Field
label="发生时间"
prop="happenTime"
v-model="form.happenTime"
type="date"
/>
<Field
label="持续时间,秒"
prop="duration"
v-model="form.duration"
placeholder="请输入持续时间,秒"
/>
<Field
label="报警时间"
prop="alarmTime"
v-model="form.alarmTime"
type="date"
/>
<Field
label="图片凭证地址"
prop="snapPath"
v-model="form.snapPath"
type="textarea"
placeholder="请输入图片凭证地址"
/>
<Field
label="绩效规则id"
prop="ruleId"
v-model="form.ruleId"
placeholder="请输入绩效规则id"
/>
<Field
label="规则名称"
prop="ruleName"
v-model="form.ruleName"
placeholder="请输入规则名称"
/>
<Field
label="扣分方式"
prop="subMethod"
v-model="form.subMethod"
type="select"
:enumData="dict.subMethod"
placeholder="请选择扣分方式"
/>
<Field
label="扣分人员"
prop="deductPerson"
v-model="form.deductPerson"
placeholder="请输入扣分人员"
/>
<Field
label="扣分时间"
prop="deductTime"
v-model="form.deductTime"
type="date"
/>
<Field
label="扣分或增加分值"
prop="score"
v-model="form.score"
placeholder="请输入扣分或增加分值"
/>
<Field
label="处理状态"
prop="processStatus"
v-model="form.processStatus"
type="select"
:enumData="dict.processStatus"
placeholder="请选择处理状态"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row>
<form-buttons
@submit="submitForm"
v-if="pageInfo.type != 'view'"
noCancelBtn
/>
</el-form> -->
</el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "PerformEffectRecordDetail", name: "PerformEffectRecordDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("perform/effect/record");
created() { },
this.changePath("perform/effect/record") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "效能绩效记录信息",
// 弹出层标题 // 是否显示弹出层
title: "效能绩效记录信息", open: false,
// 是否显示弹出层 direction: "rtl",
open: false, toString: ["irregularType", "subMethod", "processStatus"],
direction:"rtl", toDate: ["happenTime", "alarmTime", "deductTime"],
toString:[ // 表单校验
"irregularType", rules: {
"subMethod", staffName: [
"processStatus", { required: true, message: "请输入员工姓名", trigger: "blur" },
], { max: 64, message: "最多只能录入64个字符", trigger: "blur" },
toDate:[ ],
"happenTime", createTime: [{ required: true, message: "请选择创建时间" }],
"alarmTime", },
"deductTime", staffArr: [
], {
// 表单校验 label: "员工1",
rules: { value: "1",
staffName: [
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
}, },
],
deptArr: [],
kaoqinArr: [],
fileList: [],
dateValue: "",
timeValue: "",
dateValue1: "",
timeValue1: "",
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="perform/effect/record/edit"; this.urls.currUrl = "perform/effect/record/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改效能绩效记录信息"; this.title = "修改效能绩效记录信息";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset();
this.urls.currUrl = "perform/effect/record/add"; this.urls.currUrl = "perform/effect/record/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type = "add";
this.title = "新增效能绩效记录信息"; this.title = "新增效能绩效记录信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="perform/effect/record/view"; this.urls.currUrl = "perform/effect/record/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type = "view";
this.title = "效能绩效记录信息详细"; this.title = "效能绩效记录信息详细";
}, },
/**取消按钮 */ /**取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
}, },
/**获取数据后弹框 */ /**获取数据后弹框 */
afterRender(data) { afterRender(data) {
this.open = true; this.open = true;
}, },
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
staffId : null, staffId: null,
staffName : "", staffName: "",
workNum : "", workNum: "",
windowNum : "", windowNum: "",
deptId : null, deptId: null,
deptName : "", deptName: "",
irregularType : null, irregularType: null,
happenTime : null, happenTime: null,
duration : 0, duration: 0,
alarmTime : null, alarmTime: null,
snapPath : "", snapPath: "",
ruleId : null, ruleId: null,
ruleName : "", ruleName: "",
subMethod : 1, subMethod: 1,
deductPerson : "", deductPerson: "",
deductTime : null, deductTime: null,
score : 0.00, score: 0.0,
processStatus : 1, processStatus: 1,
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, },
}, },
}; };
</script> </script>
...@@ -82,19 +82,6 @@ ...@@ -82,19 +82,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="22">
<el-form-item label="异常时间:">
<el-date-picker
v-model="form.errorTime"
type="date"
placeholder="选择日期"
style="width: 100%;"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="22"> <el-col :span="22">
<el-form-item label="办件时间:"> <el-form-item label="办件时间:">
......
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> >
<el-row> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<Field label="员工ID" prop="staffId" v-model="form.staffId" placeholder="请输入员工ID"/> <el-row>
<Field label="员工姓名" prop="staffName" v-model="form.staffName" placeholder="请输入员工姓名"/> <el-col :span="22">
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/> <el-form-item label="姓名:">
<Field label="窗口编号" prop="windowNum" v-model="form.windowNum" placeholder="请输入窗口编号"/> <el-select v-model="form.staffId" style="width: 100%;">
<Field label="所属部门" prop="deptId" v-model="form.deptId" placeholder="请输入所属部门"/> <el-option
<Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/> v-for="item in staffArr"
<Field label="评价结果" prop="reviewResult" v-model="form.reviewResult" type="select" :enumData="dict.reviewResult" placeholder="请选择评价结果"/> :key="item.value"
<Field label="评价时间" prop="reviewTime" v-model="form.reviewTime" type="date" /> :label="item.label"
<Field label="评价来源" prop="reviewSource" v-model="form.reviewSource" type="select" :enumData="dict.reviewSource" placeholder="请选择评价来源"/> :value="item.value"
<Field label="评价设备" prop="reviewDevice" v-model="form.reviewDevice" placeholder="请输入评价设备"/> >
<Field label="绩效规则id" prop="ruleId" v-model="form.ruleId" placeholder="请输入绩效规则id"/> </el-option
<Field label="规则名称" prop="ruleName" v-model="form.ruleName" placeholder="请输入规则名称"/> ></el-select>
<Field label="扣分方式" prop="subMethod" v-model="form.subMethod" type="select" :enumData="dict.subMethod" placeholder="请选择扣分方式"/> </el-form-item>
<Field label="扣分人员" prop="deductPerson" v-model="form.deductPerson" placeholder="请输入扣分人员"/> </el-col>
<Field label="扣分时间" prop="deductTime" v-model="form.deductTime" type="date" /> </el-row>
<Field label="扣分或增加分值" prop="score" v-model="form.score" placeholder="请输入扣分或增加分值"/> <el-row>
<Field label="处理状态" prop="processStatus" v-model="form.processStatus" type="select" :enumData="dict.processStatus" placeholder="请选择处理状态"/> <el-col :span="22">
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> <el-form-item label="所属部门:">
<el-select v-model="form.deptId" style="width: 100%;">
<el-option
v-for="item in deptArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="窗口编号:">
<el-input
v-model="form.windowNum"
placeholder="请输入窗口编号"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="评价结果:">
<el-radio-group v-model="form.reviewResult">
<el-radio :label="1">非常不满意</el-radio>
<el-radio :label="2">差评</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="评价来源:">
<el-select
v-model="form.deptId"
style="width: 100%;"
placeholder="请选择评价来源"
>
<el-option
v-for="item in deptArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="评价设备:">
<el-input
v-model="form.windowNum"
placeholder="请输入评价设备"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="评价时间">
<el-col :span="11">
<el-date-picker
v-model="dateValue"
type="date"
placeholder="选择日期"
style="width: 100%;"
>
</el-date-picker>
</el-col>
<el-col :span="11">
<el-time-select
v-model="timeValue"
:picker-options="{
start: '06:00',
step: '00:15',
end: '18:30',
}"
placeholder="选择时间"
style="width: 100%;margin-left: 10px;"
>
</el-time-select
></el-col>
</el-form-item>
</el-col>
</el-row>
</el-row> <el-row>
<el-col :span="22">
<el-form-item label="图片凭证:">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
:limit="3"
:on-exceed="handleExceed"
:file-list="fileList"
>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">
只能上传jpg/png等图片文件
</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn /> <el-row>
</el-form> <el-col :span="22">
<el-form-item label="绩效规则:">
<el-col :span="22">
<el-select v-model="form.attendanceGroupId" style="width: 100%;">
<el-option
v-for="item in kaoqinArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option
></el-select>
</el-col>
<el-col :span="22">
<el-select
v-model="form.attendanceGroupId"
style="width: 100%;margin-top: 10px;"
>
<el-option
v-for="item in kaoqinArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option></el-select
></el-col>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="扣分分值:">
<p>{{ form.score }}</p>
</el-form-item>
</el-col>
</el-row>
</el-drawer> <form-buttons
@submit="submitForm"
v-if="pageInfo.type != 'view'"
noCancelBtn
/>
</el-form>
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field
label="员工ID"
prop="staffId"
v-model="form.staffId"
placeholder="请输入员工ID"
/>
<Field
label="员工姓名"
prop="staffName"
v-model="form.staffName"
placeholder="请输入员工姓名"
/>
<Field
label="工号"
prop="workNum"
v-model="form.workNum"
placeholder="请输入工号"
/>
<Field
label="窗口编号"
prop="windowNum"
v-model="form.windowNum"
placeholder="请输入窗口编号"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
placeholder="请输入所属部门"
/>
<Field
label="所属部门名称"
prop="deptName"
v-model="form.deptName"
placeholder="请输入所属部门名称"
/>
<Field
label="评价结果"
prop="reviewResult"
v-model="form.reviewResult"
type="select"
:enumData="dict.reviewResult"
placeholder="请选择评价结果"
/>
<Field
label="评价时间"
prop="reviewTime"
v-model="form.reviewTime"
type="date"
/>
<Field
label="评价来源"
prop="reviewSource"
v-model="form.reviewSource"
type="select"
:enumData="dict.reviewSource"
placeholder="请选择评价来源"
/>
<Field
label="评价设备"
prop="reviewDevice"
v-model="form.reviewDevice"
placeholder="请输入评价设备"
/>
<Field
label="绩效规则id"
prop="ruleId"
v-model="form.ruleId"
placeholder="请输入绩效规则id"
/>
<Field
label="规则名称"
prop="ruleName"
v-model="form.ruleName"
placeholder="请输入规则名称"
/>
<Field
label="扣分方式"
prop="subMethod"
v-model="form.subMethod"
type="select"
:enumData="dict.subMethod"
placeholder="请选择扣分方式"
/>
<Field
label="扣分人员"
prop="deductPerson"
v-model="form.deductPerson"
placeholder="请输入扣分人员"
/>
<Field
label="扣分时间"
prop="deductTime"
v-model="form.deductTime"
type="date"
/>
<Field
label="扣分或增加分值"
prop="score"
v-model="form.score"
placeholder="请输入扣分或增加分值"
/>
<Field
label="处理状态"
prop="processStatus"
v-model="form.processStatus"
type="select"
:enumData="dict.processStatus"
placeholder="请选择处理状态"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row>
<form-buttons
@submit="submitForm"
v-if="pageInfo.type != 'view'"
noCancelBtn
/>
</el-form> -->
</el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "PerformReviewRecordDetail", name: "PerformReviewRecordDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("perform/review/record");
created() { },
this.changePath("perform/review/record") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "评价差评绩效记录信息",
// 弹出层标题 // 是否显示弹出层
title: "评价差评绩效记录信息", open: false,
// 是否显示弹出层 direction: "rtl",
open: false, toString: ["reviewResult", "subMethod", "processStatus"],
direction:"rtl", toDate: ["reviewTime", "deductTime"],
toString:[ // 表单校验
"reviewResult", rules: {
"subMethod", staffName: [
"processStatus", { required: true, message: "请输入员工姓名", trigger: "blur" },
], { max: 64, message: "最多只能录入64个字符", trigger: "blur" },
toDate:[ ],
"reviewTime", createTime: [{ required: true, message: "请选择创建时间" }],
"deductTime", },
], staffArr: [
// 表单校验 {
rules: { label: "员工1",
staffName: [ value: "1",
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
}, },
],
deptArr: [],
kaoqinArr: [],
fileList: [],
dateValue: "",
timeValue: "",
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="perform/review/record/edit"; this.urls.currUrl = "perform/review/record/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改评价差评绩效记录信息"; this.title = "修改评价差评绩效记录信息";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset();
this.urls.currUrl = "perform/review/record/add"; this.urls.currUrl = "perform/review/record/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type = "add";
this.title = "新增评价差评绩效记录信息"; this.title = "新增评价差评绩效记录信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="perform/review/record/view"; this.urls.currUrl = "perform/review/record/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type = "view";
this.title = "评价差评绩效记录信息详细"; this.title = "评价差评绩效记录信息详细";
}, },
/**取消按钮 */ /**取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
}, },
/**获取数据后弹框 */ /**获取数据后弹框 */
afterRender(data) { afterRender(data) {
this.open = true; this.open = true;
}, },
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
staffId : null, staffId: null,
staffName : "", staffName: "",
workNum : "", workNum: "",
windowNum : "", windowNum: "",
deptId : null, deptId: null,
deptName : "", deptName: "",
reviewResult : null, reviewResult: null,
reviewTime : null, reviewTime: null,
reviewSource : "", reviewSource: "",
reviewDevice : "", reviewDevice: "",
ruleId : null, ruleId: null,
ruleName : "", ruleName: "",
subMethod : 1, subMethod: 1,
deductPerson : "", deductPerson: "",
deductTime : null, deductTime: null,
score : 0.00, score: 0.0,
processStatus : 1, processStatus: 1,
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, },
}, handleRemove(file, fileList) {
}; console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${
files.length
} 个文件,共选择了 ${files.length + fileList.length} 个文件`
);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`);
},
},
};
</script> </script>
...@@ -27,4 +27,11 @@ public interface RoleUserService extends ICRUDService<RoleUserEntity,Long> { ...@@ -27,4 +27,11 @@ public interface RoleUserService extends ICRUDService<RoleUserEntity,Long> {
void doDistributionUser(RoleUserQuery query); void doDistributionUser(RoleUserQuery query);
void doDistributionRole(RoleUserQuery query); void doDistributionRole(RoleUserQuery query);
/**
* 给用户分配角色
* @param query
*/
void assignRoleToUser(RoleUserQuery query);
} }
\ No newline at end of file
...@@ -70,6 +70,26 @@ public class RoleUserServiceImpl extends AbstractCRUDServiceImpl<RoleUserDao,Rol ...@@ -70,6 +70,26 @@ public class RoleUserServiceImpl extends AbstractCRUDServiceImpl<RoleUserDao,Rol
this.dao.insertBatch(list); this.dao.insertBatch(list);
} }
@Override
public void assignRoleToUser(RoleUserQuery query) {
//删除当前用户所有关联角色
Long userId = query.getUserId();
Map<String, Object> condition = new HashMap<>(1);
condition.put("userId", userId);
dao.delete(condition);
//新增用户角色
List<Long> roleIdList = query.getRoleIdList();
List<RoleUserEntity> list = new ArrayList<>();
for (Long roleId : roleIdList) {
RoleUserEntity rolseUser = new RoleUserEntity();
rolseUser.setRoleId(roleId);
rolseUser.setUserId(userId);
list.add(rolseUser);
}
this.save(list);
}
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
package com.mortals.xhx.base.system.task.service.impl; package com.mortals.xhx.base.system.task.service.impl;
import cn.hutool.core.net.NetUtil;
import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.code.ExcuteStatus; import com.mortals.framework.common.code.ExcuteStatus;
import com.mortals.framework.common.code.TaskExcuteStrategy; import com.mortals.framework.common.code.TaskExcuteStrategy;
...@@ -148,7 +149,8 @@ public class TaskServiceImpl extends AbstractCRUDServiceImpl<TaskDao, TaskEntity ...@@ -148,7 +149,8 @@ public class TaskServiceImpl extends AbstractCRUDServiceImpl<TaskDao, TaskEntity
@Override @Override
public void start() throws AppException { public void start() throws AppException {
final String localIp = SystemUtil.getLocalHostIp(); // final String localIp = SystemUtil.getLocalHostIp();
final String localIp = NetUtil.getLocalhostStr();
log.info("任务执行线程启动...-->" + localIp); log.info("任务执行线程启动...-->" + localIp);
thread = new Thread(() -> { thread = new Thread(() -> {
// 将本机上次执行而未完成的任务状态变更 // 将本机上次执行而未完成的任务状态变更
......
...@@ -48,7 +48,7 @@ public class UserEntity extends UserVo implements IUser { ...@@ -48,7 +48,7 @@ public class UserEntity extends UserVo implements IUser {
*/ */
private String qq; private String qq;
/** /**
* 用户类型(0.系统用户,1.普通用户,2.工作人员) * 用户类型(0.系统用户,1.普通用户,2.工作人员,3.普通员工)
*/ */
private Integer userType; private Integer userType;
...@@ -232,7 +232,7 @@ public class UserEntity extends UserVo implements IUser { ...@@ -232,7 +232,7 @@ public class UserEntity extends UserVo implements IUser {
this.qq = qq; this.qq = qq;
} }
/** /**
* 获取 用户类型(0.系统用户,1.普通用户,2.工作人员) * 获取 用户类型(0.系统用户,1.普通用户,2.工作人员,3.普通员工)
* @return Integer * @return Integer
*/ */
public Integer getUserType(){ public Integer getUserType(){
......
...@@ -6,6 +6,7 @@ import com.mortals.framework.ap.CookieService; ...@@ -6,6 +6,7 @@ import com.mortals.framework.ap.CookieService;
import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.ap.SysConstains; import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.IAuthTokenService; import com.mortals.framework.service.IAuthTokenService;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.IUser; import com.mortals.framework.service.IUser;
...@@ -32,6 +33,8 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -32,6 +33,8 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -46,34 +49,12 @@ public class ApiLoginController extends BaseJsonBodyController { ...@@ -46,34 +49,12 @@ public class ApiLoginController extends BaseJsonBodyController {
@Autowired @Autowired
private UserService userService; private UserService userService;
@Autowired @Autowired
private ValidCodeService validCodeService;
@Autowired
private ResourceService resourceService;
@Autowired
private MenuService menuService;
// @Autowired
// private ITokenService tokenService;
@Autowired
private ICacheService cacheService;
@Autowired
private IAuthTokenService authTokenService; private IAuthTokenService authTokenService;
@RequestMapping("login") @RequestMapping("login")
public String login(@RequestBody LoginForm loginForm) throws Exception { public String login(@RequestBody LoginForm loginForm) throws Exception {
/*
JSONObject ret = new JSONObject();
String loginName = loginForm.getLoginName();
String password = loginForm.getPassword();
UserPdu userPdu = new UserPdu();
userPdu.setLoginName(loginName);
userPdu.setPassword(password);
String resp = userFeign.portalLogin(userPdu);
return resp;
*/
JSONObject ret = new JSONObject(); JSONObject ret = new JSONObject();
String loginName = loginForm.getLoginName(); String loginName = loginForm.getLoginName();
String password = loginForm.getPassword(); String password = loginForm.getPassword();
...@@ -88,42 +69,35 @@ public class ApiLoginController extends BaseJsonBodyController { ...@@ -88,42 +69,35 @@ public class ApiLoginController extends BaseJsonBodyController {
loginForm.validate(); loginForm.validate();
userEntity = userService.doLogin(loginName, password, ip); userEntity = userService.doLogin(loginName, password, ip);
userEntity.setLastLoginAddress(ip); userEntity.setLastLoginAddress(ip);
recordSysLog(request, userEntity, "H5用户登录系统成功!");
recordSysLog(request, userEntity, "用户登录系统成功!");
// 返回拥有的菜单数据
Set<String> urls = resourceService.findUrlSetByUserId(userEntity.getId());
List<MenuEntity> outlookBarList = menuService.findTreeMenu(userEntity, urls);
String currUserName = userEntity.getRealName(); String currUserName = userEntity.getRealName();
if (currUserName == null || currUserName.trim().length() == 0) { if (currUserName == null || currUserName.trim().length() == 0) {
currUserName = "管理员"; currUserName = "管理员";
} }
JSONObject data = new JSONObject(); JSONObject data = new JSONObject();
data.put("currUserName", currUserName); data.put("currUserName", currUserName);
data.put("barList", outlookBarList);
data.put("id", userEntity.getId()); data.put("id", userEntity.getId());
data.put("userType", userEntity.getUserType()); data.put("userType", userEntity.getUserType());
HashSet<Integer> set = new HashSet<>();
set.add(1);
set.add(2);
if (ObjectUtils.isEmpty(userEntity.getUserType()) || !set.contains(userEntity.getUserType())) {
throw new AppException("当前用户不支持H5登录!");
}
userEntity.setLoginTime(System.currentTimeMillis()); userEntity.setLoginTime(System.currentTimeMillis());
userEntity.setToken(IdUtil.fastSimpleUUID()); userEntity.setToken(IdUtil.fastSimpleUUID());
userEntity.setExpireTime(DateUtils.addCurrDate(7).getTime()); userEntity.setExpireTime(DateUtils.addCurrDate(7).getTime());
userEntity.setMenuUrl(generateMenuUrlCode(urls));
String token = authTokenService.createToken(userEntity); String token = authTokenService.createToken(userEntity);
data.put("token", token); data.put("token", token);
//设置token 和过期时间
//data.put("expiresTime", DateUtils.addCurrDate(7).getTime());
generateMenuUrlCode(urls);
//this.generateBlackCookie(request, response, loginName, urls);
ret.put(KEY_RESULT_DATA, data); ret.put(KEY_RESULT_DATA, data);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户登录系统成功!"); ret.put(KEY_RESULT_MSG, "用户登录系统成功!");
ret.put("resources", urls);
return ret.toJSONString(); return ret.toJSONString();
} catch (Exception e) { } catch (Exception e) {
log.error("login error ", e); log.error("h5 login error ", e);
if (userEntity == null) {
userEntity = new UserEntity();
userEntity.setLoginName(loginName);
}
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE); ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, super.convertException(e)); ret.put(KEY_RESULT_MSG, super.convertException(e));
return ret.toJSONString(); return ret.toJSONString();
...@@ -136,78 +110,6 @@ public class ApiLoginController extends BaseJsonBodyController { ...@@ -136,78 +110,6 @@ public class ApiLoginController extends BaseJsonBodyController {
super.removeCurrUser(request); super.removeCurrUser(request);
} }
@RequestMapping("index")
public String index() throws Exception {
JSONObject ret = new JSONObject();
IUser user = this.getCurUser();
if (user == null) {
return JSONObject.toJSONString(Rest.fail(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT));
}
Set<String> urls = resourceService.findUrlSetByUserId(user.getId());
List<MenuEntity> outlookBarList = menuService.findTreeMenu(user, urls);
String currUserName = user.getRealName();
if (currUserName == null || currUserName.trim().length() == 0) {
currUserName = "管理员";
}
JSONObject data = new JSONObject();
String token = authTokenService.getToken(request);
data.put("token", token);
data.put("currUserName", currUserName);
data.put("barList", outlookBarList);
data.put("id", user.getId());
data.put("userType", user.getUserType());
ret.put(KEY_RESULT_DATA, data);
//this.generateBlackCookie(request, response, user.getLoginName(), urls);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户登录系统成功!");
ret.put("resources", urls);
return ret.toJSONString();
}
private void generateBlackCookie(HttpServletRequest request, HttpServletResponse response, String loginName, Set<String> urls) {
try {
String cacheKey = RedisKey.KEY_MENU_CACHE + loginName;
String securityKey = GlobalSysInfo.getPropertyValue(SysConstains.PROP_COOKIE_SECURITY_KEY);
//应为Cookie会超长,所以改为仅存储key将值放入redis
//CookieService.setCookieForAuth(request, response, securityKey, null);
StringBuilder sb = new StringBuilder();
if (urls != null && urls.size() > 0) {
for (String url : urls) {
int index = url.hashCode() & (Integer.MAX_VALUE - 1);
sb.append(index).append(",");
}
}
String menuUrl = sb.toString();
menuUrl = AESUtil.encrypt(menuUrl, securityKey);
cacheService.set(cacheKey, menuUrl, 604800);
HttpUtil.setCookieValue(request, response, SysConstains.COOKIE_MENU, cacheKey, -1);
} catch (Throwable e) {
}
}
private String generateMenuUrlCode(Set<String> urls) {
try {
String securityKey = GlobalSysInfo.getPropertyValue(SysConstains.PROP_COOKIE_SECURITY_KEY);
StringBuilder sb = new StringBuilder();
if (urls != null && urls.size() > 0) {
for (String url : urls) {
int index = url.hashCode() & (Integer.MAX_VALUE - 1);
sb.append(index).append(",");
}
}
String menuUrl = sb.toString();
return AESUtil.encrypt(menuUrl, securityKey);
} catch (Throwable e) {
log.error("编码异常", e);
return null;
}
}
@RequestMapping("parseToken") @RequestMapping("parseToken")
public IUser parseToken() throws Exception { public IUser parseToken() throws Exception {
......
...@@ -55,7 +55,7 @@ public class AppealApiController extends BaseJsonBodyController { ...@@ -55,7 +55,7 @@ public class AppealApiController extends BaseJsonBodyController {
/** /**
* 个人申诉绩效统计 * 个人申诉绩效统计
*/ */
@PostMapping(value = "appeal/stat") @PostMapping(value = "stat")
public Rest<AppealStatInfo> appealStat() { public Rest<AppealStatInfo> appealStat() {
String busiDesc = "H5个人申诉绩效统计"; String busiDesc = "H5个人申诉绩效统计";
Rest<AppealStatInfo> rest = Rest.ok(busiDesc + " 【成功】"); Rest<AppealStatInfo> rest = Rest.ok(busiDesc + " 【成功】");
...@@ -72,7 +72,7 @@ public class AppealApiController extends BaseJsonBodyController { ...@@ -72,7 +72,7 @@ public class AppealApiController extends BaseJsonBodyController {
/** /**
* 申诉列表 * 申诉列表
*/ */
@PostMapping(value = "appeal/list") @PostMapping(value = "list")
public Rest<List<PerformAttendAppealEntity>> performList(@RequestBody AppealReq appealReq) { public Rest<List<PerformAttendAppealEntity>> performList(@RequestBody AppealReq appealReq) {
String busiDesc = "个人申诉列表"; String busiDesc = "个人申诉列表";
Rest<List<PerformAttendAppealEntity>> rest = Rest.ok(busiDesc + " 【成功】"); Rest<List<PerformAttendAppealEntity>> rest = Rest.ok(busiDesc + " 【成功】");
...@@ -95,8 +95,8 @@ public class AppealApiController extends BaseJsonBodyController { ...@@ -95,8 +95,8 @@ public class AppealApiController extends BaseJsonBodyController {
/** /**
* 申诉详细 * 申诉详细
*/ */
@PostMapping(value = "appeal/detail") @PostMapping(value = "info")
public Rest<PerformAttendAppealEntity> performDetail(@RequestBody AppealReq appealReq) { public Rest<PerformAttendAppealEntity> performInfo(@RequestBody AppealReq appealReq) {
String busiDesc = "个人申诉详细"; String busiDesc = "个人申诉详细";
Rest<PerformAttendAppealEntity> rest = Rest.ok(busiDesc + " 【成功】"); Rest<PerformAttendAppealEntity> rest = Rest.ok(busiDesc + " 【成功】");
try { try {
...@@ -116,7 +116,7 @@ public class AppealApiController extends BaseJsonBodyController { ...@@ -116,7 +116,7 @@ public class AppealApiController extends BaseJsonBodyController {
/** /**
* 申诉新增 * 申诉新增
*/ */
@PostMapping(value = "appeal/save") @PostMapping(value = "save")
public Rest<String> appealSave(@RequestBody PerformAttendAppealEntity appealEntity) { public Rest<String> appealSave(@RequestBody PerformAttendAppealEntity appealEntity) {
String busiDesc = "个人申诉新增"; String busiDesc = "个人申诉新增";
Rest<String> rest = Rest.ok(busiDesc + " 【成功】"); Rest<String> rest = Rest.ok(busiDesc + " 【成功】");
......
...@@ -48,7 +48,7 @@ public class FeedbackApiController extends BaseJsonBodyController { ...@@ -48,7 +48,7 @@ public class FeedbackApiController extends BaseJsonBodyController {
/** /**
* 反馈列表 * 反馈列表
*/ */
@PostMapping(value = "feedback/list") @PostMapping(value = "list")
public Rest<List<PerformAttendAppealEntity>> feedbackList(@RequestBody FeedbackReq feedbackReq) { public Rest<List<PerformAttendAppealEntity>> feedbackList(@RequestBody FeedbackReq feedbackReq) {
String busiDesc = "个人反馈列表"; String busiDesc = "个人反馈列表";
Rest<List<PerformAttendAppealEntity>> rest = Rest.ok(busiDesc + " 【成功】"); Rest<List<PerformAttendAppealEntity>> rest = Rest.ok(busiDesc + " 【成功】");
...@@ -71,7 +71,7 @@ public class FeedbackApiController extends BaseJsonBodyController { ...@@ -71,7 +71,7 @@ public class FeedbackApiController extends BaseJsonBodyController {
/** /**
* 反馈详细 * 反馈详细
*/ */
@PostMapping(value = "feedback/question") @PostMapping(value = "question")
public Rest<PerformAttendAppealEntity> performDetail(@RequestBody AppealReq appealReq) { public Rest<PerformAttendAppealEntity> performDetail(@RequestBody AppealReq appealReq) {
String busiDesc = "个人申诉详细"; String busiDesc = "个人申诉详细";
Rest<PerformAttendAppealEntity> rest = Rest.ok(busiDesc + " 【成功】"); Rest<PerformAttendAppealEntity> rest = Rest.ok(busiDesc + " 【成功】");
...@@ -92,9 +92,9 @@ public class FeedbackApiController extends BaseJsonBodyController { ...@@ -92,9 +92,9 @@ public class FeedbackApiController extends BaseJsonBodyController {
/** /**
* 申诉新增 * 申诉新增
*/ */
@PostMapping(value = "appeal/save") @PostMapping(value = "save")
public Rest<String> appealSave(@RequestBody PerformAttendAppealEntity appealEntity) { public Rest<String> feedbackSave(@RequestBody PerformAttendAppealEntity appealEntity) {
String busiDesc = "个人申诉新增"; String busiDesc = "反馈回答";
Rest<String> rest = Rest.ok(busiDesc + " 【成功】"); Rest<String> rest = Rest.ok(busiDesc + " 【成功】");
try { try {
......
...@@ -4,6 +4,9 @@ package com.mortals.xhx.busiz.web; ...@@ -4,6 +4,9 @@ package com.mortals.xhx.busiz.web;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseJsonBodyController; import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.busiz.req.AppealReq; import com.mortals.xhx.busiz.req.AppealReq;
import com.mortals.xhx.busiz.req.PerformReq; import com.mortals.xhx.busiz.req.PerformReq;
...@@ -11,17 +14,34 @@ import com.mortals.xhx.busiz.rsp.PerformDetailInfo; ...@@ -11,17 +14,34 @@ import com.mortals.xhx.busiz.rsp.PerformDetailInfo;
import com.mortals.xhx.busiz.rsp.PerformInfo; import com.mortals.xhx.busiz.rsp.PerformInfo;
import com.mortals.xhx.busiz.rsp.PerformStatInfo; import com.mortals.xhx.busiz.rsp.PerformStatInfo;
import com.mortals.xhx.common.code.PerformTypeEnum; import com.mortals.xhx.common.code.PerformTypeEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.attendance.model.AttendanceRecordEntity;
import com.mortals.xhx.module.attendance.model.AttendanceRecordQuery;
import com.mortals.xhx.module.attendance.service.AttendanceRecordService;
import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.model.CheckAttendRecordQuery;
import com.mortals.xhx.module.check.service.*; import com.mortals.xhx.module.check.service.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.mortals.framework.ap.SysConstains.*;
import static com.mortals.framework.ap.SysConstains.LAST_PAGE;
import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED;
import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED_CONTENT;
/** /**
* h5 绩效 * h5 绩效
*
* @author: zxfei * @author: zxfei
* @date: 2023/7/7 13:20 * @date: 2023/7/7 13:20
*/ */
...@@ -30,6 +50,7 @@ import java.util.List; ...@@ -30,6 +50,7 @@ import java.util.List;
@RequestMapping("/api/v1/perform") @RequestMapping("/api/v1/perform")
public class PerformApiController extends BaseJsonBodyController { public class PerformApiController extends BaseJsonBodyController {
@Autowired @Autowired
private CheckAttendRecordService checkAttendRecordService; private CheckAttendRecordService checkAttendRecordService;
@Autowired @Autowired
...@@ -47,7 +68,7 @@ public class PerformApiController extends BaseJsonBodyController { ...@@ -47,7 +68,7 @@ public class PerformApiController extends BaseJsonBodyController {
/** /**
* 个人当天绩效统计 * 个人当天绩效统计
*/ */
@PostMapping(value = "perform/stat") @PostMapping(value = "stat")
public Rest<PerformStatInfo> performStat() { public Rest<PerformStatInfo> performStat() {
String busiDesc = "H5 个人绩效统计"; String busiDesc = "H5 个人绩效统计";
Rest<PerformStatInfo> rest = Rest.ok(busiDesc + " 【成功】"); Rest<PerformStatInfo> rest = Rest.ok(busiDesc + " 【成功】");
...@@ -65,21 +86,46 @@ public class PerformApiController extends BaseJsonBodyController { ...@@ -65,21 +86,46 @@ public class PerformApiController extends BaseJsonBodyController {
/** /**
* 个人当月绩效加分扣分列表 * 个人当月绩效加分扣分列表
*/ */
@PostMapping(value = "perform/list") @PostMapping(value = "list")
public Rest<List<PerformInfo>> performList(@RequestBody PerformReq performReq) { public Rest<Object> performList(@RequestBody PerformReq performReq) {
Rest<Object> rest = Rest.ok();
Map<String, Object> model = new HashMap<>();
Context context = this.getContext();
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
String busiDesc = "个人绩效列表"; String busiDesc = "个人绩效列表";
Rest<List<PerformInfo>> rest = Rest.ok(busiDesc + " 【成功】");
try { try {
if (ObjectUtils.isEmpty(performReq.getPerformStartDate())) { if (ObjectUtils.isEmpty(performReq.getPerformStartDate())) {
//未设置时间的情况,默认为当月 //未设置时间的情况,默认为当月
performReq.setPerformStartDate(DateUtil.beginOfMonth(new Date()).toDateStr()); performReq.setPerformStartDate(DateUtil.beginOfMonth(new Date()).toDateStr());
performReq.setPerformEndDate(DateUtil.today()); performReq.setPerformEndDate(DateUtil.today());
} }
PageInfo pageInfo = buildPageInfo(performReq);
//todo 查询全部扣分绩效 //todo 查询全部扣分绩效
if (PerformTypeEnum.全部.getValue().equals(performReq.getPerformType())) { if (PerformTypeEnum.全部.getValue().equals(performReq.getPerformType())) {
} else if (PerformTypeEnum.考勤绩效.getValue().equals(performReq.getPerformType())) { } else if (PerformTypeEnum.考勤绩效.getValue().equals(performReq.getPerformType())) {
CheckAttendRecordQuery query = new CheckAttendRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
Result<CheckAttendRecordEntity> result = checkAttendRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.考勤绩效.getValue());
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
} else if (PerformTypeEnum.评价差评绩效.getValue().equals(performReq.getPerformType())) { } else if (PerformTypeEnum.评价差评绩效.getValue().equals(performReq.getPerformType())) {
} else if (PerformTypeEnum.评价投诉绩效.getValue().equals(performReq.getPerformType())) { } else if (PerformTypeEnum.评价投诉绩效.getValue().equals(performReq.getPerformType())) {
...@@ -94,7 +140,6 @@ public class PerformApiController extends BaseJsonBodyController { ...@@ -94,7 +140,6 @@ public class PerformApiController extends BaseJsonBodyController {
throw new AppException("不支持当前绩效类型"); throw new AppException("不支持当前绩效类型");
} }
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
...@@ -107,7 +152,7 @@ public class PerformApiController extends BaseJsonBodyController { ...@@ -107,7 +152,7 @@ public class PerformApiController extends BaseJsonBodyController {
/** /**
* 详细 * 详细
*/ */
@PostMapping(value = "perform/info") @PostMapping(value = "info")
public Rest<PerformDetailInfo> performInfo(@RequestBody PerformReq performReq) { public Rest<PerformDetailInfo> performInfo(@RequestBody PerformReq performReq) {
String busiDesc = "个人绩效增减详细"; String busiDesc = "个人绩效增减详细";
Rest<PerformDetailInfo> rest = Rest.ok(busiDesc + " 【成功】"); Rest<PerformDetailInfo> rest = Rest.ok(busiDesc + " 【成功】");
...@@ -141,6 +186,29 @@ public class PerformApiController extends BaseJsonBodyController { ...@@ -141,6 +186,29 @@ public class PerformApiController extends BaseJsonBodyController {
return rest; return rest;
} }
protected PageInfo buildPageInfo(PerformReq query) {
PageInfo pageInfo = new PageInfo();
if (!ObjectUtils.isEmpty(query) && !ObjectUtils.isEmpty(query.getPage())) {
pageInfo.setCurrPage(query.getPage());
}
if (!ObjectUtils.isEmpty(query) && !ObjectUtils.isEmpty(query.getSize())) {
pageInfo.setPrePageResult(query.getSize());
}
return pageInfo;
}
protected void parsePageInfo(Map<String, Object> model, PageInfo pageInfo) {
model.put(TOTAL, pageInfo.getTotalResult());
model.put(PER_PAGE, pageInfo.getPrePageResult());
model.put(CURRENT_PAGE, pageInfo.getCurrPage());
model.put(LAST_PAGE, pageInfo.getTotalPage());
model.put(PAGEINFO_KEY, pageInfo);
}
public static void main(String[] args) { public static void main(String[] args) {
} }
......
...@@ -2,6 +2,7 @@ package com.mortals.xhx.daemon.task; ...@@ -2,6 +2,7 @@ package com.mortals.xhx.daemon.task;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.PageUtil; import cn.hutool.core.util.PageUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
...@@ -115,7 +116,7 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService { ...@@ -115,7 +116,7 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService {
List<AttendanceRecordHikEntity> attRecords = doorEventsRest.getData().getList().stream().map(item -> { List<AttendanceRecordHikEntity> attRecords = doorEventsRest.getData().getList().stream().map(item -> {
AttendanceRecordHikEntity recordHikEntity = new AttendanceRecordHikEntity(); AttendanceRecordHikEntity recordHikEntity = new AttendanceRecordHikEntity();
recordHikEntity.initAttrValue(); recordHikEntity.initAttrValue();
StaffEntity staffCache = staffService.getExtCache(item.getJobNo()); StaffEntity staffCache = staffService.getExtCache(StrUtil.padPre(item.getJobNo(), 8, "0"));
if (ObjectUtils.isEmpty(staffCache)) { if (ObjectUtils.isEmpty(staffCache)) {
log.info("staff is null !staffCode:{}",item.getJobNo()); log.info("staff is null !staffCode:{}",item.getJobNo());
return null; return null;
......
package com.mortals.xhx.daemon.task; package com.mortals.xhx.daemon.task;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
...@@ -57,8 +58,6 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -57,8 +58,6 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
@Autowired @Autowired
private DeptService deptService; private DeptService deptService;
@Autowired
private StaffService service;
@Autowired @Autowired
private AttendanceStatService attendanceStatService; private AttendanceStatService attendanceStatService;
...@@ -70,12 +69,11 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -70,12 +69,11 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
@Override @Override
public void excuteTask(ITask task) throws AppException { public void excuteTask(ITask task) throws AppException {
log.info("同步用户--部门");
try { try {
//同步部门 log.info("同步用户");
syncDepts();
//同步员工
syncPersons(); syncPersons();
log.info("同步部门");
syncDepts();
} catch (Exception e) { } catch (Exception e) {
log.error("同步人事异常", e); log.error("同步人事异常", e);
} }
...@@ -89,7 +87,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -89,7 +87,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
if (personRest.getCode() == YesNoEnum.YES.getValue()) { if (personRest.getCode() == YesNoEnum.YES.getValue()) {
List<PersonInfo> personInfoList = personRest.getData().getList(); List<PersonInfo> personInfoList = personRest.getData().getList();
for (PersonInfo personInfo : personInfoList) { for (PersonInfo personInfo : personInfoList) {
StaffEntity staffEntity = staffService.getExtCache(personInfo.getJobNo()); StaffEntity staffEntity = staffService.getExtCache(StrUtil.padPre(personInfo.getJobNo(), 8, "0"));
DeptEntity deptEntity = deptService.selectOne(new DeptQuery().deptCode(personInfo.getOrgIndexCode())); DeptEntity deptEntity = deptService.selectOne(new DeptQuery().deptCode(personInfo.getOrgIndexCode()));
// AttendanceVacationBalanceEntity balanceEntity = balanceService.selectOne(new AttendanceVacationBalanceQuery().staffId(staffEntity.getId())); // AttendanceVacationBalanceEntity balanceEntity = balanceService.selectOne(new AttendanceVacationBalanceQuery().staffId(staffEntity.getId()));
// AttendanceStatEntity statEntity = attendanceStatService.selectOne(new AttendanceStatQuery().staffId(staffEntity.getId())); // AttendanceStatEntity statEntity = attendanceStatService.selectOne(new AttendanceStatQuery().staffId(staffEntity.getId()));
...@@ -111,7 +109,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -111,7 +109,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
staffEntity.setPhoneNumber(personInfo.getPhoneNo()); staffEntity.setPhoneNumber(personInfo.getPhoneNo());
staffEntity.setCreateUserId(1L); staffEntity.setCreateUserId(1L);
staffEntity.setCreateTime(new Date()); staffEntity.setCreateTime(new Date());
service.save(staffEntity); staffService.save(staffEntity);
AttendanceVacationBalanceEntity balanceEntity = new AttendanceVacationBalanceEntity(); AttendanceVacationBalanceEntity balanceEntity = new AttendanceVacationBalanceEntity();
balanceEntity.initAttrValue(); balanceEntity.initAttrValue();
...@@ -181,7 +179,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -181,7 +179,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
staffEntity.setPhoneNumber(personInfo.getPhoneNo()); staffEntity.setPhoneNumber(personInfo.getPhoneNo());
staffEntity.setUpdateUserId(1L); staffEntity.setUpdateUserId(1L);
staffEntity.setUpdateTime(new Date()); staffEntity.setUpdateTime(new Date());
service.update(staffEntity); staffService.update(staffEntity);
//统计各级部门员工数量 //统计各级部门员工数量
String ancestor = deptEntity.getAncestors().split(",", 2)[1]; String ancestor = deptEntity.getAncestors().split(",", 2)[1];
String[] ancestors = ancestor.split(","); String[] ancestors = ancestor.split(",");
......
...@@ -8,7 +8,9 @@ import org.mybatis.spring.support.SqlSessionDaoSupport; ...@@ -8,7 +8,9 @@ import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 全部类型核查信息Dao * 全部类型核查信息Dao
...@@ -28,7 +30,8 @@ public class CheckAllRecordDaoImpl extends SqlSessionDaoSupport implements Check ...@@ -28,7 +30,8 @@ public class CheckAllRecordDaoImpl extends SqlSessionDaoSupport implements Check
} }
@Override @Override
public List<CheckAllRecordVo> getAllCheckRecord(CheckAllRecordQuery query) { public List<CheckAllRecordVo> getAllCheckRecord(CheckAllRecordQuery checkAllRecordQuery) {
return this.getSqlSession().selectList(this.getSqlId("getList"), query);
return this.getSqlSession().selectList(this.getSqlId("getList"), checkAllRecordQuery);
} }
} }
package com.mortals.xhx.module.check.model; package com.mortals.xhx.module.check.model;
import lombok.Data;
@Data
public class CheckAllRecordQuery { public class CheckAllRecordQuery {
/** /**
* 员工ID * 员工ID
...@@ -13,9 +10,62 @@ public class CheckAllRecordQuery { ...@@ -13,9 +10,62 @@ public class CheckAllRecordQuery {
*/ */
private Integer checkStatus; private Integer checkStatus;
private String createTimeStart; private String checkTimeStart;
private String createTimeEnd; private String checkTimeEnd;
private Long createUserId; private Long createUserId;
/**
* 扣分方式(1.系统自动,2.人工添加,3.大厅巡查)
*/
private Integer subMethod;
public Long getStaffId() {
return staffId;
}
public void setStaffId(Long staffId) {
this.staffId = staffId;
}
public Integer getCheckStatus() {
return checkStatus;
}
public void setCheckStatus(Integer checkStatus) {
this.checkStatus = checkStatus;
}
public String getCheckTimeStart() {
return checkTimeStart;
}
public void setCheckTimeStart(String checkTimeStart) {
this.checkTimeStart = checkTimeStart;
}
public String getCheckTimeEnd() {
return checkTimeEnd;
}
public void setCheckTimeEnd(String checkTimeEnd) {
this.checkTimeEnd = checkTimeEnd;
}
public Long getCreateUserId() {
return createUserId;
}
public void setCreateUserId(Long createUserId) {
this.createUserId = createUserId;
}
public Integer getSubMethod() {
return subMethod;
}
public void setSubMethod(Integer subMethod) {
this.subMethod = subMethod;
}
} }
package com.mortals.xhx.module.check.service.impl; package com.mortals.xhx.module.check.service.impl;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.check.dao.CheckAllRecordDao; import com.mortals.xhx.module.check.dao.CheckAllRecordDao;
import com.mortals.xhx.module.check.model.CheckAllRecordQuery; import com.mortals.xhx.module.check.model.CheckAllRecordQuery;
import com.mortals.xhx.module.check.model.vo.CheckAllRecordVo; import com.mortals.xhx.module.check.model.vo.CheckAllRecordVo;
...@@ -8,6 +9,8 @@ import lombok.extern.slf4j.Slf4j; ...@@ -8,6 +9,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List; import java.util.List;
@Service("checkAllRecordService") @Service("checkAllRecordService")
...@@ -19,6 +22,16 @@ public class CheckAllRecordServiceImpl implements CheckAllRecordService { ...@@ -19,6 +22,16 @@ public class CheckAllRecordServiceImpl implements CheckAllRecordService {
@Override @Override
public List<CheckAllRecordVo> getAllCheckRecord(CheckAllRecordQuery query) { public List<CheckAllRecordVo> getAllCheckRecord(CheckAllRecordQuery query) {
if(StringUtils.isEmpty(query.getCheckTimeStart())||StringUtils.isEmpty(query.getCheckTimeStart())){
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 1);
String startTime = format.format(calendar.getTime());
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
String endTime = format.format(calendar.getTime());
query.setCheckTimeStart(startTime);
query.setCheckTimeEnd(endTime);
}
return checkAllRecordDao.getAllCheckRecord(query); return checkAllRecordDao.getAllCheckRecord(query);
} }
} }
package com.mortals.xhx.module.staff.service.impl; package com.mortals.xhx.module.staff.service.impl;
import cn.hutool.core.util.StrUtil;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.SecurityUtil;
import com.mortals.xhx.base.system.role.model.RoleUserQuery;
import com.mortals.xhx.base.system.role.service.RoleUserService;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.StaffSatusEnum; import com.mortals.xhx.common.code.StaffSatusEnum;
import com.mortals.xhx.common.code.StaffTypeEnum; import com.mortals.xhx.common.code.StaffTypeEnum;
import com.mortals.xhx.common.code.StatusEnum; import com.mortals.xhx.common.code.StatusEnum;
import com.mortals.xhx.common.code.UserStatus;
import com.mortals.xhx.module.staff.dao.StaffDao; import com.mortals.xhx.module.staff.dao.StaffDao;
import com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl; import com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl;
import com.mortals.xhx.module.staff.dao.ibatis.StaffLeaveDaoImpl; import com.mortals.xhx.module.staff.dao.ibatis.StaffLeaveDaoImpl;
...@@ -13,8 +22,10 @@ import com.mortals.xhx.module.staff.model.vo.StaffInfoVo; ...@@ -13,8 +22,10 @@ import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -29,10 +40,17 @@ import java.util.stream.Collectors; ...@@ -29,10 +40,17 @@ import java.util.stream.Collectors;
@Service("staffService") @Service("staffService")
public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, StaffEntity, Long> implements StaffService { public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, StaffEntity, Long> implements StaffService {
@Autowired
private UserService userService;
@Autowired
private RoleUserService roleUserService;
@Override @Override
protected String getExtKey(StaffEntity data) { protected String getExtKey(StaffEntity data) {
//工号作为redis 扩展key //工号作为redis 扩展key
return data.getWorkNum(); return StrUtil.padPre(data.getWorkNum(), 8, "0");
// return "1000"+data.getWorkNum();
} }
@Override @Override
...@@ -68,4 +86,51 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -68,4 +86,51 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
return staffEntities.size(); return staffEntities.size();
} }
@Override
protected void saveAfter(StaffEntity entity, Context context) throws AppException {
try {
UserEntity userEntity = new UserEntity();
if (ObjectUtils.isEmpty(entity.getLoginName())) {
//姓名加工号作为登录名
entity.setLoginName(entity.getName() + entity.getWorkNum());
}
if (ObjectUtils.isEmpty(entity.getLoginPwd())) {
//设置初始密码
entity.setLoginPwd("123456");
}
userEntity.setLoginName(StrUtil.cleanBlank(entity.getLoginName()));
userEntity.setRealName(entity.getName());
userEntity.setUserType(2);
userEntity.setSiteIds("1");
userEntity.setAreaCodes("511500000000");
userEntity.setStatus(UserStatus.NORMAL.getValue());
userEntity.setCreateUserId(this.getContextUserId(context));
userEntity.setCreateTime(new Date());
userEntity.setCustomerId(entity.getId());
userEntity.setLoginPwd(SecurityUtil.md5DoubleEncoding(entity.getLoginPwd()));
int insert = userService.getUserDao().insert(userEntity);
if (insert > 0) {
RoleUserQuery roleUserQuery = new RoleUserQuery();
roleUserQuery.setUserId(userEntity.getId());
roleUserQuery.setRoleIdList(Arrays.asList(4L));
roleUserService.assignRoleToUser(roleUserQuery);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
super.saveAfter(entity, context);
}
public static void main(String[] args) {
System.out.println("1" + StrUtil.padPre("125", 7, "0"));
}
} }
\ No newline at end of file
...@@ -5,45 +5,51 @@ ...@@ -5,45 +5,51 @@
<select id="getList" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="com.mortals.xhx.module.check.model.vo.CheckAllRecordVo"> <select id="getList" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="com.mortals.xhx.module.check.model.vo.CheckAllRecordVo">
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,1 AS checkType FROM mortals_xhx_check_attend_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,1 AS checkType FROM mortals_xhx_check_attend_record WHERE 1=1
<if test="checkStatus != null and !checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="staffId != null and !staffId!=''"> AND staffId = #{staffId} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="createTimeStart != null and !createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeEnd != null and !createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and !createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,2 AS checkType FROM mortals_xhx_check_effect_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,2 AS checkType FROM mortals_xhx_check_effect_record WHERE 1=1
<if test="checkStatus != null and !checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="staffId != null and !staffId!=''"> AND staffId = #{staffId} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="createTimeStart != null and !createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeEnd != null and !createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and !createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,3 AS checkType FROM mortals_xhx_check_complain_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,3 AS checkType FROM mortals_xhx_check_complain_record WHERE 1=1
<if test="checkStatus != null and !checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="staffId != null and !staffId!=''"> AND staffId = #{staffId} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="createTimeStart != null and !createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeEnd != null and !createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and !createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,4 AS checkType FROM mortals_xhx_check_gowork_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,4 AS checkType FROM mortals_xhx_check_gowork_record WHERE 1=1
<if test="checkStatus != null and !checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="staffId != null and !staffId!=''"> AND staffId = #{staffId} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="createTimeStart != null and !createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeEnd != null and !createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and !createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,5 AS checkType FROM mortals_xhx_check_review_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,5 AS checkType FROM mortals_xhx_check_review_record WHERE 1=1
<if test="checkStatus != null and !checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="staffId != null and !staffId!=''"> AND staffId = #{staffId} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="createTimeStart != null and !createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeEnd != null and !createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and !createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,6 AS checkType FROM mortals_xhx_check_other_record WHERE 1=1 SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,6 AS checkType FROM mortals_xhx_check_other_record WHERE 1=1
<if test="checkStatus != null and !checkStatus!=''"> AND checkStatus = #{checkStatus} </if> <if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="staffId != null and !staffId!=''"> AND staffId = #{staffId} </if> <if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="createTimeStart != null and !createTimeStart!=''"> AND createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="createTimeEnd != null and !createTimeEnd!=''"> AND createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if> <if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and !createUserId!=''"> AND createUserId = #{createUserId} </if> <if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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