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

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