Quellcode durchsuchen

上传文件至 'wx.demo.ywtinfo.com/js'

修改发短信,和有没有号源可否预约
chenlihong vor 7 Jahren
Ursprung
Commit
cdbddbb665

+ 18 - 11
wx.demo.ywtinfo.com/js/card.min.js

@@ -26,11 +26,11 @@
                 }
             };
             if (d.payFlag == "0") {
-                hzAPI.sendData(window.apiUrl+"?c=ReqHis&a=returnPay", g.extend(d, {
+                hzAPI.sendData(window.apiUrl + "?c=ReqHis&a=returnPay", g.extend(d, {
                     patientId: JSON.parse(g("ul.card a").attr("data")).patientId
                 }), false, ["退费失败", "退费成功"], null, null, i)
             } else {
-                hzAPI.sendData(window.apiUrl+"?c=ReqHis&a=cancelOrder", d, false, ["取消挂号失败", "取消挂号成功"], null, null, i)
+                hzAPI.sendData(window.apiUrl + "?c=ReqHis&a=cancelOrder", d, false, ["取消挂号失败", "取消挂号成功"], null, null, i)
             }
         }
     });
@@ -41,13 +41,20 @@
             if (h.isCard) {
                 var i = {
                     doing: function () {
+                        //进行发短信 
+                        var s = {
+                            smsType: "appointPay",
+                            orderId: d.orderId
+                        };
+                        hzAPI.sendData(window.apiUrl + "?c=Other&a=sendSmsInfo", s, false, null, null, null, null);
+
                         setTimeout(function () {
-                            f.doing()
+                            f.doing();
                         },
                         2000)
                     }
                 };
-                hzAPI.sendData(window.apiUrl+"?c=ReqHis&a=payOrder", g.extend(d, {
+                hzAPI.sendData(window.apiUrl + "?c=ReqHis&a=payOrder", g.extend(d, {
                     payMode: 1,
                     payCardNum: JSON.parse(g("ul.card a").attr("data")).cardId,
                     patientId: JSON.parse(g("ul.card a").attr("data")).patientId
@@ -57,7 +64,7 @@
     });
     var b = {
         doing: function () {
-            hzAPI.scroll(window.apiUrl+"?c=Index&a=historyListForPay", h, "#list ul.historyList", 1, false);
+            hzAPI.scroll(window.apiUrl + "?c=Index&a=historyListForPay", h, "#list ul.historyList", 1, false);
             g("ul.historyList li a").on("tap",
             function () {
                 d = JSON.parse(g(this).attr("data"));
@@ -98,7 +105,7 @@
         }
     };
     var h = {
-        isCard: true, 
+        isCard: true,
         rowed: 0,
         pageSize: 5
     };
@@ -107,10 +114,10 @@
             var j = JSON.parse(g("ul.card a").attr("data"));
             var i = {
                 customerFamilyId: g("#familyList").val(),
-				hospitalId: g("#hospitalId").val()
+                hospitalId: g("#hospitalId").val()
             };
             g.extend(h, i);
-            hzAPI.getData(window.apiUrl+"?c=Index&a=historyListForPay", h, "#list ul.historyList", 3, true, null, true, "无支付记录", b)
+            hzAPI.getData(window.apiUrl + "?c=Index&a=historyListForPay", h, "#list ul.historyList", 3, true, null, true, "无支付记录", b)
         }
     };
     var f = {
@@ -125,7 +132,7 @@
                 hospitalName: g("#hospitalId").text().trim()
             };
             g.extend(f.parameters, i);
-            hzAPI.getData(window.apiUrl+"?c=ReqHis&a=cardMoney", f.parameters, "#list ul.card", 2, true, null, true, "未办理诊疗卡", c, f.err)
+            hzAPI.getData(window.apiUrl + "?c=ReqHis&a=cardMoney", f.parameters, "#list ul.card", 2, true, null, true, "未办理诊疗卡", c, f.err)
         },
         err: {
             doing: function () {
@@ -139,7 +146,7 @@
                 customerFamilyId: g("#familyList").val(),
                 hospitalIdCk: a.hospitalIdCk
             };
-            hzAPI.getData(window.apiUrl+"?c=Index&a=customerCardHospitalList", i, "#hospitalId", 1, true, null, true, "未绑定或未办理诊疗卡", f, e.err)
+            hzAPI.getData(window.apiUrl + "?c=Index&a=customerCardHospitalList", i, "#hospitalId", 1, true, null, true, "未绑定或未办理诊疗卡", f, e.err)
         },
         err: {
             doing: function () {
@@ -151,7 +158,7 @@
             }
         },
         init: function () {
-            hzAPI.getData(window.apiUrl+"?c=Index&a=customerFamilyList", a, "#familyList", 0, true, null, true, null, e)
+            hzAPI.getData(window.apiUrl + "?c=Index&a=customerFamilyList", a, "#familyList", 0, true, null, true, null, e)
         }
     };
     e.init();

+ 19 - 12
wx.demo.ywtinfo.com/js/cardPay.min.js

@@ -21,12 +21,12 @@
                 }
             };
             if (a.payFlag == "0") {
-                hzAPI.sendData(window.apiUrl+"?c=ReqHis&a=returnPay", e.extend(a, {
-                payMode: 1,
-                patientId: JSON.parse(e("ul.card a").attr("data")).patientId
-            }), false, ["退费失败", "退费成功"], null, null, g)
+                hzAPI.sendData(window.apiUrl + "?c=ReqHis&a=returnPay", e.extend(a, {
+                    payMode: 1,
+                    patientId: JSON.parse(e("ul.card a").attr("data")).patientId
+                }), false, ["退费失败", "退费成功"], null, null, g)
             } else {
-                hzAPI.sendData(window.apiUrl+"?c=ReqHis&a=cancelOrder", a, false, ["取消挂号失败", "取消挂号成功"], null, null, g)
+                hzAPI.sendData(window.apiUrl + "?c=ReqHis&a=cancelOrder", a, false, ["取消挂号失败", "取消挂号成功"], null, null, g)
             }
         }
     });
@@ -37,12 +37,19 @@
             var g = {
                 doing: function () {
                     setTimeout(function () {
-                        c.doing()
+                        //进行发短信 
+                        var s = {
+                            smsType: "appointPay",
+                            orderId: d.orderId
+                        };
+                        hzAPI.sendData(window.apiUrl + "?c=Other&a=sendSmsInfo", s, false, null, null, null, null);
+
+                        c.doing();
                     },
                     2000)
                 }
             };
-            hzAPI.sendData(window.apiUrl+"?c=ReqHis&a=payOrder", e.extend(a, {
+            hzAPI.sendData(window.apiUrl + "?c=ReqHis&a=payOrder", e.extend(a, {
                 payMode: 1,
                 payCardNum: JSON.parse(e("ul.card a").attr("data")).cardId,
                 patientId: JSON.parse(e("ul.card a").attr("data")).patientId
@@ -51,7 +58,7 @@
     });
     var b = {
         doing: function () {
-            hzAPI.scroll(window.apiUrl+"?c=Index&a=historyListForPay", f, "#list ul.historyList", 1, false);
+            hzAPI.scroll(window.apiUrl + "?c=Index&a=historyListForPay", f, "#list ul.historyList", 1, false);
             e("ul.historyList li a").on("tap",
             function () {
                 a = JSON.parse(e(this).attr("data"));
@@ -85,7 +92,7 @@
             })
         }
     };
-    var f = { 
+    var f = {
         rowed: 0,
         pageSize: 5
     };
@@ -94,14 +101,14 @@
             var g = JSON.parse(e("ul.card a").attr("data"));
             e.extend(f, {
                 payCardNum: g.cardId,
-				hospitalId: g("#hospitalId").val()
+                hospitalId: g("#hospitalId").val()
             });
-            hzAPI.getData(window.apiUrl+"?c=Index&a=historyListForPay", f, "#list ul.historyList", 1, true, null, false, "无未支付项目", b)
+            hzAPI.getData(window.apiUrl + "?c=Index&a=historyListForPay", f, "#list ul.historyList", 1, true, null, false, "无未支付项目", b)
         }
     };
     var c = {
         doing: function () {
-            hzAPI.getData(window.apiUrl+"?c=ReqHis&a=cardMoney", a, ".lists ul.card", 0, true, null, true, "未办理诊疗卡", d)
+            hzAPI.getData(window.apiUrl + "?c=ReqHis&a=cardMoney", a, ".lists ul.card", 0, true, null, true, "未办理诊疗卡", d)
         }
     };
     var a = {

+ 40 - 11
wx.demo.ywtinfo.com/js/doctorBookingSure.min.js

@@ -26,23 +26,52 @@
                 //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&timestamp=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, "<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 {
+                    //                            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, 3000, "首诊患者请到医院缴费并办理就诊卡");
-                                setTimeout(function () {
-                                        window.location = "doctorCalendar.html?id=" + a.customerFamilyId
-                                    },
-                                    3000)
-                            } else {
+                        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 { 
+                            //进行发短信 
+                            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
-                            }
-                        },
-                        2000)
+                            }, 1000) 
+                        }
+                    }, 2000)
                 }
             };
