12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- (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 d = {
- doing: function (e) {
- setTimeout(function () {
- if (e[0].userFlag == "0") {
- //首诊患者请到医院缴费并办理就诊卡
- hzAPI.dialog(false, 6000, "<span style='font-size: 22px;' >请绑定诊疗卡</span><br>如无诊疗卡请通过电话预约<br><sapn style='color: #326bd4;font-size: 14px;'>020-61641888</sapn><br>预约时间08:00-23:00");
- setTimeout(function () {
- window.location = "doctorCalendar.html?id=" + a.customerFamilyId
- },
- 3000)
- } else {
- window.location = "cardPay.html?hospitalId=" + a.hospitalId + "&hospitalName=" + encodeURI(encodeURI(c("#hospitalName").text().trim())) + "&customerFamilyId=" + a.customerFamilyId
- }
- },
- 2000)
- }
- };
- hzAPI.sendData(window.apiUrl + "?c=Other&a=appointsOrder", a, false, [null, "挂号成功"], null, null, 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);
|