qingwu vor 3 Wochen
Ursprung
Commit
f19ac1d885
13 geänderte Dateien mit 1621 neuen und 3 gelöschten Zeilen
  1. 82 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/HRBillBaseEdit.js
  2. 69 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/RoomChangeApplicationBatchEdit.js
  3. 104 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/RoomChangeApplicationEdit.js
  4. 265 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/RoomChangeApplicationList.js
  5. 6 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/RoomChangeApplicationSelfEdit.js
  6. 514 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/checkInApplicationAllList.js
  7. 102 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/checkInApplicationEdit.js
  8. 75 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/checkInApplicationSelfEdit.js
  9. 133 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/checkOutApplicationAllList.js
  10. 84 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/checkoutApplicationEdit.js
  11. 158 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/waterpower/WaterPowerMeterReadingEdit.js
  12. 21 0
      js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/waterpower/WaterPowerPricingEdit.js
  13. 8 3
      src/com/kingdee/eas/custom/dormitorysystem/application/app/RoomChangeApplicationControllerBean.java

+ 82 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/HRBillBaseEdit.js

@@ -0,0 +1,82 @@
+shr.defineClass("shr.custom.HRBillBaseEdit", shr.framework.Edit, {
+    initalizeDOM: function () {
+        shr.custom.HRBillBaseEdit.superClass.initalizeDOM.call(this);
+        var that = this;
+    }
+    /**
+ * 提交生效
+ * 重写此方法的校验调用方法
+ */
+    , submitEffectAction: function (event) {
+        var _self = this;
+        if (_self.validate() && _self.verify()) {
+            shr.showConfirm("您确认要提交生效吗?", function () {
+                _self.prepareSubmitEffect(event, 'submitEffect');
+            });
+        }
+    }
+    , prepareSubmitEffect: function (event, action) {
+        var _self = this;
+        var data = _self.assembleSaveData(action);
+
+        var target;
+        if (event && event.currentTarget) {
+            target = event.currentTarget;
+        }
+        shr.doAction({
+            target: target,
+            url: _self.dynamicPage_url,
+            type: 'post',
+            data: data,
+            success: function (response) {
+                if (response != null || response != "") {
+                    _self.back();
+                }
+            }
+        });
+    },
+    // setButtonVisible: function () {
+    // 	shr.custom.HRBillBaseEdit.superClass.setButtonVisible.call(this);
+    // 	if (this.getOperateState().toUpperCase() == 'ADDNEW') { //新增状态下不显示套打按钮
+    // 		$("#templatePrint").hide();
+    // 	}
+    // 	if (this.getOperateState().toUpperCase() == 'VIEW') { //查看状态下不允许提交
+    // 		$("#submit").hide();
+    // 		$("#submitEffect").hide();
+    // 	}
+    // },
+    verify: function () {
+        var _self = this;
+        var isExist = true;
+        if (this.getOperateState().toUpperCase() != 'VIEW') {
+            const checkInDate = $("#entrys_checkInDate").shrDateTimePicker("getValue")//入住日期		
+            const adjustmentDate = $("#entrys_adjustmentDate").shrDateTimePicker("getValue")//调整日期
+            const checkoutDate = $("#entrys_checkoutDate").shrDateTimePicker("getValue")//退宿日期
+
+            var startTimeOfDate = new Date(checkInDate);
+            var endTimeOfDate = new Date(checkoutDate);
+
+            var longTime = endTimeOfDate.getTime() - startTimeOfDate.getTime();
+            if (longTime <= 0) {
+                shr.showInfo({ message: "退宿日期不可大于入住日期!" });
+                return false;
+            }
+            var data = _self.assembleSaveData("save");
+            _self.remoteCall({
+                method: 'saveverify',
+                param: {
+                    model: data.model,
+                },
+                data: data,
+                async: false, // 关键点:设置为false实现同步请求
+                success: function (data) {
+                    console.log(data);
+                }, error(msg) {
+                    console.log(msg);
+                    isExist = false;
+                }
+            });
+        }
+        return isExist;
+    }
+});

+ 69 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/RoomChangeApplicationBatchEdit.js

@@ -0,0 +1,69 @@
+shr.defineClass("shr.custom.RoomChangeApplicationBatchEdit", shr.framework.Edit, {
+	initalizeDOM: function () {
+		shr.custom.RoomChangeApplicationBatchEdit.superClass.initalizeDOM.call(this);
+		var that = this;
+		that.entrys();
+	}
+	
+	,setButtonVisible:function(){
+		var billState = $("#billState").val();
+		//alert(billState);
+		if (billState) {
+			if (billState==3 || 
+				'审批不通过'==billState ||
+					billState ==4||
+					'审批通过'==billState ||
+					billState ==2||
+					'审批中'==billState ) {
+				$("#edit").hide();
+				$("#submit").hide();
+				$("#submitEffect").hide();
+			} else if (1==billState ||
+				'未审批'== billState ||
+					2 == billState || 
+					'审批中'==billState) { //未审批或审批中
+				if(!this.isFromWF()){
+					$("#edit").hide();
+					$("#submit").hide();
+					$("#submitEffect").hide();
+				}
+			}
+		}
+		if (this.getOperateState().toUpperCase() == 'VIEW') { //查看状态下不允许提交
+			//不允许提交生效
+			$("#submitEffect").hide();
+		}
+		//如果是工作流打回,界面上的"取消"不显示
+		if (this.isFromWF()) {
+			$("#cancelAll").hide(); 
+		}
+	},
+	entrys() {
+		waf("#entrys").jqGrid("option", {
+			afterEditCell: function (rowid, cellname, value, iRow, iCol) {
+				$('#' + iRow + '_person').shrPromptBox("option", {
+					onchange: function (e, val) {
+						if (cellname == "person") {
+							var adminOrg = {
+								name: val.current["adminOrgUnit.name"],
+								id: val.current["adminOrgUnit.id"]
+							}
+							$("#entrys").jqGrid('setCell', rowid, "adminOrg", adminOrg);
+							var position = {
+								name: val.current["position.name"],
+								id: val.current["position.id"]
+							}
+							$("#entrys").jqGrid('setCell', rowid, "position", position);
+						}
+					}
+				});
+			},
+			beforeSaveCell: function (rowid, cellname, value, iRow, iCol) {
+			},
+			afterSaveCell: function (rowid, cellname, value, iRow, iCol) {
+			},
+			beforeEditCell: function (rowid, cellname, value, iRow, iCol) {
+			}
+		});
+	}
+});

+ 104 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/RoomChangeApplicationEdit.js

