|  | @@ -142,6 +142,21 @@ function getIndex(id) {
 | 
	
		
			
				|  |  |  function saveJcZdItem() {
 | 
	
		
			
				|  |  |      var code = $("#code").val();
 | 
	
		
			
				|  |  |      var data = null;
 | 
	
		
			
				|  |  | +    let min = $("#minAgeRestriction").val();
 | 
	
		
			
				|  |  | +    let max = $("#maxAgeRestriction").val();
 | 
	
		
			
				|  |  | +    let s;
 | 
	
		
			
				|  |  | +    if(min){
 | 
	
		
			
				|  |  | +        s = callJcJyAgeFormat(min)
 | 
	
		
			
				|  |  | +        if(s === '-1'){
 | 
	
		
			
				|  |  | +            return false;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    if(max){
 | 
	
		
			
				|  |  | +        s = callJcJyAgeFormat(max)
 | 
	
		
			
				|  |  | +        if(s === '-1'){
 | 
	
		
			
				|  |  | +            return false;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |      //修改檢查
 | 
	
		
			
				|  |  |      if (code != null) {
 | 
	
		
			
				|  |  |          data = JSON.stringify({
 | 
	
	
		
			
				|  | @@ -153,7 +168,10 @@ function saveJcZdItem() {
 | 
	
		
			
				|  |  |              delFlag: $("#delFlag").val(),
 | 
	
		
			
				|  |  |              zyFlag: $("#zyFlag").val(),
 | 
	
		
			
				|  |  |              mzFlag: $("#mzFlag").val(),
 | 
	
		
			
				|  |  | -            execAddress:$("#execAddress").val()
 | 
	
		
			
				|  |  | +            execAddress:$("#execAddress").val(),
 | 
	
		
			
				|  |  | +            genderRestriction:$("#genderRestriction").val(),
 | 
	
		
			
				|  |  | +            minAgeRestriction:$("#minAgeRestriction").val(),
 | 
	
		
			
				|  |  | +            maxAgeRestriction:$("#maxAgeRestriction").val()
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |      } else {
 | 
	
		
			
				|  |  |          //新增檢查
 | 
	
	
		
			
				|  | @@ -165,7 +183,11 @@ function saveJcZdItem() {
 | 
	
		
			
				|  |  |              delFlag: $("#delFlag").val(),
 | 
	
		
			
				|  |  |              zyFlag: $("#zyFlag").val(),
 | 
	
		
			
				|  |  |              mzFlag: $("#mzFlag").val(),
 | 
	
		
			
				|  |  | -            execAddress:$("#execAddress").val()
 | 
	
		
			
				|  |  | +            execAddress:$("#execAddress").val(),
 | 
	
		
			
				|  |  | +            genderRestriction:$("#genderRestriction").val(),
 | 
	
		
			
				|  |  | +            minAgeRestriction:$("#minAgeRestriction").val(),
 | 
	
		
			
				|  |  | +            maxAgeRestriction:$("#maxAgeRestriction").val()
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      $.ajax({
 | 
	
	
		
			
				|  | @@ -269,6 +291,21 @@ function saveJyCharge() {
 | 
	
		
			
				|  |  |  function saveJyZdItem() {
 | 
	
		
			
				|  |  |      var code = $("#codeJy").val();
 | 
	
		
			
				|  |  |      var data = null;
 | 
	
		
			
				|  |  | +    let min = $("#minAgeRestrictionJy").val();
 | 
	
		
			
				|  |  | +    let max = $("#maxAgeRestrictionJy").val();
 | 
	
		
			
				|  |  | +    let s;
 | 
	
		
			
				|  |  | +    if(min){
 | 
	
		
			
				|  |  | +        s = callJcJyAgeFormat(min)
 | 
	
		
			
				|  |  | +        if(s === '-1'){
 | 
	
		
			
				|  |  | +            return false;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    if(max){
 | 
	
		
			
				|  |  | +        s = callJcJyAgeFormat(max)
 | 
	
		
			
				|  |  | +        if(s === '-1'){
 | 
	
		
			
				|  |  | +            return false;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |      //修改檢验
 | 
	
		
			
				|  |  |      if (code != null) {
 | 
	
		
			
				|  |  |          data = JSON.stringify({
 | 
	
	
		
			
				|  | @@ -281,7 +318,10 @@ function saveJyZdItem() {
 | 
	
		
			
				|  |  |              delFlag: $("#delFlagJy").val(),
 | 
	
		
			
				|  |  |              zyFlag: $("#zyFlagJy").val(),
 | 
	
		
			
				|  |  |              mzFlag: $("#mzFlagJy").val(),
 | 
	
		
			
				|  |  | -            execAddress:$("#jyExecAddress").val()
 | 
	
		
			
				|  |  | +            execAddress:$("#jyExecAddress").val(),
 | 
	
		
			
				|  |  | +            genderRestriction:$("#genderRestrictionJy").val(),
 | 
	
		
			
				|  |  | +            minAgeRestriction:$("#minAgeRestrictionJy").val(),
 | 
	
		
			
				|  |  | +            maxAgeRestriction:$("#maxAgeRestrictionJy").val()
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |      } else {
 | 
	
		
			
				|  |  |          //新增檢验
 | 
	
	
		
			
				|  | @@ -294,7 +334,10 @@ function saveJyZdItem() {
 | 
	
		
			
				|  |  |              delFlag: $("#delFlagJy").val(),
 | 
	
		
			
				|  |  |              zyFlag: $("#zyFlagJy").val(),
 | 
	
		
			
				|  |  |              mzFlag: $("#mzFlagJy").val(),
 | 
	
		
			
				|  |  | -            execAddress:$("#jyExecAddress").val()
 | 
	
		
			
				|  |  | +            execAddress:$("#jyExecAddress").val(),
 | 
	
		
			
				|  |  | +            genderRestriction:$("#genderRestrictionJy").val(),
 | 
	
		
			
				|  |  | +            minAgeRestriction:$("#minAgeRestrictionJy").val(),
 | 
	
		
			
				|  |  | +            maxAgeRestriction:$("#maxAgeRestrictionJy").val()
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      $.ajax({
 | 
	
	
		
			
				|  | @@ -342,6 +385,10 @@ function clearJcInput() {
 | 
	
		
			
				|  |  |      $("#mzFlag").selectpicker('val', 0);//默认不选中
 | 
	
		
			
				|  |  |      $("#mzFlag").selectpicker('refresh');
 | 
	
		
			
				|  |  |      $("#execAddress").val(null);
 | 
	
		
			
				|  |  | +    $("#genderRestriction").selectpicker('val', '');//默认不选中
 | 
	
		
			
				|  |  | +    $("#genderRestriction").selectpicker('refresh');
 | 
	
		
			
				|  |  | +    $("#minAgeRestriction").val(null);
 | 
	
		
			
				|  |  | +    $("#maxAgeRestriction").val(null);
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
	
		
			
				|  | @@ -395,6 +442,10 @@ function clearJyInput() {
 | 
	
		
			
				|  |  |      $("#mzFlagJy").selectpicker('val', 0);//默认不选中
 | 
	
		
			
				|  |  |      $("#mzFlagJy").selectpicker('refresh');
 | 
	
		
			
				|  |  |      $("#jyExecAddress").val(null);
 | 
	
		
			
				|  |  | +    $("#genderRestrictionJy").selectpicker('val', '');//默认不选中
 | 
	
		
			
				|  |  | +    $("#genderRestrictionJy").selectpicker('refresh');
 | 
	
		
			
				|  |  | +    $("#minAgeRestrictionJy").val(null);
 | 
	
		
			
				|  |  | +    $("#maxAgeRestrictionJy").val(null);
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1045,6 +1096,10 @@ function editJcZdItem(code) {
 | 
	
		
			
				|  |  |                  $("#mzFlag").selectpicker('val', res.data.mzFlag);//默认不选中
 | 
	
		
			
				|  |  |                  $("#mzFlag").selectpicker('refresh');
 | 
	
		
			
				|  |  |                  $("#execAddress").val(res.data.execAddress);
 | 
	
		
			
				|  |  | +                $("#genderRestriction").selectpicker('val', res.data.genderRestriction);//默认不选中
 | 
	
		
			
				|  |  | +                $("#genderRestriction").selectpicker('refresh');
 | 
	
		
			
				|  |  | +                $("#minAgeRestriction").val(res.data.minAgeRestriction);
 | 
	
		
			
				|  |  | +                $("#maxAgeRestriction").val(res.data.maxAgeRestriction);
 | 
	
		
			
				|  |  |                  $("#editJcModal").modal();
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  |                  errorMesage(res);
 | 
	
	
		
			
				|  | @@ -1088,6 +1143,10 @@ function editJyZdItem(code) {
 | 
	
		
			
				|  |  |                  $("#mzFlagJy").selectpicker('val', res.data.mzFlag);//默认不选中
 | 
	
		
			
				|  |  |                  $("#mzFlagJy").selectpicker('refresh');
 | 
	
		
			
				|  |  |                  $("#jyExecAddress").val(res.data.execAddress);
 | 
	
		
			
				|  |  | +                $("#genderRestrictionJy").selectpicker('val', res.data.genderRestriction);//默认不选中
 | 
	
		
			
				|  |  | +                $("#genderRestrictionJy").selectpicker('refresh');
 | 
	
		
			
				|  |  | +                $("#minAgeRestrictionJy").val(res.data.minAgeRestriction);
 | 
	
		
			
				|  |  | +                $("#maxAgeRestrictionJy").val(res.data.maxAgeRestriction);
 | 
	
		
			
				|  |  |                  $("#editJyModal").modal();
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  |                  errorMesage(res);
 | 
	
	
		
			
				|  | @@ -1322,6 +1381,11 @@ function initSelect() {
 | 
	
		
			
				|  |  |          dropuAuto: false
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      var yesNo = '<option value="1">是</option><option value="0">否</option>';
 | 
	
		
			
				|  |  | +    var optionSex = '<option value="">不限</option><option value="1">限男性</option><option value="2">限女性</option>';
 | 
	
		
			
				|  |  | +    $('#genderRestriction').html(optionSex);
 | 
	
		
			
				|  |  | +    $('#genderRestriction').selectpicker('refresh');
 | 
	
		
			
				|  |  | +    $("#genderRestriction").selectpicker('val', '');
 | 
	
		
			
				|  |  | +    $("#genderRestriction").selectpicker('refresh');
 | 
	
		
			
				|  |  |      $('#delFlag').html(yesNo);
 | 
	
		
			
				|  |  |      $('#delFlag').selectpicker('refresh');
 | 
	
		
			
				|  |  |      $("#delFlag").selectpicker('val', 0);
 | 
	
	
		
			
				|  | @@ -1343,6 +1407,10 @@ function initSelect() {
 | 
	
		
			
				|  |  |      $("#mzFlagJcCharge").selectpicker('val', 0);
 | 
	
		
			
				|  |  |      $("#mzFlagJcCharge").selectpicker('refresh');
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    $('#genderRestrictionJy').html(optionSex);
 | 
	
		
			
				|  |  | +    $('#genderRestrictionJy').selectpicker('refresh');
 | 
	
		
			
				|  |  | +    $("#genderRestrictionJy").selectpicker('val', '');
 | 
	
		
			
				|  |  | +    $("#genderRestrictionJy").selectpicker('refresh');
 | 
	
		
			
				|  |  |      $('#delFlagJy').html(yesNo);
 | 
	
		
			
				|  |  |      $('#delFlagJy').selectpicker('refresh');
 | 
	
		
			
				|  |  |      $("#delFlagJy").selectpicker('val', 0);
 | 
	
	
		
			
				|  | @@ -1553,4 +1621,17 @@ function addChargeJyZdItem(code) {
 | 
	
		
			
				|  |  |      $("#jyItemCode").val(code);
 | 
	
		
			
				|  |  |      $("#chargeJyTitle").text("新增");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +function callJcJyAgeFormat(number){
 | 
	
		
			
				|  |  | +    if (/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(number) === false) {
 | 
	
		
			
				|  |  | +        let r = {
 | 
	
		
			
				|  |  | +            message: '年龄填写不合法,请检查!'
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        errorMesage(r);
 | 
	
		
			
				|  |  | +        return "-1";
 | 
	
		
			
				|  |  | +    } else {
 | 
	
		
			
				|  |  | +        return "0";
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 |