From 516ba4b650a58c367232273124a1ac966f35b5ca Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 23 十一月 2021 10:42:45 +0800 Subject: [PATCH] 专家资料查询 --- zhengcaioa/Services/ExpertService.cs | 39 +++ zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs | 2 zhengcaioa/DTO/ExpertDTO.cs | 5 zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml | 40 ++++ zhengcaioa/zhengcaioa/Views/Expert/Duanxin.cshtml | 225 ++++++++++++++++++++++ zhengcaioa/zhengcaioa/Views/Expert/Indexziliao.cshtml | 175 +++++++++++++++++ zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs | 2 zhengcaioa/IServices/IExpertService.cs | 2 zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs | 104 ++++++++++ 9 files changed, 586 insertions(+), 8 deletions(-) diff --git a/zhengcaioa/DTO/ExpertDTO.cs b/zhengcaioa/DTO/ExpertDTO.cs index 48140ac..6193542 100644 --- a/zhengcaioa/DTO/ExpertDTO.cs +++ b/zhengcaioa/DTO/ExpertDTO.cs @@ -15,6 +15,8 @@ public string Province { get; set; } public string AreaId { get; set; } public string City { get; set; } + + public string AreaName { get; set; } public string Address { get; set; } public string Postal { get; set; } public string ExpertType { get; set; } @@ -36,6 +38,7 @@ public string Sort { get; set; } public string RecStatus { get; set; } public string Creater { get; set; } + public string CreaterName { get; set; } public DateTime Createtime { get; set; } public string Modifier { get; set; } public DateTime Modifytime { get; set; } @@ -68,6 +71,8 @@ public int JoinCount { get; set; } public string ShenheStatus { get; set; } + + public string Creater { get; set; } } #endregion diff --git a/zhengcaioa/IServices/IExpertService.cs b/zhengcaioa/IServices/IExpertService.cs index 56c5057..7411259 100644 --- a/zhengcaioa/IServices/IExpertService.cs +++ b/zhengcaioa/IServices/IExpertService.cs @@ -15,7 +15,7 @@ ResultEntity ModifyStatus(string id, string userid); - List<ExpertDTO> GetList(); + List<ExpertDTO> GetList(string[] id = null); ResultEntity SaveExpPromote(ExpertPromoteDTO expertPromoteDTO); diff --git a/zhengcaioa/Services/ExpertService.cs b/zhengcaioa/Services/ExpertService.cs index d7fdd28..b0f17df 100644 --- a/zhengcaioa/Services/ExpertService.cs +++ b/zhengcaioa/Services/ExpertService.cs @@ -142,6 +142,22 @@ into csss from ccc in csss.DefaultIfEmpty() + join m in _context.PltUsers + on a.Creater equals m.Id + into msssss + from mmm in msssss.DefaultIfEmpty() + + + join n in _context.Areas + on a.Province equals n.CodeId + into nsssss + from nnn in nsssss.DefaultIfEmpty() + + join o in _context.Areas + on a.City equals o.CodeId + into osssss + from ooo in osssss.DefaultIfEmpty() + where a.RecStatus == "A" && (searchEntity.JoinCount<=0 || hhh.JoinCount >= searchEntity.JoinCount) @@ -169,6 +185,7 @@ Remark = a.Remark, Creater = a.Creater, + CreaterName = mmm.UserName, Createtime = a.Createtime, RecStatus = a.RecStatus, @@ -184,8 +201,10 @@ Sort = a.Sort, ShenheStatus = a.ShenheStatus, - - + + AreaName = nnn.Name + "-" + ooo.Name, + + }).ToList(); if (!string.IsNullOrEmpty(searchEntity.Name)) @@ -236,7 +255,11 @@ { query = query.Where(m => m.Phone1.Contains(searchEntity.Phone1)).ToList(); } - + if (!string.IsNullOrEmpty(searchEntity.Creater)) + { + query = query.Where(m => m.Creater == searchEntity.Creater).ToList(); + } + query = query.OrderByDescending(x => x.Modifytime).ToList(); //if (searchEntity.totalrows == 0) @@ -266,9 +289,17 @@ return result; } - public List<ExpertDTO> GetList() + public List<ExpertDTO> GetList(string[] id = null) { var listExperts = _context.Experts.Where(e => e.RecStatus == "A" && e.ShenheStatus == "A").ToList(); + + if (id != null) + { + + listExperts = listExperts.Where(r => id.Contains(r.Id)).ToList(); + } + + var list = _mapper.Map<List<ExpertDTO>>(listExperts); return list; } diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs index 0a10213..b0f66b1 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs @@ -212,7 +212,7 @@ resultEntity.Message = "鏃犺仈绯讳汉"; } - string sss = SMSHelper.PushWToUserMES(number.ToString(), neirong + " 閫�璁㈠洖N"); + 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 2f60ab4..679c43c 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs @@ -342,7 +342,7 @@ resultEntity.Message = "鏃犺仈绯讳汉"; } - string sss = SMSHelper.PushWToUserMES(number.ToString(), neirong+ " 閫�璁㈠洖N"); + string sss = SMSHelper.PushWToUserMES(number.ToString(), "鎮ㄥソ锛屽鎴�. 璇︽儏瑙�" + neirong ); 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 aa5ae0e..4e86c06 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs @@ -12,6 +12,8 @@ using System.IO; using Microsoft.Extensions.Configuration; using System.Transactions; +using CommonToolsCore; +using System.Text; namespace zhengcaioa.Controllers.Expert { @@ -80,6 +82,41 @@ return JsonConvert.SerializeObject(_expertService.SearchByPaging(search)); } #endregion + + + + [CheckLogin] + public IActionResult Indexziliao() + { + 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 actionEntity4 = new ActionEntity(); + actionEntity4.OpenType = 0; + actionEntity4.ActionUrl = ""; + actionEntity4.ActionFun = "Duanxin"; + actionEntity4.PageIco = ""; + actionEntity4.ActionName = "缇ゅ彂鐭俊"; + actionlist.Add(actionEntity4); + ViewData["ActionInfo"] = actionlist; + + ViewBag.expertType = _liaotianService.GetSYScode("experts", "expertType").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + ViewBag.level = _liaotianService.GetSYScode("experts", "level").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + ViewBag.Province = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); + // ViewBag.City = _projectService.Getshi( ).Select(x => new { code = x.CodeId, label = x.Name }).ToList(); + ViewBag.ReviewItem = _liaotianService.GetSYScode("experts", "ReviewItem").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + + + ViewBag.users = _userService.GetList().Select(x => new { code = x.Id, label = x.UserName }).ToList(); + return View(); + } #region 缂栬緫 @@ -532,9 +569,74 @@ - + #endregion + + + + public IActionResult Duanxin(string id = null) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + ViewData["baifangid"] = id; + + + + return View(); + } + + + + public IActionResult Fasong(string neirong, string baifangid) + { + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = true; + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + List<ExpertDTO> result = new List<ExpertDTO>(); + + if (baifangid != null) + { + result = _expertService.GetList(baifangid.Split(",")); + } + else + { + resultEntity.Result = false; + resultEntity.Message = "鏃犺仈绯讳汉鍙风爜"; + } + string customename = ""; + StringBuilder number = new StringBuilder(); ; + if (result != null && result.Count > 0) + { + for (int i = 0; i < result.Count; i++) + { + number.Append(string.IsNullOrEmpty(result[i].Phone1) ? result[i].Phone2 : result[i].Phone1); + customename += result[i].Name + ","; + if (i != result.Count - 1) + { + number.Append(","); + } + } + } + else + { + resultEntity.Result = false; + resultEntity.Message = "鏃犺仈绯荤數璇�"; + } + + string sss = SMSHelper.PushWToUserMES(number.ToString(), "鎮ㄥソ锛屼笓瀹�. 璇︽儏瑙�" + neirong); + if (int.Parse(sss) <= 0) + { + resultEntity.Result = false; + resultEntity.Message = "鐭俊鍙戦�佸け璐�"; + + } + + _logger.LogInformation(curentuser.UserName + "鍙戦�佺煭淇$粰涓撳" + customename); + return new JsonResult(resultEntity); + } + } } diff --git a/zhengcaioa/zhengcaioa/Views/Expert/Duanxin.cshtml b/zhengcaioa/zhengcaioa/Views/Expert/Duanxin.cshtml new file mode 100644 index 0000000..390cef7 --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/Expert/Duanxin.cshtml @@ -0,0 +1,225 @@ +锘緻model DTO.ExpertDTO +@using DTO; +@using zhengcaioa.Models; +@{ + string baifangid = ViewData["baifangid"] as string; //鎷滆鏂瑰紡 + + +} +@{ + 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"> + + <input type="hidden" id="baifangid" name="baifangid" value="@baifangid" /> + + + + <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> + <div class="col-sm-8 col-md-8"> + <textarea class="form-control bt" id="neirong" name="neirong" title="鐭俊鍐呭" isempty="" maxlength="4000" length="long"></textarea> + </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> + </div> + </div> + + </form> + <script type="text/javascript"> + var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95; + $("#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 savePosition = function () { + + + + + + if ($.trim($("#neirong").val()) == '') { + toastr.warning("浜よ皥鍐呭涓嶈兘涓虹┖"); + return; + } + + + + var data = { neirong: $("#neirong").val(), baifangid: $("#baifangid").val()} + $.ajax({ + type: "POST", + url: "/Expert/Fasong", + dataType: "json", + global: false, + data: data, + success: function (data) { + + + + if (data.Result) { + // parent._afterSave(true); + parent.layer.msg('鐭俊鍙戦�佹垚鍔�', { icon: 6 }); + //window.location = "/Project/add?id=" + data.ReturnID; + + + + _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶 + + + } + 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/Expert/Indexziliao.cshtml b/zhengcaioa/zhengcaioa/Views/Expert/Indexziliao.cshtml new file mode 100644 index 0000000..098c761 --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/Expert/Indexziliao.cshtml @@ -0,0 +1,175 @@ +锘緻{ + ViewBag.Title = "Expert"; + Layout = "~/Views/Shared/_Layout_Search.cshtml"; +} +@section headerStyle{ + <script type="text/javascript"> + + + var expertType = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.expertType))'; + var Province = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Province))'; + 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))'; + 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: 'CertiNumber', labtype: 'txt', hidden: false }, + { label: '鑱旂郴鐢佃瘽', name: 'Phone1', labtype: 'txt', hidden: false }, + { label: '褰曞叆浜�', name: 'CreaterName', labtype: 'txt', hidden: false }, + + { + label: '鎿嶄綔', name: 'caozuo', labtype: 'txt', hidden: false, width: 50, + formatter: function (cellvalue, options, rowObject) { + return "<a onclick=\"OpenWindow('淇敼','98%','100%', '/Expert/Edit?id=" + rowObject.Id + "')\" >淇敼</a> <a onclick=\"_pagedel('" + rowObject.Id + "')\" >鍒犻櫎</a>"; + } + }, + + // { label: '鎿嶄綔', name: '', labtype: 'txt', hidden: false }, + + { 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 = "/Expert/GetList"; + searchCol = [ + { label: '鐪�', name: 'Province', labtype: 'combox', hidden: false, data: JSON.parse(Province), cwidth: '5%', cccwidth: '6.5%' }, + { label: '甯�', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '1%', cccwidth: '7%' }, + { label: '涓撳濮撳悕', name: 'Name', labtype: 'txt', hidden: false }, + { label: '涓撳璇佸彿', name: 'CertiNumber', labtype: 'txt', hidden: false }, + { label: '鑱旂郴鐢佃瘽', name: 'Phone1', labtype: 'txt', hidden: false }, + { 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) }, + + + + + + + ]; + + var _pagedel = function (id) { + if (confirm('鏄惁鍒犻櫎璁板綍')) { + $.ajax({ + type: "GET", + url: "/Expert/Nullify?Id=" + id, + dataType: "json", + global: false, + data: '', + success: function (data) { + + + if (data.Result) { + + layer.msg('鍒犻櫎鎴愬姛', { icon: 6 }); + window._reloadPageData(); + } + else { + // toastr.error(""); + layer.msg('鍒犻櫎澶辫触', { icon: 5 }); + } + + }, + error: function () { + if ($.isNumber(imgLoad)) { + layer.close(imgLoad); + } + //toastr.error("淇濆瓨澶辫触"); + + layer.msg('淇濆瓨澶辫触', { icon: 5 }); + } + }); + } + + + } + + + var _pageDuanxin = function () { + var duanxin = GetGridSelect(); + var baifangid = ""; + if (duanxin != '') { + for (var i = 0; i < duanxin.length; i++) { + baifangid += duanxin[i] + ',' + } + baifangid = baifangid.substring(0, baifangid.length - 1); + } else { + toastr.error("璇烽�夋嫨涓撳"); + return; + } + + OpenWindow("缇ゅ彂鐭俊", "50%", "50%", "/Expert/Duanxin?id=" + baifangid); + + } + + + var _afterSave = function (result) { + if (result) { + toastr.success("淇濆瓨鎴愬姛"); + } else { + toastr.error("淇濆瓨澶辫触"); + } + } + + var _afterDel = function (result) { + if (result) { + toastr.success("鍒犻櫎鎴愬姛"); + } else { + /**/ + toastr.error("鍒犻櫎鎴愬姛"); + /**/ + } + } + + + $(function () { + $("#PBSProvince").change(function () { + let Province = $("#PBSProvince").val(); + $.ajax({ + type: "GET", + url: "/Project/getCity?shengid=" + Province, + dataType: "json", + global: false, + data: "", + success: function (data) { + + var city = $("#PBSCity"); + 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>'; + city.append(o); + } + } + $("#PBSCity").trigger('chosen:updated');//鏇存柊閫夐」 + }, + error: function () { } + }); + }); + + + }); + + + $(function () { + $("#PBSCertiNumber").parent().next().remove(); + $("#PBSPhone1").parent().after("<br>"); + $("#PBSReviewItem").parent().next().remove(); + + + }); + </script> +} + diff --git a/zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml b/zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml index 496c7c0..23bd36b 100644 --- a/zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml +++ b/zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml @@ -26,6 +26,12 @@ label: '鍥炵瓟', name: 'Anwser', labtype: 'txt', hidden: false, width: 300 }, + { + label: '鎿嶄綔', name: 'caozuo', labtype: 'txt', hidden: false, width: 50, + formatter: function (cellvalue, options, rowObject) { + return "<a onclick=\"OpenWindow('淇敼','98%','100%', '/Zhuanjiahuida/Edit?id=" + rowObject.Id + "')\" >鍥炵瓟</a> <a onclick=\"_pagedel('" + rowObject.Id + "')\" >鍒犻櫎</a>"; + } + }, ]; dataUrl = "/Zhuanjiahuida/GetList"; @@ -48,8 +54,42 @@ // OpenWindow("鏂板鍩烘湰宸ヨ祫", "98%", "100%", "/Zhuanjiahuida/Edit/"); //} + var _pagedel = function (id) { + if (confirm('鏄惁鍒犻櫎璁板綍')) { + $.ajax({ + type: "GET", + url: "/Zhuanjiahuida/Nullify?Id=" + id, + dataType: "json", + global: false, + data: '', + success: function (data) { + if (data.Result) { + + layer.msg('鍒犻櫎鎴愬姛', { icon: 6 }); + window._reloadPageData(); + } + else { + // toastr.error(""); + layer.msg('鍒犻櫎澶辫触', { icon: 5 }); + } + + }, + error: function () { + if ($.isNumber(imgLoad)) { + layer.close(imgLoad); + } + //toastr.error("淇濆瓨澶辫触"); + + layer.msg('淇濆瓨澶辫触', { icon: 5 }); + } + }); + } + + + } + var _afterSave = function (result) { if (result) { -- Gitblit v1.9.1