From 0235d2053a6132591604bf0a582ef6b0014f17d6 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 06 一月 2022 14:23:03 +0800
Subject: [PATCH] 客户预付款
---
zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
index 562766a..301ad4d 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
@@ -45,7 +45,7 @@
_cusFangwenjiluService = cusFangwenjiluService;
}
- public IActionResult Index()
+ public IActionResult Index(string Viscustomer = "")
{
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ViewData["curentuser"] = curentuser;
@@ -77,9 +77,23 @@
ViewBag.users = _userService.GetList().Where(x => x.IsYwjl == "A").Select(x => new { code = x.Id, label = x.UserName }).ToList();
+ 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();
}
@@ -90,7 +104,7 @@
return new JsonResult(_cooperVisitService.SearchByPaging(search));
}
- public IActionResult Edit(string id = null)
+ public IActionResult Edit(string id = null, string Viscustomer = null)
{
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ViewData["curentuser"] = curentuser;
@@ -103,6 +117,7 @@
}
else
{
+ dto.Viscustomer = Viscustomer;
dto.Vistime = DateTime.Now;
}
@@ -181,7 +196,6 @@
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ViewData["curentuser"] = curentuser;
List<CooperatecustomCustomerDTO> result = new List<CooperatecustomCustomerDTO>();
-
if (baifangid != null)
{
result = _cooperVisitService.GetList(baifangid.Split(","));
@@ -211,7 +225,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;
@@ -221,7 +235,7 @@
CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
dto.Fasongfangshi = "01";
dto.Fasongneirong = neirong;
- dto.Jieshouren = baifangid;
+ dto.Jieshouren = baifangid.Length>2000? baifangid.Substring(0,2000): baifangid;
dto.RecStatus = "A";
dto.Creater = curentuser.Id;
dto.Modifytime = DateTime.Now;
@@ -300,7 +314,7 @@
CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
dto.Fasongfangshi = "02";
dto.Fasongneirong = neirong;
- dto.Jieshouren = baifangid;
+ dto.Jieshouren = baifangid.Length > 2000 ? baifangid.Substring(0, 2000) : baifangid; ;
dto.RecStatus = "A";
dto.Creater = curentuser.Id;
dto.Modifytime = DateTime.Now;
--
Gitblit v1.9.1