| | |
| | | List<WfHistoryDTO> GetList(string RunProcessId ="" ); |
| | | |
| | | List<WfHistoryDTO> GetListshenpi(string RunProcessId); |
| | | |
| | | ResultDataEntity<WfHistoryDTO> SearchByPagingGuanLi(WfHistoryDTOSearch searchEntity); |
| | | } |
| | | } |
| | |
| | | |
| | | return listRole; |
| | | } |
| | | |
| | | |
| | | |
| | | public ResultDataEntity<WfHistoryDTO> SearchByPagingGuanLi(WfHistoryDTOSearch searchEntity) |
| | | { |
| | | |
| | | |
| | | |
| | | ResultDataEntity<WfHistoryDTO> data = new ResultDataEntity<WfHistoryDTO>(); |
| | | List<WfHistoryDTO> list = new List<WfHistoryDTO>(); |
| | | |
| | | |
| | | |
| | | |
| | | var listCode = (from a in _context.SysCodeDtls |
| | | join b in _context.SysCodes |
| | | on a.CodeId equals b.Id |
| | | where a.RecStatus == "A" |
| | | && b.RecStatus == "A" |
| | | select new CodeDataEntity() |
| | | { |
| | | CodeId = b.Id, |
| | | CodeTable = b.CodeTable, |
| | | CodeField = b.CodeField, |
| | | CodeSn = a.CodeSn, |
| | | Comments = a.Comments, |
| | | Contents = a.Contents, |
| | | RecStatus = a.RecStatus, |
| | | Sort = a.Sort |
| | | } |
| | | ); |
| | | DateTime Applytimestart = DateTime.Now; |
| | | DateTime Applytimeend = DateTime.Now; |
| | | if (!string.IsNullOrWhiteSpace(searchEntity.Applytime)) |
| | | { |
| | | string[] Applytimes = searchEntity.Applytime.Split("|"); |
| | | DateTime.TryParse(Applytimes[0], out Applytimestart); |
| | | DateTime.TryParse(Applytimes[1], out Applytimeend); |
| | | Applytimeend = Applytimeend.AddDays(1); |
| | | } |
| | | |
| | | ///WfHistories |
| | | var query = (from k in _context.WfRunProcesses |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | join a in _context.WfHistories |
| | | on k.Id equals a.RunProcessId |
| | | |
| | | join e in listCode.Where(x => x.CodeTable == "wf_run_process" && x.CodeField == "shenpi_status") |
| | | on k.ShenpiStatus equals e.CodeSn |
| | | into esssss |
| | | from eee in esssss.DefaultIfEmpty() |
| | | |
| | | // join f in listCode.Where(x => x.CodeTable == "wf_needdeel" && x.CodeField == "needdeel_type") |
| | | //on a.NeeddeelType equals f.CodeSn |
| | | //into fsssss |
| | | // from fff in fsssss.DefaultIfEmpty() |
| | | |
| | | join d in _context.WfApplytypes |
| | | on k.Applytiye equals d.Applyno |
| | | |
| | | join b in _context.PltUsers |
| | | on k.Creater equals b.Id |
| | | |
| | | |
| | | join c in _context.HrDepts |
| | | on b.DeptId equals c.Id |
| | | |
| | | |
| | | where k.RecStatus == "A" |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Applytime) || (k.Applytime >= Applytimestart && k.Applytime <= Applytimeend)) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.DeptId) || b.DeptId == searchEntity.DeptId.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.ApplyUserName) || b.UserName.Contains(searchEntity.ApplyUserName.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Applytiye) || k.Applytiye == searchEntity.Applytiye.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.ShenpiStatus) || k.ShenpiStatus == searchEntity.ShenpiStatus.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.RunProcessId) || k.Id == searchEntity.RunProcessId.Trim()) |
| | | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Applyno) || k.Applyno == searchEntity.Applyno.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Creater) || k.Creater == searchEntity.Creater.Trim()) |
| | | |
| | | select new WfHistoryDTO |
| | | { |
| | | Id = k.Id, |
| | | |
| | | |
| | | ApplytimeName = k.Applytime.Value.ToString("yyyy-MM-dd"), |
| | | Applyno = k.Applyno, |
| | | CreaterName = b.UserName, |
| | | DeptName = c.DeptName, |
| | | Applytiye = d.Applytiye, |
| | | Content = k.Content, |
| | | ShenpiStatusName = eee.Comments, |
| | | |
| | | Deelurl = a.Deelurl, |
| | | Creater = k.Creater, |
| | | Createtime = k.Createtime, |
| | | Step = k.Step, |
| | | RecStatus = k.RecStatus, |
| | | Modifier = k.Modifier, |
| | | Modifytime = k.Modifytime, |
| | | |
| | | } |
| | | ).Distinct().ToList().OrderByDescending(x => x.Applyno); |
| | | |
| | | |
| | | |
| | | //if (searchEntity.totalrows == 0) |
| | | searchEntity.totalrows = query.Count(); |
| | | var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); |
| | | data.LoadData(searchEntity, lianlist); |
| | | return data; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | model.RecStatus = "D"; |
| | | model.Modifier = userid; |
| | | model.Modifytime = DateTime.Now; |
| | | switch (model.Applytiye) |
| | | |
| | | { |
| | | case "01": |
| | | var model01 = _context.AdmAskLeaves.Find(model.DanjuId); |
| | | model01.RecStatus = "D"; |
| | | model01.Modifier = userid; |
| | | model01.Modifytime = DateTime.Now; |
| | | break; |
| | | case "02": |
| | | var model02 = _context.AdmAskLeaveOffs.Find(model.DanjuId); |
| | | model02.RecStatus = "D"; |
| | | model02.Modifier = userid; |
| | | model02.Modifytime = DateTime.Now; |
| | | break; |
| | | case "03": |
| | | var model03 = _context.HrSalaryAppeal.Find(model.DanjuId); |
| | | model03.status = "D"; |
| | | break; |
| | | case "04": |
| | | var model04 = _context.AdmAskcosts.Find(model.DanjuId); |
| | | model04.RecStatus = "D"; |
| | | model04.Modifier = userid; |
| | | model04.Modifytime = DateTime.Now; |
| | | break; |
| | | case "05": |
| | | var model05 = _context.AdmAskGoods.Find(model.DanjuId); |
| | | model05.RecStatus = "D"; |
| | | model05.Modifier = userid; |
| | | model05.Modifytime = DateTime.Now; |
| | | break; |
| | | case "06": |
| | | var model06 = _context.AdmAskCars.Find(model.DanjuId); |
| | | model06.RecStatus = "D"; |
| | | model06.Modifier = userid; |
| | | model06.Modifytime = DateTime.Now; |
| | | break; |
| | | case "07": |
| | | var model07 = _context.AdmAskMarketingCosts.Find(model.DanjuId); |
| | | model07.RecStatus = "D"; |
| | | model07.Modifier = userid; |
| | | model07.Modifytime = DateTime.Now; |
| | | break; |
| | | case "08": |
| | | var model08 = _context.AdmAskMarketingCosts.Find(model.DanjuId); |
| | | model08.RecStatus = "D"; |
| | | model08.Modifier = userid; |
| | | model08.Modifytime = DateTime.Now; |
| | | break; |
| | | case "09": |
| | | var model09 = _context.AdmAskMarketingCosts.Find(model.DanjuId); |
| | | model09.RecStatus = "D"; |
| | | model09.Modifier = userid; |
| | | model09.Modifytime = DateTime.Now; |
| | | break; |
| | | case "10": |
| | | var model10 = _context.AdmAskovertimes.Find(model.DanjuId); |
| | | model10.RecStatus = "D"; |
| | | model10.Modifier = userid; |
| | | model10.Modifytime = DateTime.Now; |
| | | break; |
| | | case "11": |
| | | var model11 = _context.AdmAskMarketingCosts.Find(model.DanjuId); |
| | | model11.RecStatus = "D"; |
| | | model11.Modifier = userid; |
| | | model11.Modifytime = DateTime.Now; |
| | | break; |
| | | case "12": |
| | | var model12 = _context.AdmAskYouHuis.Find(model.DanjuId); |
| | | model12.RecStatus = "D"; |
| | | model12.Modifier = userid; |
| | | model12.Modifytime = DateTime.Now; |
| | | break; |
| | | case "13": |
| | | var model13 = _context.AdmAskBaiFangs.Find(model.DanjuId); |
| | | model13.RecStatus = "D"; |
| | | model13.Modifier = userid; |
| | | model13.Modifytime = DateTime.Now; |
| | | break; |
| | | case "20": |
| | | var model20 = _context.AdmCustomerWithdrawals.Find(model.DanjuId); |
| | | model20.RecStatus = "D"; |
| | | model20.Modifier = userid; |
| | | model20.Modifytime = DateTime.Now; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | _context.SaveChanges(); |
| | | } |
| | | |
| | |
| | | return new JsonResult(_wfRunProcessService.SearchByPaging(search)); |
| | | } |
| | | |
| | | |
| | | |
| | | public IActionResult IndexGuanLi() |
| | | { |
| | | 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); |
| | | |
| | | |
| | | |
| | | |
| | | ViewData["ActionInfo"] = actionlist; |
| | | |
| | | ViewBag.Applytiye = _wfApplytypeService.GetList().Select(x => new { code = x.Applyno, label = x.Applytiye }).ToList(); |
| | | |
| | | |
| | | |
| | | return View(); |
| | | } |
| | | |
| | | public IActionResult GetListGuanLi(WfHistoryDTOSearch search) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | //search.Creater = curentuser.Id; |
| | | //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); |
| | | return new JsonResult(_wfHistoryService.SearchByPagingGuanLi(search)); |
| | | } |
| | | |
| | | |
| | | public IActionResult Del(string id) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | resultEntity.Result = false; |
| | | |
| | | |
| | | resultEntity = _wfRunProcessService.ModifyStatus(id, curentuser.Id); |
| | | |
| | | |
| | | return new JsonResult(resultEntity); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | @{ |
| | | ViewBag.Title = "WorkFlowTask"; |
| | | Layout = "~/Views/Shared/_Layout_Search.cshtml"; |
| | | } |
| | | |
| | | <link href="~/css/jquery-confirm.css" rel="stylesheet"> |
| | | <script src="~/js/jquery-confirm.js" type="text/javascript"></script> |
| | | |
| | | @section headerStyle{ |
| | | <script type="text/javascript"> |
| | | var Applytiye = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Applytiye))'; |
| | | |
| | | |
| | | |
| | | loseherght = 60; |
| | | dataCol = [ |
| | | { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, |
| | | { label: '申请时间', name: 'ApplytimeName', labtype: 'txt', hidden: false, width: 100 }, |
| | | { |
| | | label: '申请单号', name: 'Applyno', labtype: 'txt', hidden: false, width: 100 |
| | | }, |
| | | |
| | | { label: '部门', name: 'DeptName', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '申请人', name: 'CreaterName', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '请示名称', name: 'Content', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '步骤', name: 'Step', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '批复状态', name: 'ShenpiStatusName', labtype: 'txt', hidden: false, width: 100 }, |
| | | { |
| | | label: '查看', name: 'Remark', labtype: 'txt', hidden: false, width: 100, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | return "<a onclick=\"OpenWindow('查看','100%','100%', '" + rowObject.Deelurl + "')\" >查看</a> "; |
| | | } |
| | | }, |
| | | |
| | | { |
| | | label: '删除', name: 'Remark111', labtype: 'txt', hidden: false, width: 100, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | return "<a onclick=\"shanchu('" + rowObject.Id + "')\" >删除</a> "; |
| | | } |
| | | }, |
| | | |
| | | ]; |
| | | dataUrl = "/WorkFlowTask/GetListGuanLi"; |
| | | searchCol = [ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | { label: '申请时间', name: 'Applytime', labtype: 'datearea', hidden: false }, |
| | | { label: '申请单号', name: 'Applyno', labtype: 'txt', hidden: false }, |
| | | { label: '申请人', name: 'ApplyUserName', labtype: 'txt', hidden: false }, |
| | | { label: '申请流程', name: 'Applytiye', labtype: 'combox', hidden: false, data: JSON.parse(Applytiye)/*, cwidth: '5%', cccwidth: '8%' */}, |
| | | |
| | | ]; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var _afterSave = function (result) { |
| | | if (result) { |
| | | toastr.success("保存成功"); |
| | | } else { |
| | | toastr.error("保存失败"); |
| | | } |
| | | } |
| | | |
| | | var _afterDel = function (result) { |
| | | if (result) { |
| | | toastr.success("删除成功"); |
| | | } else { |
| | | /**/ |
| | | toastr.error("删除成功"); |
| | | /**/ |
| | | } |
| | | } |
| | | </script> |
| | | } |
| | | |
| | | @section footerScripts{ |
| | | <script type="text/javascript"> |
| | | |
| | | |
| | | |
| | | var shanchu = function (Id) { |
| | | |
| | | $.confirm({ |
| | | title: '删除流程操作确认', |
| | | content: '此操作将删除当前流程,确认要继续吗?', |
| | | type: 'green', |
| | | icon: 'glyphicon glyphicon-question-sign', |
| | | buttons: { |
| | | ok: { |
| | | text: '确认', |
| | | btnClass: 'btn-primary', |
| | | action: function () { |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "/WorkFlowTask/Del?id=" + Id, |
| | | dataType: "json", |
| | | global: false, |
| | | success: function (data) { |
| | | |
| | | if (data.Result) { |
| | | jQuery('#jqGrid').jqGrid().trigger('reloadGrid'); |
| | | |
| | | toastr.success("删除成功"); |
| | | } |
| | | else { |
| | | toastr.error(data.Message); |
| | | } |
| | | }, |
| | | error: function () { |
| | | toastr.error("删除失败"); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | cancel: { |
| | | text: '取消', |
| | | btnClass: 'btn-primary' |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | //window._reloadPageData(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | } |