From 402f9568e48e6e1a9d29d37dcda46737047425d5 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期四, 25 十一月 2021 10:49:10 +0800 Subject: [PATCH] 专家通讯录优化 --- zhengcaioa/DTO/ExpertDTO.cs | 4 zhengcaioa/zhengcaioa/Views/AdmTongxunlu/Edit.cshtml | 10 zhengcaioa/zhengcaioa/Views/Expert/EditPromote.cshtml | 2 zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml | 214 +++++++++++- zhengcaioa/zhengcaioa/Views/SysCode/Editzhuanjiaquyu.cshtml | 346 ++++++++++++++++++++ zhengcaioa/Model/Expert.cs | 1 zhengcaioa/Model/zhengcaioaContext.cs | 6 zhengcaioa/zhengcaioa/Views/SysCode/Indexzhuanjiaquyu.cshtml | 66 +++ zhengcaioa/Services/ExpertService.cs | 157 ++++++++ zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs | 2 zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs | 2 zhengcaioa/zhengcaioa/Views/Expert/Indexziliao.cshtml | 19 zhengcaioa/zhengcaioa/Views/Expert/Promote.cshtml | 4 zhengcaioa/IServices/IExpertService.cs | 8 zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs | 103 +++++ zhengcaioa/zhengcaioa/Views/ExpertsApply/ExpertsApply.cshtml | 10 zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs | 60 +++ 17 files changed, 950 insertions(+), 64 deletions(-) diff --git a/zhengcaioa/DTO/ExpertDTO.cs b/zhengcaioa/DTO/ExpertDTO.cs index 6193542..5b70a30 100644 --- a/zhengcaioa/DTO/ExpertDTO.cs +++ b/zhengcaioa/DTO/ExpertDTO.cs @@ -53,7 +53,8 @@ public string TitileCerti8 { get; set; } public string TitileCerti9 { get; set; } public string TitileCerti10 { get; set; } - + public string YearJiou { get; set; } + public string YearJiouName { get; set; } } public partial class ExpertDTOSearch : SearchEntity @@ -73,6 +74,7 @@ public string ShenheStatus { get; set; } public string Creater { get; set; } + public string YearJiou { get; set; } } #endregion diff --git a/zhengcaioa/IServices/IExpertService.cs b/zhengcaioa/IServices/IExpertService.cs index 7411259..ceb87af 100644 --- a/zhengcaioa/IServices/IExpertService.cs +++ b/zhengcaioa/IServices/IExpertService.cs @@ -28,5 +28,13 @@ ExpertOrderDipatchDTO GetDispatch(string id); + + + ResultEntity IdCardChongfu(string IdCard = "", string Id = ""); + + ResultEntity CertiNumberChongfu(string CertiNumber = "", string Id = ""); + + ResultEntity Phone1Chongfu(string Phone1 = "", string Id = ""); + } } diff --git a/zhengcaioa/Model/Expert.cs b/zhengcaioa/Model/Expert.cs index 64ebd57..b9d5bcd 100644 --- a/zhengcaioa/Model/Expert.cs +++ b/zhengcaioa/Model/Expert.cs @@ -46,5 +46,6 @@ public string TitileCerti8 { get; set; } public string TitileCerti9 { get; set; } public string TitileCerti10 { get; set; } + public string YearJiou { get; set; } } } diff --git a/zhengcaioa/Model/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs index 4765b16..85daed3 100644 --- a/zhengcaioa/Model/zhengcaioaContext.cs +++ b/zhengcaioa/Model/zhengcaioaContext.cs @@ -6285,7 +6285,6 @@ .HasColumnName("expertType"); entity.Property(e => e.IdCard) - .IsRequired() .HasMaxLength(18) .HasColumnName("idCard"); @@ -6337,6 +6336,10 @@ .HasMaxLength(1) .HasColumnName("rec_status"); + entity.Property(e => e.YearJiou) + .HasMaxLength(1) + .HasColumnName("year_jiou"); + entity.Property(e => e.Remark) .HasMaxLength(1000) .HasColumnName("remark"); @@ -6344,7 +6347,6 @@ entity.Property(e => e.ReviewItem).HasMaxLength(50); entity.Property(e => e.Sex) - .IsRequired() .HasMaxLength(50) .HasColumnName("sex"); diff --git a/zhengcaioa/Services/ExpertService.cs b/zhengcaioa/Services/ExpertService.cs index 786f74b..2721acd 100644 --- a/zhengcaioa/Services/ExpertService.cs +++ b/zhengcaioa/Services/ExpertService.cs @@ -25,13 +25,42 @@ ResultEntity resultEntity = new ResultEntity(); try { - var list = _context.Experts.Where(e => e.IdCard == expertDTO.IdCard && e.RecStatus == "A" && e.Id != expertDTO.Id).ToList(); - if (list.Count > 0 ) + if (!string.IsNullOrEmpty(expertDTO.IdCard)) { - resultEntity.Result = false; - resultEntity.Message = "璇ヤ笓瀹朵俊鎭凡缁忓瓨鍦�"; - return resultEntity; + var list = _context.Experts.Where(e => e.IdCard == expertDTO.IdCard && e.RecStatus == "A" && e.Id != expertDTO.Id).ToList(); + if (list.Count > 0) + { + resultEntity.Result = false; + resultEntity.Message = "璇ヤ笓瀹惰韩浠借瘉淇℃伅宸茬粡瀛樺湪"; + return resultEntity; + } } + + if (!string.IsNullOrEmpty(expertDTO.Phone1)) + { + var list = _context.Experts.Where(e => e.Phone1 == expertDTO.Phone1 && e.RecStatus == "A" && e.Id != expertDTO.Id).ToList(); + if (list.Count > 0) + { + resultEntity.Result = false; + resultEntity.Message = "璇ヤ笓瀹惰仈绯荤數璇濅俊鎭凡缁忓瓨鍦�"; + return resultEntity; + } + } + + if (!string.IsNullOrEmpty(expertDTO.CertiNumber)) + { + var list = _context.Experts.Where(e => e.CertiNumber == expertDTO.CertiNumber && e.RecStatus == "A" && e.Id != expertDTO.Id).ToList(); + if (list.Count > 0) + { + resultEntity.Result = false; + resultEntity.Message = "璇ヤ笓瀹朵笓瀹惰瘉鍙蜂俊鎭凡缁忓瓨鍦�"; + return resultEntity; + } + } + + + + Expert expert = _mapper.Map<Expert>(expertDTO); if (string.IsNullOrEmpty(expert.Id)) { @@ -80,6 +109,7 @@ updateplExpert.ShenheStatus = expert.ShenheStatus; updateplExpert.Modifier = expert.Modifier; updateplExpert.Modifytime = expert.Modifytime; + updateplExpert.YearJiou = expert.YearJiou; } _context.SaveChanges(); @@ -166,6 +196,12 @@ from ooo in osssss.DefaultIfEmpty() + join p in listCode.Where(x => x.CodeTable == "experts" && x.CodeField == "year_jiou") + on a.YearJiou equals p.CodeSn + into psss + from ppp in psss.DefaultIfEmpty() + + where a.RecStatus == "A" && (searchEntity.JoinCount<=0 || hhh.JoinCount >= searchEntity.JoinCount) select new ExpertDTO @@ -210,7 +246,8 @@ ShenheStatus = a.ShenheStatus, AreaName = nnn.Name + "-" + ooo.Name, - + YearJiou = a.YearJiou, + YearJiouName = ppp.Comments, }).ToList(); @@ -266,9 +303,12 @@ { query = query.Where(m => m.Creater == searchEntity.Creater).ToList(); } - + if (!string.IsNullOrEmpty(searchEntity.YearJiou)) + { + query = query.Where(m => m.YearJiou == searchEntity.YearJiou).ToList(); + } - query = query.OrderByDescending(x => x.Modifytime).ToList(); + query = query.OrderByDescending(x => x.Modifytime).ToList(); //if (searchEntity.totalrows == 0) searchEntity.totalrows = query.Count(); var expertlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); @@ -677,5 +717,106 @@ var exDTO = _mapper.Map<ExpertOrderDipatchDTO>(entity); return exDTO; } + + + public ResultEntity IdCardChongfu(string IdCard = "", string Id = "") + { + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = true; + try + { + if (!string.IsNullOrEmpty(IdCard)) + { + var list = _context.Experts.Where(e => e.IdCard == IdCard && e.RecStatus == "A" && e.Id != Id).ToList(); + if (list.Count > 0) + { + resultEntity.Result = false; + resultEntity.Message = "璇ヤ笓瀹惰韩浠借瘉淇℃伅宸茬粡瀛樺湪"; + return resultEntity; + } + } + + + + + + } + catch (Exception ex) + { + resultEntity.Result = false; + resultEntity.Message = "鏌ヨ澶辫触锛岃鑱旂郴绠$悊鍛�"; + ex.Message.ToString(); + } + return resultEntity; + } + + public ResultEntity CertiNumberChongfu(string CertiNumber = "", string Id = "") + { + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = true; + try + { + + + + + if (!string.IsNullOrEmpty(CertiNumber)) + { + var list = _context.Experts.Where(e => e.CertiNumber == CertiNumber && e.RecStatus == "A" && e.Id != Id).ToList(); + if (list.Count > 0) + { + resultEntity.Result = false; + resultEntity.Message = "璇ヤ笓瀹朵笓瀹惰瘉鍙蜂俊鎭凡缁忓瓨鍦�"; + return resultEntity; + } + } + + + + + } + catch (Exception ex) + { + resultEntity.Result = false; + resultEntity.Message = "鏌ヨ澶辫触锛岃鑱旂郴绠$悊鍛�"; + ex.Message.ToString(); + } + return resultEntity; + } + + + public ResultEntity Phone1Chongfu(string Phone1 = "", string Id = "") + { + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = true; + try + { + + + if (!string.IsNullOrEmpty(Phone1)) + { + var list = _context.Experts.Where(e => e.Phone1 == Phone1 && e.RecStatus == "A" && e.Id != Id).ToList(); + if (list.Count > 0) + { + resultEntity.Result = false; + resultEntity.Message = "璇ヤ笓瀹惰仈绯荤數璇濅俊鎭凡缁忓瓨鍦�"; + return resultEntity; + } + } + + + + + + + } + catch (Exception ex) + { + resultEntity.Result = false; + resultEntity.Message = "鏌ヨ澶辫触锛岃鑱旂郴绠$悊鍛�"; + ex.Message.ToString(); + } + return resultEntity; + } } } diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs index 95b623a..3d4c9fa 100644 --- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs @@ -160,7 +160,7 @@ resultEntity.Message = "鏃犺仈绯讳汉"; } - string sss = SMSHelper.PushWToUserMES(number.ToString(), neirong); + string sss = SMSHelper.PushWToUserMES(number.ToString(), "鎮ㄥソ锛屽鎴�. 璇︽儏瑙侊細" + neirong); if (int.Parse(sss) <= 0) { resultEntity.Result = false; diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs index 9fff8d3..de561dc 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs @@ -247,7 +247,7 @@ IntentionCustomerDTO intentionCustomerDTO = _intentionCustomerService.Get(data.Viscustomer); if(intentionCustomerDTO!=null && ( !string.IsNullOrEmpty(intentionCustomerDTO.Phone) || !string.IsNullOrEmpty(intentionCustomerDTO.Tel))) { - string sss = SMSHelper.PushWToUserMES(string.IsNullOrEmpty(intentionCustomerDTO.Phone)? intentionCustomerDTO.Tel: intentionCustomerDTO.Phone, data.DuanxinNeirong); + string sss = SMSHelper.PushWToUserMES(string.IsNullOrEmpty(intentionCustomerDTO.Phone)? intentionCustomerDTO.Tel: intentionCustomerDTO.Phone, "鎮ㄥソ锛屽鎴�. 璇︽儏瑙侊細"+data.DuanxinNeirong); if (int.Parse(sss) <= 0) { resultEntity.Result = false; diff --git a/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs b/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs index ae3c3dd..efaacce 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs @@ -29,8 +29,10 @@ private readonly ICooperOrderService _cooperOrderService; private readonly IFiAccountService _fiAccountService; private readonly IFiAccountRecordService _iFiAccountRecordService; + private readonly IAreaService _iAreaService; public ExpertController(ILogger<ExpertController> logger, IExpertService expertService, IProjectService projectService, ILiaotianService liaotianService, IUserService userService - , IFiSubjectService ifiSubjectService, ICooperOrderService cooperOrderService, IFiAccountService fiAccountService, IFiAccountRecordService iFiAccountRecordService) + , IFiSubjectService ifiSubjectService, ICooperOrderService cooperOrderService, IFiAccountService fiAccountService, IFiAccountRecordService iFiAccountRecordService + , IAreaService iAreaService) { _logger = logger; _expertService = expertService; @@ -41,6 +43,7 @@ _cooperOrderService = cooperOrderService; _fiAccountService = fiAccountService; _iFiAccountRecordService = iFiAccountRecordService; + _iAreaService = iAreaService; } [CheckLogin] public IActionResult Index() @@ -115,13 +118,14 @@ ViewBag.users = _userService.GetList().Select(x => new { code = x.Id, label = x.UserName }).ToList(); + ViewBag.YearJiou = _liaotianService.GetSYScode("experts", "year_jiou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); return View(); } #region 缂栬緫 [CheckLogin] - public ActionResult Edit(string id = null) + public ActionResult Edit(string id = null, string Province = null, string City = null) { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); @@ -144,8 +148,28 @@ } else { - expertDTO.Province = "510000"; - expertDTO.City = "510100"; + if (string.IsNullOrEmpty(Province)) + { + expertDTO.Province = "510000"; + } + else + { + expertDTO.Province = Province; + } + if (string.IsNullOrEmpty(City)) + { + expertDTO.City = "510100"; + } + else + { + expertDTO.City = City; + } + expertDTO.ExpertType = "4"; + expertDTO.Level = "1"; + expertDTO.CertiNumber = "SC"; + expertDTO.InfoSource = "01"; + expertDTO.Sex = "1"; + expertDTO.YearJiou = "1"; } // var sheng = _projectService.Getsheng(); @@ -159,6 +183,7 @@ ViewBag.Province = _projectService.Getsheng();//.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); ViewBag.City = _projectService.Getshi(expertDTO.Province);//.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); + ViewBag.YearJiou = _liaotianService.GetSYScode("experts", "year_jiou");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); ViewData.Model = expertDTO; return View(); } @@ -638,5 +663,75 @@ return new JsonResult(resultEntity); } + + /// <summary> + /// 鍒ゆ柇韬唤璇佹槸鍚﹂噸澶� + /// </summary> + /// <param name="shengid">鐪乮d</param> + /// <returns></returns> + /// + [CheckLogin] + public string IdCardChongfu(string IdCard = "",string Id = "") + { + ResultEntity resultEntity = _expertService.IdCardChongfu(IdCard, Id); + + return JsonConvert.SerializeObject(resultEntity); + + } + + + /// <summary> + /// 鍒ゆ柇涓撳璇佹槸鍚﹂噸澶� + /// </summary> + /// <param name="shengid">鐪乮d</param> + /// <returns></returns> + /// + [CheckLogin] + public string CertiNumberChongfu(string CertiNumber = "", string Id = "") + { + ResultEntity resultEntity = _expertService.CertiNumberChongfu(CertiNumber, Id); + if (resultEntity.Result) + { + //鎷嗚В涓撳璇佸彿 + + var CertiNumber11 = CertiNumber.Replace("SC", ""); + var sysCodeDtls = _liaotianService.GetSYScode("experts", "City"); + + var chengshis = sysCodeDtls.Where(x => CertiNumber11.StartsWith(x.CodeSn)).ToList(); + if (chengshis.Count > 0) + { + var areaDTOs = _iAreaService.GetList(); + + var chengshi = areaDTOs.Where(x => x.Name == chengshis[0].Comments).FirstOrDefault(); + if (chengshi != null) + { + resultEntity.Message = chengshi.CodeId; + resultEntity.Remark = chengshi.ParentId; + } + + } + + } + + return JsonConvert.SerializeObject(resultEntity); + + } + + + /// <summary> + /// 鍒ゆ柇鐢佃瘽鏄惁閲嶅 + /// </summary> + /// <param name="shengid">鐪乮d</param> + /// <returns></returns> + /// + [CheckLogin] + public string Phone1Chongfu(string Phone1 = "", string Id = "") + { + ResultEntity resultEntity = _expertService.Phone1Chongfu(Phone1, Id); + + return JsonConvert.SerializeObject(resultEntity); + + } + } } diff --git a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs index 31bf640..ee94a1c 100644 --- a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs @@ -460,11 +460,67 @@ } - + + [CheckLogin] + public IActionResult Indexzhuanjiaquyu() + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + List<ActionEntity> actionlist = new List<ActionEntity>(); + ActionEntity actionEntity = new ActionEntity(); + actionEntity.OpenType = 0; + actionEntity.ActionUrl = ""; + actionEntity.ActionFun = "Search"; + actionEntity.PageIco = "fa fa-search"; + actionEntity.ActionName = "鏌ヨ"; + actionlist.Add(actionEntity); + ActionEntity actionEntity1 = new ActionEntity(); + actionEntity1.OpenType = 0; + actionEntity1.ActionUrl = ""; + actionEntity1.ActionFun = "Add"; + actionEntity1.PageIco = "fa fa-plus"; + actionEntity1.ActionName = "鏂板"; + actionlist.Add(actionEntity1); + ViewData["ActionInfo"] = actionlist; + return View(); + } + + [CheckLogin] + public IActionResult GetListzhuanjiaquyu(SysCodeDtlSearchEntity searchEntity) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); + searchEntity.CodeTable = "experts"; + searchEntity.CodeField = "City"; + return new JsonResult(_sysCodeService.SearchSysCodeDtlPaging(searchEntity)); + } - + public IActionResult Editzhuanjiaquyu(string id) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + + + SysCodeDtlEntity sysCodeDtlEntity = new SysCodeDtlEntity(); + + + sysCodeDtlEntity = _sysCodeService.GetSysCodeDtlInfo(id, "experts", "City"); + + + ViewData.Model = sysCodeDtlEntity; + + + + + return View(); + } + + + + } diff --git a/zhengcaioa/zhengcaioa/Views/AdmTongxunlu/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/AdmTongxunlu/Edit.cshtml index bac36f2..03c1dcc 100644 --- a/zhengcaioa/zhengcaioa/Views/AdmTongxunlu/Edit.cshtml +++ b/zhengcaioa/zhengcaioa/Views/AdmTongxunlu/Edit.cshtml @@ -122,7 +122,7 @@ </select> <input type="hidden" id="Id" name="Id" value="@Model.Id" /> </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-md-2"> <input id="DanweiName" class="form-control" label="鍗曚綅鍚嶇О" name="DanweiName" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="true" type="text" value="@Model.DanweiName"> @@ -234,10 +234,10 @@ toastr.warning("绫诲埆涓嶈兘涓虹┖"); return; } - if ($.trim($("#DanweiName").val()) == '') { - toastr.warning("鍗曚綅鍚嶇О涓嶈兘涓虹┖"); - return; - } + //if ($.trim($("#DanweiName").val()) == '') { + // toastr.warning("鍗曚綅鍚嶇О涓嶈兘涓虹┖"); + // return; + //} if ($.trim($("#Lianxiren").val()) == '') { toastr.warning("鑱旂郴浜轰笉鑳戒负绌�"); diff --git a/zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml index df77998..f18f271 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> @@ -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> \ No newline at end of file diff --git a/zhengcaioa/zhengcaioa/Views/Expert/EditPromote.cshtml b/zhengcaioa/zhengcaioa/Views/Expert/EditPromote.cshtml index a26a785..e8b152e 100644 --- a/zhengcaioa/zhengcaioa/Views/Expert/EditPromote.cshtml +++ b/zhengcaioa/zhengcaioa/Views/Expert/EditPromote.cshtml @@ -101,7 +101,7 @@ </tr> <tr style="height:150px"> <td> - <label class="text-right control-label">鎺ㄥ箍鏃堕棿</label> + <label class="text-right control-label">鎺ㄥ箍鍐呭</label> </td> <td class="data"> <textarea id="Content" class="form-control" name="Content" style="width:230px; " cols="20" rows="9"></textarea> diff --git a/zhengcaioa/zhengcaioa/Views/Expert/Indexziliao.cshtml b/zhengcaioa/zhengcaioa/Views/Expert/Indexziliao.cshtml index 098c761..665567f 100644 --- a/zhengcaioa/zhengcaioa/Views/Expert/Indexziliao.cshtml +++ b/zhengcaioa/zhengcaioa/Views/Expert/Indexziliao.cshtml @@ -11,18 +11,19 @@ var level = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.level))'; var ReviewItem = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ReviewItem))'; var users = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.users))'; + var YearJiou= '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.YearJiou))'; loseherght = 60; gridConfig = { multiselect: true, selectcol: "Id" }; dataCol = [ { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, { label: '鍖哄煙', name: 'AreaName', labtype: 'txt', hidden: false }, { - label: '濮撳悕', name: 'Name', labtype: 'txt', hidden: false + label: '濮撳悕', name: 'Name', labtype: 'txt', hidden: false }, { label: '涓撳璇佸彿', name: 'CertiNumber', labtype: 'txt', hidden: false }, { label: '鑱旂郴鐢佃瘽', name: 'Phone1', labtype: 'txt', hidden: false }, { label: '褰曞叆浜�', name: 'CreaterName', labtype: 'txt', hidden: false }, - + { label: '鑰冭瘯鏃堕棿', name: 'YearJiouName', labtype: 'txt', hidden: false }, { label: '鎿嶄綔', name: 'caozuo', labtype: 'txt', hidden: false, width: 50, formatter: function (cellvalue, options, rowObject) { @@ -49,12 +50,12 @@ { label: '褰曞叆鏃堕棿', name: 'Createtime', labtype: 'datearea', hidden: false }, { label: '褰曞叆浜�', name: 'Creater', labtype: 'combox', hidden: false, data: JSON.parse(users) }, { label: '璇勫鍝佺洰', name: 'ReviewItem', labtype: 'combox', hidden: false, data: JSON.parse(ReviewItem) }, - - - - + { label: '鑰冭瘯鏃堕棿', name: 'YearJiou', labtype: 'combox', hidden: false, data: JSON.parse(YearJiou) }, + - + + + ]; var _pagedel = function (id) { @@ -167,9 +168,9 @@ $("#PBSCertiNumber").parent().next().remove(); $("#PBSPhone1").parent().after("<br>"); $("#PBSReviewItem").parent().next().remove(); - - }); + + }); </script> } diff --git a/zhengcaioa/zhengcaioa/Views/Expert/Promote.cshtml b/zhengcaioa/zhengcaioa/Views/Expert/Promote.cshtml index 5bf4e5e..2e09375 100644 --- a/zhengcaioa/zhengcaioa/Views/Expert/Promote.cshtml +++ b/zhengcaioa/zhengcaioa/Views/Expert/Promote.cshtml @@ -16,8 +16,8 @@ var searchIn = { Createtime: "", ExpertId: "@experId", Creater:""}; dataCol = [ { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, - { label: '缂栧彿', name: 'SN', labtype: 'txt', hidden: false }, - { label: '褰曞叆鏃堕棿', name: 'Createtime', labtype: 'txt', hidden: false }, + //{ label: '缂栧彿', name: 'SN', labtype: 'txt', hidden: false }, + { label: '鎺ㄥ箍鏃堕棿', name: 'PromoteDate', labtype: 'txt', hidden: false }, // { label: '涓撳', name: 'Name', labtype: 'txt', hidden: false }, //{ label: '涓撳璇佸彿', name: 'CertiNumber', labtype: 'txt', hidden: false }, { label: '鍐呭', name: 'Content', labtype: 'txt', hidden: false }, diff --git a/zhengcaioa/zhengcaioa/Views/ExpertsApply/ExpertsApply.cshtml b/zhengcaioa/zhengcaioa/Views/ExpertsApply/ExpertsApply.cshtml index 1c05072..6765800 100644 --- a/zhengcaioa/zhengcaioa/Views/ExpertsApply/ExpertsApply.cshtml +++ b/zhengcaioa/zhengcaioa/Views/ExpertsApply/ExpertsApply.cshtml @@ -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> @@ -853,10 +853,10 @@ - if ($.trim($("#ReviewItem").val()) == '') { - toastr.warning("璇勫椤圭洰涓嶈兘涓虹┖"); - return; - } + //if ($.trim($("#ReviewItem").val()) == '') { + // toastr.warning("璇勫椤圭洰涓嶈兘涓虹┖"); + // return; + //} if ($("#Sex").val() == '') { toastr.warning("鎬у埆涓嶈兘涓虹┖"); diff --git a/zhengcaioa/zhengcaioa/Views/SysCode/Editzhuanjiaquyu.cshtml b/zhengcaioa/zhengcaioa/Views/SysCode/Editzhuanjiaquyu.cshtml new file mode 100644 index 0000000..ee2502c --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/SysCode/Editzhuanjiaquyu.cshtml @@ -0,0 +1,346 @@ +锘緻model DTO.SysCodeDtlEntity +@using DTO; +@using zhengcaioa.Models; +@{ + + + + + + + + + + + +} +@{ + Layout = null; +} + +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="description" content=""> + <meta name="author" content="ThemeBucket"> + <title>@(SiteConfig.SiteName)</title> + <link href="~/css/bootstrap.min.css" rel="stylesheet"> + <link href="~/css/font-awesome.min.css" rel="stylesheet"> + <link href="~/css/animate.min.css" rel="stylesheet"> + + @*<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="~/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"> + <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" /> + <link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" /> + + <style type="text/css"> + .webuploader-pick { + position: relative; + display: inline-block; + cursor: pointer; + background: #00b7ee; + padding: 8px 14px 7px 14px; + color: #fff; + text-align: center; + border-radius: 3px; + overflow: hidden; + } + + div.clearfix > label { + padding-top: 8px; + } + + .chosen-container { + border-radius: 1px; + border: 1px solid #e5e6e7; + } + + .col-md-1.control-label { + padding-right: 0px; + font-weight: 400; + } + </style> + + <!-- jqgrid--> + @*<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">*@ + <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script> + <script src="~/js/bootstrap.min.js"></script> + @*<script src="~/js/plugins/bootstro/bootstro.js"></script>*@ + + <!--瀹瑰櫒--> + @*<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/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>*@ + @*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@ + <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script> + <script src="~/js/plugins/webuploader/webuploader.min.js"></script> + + <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script> + <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script> + @*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@ + @*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@ + <script src="~/js/TUJS.js"></script> +</head> +<body class="gray-bg" style="overflow:auto"> + <form id="formtest"> + <div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;"> + <div class="row"> + <div class="col-sm-12"> + <div class="ibox float-e-margins"> + <div class="ibox-title"> + <h5> <i class="fa fa-list"></i> 鍩烘湰淇℃伅</h5> + </div> + <div id="div_content" class="ibox-content" style="background-color:white;"> + <div class="row"> + <div class="clearfix layer-area" style="padding-bottom:15px;"> + + + + + + + + + + <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-2 col-md-2" style="width:5%;"> + <input class="form-control" label="缂栫爜" id="CodeSn" name="CodeSn" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="@Model.CodeSn"> + + <input type="hidden" name="Id" value="@Model.Id" /> + + <input type="hidden" name="CodeId" value="@Model.CodeId" /> + </div> + </div> + + <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-2 col-md-2"> + <input class="form-control" label="鍚嶇О" id="Comments" name="Comments" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="100" ismust="true" type="text" value="@Model.Comments"> + + + </div> + </div> + <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-2 col-md-2" style="width:5%;"> + <input class="form-control" label="鎺掑簭" id="Sort" name="Sort" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="flase" type="text" value="@Model.Sort" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> + + </div> + + </div> + <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"> + <input class="form-control" label="澶囨敞" id="Contents" name="Contents" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="300" ismust="true" type="text" value="@Model.Contents"> + + + </div> + </div> + + + + + + + + + + + + + + + + + + </div> + + + + </div> + </div> + </div> + </div> + </div> + </div> + <div class="wrapper wrapper-content" style="margin-top:0px"></div> + <div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px "> + <div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="鍔熻兘鎸夐挳锛氣�滀繚瀛樷�濓紝鈥滃垹闄も��"> + <a class="btn btn-success" href="javascript:void(0)" onclick="delPosition();" style="margin-left:4px; border-radius:4px;"> + <i class="glyphicon glyphicon-remove"></i> <span class="bold">鍒犻櫎</span> + </a> + + <a class="btn btn-success" href="javascript:void(0)" onclick="savePosition();" style="margin-left:4px; border-radius:4px;"> + <i class="glyphicon glyphicon-ok"></i> <span class="bold">鎻愪氦</span> + </a> + + <a class="btn btn-success" href="javascript:void(0)" onclick="closepage();" style="margin-left:4px; border-radius:4px;"> + <i class="glyphicon glyphicon-remove"></i> <span class="bold">鍏抽棴</span> + </a> + </div> + </div> + + </form> + + <script type="text/javascript"> + + + var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2; + $("#div_content").height(hh); + + toastr.options = { + "closeButton": true, + "debug": false, + "progressBar": true, + "positionClass": "toast-bottom-right", + "onclick": null, + "showDuration": "300", + "hideDuration": "600", + "timeOut": "4500", + "extendedTimeOut": "600", + "showEasing": "swing", + "hideEasing": "linear", + "showMethod": "fadeIn", + "hideMethod": "fadeOut" + }; + + + + + + + var id = '@Model.Id'; + + var delPosition = function () { + if (id == null || id == '') { + toastr.warning("璇峰厛淇濆瓨"); + return; + } + $.ajax({ + type: "GET", + url: "/SysCode/NullifySysCodeDtl?id=" + id, + dataType: "json", + global: false, + data: '', + success: function (data) { + + + if (data.Result) { + // parent._afterSave(true); + parent.layer.msg('鍒犻櫎鎴愬姛', { icon: 6 }); + _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶 + } + else { + // toastr.error(""); + parent.layer.msg('鍒犻櫎澶辫触', { icon: 5 }); + } + + }, + error: function () { + if ($.isNumber(imgLoad)) { + parent.layer.close(imgLoad); + } + //toastr.error("淇濆瓨澶辫触"); + + parent.layer.msg('淇濆瓨澶辫触', { icon: 5 }); + } + }); + + } + + + + var closepage = function () { + _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶 + } + + + + // 淇濆瓨宀椾綅淇℃伅 + var savePosition = function () { + + + + + if ($.trim($("#CodeSn").val()) == '') { + toastr.warning("缂栫爜涓嶈兘涓虹┖"); + return; + } + + + if ($.trim($("#Comments").val()) == '') { + toastr.warning("鍚嶇О涓嶈兘涓虹┖"); + return; + } + + + + + + // var data = { id: $("#Id").val(), DocType: $("#DocType").val(), DocDept: $("#DocDept").val(), PublishTime: $("#PublishTime").val(), DocNo: $("#DocNo").val(), DocTitle: $("#DocTitle").val(), DocContent: ueue, DocZtc: $("#DocZtc").val(), Printtimes: $("#Printtimes").val(), DocCsdw: $("#DocCsdw").val(), PrintStatus: $("#PrintStatus").val()} + $.ajax({ + type: "POST", + url: "/SysCode/Savequestiontype", + dataType: "json", + global: false, + data: $('form').serializeArray(), + success: function (data) { + + + + if (data.Result) { + // parent._afterSave(true); + parent.layer.msg('鎴愬姛淇濆瓨', { icon: 6 }); + + + window.location = "/SysCode/Editzhuanjiaquyu"; + + //try { + // _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶 + //} + //catch (err) { + // parent._CloseTab1("/HrJibengongzi/Edit/"); + //} + + } + else { + // toastr.error("澶辫触"); + parent.layer.msg(data.Message, { icon: 5 }); + } + + }, + error: function () { + + + parent.layer.msg('澶辫触', { icon: 5 }); + } + }); + } + + + + + function _pageAutoClose() { + parent.window._reloadPageData(); + var index = parent.layer.getFrameIndex(window.name); + parent.layer.isRefresh = true; + parent.layer.closeAll('loading'); + parent.layer.close(index); + return false; + } + + + </script> +</body> +</html> \ No newline at end of file diff --git a/zhengcaioa/zhengcaioa/Views/SysCode/Indexzhuanjiaquyu.cshtml b/zhengcaioa/zhengcaioa/Views/SysCode/Indexzhuanjiaquyu.cshtml new file mode 100644 index 0000000..70190b8 --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/SysCode/Indexzhuanjiaquyu.cshtml @@ -0,0 +1,66 @@ +锘緻{ + ViewBag.Title = "Editzhuanjiaquyu"; + Layout = "~/Views/Shared/_Layout_Search.cshtml"; +} +@section headerStyle{ + <script type="text/javascript"> + dataCol = [ + { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, + { + label: '缂栫爜', name: 'CodeSn', labtype: 'txt', hidden: false, width: 50, + formatter: function (cellvalue, options, rowObject) { + return "<a onclick=\"OpenWindow('" + rowObject.Comments + "','98%','100%', '/SysCode/Editzhuanjiaquyu?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>"; + } + }, + { + label: '鍚嶇О', name: 'Comments', labtype: 'txt', hidden: false, width: 200, + + }, + { + label: '鎺掑簭', name: 'Sort', labtype: 'txt', hidden: false, width: 50, + + }, + { + label: '澶囨敞', name: 'Contents', labtype: 'txt', hidden: false, width: 300, + + }, + { label: '鐘舵��', name: 'RecStatus', labtype: 'txt', hidden: true }, + { label: '鍒涘缓浜�', name: 'Creater', labtype: 'txt', hidden: true }, + { label: '鍒涘缓鏃堕棿', name: 'Createtime', labtype: 'txt', hidden: true }, + { label: '淇敼浜�', name: 'Modifier', labtype: 'txt', hidden: true }, + { label: '淇敼鏃堕棿', name: 'Modifytime', labtype: 'txt', hidden: true }, + + ]; + dataUrl = "/SysCode/GetListzhuanjiaquyu"; + searchCol = [ + { label: '缂栫爜', name: 'CodeSn', labtype: 'txt', hidden: false }, + + { label: '鍚嶇О', name: 'Comments', labtype: 'txt', hidden: false }, + + + + ]; + var _pageAdd = function () { + OpenWindow("鏂板鍖哄煙瀵圭収", "98%", "90%", "/SysCode/Editzhuanjiaquyu/"); + } + + var _afterSave = function (result) { + if (result) { + toastr.success("淇濆瓨鎴愬姛"); + } else { + toastr.error("淇濆瓨澶辫触"); + } + } + + var _afterDel = function (result) { + if (result) { + toastr.success("鍒犻櫎鎴愬姛"); + } else { + /**/ + toastr.error("鍒犻櫎鎴愬姛"); + /**/ + } +} + </script> +} + -- Gitblit v1.9.1