
shr.defineClass("shr.custom.GeneralESignBillEntry",shr.framework.Edit, {
    initalizeDOM: function () {
        shr.custom.GeneralESignBillEntry.superClass.initalizeDOM.call(this);
		this.personChange()
    },
   
	personChange:function(){
		var _this = this
		$("#person").shrPromptBox("option", {
			onchange : function(e, value) {
				var personF7Id = value.current.id;
				if(personF7Id!=null&&personF7Id!=""&&personF7Id!=undefined){
					shr.callService({
						serviceName : "getPersonPosOrgInfo",
						param :{
							personID: personF7Id,
							uiClass : _this._uiClass
						},
						async : true,
						success : function (data) {
							console.log(data)
							if(data.length>0){
								var d = data[0]
								$('#adminOrg').shrPromptBox("setValue",d.adminOrg);
								$('#position').shrPromptBox("setValue",d.position);
								
							}
						}
					})
				}
			}
		})
	}
})
