From 439f10462e6b1ab0ebd454f53c2156c6fab24266 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期一, 14 十一月 2022 11:12:46 +0800 Subject: [PATCH] 抓取的项目, 已确认,未确认 未确认为橙色 客户档案管理 有无手机号,未确认为橙色 客户资料页面查看访问记录 --- zhengcaioa/Services/ProjectService.cs | 15 +++ zhengcaioa/DTO/ProjectDTO.cs | 1 zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml | 62 +++++++++++++++ zhengcaioa/DTO/CooperVisitDTO.cs | 1 zhengcaioa/DTO/IntentionCustomerDTO.cs | 2 zhengcaioa/Services/CooperVisitService.cs | 13 ++- zhengcaioa/Services/IntentionCustomerService.cs | 13 +++ zhengcaioa/zhengcaioa/Views/Project/Select.cshtml | 5 + zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs | 17 +++ zhengcaioa/zhengcaioa/Views/IntentionCustomer/Edit.cshtml | 61 ++++++++++++++ zhengcaioa/zhengcaioa/Views/IntentionCustomer/Index.cshtml | 10 + zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs | 14 +++ 12 files changed, 197 insertions(+), 17 deletions(-) diff --git a/zhengcaioa/DTO/CooperVisitDTO.cs b/zhengcaioa/DTO/CooperVisitDTO.cs index a5c1d63..bd060a3 100644 --- a/zhengcaioa/DTO/CooperVisitDTO.cs +++ b/zhengcaioa/DTO/CooperVisitDTO.cs @@ -27,6 +27,7 @@ public string JyName { 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; } diff --git a/zhengcaioa/DTO/IntentionCustomerDTO.cs b/zhengcaioa/DTO/IntentionCustomerDTO.cs index f28a160..40c2464 100644 --- a/zhengcaioa/DTO/IntentionCustomerDTO.cs +++ b/zhengcaioa/DTO/IntentionCustomerDTO.cs @@ -88,5 +88,7 @@ public string Shifouweixin { get; set; } + public string ShifouDianhua { get; set; } + } } diff --git a/zhengcaioa/DTO/ProjectDTO.cs b/zhengcaioa/DTO/ProjectDTO.cs index 2d1d04c..a468957 100644 --- a/zhengcaioa/DTO/ProjectDTO.cs +++ b/zhengcaioa/DTO/ProjectDTO.cs @@ -188,6 +188,7 @@ public string Baojiachaxiaoyu { get; set; } public string Chuanbiaofenxi { get; set; } + public string Shifouqueren { get; set; } } } diff --git a/zhengcaioa/Services/CooperVisitService.cs b/zhengcaioa/Services/CooperVisitService.cs index 27ccb94..d5c2448 100644 --- a/zhengcaioa/Services/CooperVisitService.cs +++ b/zhengcaioa/Services/CooperVisitService.cs @@ -156,12 +156,15 @@ join zz in _context.CooperatecustomCustomers on a.Viscustomer equals zz.Id - - //join g in _context.Areas on zz.Sheng equals g.CodeId - //join h in _context.Areas on zz.City equals h.CodeId - //join i in _context.Areas on zz.AreaId equals i.CodeId + //join g in _context.Areas on zz.Sheng equals g.CodeId + //join h in _context.Areas on zz.City equals h.CodeId + //join i in _context.Areas on zz.AreaId equals i.CodeId + join zzz in _context.PltUsers.Where(x => x.RecStatus == "A") + on a.Creater equals zzz.Id + into zsssss + from zzzzz in zsssss.DefaultIfEmpty() where a.RecStatus == "A" @@ -198,7 +201,7 @@ Jy = a.Jy, Creater = a.Creater, Createtime = a.Createtime, - + CreaterName = zzzzz.UserName, RecStatus = a.RecStatus, Modifier = a.Modifier, Modifytime = a.Modifytime, diff --git a/zhengcaioa/Services/IntentionCustomerService.cs b/zhengcaioa/Services/IntentionCustomerService.cs index e7486d1..44f86b8 100644 --- a/zhengcaioa/Services/IntentionCustomerService.cs +++ b/zhengcaioa/Services/IntentionCustomerService.cs @@ -302,6 +302,19 @@ { query = query.Where( a=>a.Shifoutianjiaweixin == searchEntity.Shifouweixin.Trim()).ToList(); } + if (!string.IsNullOrWhiteSpace(searchEntity.ShifouDianhua)) + { + if (searchEntity.ShifouDianhua != "A") + { + query = query.Where(a => a.Tel == null || a.Tel == "").ToList(); + } + else + { + query = query.Where(a => a.Tel != null && a.Tel != "").ToList(); + } + + } + //if (searchEntity.totalrows == 0) searchEntity.totalrows = query.Count(); diff --git a/zhengcaioa/Services/ProjectService.cs b/zhengcaioa/Services/ProjectService.cs index 528eff1..02ce881 100644 --- a/zhengcaioa/Services/ProjectService.cs +++ b/zhengcaioa/Services/ProjectService.cs @@ -99,6 +99,7 @@ if (updateproject.Creater == "111") { updateproject.Creater = project.Modifier; + updateproject.Createtime = project.Modifytime; } } @@ -468,6 +469,20 @@ } + if (!string.IsNullOrWhiteSpace(searchEntity.Shifouqueren)) + { + if (searchEntity.Shifouqueren == "A") + { + sql.Append(" and a.creater != '111' "); + } + else + { + sql.Append(" and a.creater = '111' "); + } + + + } + DateTime StartTimestarstart = DateTime.Now; DateTime StartTimestarend = DateTime.Now; diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs index 17ca06c..abc77a8 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs @@ -30,11 +30,12 @@ private readonly IHrDeptService _hrDeptService; private readonly ISysAttachmentService _sysAttachmentService; private readonly IPltPageService _pltPageService; - + private readonly ICooperVisitService _cooperVisitService; public CooperatecustomCustomerController(ILogger<CooperatecustomCustomerController> logger, IProjectService projectService, ILiaotianService liaotianService, ICooperatecustomCustomerService cooperatecustomCustomerService, IUserService userService, IHrDeptService hrDeptService , ISysAttachmentService sysAttachmentService - , IPltPageService pltPageService) + , IPltPageService pltPageService + , ICooperVisitService cooperVisitService) { _logger = logger; _projectService = projectService; @@ -44,6 +45,7 @@ _hrDeptService = hrDeptService; _sysAttachmentService = sysAttachmentService; _pltPageService = pltPageService; + _cooperVisitService = cooperVisitService; } public IActionResult Index() @@ -183,6 +185,13 @@ { cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(id); + + CooperVisitDTOSearch searchEntity = new CooperVisitDTOSearch(); + searchEntity.page = 1; + searchEntity.rows = 1000; + searchEntity.Viscustomer = id; + var resultDataEntity = _cooperVisitService.SearchByPaging(searchEntity); + ViewData["visitlishi"] = resultDataEntity.DataList; } else { @@ -191,7 +200,9 @@ cooperatecustomCustomerDTO.Sheng = "510000"; cooperatecustomCustomerDTO.City = "510100"; cooperatecustomCustomerDTO.AreaId = "510107"; - + + ViewData["visitlishi"] = new List<CooperVisitDTO>(); + } var areaDTOs = _projectService.Getsheng().ToList(); diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs index 7a262a2..dc80ff0 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs @@ -36,10 +36,11 @@ private readonly IMapper _mapper; private readonly IHrDeptService _hrDeptService; private readonly IPltPageService _pltPageService; - + private readonly IIntentionVisitService _intentionVisitService; public IntentionCustomerController(ILogger<IntentionCustomerController> logger, IProjectService projectService, ILiaotianService liaotianService, IIntentionCustomerService intentionCustomerService, IUserService userService - , ICooperatecustomCustomerService cooperatecustomCustomerService, IMapper mapper, IHrDeptService hrDeptService, IPltPageService pltPageService) + , ICooperatecustomCustomerService cooperatecustomCustomerService, IMapper mapper, IHrDeptService hrDeptService, IPltPageService pltPageService + , IIntentionVisitService intentionVisitService) { _logger = logger; _projectService = projectService; @@ -50,6 +51,7 @@ _mapper = mapper; _hrDeptService = hrDeptService; _pltPageService = pltPageService; + _intentionVisitService = intentionVisitService; } public IActionResult Index() @@ -394,6 +396,12 @@ { intentionCustomerDTO = _intentionCustomerService.Get(id); + IntentionVisitDTOSearch searchEntity = new IntentionVisitDTOSearch(); + searchEntity.page = 1; + searchEntity.rows = 1000; + searchEntity.Viscustomer = id; + var resultDataEntity = _intentionVisitService.SearchByPaging(searchEntity); + ViewData["visitlishi"] = resultDataEntity.DataList; } else { @@ -404,6 +412,8 @@ intentionCustomerDTO.AreaId = "510107"; intentionCustomerDTO.Name = namecus; + ViewData["visitlishi"] = new List<IntentionVisitDTO>(); + } var areaDTOs = _projectService.Getsheng().ToList(); diff --git a/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml index dbeab5c..2c915c8 100644 --- a/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml +++ b/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml @@ -12,6 +12,8 @@ List<SysCodeDtl> hyfl = ViewData["hyfl"] as List<SysCodeDtl>; //琛屼笟鍒嗙被 List<HrDeptDTO> DeptId = ViewData["DeptId"] as List<HrDeptDTO>; //閮ㄩ棬 + List<CooperVisitDTO> visitlishi = ViewData["visitlishi"] as List<CooperVisitDTO>; //鍚堜綔瀹㈡埛 + ResultDataEntity<SysAttachmentDTO> yinyezhizhao = ViewBag.yinyezhizhao as ResultDataEntity<SysAttachmentDTO>; //钀ヤ笟鎵х収 List<SysAttachmentDTO> yinyezhizhaosssss = new List<SysAttachmentDTO>(); @@ -83,6 +85,19 @@ .col-md-1.control-label { padding-right: 0px; font-weight: 400; + } + + table { + border-collapse: collapse; + border: none; + width: 900px; + margin-left: 0px; + text-align: center; + } + + td { + border: solid #000000 1px; + height: 30px; } </style> @@ -361,7 +376,7 @@ <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})?/)"> + <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> @@ -529,6 +544,51 @@ } </div> + + + <div class="clearfix layer-area" style="padding-bottom:15px;"> + @if (visitlishi.Count > 0) + { + <table class="col-sm-12 col-md-12"> + @{ + int i = 1; + } + <tr> + <td style="width:4%;"> 缂栧彿</td> + <td style="width:7%;"> 鎷滆鏃堕棿</td> + + <td style="width:14%;"> 瀹㈡埛鍗曚綅</td> + <td style="width:7%;"> 鎷滆鏂瑰紡</td> + <td style="width:7%;"> 鎺ュ緟浜�</td> + <td style="width:7%;"> 鑱屽姟</td> + <td style="width:14%;"> 浜よ皥绫诲</td> + <td style="width:14%;"> 瀹㈡埛鍙嶉</td> + <td style="width:7%;"> 鎴愪氦鎰忓悜</td> + <td style="width:7%;"> 璺熻釜寤鸿</td> + <td style="width:7%;"> 璁块棶浜�</td> + </tr> + @foreach (var visitDTO in visitlishi) + { + <tr> + <td> @i</td> + <td> @visitDTO.VistimeName</td> + <td> @visitDTO.Name</td> + <td> @visitDTO.VisTypeName</td> + <td> @visitDTO.Jdr</td> + <td> @visitDTO.ZwName</td> + <td> @visitDTO.Talk</td> + <td> @visitDTO.Khfk</td> + <td> @visitDTO.YxName</td> + <td> @visitDTO.JyName</td> + <td> @visitDTO.CreaterName</td> + </tr> + + i++; + } + </table> + } + </div> + </div> </div> </div> diff --git a/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Edit.cshtml index d5ac17c..28eb990 100644 --- a/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Edit.cshtml +++ b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Edit.cshtml @@ -14,8 +14,8 @@ List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>; - - //string[] arrJobLevel = (Model.Zhuanjia ?? "").Split(','); + List<IntentionVisitDTO> visitlishi = ViewData["visitlishi"] as List<IntentionVisitDTO>; //鎰忓悜瀹㈡埛 + //string[] arrJobLevel = (Model.Zhuanjia ?? "").Split(','); } @{ @@ -68,6 +68,18 @@ .col-md-1.control-label { padding-right: 0px; font-weight: 400; + } + table { + border-collapse: collapse; + border: none; + width: 900px; + margin-left: 0px; + text-align: center; + } + + td { + border: solid #000000 1px; + height: 30px; } </style> @@ -447,6 +459,51 @@ <textarea class="form-control bt" id="Remark" name="Remark" title="澶囨敞" isempty="" maxlength="4000" length="long">@Model.Remark</textarea> </div> </div> + + <div class="clearfix layer-area" style="padding-bottom:15px;"> + @if (visitlishi.Count > 0) + { + <table class="col-sm-12 col-md-12"> + @{ + int i = 1; + } + <tr> + <td style="width:4%;"> 缂栧彿</td> + <td style="width:7%;"> 鎷滆鏃堕棿</td> + + <td style="width:14%;"> 瀹㈡埛鍗曚綅</td> + <td style="width:7%;"> 鎷滆鏂瑰紡</td> + <td style="width:7%;"> 鎺ュ緟浜�</td> + <td style="width:7%;"> 鑱屽姟</td> + <td style="width:14%;"> 浜よ皥绫诲</td> + <td style="width:14%;"> 瀹㈡埛鍙嶉</td> + <td style="width:7%;"> 鎴愪氦鎰忓悜</td> + <td style="width:7%;"> 璺熻釜寤鸿</td> + <td style="width:7%;"> 璁块棶浜�</td> + </tr> + @foreach (var visitDTO in visitlishi) + { + <tr> + <td> @i</td> + <td> @visitDTO.VistimeName</td> + <td> @visitDTO.Name</td> + <td> @visitDTO.VisTypeName</td> + <td> @visitDTO.Jdr</td> + <td> @visitDTO.ZwName</td> + <td> @visitDTO.Talk</td> + <td> @visitDTO.Khfk</td> + <td> @visitDTO.YxName</td> + <td> @visitDTO.JyName</td> + <td> @visitDTO.CreaterName</td> + </tr> + + i++; + } + </table> + } + </div> + + </div> </div> </div> diff --git a/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Index.cshtml b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Index.cshtml index 960ce94..6da8283 100644 --- a/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Index.cshtml +++ b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Index.cshtml @@ -28,7 +28,11 @@ { label: '瀹㈡埛鍗曚綅', name: 'Name', labtype: 'txt', hidden: false, width: 400, formatter: function (cellvalue, options, rowObject) { - return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/IntentionCustomer/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>"; + var color = ""; + if (rowObject.Tel == null || rowObject.Tel == '') { + color = "orange"; + } + return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/IntentionCustomer/Edit?id=" + rowObject.Id + "')\" ><span style='color:" + color + ";'>" + cellvalue + "</span></a>"; } }, @@ -60,8 +64,8 @@ { label: '寤烘。鏃堕棿', name: 'Createtime', labtype: 'datearea', hidden: false }, { label: '褰曞叆浜�', name: 'Creater', labtype: 'combox', hidden: false, data: JSON.parse(Creater), cwidth: '5%', cccwidth: '8%' }, { label: '鏄惁鍔犲井淇�', name: 'Shifouweixin', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' }, - - + { label: '鏄惁褰曞叆鐢佃瘽', name: 'ShifouDianhua', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' }, + ]; var _pageAdd = function () { diff --git a/zhengcaioa/zhengcaioa/Views/Project/Select.cshtml b/zhengcaioa/zhengcaioa/Views/Project/Select.cshtml index 0cdf0e0..424536a 100644 --- a/zhengcaioa/zhengcaioa/Views/Project/Select.cshtml +++ b/zhengcaioa/zhengcaioa/Views/Project/Select.cshtml @@ -36,6 +36,9 @@ if (rowObject.Fblx != null && rowObject.Fblx != '') { color = "red"; } + if (rowObject.Creater != null && rowObject.Creater == '111') { + color = "orange"; + } return "<a onclick=\"OpenWindow('" + cellvalue + "','98%','100%', '/Project/Add?id=" + rowObject.Id + "')\" ><span style='color:" + color + ";'>" + cellvalue + "</span></a>"; } @@ -143,7 +146,7 @@ { label: '鍒嗗樊澶т簬', name: 'Fenchadayu', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ }, { label: '渚涘簲鍟嗘暟閲�', name: 'Shuliang', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ }, //{ label: '浠峰樊灏忎簬', name: 'Baojiachaxiaoyu', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ }, - + { label: '鏄惁纭', name: 'Shifouqueren', labtype: 'combox', hidden: false, data: JSON.parse(flbx) }, ]; -- Gitblit v1.9.1