无信号班组考勤-取消考勤
This commit is contained in:
parent
19f1880f13
commit
2457ff5648
|
|
@ -2,6 +2,7 @@ package com.bonus.bmw.team.controller;
|
|||
|
||||
import com.bonus.bmw.team.entity.NoSignalTeamAttendBean;
|
||||
import com.bonus.bmw.team.service.NoSignalTeamAttendService;
|
||||
import com.bonus.common.core.constant.Constants;
|
||||
import com.bonus.common.core.domain.R;
|
||||
import com.bonus.common.core.table.PageTableHandler;
|
||||
import com.bonus.common.core.table.PageTableRequest;
|
||||
|
|
@ -229,5 +230,15 @@ public class NoSignalTeamAttendController {
|
|||
}
|
||||
return einHisList;
|
||||
}
|
||||
|
||||
@PostMapping("/updateAtt")
|
||||
@Log(title = "考勤数据-修改", businessType = BusinessType.UPDATE)
|
||||
public R del(NoSignalTeamAttendBean bean) {
|
||||
try {
|
||||
return service.updateAtt(bean);
|
||||
} catch (Exception e){
|
||||
return R.fail(Constants.API_FAILED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ public interface NoSignalTeamAttendDao {
|
|||
|
||||
int updEinStatus(NoSignalTeamAttendBean noSignalTeamAttendBean);
|
||||
|
||||
int updateAtt(NoSignalTeamAttendBean bean);
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.bmw.team.service;
|
||||
|
||||
import com.bonus.bmw.team.entity.NoSignalTeamAttendBean;
|
||||
import com.bonus.common.core.domain.R;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -39,6 +40,8 @@ public interface NoSignalTeamAttendService {
|
|||
|
||||
int updEinStatus(NoSignalTeamAttendBean noSignalTeamAttendBean);
|
||||
|
||||
R updateAtt(NoSignalTeamAttendBean bean);
|
||||
|
||||
/*
|
||||
int addNoSignalTeam(NoSignalTeamSetUpBean bean);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package com.bonus.bmw.team.service;
|
|||
|
||||
import com.bonus.bmw.team.dao.NoSignalTeamAttendDao;
|
||||
import com.bonus.bmw.team.entity.NoSignalTeamAttendBean;
|
||||
import com.bonus.common.core.constant.Constants;
|
||||
import com.bonus.common.core.domain.R;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -112,6 +115,15 @@ public class NoSignalTeamAttendServiceImpl implements NoSignalTeamAttendService
|
|||
return dao.updEinStatus(noSignalTeamAttendBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R updateAtt(NoSignalTeamAttendBean bean) {
|
||||
int res=0;
|
||||
if (bean.getId() != null) {
|
||||
res = dao.updateAtt(bean);
|
||||
}
|
||||
return res > 0 ? R.ok(Constants.DELETE_SUCCESS) : R.fail(Constants.DELETE_FAIL);
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public int addNoSignalTeam(NoSignalTeamSetUpBean bean) {
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@
|
|||
<if test="salaryApplicationPath != null and salaryApplicationPath != '' ">
|
||||
,salary_application_Path = #{salaryApplicationPath}
|
||||
</if>
|
||||
where id_number = #{idNumber} and ein_time = #{einTime} and is_active = 1
|
||||
where id_number = #{idNumber} and ein_time = #{einTime}
|
||||
</update>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,14 @@
|
|||
update bm_worker set ein_status = 1 where id_number = #{idNumber};
|
||||
</update>
|
||||
|
||||
<update id="updateAtt">
|
||||
UPDATE
|
||||
fc_team_attendance_content
|
||||
SET
|
||||
is_active = '0'
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="delPerson">
|
||||
DELETE
|
||||
FROM bm_no_signal_team_person
|
||||
|
|
@ -225,6 +233,7 @@
|
|||
|
||||
<select id="getNoAttList" resultType="com.bonus.bmw.team.entity.NoSignalTeamAttendBean">
|
||||
SELECT
|
||||
ftac.id,
|
||||
bw.`name` AS personName,
|
||||
LEFT(ftac.attendance_time,10) AS attendanceTime,
|
||||
ftac.remark AS remark
|
||||
|
|
|
|||
|
|
@ -1118,15 +1118,20 @@ function workPerson(subCompanyId) {
|
|||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var str = data.data
|
||||
sexECharts(str.maleNum, str.femaleNum);
|
||||
workTypeECharts(str.pgNum, str.jgNum, str.gkNum, str.dhNum, str.qtNum)
|
||||
ageECharts(str.twentyNum, str.thirtyNum, str.fortyNum, str.fiftyNum, str.sixtyNum)
|
||||
rygECharts(str.greenNum, str.yellowNum, str.redNum)
|
||||
personType(str.formalNum, str.temporaryNum);
|
||||
personType1(str.localNum, str.noLocalNum);
|
||||
closeLayer();
|
||||
if (flag) {
|
||||
closeLayer1();
|
||||
if(str){
|
||||
sexECharts(str.maleNum, str.femaleNum);
|
||||
workTypeECharts(str.pgNum, str.jgNum, str.gkNum, str.dhNum, str.qtNum)
|
||||
ageECharts(str.twentyNum, str.thirtyNum, str.fortyNum, str.fiftyNum, str.sixtyNum)
|
||||
rygECharts(str.greenNum, str.yellowNum, str.redNum)
|
||||
personType(str.formalNum, str.temporaryNum);
|
||||
personType1(str.localNum, str.noLocalNum);
|
||||
closeLayer();
|
||||
if (flag) {
|
||||
closeLayer1();
|
||||
}
|
||||
}else{
|
||||
layer.close(index1);
|
||||
layer.close(index2);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -154,9 +154,77 @@ function init(){
|
|||
{"data": "personName","width":"10%"},
|
||||
{"data": "attendanceTime","width":"10%"},
|
||||
{"data": "remark","width":"10%"},
|
||||
{"data": "","width":"10%",
|
||||
"render": function (data, type, row) {
|
||||
var state = row['state'];
|
||||
var teamStatus = row['teamStatus'];
|
||||
|
||||
var id = row['id'];
|
||||
var html = '';
|
||||
html += buttonUpdate(id, "", pers);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
],
|
||||
"order": [[0, "desc"], [1, "asc"]] //在栏目列上显示排序功能
|
||||
});
|
||||
}
|
||||
|
||||
function buttonUpdate(id, permission, pers) {
|
||||
if (permission != "") {
|
||||
if ($.inArray(permission, pers) < 0) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
var btn = $("<button class='layui-btn layui-btn-xs' title='取消' onclick='updateView(\"" + id + "\")'>取消</button>");
|
||||
return btn.prop("outerHTML");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* */
|
||||
function updateView(id) {
|
||||
let index = layer.confirm("是否确定取消考勤数据?",function () {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
contentType: "application/x-www-form-urlencoded",
|
||||
url: ctxPath + '/NoSignalTeamAttend/updateAtt',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
"id": id
|
||||
},
|
||||
success: function (data) {
|
||||
layer.close(index);
|
||||
if (data.code == 200) {
|
||||
top.layer.alert('取消考勤成功', {icon: 1});
|
||||
example.ajax.reload(); // 刷新页面
|
||||
} else {
|
||||
layer.msg("取消考勤失败", {icon: 2},function () {
|
||||
example.ajax.reload(); // 刷新页面
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
/*var height = '85%';
|
||||
var width = '60%';
|
||||
var index = layer.open({
|
||||
title: ['无信号考勤修改', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: './noSignalTeamSetUpAttFrom.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
btn: ['确定', '关闭'],
|
||||
success: function (layero, index) {
|
||||
//打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
myIframe.setDat(id); //aaa()为子页面的方法
|
||||
},
|
||||
yes: function (index, layero) {
|
||||
// 获取弹出层中的form表单元素
|
||||
var formSubmit = layer.getChildFrame('form', index);
|
||||
var submited = formSubmit.find('button')[0];
|
||||
submited.click();
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
var layer
|
||||
var form
|
||||
layui.use(['layer','laydate','form'], function () {
|
||||
layer = layui.layer;
|
||||
var laydate = layui.laydate;
|
||||
form = layui.form;
|
||||
// 验证成功后才会执行下面的操作
|
||||
form.on('submit(formDemo)', function (data) {
|
||||
update(data)
|
||||
});
|
||||
});
|
||||
|
||||
function update(formData) {
|
||||
// 加载提示
|
||||
let loadingMsg = layer.msg('数据请求中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
// form请求地址
|
||||
let formUrl = ctxPath + '/NoSignalTeamSetUp/updNoSignalTeam';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
async: false, // 默认异步true,false表示同步
|
||||
url: formUrl, // 请求地址
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: 'json', // 服务器返回数据类型
|
||||
data: JSON.stringify(formData.field), //获取提交的表单字段
|
||||
success: function (data) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if(data.code == 200){
|
||||
layer.alert(data.msg, {icon: 1},()=>{
|
||||
reloading();
|
||||
});
|
||||
}else{
|
||||
layer.alert(data.msg, {icon: 2});
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, e) {
|
||||
layer.close(loadingMsg);
|
||||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function setDat(id) {
|
||||
alert(id)
|
||||
$("#id").val(id)
|
||||
form.render()
|
||||
}
|
||||
|
||||
//设置弹窗关闭
|
||||
function reloading() {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
window.parent.location.reload();
|
||||
}
|
||||
|
|
@ -55,6 +55,7 @@
|
|||
<th>姓名</th>
|
||||
<th>自动打卡日期</th>
|
||||
<th>备注</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>无信号班组设置-考勤取消</title>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../../../../layui/css/layui.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<div style="margin-left: 17%;margin-top: 5%;">
|
||||
<form class="layui-form" onsubmit="return false;">
|
||||
<input type="hidden" id="id" name="id">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 150px">备注描述:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="remark" id="remark" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" style="display: none">
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn submit" id="commit" lay-submit lay-filter="formDemo">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="../../../../js/jquery-3.6.0.js"></script>
|
||||
<script type="text/javascript" src="../../../../layui/layui.js"></script>
|
||||
<script type="text/javascript" src="../../../../js/publicJs.js"></script>
|
||||
<script type="text/javascript" src="../../../../js/jq.js"></script>
|
||||
<script src="../../../../js/work/team/noSignalTeam/noSignalTeamSetUpAttFrom.js"></script>
|
||||
</html>
|
||||
Loading…
Reference in New Issue