-            hzAPI.sendData(window.apiUrl + "?c=Other&a=appointsOrder", a, false, [null, "挂号成功"], null, null, d)
+            hzAPI.sendData(window.apiUrl + "?c=Other&a=appointsOrder", a, false, [null, "挂号成功"], null, s, d)
         });
     c("i.add").on("tap",
         function () {

+ 42 - 1
wx.demo.ywtinfo.com/js/familyDateAdd.min.js

@@ -1 +1,42 @@
-(function(b){config.init();b("i.menu_back").on("tap",function(){window.location="family.html"});var a={doing:function(){setTimeout(function(){window.location="family.html"},2000)}};b("i.menu_cn,#iDataAdd").on("tap",function(){if(validate.check("#testForm")){var c={trueName:b("#trueName").val(),phone:b("#phone").val(),tel:b("#tel").val(),email:b("#email").val(),idNo:b("#idNo").val(),birthDay:b("#idNo").val().substr(6,8).replace(/(.{4})(.{2})/,"$1-$2-"),address:b("#address").val(),sex:b("#sex").val(),nation:b("#nation").val(),province:null,city:null,area:null,ownership:b("#ownership").val()};hzAPI.sendData(window.apiUrl+"?c=Index&a=customerFamilyAdd",c,false,["身份证号已存在,添加失败","添加成功"],null,null,a)}})})(Zepto);
+(function (b) {
+    config.init();
+    b("i.menu_back").on("tap",
+    function () {
+        window.location = "family.html"
+    });
+    var a = {
+        doing: function () {
+            setTimeout(function () {
+                window.location = "family.html"
+            },
+            2000)
+        }
+    };
+    b("i.menu_cn,#iDataAdd").on("tap",
+    function () {
+        if (validate.check("#testForm")) {
+            var birthDay = null;
+            if (b("#idNo").val().length == 18) {
+                birthDay = b("#idNo").val().substr(6, 8).replace(/(.{4})(.{2})/, "$1-$2-")
+            } else {
+                birthDay = '2000-01-01';
+            }
+            var c = {
+                trueName: b("#trueName").val(),
+                phone: b("#phone").val(),
+                tel: b("#tel").val(),
+                email: b("#email").val(),
+                idNo: b("#idNo").val(),
+                birthDay: birthDay,
+                address: b("#address").val(),
+                sex: b("#sex").val(),
+                nation: b("#nation").val(),
+                province: null,
+                city: null,
+                area: null,
+                ownership: b("#ownership").val()
+            };
+            hzAPI.sendData(window.apiUrl + "?c=Index&a=customerFamilyAdd", c, false, ["身份证号已存在,添加失败", "添加成功"], null, null, a)
+        }
+    })
+})(Zepto);