双重预防项目-国泰新华二开定制版
马宇豪
2023-10-30 a8fd695e06c33a1dcd50cd407a1306b6c3fe8e65
src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/editJudgeDangerReport.html
@@ -104,14 +104,14 @@
            <label class="col-sm-3 control-label  is-required">隐患判定结果:</label>
            <div class="col-sm-8">
                <select name="reportStatus" class="form-control m-b" required>
                    <option value="1">不是隐患</option>
                    <option value="2">是隐患</option>
<!--                    <option value="1">不是隐患</option>-->
                </select>
            </div>
        </div>
        <div class="form-group" id="showByReportStatusChange" style="display:none;">
        <div class="form-group" id="showByReportStatusChange">
            <label class="col-sm-3 control-label is-required">核查人:</label>
            <div class="col-sm-8">
                <input id="examineUserName"  name="examineUserName" placeholder="选择核查人" class="form-control" type="text"  onclick="selectExamineUser()" maxlength="30" readonly="true" required>
@@ -154,19 +154,19 @@
    //根据是否为隐患--来控制--显示选择核查人--是否显示
    $("select[name='reportStatus']").change(function () {
    // $("select[name='reportStatus']").change(function () {
        var $thisVal = $(this).val();
        if ($thisVal == "1") {
            $("#showByReportStatusChange").hide();
            $(".requiredByReportStatusChange").removeClass("is-required");
            $("select[name='troubleTypeId']").attr("required", "required");
        } else if ($thisVal == "2") {
            $("#showByReportStatusChange").show();
            $(".requiredByReportStatusChange").addClass("is-required");
            $("select[name='troubleTypeId']").removeAttr("required");
        }
    });
        // if ($thisVal == "1") {
        //     $("#showByReportStatusChange").hide();
        //     $(".requiredByReportStatusChange").removeClass("is-required");
        //     $("select[name='troubleTypeId']").attr("required", "required");
        //
        // } else if ($thisVal == "2") {
        //     $("#showByReportStatusChange").show();
        //     $(".requiredByReportStatusChange").addClass("is-required");
        //     $("select[name='troubleTypeId']").removeAttr("required");
        // }
    // });
    function submitHandler() {