@@ -0,0 +1,104 @@
+shr.defineClass("shr.custom.RoomChangeApplicationEdit", shr.custom.HRBillBaseEdit, {
+	initalizeDOM: function () {
+		shr.custom.RoomChangeApplicationEdit.superClass.initalizeDOM.call(this);
+		var that = this;
+		if (this.getOperateState().toUpperCase() != 'VIEW') {
+			that.entrysOldOccupantsF7Action();
+			that.occupantsFilter();
+		}
+	},
+	actSubmit: function (event, action) {
+		var _self = this;
+		var data = _self.assembleSaveData(action);
+		data.nextPers = shr.toJSON(_self.nextPers);
+		var target;
+		if (event && event.currentTarget) {
+			target = event.currentTarget;
+		}
+		shr.doAction({
+			target: target,
+			url: _self.dynamicPage_url,
+			type: 'post',
+			data: data,
+			success: function (response) {
+				if (_self.isFromWF()) {
+					// 来自任务中心
+					var parent = window.parent,
+						submitSuccess = parent.submitSuccess;
+
+					if ($.isFunction(submitSuccess)) {
+						// 回调父页面方法
+						var assignmentID = shr.getAssignmentId();
+						submitSuccess.call(parent, assignmentID);
+					} else {
+						// 查看状态
+						_self.viewAction();
+					}
+				} else {
+					// 普通提交,返回上一页面
+					// setTimeout(() => {
+						_self.back();
+					// }, 2000)
+					// _self.goNextPage(target,response);
+
+				}
+				//来自portal流程中心,关闭窗口
+				if (location.href.indexOf("isShrBill=true") > 0) window.close();
+			}
+		});
+	},
+	/**
+	*
+	*/
+	occupantsFilter() {
+		const currentDate = new Date();
+		const year = currentDate.getFullYear();
+		const month = String(currentDate.getMonth() + 1).padStart(2, '0');
+		const day = String(currentDate.getDate()).padStart(2, '0');
+
+		const formattedDate = `${year}-${month}-${day}`;
+		console.log(formattedDate);
+
+		var filter = "CheckOutDate > '" + formattedDate + "'"
+		$("#entrys_oldOccupants").shrPromptBox("setFilter", filter);
+	},
+	/**
+	 * 原入住人员信息
+	 *  */
+	entrysOldOccupantsF7Action() {
+		var that = this;
+		//没有填写入住人员信息前禁用
+		if ($("#entrys_oldOccupants").shrPromptBox('getValue').id == "") {
+			that.isDisableOrenable("disable")
+		}
+		$('#entrys_oldOccupants').shrPromptBox('option', {
+			onchange: function (e, value) {
+				var data = value.current || [];
+				// 人员
+				var person = new Object();
+				person.id = data["personPosition.person.id"];
+				person.name = data["personPosition.person.name"];
+				$('#entrys_person').shrPromptBox('setValue', person);
+				// 组织
+				var adminObj = new Object();
+				adminObj.id = data["personPosition.personDep.id"];
+				adminObj.name = data["personPosition.personDep.name"];
+				$('#entrys_adminOrg').shrPromptBox('setValue', adminObj);
+				// 职位
+				var position = new Object();
+				position.id = data["personPosition.primaryPosition.id"];
+				position.name = data["personPosition.primaryPosition.name"];
+				$('#entrys_position').shrPromptBox('setValue', position);
+				that.isDisableOrenable("enable")
+
+			}
+		});
+	},
+	isDisableOrenable(type) {
+		$('#entrys_currentRoom').shrPromptBox(type);
+		$('#entrys_checkInDate').shrDateTimePicker(type);
+		$('#entrys_adjustRoom').shrPromptBox(type);
+		$('#entrys_checkoutDate').shrDateTimePicker(type);
+	}
+
+});

+ 265 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/RoomChangeApplicationList.js

@@ -0,0 +1,265 @@
+shr.defineClass("shr.custom.RoomChangeApplicationList", shr.framework.List, {
+	initalizeDOM: function () {
+		shr.custom.RoomChangeApplicationList.superClass.initalizeDOM.call(this);
+		var that = this;
+	},
+	/**
+ * 撤销
+ * @param {*} event 
+ * @returns 
+ */
+	abortBillAction: function (event) {
+		var realBillId = [];
+		var that = this;
+		//var billId = this.selectedRowId;
+		var billId = $(this.gridId).jqGrid("getSelectedRows");
+		if (billId == undefined || billId.length == 0 || (billId && billId.length == 1 && billId[0] == "")) {
+			shr.showWarning({ "message": jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_28 });
+			return;
+		}
+		that.defaultBatchActionHandle("abortBizBill");
+	}
+	/**
+	 * 描述:删除操作
+	 * @action 
+	 */
+	, deleteAction: function () {
+		var _self = this;
+		var billId = $("#grid").jqGrid("getSelectedRows");
+		if (billId == undefined || billId.length <= 0 || (billId && billId.length == 1 && billId[0] == "")) {
+			shr.showWarning({ message: "请先选中行!" });
+			return false;
+		}
+		var selectedIds = this.getSelectedIds();
+		if (shr.atsBillUtil.isInWorkFlow(selectedIds)) {
+			shr.showConfirm(jsBizMultLan.atsManager_atsOverTimeBillAllList_i18n_10, function () {
+				top.Messenger().hideAll();
+				shr.atsBillUtil.abortWorkFlow(selectedIds);//撤回未提交且已绑定流程的单据
+				_self.doRemoteAction({
+					method: 'delete',
+					billId: selectedIds
+				});
+			});
+		} else {
+			if (selectedIds) {
+				this.deleteRecord(selectedIds);
+			}
+		}
+
+	}
+	/**
+	 * 获得选中的id,且满足选中的数据仅是未提交的数据。
+	 */
+	, getSelectedIds: function () {
+		var $grid = $(shr.getCurrentViewPage().gridId);
+		var selectedIds = $grid.jqGrid("getSelectedRows");
+		if (selectedIds.length > 0) {
+			var billIds = [];
+			for (var i = 0, length = selectedIds.length; i < length; i++) {
+				var billState = $grid.jqGrid("getCell", selectedIds[i], "billState") || 0;
+				if (billState == 0) {
+					billIds.push($grid.jqGrid("getCell", selectedIds[i], "id"));
+				}
+			}
+			if (billIds.length < selectedIds.length) {
+				shr.showWarning({
+					message: "只能删除未提交状态的数据,请选中表格中未提交的数据!"
+				});
+			} else {
+				return billIds.toString();
+			}
+		}
+	}
+	/**
+	 * 个人列表-查看功能
+	 */
+	, viewAction: function (billId) {
+		var _self = this;
+		var isMultiEntry = $("#grid").jqGrid("getRowData", billId).isMultiEntry;
+		// 批量提交
+		if (isMultiEntry == "1") {
+			_self.reloadPage({
+				uipk: "com.kingdee.eas.custom.dormitorysystem.application.app.RoomChangeApplicationBatch.form",
+				billId: billId,
+				method: 'view'
+			});
+			// 普通提交
+		} else {
+			_self.reloadPage({
+				uipk: "com.kingdee.eas.custom.dormitorysystem.application.app.RoomChangeApplication.form",
+				billId: billId,
+				method: 'view'
+			});
+		}
+
+	}
+	/**
+	* 多人换宿单
+	*/
+	, addNewBatchAction: function () {
+		this.reloadPage({
+			uipk: "com.kingdee.eas.custom.dormitorysystem.application.app.RoomChangeApplicationBatch.form",
+			method: 'addNew'
+		});
+	}
+	/**
+	 * 提交生效 
+	 */
+	, submitEffectAction: function (event) {
+		var _self = this,
+			workArea = _self.getWorkarea(),
+			$form = $('form', workArea);
+		var billId = $("#grid").jqGrid("getSelectedRows");
+		if (billId == undefined || billId.length == 0 || (billId && billId.length == 1 && billId[0] == "")) {
+			shr.showWarning({ "message": "请先选中单据!" });
+			return false;
+		}
+		shr.showConfirm("是否提交生效?", function () {
+			_self.prepareSubmitEffect(event, 'submitEffect');
+		});
+	}
+	/**
+	 * 提交生效 
+	 */
+	, prepareSubmitEffect(event, action) {
+		var _self = this;
+
+		_self.defaultBatchActionHandle("submitEffect");
+	}
+	/**
+	 * 反审批单据
+	 */
+	, againstApproveAction: function () {
+		var _self = this;
+		_self.beforeAgainstApproveAction();
+	}
+	/**
+	 * 反审批前动作
+	 */
+	, beforeAgainstApproveAction: function () {
+		var billId = $("#grid").jqGrid("getSelectedRows");
+		if (billId == undefined || billId.length == 0 || (billId && billId.length == 1 && billId[0] == "")) {
+			shr.showWarning({ message: "请选择选中行!" });
+			return;
+		}
+		// var realBillId = [];
+		// var billLength = billId.length;
+		// for (var i = 0; i < billLength; i++) {
+		// 	//去除重复处理
+		// 	if ($.inArray(billId[i], realBillId) == -1) {
+		// 		realBillId.push(billId[i]);
+		// 	}
+		// }
+		//支持批量反审批
+		// if(realBillId.length>1){
+		// 	shr.showWarning({message: "请选中一行!"});
+		// 	return ;
+		// }
+		var _self = this;
+		shr.showConfirm("您确认对此单据进行反审批吗?", function () {
+			// top.Messenger().hideAll();
+			// var data = {
+			// 	method: 'againstApprove'
+			// };
+
+			// data = $.extend(_self.prepareParam(), data);
+			// data.billId = realBillId.join(",")
+
+			// _self.remoteCall({
+			// 	method: "againstApprove",
+			// 	param: data,
+			// 	success: function (res) {
+			// 		if (res && res.msg !== '') {
+			// 			shr.showInfo({ message: res.msg });
+			// 		}
+			// 		_self.reloadGrid();
+			// 	}, error: function (response) {
+			// 		shr.showError({
+			// 			message: response
+			// 		});
+			// 	}
+			// });
+			_self.defaultBatchActionHandle("againstApprove");
+		});
+	}
+	/**
+	 * 默认的action处理方法
+	 */
+	, defaultBatchActionHandle: function (option) {
+		// var selectedIds = this.getSelectedIds();
+		// if (!selectedIds) {
+		// 	return;
+		// }
+		var $grid = $(shr.getCurrentViewPage().gridId);
+		var selectedIds = $grid.jqGrid("getSelectedRows").toString();
+		if (typeof option == 'string') {
+			option = { methodName: option };
+		}
+
+		if (option.requireConfirm && option.message) {
+			// 需要提示信息
+			var _self = this;
+			shr.showConfirm(option.message, function () {
+				top.Messenger().hideAll();
+				_self.doRemoteWithBatchAction({
+					method: option.methodName,
+					billId: selectedIds
+				});
+			});
+		} else {
+			this.doRemoteWithBatchAction({
+				method: option.methodName,
+				billId: selectedIds
+			});
+
+		}
+	},
+	/**
+	 * 执行远程服务端方法,适用于有批量操作的远程调用
+	 */
+	doRemoteWithBatchAction: function (param) {
+		var _self = this;
+		var data = param;
+		data = $.extend(_self.prepareParam(), data);
+		data = $.extend({ permItemId: shr.getCurrentPagePermItemId() }, data);
+		shr.doWithBatchAction({
+			url: _self.dynamicPage_url,
+			type: 'post',
+			data: data,
+			success: function (response) {
+				if (response) {
+					var batchTipsData = _self.batchTipsDataHandler(response, data);
+
+					$(_self).shrMessageTips({
+						isSuccess: batchTipsData.isSuccess,
+						successCount: batchTipsData.successCount,
+						failureCount: batchTipsData.failureCount,
+						confirmCallback: function () {
+							$(_self).shrDetailTips({
+								tableData: batchTipsData.tmp,
+								successCount: batchTipsData.successCount,
+								failureCount: batchTipsData.failureCount,
+								colNamesData: batchTipsData.tableModel,
+								isSortable: _self.batchHandlerWhetherSortable(),
+								modalWidth: param.modalWidth || ''
+							}).shrDetailTips("open");
+						},
+
+						closeCallback: function () {
+							// 这里需要存一下是否全部成功的标识
+							sessionStorage.setItem('deleteSuccess', batchTipsData.failureCount ? 0 : 1);
+							_self.reloadGrid();
+						}
+					}).shrMessageTips("open");
+				} else {
+					$(_self).shrMessageTips("_setDetailDisable");
+				}
+			},
+			error: function (response) {
+				if (param.billId && param.billId.split(',').length > 1) {
+					_self.reloadGrid();
+				}
+			}
+		});
+	}
+});

