|  | @@ -3617,84 +3617,68 @@ function mztczfSiReadCardTypeChange() {
 | 
	
		
			
				|  |  |          return;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    postAjaxJsonHttpRequst("/thmz/queryNewInsuinfo", {
 | 
	
		
			
				|  |  | -        patientId: readPatientId,
 | 
	
		
			
				|  |  | -        times: readTimes,
 | 
	
		
			
				|  |  | -        admdvs: admdvs
 | 
	
		
			
				|  |  | -    }, true, function (sfzRes) {
 | 
	
		
			
				|  |  | -        if (sfzRes == '401' || sfzRes == 401) {
 | 
	
		
			
				|  |  | -            window.location.href = '/thmz/login/view';
 | 
	
		
			
				|  |  | -            $("#readLoadingModal").modal('hide'); // 隐藏loading
 | 
	
		
			
				|  |  | -            return;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        if (sfzRes.code == 0) {
 | 
	
		
			
				|  |  | -            var url = "";
 | 
	
		
			
				|  |  | -            if (mztczfSiReadCardType == "03") {
 | 
	
		
			
				|  |  | -                url = "http://localhost:8321/readcard/jiangsu/readcard_auto";
 | 
	
		
			
				|  |  | -            } else if (mztczfSiReadCardType == "01") {
 | 
	
		
			
				|  |  | -                url = "http://localhost:8321/api/entry?param=jiangsu_qrcode_01101";
 | 
	
		
			
				|  |  | -            } else if (mztczfSiReadCardType == "02") {
 | 
	
		
			
				|  |  | -                url = "http://localhost:8321/readcard/entry?param=huashi_readcard";
 | 
	
		
			
				|  |  | -            } else if (mztczfSiReadCardType == "04") {
 | 
	
		
			
				|  |  | -                // url = "http://localhost:8321/readcard/entry?param=face_01101";
 | 
	
		
			
				|  |  | -                url = "http://localhost:8321/readcard/entry?param=jiangsu_face_01101";
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +    var url = "";
 | 
	
		
			
				|  |  | +    if (mztczfSiReadCardType == "03") {
 | 
	
		
			
				|  |  | +        url = "http://localhost:8321/readcard/jiangsu/readcard_auto";
 | 
	
		
			
				|  |  | +    } else if (mztczfSiReadCardType == "01") {
 | 
	
		
			
				|  |  | +        url = "http://localhost:8321/api/entry?param=jiangsu_qrcode_01101";
 | 
	
		
			
				|  |  | +    } else if (mztczfSiReadCardType == "02") {
 | 
	
		
			
				|  |  | +        url = "http://localhost:8321/readcard/entry?param=huashi_readcard";
 | 
	
		
			
				|  |  | +    } else if (mztczfSiReadCardType == "04") {
 | 
	
		
			
				|  |  | +        // url = "http://localhost:8321/readcard/entry?param=face_01101";
 | 
	
		
			
				|  |  | +        url = "http://localhost:8321/readcard/entry?param=jiangsu_face_01101";
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            // 社保卡使用自动重试机制,其他读卡类型不使用重试
 | 
	
		
			
				|  |  | -            if (mztczfSiReadCardType == "03") {
 | 
	
		
			
				|  |  | -                // 社保卡:使用自动重试机制
 | 
	
		
			
				|  |  | -                callReadCardWithRetry(url, 5, 500, function (res) {
 | 
	
		
			
				|  |  | -                    // 成功回调
 | 
	
		
			
				|  |  | -                    $("#readLoadingModal").modal('hide'); // 隐藏loading
 | 
	
		
			
				|  |  | -                    $("#readCardResult").val(res.rawCardData);
 | 
	
		
			
				|  |  | -                    $("#pBusiCardInfo").val(res.rawBusiData);
 | 
	
		
			
				|  |  | +    // 社保卡使用自动重试机制,其他读卡类型不使用重试
 | 
	
		
			
				|  |  | +    if (mztczfSiReadCardType == "03") {
 | 
	
		
			
				|  |  | +        // 社保卡:使用自动重试机制
 | 
	
		
			
				|  |  | +        callReadCardWithRetry(url, 5, 500, function (res) {
 | 
	
		
			
				|  |  | +            // 成功回调
 | 
	
		
			
				|  |  | +            $("#readLoadingModal").modal('hide'); // 隐藏loading
 | 
	
		
			
				|  |  | +            $("#readCardResult").val(res.rawCardData);
 | 
	
		
			
				|  |  | +            $("#pBusiCardInfo").val(res.rawBusiData);
 | 
	
		
			
				|  |  | +            successMesageSimaple("读卡成功,可以进行医保结算操作。");
 | 
	
		
			
				|  |  | +            queryInsuinfo(readPatientId);
 | 
	
		
			
				|  |  | +            $("#mztczfSiReadCardModal").modal("hide");
 | 
	
		
			
				|  |  | +        }, function (err) {
 | 
	
		
			
				|  |  | +            $("#readLoadingModal").modal('hide'); // 隐藏loading
 | 
	
		
			
				|  |  | +            warningMesageSimaple("读卡失败,可以稍后重试或者自费结算(不享受门诊统筹)!");
 | 
	
		
			
				|  |  | +            console.log(err);
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +    } else {
 | 
	
		
			
				|  |  | +        // 其他读卡类型:不使用重试,直接请求一次
 | 
	
		
			
				|  |  | +        $.ajax({
 | 
	
		
			
				|  |  | +            type: "GET",
 | 
	
		
			
				|  |  | +            url: url,
 | 
	
		
			
				|  |  | +            contentType: "application/json;charset=UTF-8",
 | 
	
		
			
				|  |  | +            dataType: "json",
 | 
	
		
			
				|  |  | +            headers: {
 | 
	
		
			
				|  |  | +                'Accept': 'application/json',
 | 
	
		
			
				|  |  | +                'Authorization': 'Bearer ' + localStorage.getItem("token")
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            success: function (res) {
 | 
	
		
			
				|  |  | +                $("#readLoadingModal").modal('hide'); // 隐藏loading
 | 
	
		
			
				|  |  | +                if (res.code == 200) {
 | 
	
		
			
				|  |  | +                    if (mztczfSiReadCardType == "01") {
 | 
	
		
			
				|  |  | +                        var data = JSON.parse(res.data);
 | 
	
		
			
				|  |  | +                        $("#readCardResult").val(JSON.stringify(data.data));
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        $("#readCardResult").val(res.data);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                      successMesageSimaple("读卡成功,可以进行医保结算操作。");
 | 
	
		
			
				|  |  | -                    queryInsuinfo(readPatientId);
 | 
	
		
			
				|  |  |                      $("#mztczfSiReadCardModal").modal("hide");
 | 
	
		
			
				|  |  | -                }, function (err) {
 | 
	
		
			
				|  |  | -                    $("#readLoadingModal").modal('hide'); // 隐藏loading
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  |                      warningMesageSimaple("读卡失败,可以稍后重试或者自费结算(不享受门诊统筹)!");
 | 
	
		
			
				|  |  | -                    console.log(err);
 | 
	
		
			
				|  |  | -                });
 | 
	
		
			
				|  |  | -            } else {
 | 
	
		
			
				|  |  | -                // 其他读卡类型:不使用重试,直接请求一次
 | 
	
		
			
				|  |  | -                $.ajax({
 | 
	
		
			
				|  |  | -                    type: "GET",
 | 
	
		
			
				|  |  | -                    url: url,
 | 
	
		
			
				|  |  | -                    contentType: "application/json;charset=UTF-8",
 | 
	
		
			
				|  |  | -                    dataType: "json",
 | 
	
		
			
				|  |  | -                    headers: {
 | 
	
		
			
				|  |  | -                        'Accept': 'application/json',
 | 
	
		
			
				|  |  | -                        'Authorization': 'Bearer ' + localStorage.getItem("token")
 | 
	
		
			
				|  |  | -                    },
 | 
	
		
			
				|  |  | -                    success: function (res) {
 | 
	
		
			
				|  |  | -                        $("#readLoadingModal").modal('hide'); // 隐藏loading
 | 
	
		
			
				|  |  | -                        if (res.code == 200) {
 | 
	
		
			
				|  |  | -                            if (mztczfSiReadCardType == "01") {
 | 
	
		
			
				|  |  | -                                var data = JSON.parse(res.data);
 | 
	
		
			
				|  |  | -                                $("#readCardResult").val(JSON.stringify(data.data));
 | 
	
		
			
				|  |  | -                            } else {
 | 
	
		
			
				|  |  | -                                $("#readCardResult").val(res.data);
 | 
	
		
			
				|  |  | -                            }
 | 
	
		
			
				|  |  | -                            successMesageSimaple("读卡成功,可以进行医保结算操作。");
 | 
	
		
			
				|  |  | -                            $("#mztczfSiReadCardModal").modal("hide");
 | 
	
		
			
				|  |  | -                        } else {
 | 
	
		
			
				|  |  | -                            warningMesageSimaple("读卡失败,可以稍后重试或者自费结算(不享受门诊统筹)!");
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                    },
 | 
	
		
			
				|  |  | -                    error: function (XMLHttpRequest, textStatus, errorThrown) {
 | 
	
		
			
				|  |  | -                        $("#readLoadingModal").modal('hide'); // 隐藏loading
 | 
	
		
			
				|  |  | -                        warningMesageSimaple("读卡失败,可以稍后重试或者自费结算(不享受门诊统筹)!");
 | 
	
		
			
				|  |  | -                        console.log("读卡异常:", textStatus, errorThrown);
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                });
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            error: function (XMLHttpRequest, textStatus, errorThrown) {
 | 
	
		
			
				|  |  | +                $("#readLoadingModal").modal('hide'); // 隐藏loading
 | 
	
		
			
				|  |  | +                warningMesageSimaple("读卡失败,可以稍后重试或者自费结算(不享受门诊统筹)!");
 | 
	
		
			
				|  |  | +                console.log("读卡异常:", textStatus, errorThrown);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -            $("#readLoadingModal").modal('hide'); // 隐藏loading
 | 
	
		
			
				|  |  | -            errorMesage(sfzRes);
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -    });
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  // 自动重试的通用函数
 |