From fd865638a82d6691a7904ce1aaccff1e050c7c14 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期五, 09 七月 2021 13:18:02 +0800 Subject: [PATCH] 订单管理: 订单数量默认1 列表 订单类别 显示三级 收货人默认客户资料的收货人 订单批量打印 打印需要批量打印 回访:需要增加 接待人,回访情况,用户评价.客户意见, 送货。 送货公司,单号,时间 --- zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs | 143 ++++++++++++++++++++++++++++++++++++----------- 1 files changed, 110 insertions(+), 33 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs index 3841d6b..e9c3bbd 100644 --- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs @@ -72,6 +72,15 @@ actionEntity1.PageIco = "fa fa-plus"; actionEntity1.ActionName = "鏂板"; actionlist.Add(actionEntity1); + + ActionEntity actionEntity3 = new ActionEntity(); + actionEntity3.OpenType = 0; + actionEntity3.ActionUrl = ""; + actionEntity3.ActionFun = "Print"; + actionEntity3.PageIco = "fa fa-print"; + actionEntity3.ActionName = "鎵撳嵃"; + actionlist.Add(actionEntity3); + ViewData["ActionInfo"] = actionlist; List<PageEntity> pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/CooperOrder/Index/"); @@ -87,6 +96,7 @@ ViewBag.PingjiaStatus = _liaotianService.GetSYScode("CooperOrder", "pingjia_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + ViewBag.ShouliStatus = _liaotianService.GetSYScode("CooperOrder", "shouli_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); return View(); } @@ -348,6 +358,8 @@ actionEntity.ActionName = "鏌ヨ"; actionlist.Add(actionEntity); + + ViewData["ActionInfo"] = actionlist; ViewBag.OrderType = _liaotianService.GetSYScode("CooperVisit", "jtype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); @@ -386,6 +398,7 @@ else { dto.XdTime = DateTime.Now; + dto.OrderNum = 1; ViewBag.ShouliStatus = "1"; } @@ -484,13 +497,22 @@ { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; - CooperOrderDTO dto= new CooperOrderDTO(); - dto.Id = id; + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = false; + + CooperOrderDTO dto = _cooperOrderService.Get(id); + if(dto.ShouliStatus != "1") + { + resultEntity.Result = false; + resultEntity.Message = "鍙湁宸蹭笅鍗曠姸鎬佺殑璁㈠崟鎵嶈兘鍙楃悊"; + return new JsonResult(resultEntity); + } + dto.Shoulier = curentuser.Id; dto.Shoulitime = DateTime.Now; dto.ShouliStatus = "2"; - ResultEntity resultEntity = _cooperOrderService.shouli(dto); + resultEntity = _cooperOrderService.shouli(dto); return new JsonResult(resultEntity); } @@ -518,27 +540,7 @@ return new JsonResult(resultEntity); } - /// <summary> - /// 閫佽揣 - /// </summary> - /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param> - /// <returns></returns> - /// - - public IActionResult Songhuo(string id) - { - var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); - ViewData["curentuser"] = curentuser; - CooperOrderDTO dto = _cooperOrderService.Get(id); - // dto.Id = id; - dto.Songhuoer = curentuser.Id; - dto.Songhuotime = DateTime.Now; - dto.ShouliStatus = "5"; - - ResultEntity resultEntity = _cooperOrderService.save(dto); - - return new JsonResult(resultEntity); - } + public IActionResult Chedan(string id = null) { @@ -553,13 +555,21 @@ public IActionResult chedantuihuan(decimal Price, string Chedanid) { - ResultEntity resultEntity = new ResultEntity(); - resultEntity.Result = true; var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; + + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = false; + + CooperOrderDTO dto = _cooperOrderService.Get(Chedanid); + if (dto.ShouliStatus != "2") + { + resultEntity.Result = false; + resultEntity.Message = "鍙湁鍙楃悊鐘舵�佺殑璁㈠崟鎵嶈兘鎾ゅ崟"; + return new JsonResult(resultEntity); + } + - CooperOrderDTO dto = new CooperOrderDTO(); - dto.Id = Chedanid; dto.Chedaner = curentuser.Id; dto.Chedantime = DateTime.Now; dto.ChedanStatus = "A"; @@ -577,29 +587,82 @@ ViewData["curentuser"] = curentuser; ViewData["Huifangid"] = id; - + ViewData["PingjiaStatus"] = _liaotianService.GetSYScode("CooperOrder", "pingjia_status"); + ViewData.Model = _cooperOrderService.Get(id); return View(); } - public IActionResult Huifangtuihuan(string Huifangremark, string Huifangid) + public IActionResult Huifangtuihuan(CooperOrderDTO dto) { ResultEntity resultEntity = new ResultEntity(); resultEntity.Result = true; var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; - CooperOrderDTO dto = new CooperOrderDTO(); - dto.Id = Huifangid; + + dto.Huifanger = curentuser.Id; dto.Huifangtime = DateTime.Now; dto.HuifangStatus = "A"; - dto.Huifangremark = Huifangremark; + resultEntity = _cooperOrderService.huifang(dto); return new JsonResult(resultEntity); } + + + /// <summary> + /// 閫佽揣 + /// </summary> + /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param> + /// <returns></returns> + /// + + public IActionResult Songhuo(string id) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + ViewData["Huifangid"] = id; + + var cooperOrderDTO = _cooperOrderService.Get(id); + if (!cooperOrderDTO.SonghuoTime1.HasValue) + { + cooperOrderDTO.SonghuoTime1 = DateTime.Now; + } + + ViewData.Model = cooperOrderDTO; + + return View(); + + + } + + + public IActionResult Songhuotuihuan(CooperOrderDTO dto) + { + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = true; + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + var cooperOrderDTO = _cooperOrderService.Get(dto.Id); + if (cooperOrderDTO.ShouliStatus != "2") + { + resultEntity.Result = false; + resultEntity.Message = "鍙湁鍙楃悊鐘舵�佺殑璁㈠崟鎵嶈兘閫佽揣"; + return new JsonResult(resultEntity); + } + + dto.Songhuoer = curentuser.Id; + dto.Songhuotime = DateTime.Now; + dto.ShouliStatus = "5"; + + resultEntity = _cooperOrderService.Songhuo(dto); + + return new JsonResult(resultEntity); + } + public IActionResult Pingjia(string id = null) { @@ -662,6 +725,20 @@ } + public IActionResult printList(CooperOrderDTOSearch search) + { + //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); + search.rows = 1000; + search.page = 1; + ViewBag.ListCooperOrderDTO = _cooperOrderService.SearchByPaging(search).DataList as List<CooperOrderDTO>; + + + + return View(); + } + + + /// <summary> /// 鑾峰彇鐗╁搧 -- Gitblit v1.9.1