+ 6 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/RoomChangeApplicationSelfEdit.js

@@ -0,0 +1,6 @@
+shr.defineClass("shr.custom.RoomChangeApplicationSelfEdit", shr.custom.HRBillBaseEdit, {
+	initalizeDOM: function () {
+		shr.custom.RoomChangeApplicationSelfEdit.superClass.initalizeDOM.call(this);
+		var that = this;
+	},
+});

+ 514 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/checkInApplicationAllList.js

@@ -0,0 +1,514 @@
+shr.defineClass("shr.custom.CheckInApplicationList", shr.framework.List, {
+	initalizeDOM: function () {
+		shr.custom.CheckInApplicationList.superClass.initalizeDOM.call(this);
+
+		// $("#entrys_checkInRoom").shrPromptBox("options",{
+		// 	verifyBeforeOpenCallback:function(){
+
+		// 		return false;
+		// 	}
+		// });
+
+	},
+
+	/**
+	 * 新增
+	 */
+	// addNewAction: function (event) {
+	// 	this.reloadPage({
+	// 		uipk: "com.kingdee.eas.custom.dormitorysystem.application.app.CheckInApplication_self.form",
+	// 		method: 'addNew'
+	// 	});
+	// },
+	/**
+	 * 批量新增
+	 */
+	addNewBatchAction: function () {
+		this.reloadPage({
+			uipk: "com.kingdee.eas.hr.ats.app.AtsLeaveBillAllBatchForm",
+			method: 'addNew'
+		});
+	},
+
+	assembleSaveData: function (action, realBillId) {
+		var _self = this;
+		var billId = realBillId;
+		var data = _self.prepareParam(action + 'Action');
+		data.method = action;
+		data.operateState = "LIST";
+		data.billId = billId.join(",");
+		return data;
+	},
+	/**
+	 * 提交生效 
+	 */
+	submitEffectAction: function (event) {
+		var _self = this,
+			workArea = _self.getWorkarea(),
+			$form = $('form', workArea);
+		var billId = $("#grid").jqGrid("getSelectedRows");
+		if (billId == undefined || billId.length == 0 || (billId && billId.length == 1 && billId[0] == "")) {
+			shr.showWarning({ "message": "请先选中单据!" });
+			return false;
+		}
+		shr.showConfirm("是否提交生效?", function () {
+			_self.prepareSubmitEffect(event, 'submitEffect');
+		});
+	},
+	/**
+	 * 提交生效 
+	 */
+	prepareSubmitEffect: function (event, action) {
+		//		var _self = this;
+		//		var billData = _self.selectedRowData;
+		//		var realBillId = [];
+		//		for(var i=0;i<billData.length;i++){
+		//		    var billState = billData[i]['billState'];
+		//		   if("未提交" == billState.alias && $.inArray(billData[i].id, realBillId) == -1){
+		//		      realBillId.push(billData[i].id);
+		//		   }
+		//		}
+		var _self = this;
+		var billId = $("#grid").jqGrid("getSelectedRows");
+		var realBillId = [];
+		for (var i = 0; i < billId.length; i++) {
+			var billState = "";
+			if ($("tr[id='" + billId[i] + "']").length > 1) {//多人单据
+				billState = $($("tr[id='" + billId[i] + "']")[0]).find("td[aria-describedby='grid_billState']").text();
+			} else {
+				billState = $("tr[id='" + billId[i] + "'] td[aria-describedby='grid_billState']").text();
+			}
+			if ("未提交" == billState && $.inArray(billId[i], realBillId) == -1) {
+				realBillId.push(billId[i]);
+			}
+		}
+		if (realBillId.length == 0) {
+			shr.showError({ message: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_20 });
+			return;
+		}
+		var data = _self.assembleSaveData(action, realBillId);
+
+		var target;
+		if (event && event.currentTarget) {
+			target = event.currentTarget;
+		}
+		//openLoader(1, jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_47);
+
+		//审核操作
+		//  _self.doRemoteWithBatchExtendAction({
+		// 	method: "sendInterviewNotice",
+		// 	type: '600' //列表页签类型-未审核
+
+		// });
+		_self.defaultBatchActionHandle("submitEffect");
+
+		// _self.remoteCall({
+		// 	type: "post",
+		// 	method: "submitEffect",
+		// 	param: data,
+		// 	success: function (res) {
+		// 		closeLoader();
+		// 		var failMsg = "";
+		// 		if (res.error != "" && res.error != null && res.error != undefined) {
+		// 			shr.showError({ message: res.error });
+		// 		} else {
+		// 			if (res.submitNum - res.submitSuccessNum > 0) {
+		// 				failMsg = "," + jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_36 + (res.submitNum - res.submitSuccessNum)
+		// 			}
+		// 			shr.showInfo({ message: shr.formatMsg(jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_37, [res.submitNum, res.submitSuccessNum]) + failMsg, hiddenAfter: 5 });
+		// 			$("#grid").jqGrid().jqGrid("reloadGrid");
+		// 		}
+		// 	},
+		// 	error: function (e) {
+		// 		closeLoader();
+		// 	}
+		// });
+	},/**
+	* 描述:删除操作
+	* @action 
+	*/
+	// deleteAction: function () {
+	// 	var _self = this;
+	// 	var billId = $(this.gridId).jqGrid("getSelectedRows");;
+	// 	if (billId == undefined || billId.length <= 0 || (billId && billId.length == 1 && billId[0] == "")) {
+	// 		shr.showWarning({ message: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_28 });
+	// 		return false;
+	// 	}
+	// 	//var selectedIds = _self.getSelectedIds();
+	// 	var selectedIds = shr.atsBillUtil.getSelectedIds();
+	// 	if (shr.atsBillUtil.isInWorkFlow(selectedIds)) {
+	// 		shr.showConfirm(jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_34, function () {
+	// 			top.Messenger().hideAll();
+	// 			shr.atsBillUtil.abortWorkFlow(selectedIds);//废弃未提交且已绑定流程的单据
+	// 			_self.doRemoteAction({
+	// 				method: 'delete',
+	// 				billId: selectedIds
+	// 			});
+	// 		});
+	// 	} else {
+	// 		if (selectedIds) {
+	// 			this.deleteRecord(selectedIds);
+	// 		}
+	// 	}
+	// },
+
+	/**
+	 *提交之前的校验逻辑
+	 */
+	beforeSubmit: function () {
+		var _self = this;
+		var realIds = _self.getSelectedRealIds();
+		//校验房间是否入住(批量)
+		var result = _self.callServiceReturnResponse('validateRoomAvailableByBillIdsService', {
+			billIds: realIds
+		});
+		if (result.code == 500) {
+			shr.showWarning({
+				message: result.errorMsg.join("<br/>"),
+				hideAfter: 5
+			});
+			return false;
+		}
+		return true;
+	},
+	/**
+	 * 提交
+	 */
+	submitAction: function (event) {
+		var _self = this;
+		_self.beforeSubmit();
+		if (!_self.beforeSubmit()) {
+			return;
+		}
+		var realIds = _self.getSelectedRealIds();
+		var uipk = _self.getUrlParams('uipk');
+		if (!realIds) {
+			shr.showError({ message: $.shrI18n.framework.tips.noCanSubmitRecord, hiddenAfter: 5 });
+			return;
+		}
+		//调用OSF获取所选未提交单据的下一步参与人信息
+		var response = _self.getBillsNextPersonInfo(realIds, uipk);
+		shr.showConfirm($.shrI18n.common.tips.submitConfirm, function () {
+			_self.doSubmit(event, 'submit', response, realIds);
+		});
+
+		/*this.defaultActionHandle({
+			methodName: 'submit',
+			requireConfirm: true,
+			message: '您确认要提交吗?'
+		});*/
+	},
+	/**
+	 * 撤销
+	 * @param {*} event 
+	 * @returns 
+	 */
+	abortBillAction: function (event) {
+		var realBillId = [];
+		var that = this;
+		//var billId = this.selectedRowId;
+		var billId = $(this.gridId).jqGrid("getSelectedRows");
+		if (billId == undefined || billId.length == 0 || (billId && billId.length == 1 && billId[0] == "")) {
+			shr.showWarning({ "message": jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_28 });
+			return;
+		}
+		that.defaultBatchActionHandle("abortBizBill");
+
+		// var billLength = billId.length;
+		// for (var i = 0; i < billLength; i++) {
+		// 	//去除重复处理
+		// 	if ($.inArray(billId[i], realBillId) == -1) {
+		// 		realBillId.push(billId[i]);
+		// 	}
+		// }
+		// var _self = this;
+		// shr.showConfirm(jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_22, function () {
+		// 	top.Messenger().hideAll();
+		// 	_self.remoteCall({
+		// 		type: "post",
+		// 		method: "abortBill",
+		// 		param: { billId: realBillId.toString() },
+		// 		success: function (res) {
+		// 			shr.showInfo({ message: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_3 });
+		// 			_self.reloadGrid();
+		// 		}
+		// 	});
+		//});
+	},
+	/**
+	 * 反审批
+	 * @returns 
+	 */
+	againstApproveAction: function () {
+		var that = this;
+		var billId = $(this.gridId).jqGrid("getSelectedRows");;
+		if (billId == undefined || billId.length == 0 || (billId && billId.length == 1 && billId[0] == "")) {
+			shr.showError({ message: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_33 });
+			return;
+			// }else if(billId.length > 1){
+			// 	shr.showError({message: "只能选中一条记录进行反审批!"});
+			// 	return ;
+		} else {
+			var billIds = that.getSelectedIds();
+			that.defaultBatchActionHandle("againstApprove");
+
+			// var url = shr.getContextPath() + "/dynamic.do?method=checkAgainstInfo" + "&uipk=" + shr.getUrlRequestParam('uipk');
+			// shr.ajax({
+			// 	type: "post",
+			// 	async: false,
+			// 	data: { billIds: billIds },
+			// 	url: url,
+			// 	success: function (res) {
+			// 		info = res;
+
+			// 	}
+			// });
+			// if (info != null) {
+			// 	var error = jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_0 + "<br/>";
+			// 	var type = 1;
+
+			// 	if (info.auditInfo) {
+			// 		error = error + jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_21 + "[" + info.auditInfo + " ]<br/>";
+			// 		type = 2;
+			// 	}
+
+			// 	if (info.cancelInfoList) {
+			// 		error = error + jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_46 + "[" + info.cancelInfoList + " ]<br/>";
+			// 		type = 2;
+			// 	}
+
+			// 	if (type == 2) {
+			// 		shr.showError({ message: error });
+			// 		return;
+			// 	}
+			// }
+		}
+
+		//校验请假明细有没有生成汇总记录
+		var hasSummary = false;
+		var hasSalary = false;
+		var msg = "";
+		var salaryMsg = "";
+		var url = shr.getContextPath() + "/dynamic.do?method=checkDetailSummary" + "&uipk=" + shr.getUrlRequestParam('uipk');
+		shr.ajax({
+			type: "post",
+			async: false,
+			data: { billIds: billIds },
+			url: url,
+			success: function (res) {
+				hasSummary = res.hasSummary == "true" ? true : false;
+				hasSalary = res.hasSalary == "true" ? true : false;
+				msg = res.msg;
+				salaryMsg = res.salaryMsg;
+			}
+		});
+
+		if (hasSalary) {
+			shr.showError({ message: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_11 + salaryMsg });
+			return;
+		}
+
+		//
+		var confirmStr = jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_23;
+		if (hasSummary) {
+			confirmStr = msg;
+		}
+
+		//新增反审批原因	    
+		var serviceId = shr.getUrlRequestParam("serviceId");
+		$("#orgFillDiv").attr("src", shr.getContextPath() + '/dynamic.do?checkLicense=true&uipk=com.kingdee.eas.hr.ats.app.AtsBill.reason' + '&serviceId=' + encodeURIComponent(serviceId));
+		$('#orgFillDiv').dialog({
+			title: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_52,
+			width: 900,
+			height: 400,
+			modal: true,
+			resizable: false,
+			position: {
+				my: 'center',
+				at: 'top+20%',
+				of: window
+			},
+			open: function (event, ui) {
+			},
+			buttons: [{
+				text: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_50,
+				click: function () {
+					var reason = $("#orgFillDiv #reason").val();
+					if (reason) {
+						$(this).dialog("close");
+						shr.showConfirm(jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_23, function () {
+							top.Messenger().hideAll();
+
+							var data = {
+								method: 'againstApprove',
+								billIds: billIds,
+								reason: reason.substring(0, 400)
+							};
+							data = $.extend(that.prepareParam(), data);
+
+							shr.remoteCall({
+								type: "post",
+								method: "againstApprove",
+								param: data,
+								url: shr.getContextPath() + "/dynamic.do?uipk=com.kingdee.eas.hr.ats.app.AtsLeaveBillAllList",
+								success: function (res) {
+									if (res.flag == "1") {
+										shr.showInfo({ message: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_9 });
+										that.queryGrid();
+									} else {
+										shr.showError({ message: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_10 });
+									}
+								}
+							});
+
+						});
+					} else {
+						shr.showError({ message: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_53 });
+						return;
+					}
+				}
+			}, {
+				text: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_51,
+				click: function () {
+					$(this).dialog("close");
+				}
+			}],
+			close: function () { }
+		});
+		var addWorkString = '<div style=" margin: 35px; ">'
+			+ '<div id="allCalculateDatePicker" style=" margin-top: 19px;">'
+			+ '<textarea id="reason" type="text" class="block-father valid" name="remark" cols="3" rows="3" placeholder="" dataextenal="" istotemplate="true" ctrlrole="textarea" validate="{maxlength:255}"></textarea>'
+			+ ''
+			+ '</div>'
+			+ '</div>';
+		$("#orgFillDiv").html("").append(addWorkString);
+	},
+	/**
+	 * 扩展批处理方法
+	 */
+	doRemoteWithBatchExtendAction: function (option) {
+		var $grid = $(this.gridId),
+			totalRecords = $grid.jqGrid('getGridParam', 'records');
+		option.rows = totalRecords;
+		option.realMethod = option.method;
+		delete option.method;
+		var params = that.getCommonParamsForBatchAction(option);
+		params.theMaxRecords = this.theMaxRecords;
+		params.submitRecordsStep = this.submitRecordsStep;
+		params.dealWithOriginalPostData = this.dealWithOriginalPostData;
+		params.virtualQueryMode = this.virtualQueryMode;
+		params.isCancelCrossPageSelected = option.isCancelCrossPageSelected;
+		params.isShowCustomerMessage = option.isShowCustomerMessage;
+		if (option.isCancelCrossPageSelected == undefined) {
+			params.isCancelCrossPageSelected = true;
+		}
+		if (option.gridFrame != undefined && option.gridFrame != "") {
+			this.gridFrame = option.gridFrame;
+		}
+		var messageFun;
+		if ($.isFunction(top.Messenger)) {
+			messageFun = top.Messenger();
+		} else {
+			messageFun = Messenger();
+		}
+		messageFun.hideAll();
+		// if (this.isCrossPageSelectAll() == this._crossPage.YES || option.selectAll ) {
+		//     var message = '';
+		//     /*if (totalRecords > this.theMaxRecords) {
+		//         message = this.theMaxRecordsMessage;
+		//         params.rows = this.theMaxRecords;
+		//         message = shr.formatMsg(message, [this.theMaxRecords, this.theMaxRecords]);
+		//     } else*/
+		//     if (totalRecords > this.maxRecords) {
+		//         message = this.maxRecordsMessage;
+		//         message = shr.formatMsg(message, [this.maxRecords]);
+		//     }
+
+		//     if (message) {
+		//         /*if (this.isOverTheMaxRecordsRefuseDeal && totalRecords > this.theMaxRecords) {
+		//             shr.showWarning({message: this.theMaxRecordsMessage});
+		//         } else {*/
+		//             shr.showConfirm(message, function () {
+		//                 that._doRemoteWithCrossPageSelectAllAction(params);
+		//                 that.cancelCrossPageSelected(params.isCancelCrossPageSelected);
+		//             });
+		//         /*}*/
+		//     } else {
+		//         that._doRemoteWithCrossPageSelectAllAction(params);
+		//         that.cancelCrossPageSelected(params.isCancelCrossPageSelected); // 批处理操作完后是否自动取消页面的跨页全选操作)
+		//     }
+		// } else {
+		that.doRemoteWithBatchAction(params);
+		//that.cancelCrossPageSelected(params.isCancelCrossPageSelected);
+		//}
+	},
+	doRemoteWithBatchAction: function (param) {
+		var _self = this;
+		var data = param;
+		var func = data.func;
+		var success = param.success;
+		delete data.func;
+		data = $.extend(_self.prepareParam(), data);
+		data = $.extend({ permItemId: shr.getCurrentPagePermItemId() }, data);
+		//增加异步处理不弹框
+		var showDialog = param.showDialog;
+		if (showDialog == undefined || showDialog == 'undefined' || showDialog == null) {
+			showDialog = true;
+		}
+		var async = param.async;
+		if (async == undefined || async == 'undefined' || async == null) {
+			async = false;
+		}
+		var showBlock = param.showBlock;
+		if (showBlock == undefined || showBlock == 'undefined' || showBlock == null) {
+			showBlock = true;
+		}
+		shr.doWithBatchAction({
+			url: _self.dynamicPage_url,
+			type: 'post',
+			data: data,
+			async: async,
+			showBlock: showBlock,
+			success: function (response) {
+				if (response) {
+					if (func && typeof func === "function") {
+						func(response);
+					}
+
+					if (success && typeof success === "function") {
+						return success(response);
+					}
+					var batchTipsData = _self.batchTipsDataHandler(response, data);
+					if (showDialog) {
+						$(_self).shrMessageTips({
+							isSuccess: batchTipsData.isSuccess,
+							successCount: batchTipsData.successCount,
+							failureCount: batchTipsData.failureCount,
+							confirmCallback: function () {
+								$(_self).shrDetailTips({
+									tableData: batchTipsData.tmp,
+									successCount: batchTipsData.successCount,
+									failureCount: batchTipsData.failureCount,
+									colNamesData: batchTipsData.tableModel,
+									isSortable: _self.batchHandlerWhetherSortable(),
+									modalWidth: param.modalWidth || ''
+								}).shrDetailTips("open");
+							},
+
+							closeCallback: function () {
+								_self.reloadGrid();
+							}
+						}).shrMessageTips("open");
+					}
+				} else {
+					$(_self).shrMessageTips("_setDetailDisable");
+				}
+			},
+			error: function (response) {
+				if (param.billId && param.billId.split(',').length > 1) {
+					_self.reloadGrid();
+				}
+			}
+		});
+	},
+});

