| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <link rel="stylesheet" type="text/css" href="css/commoncss.css"/>
- <!-- <title>班次设定</title> -->
- <div class="easyui-layout" fit="true">
- <div region="center" style="padding:0px;border:0px">
- <t:datagrid name="arrangeDutyList" checkbox="false" fitColumns="false" title="班次设定" actionUrl="arrangeDutyController.do?datagridAll&departid=${departid}" idField="id" fit="true" queryMode="group">
- <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="班次名称" field="dutyName" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="班次类型" field="dutyType" query="true" queryMode="single" dictionary="dutyType" width="120"></t:dgCol>
- <%-- <t:dgCol title="项目岗位" field="pjtpostDetailId" query="true" queryMode="single" dictionary="t_bus_project_post_detail,id,ptj_post_name" width="120"></t:dgCol> --%>
- <t:dgCol title="项目" field="pid" query="false" queryMode="single" dictionary="t_s_depart,id,departname, and org_type != '1' " width="200"></t:dgCol>
- <t:dgCol title="正常工作时间" field="normalworkStime" style="text-align: center;" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="正常下班时间" field="normalworkEtime" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="开始打卡分钟数" field="spunchMinute" style="text-align: right;" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="结束打卡分钟数" field="epunchMinute" style="text-align: right;" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="总工时(小时)" field="datumWorkhours" style="text-align: right;" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="班次工时(小时)" field="shiftWorkhours" style="text-align: right;" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="值班时间" field="ondutyStime" style="text-align: center;" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="值班结束时间" field="ondutyEtime" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="值班工时" field="ondutyWorkhours" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="超时加班时间" field="timeOutOvertimeStime" style="text-align: center;" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="超时加班结束时间" field="timeOutOvertimeEtime" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="超时加班时长(小时)" field="timeOutOvertimeHours" style="text-align: right;" queryMode="single" width="130"></t:dgCol>
- <t:dgCol title="班次餐补" field="dutyMealid" queryMode="single" dictionary="t_bus_meals_subsidy,id,subsidy_name" width="120"></t:dgCol>
- <t:dgCol title="备注" field="remark" showLen="10" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="创建人名称" field="createName" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="创建人登录名称" field="createBy" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd hh:mm:ss" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="更新人名称" field="updateName" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="更新人登录名称" field="updateBy" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd hh:mm:ss" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="状态" field="status" style="text-align: center;" queryMode="single" dictionary="ableStatus" width="120"></t:dgCol>
- <t:dgCol title="逻辑删除标识" field="deleteFlag" hidden="true" queryMode="single" dictionary="del_flag" width="120"></t:dgCol>
- <%-- <t:dgCol title="操作" field="opt"></t:dgCol>
- <t:dgDelOpt title="删除" url="arrangeDutyController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
- <t:dgToolBar title="录入" icon="icon-add" operationCode="add" url="arrangeDutyController.do?goAdd" funname="add"></t:dgToolBar>
- <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="arrangeDutyController.do?goUpdate" funname="update"></t:dgToolBar>
- <t:dgToolBar title="批量删除" icon="icon-remove" operationCode="remove" url="arrangeDutyController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
- <t:dgToolBar title="查看" icon="icon-search" url="arrangeDutyController.do?goUpdate" funname="detail"></t:dgToolBar>
- <t:dgToolBar title="导入" icon="icon-putout" operationCode="put" funname="ImportXls"></t:dgToolBar>
- <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
- <t:dgToolBar title="模板下载" icon="icon-putout" operationCode="putout" funname="ExportXlsByT"></t:dgToolBar> --%>
- <%-- <t:dgToolBar title="录入" icon="icon-add" operationCode="add" url="arrangeDutyController.do?goAdd" funname="add"></t:dgToolBar>--%>
- <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="arrangeDutyController.do?goUpdateAll" funname="update"></t:dgToolBar>
- <%-- <t:dgToolBar title="删除" icon="icon-remove" operationCode="remove" url="" funname="logicDel"></t:dgToolBar>
- <t:dgToolBar title="启用" icon="icon-enable" url="" funname="enableObj"></t:dgToolBar>
- <t:dgToolBar title="停用" icon="icon-disable" url="" funname="disableObj"></t:dgToolBar>--%>
- <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
- </t:datagrid>
- </div>
-
- <script>
- $(function() {
- var datagrid = $("#arrangeDutyListtb");
- datagrid.find("div[name='searchColums']").find("form#arrangeDutyListForm").children("span:first").before($("#tempSearchColums1 div[name='searchColums']").html());
- //datagrid.find("div[name='searchColums']").find("form#arrangeDutyListForm").children("span:first").next("span").append($("#tempSearchColums1 div[name='searchColums']").html());
- //datagrid.find("div[name='searchColums']").find("form#arrangeDutyListForm").children("span:first").append($("#tempSearchColums div[name='searchColums']").html());
- /* datagrid.before($("#tempSearchColums div[name='searchColums']").html()); */
- //datagrid.children(".datagrid-toolbar").before($("#tempSearchColums1 div[name='searchColums1']").html());
- //datagrid.children(".datagrid-toolbar").children("span:first").after($("#tempSearchColums2 div[name='searchColums2']").html());
- $("#tempSearchColums1").html('');
-
- $("#searchColums").attr("style","margin:23px 0 18px 0;");
- datagrid.find("div[name='searchColums']").next("div").children("span:first").next("span").attr("style","float:right;margin-bottom:4px;");
- });
- </script>
- <div id="tempSearchColums1" style="display: none;">
- <div name="searchColums">
- <label class="Validform_label" >
- 项目名称:
- </label>
- <input readonly="true" type="text" id="departname" name="departname" value="${departname}" placeholder="请选择项目名称" onclick="openDepartmentSelect()">
- <input id="pid" name=pid type="hidden" value="${departid},">
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
- </div>
- </div>
-
- </div>
- <script src = "webpage/cn/com/lzt/arrangeduty/arrangeDutyList.js"></script>
- <script type="text/javascript">
-
-
- //导入
- function ImportXls() {
- openuploadwin('Excel导入', 'arrangeDutyController.do?upload', "arrangeDutyList");
- }
- //导出
- function ExportXls() {
- JeecgExcelExport("arrangeDutyController.do?exportXls","arrangeDutyList");
- }
- //模板下载
- function ExportXlsByT() {
- JeecgExcelExport("arrangeDutyController.do?exportXlsByT","arrangeDutyList");
- }
- //新增
- function add(title,url,id){
- window.location.href=url
- }
- //修改
- function update(title,url, id){
- var date = new Date();
- var day = date.getDate();
- // if(day> 1 && day <6){
- // layer.alert("每月2日~5日为考勤和工资核算期, 不能修改班次");
- // return;
- // }
- updateNotCreateWin("修改",url, "arrangeDutyList",false);
- }
- //查看
- function view(title,url, id){
- viewNotCreateWin("查看",url, "arrangeDutyList",false)
- }
-
- //选择项目名称,列表================
- function openDepartmentSelect() {
- //$.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#pid").val();
- $.dialog({
- content: 'url:dialogDealController.do?projectDepartTableAll&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
- var iframe = this.iframe.contentWindow;
- if(iframe.getReason().length>0){
- var strData=eval(iframe.getReason());
- for(var key in strData[0]){
- if(key=="strPId"){
- $("#pid").val(strData[0][key]);
- }else if(key=="strDepartName"){
- $("#departname").val(strData[0][key]);
- }
- }
- }
- }, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
-
- ]}).zindex();
- }
- function callbackClean(){
- $('#departname').val('');
- $('#pid').val('');
- }
- //选择项目名称列表================
- /* //选择项目名称zTree================
- function openDepartmentSelect() {
- //$.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#pid").val();
- $.dialog({content: 'url:projarrangeDetailController.do?departZTreeSelect&orgIds='+orgIds, zIndex: getzIndex(), title: '所属部门列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
- ]}).zindex();
- }
-
- function callbackDepartmentSelect() {
- var iframe = this.iframe.contentWindow;
- var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
- var nodes = treeObj.getCheckedNodes(true);
- if(nodes.length>0){
- var ids='',names='';
- for(i=0;i<nodes.length;i++){
- var node = nodes[i];
- ids += node.id+',';
- names += node.name+',';
- }
- $('#departname').val(names);
- $('#departname').blur();
- $('#pid').val(ids);
- }
- }
- function callbackClean(){
- $('#departname').val('');
- $('#pid').val('');
- }
- //选择项目名称zTree================ */
-
-
-
-
- //班次状态启用
- function enableObj(){
- //var ids = [];
- var ids;
- var rows = $("#arrangeDutyList").datagrid('getSelections');
- if (rows.length > 0) {
- $.messager.confirm("确认", "确定要启用这条数据?", function (r) {
- if (r) {
- /* for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i].id);
- } */
- ids=rows[0].id;
- $.ajax({
- url : "arrangeDutyController.do?enable",
- type : 'post',
- data : {
- id : ids
- },
- cache : false,
- success : function(data) {
- var d = data; // ------ $.parseJSON(data);
- if (d.success) {
- tip(d.msg);
- $("#arrangeDutyList").datagrid('reload');
- clearData();
- ids='';
- }else{
- layer.alert(d.msg);
- }
- }
- });
- }
- });
- } else {
- layer.alert("请选择需要启用的数据");
- }
- }
-
- //班次状态停用
- function disableObj(){
- //var ids = [];
- var ids;
- var rows = $("#arrangeDutyList").datagrid('getSelections');
- if (rows.length > 0) {
- $.messager.confirm("确认", "确定要停用这条数据?", function (r) {
- if (r) {
- /* for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i].id);
- } */
- ids=rows[0].id;
- $.ajax({
- url : "arrangeDutyController.do?disable",
- type : 'post',
- data : {
- id : ids
- },
- cache : false,
- success : function(data) {
- var d = data; // ------ $.parseJSON(data);
- if (d.success) {
- var msg = d.msg;
- tip(msg);
- $("#arrangeDutyList").datagrid('reload');
- clearData();
- ids='';
- }else{
- layer.alert(d.msg);
- }
- }
- });
- }
- });
- } else {
- layer.alert("请选择需要停用的数据");
- }
- }
-
- //清空数据
- function clearData(){
- var rowData = {};
- fillData(rowData);
- $("#arrangeDutyList").datagrid('clearChecked');
- }
-
- function fillData(rowData){
- //清空表单
- $("#formobj").form('clear');
- //填充数据
- for(var d in rowData){
- $("#"+d).val(rowData[d]);
- }
- }
-
- //逻辑删除班次表
- function logicDel(){
- var id ;
- var rows = $("#arrangeDutyList").datagrid('getSelections');
- if (rows.length > 0) {
- $.messager.confirm("确认", "确定要删除这条数据?", function (r) {
- if (r) {
- for ( var i = 0; i < rows.length; i++) {
- id=rows[i].id;
- }
- $.ajax({
- url : "arrangeDutyController.do?logicDel",
- type : 'post',
- data : {
- id : id
- },
- cache : false,
- success : function(data) {
- var d = data; // ------ $.parseJSON(data);
- // console.log(d);
- if (d.success) {
- tip(d.msg);
- $("#arrangeDutyList").datagrid('reload');
- clearData();
- id='';
- }else{
- layer.alert(d.msg);
- }
- }
- });
- }
- });
- } else {
- layer.alert("请选择需要删除的数据");
- }
- }
- </script>
|