Commit c34a1512 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 6f9308d0 6e924bf4
......@@ -4,37 +4,80 @@
:title="title"
:visible.sync="open"
:direction="direction"
size="50%">
size="50%"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="班次ID" prop="shiftsId" v-model="form.shiftsId" placeholder="请输入班次ID"/>
<Field label="班次名称" prop="shiftsName" v-model="form.shiftsName" placeholder="请输入班次名称"/>
<Field label="上班打卡时间" prop="goWorkDate" v-model="form.goWorkDate" type="date" />
<Field label="上班打卡前时间段,单位分钟" prop="goWorkDateBefore" v-model="form.goWorkDateBefore" placeholder="请输入上班打卡前时间段,单位分钟"/>
<Field label="上班打卡前时间段,单位分钟" prop="goWorkDateAfter" v-model="form.goWorkDateAfter" placeholder="请输入上班打卡前时间段,单位分钟"/>
<Field label="下班打卡时间" prop="offWorkDate" v-model="form.offWorkDate" type="date" />
<Field label="下班打卡前时间段,单位分钟" prop="offWorkDateBefore" v-model="form.offWorkDateBefore" placeholder="请输入下班打卡前时间段,单位分钟"/>
<Field label="下班打卡前时间段,单位分钟" prop="offWorkDateAfter" v-model="form.offWorkDateAfter" placeholder="请输入下班打卡前时间段,单位分钟"/>
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
<Field
label="班次ID"
prop="shiftsId"
v-model="form.shiftsId"
placeholder="请输入班次ID"
/>
<Field
label="班次名称"
prop="shiftsName"
v-model="form.shiftsName"
placeholder="请输入班次名称"
/>
<Field
label="上班打卡时间"
prop="goWorkDate"
v-model="form.goWorkDate"
type="date"
/>
<Field
label="上班打卡前时间段,单位分钟"
prop="goWorkDateBefore"
v-model="form.goWorkDateBefore"
placeholder="请输入上班打卡前时间段,单位分钟"
/>
<Field
label="上班打卡前时间段,单位分钟"
prop="goWorkDateAfter"
v-model="form.goWorkDateAfter"
placeholder="请输入上班打卡前时间段,单位分钟"
/>
<Field
label="下班打卡时间"
prop="offWorkDate"
v-model="form.offWorkDate"
type="date"
/>
<Field
label="下班打卡前时间段,单位分钟"
prop="offWorkDateBefore"
v-model="form.offWorkDateBefore"
placeholder="请输入下班打卡前时间段,单位分钟"
/>
<Field
label="下班打卡前时间段,单位分钟"
prop="offWorkDateAfter"
v-model="form.offWorkDateAfter"
placeholder="请输入下班打卡前时间段,单位分钟"
/>
<Field
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row>
<form-buttons @submit='submitForm' noCancelBtn />
<form-buttons @submit="submitForm" noCancelBtn />
</el-form>
</el-drawer>
</template>
<script>
import form from "@/assets/mixins/formdialog";
export default {
import form from "@/assets/mixins/formdialog";
export default {
name: "AttendanceClassDetailDetail",
mixins: [form],
components: {
},
components: {},
created() {
this.changePath("attendance/class/detail")
this.changePath("attendance/class/detail");
},
data() {
return {
......@@ -44,47 +87,41 @@
title: "考勤班次详细信息",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
"goWorkDate",
"offWorkDate",
],
direction: "rtl",
toString: [],
toDate: ["goWorkDate", "offWorkDate"],
// 表单校验
rules: {
createTime: [
{required: true,message: "请选择创建时间" },
],
}
createTime: [{ required: true, message: "请选择创建时间" }],
},
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.reset();
this.query = { id: row.id };
this.urls.currUrl ="attendance/class/detail/edit";
this.urls.currUrl = "attendance/class/detail/edit";
this.getData();
this.pageInfo.type="edit"
this.pageInfo.type = "edit";
this.title = "修改考勤班次详细信息";
},
/** 新增 */
add(row) {
this.reset()
this.reset();
this.urls.currUrl = "attendance/class/detail/add";
this.getData();
this.pageInfo.type="add"
this.pageInfo.type = "add";
this.title = "新增考勤班次详细信息";
},
/** 查看*/
view(row) {
this.reset()
this.reset();
this.query = { id: row.id };
this.urls.currUrl ="attendance/class/detail/view";
this.urls.currUrl = "attendance/class/detail/view";
this.getData();
this.pageInfo.type="view"
this.pageInfo.type = "view";
this.title = "考勤班次详细信息详细";
},
/**取消按钮 */
......@@ -104,15 +141,15 @@
// 表单重置
reset() {
this.form = {
shiftsId : null,
shiftsName : "",
goWorkDate : null,
goWorkDateBefore : null,
goWorkDateAfter : null,
offWorkDate : null,
offWorkDateBefore : null,
offWorkDateAfter : null,
remark : "",
shiftsId: null,
shiftsName: "",
goWorkDate: null,
goWorkDateBefore: null,
goWorkDateAfter: null,
offWorkDate: null,
offWorkDateBefore: null,
offWorkDateAfter: null,
remark: "",
};
this.resetForm("form");
},
......@@ -122,5 +159,5 @@
}
},
},
};
};
</script>
......@@ -7,7 +7,7 @@
<Field label="班次负责人" prop="classResponsiblePersonId" type="select" :enumData="dict.workManId"
v-model="form.classResponsiblePersonId" placeholder="请选择班次负责人"/>
</el-row>
<el-form-item label="上下班时间" prop="attendanceClassDetailList">
<el-form-item label="上下班考勤时间" prop="attendanceClassDetailList">
<el-button type="text" @click="handleAddAttendanceClassDetail">添加</el-button>
<div class="bancifor" v-for="(item,index) in attendanceClassDetailList" :key="index">
<div class="title flex flex-align-center flex-pack-justify">
......@@ -17,7 +17,7 @@
<el-button type="danger" size="mini" @click="handleDeleteAttendanceClassDetail(index)">删除</el-button>
</div>
<div>
<span>上班时间</span>
<span>上班考勤时间</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -25,12 +25,12 @@
value-format="HH:mm"
format="HH:mm"
v-model="item.goWorkDate"
placeholder="上班时间">
placeholder="上班考勤时间">
</el-time-picker>
</div>
<div>
<span>打开时段: </span>
<span>上班前</span>
<span>上班前签到</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -41,7 +41,7 @@
placeholder="未设置">
</el-time-picker>
<span class="ml20">——</span>
<span class="ml20">上班后</span>
<span class="ml20">上班后签到</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -53,7 +53,7 @@
</el-time-picker>
</div>
<div>
<span>下班时间</span>
<span>下班考勤时间</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -61,12 +61,12 @@
format="HH:mm"
value-format="HH:mm"
v-model="item.offWorkDate"
placeholder="下班时间">
placeholder="下班考勤时间">
</el-time-picker>
</div>
<div>
<span>打开时段:</span>
<span>下班前</span>
<span>下班前签退</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -77,7 +77,7 @@
placeholder="未设置">
</el-time-picker>
<span class="ml20">——</span>
<span class="ml20">下班后</span>
<span class="ml20">下班后签退</span>
<el-time-picker
size="mini"
style="width:150px"
......@@ -189,40 +189,40 @@
this.attendanceClassDetailList.push(obj);
},
// 判断添加上下班时间
// 判断添加上下班考勤时间
judgeStatus(arr,index){
console.log(arr,index,'ces')
let status = true
if(arr.length == 0){
}else{
if(arr[index].goWorkDate === ''){
this.$message.error('请选择上班时间')
this.$message.error('请选择上班考勤时间')
status = false
return
}
if(arr[index].goWorkDateBefore === ''){
this.$message.error('请选择允许上班前打卡时间')
this.$message.error('请选择允许上班前签到打卡时间')
status = false
return
}
if(arr[index].goWorkDateAfter === ''){
this.$message.error('请选择允许上班后打卡时间')
this.$message.error('请选择允许上班后签到打卡时间')
status = false
return
}
if(arr[index].offWorkDate === ''){
this.$message.error('请选择下班时间')
this.$message.error('请选择下班考勤时间')
status = false
return
}
if(arr[index].offWorkDateBefore === ''){
this.$message.error('请选择允许下班前打卡时间')
this.$message.error('请选择允许下班前签退打卡时间')
status = false
return
}
if(arr[index].offWorkDateAfter === ''){
this.$message.error('请选择允许下班后打卡时间')
this.$message.error('请选择允许下班后签退打卡时间')
status = false
return
}
......@@ -248,7 +248,7 @@
transFormMinut(arr[index].goWorkDateBefore)
if(currentwokeTime <= lastoffTime){
this.$message.error(`第${index}上班时间需大于第${index-1}上班时间`)
this.$message.error(`第${index}上班考勤时间需大于第${index-1}上班考勤时间`)
status = false
return
}
......
......@@ -712,7 +712,7 @@ export default {
indicator: names.map((v) => {
return {
name: v,
max: 150,
max: Math.max(...[...add, ...sub]),
};
}),
center: ["45%", "50%"],
......@@ -734,10 +734,10 @@ export default {
value: add,
name: "加分",
symbol: "rect",
symbolSize: 12,
// symbolSize: 12,
areaStyle: { color: "#56A3F1" }, //雷达覆盖区域背景颜色
label: {
show: true,
show: false,
formatter: function (params) {
return params.value;
},
......
......@@ -95,7 +95,6 @@ export default {
data() {
return {
switchValue: "0",
searchValue: "",
index: -1,
dataArr: [],
......@@ -227,7 +226,7 @@ export default {
type: this.activeName,
page: this.query.page,
orderColList: this.typeArr,
name: this.searchValue,
name: `%${this.searchValue}%`,
}).then((res) => {
if (res.code == 1) {
this.tableData = res.data;
......
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