From a77fbf7eeb18b5caf3f0e77fa01791a5a8ae094e Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 05 一月 2022 14:01:53 +0800 Subject: [PATCH] 客户预付款 --- zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml | 17 + zhengcaioa/Services/CooperatecustomCustomerService.cs | 26 + zhengcaioa/zhengcaioa/Views/AdmPieceCheck/IndexCheck.cshtml | 109 +++++++++ zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/IndexCustomer.cshtml | 197 +++++++++++++++++ zhengcaioa/DTO/CooperatecustomCustomerDTO.cs | 7 zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs | 16 + zhengcaioa/zhengcaioa/Controllers/admin/AdmPieceCheckController.cs | 26 ++ zhengcaioa/Model/zhengcaioaContext.cs | 12 + zhengcaioa/zhengcaioa/Controllers/Finance/FiOrderrecievemoneyController.cs | 54 ++++ zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs | 16 + zhengcaioa/zhengcaioa/Controllers/ProjectController.cs | 32 ++ zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs | 34 ++ zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs | 51 ++++ zhengcaioa/DTO/ResultDataEntity.cs | 9 zhengcaioa/Model/CooperatecustomCustomer.cs | 3 15 files changed, 587 insertions(+), 22 deletions(-) diff --git a/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs b/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs index 533cad9..2a8da12 100644 --- a/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs +++ b/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs @@ -60,6 +60,13 @@ public string HuiyuanId { get; set; } public string Weixiner { get; set; } public DateTime? Weixintime { get; set; } + public decimal? Yufukuan { get; set; } + public string YufukuanName { get; set; } + public decimal? Shouxinedu { get; set; } + public string ShouxineduName { get; set; } + public decimal? Shenyushouxin { get; set; } + public string ShenyushouxinName { get; set; } + public decimal? Moneycountde { get; set; } } public class CooperatecustomCustomerDTOSearch : SearchEntity diff --git a/zhengcaioa/DTO/ResultDataEntity.cs b/zhengcaioa/DTO/ResultDataEntity.cs index 1ba3969..09a8fdf 100644 --- a/zhengcaioa/DTO/ResultDataEntity.cs +++ b/zhengcaioa/DTO/ResultDataEntity.cs @@ -84,6 +84,10 @@ /// 鍚堣3 /// </summary> public decimal Heji3 { get; set; } + /// <summary> + /// 鍚堣4 + /// </summary> + public decimal Heji4 { get; set; } /// <summary> /// 褰撻〉鍚堣1 @@ -97,7 +101,10 @@ /// 褰撻〉鍚堣3 /// </summary> public decimal DangyeHeji3 { get; set; } - + /// <summary> + /// 褰撻〉鍚堣4 + /// </summary> + public decimal DangyeHeji4 { get; set; } /// <summary> /// 鏄庣粏鏁版嵁 diff --git a/zhengcaioa/Model/CooperatecustomCustomer.cs b/zhengcaioa/Model/CooperatecustomCustomer.cs index 4dfa563..aabdd4c 100644 --- a/zhengcaioa/Model/CooperatecustomCustomer.cs +++ b/zhengcaioa/Model/CooperatecustomCustomer.cs @@ -46,5 +46,8 @@ public string HuiyuanId { get; set; } public string Weixiner { get; set; } public DateTime? Weixintime { get; set; } + public decimal? Yufukuan { get; set; } + public decimal? Shouxinedu { get; set; } + public decimal? Shenyushouxin { get; set; } } } diff --git a/zhengcaioa/Model/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs index f569e87..4a839aa 100644 --- a/zhengcaioa/Model/zhengcaioaContext.cs +++ b/zhengcaioa/Model/zhengcaioaContext.cs @@ -2628,6 +2628,18 @@ .HasMaxLength(50) .HasColumnName("ywjl") .HasComment("涓氬姟缁忕悊"); + + entity.Property(e => e.Yufukuan) + .HasColumnType("money") + .HasColumnName("yufukuan"); + + entity.Property(e => e.Shouxinedu) + .HasColumnType("money") + .HasColumnName("shouxinedu"); + + entity.Property(e => e.Shenyushouxin) + .HasColumnType("money") + .HasColumnName("shenyushouxin"); }); modelBuilder.Entity<CusFangwenjilu>(entity => diff --git a/zhengcaioa/Services/CooperatecustomCustomerService.cs b/zhengcaioa/Services/CooperatecustomCustomerService.cs index 0f51554..da4db33 100644 --- a/zhengcaioa/Services/CooperatecustomCustomerService.cs +++ b/zhengcaioa/Services/CooperatecustomCustomerService.cs @@ -98,6 +98,7 @@ updateproject.Shifoutianjiaweixin = cooperatecustomCustomer.Shifoutianjiaweixin; updateproject.Weixintime = cooperatecustomCustomer.Weixintime; updateproject.Weixiner = cooperatecustomCustomer.Weixiner; + updateproject.Shouxinedu = cooperatecustomCustomer.Shouxinedu; } _context.SaveChanges(); @@ -168,7 +169,7 @@ DateTime.TryParse(Createtimes[1], out Createtimeend); Createtimeend = Createtimeend.AddDays(1); } - + var query = (from a in _context.CooperatecustomCustomers join b in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khly") @@ -193,12 +194,12 @@ from abi in esss.DefaultIfEmpty() - join i in _context.CooperOrders.Where(x => x.RecStatus == "A" && x.ChedanStatus !="A" ).GroupBy(q => new { q.Khdw }).Select(q => new + join i in _context.CooperOrders.Where(x => x.RecStatus == "A" && x.ChedanStatus != "A").GroupBy(q => new { q.Khdw }).Select(q => new { Khdw = q.Key.Khdw, Moneycount = q.Sum(i => i.Money), Ordercount = q.Count(), - } + } ) on a.Id equals i.Khdw into isss @@ -232,7 +233,7 @@ && (string.IsNullOrWhiteSpace(searchEntity.Sheng) || a.Sheng == searchEntity.Sheng.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.City) || a.City == searchEntity.City.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.AreaId) || a.AreaId == searchEntity.AreaId.Trim()) - && (string.IsNullOrWhiteSpace(searchEntity.Shifouweixin) || a.Shifoutianjiaweixin == searchEntity.Shifouweixin.Trim()) + && (string.IsNullOrWhiteSpace(searchEntity.Shifouweixin) || a.Shifoutianjiaweixin == searchEntity.Shifouweixin.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.HuiyuanId) || a.HuiyuanId == searchEntity.HuiyuanId.Trim()) select new CooperatecustomCustomerDTO @@ -245,7 +246,7 @@ Hyfl = a.Hyfl, Khlx = a.Khlx, Ywjl = a.Ywjl, - ShengName = fff.Name + "-" + ggg.Name+ "-" + hhh.Name, + ShengName = fff.Name + "-" + ggg.Name + "-" + hhh.Name, CityName = ggg.Name, AreaIdName = hhh.Name, KhlyName = bbb.Comments, @@ -259,6 +260,7 @@ Tel = a.Tel, Ordercount = iii.Ordercount.ToString(), Moneycount = iii.Moneycount.ToString(), + Moneycountde = iii.Moneycount, Phone = a.Phone, Qq = a.Qq, Email = a.Email, @@ -286,6 +288,12 @@ HuiyuanId = a.HuiyuanId, Weixiner = a.Weixiner, Weixintime = a.Weixintime, + Yufukuan = a.Yufukuan ?? 0, + Shouxinedu = a.Shouxinedu ?? 0, + Shenyushouxin = a.Shenyushouxin ?? 0, + YufukuanName = a.Yufukuan.HasValue ? a.Yufukuan.Value.ToString("f2") : "", + ShouxineduName = a.Shouxinedu.HasValue ? a.Shouxinedu.Value.ToString("f2") : "", + ShenyushouxinName = a.Shenyushouxin.HasValue ? a.Shenyushouxin.Value.ToString("f2") : "", } ).OrderByDescending(x => x.Modifytime).ToList(); @@ -293,7 +301,15 @@ //if (searchEntity.totalrows == 0) searchEntity.totalrows = query.Count(); + data.Heji1 = Math.Round(query.Sum(x => x.Yufukuan) ?? 0, 2); + data.Heji2 = Math.Round(query.Sum(x => x.Shouxinedu) ?? 0, 2); + data.Heji3 = Math.Round(query.Sum(x => x.Shenyushouxin) ?? 0, 2); + data.Heji4 = Math.Round(query.Sum(x => x.Moneycountde) ?? 0, 2); var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); + data.DangyeHeji1 = Math.Round(lianlist.Sum(x => x.Yufukuan) ?? 0, 2); + data.DangyeHeji2 = Math.Round(lianlist.Sum(x => x.Shouxinedu) ?? 0, 2); + data.DangyeHeji3 = Math.Round(lianlist.Sum(x => x.Shenyushouxin) ?? 0, 2); + data.DangyeHeji4 = Math.Round(lianlist.Sum(x => x.Moneycountde) ?? 0, 2); data.LoadData(searchEntity, lianlist); return data; } diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs index ec20280..301ad4d 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs @@ -79,7 +79,21 @@ ViewBag.Viscustomer = Viscustomer; - ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); return View(); } diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs index 8e30987..ab44c04 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs @@ -106,7 +106,21 @@ - ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); return View(); } @@ -137,8 +151,22 @@ cooperatecustomCustomerDTO.AreaId = "510107"; } - - var sheng = _projectService.Getsheng(); + + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + var sheng = areaDTOs; var shi = _projectService.Getshi(cooperatecustomCustomerDTO.Sheng); var quxian = _projectService.Getquxian(cooperatecustomCustomerDTO.City); var users = _userService.GetList().Where(x => x.IsYwjl == "A").ToList(); ; diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs index fa24320..9dfdbf6 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs @@ -141,7 +141,21 @@ ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); - ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); return View(); } @@ -296,7 +310,6 @@ //ViewBag.khlx = _liaotianService.GetSYScode("CooperatecustomCustomer", "khlx").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); //ViewBag.hyfl = _liaotianService.GetSYScode("CooperatecustomCustomer", "hyfl").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); - //ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); return View(); } @@ -355,7 +368,21 @@ } - var sheng = _projectService.Getsheng(); + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + var sheng = areaDTOs; var shi = _projectService.Getshi(intentionCustomerDTO.Sheng); var quxian = _projectService.Getquxian(intentionCustomerDTO.City); var users = _userService.GetList().Where(x => x.IsYwjl == "A").ToList(); ; @@ -386,9 +413,23 @@ intentionCustomerDTO = _intentionCustomerService.GetByName(name); - - var sheng = _projectService.Getsheng(); + + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + var sheng = areaDTOs; var shi = _projectService.Getshi(intentionCustomerDTO.Sheng); var quxian = _projectService.Getquxian(intentionCustomerDTO.City); var users = _userService.GetList().Where(x => x.IsYwjl == "A").ToList(); ; diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs index c0b5ec1..52729aa 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs @@ -85,7 +85,21 @@ ViewBag.Viscustomer = Viscustomer; ViewBag.IsYwjl = IsYwjl; - ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); return View(); } diff --git a/zhengcaioa/zhengcaioa/Controllers/Finance/FiOrderrecievemoneyController.cs b/zhengcaioa/zhengcaioa/Controllers/Finance/FiOrderrecievemoneyController.cs index ae887b2..6e84141 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Finance/FiOrderrecievemoneyController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Finance/FiOrderrecievemoneyController.cs @@ -32,9 +32,13 @@ private readonly IFiAccountService _fiAccountService; private readonly IFiAccountRecordService _iFiAccountRecordService; private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService; + private readonly IProjectService _projectService; + private readonly IUserService _userService; public FiOrderrecievemoneyController(ILogger<FiOrderrecievemoneyController> logger, ILiaotianService liaotianService, IFiOrderrecievemoneyService fiOrderrecievemoneyService, ICooperOrderService cooperOrderService, IFiSubjectService ifiSubjectService - , IFiAccountService fiAccountService, IFiAccountRecordService iFiAccountRecordService, ICooperatecustomCustomerService cooperatecustomCustomerService) + , IFiAccountService fiAccountService, IFiAccountRecordService iFiAccountRecordService, ICooperatecustomCustomerService cooperatecustomCustomerService + , IProjectService projectService + , IUserService userService) { _logger = logger; _liaotianService = liaotianService; @@ -44,8 +48,8 @@ _fiAccountService = fiAccountService; _iFiAccountRecordService = iFiAccountRecordService; _cooperatecustomCustomerService = cooperatecustomCustomerService; - - + _projectService = projectService; + _userService = userService; } public IActionResult Index() @@ -207,5 +211,49 @@ ViewData["curentuser"] = curentuser; return new JsonResult(_fiOrderrecievemoneyService.ModifyStatus(Id, curentuser.Id)); } + + + public IActionResult IndexCustomer() + { + 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.khlx = _liaotianService.GetSYScode("CooperatecustomCustomer", "khlx").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + ViewBag.khly = _liaotianService.GetSYScode("CooperatecustomCustomer", "khly").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + ViewBag.hyfl = _liaotianService.GetSYScode("CooperatecustomCustomer", "hyfl").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + ViewBag.users = _userService.GetList().Where(x => x.IsYwjl == "A").Select(x => new { code = x.Id, label = x.UserName }).ToList(); + + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); + + return View(); + + } } } diff --git a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs index c09f000..800b4cb 100644 --- a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs @@ -208,7 +208,21 @@ } var zhuanjia = _projectService.Getzhuanjie(); var cgfs = _projectService.GetCgfs(); - var sheng = _projectService.Getsheng(); + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + var sheng = areaDTOs; var shi = _projectService.Getshi(projectDTO.Sheng); var quxian = _projectService.Getquxian(projectDTO.City); @@ -300,7 +314,21 @@ ViewData["ActionInfo"] = actionlist; ViewBag.ProjectDropDown = _projectService.AllcgfsDropDown().Select(x => new { code = x.Value, label = x.Text }).ToList(); //ViewBag.flbx = _liaotianService.GetSYScode("Project", "flbx").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); - ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); ViewBag.Creater = _userService.GetList().Select(x => new { code = x.Id, label = x.UserName }).ToList(); ViewBag.flbx = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmPieceCheckController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmPieceCheckController.cs index d682322..2100a32 100644 --- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmPieceCheckController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmPieceCheckController.cs @@ -99,8 +99,32 @@ return View(); } + public IActionResult IndexCheck() + { + 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.PayType = _liaotianService.GetSYScode("CooperVisit", "jtype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + + ViewBag.DeptId = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList(); + + return View(); + + } + public IActionResult Edit(string id = null) { diff --git a/zhengcaioa/zhengcaioa/Views/AdmPieceCheck/IndexCheck.cshtml b/zhengcaioa/zhengcaioa/Views/AdmPieceCheck/IndexCheck.cshtml new file mode 100644 index 0000000..21d87a1 --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/AdmPieceCheck/IndexCheck.cshtml @@ -0,0 +1,109 @@ +锘緻{ + ViewBag.Title = "AdmPieceCheck"; + Layout = "~/Views/Shared/_Layout_Search.cshtml"; +} +@section headerStyle{ + <script type="text/javascript"> + @*var PayType = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.PayType))';*@ + + var DeptId = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.DeptId))'; + loseherght = 30; + dataCol = [ + { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, + + { + label: '宸ヤ綔鏃堕棿', name: 'WorkTimeName', labtype: 'txt', hidden: false, width: 100, + //formatter: function (cellvalue, options, rowObject) { + // return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/AdmPieceCheck/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>"; + //} + }, + + { label: '閮ㄩ棬', name: 'DeptName', labtype: 'txt', hidden: false, width: 100 }, + { label: '鍛樺伐濮撳悕', name: 'UserName', labtype: 'txt', hidden: false, width: 100 }, + + { label: '璁′欢绫诲埆', name: 'PayTypeName', labtype: 'txt', hidden: false, width: 100 }, + { label: '璁′欢椤圭洰', name: 'WorkProName', labtype: 'txt', hidden: false, width: 100 }, + + { label: '宸ヤ綔鍐呭', name: 'Remark', labtype: 'txt', hidden: false, width: 100 }, + { label: '缁╂晥鎻愭垚锛堝厓锛�', name: 'Gongzi', labtype: 'txt', hidden: false, width: 100 }, + { label: '鏁伴噺', name: 'Shuliang', labtype: 'txt', hidden: false, width: 100 }, + + ]; + dataUrl = "/AdmPieceCheck/GetList"; + searchCol = [ + { label: '宸ヤ綔鏃堕棿', name: 'WorkTime', labtype: 'datearea', hidden: false }, + //{ label: '绫诲埆', name: 'PayType', labtype: 'combox', hidden: false, data: JSON.parse(PayType), cwidth: '5%', cccwidth: '8%' }, + { label: '閮ㄩ棬', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(DeptId), cwidth: '5%', cccwidth: '8%' }, + { label: '濮撳悕', name: 'UserName', labtype: 'txt', hidden: false }, + + + + + + + + + ]; + var _pageAdd = function () { + OpenWindow("鏂板璁′欢鐧昏", "98%", "90%", "/AdmPieceCheck/Edit/"); + } + + var _afterLoadDataload = function (xhr) { + + //var rows = jQuery("#jqGrid").jqGrid("getRowData"), total_shouru = 0, total_zhuchu = 0, total_yue = 0; + //for (var i = 0, l = rows.length; i < l; i++) { + // total_shouru += (rows[i].AllIncome - 0); + // total_zhuchu += (rows[i].AllExpenses - 0); + // total_yue += (rows[i].Balance - 0); + //} + + jQuery("#jqGrid").jqGrid("footerData", "set", { Remark: "<font color='darkgoldenrod'>--褰撻〉鍚堣--</font> </br> <font color='darkgoldenrod'>--鍚堣--</font>", Gongzi: "<font color='darkgoldenrod'>" + xhr.DangyeHeji1 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji1 + "</font>", Shuliang: "<font color='darkgoldenrod'>" + xhr.DangyeHeji2 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji2 + "</font>"}); + + + + }; + + var _pagePrint = function () { + + var WorkTime = $("#PBSWorkTimestart").val() + '|' + $("#PBSWorkTimeend").val(); + var DeptId = $("#PBSDeptId").val(); + var UserName = $("#PBSUserName").val(); + + + + var url = "/AdmPieceCheck/printList?WorkTime=" + WorkTime + "&DeptId=" + DeptId + "&UserName=" + UserName; + var me = window.open(url, "鎵撳嵃"); //鎵撳紑鏂扮獥鍙� + + + } + + + 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"> + + + + + + </script> +} diff --git a/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml index 96be61d..36dfabd 100644 --- a/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml +++ b/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml @@ -337,6 +337,23 @@ } </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">鎺堜俊棰濆害</label> + <div class="col-sm-2 col-md-2" grouptype="Vdata"> + <input class="form-control" label="瀹㈡埛鍚嶇О" name="Shouxinedu" id="Shouxinedu" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@(Model.Shouxinedu.HasValue?Model.Shouxinedu.Value.ToString("f2"):"")" 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> diff --git a/zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/IndexCustomer.cshtml b/zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/IndexCustomer.cshtml new file mode 100644 index 0000000..dfc539f --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/IndexCustomer.cshtml @@ -0,0 +1,197 @@ +锘緻{ + ViewBag.Title = "CooperatecustomCustomer"; + Layout = "~/Views/Shared/_Layout_Search.cshtml"; +} +@section headerStyle{ + <script type="text/javascript"> + + var khlxs = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khlx))'; + var khlys = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khly))'; + var hyfls = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.hyfl))'; + var users = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.users))'; + var shengDropDown = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ShengDropDown))'; + var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))'; + + loseherght = 60; + //gridConfig = { multiselect: true, selectcol: "Id" }; + dataCol = [ + { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, + { label: '寤烘。鏃堕棿', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100 }, + { + label: '瀹㈡埛鍗曚綅', name: 'Name', labtype: 'txt', hidden: false, width: 400, + + }, + { label: '鑱旂郴鐢佃瘽', name: 'Tel', labtype: 'txt', hidden: false, width: 100 }, + { label: '鎵�灞炲尯鍩�', name: 'ShengName', labtype: 'txt', hidden: false, width: 100 }, + { label: '涓氬姟缁忕悊', name: 'YwjlName', labtype: 'txt', hidden: false, width: 100 }, + { label: '棰勪粯娆句綑棰�', name: 'YufukuanName', labtype: 'txt', hidden: false, width: 100 }, + { label: '鎺堜俊棰濆害', name: 'ShouxineduName', labtype: 'txt', hidden: false, width: 100 }, + { label: '宸蹭娇鐢ㄦ巿淇¢搴�', name: 'ShenyushouxinName', labtype: 'txt', hidden: false, width: 100 }, + //{ label: '璁㈠崟鏁伴噺', name: 'Ordercount', labtype: 'txt', hidden: false, width: 100 }, + { label: '璁㈠崟浜у��', name: 'Moneycount', labtype: 'txt', hidden: false, width: 100 }, + { + label: '瀛樻', name: 'Name111', labtype: 'txt', hidden: false, width: 100, + formatter: function (cellvalue, options, rowObject) { + return "<a onclick=\"OpenWindow('瀛樻','98%','100%', '/CooperVisit/Edit?id=&Viscustomer=" + rowObject.Id + "')\" >瀛樻</a>"; + } + }, + + ]; + dataUrl = "/CooperatecustomCustomer/GetList"; + searchCol = [ + + { label: '瀹㈡埛鏉ユ簮', name: 'Khly', labtype: 'combox', hidden: false, data: JSON.parse(khlys), cwidth: '5%', cccwidth: '8%' }, + { label: '琛屼笟鍒嗙被', name: 'Hyfl', labtype: 'combox', hidden: false, data: JSON.parse(hyfls), cwidth: '5%', cccwidth: '15%' }, + { label: '瀹㈡埛绫诲瀷', name: 'Khlx', labtype: 'combox', hidden: false, data: JSON.parse(khlxs), cwidth: '5%', cccwidth: '8%' }, + { label: '涓氬姟缁忕悊', name: 'Ywjl', labtype: 'combox', hidden: false, data: JSON.parse(users), cwidth: '5%', cccwidth: '8%' }, + + { label: '鐪�', name: 'Sheng', labtype: 'combox', hidden: false, data: JSON.parse(shengDropDown), cwidth: '5%', cccwidth: '8%' }, + { label: '甯�', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '1%', cccwidth: '8%' }, + { label: '鍖哄幙', name: 'AreaId', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '2%', cccwidth: '8%' }, + { label: '瀹㈡埛鍗曚綅', name: 'Name', labtype: 'txt', hidden: false }, + { label: '寤烘。鏃堕棿', name: 'Createtime', labtype: 'datearea', hidden: false }, + { label: '鏄惁鍔犲井淇�', name: 'Shifouweixin', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' }, + + ]; + + + + var _afterLoadDataload = function (xhr) { + //console.info(xhr); + //var rows = jQuery("#jqGrid").jqGrid("getRowData"), total_Xuefei = 0, total_Baomingrenshu = 0; + //for (var i = 0, l = rows.length; i < l; i++) { + // total_Xuefei += (rows[i].Xuefei - 0); + // total_Baomingrenshu += (rows[i].Baomingrenshu - 0); + //} + + jQuery("#jqGrid").jqGrid("footerData", "set", { YwjlName: "<font color='darkgoldenrod'>--褰撻〉鍚堣--</font> </br> <font color='darkgoldenrod'>--鍚堣--</font>", YufukuanName: "<font color='darkgoldenrod'>" + xhr.DangyeHeji1 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji1 + "</font>", ShouxineduName: "<font color='darkgoldenrod'>" + xhr.DangyeHeji2 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji2 + "</font>", ShenyushouxinName: "<font color='darkgoldenrod'>" + xhr.DangyeHeji3 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji3 + "</font>", Moneycount: "<font color='darkgoldenrod'>" + xhr.DangyeHeji4 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji4 + "</font>"}); + + + + }; + + + + + + + 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"> + + function send() { + + var msg = $("#PBSSheng"); + + + if (msg.length > 0) { + $("#PBSSheng").change(function () { + var sheng = $("#PBSSheng").val(); + $.ajax({ + type: "GET", + url: "/Project/getCity?shengid=" + sheng, + 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 () { + + + parent.layer.msg('澶辫触', { icon: 5 }); + } + }); + }); + + } else { + setTimeout(send, 1000); + } } + + + send(); + + + + function sendCity() { + + var msg = $("#PBSCity"); + + + if (msg.length > 0) { + $("#PBSCity").change(function () { + + var city = $("#PBSCity").val(); + $.ajax({ + type: "GET", + url: "/Project/getAreaId?cityid=" + city, + dataType: "json", + global: false, + data: "", + success: function (data) { + + var quxian = $("#PBSAreaId"); + quxian.find('option').remove(); + var aaa = '<option value="" hassubinfo="true"> </option>'; + quxian.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>'; + quxian.append(o); + } + } + $("#PBSAreaId").trigger('chosen:updated');//鏇存柊閫夐」 + }, + error: function () { + + + parent.layer.msg('澶辫触', { icon: 5 }); + } + }); + }); + + } else { + setTimeout(sendCity, 1000); + } + } + + + sendCity(); + + + + + </script> +} -- Gitblit v1.9.1