var aLead, iLead, oLead, aPerson, iPerson; $(document).ready( onDocumentReady ); function onDocumentReady() { Origami.fastclick(document.body); if (isAgent("micromessenger")) { weixinShare("绩效达人 推广进度管理", "登记潜在客户 跟踪推广进度 管理推广资源", "http://localhost:8080/sfez/lead.html", "http://localhost:8080/sfez/icon/geggee_logo.png"); weixinInit(); weixinGuide(); $("#page_splash").fadeIn(); } else { showLeadList(); } } function showAccountList() { pageGo("account_list"); loadAccountList(); } function loadAccountList() { jsonRequest("lead", "load_account_list", {}, onAccountListResponse, "正在获取体验用户名单……请稍候"); } function onAccountListResponse(res) { var aAccount=res.account_list; var title=["手机号", "公司", "姓名", "邀请码"]; var width=["30%", "30%", "25%", "15%"]; var f=field(title, width); $("#div_account_field").html(f); var html=""; for (var i=0; i=0) { setModule(i); oLead.module=oLead.module.replace(s,""); } } $("#input_module").val(oLead.module); $("#row_close").toggle(oLead.owner==1); } function toggleInit(series, n, val) { for (var i=1; i<=n; i++) { var s=$("#switch_"+series+"_"+i).html(); if (val.indexOf(s)>=0) { toggleSwitch(series, i); } } } function promptSelection(field, content) { if (content) { var p=$("#prompt_"+field); p.html(content); p.attr("class", "div_form_content"); $("#row_"+field).show(); } } function selectPerson() { var person=aPerson[iPerson]; oLead.person_uid=person.uid; promptSelection("person_name", person.name); promptSelection("department_name", person.department_name); promptSelection("hospital_name", person.hospital_name); pageBack(); if ($("#row_meet_objective").is(":visible")) { $("#input_meet_objective").focus(); } else { $("#input_meet_content").focus(); } } function promptDate() { var html=""; var di0=getDateInfo(); var ms=di0.ms-1000*60*60*24*(di0.day-1); var di=getDateInfo(ms); for (var m=0; m<2; m++) { html+=div("div_date_month", di.year+"年"+di.month+"月"); for (var w=0; w