|  | @@ -2460,7 +2460,7 @@ function editJyJcItem(obj) {
 | 
	
		
			
				|  |  |  function saveJyJcItem(calculateTotalAmountFlag) {
 | 
	
		
			
				|  |  |      //6岁内提示加价
 | 
	
		
			
				|  |  |      var patientAge = $("#patientAge").text();
 | 
	
		
			
				|  |  | -    if (patientAge < 6) {
 | 
	
		
			
				|  |  | +    if (patientAge != null && patientAge != "" && patientAge < 6) {
 | 
	
		
			
				|  |  |          $.ajax({
 | 
	
		
			
				|  |  |              type: "GET",
 | 
	
		
			
				|  |  |              url: '/thmz/checkAdditionally?code=' + $("#current_code").val(),
 | 
	
	
		
			
				|  | @@ -2702,12 +2702,12 @@ function removeYpOrProject(index, obj) {
 | 
	
		
			
				|  |  |      //var totalRetprice = $(obj).parent().find("input.temporary_items_amount").val();
 | 
	
		
			
				|  |  |      //calculateCfAmount(tableId, totalRetprice, null, index, 1);
 | 
	
		
			
				|  |  |      //医技的序号调整一下
 | 
	
		
			
				|  |  | -    if(index == 2){
 | 
	
		
			
				|  |  | +    if (index == 2) {
 | 
	
		
			
				|  |  |          var nextAll = $(obj).parent().nextAll();
 | 
	
		
			
				|  |  | -        if(nextAll!=null && nextAll.length>0){
 | 
	
		
			
				|  |  | -            for(var i=0;i<nextAll.length;i++){
 | 
	
		
			
				|  |  | -               var index= $(nextAll[i]).find(".jcjyItemGroupId").text();
 | 
	
		
			
				|  |  | -                $(nextAll[i]).find(".jcjyItemGroupId").text(index-1);
 | 
	
		
			
				|  |  | +        if (nextAll != null && nextAll.length > 0) {
 | 
	
		
			
				|  |  | +            for (var i = 0; i < nextAll.length; i++) {
 | 
	
		
			
				|  |  | +                var index = $(nextAll[i]).find(".jcjyItemGroupId").text();
 | 
	
		
			
				|  |  | +                $(nextAll[i]).find(".jcjyItemGroupId").text(index - 1);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -5076,90 +5076,90 @@ function initWorkspaceConfigForCurrent() {
 | 
	
		
			
				|  |  |              if (res.code == 0) {
 | 
	
		
			
				|  |  |                  if (res.data.symptomFlag == 1) {
 | 
	
		
			
				|  |  |                      $("#symptomFlag").removeClass("in").addClass("hide");
 | 
	
		
			
				|  |  | -                    if($("#symptomFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if ($("#symptomFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#symptomFlagCheck").parent().parent().click();//当前选中改为不选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  } else if (res.data.symptomFlag == 0) {
 | 
	
		
			
				|  |  |                      $("#symptomFlag").removeClass("hide").addClass("in");
 | 
	
		
			
				|  |  | -                    if(!$("#symptomFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if (!$("#symptomFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#symptomFlagCheck").parent().parent().click();//当前不选中改为选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (res.data.emrHpiFlag == 1) {
 | 
	
		
			
				|  |  |                      $("#emrHpiFlag").removeClass("in").addClass("hide");
 | 
	
		
			
				|  |  | -                    if($("#emrHpiFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if ($("#emrHpiFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#emrHpiFlagCheck").parent().parent().click();//当前选中改为不选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  } else if (res.data.emrHpiFlag == 0) {
 | 
	
		
			
				|  |  |                      $("#emrHpiFlag").removeClass("hide").addClass("in");
 | 
	
		
			
				|  |  | -                    if(!$("#emrHpiFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if (!$("#emrHpiFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#emrHpiFlagCheck").parent().parent().click();//当前不选中改为选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  if (res.data.emrPsFlag == 1) {
 | 
	
		
			
				|  |  |                      $("#emrPsFlag").removeClass("in").addClass("hide");
 | 
	
		
			
				|  |  | -                    if($("#emrPsFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if ($("#emrPsFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#emrPsFlagCheck").parent().parent().click();//当前选中改为不选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  } else if (res.data.emrPsFlag == 0) {
 | 
	
		
			
				|  |  |                      $("#emrPsFlag").removeClass("hide").addClass("in");
 | 
	
		
			
				|  |  | -                    if(!$("#emrPsFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if (!$("#emrPsFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#emrPsFlagCheck").parent().parent().click();//当前不选中改为选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (res.data.personalHistoryFlag == 1) {
 | 
	
		
			
				|  |  |                      $("#personalHistoryFlag").removeClass("in").addClass("hide");
 | 
	
		
			
				|  |  | -                    if($("#personalHistoryFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if ($("#personalHistoryFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#personalHistoryFlagCheck").parent().parent().click();//当前选中改为不选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  } else if (res.data.personalHistoryFlag == 0) {
 | 
	
		
			
				|  |  |                      $("#personalHistoryFlag").removeClass("hide").addClass("in");
 | 
	
		
			
				|  |  | -                    if(!$("#personalHistoryFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if (!$("#personalHistoryFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#personalHistoryFlagCheck").parent().parent().click();//当前不选中改为选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (res.data.familyHistoryFlag == 1) {
 | 
	
		
			
				|  |  |                      $("#familyHistoryFlag").removeClass("in").addClass("hide");
 | 
	
		
			
				|  |  | -                    if($("#familyHistoryFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if ($("#familyHistoryFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#familyHistoryFlagCheck").parent().parent().click();//当前选中改为不选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  } else if (res.data.familyHistoryFlag == 0) {
 | 
	
		
			
				|  |  |                      $("#familyHistoryFlag").removeClass("hide").addClass("in");
 | 
	
		
			
				|  |  | -                    if(!$("#familyHistoryFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if (!$("#familyHistoryFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#familyHistoryFlagCheck").parent().parent().click();//当前不选中改为选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (res.data.obstericalHistoryFlag == 1) {
 | 
	
		
			
				|  |  |                      $("#obstericalHistoryFlag").removeClass("in").addClass("hide");
 | 
	
		
			
				|  |  | -                    if($("#obstericalHistoryFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if ($("#obstericalHistoryFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#obstericalHistoryFlagCheck").parent().parent().click();//当前选中改为不选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  } else if (res.data.obstericalHistoryFlag == 0) {
 | 
	
		
			
				|  |  |                      $("#obstericalHistoryFlag").removeClass("hide").addClass("in");
 | 
	
		
			
				|  |  | -                    if(!$("#obstericalHistoryFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if (!$("#obstericalHistoryFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#obstericalHistoryFlagCheck").parent().parent().click();//当前不选中改为选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (res.data.pressureLeftFlag == 1) {
 | 
	
		
			
				|  |  |                      $("#pressureLeftFlag").removeClass("in").addClass("hide");
 | 
	
		
			
				|  |  | -                    if($("#pressureLeftFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if ($("#pressureLeftFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#pressureLeftFlagCheck").parent().parent().click();//当前选中改为不选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  } else if (res.data.pressureLeftFlag == 0) {
 | 
	
		
			
				|  |  |                      $("#pressureLeftFlag").removeClass("hide").addClass("in");
 | 
	
		
			
				|  |  | -                    if(!$("#pressureLeftFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if (!$("#pressureLeftFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#pressureLeftFlagCheck").parent().parent().click();//当前不选中改为选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (res.data.tentativeDiagnosisFlag == 1) {
 | 
	
		
			
				|  |  |                      $("#tentativeDiagnosisFlag").removeClass("in").addClass("hide");
 | 
	
		
			
				|  |  | -                    if($("#tentativeDiagnosisFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if ($("#tentativeDiagnosisFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#tentativeDiagnosisFlagCheck").parent().parent().click();//当前选中改为不选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  } else if (res.data.tentativeDiagnosisFlag == 0) {
 | 
	
		
			
				|  |  |                      $("#tentativeDiagnosisFlag").removeClass("hide").addClass("in");
 | 
	
		
			
				|  |  | -                    if(!$("#tentativeDiagnosisFlagCheck").parent().hasClass("checked")){
 | 
	
		
			
				|  |  | +                    if (!$("#tentativeDiagnosisFlagCheck").parent().hasClass("checked")) {
 | 
	
		
			
				|  |  |                          $("#tentativeDiagnosisFlagCheck").parent().parent().click();//当前不选中改为选中
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
	
		
			
				|  | @@ -5171,7 +5171,6 @@ function initWorkspaceConfigForCurrent() {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * 保存医生工作台配置
 | 
	
		
			
				|  |  |   */
 | 
	
	
		
			
				|  | @@ -6218,6 +6217,12 @@ function printPrescription(patientId, times, clnicId, payMark) {
 | 
	
		
			
				|  |  |              if (res.code == 0) {
 | 
	
		
			
				|  |  |                  var prescriptionDetail = res.data.mzBlRecord.prescriptionDetail;
 | 
	
		
			
				|  |  |                  if (prescriptionDetail != null && prescriptionDetail != "") {
 | 
	
		
			
				|  |  | +                    var prescriptionDetailJson = JSON.parse(prescriptionDetail);
 | 
	
		
			
				|  |  | +                    //当前处方只开了住院证则只打印住院证
 | 
	
		
			
				|  |  | +                    if (prescriptionDetailJson.xyPrescription.jePrescription.length == 0 && prescriptionDetailJson.xyPrescription.mjPrescription.length == 0 && prescriptionDetailJson.xyPrescription.pyPrescription.length == 0 && prescriptionDetailJson.xyPrescription.ycPrescription.length == 0 && prescriptionDetailJson.zlPrescription.length == 0 && prescriptionDetailJson.zyPrescription.length == 0 && prescriptionDetailJson.zyReqPrescription.length > 0) {
 | 
	
		
			
				|  |  | +                        printZyReq(patientId);
 | 
	
		
			
				|  |  | +                        return;
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                      var index = 0;
 | 
	
		
			
				|  |  |                      setPrint();
 | 
	
		
			
				|  |  |                      LODOP = getLodop();
 | 
	
	
		
			
				|  | @@ -6250,7 +6255,6 @@ function printPrescription(patientId, times, clnicId, payMark) {
 | 
	
		
			
				|  |  |                      $("#patientIdGuideCard").text(mzPatientMi.patientId);
 | 
	
		
			
				|  |  |                      $("#patientNameGuideCard").text(mzPatientMi.name);
 | 
	
		
			
				|  |  |                      $("#patientDateGuideCard").text(format(new Date(), "yyyy-MM-dd"));
 | 
	
		
			
				|  |  | -                    var prescriptionDetailJson = JSON.parse(prescriptionDetail);
 | 
	
		
			
				|  |  |                      //普药处方
 | 
	
		
			
				|  |  |                      var pyPrescription = prescriptionDetailJson.xyPrescription.pyPrescription;
 | 
	
		
			
				|  |  |                      if (pyPrescription != null && pyPrescription.length > 0) {
 |