123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- var d = dialog({contentType:'load', skin:'bk-popup'});
- var pagetype = 49;
- var barCode;
-
- $(function(){
- var request = GetRequest();
- var barCode = request["barCode"];//barcode
- var guahaoTime = request["guahaoTime"];//挂号时间
- guahaoTime = guahaoTime.replace('T',' ');
- var jiuzhenTime = decodeURIComponent(request["jiuzhenTime"]);//就诊时间
- var jiezhongHospital = decodeURIComponent(request["jiezhongHospital"]);//接种医院
- var jiuzhenName = decodeURIComponent(request["jiuzhenName"]);//就诊人
- var idCard = request["idCard"];//身份证号
- var hospitalCard = request["hospitalCard"];//社保卡号
- var dataPhone = request["dataPhone"];//手机号
- var dataStatus = request["dataStatus"];///状态,1可用,2已取消
- var sectionType = request["dataStatus"];//坐诊类型--取消预约用
- var hospitalId = request["hospitalId"];//医院code
- var statusNm;
-
- if(dataStatus == 0){
- $(".div-cancel-btn").hide();
- $(".div-again-yuyue").show();
- statusNm = '已取消';
- }else{
- statusNm = '已预约';
- // TODO 如果预约开始时间早于当前时间,则不显示”取消预约“按钮
- var jsStartTime = new Date(jiuzhenTime).getTime();
- var curTime = new Date().getTime();
- if(curTime>jsStartTime) {
- $(".div-cancel-btn").hide();
- $(".div-again-yuyue").show();
- } else {
- $(".div-cancel-btn").show();
- $(".div-again-yuyue").hide();
- }
- }
- $(".left-status").addClass('clazz2').html(statusNm);
- $(".guahao-time").html(guahaoTime.substring(0,16));
- $(".jiuzheng-time").html(jiuzhenTime);
- $(".jiezhong-hospital").html(jiezhongHospital);
- $(".users-name").html(jiuzhenName);
- $(".idcard").html(idCard);
- $(".yibao-num").html(hospitalCard);
- $(".iphone-num").html(dataPhone);
- $(".main").show();
- $("#footer").show();
- d.close();
-
-
- $(".div-again-yuyue").on("click",function(){
- location.href = "immune-date.html?hospitalId="+hospitalId;
- });
- var params={};
- params.BarCode = barCode;
- params.OrgCode = hospitalId;
- params.SectionType = sectionType;
- params.strStart = jiuzhenTime;
- params.SSID = hospitalCard;
- params.PatientName = jiuzhenName;
- params.PatientID = idCard;
- params.PatientPhone = dataPhone;
- $(".div-cancel-btn").on("click",function(){
- sendPost("/patient/guahao/imm/UnResRegisterImmune", params, "json", "post", queryFailed, querySuccesss);
- });
- // getImmuneInfo();
- // bindEvents();
- })
- function querySuccesss(res){
- d.close();
- if(res.status == 200) {
- dialog({
- contentType: 'tipsbox',
- skin: 'bk-popup',
- content: res.msg
- }).show();
- } else {
- dialog({
- contentType: 'tipsbox',
- skin: 'bk-popup',
- content: '撤销失败'
- }).show();
- }
- }
- function queryFailed(res){
- d.close();
- if(res && res.msg) {
- dialog({
- contentType: 'tipsbox',
- skin: 'bk-popup',
- content: res.msg
- }).show();
- } else {
- dialog({
- contentType: 'tipsbox',
- skin: 'bk-popup',
- content: '撤销失败'
- }).show();
- }
- }
-
|