+ 102 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/checkInApplicationEdit.js

@@ -0,0 +1,102 @@
+shr.defineClass("shr.custom.CheckInApplicationEdit", shr.framework.Edit, {
+	initalizeDOM: function () {
+		shr.custom.CheckInApplicationEdit.superClass.initalizeDOM.call(this);
+		var self = this;
+		if ("VIEW" != this.operateState) {
+			$("#entrys_checkInRoom").shrPromptBox("option", {
+				verifyBeforeOpenCallback: function () {
+					var checkInDate = $("#entrys_checkInDate").shrDateTimePicker("getValue");
+					var person = $("#entrys_person").shrPromptBox("getValue");
+					if (!person.id || person.id == '') {
+						shr.showWarning({
+							message: "请先选择入住人员!",
+							hideAfter: 5
+						});
+						return false;
+					}
+					//必须先选择入住日期
+					if (!checkInDate || checkInDate == '') {
+						shr.showWarning({
+							message: "请先选择入住日期!",
+							hideAfter: 5
+						});
+						return false;
+					}
+					var checkInDate = $("#entrys_checkInDate").shrDateTimePicker("getValue");
+					var checkoutDate = $("#entrys_checkoutDate").shrDateTimePicker("getValue");
+					var personId = $("#entrys_person_el").val();
+					var result = self.callServiceReturnResponse('getOptionalRoomIdsService', {
+						checkInDate: checkInDate,
+						checkoutDate: checkoutDate,
+						personId: personId
+					});
+					if (result.code == 500) {
+						shr.showWarning({
+							message: result.errorMsg,
+							hideAfter: 5
+						});
+						return false;
+					}
+					//设置过滤条件
+					$("#entrys_checkInRoom").shrPromptBox("setFilter", "id in (" + result + ")");
+					return true;
+				}
+			});
+			$("#entrys_checkInDate").shrDateTimePicker("option", {
+				onChange: function (event) {
+					//当入住日期改变时清空入住房间
+					$("#entrys_checkInRoom").shrPromptBox("setValue", null);
+				}
+			});
+			//人员
+			$("#entrys_person").shrPromptBox("option", {
+				//值改变值,获取任职信息
+				onchange: function (e, value) {
+					var personId = value.current.id;
+					self.remoteCall({
+						action: "getOrgPositionByPersonId",
+						uipk: this.uipk,
+						type: 'POST',
+						param: {
+							personId: personId
+						},
+						success: function (data) {
+							$("#entrys_adminOrg").shrPromptBox("setValue", data.orgUnit);
+							$("#entrys_position").shrPromptBox("setValue", data.position);
+						}
+					})
+				}
+			});
+		}
+		if ("0" == $("#billState").val()) {
+			//未提交
+			//隐藏流程图
+			$('#workFlowDiagram').hide();
+		}
+	},
+	/**
+	 * 对保存、提交的数据进行确认
+	 */
+	verify: function () {
+		// shr.showInfo({message: message});
+		var checkInDate;
+		var checkoutDate;
+		if ("VIEW" == this.operateState) {
+			checkInDate = $("#entrys_checkInDate").val();
+			checkoutDate = $("#entrys_checkoutDate").val();
+		} else {
+			checkInDate = $("#entrys_checkInDate").shrDateTimePicker("getValue");
+			checkoutDate = $("#entrys_checkoutDate").shrDateTimePicker("getValue");
+		}
+		if (checkoutDate <= checkInDate) {
+			shr.showWarning({
+				message: "退宿日期不能小于等于入住日期",
+				hideAfter: 5
+			});
+
+			return false;
+		}
+		return true;
+	},
+
+});

