<div class="layui-form-item">
<div class="layui-inline">
<p class="ag_guzhu"><i style="color: red;">*</i> 雇主报价</p>
<label class="ag_gu_label">
<div class="layui-input-block">
<input type="radio" name="sex" value="1" title="按咨询服务费">
</div>
<div class="layui-input-inline ag_gu_one">
<input type="tel" name="text" id="first" value="" autocomplete="off" class="layui-input">
</div>
<label class="layui-form-label ag_yuan">元</label>
</label>
</div>
</div>
<div class="layui-form-item">
<label class="ag_gu_label">
<div class="layui-input-block">
<input type="radio" name="sex" value="2" title="按当地政府收费标准的下浮:">
</div>
<div class="layui-input-inline ag_gu_one">
<input type="number" name="text" id="second" autocomplete="off" class="layui-input">
</div>
<label class="layui-form-label ag_yuan" >%</label>
<label class="layui-form-label ag_gu_two">预估咨询服务费:</label>
<div class="layui-input-inline ag_gu_two">
<input type="text" name="text" id="second1" autocomplete="off" value='' disabled class="layui-input">
</div>
<label class="layui-form-label ag_yuan" >元</label>
</label>
</div>
<div class="layui-form-item">
<label class="ag_gu_label">
<div class="layui-input-block">
<input type="radio" name="sex" value="3" title="按总造价计费:">
</div>
<div class="layui-input-inline ag_gu_one">
<input type="number" name="text" id="third" autocomplete="off" class="layui-input">
</div>
<label class="layui-form-label ag_yuan" >%</label>
<label class="layui-form-label ag_gu_two" style="margin-left:85px;">预估咨询服务费:</label>
<div class="layui-input-inline ag_gu_two">
<input type="text" name="text" id="third1" autocomplete="off" value="" disabled class="layui-input">
</div>
<label class="layui-form-label ag_yuan" >元</label>
</label>
</div>
<script src="../js/jquery-1.11.3.min.js" type="text/javascript"></script>
<script>
//单选
$("input:radio[name='sex']").each(function () {
$("input:radio[name='sex']").click(function(){
let ad_cty = $(this).val();
if(ad_cty == 1){
$("#first").attr("disabled", false);
$("#second").attr("disabled", true);
$("#second").val('');
$("#third").val('');
$("#third").attr("disabled", true);
}
if(ad_cty == 2){
$("#first").val('');
$("#third").val('')
$("#first").attr("disabled", true);
$("#second").attr("disabled", false);
$("#third").attr("disabled", true);
}
if(ad_cty == 3){
$("#first").val('');
$("#second").val('')
$("#first").attr("disabled", true);
$("#second").attr("disabled", true);
$("#third").attr("disabled", false);
}
// console.log(ad_cty);
});
});
</script>