| 
						
						
						
					 | 
					@ -1,8 +1,10 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					var EditDialog = function (parent) { | 
					 | 
					 | 
					var EditDialog = function (parent) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.Parent = parent; | 
					 | 
					 | 
					    this.Parent = parent; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    this.OrgId = null; | 
					 | 
					 | 
					    this.User = {}; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.Setup = function () { | 
					 | 
					 | 
					    this.Setup = function () { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        this.InitOrgList(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $("#sex span").on("click", this.OnSexButtonClick.bind(this)); | 
					 | 
					 | 
					        $("#sex span").on("click", this.OnSexButtonClick.bind(this)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $("#edit-sure-btn").on("click", this.OnSureButtonClick.bind(this)); | 
					 | 
					 | 
					        $("#edit-sure-btn").on("click", this.OnSureButtonClick.bind(this)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $("#edit-cancel-btn").on("click", this.HideDialog.bind(this)); | 
					 | 
					 | 
					        $("#edit-cancel-btn").on("click", this.HideDialog.bind(this)); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -10,8 +12,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    }; | 
					 | 
					 | 
					    }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.Show = function (data) { | 
					 | 
					 | 
					    this.Show = function (data) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        console.log(data); | 
					 | 
					 | 
					        this.User = data; | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        this.OrgId = data.OrgId; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        $('#edit-dialog').show(); | 
					 | 
					 | 
					        $('#edit-dialog').show(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $("#username").textbox('setValue', data.RealName); | 
					 | 
					 | 
					        $("#username").textbox('setValue', data.RealName); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $("#account").textbox('setValue', data.LoginName); | 
					 | 
					 | 
					        $("#account").textbox('setValue', data.LoginName); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -20,13 +21,40 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        parseInt($('#sex span').eq(1).attr('gender')) === data.Gender ? $('#sex span').eq(1).addClass('active') : $('#sex span').eq(1).removeClass('active'); | 
					 | 
					 | 
					        parseInt($('#sex span').eq(1).attr('gender')) === data.Gender ? $('#sex span').eq(1).addClass('active') : $('#sex span').eq(1).removeClass('active'); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    }; | 
					 | 
					 | 
					    }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    this.InitOrgList = function () { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $.ajax({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            type: "POST", | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            dataType: 'text', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            url: '/OrgManagement/Query', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            data: { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                pageIndex: 1, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                pageSize: 10000 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            success: function (result) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                $('#edit-dialog-org-list').combobox({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    valueField: 'Id', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    textField: 'Name', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    editable: false, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    data: JSON.parse(result).rows | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                $('#edit-dialog-org-list').combobox('setValue', this.User.OrgId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            }.bind(this) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.OnSexButtonClick = function (event) { | 
					 | 
					 | 
					    this.OnSexButtonClick = function (event) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $('#sex span').removeClass("active"); | 
					 | 
					 | 
					        $('#sex span').removeClass("active"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $(event.target).addClass("active"); | 
					 | 
					 | 
					        $(event.target).addClass("active"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    }; | 
					 | 
					 | 
					    }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.OnSureButtonClick = function () { | 
					 | 
					 | 
					    this.OnSureButtonClick = function () { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        console.log(this.getUserParams()) | 
					 | 
					 | 
					        this.User.OrgId = $('#edit-dialog-org-list').combobox('getValue'); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        this.User.Gender = parseInt($('#sex span.active').attr('gender')); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        this.User.RealName = $("#username").textbox('getValue'); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        this.User.LoginName = $('#account').textbox('getValue'); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        this.User.LoginPassWord = $('#password').textbox('getValue'); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        this.EditUser(); | 
					 | 
					 | 
					        this.EditUser(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        this.HideDialog(); | 
					 | 
					 | 
					        this.HideDialog(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    }; | 
					 | 
					 | 
					    }; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -42,28 +70,18 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            type: "POST", | 
					 | 
					 | 
					            type: "POST", | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dataType: 'text', | 
					 | 
					 | 
					            dataType: 'text', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            url: '/UserManagement/Update', | 
					 | 
					 | 
					            url: '/UserManagement/Update', | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            data: this.getUserParams(), | 
					 | 
					 | 
					            data: this.User, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            success: function (result) { | 
					 | 
					 | 
					            success: function () { | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					                console.log(this.getUserParams()) | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                this.Parent.ReLoadTableData(); | 
					 | 
					 | 
					                this.Parent.ReLoadTableData(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }.bind(this) | 
					 | 
					 | 
					            }.bind(this) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        }); | 
					 | 
					 | 
					        }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    }; | 
					 | 
					 | 
					    }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.clearInput = function () { | 
					 | 
					 | 
					    this.clearInput = function () { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $('#edit-dialog-org-list').combobox('setValue', ''), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $("#username").textbox('setValue', ''), | 
					 | 
					 | 
					        $("#username").textbox('setValue', ''), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $('#account').textbox('setValue', ''), | 
					 | 
					 | 
					        $('#account').textbox('setValue', ''), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $('#password').textbox('setValue', ''), | 
					 | 
					 | 
					        $('#password').textbox('setValue', ''), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $('#sex span').eq(0).addClass("active"); | 
					 | 
					 | 
					        $('#sex span').eq(0).addClass("active"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    }; | 
					 | 
					 | 
					    }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.getUserParams = function () { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            OrgId: this.OrgId, | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Gender: parseInt($('#sex span.active').attr('gender')), | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            RealName: $("#username").textbox('getValue'), | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            LoginName: $('#account').textbox('getValue'), | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            LoginPassword: $('#password').textbox('getValue') | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    }; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					}; | 
					 | 
					 | 
					}; |