username@email.com
2021-11-25 402f9568e48e6e1a9d29d37dcda46737047425d5
zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml
@@ -9,7 +9,7 @@
    List<SysCodeDtl> expertType = ViewData["expertType"] as List<SysCodeDtl>; //专家类型
    List<SysCodeDtl> level = ViewData["level"] as List<SysCodeDtl>; //专家等级
    List<SysCodeDtl> ReviewItem = ViewData["ReviewItem"] as List<SysCodeDtl>; //评审品目
    List<SysCodeDtl> YearJiou = ViewData["YearJiou"] as List<SysCodeDtl>; //考试时间
}
@{
            Layout = null;
@@ -184,21 +184,21 @@
                                    <div class="col-sm-2 col-md-2">
                                        <input class="form-control" label="详细地址" name="Name" id="Name" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Name" autocomplete="off">
                                    </div>
                                    <label class="text-right col-sm-1 col-md-1 control-label">性别<i class="red">*</i></label>
                                    <label class="text-right col-sm-1 col-md-1 control-label">性别</label>
                                    <div class="col-sm-2 col-sm-2" grouptype="Vdata">
                                        <select id="Sex" class="form-control" name="Sex" data-placeholder="选择 序列 ..." style="font-weight:normal;">
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in Sex)
                                            {
                                                @if (!item.CodeId.Equals(Model.Sex))
                                                @if (!item.CodeSn.Equals(Model.Sex))
                                                {
                                                    <option value="@item.CodeId" hassubinfo="true">
                                                    <option value="@item.CodeSn" hassubinfo="true">
                                                        @item.Comments
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.CodeId" hassubinfo="true" selected="selected">
                                                    <option value="@item.CodeSn" hassubinfo="true" selected="selected">
                                                        @item.Comments
                                                    </option>
                                                }
@@ -213,7 +213,7 @@
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">评审品目<i class="red">*</i></label>
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">评审品目</label>
                                    <div class="col-sm-11 col-md-11" grouptype="Vdata">
                                        <select id="ReviewItem" class="form-control" name="ReviewItem" multiple data-placeholder="选择 序列 ...">
                                            <option value="" hassubinfo="true">请选择</option>
@@ -272,12 +272,38 @@
                                    <label class="text-right col-sm-1 col-md-1 control-label">身份证号</label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <input class="form-control" label="身份证号" name="IdCard" id="IdCard" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.IdCard" autocomplete="off">
                                        <input class="form-control" label="身份证号" name="IdCard" id="IdCard" labtype="txt" addvisible="true" editvisible="true" maxlength="18" reg="" ismust="true" type="text" value="@Model.IdCard" autocomplete="off">
                                    </div>
                                    <label class="text-right col-sm-1 col-md-1 control-label">专家证号</label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <input class="form-control" label="专家证号" name="CertiNumber" id="CertiNumber" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.CertiNumber">
                                    </div>
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">考试时间</label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <select id="YearJiou" class="form-control" name="YearJiou" data-placeholder="选择 序列 ...">
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in YearJiou)
                                            {
                                                @if (!item.CodeSn.Equals(Model.YearJiou))
                                                {
                                                    <option value="@item.CodeSn" hassubinfo="true">
                                                        @item.Comments
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.CodeSn" hassubinfo="true" selected="selected">
                                                        @item.Comments
                                                    </option>
                                                }
                                            }
                                            }
                                        </select>
                                    </div>
                                </div>
@@ -875,7 +901,7 @@
        // 保存岗位信息
        var saveExpert = function () {
            if ($("#InfoSource").val() == '') {
                toastr.warning("客户来源不能为空");
                toastr.warning("信息来源不能为空");
                return;
            }
            if ($("#ExpertType").val() == '') {
@@ -886,21 +912,21 @@
                toastr.warning("专家姓名不能为空");
                return;
            };
            if (Verify.isNull($("#Province").val()) || Verify.isNull($("#City").val()) ) {
                toastr.warning("区域不能为空");
                return;
            }
            if ($("#IdCard").val() == '') {
                toastr.warning("身份证号不能为空");
                return;
            }
            //if (Verify.isNull($("#Province").val()) || Verify.isNull($("#City").val()) ) {
            //    toastr.warning("区域不能为空");
            //    return;
            //}
            //if ($("#IdCard").val() == '') {
            //    toastr.warning("身份证号不能为空");
            //    return;
            //}
            if ($.trim($("#ReviewItem").val()) == '') {
                toastr.warning("评审项目不能为空");
                return;
            }
            //if ($.trim($("#ReviewItem").val()) == '') {
            //    toastr.warning("评审项目不能为空");
            //    return;
            //}
           
            //var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" }
@@ -924,7 +950,9 @@
                                _pageAutoClose();//自动关闭页面方法
                            }
                            catch (err) {
                                parent._CloseTab1("/Expert/Edit/");
                                window.location = "/Expert/Edit?Province=" + $("#Province").val() + "&City=" + $("#City").val();
                                //parent._CloseTab1("/Expert/Edit/");
                            }
                        }