+ 75 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/checkInApplicationSelfEdit.js

@@ -0,0 +1,75 @@
+shr.defineClass("shr.custom.CheckInApplicationSelf", shr.framework.Edit, {
+	initalizeDOM: function () {
+		shr.custom.CheckInApplicationSelf.superClass.initalizeDOM.call(this);
+		var self = this;
+		if ("VIEW" != this.operateState) {
+			$("#entrys_checkInRoom").shrPromptBox("option", {
+				verifyBeforeOpenCallback: function () {
+					var checkInDate = $("#entrys_checkInDate").shrDateTimePicker("getValue");
+					//必须先选择入住日期
+					if (!checkInDate || checkInDate == '') {
+						shr.showWarning({
+							message: "请先选择入住日期!",
+							hideAfter: 5
+						});
+						return false;
+					}
+					var checkInDate = $("#entrys_checkInDate").shrDateTimePicker("getValue");
+					var checkoutDate = $("#entrys_checkoutDate").shrDateTimePicker("getValue");
+					var personId = $("#entrys_person_el").val();
+					var result = self.callServiceReturnResponse('getOptionalRoomIdsService', {
+						checkInDate: checkInDate,
+						checkoutDate: checkoutDate,
+						personId: personId
+					});
+					if (result.code == 500) {
+						shr.showWarning({
+							message: result.errorMsg,
+							hideAfter: 5
+						});
+						return false;
+					}
+					//设置过滤条件
+					$("#entrys_checkInRoom").shrPromptBox("setFilter", "id in (" + result + ")");
+					return true;
+				}
+			});
+			$("#entrys_checkInDate").shrDateTimePicker("option", {
+				onChange: function (event) {
+					//当入住日期改变时清空入住房间
+					$("#entrys_checkInRoom").shrPromptBox("setValue", null);
+				}
+			});
+		}
+		if ("0" == $("#billState").val()) {
+			//未提交
+			//隐藏流程图
+			$('#workFlowDiagram').hide();
+		}
+	},
+	/**
+	 * 对保存、提交的数据进行确认
+	 */
+	verify: function () {
+		// shr.showInfo({message: message});
+		var checkInDate;
+		var checkoutDate;
+		if ("VIEW" == this.operateState) {
+			checkInDate = $("#entrys_checkInDate").val();
+			checkoutDate = $("#entrys_checkoutDate").val();
+		} else {
+			checkInDate = $("#entrys_checkInDate").shrDateTimePicker("getValue");
+			checkoutDate = $("#entrys_checkoutDate").shrDateTimePicker("getValue");
+		}
+		if (checkoutDate <= checkInDate) {
+			shr.showWarning({
+				message: "退宿日期不能小于等于入住日期",
+				hideAfter: 5
+			});
+
+			return false;
+		}
+		return true;
+	},
+
+});

