提交 cee4fff3 编写于 作者: Skyeye云's avatar Skyeye云

考勤班次重构完成

上级 c5eba97f
...@@ -10,8 +10,11 @@ layui.config({ ...@@ -10,8 +10,11 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$, var $ = layui.$,
laydate = layui.laydate; laydate = layui.laydate;
var type = 1; skyeyeClassEnumUtil.showEnumDataListByClassName("commonEnable", 'radio', "enabled", '', form);
skyeyeClassEnumUtil.showEnumDataListByClassName("checkWorkTimeType", 'radio', "checkWorkTimeType", '', form);
var type = 1;
var startTime = laydate.render({ var startTime = laydate.render({
elem: '#startTime', elem: '#startTime',
...@@ -115,17 +118,17 @@ layui.config({ ...@@ -115,17 +118,17 @@ layui.config({
}; };
} }
form.on('radio(type)', function (data) { form.on('radio(checkWorkTimeTypeFilter)', function (data) {
type = data.value; type = data.value;
if(type == 1){ if (type == 1) {
checkWorkUtil.resetSingleBreak(); checkWorkUtil.resetSingleBreak();
} else if (type == 2){ } else if (type == 2) {
checkWorkUtil.resetWeekend(); checkWorkUtil.resetWeekend();
} else if (type == 3){ } else if (type == 3) {
checkWorkUtil.resetSingleAndDoubleBreak(); checkWorkUtil.resetSingleAndDoubleBreak();
} else if (type == 4){ } else if (type == 4) {
resetCustomize(); checkWorkUtil.resetCustomize();
} }
}); });
matchingLanguage(); matchingLanguage();
...@@ -133,21 +136,21 @@ layui.config({ ...@@ -133,21 +136,21 @@ layui.config({
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var weekDay = getWeekDay(); var weekDay = getWeekDay();
if(isNull(weekDay) || weekDay.length == 0){ if (isNull(weekDay) || weekDay.length == 0) {
winui.window.msg('请选择工作日', {icon: 2, time: 2000}); winui.window.msg('请选择工作日', {icon: 2, time: 2000});
return false; return false;
} }
var params = { var params = {
title: $("#title").val(), name: $("#name").val(),
startTime: $("#startTime").val(), startTime: $("#startTime").val(),
endTime: $("#endTime").val(), endTime: $("#endTime").val(),
restStartTime: $("#restStartTime").val(), restStartTime: $("#restStartTime").val(),
restEndTime: $("#restEndTime").val(), restEndTime: $("#restEndTime").val(),
type: $("input[name='type']:checked").val(), type: dataShowType.getData('checkWorkTimeType'),
state: $("input[name='state']:checked").val(), enabled: dataShowType.getData('enabled'),
weekDay: JSON.stringify(weekDay) checkWorkTimeWeekList: JSON.stringify(weekDay)
}; };
AjaxPostUtil.request({url: flowableBasePath + "checkworktime002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.checkworkBasePath + "writeCheckWorkTime", params: params, type: 'json', method: 'POST', callback: function (json) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}}); }});
...@@ -158,18 +161,18 @@ layui.config({ ...@@ -158,18 +161,18 @@ layui.config({
// 自定义类型可以设置 // 自定义类型可以设置
$("body").on("click", ".weekDay", function() { $("body").on("click", ".weekDay", function() {
if(type == 4){ if(type == 4){
var clas = getArrIndexOfPointStr(checkWorkTimeColor, $(this).attr("class")); var clas = getArrIndexOfPointStr(checkWorkUtil.checkWorkTimeColor, $(this).attr("class"));
$(this).removeClass(clas); $(this).removeClass(clas);
$(this).addClass(getColor(clas)); $(this).addClass(getColor(clas));
} }
}); });
function getColor(nowColor){ function getColor(nowColor){
var index = checkWorkTimeColor.indexOf(nowColor); var index = checkWorkUtil.checkWorkTimeColor.indexOf(nowColor);
if(index == (checkWorkTimeColor.length - 1)){ if(index == (checkWorkUtil.checkWorkTimeColor.length - 1)){
return checkWorkTimeColor[0]; return checkWorkUtil.checkWorkTimeColor[0];
} else { } else {
return checkWorkTimeColor[index + 1]; return checkWorkUtil.checkWorkTimeColor[index + 1];
} }
} }
...@@ -191,7 +194,7 @@ layui.config({ ...@@ -191,7 +194,7 @@ layui.config({
var result = new Array(); var result = new Array();
for(var i = 0; i < 6; i++){ for(var i = 0; i < 6; i++){
result.push({ result.push({
day: (i + 1), weekNumber: (i + 1),
type: 1 type: 1
}); });
} }
...@@ -203,7 +206,7 @@ layui.config({ ...@@ -203,7 +206,7 @@ layui.config({
var result = new Array(); var result = new Array();
for(var i = 0; i < 5; i++){ for(var i = 0; i < 5; i++){
result.push({ result.push({
day: (i + 1), weekNumber: (i + 1),
type: 1 type: 1
}); });
} }
...@@ -215,12 +218,12 @@ layui.config({ ...@@ -215,12 +218,12 @@ layui.config({
var result = new Array(); var result = new Array();
for(var i = 0; i < 5; i++){ for(var i = 0; i < 5; i++){
result.push({ result.push({
day: (i + 1), weekNumber: (i + 1),
type: 1 type: 1
}); });
} }
result.push({ result.push({
day: 6, weekNumber: 6,
type: 2 type: 2
}); });
return result; return result;
...@@ -230,15 +233,15 @@ layui.config({ ...@@ -230,15 +233,15 @@ layui.config({
function getCustomize(){ function getCustomize(){
var result = new Array(); var result = new Array();
$.each($(".weekDay"), function(i, item) { $.each($(".weekDay"), function(i, item) {
var clas = getArrIndexOfPointStr(checkWorkTimeColor, $(item).attr("class")); var clas = getArrIndexOfPointStr(checkWorkUtil.checkWorkTimeColor, $(item).attr("class"));
if('layui-bg-blue' == clas){ if('layui-bg-blue' == clas){
result.push({ result.push({
day: $(item).attr("value"), weekNumber: $(item).attr("value"),
type: 1 type: 1
}); });
} else if ('layui-bg-orange' == clas){ } else if ('layui-bg-orange' == clas){
result.push({ result.push({
day: $(item).attr("value"), weekNumber: $(item).attr("value"),
type: 2 type: 2
}); });
} }
......
...@@ -12,22 +12,26 @@ layui.config({ ...@@ -12,22 +12,26 @@ layui.config({
showGrid({ showGrid({
id: "showForm", id: "showForm",
url: flowableBasePath + "checkworktime003", url: sysMainMation.checkworkBasePath + "queryCheckWorkTimeById",
params: {rowId: parent.rowId}, params: {id: parent.rowId},
pagination: false, pagination: false,
method: "GET", method: "GET",
template: $("#beanTemplate").html(), template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb, json){
json.bean.typeName = skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("checkWorkTimeType", 'id', json.bean.type, 'name');
json.bean.enabled = skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("commonEnable", 'id', json.bean.enabled, 'name');
},
ajaxSendAfter:function (json) { ajaxSendAfter:function (json) {
var type = json.bean.type; var type = json.bean.type;
if(type == 1){ if (type == 1) {
checkWorkUtil.resetSingleBreak(); checkWorkUtil.resetSingleBreak();
} else if (type == 2){ } else if (type == 2) {
checkWorkUtil.resetWeekend(); checkWorkUtil.resetWeekend();
} else if (type == 3){ } else if (type == 3) {
checkWorkUtil.resetSingleAndDoubleBreak(); checkWorkUtil.resetSingleAndDoubleBreak();
} else if (type == 4){ } else if (type == 4) {
checkWorkUtil.resetCustomizeDay(json.bean.days); checkWorkUtil.resetCustomizeDay(json.bean.checkWorkTimeWeekList);
} }
matchingLanguage(); matchingLanguage();
form.render(); form.render();
......
...@@ -15,8 +15,8 @@ layui.config({ ...@@ -15,8 +15,8 @@ layui.config({
showGrid({ showGrid({
id: "showForm", id: "showForm",
url: flowableBasePath + "checkworktime003", url: sysMainMation.checkworkBasePath + "queryCheckWorkTimeById",
params: {rowId: parent.rowId}, params: {id: parent.rowId},
pagination: false, pagination: false,
method: "GET", method: "GET",
template: $("#beanTemplate").html(), template: $("#beanTemplate").html(),
...@@ -29,10 +29,12 @@ layui.config({ ...@@ -29,10 +29,12 @@ layui.config({
} else if (type == 3){ } else if (type == 3){
checkWorkUtil.resetSingleAndDoubleBreak(); checkWorkUtil.resetSingleAndDoubleBreak();
} else if (type == 4){ } else if (type == 4){
checkWorkUtil.resetCustomizeDay(json.bean.days); checkWorkUtil.resetCustomizeDay(json.bean.checkWorkTimeWeekList);
} }
$("input:radio[name=type][value=" + type + "]").attr("checked", true);
$("input:radio[name=state][value=" + json.bean.state + "]").attr("checked", true); skyeyeClassEnumUtil.showEnumDataListByClassName("commonEnable", 'radio', "enabled", json.bean.enabled, form);
skyeyeClassEnumUtil.showEnumDataListByClassName("checkWorkTimeType", 'radio', "checkWorkTimeType", type, form);
// 工作时间 // 工作时间
var startTime = laydate.render({ var startTime = laydate.render({
elem: '#startTime', elem: '#startTime',
...@@ -115,7 +117,7 @@ layui.config({ ...@@ -115,7 +117,7 @@ layui.config({
} }
}); });
form.on('radio(type)', function (data) { form.on('radio(checkWorkTimeTypeFilter)', function (data) {
type = data.value; type = data.value;
if(type == 1){ if(type == 1){
checkWorkUtil.resetSingleBreak(); checkWorkUtil.resetSingleBreak();
...@@ -124,7 +126,7 @@ layui.config({ ...@@ -124,7 +126,7 @@ layui.config({
} else if (type == 3){ } else if (type == 3){
checkWorkUtil.resetSingleAndDoubleBreak(); checkWorkUtil.resetSingleAndDoubleBreak();
} else if (type == 4){ } else if (type == 4){
resetCustomize(); checkWorkUtil.resetCustomize();
} }
}); });
...@@ -138,17 +140,17 @@ layui.config({ ...@@ -138,17 +140,17 @@ layui.config({
return false; return false;
} }
var params = { var params = {
rowId: parent.rowId, id: parent.rowId,
title: $("#title").val(), name: $("#name").val(),
startTime: $("#startTime").val(), startTime: $("#startTime").val(),
endTime: $("#endTime").val(), endTime: $("#endTime").val(),
restStartTime: $("#restStartTime").val(), restStartTime: $("#restStartTime").val(),
restEndTime: $("#restEndTime").val(), restEndTime: $("#restEndTime").val(),
type: $("input[name='type']:checked").val(), type: dataShowType.getData('checkWorkTimeType'),
state: $("input[name='state']:checked").val(), enabled: dataShowType.getData('enabled'),
weekDay: JSON.stringify(weekDay) checkWorkTimeWeekList: JSON.stringify(weekDay)
}; };
AjaxPostUtil.request({url: flowableBasePath + "checkworktime004", params: params, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: sysMainMation.checkworkBasePath + "writeCheckWorkTime", params: params, type: 'json', method: "POST", callback: function (json) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}}); }});
...@@ -187,18 +189,18 @@ layui.config({ ...@@ -187,18 +189,18 @@ layui.config({
// 自定义类型可以设置 // 自定义类型可以设置
$("body").on("click", ".weekDay", function() { $("body").on("click", ".weekDay", function() {
if(type == 4){ if(type == 4){
var clas = getArrIndexOfPointStr(checkWorkTimeColor, $(this).attr("class")); var clas = getArrIndexOfPointStr(checkWorkUtil.checkWorkTimeColor, $(this).attr("class"));
$(this).removeClass(clas); $(this).removeClass(clas);
$(this).addClass(getColor(clas)); $(this).addClass(getColor(clas));
} }
}); });
function getColor(nowColor){ function getColor(nowColor){
var index = checkWorkTimeColor.indexOf(nowColor); var index = checkWorkUtil.checkWorkTimeColor.indexOf(nowColor);
if(index == (checkWorkTimeColor.length - 1)){ if(index == (checkWorkUtil.checkWorkTimeColor.length - 1)){
return checkWorkTimeColor[0]; return checkWorkUtil.checkWorkTimeColor[0];
} else { } else {
return checkWorkTimeColor[index + 1]; return checkWorkUtil.checkWorkTimeColor[index + 1];
} }
} }
...@@ -220,7 +222,7 @@ layui.config({ ...@@ -220,7 +222,7 @@ layui.config({
var result = new Array(); var result = new Array();
for(var i = 0; i < 6; i++){ for(var i = 0; i < 6; i++){
result.push({ result.push({
day: (i + 1), weekNumber: (i + 1),
type: 1 type: 1
}); });
} }
...@@ -232,7 +234,7 @@ layui.config({ ...@@ -232,7 +234,7 @@ layui.config({
var result = new Array(); var result = new Array();
for(var i = 0; i < 5; i++){ for(var i = 0; i < 5; i++){
result.push({ result.push({
day: (i + 1), weekNumber: (i + 1),
type: 1 type: 1
}); });
} }
...@@ -244,12 +246,12 @@ layui.config({ ...@@ -244,12 +246,12 @@ layui.config({
var result = new Array(); var result = new Array();
for(var i = 0; i < 5; i++){ for(var i = 0; i < 5; i++){
result.push({ result.push({
day: (i + 1), weekNumber: (i + 1),
type: 1 type: 1
}); });
} }
result.push({ result.push({
day: 6, weekNumber: 6,
type: 2 type: 2
}); });
return result; return result;
...@@ -259,15 +261,15 @@ layui.config({ ...@@ -259,15 +261,15 @@ layui.config({
function getCustomize(){ function getCustomize(){
var result = new Array(); var result = new Array();
$.each($(".weekDay"), function(i, item) { $.each($(".weekDay"), function(i, item) {
var clas = getArrIndexOfPointStr(checkWorkTimeColor, $(item).attr("class")); var clas = getArrIndexOfPointStr(checkWorkUtil.checkWorkTimeColor, $(item).attr("class"));
if('layui-bg-blue' == clas){ if('layui-bg-blue' == clas){
result.push({ result.push({
day: $(item).attr("value"), weekNumber: $(item).attr("value"),
type: 1 type: 1
}); });
} else if ('layui-bg-orange' == clas){ } else if ('layui-bg-orange' == clas){
result.push({ result.push({
day: $(item).attr("value"), weekNumber: $(item).attr("value"),
type: 2 type: 2
}); });
} }
......
...@@ -17,7 +17,7 @@ layui.config({ ...@@ -17,7 +17,7 @@ layui.config({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: flowableBasePath + 'checkworktime001', url: sysMainMation.checkworkBasePath + 'checkworktime001',
where: getTableParams(), where: getTableParams(),
even: true, even: true,
page: true, page: true,
...@@ -25,8 +25,8 @@ layui.config({ ...@@ -25,8 +25,8 @@ layui.config({
limit: getLimit(), limit: getLimit(),
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'title', title: '标题', align: 'left', width: 150, templet: function (d) { { field: 'name', title: '标题', align: 'left', width: 150, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.title + '</a>'; return '<a lay-event="details" class="notice-title-click">' + d.name + '</a>';
}}, }},
{ field: 'startTime', title: '工作时间段', align: 'center', width: 120, templet: function (d) { { field: 'startTime', title: '工作时间段', align: 'center', width: 120, templet: function (d) {
return d.startTime + ' ~ ' + d.endTime; return d.startTime + ' ~ ' + d.endTime;
...@@ -35,32 +35,22 @@ layui.config({ ...@@ -35,32 +35,22 @@ layui.config({
return d.restStartTime + ' ~ ' + d.restEndTime; return d.restStartTime + ' ~ ' + d.restEndTime;
}}, }},
{ field: 'type', title: '类型', width: 80, align: 'center', templet: function (d) { { field: 'type', title: '类型', width: 80, align: 'center', templet: function (d) {
if(d.type == '1'){ return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("checkWorkTimeType", 'id', d.type, 'name');
return "单休"; }},
} else if (d.type == '2'){ { field: 'enabled', title: '状态', width: 80, align: 'center', templet: function (d) {
return "双休"; return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("commonEnable", 'id', d.enabled, 'name');
} else if (d.type == '3'){
return "单双休";
} else if (d.type == '4'){
return "自定义";
}
}},
{ field: 'state', title: '状态', width: 80, align: 'center', templet: function (d) {
if(d.state == '1'){
return "<span class='state-up'>启用</span>";
} else if (d.state == '2'){
return "<span class='state-down'>禁用</span>";
}
}}, }},
{ field: 'userNum', title: '员工数', align: 'left', width: 80 },
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', width: 120 }, { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 100 }, { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: '最后修改时间', align: 'center', width: 100}, { field: 'lastUpdateTime', title: '最后修改时间', align: 'center', width: 150},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 120, toolbar: '#tableBar'} { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 120, toolbar: '#tableBar'}
]], ]],
done: function(json) { done: function(json) {
matchingLanguage(); matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入标题", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
} }
}); });
...@@ -76,14 +66,6 @@ layui.config({ ...@@ -76,14 +66,6 @@ layui.config({
} }
}); });
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
refreshTable();
}
return false;
});
// 添加 // 添加
$("body").on("click", "#addBean", function() { $("body").on("click", "#addBean", function() {
_openNewWindows({ _openNewWindows({
...@@ -101,7 +83,7 @@ layui.config({ ...@@ -101,7 +83,7 @@ layui.config({
function delet(data) { function delet(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworktime005", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: sysMainMation.checkworkBasePath + "deleteCheckWorkTimeById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable(); loadTable();
}}); }});
...@@ -134,25 +116,19 @@ layui.config({ ...@@ -134,25 +116,19 @@ layui.config({
callBack: function (refreshCode) { callBack: function (refreshCode) {
}}); }});
} }
// 刷新数据 form.render();
$("body").on("click", "#reloadTable", function() { $("body").on("click", "#reloadTable", function() {
loadTable(); loadTable();
}); });
function loadTable() { function loadTable() {
table.reloadData("messageTable", {where: getTableParams()}); table.reloadData("messageTable", {where: getTableParams()});
} }
function refreshTable(){ function getTableParams() {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
} }
function getTableParams() {
return {
title: $("#title").val()
};
}
exports('checkWorkTimeList', {}); exports('checkWorkTimeList', {});
}); });
...@@ -15,23 +15,17 @@ ...@@ -15,23 +15,17 @@
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">标题<i class="red">*</i></label> <label class="layui-form-label">标题<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="title" name="title" win-verify="required" placeholder="请输入标题" class="layui-input"/> <input type="text" id="name" name="name" win-verify="required" placeholder="请输入标题" class="layui-input"/>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs6"> <div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">类型<i class="red">*</i></label> <label class="layui-form-label">类型<i class="red">*</i></label>
<div class="layui-input-block winui-radio"> <div class="layui-input-block winui-radio" id="checkWorkTimeType">
<input type="radio" name="type" value="1" title="单休" lay-filter="type" checked="checked"/>
<input type="radio" name="type" value="2" title="双休" lay-filter="type" />
<input type="radio" name="type" value="3" title="单双休" lay-filter="type" />
<input type="radio" name="type" value="4" title="自定义" lay-filter="type" />
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs6"> <div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">状态<i class="red">*</i></label> <label class="layui-form-label">状态<i class="red">*</i></label>
<div class="layui-input-block winui-radio"> <div class="layui-input-block winui-radio" id="enabled">
<input type="radio" name="state" value="1" title="启用" checked="checked"/>
<input type="radio" name="state" value="2" title="禁用" />
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
......
...@@ -15,47 +15,74 @@ ...@@ -15,47 +15,74 @@
<script type="text/html" id="beanTemplate"> <script type="text/html" id="beanTemplate">
{{#bean}} {{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">标题</label> <label class="layui-form-label">标题</label>
<div class="layui-input-block ver-center"> <div class="layui-input-block ver-center">
{{title}} {{name}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">工作时间段</label>
<div class="layui-input-block ver-center">
{{startTime}} ~ {{endTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">作息时间段</label>
<div class="layui-input-block ver-center">
{{restStartTime}} ~ {{restEndTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">类型</label>
<div class="layui-input-block ver-center">
{{typeName}}
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">类型</label>
<div class="layui-input-block ver-center">
{{typeName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">状态</label>
<div class="layui-input-block ver-center">
{{enabled}}
</div>
</div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">工作日</label> <label class="layui-form-label">工作日</label>
<div class="layui-input-block ver-center"> <div class="layui-input-block ver-center">
<span class="layui-badge layui-bg-blue weekDay" value="1"></span> <span class="layui-badge layui-bg-blue weekDay" value="1"></span>
<span class="layui-badge layui-bg-blue weekDay" value="2"></span> <span class="layui-badge layui-bg-blue weekDay" value="2"></span>
<span class="layui-badge layui-bg-blue weekDay" value="3"></span> <span class="layui-badge layui-bg-blue weekDay" value="3"></span>
<span class="layui-badge layui-bg-blue weekDay" value="4"></span> <span class="layui-badge layui-bg-blue weekDay" value="4"></span>
<span class="layui-badge layui-bg-blue weekDay" value="5"></span> <span class="layui-badge layui-bg-blue weekDay" value="5"></span>
<span class="layui-badge layui-bg-blue weekDay" value="6"></span> <span class="layui-badge layui-bg-blue weekDay" value="6"></span>
<span class="layui-badge layui-bg-gray weekDay" value="7"></span><br> <span class="layui-badge layui-bg-gray weekDay" value="7"></span><br>
<div class="layui-form-mid layui-word-aux ver-center" style="padding-top: 8px !important"> <div class="layui-form-mid layui-word-aux ver-center" style="padding-top: 8px !important">
<span class="layui-badge layui-bg-blue" style="height: 12px;"> </span>:每周的当天都工作 <span class="layui-badge layui-bg-blue" style="height: 12px;"> </span>:每周的当天都工作
<span class="layui-badge layui-bg-gray" style="height: 12px;"> </span>:每周的当天都休假 <span class="layui-badge layui-bg-gray" style="height: 12px;"> </span>:每周的当天都休假
<span class="layui-badge layui-bg-orange" style="height: 12px;"> </span>:单周上班,双周休假 <span class="layui-badge layui-bg-orange" style="height: 12px;"> </span>:单周上班,双周休假
</div> </div>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">工作时间</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">开始时间</label>
<div class="layui-input-block ver-center">
{{startTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">结束时间</label>
<div class="layui-input-block ver-center">
{{endTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">作息时间</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">开始时间</label>
<div class="layui-input-block ver-center">
{{restStartTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">结束时间</label>
<div class="layui-input-block ver-center">
{{restEndTime}}
</div>
</div>
{{/bean}} {{/bean}}
</script> </script>
......
...@@ -21,23 +21,17 @@ ...@@ -21,23 +21,17 @@
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">标题<i class="red">*</i></label> <label class="layui-form-label">标题<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="title" name="title" win-verify="required" placeholder="请输入标题" class="layui-input" value="{{title}}"/> <input type="text" id="name" name="name" win-verify="required" placeholder="请输入标题" class="layui-input" value="{{name}}"/>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs6"> <div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">类型<i class="red">*</i></label> <label class="layui-form-label">类型<i class="red">*</i></label>
<div class="layui-input-block winui-radio"> <div class="layui-input-block winui-radio" id="checkWorkTimeType">
<input type="radio" name="type" value="1" title="单休" lay-filter="type" />
<input type="radio" name="type" value="2" title="双休" lay-filter="type" />
<input type="radio" name="type" value="3" title="单双休" lay-filter="type" />
<input type="radio" name="type" value="4" title="自定义" lay-filter="type" />
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs6"> <div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">状态<i class="red">*</i></label> <label class="layui-form-label">状态<i class="red">*</i></label>
<div class="layui-input-block winui-radio"> <div class="layui-input-block winui-radio" id="enabled">
<input type="radio" name="state" value="1" title="启用"/>
<input type="radio" name="state" value="2" title="禁用" />
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
......
...@@ -8,33 +8,19 @@ ...@@ -8,33 +8,19 @@
</head> </head>
<body> <body>
<div class="winui-tip alert-info" id="showInfo">温馨提示:已经拥有员工使用的班次信息无法进行删除操作。</div> <div class="winui-tip alert-info" id="showInfo">温馨提示:已经拥有员工使用的班次信息无法进行删除操作。</div>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">标题</label>
<div class="layui-input-inline">
<input type="text" id="title" name="title" placeholder="请输入标题" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar"> <div class="winui-toolbar">
<div class="winui-tool"> <div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button> <button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn" auth="1603026174350"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button> <button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1603026174350"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div> </div>
</div> </div>
<div style="margin:auto 10px;"> <div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table> <table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar"> <script type="text/html" id="tableBar">
{{# if(auth('1603026183638')){ }} {{# if(auth('1603026174350')) { }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a> <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }} {{# } }}
{{# if(auth('1603026192319') && d.userNum == 0){ }} {{# if(auth('1603026192319')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delet"><language showName="com.skyeye.deleteBtn"></language></a> <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delet"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }} {{# } }}
</script> </script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册