var _globals=new Globals,_userInfoCookie=_globals.getCookie("_loginInfo"),_userInfo=JSON.parse(_userInfoCookie),sexs=[{id:1,name:_globals.language.male},{id:2,name:_globals.language.female},{id:3,name:_globals.language.other}],buysType=[{id:1,name:_globals.language.first_buy},{id:2,name:_globals.language.insert_buy},{id:3,name:_globals.language.change_buy}],_data=_globals.apiPostDataList("customers/data",{cars:"cars",citys:"citys",districts:"districts",positions:"positions",companyType:"companyType",staffs:"staffs",branchs:"branchs",codeWorks:"codeWorks"}),tabPanelItems=(_userInfo=_globals.apiGetDataList("user/"+_userInfo.id),[{ID:3,tabname:_globals.language.list,class:"hotlist"},{ID:1,tabname:_globals.language.create,class:"create"}]),Customer={cCode:"",cName:"",cEmail:"",cCityID:"",cDistrictID:"",cAddress:"",cPhone:"",cFax:"",cBirthday:"",cSex:sexs[0].id,numberOfVisitors:0,purchaseStatus:buysType[0].id,Interests:"",cNote:"",cCompany:"",cCompanyCityID:"",cCompanyDistrictID:"",cCompanyAddress:"",cCompanyPhone:"",cCompanyFax:"",cCompanyTypeID:"",cDepartment:"",cPositionID:"",dName:"",dCompany:"",dDepartment:"",cPositionID:"",dEmail:"",dCityID:"",dDistrictID:"",dAddress:"",dPhone:"",dFax:"",dRelationship:"",iName:"",iCompany:"",iDepartment:"",cPositionID:"",iEmail:"",iCityID:"",iDistrictID:"",iAddress:"",iPhone:"",iFax:"",dRelationship:"",iDate:new Date,iNote:"",aCarName:"",aCarModel:"",aColor:"",aCarType:"",aAmount:0,nCarID:"",nAmount:1,deliveryDate:new Date,nCarNote:"",branchID:_userInfo.branchID,staffID:_userInfo.staffId,cardDate:new Date,cStatus:"COLD",cSource:"\u0110L-Online",cType:"CH",wEmployee:"",wDate:new Date,codeWork:"",wNote:"",wIsCheck:!1},relationships=[{id:"1",name:"Cha/M\u1eb9"},{id:"2",name:"Anh/Ch\u1ecb/Em"},{id:"3",name:"B\xe0 con/H\u1ecd H\xe0ng"},{id:"4",name:"B\u1ea1n b\xe8"},{id:"5",name:"V\u1ee3/Ch\u1ed3ng"},{id:"6",name:"\xd4ng/B\xe0"},{id:"7",name:"Ch\xe1u n\u1ed9i/Ch\xe1u ngo\u1ea1i"},{id:"8",name:"\u0110\u1ed1i t\xe1c kinh doanh"},{id:"9",name:"Con c\xe1i"},{id:"10",name:"Nh\xe2n Vi\xean Cty"},{id:"11",name:"Kh\xe1c"}],accordionItems=[{ID:1,name:"customerInfo",text:_globals.language.customer_info},{ID:2,name:"availabeCars",text:_globals.language.availabe_cars},{ID:3,name:"newCars",text:_globals.language.new_cars},{ID:4,name:"EmployeeInfo",text:_globals.language.employee_info},{ID:5,name:"workInfo",text:_globals.language.work_info}],availabeCars=[],newCars=[],workInfos=[],EmployeeInfo=[{id:1,staffID:Customer.staffID,branchID:Customer.branchID,cardDate:Customer.cardDate,cStatus:Customer.cStatus,cSource:Customer.cSource,cType:Customer.cType}],dxFormItemsCssClass="font-weight-bold",cStatus=["COLD","WARM","HOT"],cTypes=["CH","DN","QCNN","Kh\xe1c"],cSources=["\u0110L-Online","\u0110L-Call-in","\u0110L-Walk-in","\u0110L-Kh\xe1ch h\xe0ng s\u1ef1 ki\u1ec7n","\u0110L-Kh\xe1ch h\xe0ng hi\u1ec7n t\u1ea1i","\u0110L-Kh\xe1c","NVBH-Online","NVBH-Gi\u1edbi thi\u1ec7u","NVBH-\u0110i th\u1ecb tr\u01b0\u1eddng","NVBH-Kh\xe1c","TMV-Online","TMV-Hotline","TMV-Kh\xe1c","Kh\xe1c"],purposeOfUses=["Gia \u0111\xecnh","Kinh doanh","G\u0110&KD","Kh\xe1c"],lostNotes=[{id:1,name:"T\xe0i ch\xednh c\xe1 nh\xe2n"},{id:2,name:"Kh\xf4ng \u0111\u01b0\u1ee3c ph\xea duy\u1ec7t"},{id:3,name:"H\xe3ng kh\xe1c"},{id:4,name:"\u0110\u1ea1i l\xfd kh\xe1c"},{id:5,name:"Kh\xe1c"}],listViewsData=[];_globals.loadingPage=$("#loadpanel").dxLoadPanel({shadingColor:"rgba(0,0,0,0.4)",position:{my:"center",at:"center",of:window},visible:!1,showIndicator:!0,showPane:!0,message:_globals.language.processing,shading:!0,closeOnOutsideClick:!1,onShown:function(){},onHidden:function(){}}).dxLoadPanel("instance");