+ 133 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/checkOutApplicationAllList.js

@@ -0,0 +1,133 @@
+shr.defineClass("shr.custom.CheckOutApplicationList", shr.framework.List, {
+	initalizeDOM: function () {
+		shr.custom.CheckOutApplicationList.superClass.initalizeDOM.call(this);
+	},
+
+	/**
+	 * 新增
+	 */
+	// addNewAction: function (event) {
+	// 	this.reloadPage({
+	// 		uipk: "com.kingdee.eas.custom.dormitorysystem.application.app.CheckInApplication_self.form",
+	// 		method: 'addNew'
+	// 	});
+	// },
+	/**
+	 * 批量新增
+	 */
+	// addNewBatchAction: function () {
+	// 	this.reloadPage({
+	// 		uipk: "com.kingdee.eas.hr.ats.app.AtsLeaveBillAllBatchForm",
+	// 		method: 'addNew'
+	// 	});
+	// },
+
+	assembleSaveData: function (action, realBillId) {
+		var _self = this;
+		var billId = realBillId;
+		var data = _self.prepareParam(action + 'Action');
+		data.method = action;
+		data.operateState = "LIST";
+		data.billId = billId.join(",");
+		return data;
+	},
+	/**
+	 * 提交生效 
+	 */
+	submitEffectAction: function (event) {
+		var _self = this,
+			workArea = _self.getWorkarea(),
+			$form = $('form', workArea);
+		var billId = $("#grid").jqGrid("getSelectedRows");
+		if (billId == undefined || billId.length == 0 || (billId && billId.length == 1 && billId[0] == "")) {
+			shr.showWarning({ "message": "请先选中单据!" });
+			return false;
+		}
+		shr.showConfirm("是否提交生效?", function () {
+			_self.prepareSubmitEffect(event, 'submitEffect');
+		});
+	},
+	/**
+	 * 提交生效 
+	 */
+	prepareSubmitEffect: function (event, action) {
+		var _self = this;
+		var billId = $("#grid").jqGrid("getSelectedRows");
+		var realBillId = [];
+		for (var i = 0; i < billId.length; i++) {
+			var billState = "";
+			if ($("tr[id='" + billId[i] + "']").length > 1) {//多人单据
+				billState = $($("tr[id='" + billId[i] + "']")[0]).find("td[aria-describedby='grid_billState']").text();
+			} else {
+				billState = $("tr[id='" + billId[i] + "'] td[aria-describedby='grid_billState']").text();
+			}
+			if ("未提交" == billState && $.inArray(billId[i], realBillId) == -1) {
+				realBillId.push(billId[i]);
+			}
+		}
+		if (realBillId.length == 0) {
+			shr.showError({ message: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_20 });
+			return;
+		}
+		var data = _self.assembleSaveData(action, realBillId);
+
+		var target;
+		if (event && event.currentTarget) {
+			target = event.currentTarget;
+		}
+		_self.defaultBatchActionHandle("submitEffect");
+	},
+	
+	/**
+	 * 提交
+	 */
+	submitAction: function (event) {
+		var _self = this;
+		_self.beforeSubmit();
+		if (!_self.beforeSubmit()) {
+			return;
+		}
+		var realIds = _self.getSelectedRealIds();
+		var uipk = _self.getUrlParams('uipk');
+		if (!realIds) {
+			shr.showError({ message: $.shrI18n.framework.tips.noCanSubmitRecord, hiddenAfter: 5 });
+			return;
+		}
+		//调用OSF获取所选未提交单据的下一步参与人信息
+		var response = _self.getBillsNextPersonInfo(realIds, uipk);
+		shr.showConfirm($.shrI18n.common.tips.submitConfirm, function () {
+			_self.doSubmit(event, 'submit', response, realIds);
+		});
+	},
+	/**
+	 * 撤销
+	 * @param {*} event 
+	 * @returns 
+	 */
+	abortBillAction: function (event) {
+		var realBillId = [];
+		var that = this;
+		//var billId = this.selectedRowId;
+		var billId = $(this.gridId).jqGrid("getSelectedRows");
+		if (billId == undefined || billId.length == 0 || (billId && billId.length == 1 && billId[0] == "")) {
+			shr.showWarning({ "message": jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_28 });
+			return;
+		}
+		that.defaultBatchActionHandle("abortBizBill");
+	},
+	/**
+	 * 反审批
+	 * @returns 
+	 */
+	againstApproveAction: function () {
+		var that = this;
+		var billId = $(this.gridId).jqGrid("getSelectedRows");;
+		if (billId == undefined || billId.length == 0 || (billId && billId.length == 1 && billId[0] == "")) {
+			shr.showError({ message: jsBizMultLan.atsManager_atsLeaveBillAllList_i18n_33 });
+			return;
+		} else {
+			var billIds = that.getSelectedIds();
+			that.defaultBatchActionHandle("againstApprove");
+		}
+	},
+});

