|
@@ -1,15 +1,22 @@
|
|
<template>
|
|
<template>
|
|
- <div v-loading="loading">
|
|
|
|
- <workpoints :initia_arr="initia_arr" v-if="!loading" :initia_head="initia_head" :obj="obj" @initia="initia" />
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <div v-loading="loading" v-if="ding_enable">
|
|
|
|
+ <workpoints :initia_arr="initia_arr" v-if="!loading" :initia_head="initia_head" :obj="obj" @initia="initia" />
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else class="all">
|
|
|
|
+ <div class="nullD">请在对应企业的钉钉管理后台中开启<span class="blue"> [考勤打卡]</span>功能</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import workpoints from "@/components/publics/workpoints";
|
|
import workpoints from "@/components/publics/workpoints";
|
|
export default {
|
|
export default {
|
|
|
|
+ components: {workpoints},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
loading: false,
|
|
loading: false,
|
|
|
|
+ ding_enable:true,
|
|
initia_head: {
|
|
initia_head: {
|
|
initial_suername: "考勤积分",
|
|
initial_suername: "考勤积分",
|
|
initial_suertext: "以下考勤奖扣分,均为B分",
|
|
initial_suertext: "以下考勤奖扣分,均为B分",
|
|
@@ -25,13 +32,13 @@ export default {
|
|
age: "0",
|
|
age: "0",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- {
|
|
|
|
- initialName: "月度全勤,每月加分",
|
|
|
|
- initia_mark: false,
|
|
|
|
- initia_input: {
|
|
|
|
- age: "0",
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // initialName: "月度全勤,每月加分",
|
|
|
|
+ // initia_mark: false,
|
|
|
|
+ // initia_input: {
|
|
|
|
+ // age: "0",
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
{
|
|
{
|
|
initialName: "正常打卡,每次加分",
|
|
initialName: "正常打卡,每次加分",
|
|
initia_mark: false,
|
|
initia_mark: false,
|
|
@@ -46,11 +53,13 @@ export default {
|
|
age: "0",
|
|
age: "0",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ {
|
|
|
|
+ initialName: "旷工缺席,每次扣分",
|
|
|
|
+ initia_mark: false,
|
|
|
|
+ initia_input: {
|
|
|
|
+ age: "0",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
{
|
|
{
|
|
initialName: "上班迟到,每次扣分",
|
|
initialName: "上班迟到,每次扣分",
|
|
initia_mark: false,
|
|
initia_mark: false,
|
|
@@ -65,48 +74,43 @@ export default {
|
|
age: "0",
|
|
age: "0",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ // {
|
|
|
|
+ // initialName: "加班,每小时加分",
|
|
|
|
+ // initia_mark: false,
|
|
|
|
+ // initia_input: {
|
|
|
|
+ // age: "0",
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
{
|
|
{
|
|
- initialName: "旷工缺席,每次扣分",
|
|
|
|
|
|
+ initialName: "加班,每满一天加分",
|
|
initia_mark: false,
|
|
initia_mark: false,
|
|
initia_input: {
|
|
initia_input: {
|
|
age: "0",
|
|
age: "0",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
-
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- initialName: "加班,每小时加分",
|
|
|
|
- initia_mark: false,
|
|
|
|
- initia_input: {
|
|
|
|
- age: "0",
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- initialName: "请假,每小时扣分",
|
|
|
|
- initia_mark: false,
|
|
|
|
- initia_input: {
|
|
|
|
- age: "0",
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // initialName: "请假,每小时扣分",
|
|
|
|
+ // initia_mark: false,
|
|
|
|
+ // initia_input: {
|
|
|
|
+ // age: "0",
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
],
|
|
],
|
|
- obj: {
|
|
|
|
- month_full_ad: "", //>=0
|
|
|
|
- normal: "", //>=0
|
|
|
|
- no_sign: "", //<=0
|
|
|
|
- absent: "", //<=0
|
|
|
|
- on_duty_late: "", //<=0
|
|
|
|
- off_duty_early: "", //<=0
|
|
|
|
- ot_per_hour: "", //>=0
|
|
|
|
- leave_per_hour: "", //<=0
|
|
|
|
- },
|
|
|
|
|
|
+ obj: {
|
|
|
|
+ // ding_enable:'',
|
|
|
|
+ enable:'',
|
|
|
|
+ // month_full_ad: "", //>=0
|
|
|
|
+ normal: "", //>=0
|
|
|
|
+ no_sign: "", //<=0
|
|
|
|
+ absent: "", //<=0
|
|
|
|
+ on_duty_late: "", //<=0
|
|
|
|
+ off_duty_early: "", //<=0
|
|
|
|
+ // ot_per_hour: "", //>=0
|
|
|
|
+ ot_per_day:'',
|
|
|
|
+ // leave_per_hour: "", //<=0
|
|
|
|
+ },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- components: {
|
|
|
|
- workpoints,
|
|
|
|
- },
|
|
|
|
- created() {},
|
|
|
|
mounted() {
|
|
mounted() {
|
|
this.cheak_ax();
|
|
this.cheak_ax();
|
|
},
|
|
},
|
|
@@ -114,14 +118,16 @@ export default {
|
|
initia(ok) {
|
|
initia(ok) {
|
|
var objs = {};
|
|
var objs = {};
|
|
objs.enable = ok[0].sj;
|
|
objs.enable = ok[0].sj;
|
|
- objs.month_full_ad =ok[1].sj; //>=0
|
|
|
|
- objs.normal = ok[2].sj; //>=0
|
|
|
|
- objs.no_sign = ok[3].sj>0? -ok[3].sj:ok[3].sj; //<=0
|
|
|
|
- objs.absent = ok[6].sj>0? -ok[6].sj:ok[6].sj; //<=0
|
|
|
|
- objs.on_duty_late = ok[4].sj>0? -ok[4].sj:ok[4].sj; //<=0
|
|
|
|
- objs.off_duty_early = ok[5].sj>0? -ok[5].sj:ok[5].sj; //<=0
|
|
|
|
- objs.ot_per_hour = ok[7].sj; //>=0
|
|
|
|
- objs.leave_per_hour = ok[8].sj>0? -ok[8].sj:ok[8].sj; //<=0
|
|
|
|
|
|
+ objs.normal = ok[1].sj; //>=0
|
|
|
|
+ objs.no_sign = ok[2].sj>0? ok[2].sj:ok[2].sj; //<=0
|
|
|
|
+ objs.absent = ok[3].sj>0? ok[3].sj:ok[3].sj; //<=0
|
|
|
|
+ objs.on_duty_late = ok[4].sj>0? ok[4].sj:ok[4].sj; //<=0
|
|
|
|
+ objs.off_duty_early = ok[5].sj>0? ok[5].sj:ok[5].sj; //<=0
|
|
|
|
+ objs.ot_per_day =ok[6].sj; //>=0
|
|
|
|
+
|
|
|
|
+ // objs.ot_per_hour = ok[7].sj; //>=0
|
|
|
|
+ // objs.leave_per_hour = ok[8].sj>0? -ok[8].sj:ok[8].sj; //<=0
|
|
|
|
+ // objs.month_full_ad = 0
|
|
this.$axios('post',"/api/ad/update",objs).then((res) => {
|
|
this.$axios('post',"/api/ad/update",objs).then((res) => {
|
|
if (res.data.code == 1) {
|
|
if (res.data.code == 1) {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -137,20 +143,27 @@ export default {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
this.$axios('get',"/api/ad/info").then((res) => {
|
|
this.$axios('get',"/api/ad/info").then((res) => {
|
|
var arr = [],config=res.data.data;
|
|
var arr = [],config=res.data.data;
|
|
- config.no_sign=config.no_sign-(config.no_sign+config.no_sign);
|
|
|
|
- config.absent=config.absent-(config.absent+config.absent);
|
|
|
|
- config.on_duty_late=config.on_duty_late-(config.on_duty_late+config.on_duty_late);
|
|
|
|
- config.off_duty_early=config.off_duty_early-(config.off_duty_early+config.off_duty_early);
|
|
|
|
- config.leave_per_hour=config.leave_per_hour-(config.leave_per_hour+config.leave_per_hour);
|
|
|
|
|
|
+ this.ding_enable=config.ding_enable==0? false:true;
|
|
|
|
+ if(!this.ding_enable){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ // config.no_sign=config.no_sign-(config.no_sign+config.no_sign);
|
|
|
|
+ // config.absent=config.absent-(config.absent+config.absent);
|
|
|
|
+ // config.on_duty_late=config.on_duty_late-(config.on_duty_late+config.on_duty_late);
|
|
|
|
+ // config.off_duty_early=config.off_duty_early-(config.off_duty_early+config.off_duty_early);
|
|
|
|
+ // config.leave_per_hour=config.leave_per_hour-(config.leave_per_hour+config.leave_per_hour);
|
|
|
|
+
|
|
this.initia_arr[0].initia_input.age =config.enable
|
|
this.initia_arr[0].initia_input.age =config.enable
|
|
- this.initia_arr[1].initia_input.age =config.month_full_ad? config.month_full_ad:0
|
|
|
|
- this.initia_arr[2].initia_input.age =config.normal? config.normal:0
|
|
|
|
- this.initia_arr[3].initia_input.age =config.no_sign? config.no_sign:0
|
|
|
|
- this.initia_arr[6].initia_input.age =config.absent? config.absent:0
|
|
|
|
- this.initia_arr[4].initia_input.age =config.on_duty_late? config.on_duty_late:0
|
|
|
|
- this.initia_arr[5].initia_input.age =config.off_duty_early? config.off_duty_early:0
|
|
|
|
- this.initia_arr[7].initia_input.age =config.ot_per_hour? config.ot_per_hour:0
|
|
|
|
- this.initia_arr[8].initia_input.age =config.leave_per_hour? config.leave_per_hour:0
|
|
|
|
|
|
+ // this.initia_arr[1].initia_input.age =config.month_full_ad? config.month_full_ad:0 //月度全勤加分
|
|
|
|
+ this.initia_arr[1].initia_input.age =config.normal? config.normal:0 //正常打卡加分
|
|
|
|
+ this.initia_arr[2].initia_input.age =config.no_sign? config.no_sign:0 //缺卡扣分
|
|
|
|
+ this.initia_arr[3].initia_input.age =config.absent? config.absent:0 //旷工扣分
|
|
|
|
+ this.initia_arr[4].initia_input.age =config.on_duty_late? config.on_duty_late:0 //迟到扣分
|
|
|
|
+ this.initia_arr[5].initia_input.age =config.off_duty_early? config.off_duty_early:0 //早退扣分
|
|
|
|
+ // this.initia_arr[7].initia_input.age =config.ot_per_hour? config.ot_per_hour:0 //每小时加班加分
|
|
|
|
+ this.initia_arr[6].initia_input.age =config.ot_per_day? config.ot_per_day:0 //每加班满一天加分
|
|
|
|
+ // this.initia_arr[8].initia_input.age =config.leave_per_hour? config.leave_per_hour:0 //每小时请假扣分
|
|
|
|
+
|
|
}).finally(err=>{
|
|
}).finally(err=>{
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
@@ -159,5 +172,9 @@ export default {
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style scoped lang="scss">
|
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
+ .nullD{
|
|
|
|
+ text-align: center;
|
|
|
|
+ padding-top: 20%;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|