|
@@ -0,0 +1,232 @@
|
|
|
|
|
+shr.defineClass("shr.ats.ScheduleShiftListEx", shr.ats.ScheduleShiftList, {
|
|
|
|
|
+ initalizeDOM: function () {
|
|
|
|
|
+ shr.ats.ScheduleShiftListEx.superClass.initalizeDOM.call(this);
|
|
|
|
|
+ },
|
|
|
|
|
+ doVerticalRenderDataGrid: function () {
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ var url = shr.getContextPath() + "/dynamic.do?handler=com.kingdee.shr.ats.web.handler.ScheduleShiftListHandler&method=getGridData&transverse=1";
|
|
|
|
|
+ url += '&serviceId=' + encodeURIComponent(shr.getUrlRequestParam("serviceId"));
|
|
|
|
|
+ //选中横向列表
|
|
|
|
|
+ if (0 == that.showType) {
|
|
|
|
|
+ url += "&sidx=proposer.FINDEX,proposerid,attenddate&sord=asc";//自定义排序
|
|
|
|
|
+ }
|
|
|
|
|
+ var options = {
|
|
|
|
|
+ url: url,
|
|
|
|
|
+ postData: that.assembleParam(),
|
|
|
|
|
+ datatype: "json",
|
|
|
|
|
+ mtype: "POST",
|
|
|
|
|
+ multiselect: true,
|
|
|
|
|
+ rownumbers: false,
|
|
|
|
|
+ footerrow: true, //原生jqGrid加入防止样式错乱
|
|
|
|
|
+ colNames: that.colChineseNames_function(),
|
|
|
|
|
+ colModel: that.colModel_function(),
|
|
|
|
|
+ rowNum: that.rowNumPerPage,
|
|
|
|
|
+ sortname: "",
|
|
|
|
|
+ pager: '#gridPager1',
|
|
|
|
|
+ height: 'auto',
|
|
|
|
|
+ rowList: [30, 50, 100, 200],
|
|
|
|
|
+ recordpos: 'left',
|
|
|
|
|
+ recordtext: '({0}-{1})/{2}',
|
|
|
|
|
+ gridview: true,
|
|
|
|
|
+ pginput: true,
|
|
|
|
|
+ shrinkToFit: true,
|
|
|
|
|
+ forceFit: true,
|
|
|
|
|
+ viewrecords: true,
|
|
|
|
|
+ synchTotal: "true",
|
|
|
|
|
+ customPager: '#microToolbar1',
|
|
|
|
|
+ afterInsertRow: function (rowid, rowdata) {
|
|
|
|
|
+ },
|
|
|
|
|
+ onSelectRow: function (rowid, status) {
|
|
|
|
|
+ },
|
|
|
|
|
+ onCellSelect: function (rowid, iCol, cellcontent, e) {
|
|
|
|
|
+ if (iCol > 0) {
|
|
|
|
|
+ var billId = $("#dataGrid").jqGrid("getCell", rowid, "id");
|
|
|
|
|
+ that.reloadPage({
|
|
|
|
|
+ uipk: 'com.kingdee.eas.hr.ats.app.ScheduleShift.form',
|
|
|
|
|
+ billId: billId,
|
|
|
|
|
+ method: 'view'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeProcessing: function (data) {
|
|
|
|
|
+ },
|
|
|
|
|
+ loadComplete: function (data) {
|
|
|
|
|
+ that.handleMicroToolbarInfo(data);
|
|
|
|
|
+ // var viewPage = shr.getCurrentViewPage();
|
|
|
|
|
+ // viewPage.setGridHeight();
|
|
|
|
|
+
|
|
|
|
|
+ // BT-01267019 【V8.8SP1功能测试】员工排班列表-横向显示,页面底部留白太多
|
|
|
|
|
+ $('#dataGrid').jqGrid("setGridHeight", window.screen.height - 433 > 550 ? window.screen.height - 433 : 550);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ $("#gridPager1").hide();
|
|
|
|
|
+ // clear table
|
|
|
|
|
+ $('#dataGrid').jqGrid(options);
|
|
|
|
|
+ //判断当前表格的列宽是否超出了body体的宽度,如果超出再设置冻结列,如不超出则不设置冻结列
|
|
|
|
|
+ // options.shrinkToFit 为true,即自适应,故而不需要冻结列
|
|
|
|
|
+ if (!options.shrinkToFit) {
|
|
|
|
|
+ jQuery('#dataGrid').jqGrid('setFrozenColumns');
|
|
|
|
|
+ } else {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ doRenderDataGrid : function () {
|
|
|
|
|
+
|
|
|
|
|
+ this.isFirstTimeLoad++;
|
|
|
|
|
+ if(this.isFirstTimeLoad < 2){
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ that.changeShift1 = null;
|
|
|
|
|
+ that.changeShift2 = null;
|
|
|
|
|
+ //考勤日期范围必选
|
|
|
|
|
+ var dateRequiredValidate = shr.fastFilterValidateUtil.requiredValidate(this,{"name":"beginDate_endDate","errorMessage":jsBizMultLan.atsManager_scheduleShiftList_i18n_28});
|
|
|
|
|
+ if(!dateRequiredValidate) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var ONE_QUARTER_TIME = 7948800000; // 92 * 24 * 60 * 60 * 1000 一个季度的时间(92天)
|
|
|
|
|
+ var dateRequiredValidate = shr.fastFilterValidateUtil.requiredDateRangeValidate(this,{"name":"beginDate_endDate","errorMessage":jsBizMultLan.atsManager_scheduleShiftList_26522394_i18n_0, "milliSecondRange": ONE_QUARTER_TIME});
|
|
|
|
|
+ if(!dateRequiredValidate) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if($('#gridPager1').length > 0){
|
|
|
|
|
+ $('#listInfo').empty();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $('#listInfo').append('<div id="gridPager1"></div>');
|
|
|
|
|
+ $('#listInfo').append('<table id="dataGrid"></table>');
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //选中横向列表
|
|
|
|
|
+ if(0 == that.showType){
|
|
|
|
|
+ that.doVerticalRenderDataGrid();
|
|
|
|
|
+ }
|
|
|
|
|
+ //选中纵 向列表
|
|
|
|
|
+ else if(1 == that.showType){
|
|
|
|
|
+ var url = shr.getContextPath() + "/dynamic.do?handler=com.kingdee.shr.custom.ats.web.handler.ScheduleShiftListHandlerEx&method=getPersonShift";
|
|
|
|
|
+ url += "&transverse=0&serviceId="+encodeURIComponent(shr.getUrlRequestParam("serviceId"));
|
|
|
|
|
+
|
|
|
|
|
+ $("#gridPager1").hide();
|
|
|
|
|
+ listWorkShift.renderListTable({
|
|
|
|
|
+ url:url,
|
|
|
|
|
+ rowNum : that.rowNumPerPage,
|
|
|
|
|
+ pager : '#gridPager1',
|
|
|
|
|
+ rowList : [30,50,100,200],
|
|
|
|
|
+ recordtext : '({0}-{1})/{2}',
|
|
|
|
|
+ viewrecords : true,
|
|
|
|
|
+ postData: that.assembleParam(),
|
|
|
|
|
+ loadComplete:{fn : that.handleMicroToolbarInfo,sequence :atsCommonUtile.SEQUENCE_AFTER,scope:this}
|
|
|
|
|
+ });
|
|
|
|
|
+ $($("#listInfo").find(".ui-jqgrid-bdiv")[0]).css("height", "500px").css("overflow", "auto");
|
|
|
|
|
+ }
|
|
|
|
|
+ //未排班列表
|
|
|
|
|
+ else{
|
|
|
|
|
+ var url = shr.getContextPath() + "/dynamic.do?handler=com.kingdee.shr.ats.web.handler.ScheduleShiftListHandler&method=getNoShiftGridData";
|
|
|
|
|
+ url += '&serviceId='+encodeURIComponent(shr.getUrlRequestParam("serviceId"));
|
|
|
|
|
+ $("#gridPager1").hide();
|
|
|
|
|
+ listWorkShift.renderListTable({
|
|
|
|
|
+ url:url,
|
|
|
|
|
+ rowNum : that.rowNumPerPage,
|
|
|
|
|
+ pager : '#gridPager1',
|
|
|
|
|
+ rowList : [30,50,100,200],
|
|
|
|
|
+ recordtext : '({0}-{1})/{2}',
|
|
|
|
|
+ viewrecords : true,
|
|
|
|
|
+ postData: that.assembleParam(),
|
|
|
|
|
+ loadComplete:{fn : that.handleMicroToolbarInfo,sequence :atsCommonUtile.SEQUENCE_AFTER,scope:this}
|
|
|
|
|
+ });
|
|
|
|
|
+ $($("#listInfo").find(".ui-jqgrid-bdiv")[0]).css("height", "500px").css("overflow", "auto");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ // doRenderDataGrid: function () {
|
|
|
|
|
+
|
|
|
|
|
+ // this.isFirstTimeLoad++;
|
|
|
|
|
+ // if (this.isFirstTimeLoad < 2) {
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // var that = this;
|
|
|
|
|
+ // that.changeShift1 = null;
|
|
|
|
|
+ // that.changeShift2 = null;
|
|
|
|
|
+ // //考勤日期范围必选
|
|
|
|
|
+ // var dateRequiredValidate = shr.fastFilterValidateUtil.requiredValidate(this, { "name": "beginDate_endDate", "errorMessage": jsBizMultLan.atsManager_scheduleShiftList_i18n_28 });
|
|
|
|
|
+ // if (!dateRequiredValidate) {
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // var ONE_QUARTER_TIME = 7948800000; // 92 * 24 * 60 * 60 * 1000 一个季度的时间(92天)
|
|
|
|
|
+ // var dateRequiredValidate = shr.fastFilterValidateUtil.requiredDateRangeValidate(this, { "name": "beginDate_endDate", "errorMessage": jsBizMultLan.atsManager_scheduleShiftList_26522394_i18n_0, "milliSecondRange": ONE_QUARTER_TIME });
|
|
|
|
|
+ // if (!dateRequiredValidate) {
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // if ($('#gridPager1').length > 0) {
|
|
|
|
|
+ // $('#listInfo').empty();
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // $('#listInfo').append('<div id="gridPager1"></div>');
|
|
|
|
|
+ // $('#listInfo').append('<table id="dataGrid"></table>');
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // //选中横向列表
|
|
|
|
|
+ // if (0 == that.showType) {
|
|
|
|
|
+ // that.doVerticalRenderDataGrid();
|
|
|
|
|
+ // }
|
|
|
|
|
+ // //选中纵 向列表
|
|
|
|
|
+ // else if (1 == that.showType) {
|
|
|
|
|
+ // var url = shr.getContextPath() + "/dynamic.do?handler=com.kingdee.shr.custom.ats.web.handler.ScheduleShiftListHandlerEx&method=getPersonShift";
|
|
|
|
|
+ // url += "&transverse=0&serviceId=" + encodeURIComponent(shr.getUrlRequestParam("serviceId"));
|
|
|
|
|
+
|
|
|
|
|
+ // $("#gridPager1").hide();
|
|
|
|
|
+ // listWorkShift.renderListTable({
|
|
|
|
|
+ // url: url,
|
|
|
|
|
+ // rowNum: that.rowNumPerPage,
|
|
|
|
|
+ // pager: '#gridPager1',
|
|
|
|
|
+ // rowList: [30, 50, 100, 200],
|
|
|
|
|
+ // recordtext: '({0}-{1})/{2}',
|
|
|
|
|
+ // viewrecords: true,
|
|
|
|
|
+ // postData: that.assembleParam(),
|
|
|
|
|
+ // // loadComplete:{fn : that.handleMicroToolbarInfo,sequence :atsCommonUtile.SEQUENCE_AFTER,scope:this}
|
|
|
|
|
+ // // footerrow: true, // 启用合计行
|
|
|
|
|
+ // // userDataOnFooter: true, // 将用户数据放在合计行
|
|
|
|
|
+ // clientFooter: true,
|
|
|
|
|
+ // loadComplete: {
|
|
|
|
|
+ // fn: function (data) {
|
|
|
|
|
+ // that.handleMicroToolbarInfo(data);
|
|
|
|
|
+ // listWorkShift.setStatisticalParams(that);
|
|
|
|
|
+ // if (listWorkShift.countDialogIsOpen) {
|
|
|
|
|
+ // listWorkShift.getShiftStatisticsData();
|
|
|
|
|
+ // }
|
|
|
|
|
+ // listWorkShift.getAttentShiftsData();
|
|
|
|
|
+ // },
|
|
|
|
|
+ // sequence: atsCommonUtile.SEQUENCE_AFTER, scope: this
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // $($("#listInfo").find(".ui-jqgrid-bdiv")[0]).css("height", "500px").css("overflow", "auto");
|
|
|
|
|
+
|
|
|
|
|
+ // }
|
|
|
|
|
+ // //未排班列表
|
|
|
|
|
+ // else {
|
|
|
|
|
+ // var url = shr.getContextPath() + "/dynamic.do?handler=com.kingdee.shr.ats.web.handler.ScheduleShiftListHandler&method=getNoShiftGridData";
|
|
|
|
|
+ // url += '&serviceId=' + encodeURIComponent(shr.getUrlRequestParam("serviceId"));
|
|
|
|
|
+ // $("#gridPager1").hide();
|
|
|
|
|
+ // listWorkShift.renderListTable({
|
|
|
|
|
+ // url: url,
|
|
|
|
|
+ // rowNum: that.rowNumPerPage,
|
|
|
|
|
+ // pager: '#gridPager1',
|
|
|
|
|
+ // rowList: [30, 50, 100, 200],
|
|
|
|
|
+ // recordtext: '({0}-{1})/{2}',
|
|
|
|
|
+ // viewrecords: true,
|
|
|
|
|
+ // postData: that.assembleParam(),
|
|
|
|
|
+ // loadComplete: { fn: that.handleMicroToolbarInfo, sequence: atsCommonUtile.SEQUENCE_AFTER, scope: this }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // $($("#listInfo").find(".ui-jqgrid-bdiv")[0]).css("height", "500px").css("overflow", "auto");
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // }
|
|
|
|
|
+})
|