123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- $(function() {
- $('#require_sign').click(function() {
- //location.href = "signing-doctors.html";
- //判断患者是否有签约情况
- var userAgent = localStorage.getItem("wlyyAgent");
- var request = GetRequest();
- var code = request.code;
- if(!userAgent){//如果未签约,则跳转去签约管理页面,引导用户去登录页面
- location.href = "signing_management.html?code="+code;
- // location.href = "signing_management.html";
- }else{
- //已登录后,判断是否有签约关系
- var url = "/patient/family_contract/getSignMessage",
- userAgentObj = JSON.parse(userAgent),
- params = {patientCode: userAgentObj.represented?userAgentObj.represented:userAgentObj.uid};
-
- sendPost(url, params, "json", "post", function(res){
- console.log();
- var request = GetRequest();
- var code = request.code;
- location.href = "signing_management.html?code="+code;
- }, function(res){
- var list = res.list;
- if(list && list.length > 0){
- for(i=0; i<list.length; i++){
- var item = list[i];
- if(item.signType == 2 && item.signStatus == 1){
- dialog({
- content: "您已签约家庭医生,无法再次签约",
- contentType: "tipsbox",
- skin:'bk-popup'
- }).show();
- }else if(item.signType == 2 && item.signStatus == 0){
- dialog({
- content: "您已提交签约申请,无法再次签约",
- contentType: "tipsbox",
- skin:'bk-popup'
- }).show();
- }
- }
- }else{
- //判断去年是否有已过期的签约记录
- if(request.isOverdue){
- location.href = "../../xuqian/html/information.html";
- }else{
- location.href = "select-doctor.html";
- }
- }
- });
-
- }
- });
- })
|