@@ -983,7 +1011,7 @@
            var city = $.trim($("#City").find("option:selected").text());
            var Address = $("#Address");
            Address.val(sheng + city + AreaId.replace("请选择", ""));
            Address.val(sheng + city );
        }
        if ($("#Id").val() == '') {
@@ -1000,6 +1028,146 @@
            parent.layer.close(index);
            return false;
        }
        $("#IdCard").change(function () {
            var IdCard = $.trim($("#IdCard").val());
            if (IdCard == "") {
                return;
            }
            var Id = $("#Id").val();
            $.ajax({
                type: "GET",
                url: "/Expert/IdCardChongfu?IdCard=" + IdCard + "&Id=" + Id,
                dataType: "json",
                global: false,
                data: "",
                success: function (data) {
                    if (data.Result) {
                    }
                    else {
                        // toastr.error("失败");
                        parent.layer.msg(data.Message, { icon: 5 });
                    }
                },
                error: function () {
                    parent.layer.msg('失败', { icon: 5 });
                }
            });
        });
        $("#Phone1").change(function () {
            var Phone1 = $.trim($("#Phone1").val());
            if (Phone1 == "") {
                return;
            }
            var Id = $("#Id").val();
            $.ajax({
                type: "GET",
                url: "/Expert/Phone1Chongfu?Phone1=" + Phone1 + "&Id=" + Id,
                dataType: "json",
                global: false,
                data: "",
                success: function (data) {
                    if (data.Result) {
                    }
                    else {
                        // toastr.error("失败");
                        parent.layer.msg(data.Message, { icon: 5 });
                    }
                },
                error: function () {
                    parent.layer.msg('失败', { icon: 5 });
                }
            });
        });
        $("#CertiNumber").change(function () {
            var CertiNumber = $.trim($("#CertiNumber").val());
            if (CertiNumber == "") {
                return;
            }
            var Id = $("#Id").val();
            $.ajax({
                type: "GET",
                url: "/Expert/CertiNumberChongfu?CertiNumber=" + CertiNumber + "&Id=" + Id,
                dataType: "json",
                global: false,
                data: "",
                success: function (data) {
                    if (data.Result) {
                        if ($("#Province").val() != data.Remark) {
                            $("#Province").val(data.Remark);
                            var sheng = $("#Province").val();
                            var shi = data.Message;
                            $.ajax({
                                type: "GET",
                                url: "/Project/getCity?shengid=" + sheng,
                                dataType: "json",
                                global: false,
                                async: false,
                                data: "",
                                success: function (data) {
                                    var city = $("#City");
                                    city.find('option').remove();
                                    var aaa = '<option value="" hassubinfo="true">请选择</option>';
                                    city.append(aaa);
                                    if (data.length > 0) {
                                        for (var i = 0; i < data.length; i++) {
                                            var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
                                            if (data[i].CodeId == shi) {
                                                o = '<option value="' + data[i].CodeId + '" hassubinfo="true" selected="selected" >' + data[i].Name + '</option>';
                                            }
                                            city.append(o);
                                        }
                                    }
                                },
                                error: function () {
                                    parent.layer.msg('失败', { icon: 5 });
                                }
                            });
                        } else {
                            $("#City").val(data.Message);
                        }
                    }
                    else {
                        // toastr.error("失败");
                        parent.layer.msg(data.Message, { icon: 5 });
                    }
                },
                error: function () {
                    parent.layer.msg('失败', { icon: 5 });
                }
            });
        });
    </script>
</body>
</html>