From 5a50381b4d3b30a8de467d01d657a3a842ee0298 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 06 十二月 2021 16:28:42 +0800
Subject: [PATCH] 提交
---
zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml | 293 +++++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 248 insertions(+), 45 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml
index f73c653..afc2f55 100644
--- a/zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml
@@ -9,10 +9,10 @@
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;
+ Layout = null;
}
<!DOCTYPE html>
@@ -29,7 +29,7 @@
@*<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">*@
<link href="~/css/style.min.css" rel="stylesheet">
- <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
+ <link href="~/css/plugins/chosen/chosen.css?v=7" rel="stylesheet">
@*<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">*@
@*<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">*@
<link href="~/css/style.min.css" rel="stylesheet">
@@ -101,7 +101,7 @@
@*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@
@*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@
@*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@
- <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
+ <script language="javascript" src="~/js/chosen_v1.8.7/chosen.jquery.js" type="text/javascript"></script>
@*<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>*@
<script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
@*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@
@@ -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>
}
@@ -212,7 +212,36 @@
</div>
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+ <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>
+ @foreach (var item in ReviewItem)
+ {
+ @if (Model.ReviewItem != null && Model.ReviewItem.Split(',').Contains(item.CodeSn))
+ {
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
+ }
+ }
+
+
+ </select>
+
+
+
+
+ </div>
+ </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>
@@ -235,7 +264,7 @@
}
}
-
+
</select>
@@ -243,44 +272,43 @@
<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>
+ <label class="text-right col-sm-1 col-md-1 control-label">涓撳璇佸彿<i class="red">*</i></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">璇勫鍝佺洰<i class="red">*</i></label>
+ <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="ReviewItem" class="form-control" name="ReviewItem" multiple data-placeholder="閫夋嫨 搴忓垪 ...">
+ <select id="YearJiou" class="form-control" name="YearJiou" data-placeholder="閫夋嫨 搴忓垪 ...">
<option value="" hassubinfo="true">璇烽�夋嫨</option>
- @foreach (var item in ReviewItem)
+ @foreach (var item in YearJiou)
{
- @if (Model.ReviewItem !=null && Model.ReviewItem.Split(',').Contains(item.CodeSn))
+ @if (!item.CodeSn.Equals(Model.YearJiou))
{
- <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ <option value="@item.CodeSn" hassubinfo="true">
@item.Comments
</option>
}
else
{
- <option value="@item.CodeSn" hassubinfo="true" >
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
@item.Comments
</option>
}
}
-
+ }
</select>
-
-
-
</div>
+
</div>
+
+
<div class="clearfix layer-area" style="padding-bottom:15px;">
@@ -349,7 +377,7 @@
</div>
<div class="clearfix layer-area" style="padding-bottom:15px;">
- <label class="text-right col-sm-1 col-md-1 control-label">鑱旂郴鐢佃瘽1</label>
+ <label class="text-right col-sm-1 col-md-1 control-label">鑱旂郴鐢佃瘽1<i class="red">*</i></label>
<div class="col-sm-2 col-md-2">
<input class="form-control" label="鑱旂郴鐢佃瘽1" name="Phone1" id="Phone1" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Phone1" autocomplete="off">
</div>
@@ -432,10 +460,10 @@
<p>涓婁紶鑱岀О璇佷功</p>
</div>
@*</div>
- <div class="clearfix layer-area" style="padding-bottom:15px;">
- <div class="col-sm-1 col-md-1 img-row">
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+ <div class="col-sm-1 col-md-1 img-row">
- </div>*@
+ </div>*@
<div class="col-sm-2 col-md-2 img-box">
<div id="TitileImg5" class="TitileImg5"></div>
<input type="hidden" id="TitileCerti5" name="TitileCerti5" value="@Model.TitileCerti5" />
@@ -473,9 +501,9 @@
<div class="clearfix layer-area" style="padding-bottom:15px;">
- <label class="text-right col-sm-1 col-md-1 control-label">澶囨敞</label>
- <div class="col-sm-6 col-md-6">
- <textarea id="Remark" name="Remark" style="overflow-y:hidden" cols="100" rows="10">@Model.Remark </textarea>
+ <label class="text-right col-sm-1 col-md-1 control-label">涓撳绠�浠�</label>
+ <div class="col-sm-11 col-md-11">
+ <textarea id="Remark" name="Remark" class="form-control bt" style="resize:none;overflow-y:hidden; min-height:80px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'">@Model.Remark </textarea>
</div>
</div>
@@ -537,7 +565,9 @@
}
+ var Remark = document.getElementById("Remark");
+ Remark.style.height = Remark.scrollHeight + 'px';
var imgPath = "@Url.Content("~/UploadFile/")";
@@ -563,6 +593,7 @@
imgs.TitileImg = imgUploadCallback(files);
if (imgs.TitileImg !== "") {
$("#TitileCerti").val(imgPath + imgs.TitileImg);
+ $("#TitileCerti1").parent().show();
}
}
@@ -570,8 +601,9 @@
new DragImgUpload("#TitileImg1", {
callback: function (files) {
imgs.TitileImg1 = imgUploadCallback(files);
- if (imgs.TitileImg1!== "") {
+ if (imgs.TitileImg1 !== "") {
$("#TitileCerti1").val(imgPath + imgs.TitileImg1);
+ $("#TitileCerti2").parent().show();
}
}
@@ -581,6 +613,7 @@
imgs.TitileImg2 = imgUploadCallback(files);
if (imgs.TitileImg2 !== "") {
$("#TitileCerti2").val(imgPath + imgs.TitileImg2);
+ $("#TitileCerti3").parent().show();
}
}
@@ -590,6 +623,7 @@
imgs.TitileImg3 = imgUploadCallback(files);
if (imgs.TitileImg3 !== "") {
$("#TitileCerti3").val(imgPath + imgs.TitileImg3);
+ $("#TitileCerti4").parent().show();
}
}
@@ -599,6 +633,7 @@
imgs.TitileImg4 = imgUploadCallback(files);
if (imgs.TitileImg4 !== "") {
$("#TitileCerti4").val(imgPath + imgs.TitileImg4);
+ $("#TitileCerti5").parent().show();
}
}
@@ -608,6 +643,7 @@
imgs.TitileImg5 = imgUploadCallback(files);
if (imgs.TitileImg5 !== "") {
$("#TitileCerti5").val(imgPath + imgs.TitileImg5);
+ $("#TitileCerti6").parent().show();
}
}
@@ -617,6 +653,7 @@
imgs.TitileImg6 = imgUploadCallback(files);
if (imgs.TitileImg6 !== "") {
$("#TitileCerti6").val(imgPath + imgs.TitileImg6);
+ $("#TitileCerti7").parent().show();
}
}
@@ -626,6 +663,7 @@
imgs.TitileImg7 = imgUploadCallback(files);
if (imgs.TitileImg7 !== "") {
$("#TitileCerti7").val(imgPath + imgs.TitileImg7);
+ $("#TitileCerti8").parent().show();
}
}
@@ -635,6 +673,7 @@
imgs.TitileImg8 = imgUploadCallback(files);
if (imgs.TitileImg8 !== "") {
$("#TitileCerti8").val(imgPath + imgs.TitileImg8);
+ $("#TitileCerti9").parent().show();
}
}
@@ -644,6 +683,7 @@
imgs.TitileImg9 = imgUploadCallback(files);
if (imgs.TitileImg9 !== "") {
$("#TitileCerti9").val(imgPath + imgs.TitileImg9);
+ $("#TitileCerti10").parent().show();
}
}
@@ -659,7 +699,16 @@
});
$(function () {
-
+ $("#TitileCerti1").parent().hide();
+ $("#TitileCerti2").parent().hide();
+ $("#TitileCerti3").parent().hide();
+ $("#TitileCerti4").parent().hide();
+ $("#TitileCerti5").parent().hide();
+ $("#TitileCerti6").parent().hide();
+ $("#TitileCerti7").parent().hide();
+ $("#TitileCerti8").parent().hide();
+ $("#TitileCerti9").parent().hide();
+ $("#TitileCerti10").parent().hide();
imgs.frontImg = $.trim( $("#CertiFont").val() );
imgs.BackImg = $.trim( $("#CertiBack").val());
@@ -692,60 +741,70 @@
$("#TitileImg img").each(function (i) {
$(this).attr("src", imgs.TitileImg);
});
+ $("#TitileCerti1").parent().show();
}
if (imgs.TitileImg1 !== "") {
$("#TitileImg1 img").each(function (i) {
$(this).attr("src", imgs.TitileImg1);
});
+ $("#TitileCerti2").parent().show();
}
if (imgs.TitileImg2 !== "") {
$("#TitileImg2 img").each(function (i) {
$(this).attr("src", imgs.TitileImg2);
});
+ $("#TitileCerti3").parent().show();
}
if (imgs.TitileImg3 !== "") {
$("#TitileImg3 img").each(function (i) {
$(this).attr("src", imgs.TitileImg3);
});
+ $("#TitileCerti4").parent().show();
}
if (imgs.TitileImg4 !== "") {
$("#TitileImg4 img").each(function (i) {
$(this).attr("src", imgs.TitileImg4);
});
+ $("#TitileCerti5").parent().show();
}
if (imgs.TitileImg5 !== "") {
$("#TitileImg5 img").each(function (i) {
$(this).attr("src", imgs.TitileImg5);
});
+ $("#TitileCerti6").parent().show();
}
if (imgs.TitileImg6 !== "") {
$("#TitileImg6 img").each(function (i) {
$(this).attr("src", imgs.TitileImg6);
});
+ $("#TitileCerti7").parent().show();
}
if (imgs.TitileImg7 !== "") {
$("#TitileImg7 img").each(function (i) {
$(this).attr("src", imgs.TitileImg7);
});
+ $("#TitileCerti8").parent().show();
}
if (imgs.TitileImg8 !== "") {
$("#TitileImg8 img").each(function (i) {
$(this).attr("src", imgs.TitileImg8);
});
+ $("#TitileCerti9").parent().show();
}
if (imgs.TitileImg9 !== "") {
$("#TitileImg9 img").each(function (i) {
$(this).attr("src", imgs.TitileImg9);
});
+ $("#TitileCerti10").parent().show();
}
if (imgs.TitileImg10 !== "") {
@@ -756,9 +815,8 @@
- $("#ReviewItem").chosen({
- search_contains: true,
- disable_search_threshold: 5
+ $("#ReviewItem").chosen({
+ hide_results_on_select: false
});
@@ -843,7 +901,7 @@
// 淇濆瓨宀椾綅淇℃伅
var saveExpert = function () {
if ($("#InfoSource").val() == '') {
- toastr.warning("瀹㈡埛鏉ユ簮涓嶈兘涓虹┖");
+ toastr.warning("淇℃伅鏉ユ簮涓嶈兘涓虹┖");
return;
}
if ($("#ExpertType").val() == '') {
@@ -854,21 +912,21 @@
toastr.warning("涓撳濮撳悕涓嶈兘涓虹┖");
return;
};
- if (Verify.isNull($("#Province").val()) || Verify.isNull($("#City").val()) ) {
- toastr.warning("鍖哄煙涓嶈兘涓虹┖");
+ if ($.trim($("#Phone1").val()) == '') {
+ toastr.warning("鑱旂郴鐢佃瘽涓嶈兘涓虹┖");
return;
}
- if ($("#IdCard").val() == '') {
- toastr.warning("韬唤璇佸彿涓嶈兘涓虹┖");
+ if ($.trim($("#CertiNumber").val()) == '' || $.trim($("#CertiNumber").val()) == 'SC') {
+ 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 != "" }
@@ -892,7 +950,9 @@
_pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶
}
catch (err) {
- parent._CloseTab1("/Expert/Edit/");
+ window.location = "/Expert/Edit?Province=" + $("#Province").val() + "&City=" + $("#City").val();
+
+ //parent._CloseTab1("/Expert/Edit/");
}
}
@@ -951,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() == '') {
@@ -968,6 +1028,149 @@
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 (data.Remark == null || data.Remark == "") {
+ return;
+ }
+ 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>
\ No newline at end of file
--
Gitblit v1.9.1