+ 84 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/application/checkoutApplicationEdit.js

@@ -0,0 +1,84 @@
+shr.defineClass("shr.custom.CheckoutApplicationEdit", shr.framework.Edit, {
+	initalizeDOM: function () {
+		shr.custom.CheckoutApplicationEdit.superClass.initalizeDOM.call(this);
+		var self = this;
+		if ("VIEW" != this.operateState) {
+			//设置可选入住人员信息,入住日期小于等于今天,退宿日期大于今天
+			self.remoteCall({
+				action: "getOptionalOccupants",
+				uipk: this.uipk,
+				type: 'POST',
+				success: function (data) {
+					$("#entrys_occupants").shrPromptBox("setFilter", "id in (" + data + ")");
+				}
+			});
+			//入住人员信息
+			$("#entrys_occupants").shrPromptBox("option", {
+				//值改变值,获取任职信息
+				onchange: function (e, value) {
+					var occupants = value.current;
+					$("#entrys_adminOrg").shrPromptBox("setValue", {
+						id: occupants["personPosition.personDep.id"],
+						name: occupants["personPosition.personDep.name"]
+					});
+					$("#entrys_position").shrPromptBox("setValue", {
+						id: occupants["personPosition.primaryPosition.id"],
+						name: occupants["personPosition.primaryPosition.name"]
+					});
+					$("#entrys_person").shrPromptBox("setValue", {
+						id: occupants["personPosition.person.id"],
+						name: occupants["personPosition.person.name"]
+					});
+					//入住日期
+					$("#entrys_checkInDate").shrDateTimePicker("setValue", occupants.CheckInDate);
+					//退宿日期
+					$("#entrys_oldCheckoutDate").shrDateTimePicker("setValue", occupants.CheckOutDate);
+					//现住房间
+					$("#entrys_currentRoom").shrPromptBox("setValue", {
+						id: occupants["Dormitory.id"],
+						name: occupants["Dormitory.name"],
+						displayName: occupants["Dormitory.displayName"]
+					});
+					$("#entrys_checkoutDate").shrDateTimePicker("setValue", null);
+				},
+			});
+		}
+		if ("0" == $("#billState").val()) {
+			//未提交
+			//隐藏流程图
+			$('#workFlowDiagram').hide();
+		}
+	},
+	/**
+	 * 对保存、提交的数据进行确认
+	 */
+	verify: function () {
+		// shr.showInfo({message: message});
+		var checkInDate,checkoutDate,oldCheckoutDate;
+		if ("VIEW" == this.operateState) {
+			checkInDate = $("#entrys_checkInDate").val();
+			checkoutDate = $("#entrys_checkoutDate").val();
+			oldCheckoutDate = $("#entrys_oldCheckoutDate").val();
+		} else {
+			checkInDate = $("#entrys_checkInDate").shrDateTimePicker("getValue");
+			checkoutDate = $("#entrys_checkoutDate").shrDateTimePicker("getValue");
+			oldCheckoutDate = $("#entrys_oldCheckoutDate").shrDateTimePicker("getValue");
+		}
+		if (checkoutDate <= checkInDate) {
+			shr.showWarning({
+				message: "退宿日期不能小于等于入住日期",
+				hideAfter: 5
+			});
+			return false;
+		}
+		if (checkoutDate == checkInDate) {
+			shr.showWarning({
+				message: "退宿日期不能等于原退宿日期",
+				hideAfter: 5
+			});
+			return false;
+		}
+		return true;
+	},
+
+});

+ 158 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/waterpower/WaterPowerMeterReadingEdit.js

