(function (c) { config.init(); var a = { scheduleCode: Fx.getUrlParam("scheduleCode"), hospitalId: Fx.getUrlParam("hospitalId"), deptId: Fx.getUrlParam("deptId"), doctorId: Fx.getUrlParam("doctorId"), regDate: Fx.getUrlParam("regDate"), timeFlag: Fx.getUrlParam("timeFlag"), regFee: Fx.getUrlParam("regFee"), startTime: Fx.getUrlParam("startTime"), endTime: Fx.getUrlParam("endTime"), treatFee: Fx.getUrlParam("treatFee") }; var b = { doing: function () { hzAPI.getData(window.apiUrl + "?c=Index&a=customerFamilyList", {}, "#family", 1, true, 6) } }; hzAPI.getData(window.apiUrl + "?c=Index&a=doctorInfo", a, "#list #form", 0, true, null, true); b.doing(); c("#sure").on("tap", function () { c.extend(a, { //todo 更改控件 customerFamilyId: c("input[type=radio][name=customerFamilyId]:checked").val() }); var s = { doing: function (e, aaa) { // setTimeout(function () { // if (e[0].userFlag == "0") { // //进行发短信?c=Other&a=setSmsInfo×tamp=1508896856&token=9c5f1ceee44736fdaac97dad03c99b15&smsType=appointSuc&orderId=1506738896496216 // //hzAPI.sendData(window.apiUrl + "?c=Other&a=setSmsInfo", a, false,null, null, null, d) // //首诊患者请到医院缴费并办理就诊卡 // hzAPI.dialog(false, 6000, "请绑定诊疗卡
如无诊疗卡请通过电话预约
020-61641888
预约时间08:00-23:00"); // setTimeout(function () { // window.location = "doctorCalendar.html?id=" + a.customerFamilyId // }, 3000) // } else { // console.log("bb" + e); // // window.location = "cardPay.html?hospitalId=" + a.hospitalId + "&hospitalName=" + encodeURI(encodeURI(c("#hospitalName").text().trim())) + "&customerFamilyId=" + a.customerFamilyId // } // }, 2000) console.log("cc" + e[0]); } }; var d = { doing: function (e) { setTimeout(function () { if (e[0].userFlag == "0") { //首诊患者请到医院缴费并办理就诊卡 hzAPI.dialog(false, 6000, "请绑定诊疗卡
如无诊疗卡请通过电话预约
020-61641888
预约时间08:00-23:00"); setTimeout(function () { window.location = "doctorCalendar.html?id=" + a.customerFamilyId }, 3000) } else { //进行发短信 var s = { smsType: "appointSuc", orderId: e[0].orderId }; hzAPI.sendData(window.apiUrl + "?c=Other&a=sendSmsInfo", s, false, null, null, null, null) setTimeout(function () { window.location = "cardPay.html?hospitalId=" + a.hospitalId + "&hospitalName=" + encodeURI(encodeURI(c("#hospitalName").text().trim())) + "&customerFamilyId=" + a.customerFamilyId }, 1000) } }, 2000) } }; hzAPI.sendData(window.apiUrl + "?c=Other&a=appointsOrder", a, false, [null, "挂号成功"], null, s, d) }); c("i.add").on("tap", function () { window.location = "familyDataAdd.html" }); c(".hd .fr i").on("tap", function () { if (validate.check("#testForm")) { var d = { trueName: c("#trueName").val(), phone: c("#phone").val(), tel: c("#tel").val(), email: c("#email").val(), idNo: c("#idNo").val(), birthDay: c("#idNo").val().substr(6, 8).replace(/(.{4})(.{2})/, "$1-$2-"), address: c("#address").val(), sex: c("#sex").val(), nation: c("#nation").val(), province: null, city: null, area: null, ownership: c("#ownership").val() }; hzAPI.sendData(window.apiUrl + "?c=Index&a=customerFamilyAdd", d, false, ["添加失败", "添加成功"], null, null, b) } }) })(Zepto);