Commit 5b4841a7 authored by 姬鋆屾's avatar 姬鋆屾

parent 60cf88e5
...@@ -191,6 +191,9 @@ export default { ...@@ -191,6 +191,9 @@ export default {
month--; //否则,只减去月份 month--; //否则,只减去月份
return new Date(year, month, day); return new Date(year, month, day);
}, },
formatteSec(row, column, val) {
return val ? (val / 60 / 60 / 24).toFixed(3) + "" : "--";
},
// 格式化单元格数据 // 格式化单元格数据
formatter(row, column, val) { formatter(row, column, val) {
const content = formatter(this.tableData, column, val); const content = formatter(this.tableData, column, val);
...@@ -334,7 +337,7 @@ export default { ...@@ -334,7 +337,7 @@ export default {
}, },
// 查看天数 // 查看天数
formatterDay(row, column, val) { formatterDay(row, column, val) {
return ( return val ? (
<el-tag <el-tag
onClick={() => { onClick={() => {
this.handleCountDays(row, column, val); this.handleCountDays(row, column, val);
...@@ -342,6 +345,8 @@ export default { ...@@ -342,6 +345,8 @@ export default {
> >
{val} {val}
</el-tag> </el-tag>
) : (
"不限额"
); );
}, },
// 格式化单元格数据 // 格式化单元格数据
......
...@@ -127,3 +127,12 @@ export const getMinu = (s1, s2) => { ...@@ -127,3 +127,12 @@ export const getMinu = (s1, s2) => {
if (ms < 0) return 0; if (ms < 0) return 0;
return Math.floor(ms / 1000 / 60); //分钟 return Math.floor(ms / 1000 / 60); //分钟
}; };
// 求两个日期的 秒差
export const getSec = (s1, s2) => {
var reDate = /\d{4}-\d{1,2}-\d{1,2} /;
s1 = new Date((reDate.test(s1) ? s1 : "2023-01-01 " + s1).replace(/-/g, "/"));
s2 = new Date((reDate.test(s2) ? s2 : "2023-01-01 " + s2).replace(/-/g, "/"));
var ms = s2.getTime() - s1.getTime();
if (ms < 0) return 0;
return Math.floor(ms / 1000); //秒
};
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
:page-size="currSize" :page-size="currSize"
:page-sizes="[10, 20, 50, 100, 200]" :page-sizes="[10, 20, 50, 100, 200]"
layout="sizes, total, prev, pager, next, jumper" layout="sizes, total, prev, pager, next, jumper"
:total="total"> :total="total"
>
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
...@@ -27,53 +28,49 @@ export default { ...@@ -27,53 +28,49 @@ export default {
}, },
}, },
watch: { watch: {
'$route'(route) { $route(route) {
console.log(route);
this.initPage(route.query); this.initPage(route.query);
} },
}, },
created() { created() {
this.initPage(this.$route.query); this.initPage(this.$route.query);
}, },
methods: { methods: {
initPage(query) { initPage(query) {
console.log("query",query) this.currPage = parseInt(query["page"]) || 1;
this.currPage = parseInt(query['page']) || 1; this.currSize = parseInt(query["size"]) || this.prePageResult;
this.currSize = parseInt(query['size']) || this.prePageResult;
}, },
changeHash(key, val) { changeHash(key, val) {
let {path, query} = this.$route; let { path, query } = this.$route;
this.$router.push({ this.$router.push({
path: path, path: path,
query: Object.assign({}, query, {[`${key}`]: val}) query: Object.assign({}, query, { [`${key}`]: val }),
}) });
}, },
handleSizeChange(currSize) { handleSizeChange(currSize) {
console.log("currsize"+currSize) console.log("currsize" + currSize);
this.changeHash('size', currSize); this.changeHash("size", currSize);
}, },
handleCurrentChange(currPage) { handleCurrentChange(currPage) {
this.changeHash('page', currPage); this.changeHash("page", currPage);
}, },
}, },
data() { data() {
return { return {
currPage: 1, currPage: 1,
currSize: 10, currSize: 10,
} };
} },
} };
</script> </script>
<style lang="less"> <style lang="less">
.pagination-wapper{ .pagination-wapper {
background: #fff; background: #fff;
margin-top: 10px; margin-top: 10px;
.el-pagination{ .el-pagination {
margin-left: auto; margin-left: auto;
} }
} }
</style> </style>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
@click="$emit('edit', row)" @click="$emit('edit', row)"
title="核查" title="核查"
style="margin-left: 0;margin-right: 5px" style="margin-left: 0;margin-right: 5px"
>核查</el-button >{{ text ? text : "核查" }}</el-button
> >
<el-button <el-button
v-if="chuli" v-if="chuli"
...@@ -100,6 +100,10 @@ export default { ...@@ -100,6 +100,10 @@ export default {
required: true, required: true,
default: () => {}, default: () => {},
}, },
text: {
type: String,
default: "",
},
}, },
components: { components: {
Confirm, Confirm,
......
...@@ -64,11 +64,11 @@ ...@@ -64,11 +64,11 @@
/> />
<Field <Field
label="时长(单位:分钟)" label="时长(单位:)"
disabled disabled
prop="duration" prop="duration"
v-model="form.duration" v-model="form.duration"
placeholder="请输入时长(分钟)" placeholder="请输入时长()"
:maxLength="4" :maxLength="4"
/> />
<Field <Field
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import valid from "@/assets/utils/vaild.js"; import valid from "@/assets/utils/vaild.js";
import { getMinu } from "@/assets/utils/dateFormat.js"; import { getMinu, getSec } from "@/assets/utils/dateFormat.js";
export default { export default {
name: "AttendanceLeaveRecordDetail", name: "AttendanceLeaveRecordDetail",
mixins: [form], mixins: [form],
...@@ -280,7 +280,7 @@ export default { ...@@ -280,7 +280,7 @@ export default {
changedate(val) { changedate(val) {
if (this.form.startTime && this.form.endTime) { if (this.form.startTime && this.form.endTime) {
if (this.form.endTime.valueOf() > this.form.startTime.valueOf()) { if (this.form.endTime.valueOf() > this.form.startTime.valueOf()) {
this.form.duration = getMinu(this.form.startTime, this.form.endTime); this.form.duration = getSec(this.form.startTime, this.form.endTime);
} else { } else {
this.$message.closeAll(); this.$message.closeAll();
this.$message.error("结束日期需大于请假日期"); this.$message.error("结束日期需大于请假日期");
......
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
{ label: "结束时间", prop: "endTime", formatter: this.formatterDate }, { label: "结束时间", prop: "endTime", formatter: this.formatterDate },
{ label: "时长", prop: "duration", formatter: this.formatter }, { label: "时长", prop: "duration", formatter: this.formatteSec },
// {label: "审批负责人Id", prop: "approverId", formatter: this.formatter}, // {label: "审批负责人Id", prop: "approverId", formatter: this.formatter},
......
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig" notAdd notDel> <LayoutTable :data="tableData" :config="tableConfig" notAdd notDel>
<el-button type="primary" @click="doExport" :disabled="isExport" <el-button
size="mini" slot="table-head-left2">导出</el-button> type="primary"
@click="doExport"
:disabled="isExport"
size="mini"
slot="table-head-left2"
>导出</el-button
>
</LayoutTable> </LayoutTable>
<drawer-show ref="drawerform" @ok="getData" /> <drawer-show ref="drawerform" @ok="getData" />
</div> </div>
...@@ -15,72 +21,104 @@ import table from "@/assets/mixins/table"; ...@@ -15,72 +21,104 @@ import table from "@/assets/mixins/table";
export default { export default {
name: "AttendanceVacationBalanceList", name: "AttendanceVacationBalanceList",
components: { components: {
drawerShow drawerShow,
}, },
mixins: [table], mixins: [table],
created() { created() {},
},
methods: { methods: {
// 导出 // 导出
doExport(){ doExport() {
this.isExport = true; this.isExport = true;
let params = {} let params = {};
for(let value of this.config.search){ for (let value of this.config.search) {
if(this.query[value.name]){ if (this.query[value.name]) {
params[value.name] = this.query[value.name] params[value.name] = this.query[value.name];
} }
} }
if(this.selection.length>0){ if (this.selection.length > 0) {
params['idList'] = this.selection params["idList"] = this.selection;
} }
this.$download("/attendance/vacation/balance/exportExcel", { this.$download(
...params "/attendance/vacation/balance/exportExcel",
}, { type: "excel" }).then(() => this.isExport = false).catch(error => { {
...params,
},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false; this.isExport = false;
this.$message.error(error.message); this.$message.error(error.message);
}) });
}, },
/** 查看不同类型假期记录 */ /** 查看不同类型假期记录 */
handleCountDays(row,column,val){ handleCountDays(row, column, val) {
this.$refs.drawerform.view({ this.$refs.drawerform.view({
type:this.util_formatter('AllHolidays',column.property), type: this.util_formatter("AllHolidays", column.property),
staffId:row.staffId, staffId: row.staffId,
id:row.id, id: row.id,
val val,
}) });
} },
}, },
data() { data() {
return { return {
config: { config: {
isshowTabPane:true, isshowTabPane: true,
search: [ search: [
{ {
name: "deptId", name: "deptId",
type: "select", type: "select",
label: "全部部门", label: "全部部门",
fuzzy: true fuzzy: true,
}, },
{ {
name: "staffName", name: "staffName",
type: "text", type: "text",
label: "员工姓名", label: "员工姓名",
fuzzy: true fuzzy: true,
}, },
], ],
columns: [ columns: [
{type: "selection", width: 60}, { type: "selection", width: 60 },
{type: "index",label: "序号",width: 50}, { type: "index", label: "序号", width: 50 },
{label: "员工姓名", prop: "staffName"}, { label: "员工姓名", prop: "staffName" },
{label: "部门名称", prop: "deptName"}, { label: "部门名称", prop: "deptName" },
{label: "入职时间", prop: "entryTime", formatter: this.formatterDate}, {
{label: "事假(天)", prop: "personalLeaveDays", formatter: this.formatterDay}, label: "入职时间",
{label: "调休(天)", prop: "compensatedLeaveDays", formatter: this.formatterDay}, prop: "entryTime",
{label: "病假(天)", prop: "sickLeaveDays", formatter: this.formatterDay}, formatter: this.formatterDate,
{label: "年假(天)", prop: "annualLeaveDays", formatter: this.formatterDay}, },
{label: "婚假(天)", prop: "marriageLeaveDays", formatter: this.formatterDay}, {
{label: "哺乳假(天)", prop: "breastfeedingLeaveDays", formatter: this.formatterDay}, label: "事假(天)",
prop: "personalLeaveDays",
formatter: this.formatterDay,
},
{
label: "调休(天)",
prop: "compensatedLeaveDays",
formatter: this.formatterDay,
},
{
label: "病假(天)",
prop: "sickLeaveDays",
formatter: this.formatterDay,
},
{
label: "年假(天)",
prop: "annualLeaveDays",
formatter: this.formatterDay,
},
{
label: "婚假(天)",
prop: "marriageLeaveDays",
formatter: this.formatterDay,
},
{
label: "哺乳假(天)",
prop: "breastfeedingLeaveDays",
formatter: this.formatterDay,
},
// {label: "创建用户", prop: "createUserId", formatter: this.formatter}, // {label: "创建用户", prop: "createUserId", formatter: this.formatter},
// { // {
// label: "操作", // label: "操作",
...@@ -93,9 +131,9 @@ export default { ...@@ -93,9 +131,9 @@ export default {
// } // }
// } // }
], ],
isExport:false isExport: false,
} },
} };
} },
} };
</script> </script>
...@@ -301,6 +301,7 @@ export default { ...@@ -301,6 +301,7 @@ export default {
noDel noDel
noEdit noEdit
reCheck reCheck
text={"考勤核查"}
noView noView
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
......
...@@ -251,7 +251,6 @@ export default { ...@@ -251,7 +251,6 @@ export default {
}, },
}, },
{ label: "投诉设备", prop: "complainDevice" }, { label: "投诉设备", prop: "complainDevice" },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleName" },
...@@ -308,6 +307,7 @@ export default { ...@@ -308,6 +307,7 @@ export default {
noEdit noEdit
reCheck reCheck
noView noView
text={"投诉核查"}
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
...@@ -338,6 +338,7 @@ export default { ...@@ -338,6 +338,7 @@ export default {
noEdit noEdit
reCheck reCheck
noView noView
text={"效能核查"}
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
...@@ -296,6 +296,7 @@ export default { ...@@ -296,6 +296,7 @@ export default {
noEdit noEdit
reCheck reCheck
noView noView
text={"办件核查"}
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
...@@ -304,6 +304,7 @@ export default { ...@@ -304,6 +304,7 @@ export default {
noEdit noEdit
reCheck reCheck
noView noView
text={"其他核查"}
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
...@@ -305,6 +305,7 @@ export default { ...@@ -305,6 +305,7 @@ export default {
noEdit noEdit
reCheck reCheck
noView noView
text={"差评核查"}
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
...@@ -74,8 +74,8 @@ export default { ...@@ -74,8 +74,8 @@ export default {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
{ {
name: "feedbackTimeStart", name: "feedbackTimeStartStart",
type: "datetime", type: "date",
label: "请选择日期", label: "请选择日期",
fuzzy: false, fuzzy: false,
}, },
......
...@@ -451,6 +451,7 @@ export default { ...@@ -451,6 +451,7 @@ export default {
let arr = this.ruleArr.filter((v) => v.id == val); let arr = this.ruleArr.filter((v) => v.id == val);
this.form.score = arr && arr[0].score; this.form.score = arr && arr[0].score;
this.form.checkStatus == 1 ? (this.form.checkStatus = 2) : ""; this.form.checkStatus == 1 ? (this.form.checkStatus = 2) : "";
this.form.subAddType = arr[0].subAddType;
}, },
cateChange() { cateChange() {
this.$post("/perform/rules/list", { this.$post("/perform/rules/list", {
......
...@@ -157,7 +157,6 @@ export default { ...@@ -157,7 +157,6 @@ export default {
methods: { methods: {
switchChange() { switchChange() {
console.log(this.switchValue);
this.switchValue == 0 this.switchValue == 0
? (this.typeArr = [ ? (this.typeArr = [
{ {
...@@ -171,11 +170,14 @@ export default { ...@@ -171,11 +170,14 @@ export default {
sortKind: "desc", sortKind: "desc",
}, },
]); ]);
this.getKaoQin(this.cateObj.id); this.getKaoQin(this.cateObj.id);
}, },
handleClick(val, i) { handleClick(val, i) {
this.index = i; this.index = i;
this.cateObj = val; this.cateObj = val;
this.$route.query.page = 1;
this.query.page = 1;
this.getKaoQin(val.id); this.getKaoQin(val.id);
}, },
addRules() { addRules() {
...@@ -225,6 +227,7 @@ export default { ...@@ -225,6 +227,7 @@ export default {
categoryId, categoryId,
type: this.activeName, type: this.activeName,
page: this.query.page, page: this.query.page,
size: this.query.size,
orderColList: this.typeArr, orderColList: this.typeArr,
andConditionList: [ andConditionList: [
{ content: `%${this.searchValue}%`, name: `%${this.searchValue}%` }, { content: `%${this.searchValue}%`, name: `%${this.searchValue}%` },
......
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
created() {}, created() {},
methods: { methods: {
handleClick(tab, event) { handleClick(tab, event) {
this.$route.query.page = 1;
// this.$forceUpdate(this.activeName); // this.$forceUpdate(this.activeName);
}, },
}, },
......
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" notAdd :config="tableConfig"> </LayoutTable>
</LayoutTable>
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</div> </div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "StaffOnboardList", name: "StaffOnboardList",
components: { components: {
dialogShow dialogShow,
},
mixins: [table],
created() {
}, },
mixins: [table],
created() {},
methods: { methods: {
/** 重写新增方法 */ /** 重写新增方法 */
toAdd(row) { toAdd(row) {
...@@ -33,43 +30,63 @@ ...@@ -33,43 +30,63 @@
toView(row) { toView(row) {
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
}, },
data() { data() {
return { return {
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [],
],
columns: [ columns: [
{type: "selection", width: 60}, { type: "selection", width: 60 },
{type: "index",label: "序号",width: 50}, { type: "index", label: "序号", width: 50 },
{label: "员工姓名", prop: "staffName"}, { label: "员工姓名", prop: "staffName" },
{label: "性别", prop: "gender",formatter: this.formatter}, { label: "性别", prop: "gender", formatter: this.formatter },
{label: "政治面貌 ", prop: "politicalstatus",formatter: this.formatter}, {
label: "政治面貌 ",
prop: "politicalstatus",
formatter: this.formatter,
},
{label: "员工类型", prop: "staffType",formatter: this.formatter}, { label: "员工类型", prop: "staffType", formatter: this.formatter },
{label: "员工状态", prop: "onBoardStatus",formatter: this.formatter}, {
label: "员工状态",
prop: "onBoardStatus",
formatter: this.formatter,
},
{label: "入职时间", prop: "entryDate", formatter: this.formatterDate}, {
label: "入职时间",
prop: "entryDate",
formatter: this.formatterDate,
},
{label: "创建用户", prop: "createUserId", formatter: this.formatter}, {
label: "创建用户",
prop: "createUserId",
formatter: this.formatter,
},
{ {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: row => { formatter: (row) => {
return ( return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <table-buttons
noAdd
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
); );
} },
} },
] ],
} },
};
}
}; };
},
};
</script> </script>
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