@@ -0,0 +1,158 @@
+
+shr.defineClass("shr.custom.WaterPowerMeterReadingEdit", shr.framework.Edit, {
+    initalizeDOM: function () {
+        var _self = this;
+        shr.custom.WaterPowerMeterReadingEdit.superClass.initalizeDOM.call(this);
+        _self.getLastMonth();
+        _self.changeAction()
+        // $('#curMonthWater').shrTextField('disable');//或者设为enable  disable
+        // $('#curMonthElecDegrees').shrTextField('disable');//或者设为enable  disable
+        var calcInterval = $('#calcInterval').shrCheckbox('getValue');//是否取消自动计算当月水电
+            if (calcInterval != true) {
+             _self.getThisMonthWaterPowerTonsAction();
+                $('#curMonthWater').shrTextField('disable');//或者设为enable  disable
+                $('#curMonthElecDegrees').shrTextField('disable');//或者设为enable  disable
+            }
+    },
+    /**
+     * 保存
+     */
+    saveAction: function (event) {
+        var _self = this;
+        if (_self.validate() && _self.verify()) {
+            if (_self.getThisMonthWaterPowerTonsAction()) {
+                _self.doSave(event, 'save');
+            };
+        } else {
+            if (_self != top) {// in iframe
+                shr.setIframeHeight(window.name);
+            }
+
+        }
+    },
+    /**
+     * 
+     * @returns 获取上个月月份
+     */
+    getLastMonth() {
+        if (this.getOperateState().toUpperCase() == "ADDNEW") {
+            const currentDate = new Date();
+            const lastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1);
+            $("#years").shrDateTimePicker('setValue', lastMonth);
+        }
+
+    },
+    /**
+     * 监听事件
+     */
+    changeAction() {
+        var _self = this;
+        $('#dormitory').shrPromptBox('option', {
+            onchange: function (e, value) {
+                var data = value.current || [];
+                var number = data.number;
+                $("#dormNumber").shrTextField('setValue', number);
+            }
+        });
+        //用水总吨数监听事件
+        $('#totalWaterTons').change(function () {
+            _self.getThisMonthWaterPowerTonsAction();
+
+        });
+        //用电总度数监听事件
+        $('#totalElecDegrees').change(function () {
+            _self.getThisMonthWaterPowerTonsAction();
+            // var years = $("#years").val(); //年月
+            // var totalWaterTons = $("#totalWaterTons").val();//用水总吨数
+            // var totalElecDegrees = $("#totalElecDegrees").val(); //用电总度数
+            // var dormNumber = $("#dormNumber").val();//宿舍编码
+            // var calcInterval = $('#calcInterval').shrCheckbox('getValue');//是否取消自动计算当月水电
+            // if (calcInterval == false) {
+
+            //     if (years == null || dormNumber == "") {
+            //         shr.showError({
+            //             message: "请先填写宿舍!!"
+            //         });
+            //         return;
+            //     }
+            //     _self.remoteCall({
+            //         type: "post",
+            //         method: "getThisMonthWaterPowerTons",
+            //         param: {
+            //             years: years,
+            //             totalWaterTons: totalWaterTons,
+            //             totalElecDegrees: totalElecDegrees,
+            //             dormNumber: dormNumber,
+            //             calcInterval: calcInterval,
+            //         },
+            //         success: function (data) {
+            //             // $("#curMonthWater").shrTextField('setValue', data.curMonthWater);
+            //             $("#curMonthElecDegrees").shrTextField('setValue', data.curMonthElecDegrees);
+            //             console.log(data);
+            //         }, error: function (response) {
+            //             shr.showError({
+            //                 message: response
+            //             });
+            //         }
+            //     });
+            // } else {
+            //     $("#curMonthElecDegrees").shrTextField('setValue', null);
+            // }
+        });
+      
+        //是否取消自动计算当月水电
+        $('#calcInterval').change(function () {
+            $('#curMonthWater').shrTextField('enable');//或者设为enable  disable
+            $('#curMonthElecDegrees').shrTextField('enable');//或者设为enable  disable
+            var calcInterval = $('#calcInterval').shrCheckbox('getValue');//是否取消自动计算当月水电
+            if (calcInterval == true) {
+                $("#curMonthWater").shrTextField('setValue', null);
+                $("#curMonthElecDegrees").shrTextField('setValue', null);
+
+            } else {
+                _self.getThisMonthWaterPowerTonsAction();
+                $('#curMonthWater').shrTextField('disable');//或者设为enable  disable
+                $('#curMonthElecDegrees').shrTextField('disable');//或者设为enable  disable
+            }
+        });
+      
+    },
+    getThisMonthWaterPowerTonsAction() {
+        var years = $("#years").val(); //年月
+        var totalWaterTons = $("#totalWaterTons").val();//用水总吨数
+        var totalElecDegrees = $("#totalElecDegrees").val(); //用电总度数
+        var dormNumber = $("#dormNumber").val();//宿舍编码
+        var calcInterval = $('#calcInterval').shrCheckbox('getValue');//是否取消自动计算当月水电
+        if (calcInterval == false) {
+            if (years == null || dormNumber == "") {
+                shr.showError({
+                    message: "请先填写宿舍!!"
+                });
+                return;
+            }
+            _self.remoteCall({
+                type: "post",
+                method: "getThisMonthWaterPowerTons",
+                param: {
+                    years: years,
+                    totalWaterTons: totalWaterTons,
+                    totalElecDegrees: totalElecDegrees,
+                    dormNumber: dormNumber,
+                    calcInterval: calcInterval,
+                },
+                async: false, // 设置为同步请求
+                success: function (data) {
+                    $("#curMonthWater").shrTextField('setValue', data.curMonthWater);
+                    $("#curMonthElecDegrees").shrTextField('setValue', data.curMonthElecDegrees);
+                    console.log(data);
+                }, error: function (response) {
+                    shr.showError({
+                        message: response
+                    });
+                }
+            });
+        } 
+        return true;
+    }
+});
+

+ 21 - 0
js/eas/server/deploy/easweb.ear/shr_web.war/addon/customer/dormitorysystem/waterpower/WaterPowerPricingEdit.js

@@ -0,0 +1,21 @@
+
+shr.defineClass("shr.custom.WaterPowerPricingEdit",shr.shrBaseData.maintain.MaintainEdit, {
+    initalizeDOM: function () {
+        var _self = this;
+        shr.custom.WaterPowerPricingEdit.superClass.initalizeDOM.call(this);
+        _self.getFirstDayOfMonth();
+
+    },
+    /**
+     * 获取当月一号并赋值给开始时间
+     */
+    getFirstDayOfMonth() {
+        const currentDate = new Date();
+        const firstDay = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);
+        console.log("当前月的一号是:", firstDay);
+        $("#startDate").shrDateTimePicker('setValue', firstDay);
+    }
+
+
+});
+

+ 8 - 3
src/com/kingdee/eas/custom/dormitorysystem/application/app/RoomChangeApplicationControllerBean.java

@@ -97,7 +97,7 @@ public class RoomChangeApplicationControllerBean extends AbstractRoomChangeAppli
             //人员宿舍分类
             occupantsInfo.setPersonDormitoryType(oldOccupants.getPersonDormitoryType());
             //宿舍
-            occupantsInfo.setDormitory(oldOccupants.getDormitory());
+            //occupantsInfo.setDormitory(oldOccupants.getDormitory());
             //职位
             occupantsInfo.setPersonPosition(oldOccupants.getPersonPosition());
             //occupantsInfo.setPersonD
@@ -129,6 +129,7 @@ public class RoomChangeApplicationControllerBean extends AbstractRoomChangeAppli
             String billId
     ) throws BOSException, EASBizException {
         super._untiCheckBizBill(ctx, billId);
+        IRoomChangeApplicationEntry iEntry = RoomChangeApplicationEntryFactory.getLocalInstance(ctx);
         //人员入住信息
         IOccupants iOccupants = OccupantsFactory.getLocalInstance(ctx);
         //换宿单
@@ -145,8 +146,12 @@ public class RoomChangeApplicationControllerBean extends AbstractRoomChangeAppli
             iOccupants.delete(new ObjectUuidPK(occupants.getId()));
             //原入住人员信息
             OccupantsInfo oldOccupants = roomChangeApplicationEntryInfo.getOldOccupants();
-            //oldOccupants.setCheckOutDate(DateTimeUtils.parseDate("2199-12-31", "yyyy-MM-dd"));
-            oldOccupants.setCheckOutDate(roomChangeApplicationEntryInfo.getOldCheckoutDate());
+            try {
+                oldOccupants.setCheckOutDate(DateTimeUtils.parseDate("2199-12-31", "yyyy-MM-dd"));
+            } catch (ParseException e) {
+                throw new RuntimeException(e);
+            }
+            //oldOccupants.setCheckOutDate(roomChangeApplicationEntryInfo.getOldCheckoutDate());
             iOccupants.updatePartial(oldOccupants, sicOccupants);
         }
     }