zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -312,6 +312,9 @@ CreateMap<TComplaintShouquandaibiao, TComplaintShouquandaibiaoDTO>(); CreateMap<TComplaintShouquandaibiaoDTO, TComplaintShouquandaibiao>(); CreateMap<FiCustomerrecievemoney, FiCustomerrecievemoneyDTO>(); CreateMap<FiCustomerrecievemoneyDTO, FiCustomerrecievemoney>(); } } } zhengcaioa/DTO/FiCustomerrecievemoneyDTO.cs
New file @@ -0,0 +1,43 @@ using System; using System.Collections.Generic; using System.Text; namespace DTO { public class FiCustomerrecievemoneyDTO { public string Id { get; set; } public string CustomerId { get; set; } public string CustomerName { get; set; } public decimal Yufukuan { get; set; } public string PayType { get; set; } public string PayTypeName { get; set; } public string SubjectId { get; set; } public string SubjectName { get; set; } public string AccountId { get; set; } public string AccountName { get; set; } public string RecordTypeId { get; set; } public decimal? Recievemoney { get; set; } public string RecievemoneyName { get; set; } public DateTime PayTime { get; set; } public string PayTimeName { get; set; } public string Remark { get; set; } public string RecStatus { get; set; } public string Creater { get; set; } public string CreaterName { get; set; } public DateTime Createtime { get; set; } public string CreatetimeName { get; set; } public string Modifier { get; set; } public DateTime Modifytime { get; set; } } public class FiCustomerrecievemoneyDTOSearch : SearchEntity { public string PayTime { get; set; } public decimal? Recievemoney { get; set; } public string CustomerId { get; set; } } } zhengcaioa/DTO/OrderBanciOrderDTO.cs
@@ -26,6 +26,7 @@ public DateTime Modifytime { get; set; } public string Shenfenzheng { get; set; } public string OrderId { get; set; } } public class OrderBanciOrderDTOSearch : SearchEntity zhengcaioa/IServices/ICooperatecustomCustomerService.cs
@@ -24,5 +24,8 @@ List<CooperatecustomCustomerDTO> GetListsalaryqiandan(string userid, DateTime datemin, DateTime datemax); List<CooperatecustomCustomerDTO> GetListsalaryweixin(string userid, DateTime datemin, DateTime datemax); ResultEntity saveyufukuan(CooperatecustomCustomerDTO cooperatecustomCustomerDTO); } } zhengcaioa/IServices/IFiCustomerrecievemoneyService.cs
New file @@ -0,0 +1,22 @@ using DTO; using Microsoft.AspNetCore.Mvc.Rendering; using System; using System.Collections.Generic; using System.Text; using zhengcaioa.Models; namespace IServices { public interface IFiCustomerrecievemoneyService { ResultEntity save(FiCustomerrecievemoneyDTO dto); FiCustomerrecievemoneyDTO Get(string id); ResultDataEntity<FiCustomerrecievemoneyDTO> SearchByPaging(FiCustomerrecievemoneyDTOSearch searchEntity); ResultEntity ModifyStatus(string id, string userid); List<FiCustomerrecievemoneyDTO> GetList(string customerid = ""); } } zhengcaioa/IServices/IOrderBanciOrderService.cs
@@ -17,5 +17,7 @@ ResultEntity ModifyStatus(string id, string userid); List<OrderBanciOrderDTO> GetList(string[] id); ResultEntity DeleteStatus(string OrderId); } } zhengcaioa/Model/FiCustomerrecievemoney.cs
New file @@ -0,0 +1,25 @@ using System; using System.Collections.Generic; #nullable disable namespace zhengcaioa.Models { public partial class FiCustomerrecievemoney { public string Id { get; set; } public string CustomerId { get; set; } public string PayType { get; set; } public string SubjectId { get; set; } public string AccountId { get; set; } public string RecordTypeId { get; set; } public decimal? Recievemoney { get; set; } public DateTime PayTime { get; set; } public string Remark { get; set; } public string RecStatus { get; set; } public string Creater { get; set; } public DateTime Createtime { get; set; } public string Modifier { get; set; } public DateTime Modifytime { get; set; } } } zhengcaioa/Model/OrderBanciOrder.cs
@@ -25,5 +25,6 @@ public string Modifier { get; set; } public DateTime Modifytime { get; set; } public string Shenfenzheng { get; set; } public string OrderId { get; set; } } } zhengcaioa/Model/zhengcaioaContext.cs
@@ -62,6 +62,7 @@ public virtual DbSet<CusFangwenjilu> CusFangwenjilus { get; set; } public virtual DbSet<FiAccount> FiAccounts { get; set; } public virtual DbSet<FiAccountRecord> FiAccountRecords { get; set; } public virtual DbSet<FiCustomerrecievemoney> FiCustomerrecievemoneys { get; set; } public virtual DbSet<FiOrderrecievemoney> FiOrderrecievemoneys { get; set; } public virtual DbSet<FiPiecerate> FiPiecerates { get; set; } public virtual DbSet<FiSubject> FiSubjects { get; set; } @@ -2818,6 +2819,72 @@ entity.Property(e => e.SubjectId).HasMaxLength(50); }); modelBuilder.Entity<FiCustomerrecievemoney>(entity => { entity.ToTable("fi_Customerrecievemoney"); entity.Property(e => e.Id).HasMaxLength(50); entity.Property(e => e.AccountId).HasMaxLength(50); entity.Property(e => e.Creater) .IsRequired() .HasMaxLength(50) .HasColumnName("creater") .HasDefaultValueSql("('1')"); entity.Property(e => e.Createtime) .HasColumnType("datetime") .HasColumnName("createtime") .HasDefaultValueSql("(getdate())"); entity.Property(e => e.CustomerId) .HasMaxLength(50) .HasComment("客户id"); entity.Property(e => e.Modifier) .IsRequired() .HasMaxLength(50) .HasColumnName("modifier") .HasDefaultValueSql("('1')"); entity.Property(e => e.Modifytime) .HasColumnType("datetime") .HasColumnName("modifytime") .HasDefaultValueSql("(getdate())"); entity.Property(e => e.PayTime) .HasColumnType("datetime") .HasColumnName("pay_time") .HasDefaultValueSql("(getdate())") .HasComment("收款日期"); entity.Property(e => e.PayType) .HasMaxLength(50) .HasColumnName("pay_type") .HasComment("收款方式"); entity.Property(e => e.RecStatus) .IsRequired() .HasMaxLength(1) .HasColumnName("rec_status") .HasDefaultValueSql("('A')"); entity.Property(e => e.Recievemoney) .HasColumnType("numeric(18, 2)") .HasColumnName("recievemoney") .HasComment("收款金额"); entity.Property(e => e.RecordTypeId).HasMaxLength(50); entity.Property(e => e.Remark) .HasMaxLength(4000) .HasColumnName("remark") .HasComment("收款备注"); entity.Property(e => e.SubjectId).HasMaxLength(50); }); modelBuilder.Entity<FiOrderrecievemoney>(entity => { entity.ToTable("fi_Orderrecievemoney"); @@ -4642,6 +4709,10 @@ .HasMaxLength(100) .HasColumnName("person_id"); entity.Property(e => e.OrderId) .HasMaxLength(100) .HasColumnName("order_id"); entity.Property(e => e.RecStatus) .IsRequired() .HasMaxLength(1) zhengcaioa/Services/CooperatecustomCustomerService.cs
@@ -114,6 +114,39 @@ return resultEntity; } public ResultEntity saveyufukuan(CooperatecustomCustomerDTO cooperatecustomCustomerDTO) { ResultEntity resultEntity = new ResultEntity(); try { var cooperatecustomCustomer = _mapper.Map<CooperatecustomCustomer>(cooperatecustomCustomerDTO); var updateproject = _context.CooperatecustomCustomers.Find(cooperatecustomCustomer.Id); updateproject.Yufukuan = cooperatecustomCustomer.Yufukuan; updateproject.Shenyushouxin = cooperatecustomCustomer.Shenyushouxin; updateproject.Shouxinedu = cooperatecustomCustomer.Shouxinedu; _context.SaveChanges(); resultEntity.ReturnID = cooperatecustomCustomer.Id; resultEntity.Result = true; } catch (Exception ex) { resultEntity.Result = false; resultEntity.Message = "保存失败,请联系管理员"; } return resultEntity; } public CooperatecustomCustomerDTO Get(string id) { zhengcaioa/Services/FiCustomerrecievemoneyService.cs
New file @@ -0,0 +1,252 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using AutoMapper; using DTO; using IServices; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.EntityFrameworkCore; using zhengcaioa.Models; namespace Services { public class FiCustomerrecievemoneyService: IFiCustomerrecievemoneyService { private readonly zhengcaioaContext _context; private readonly IMapper _mapper; public FiCustomerrecievemoneyService(zhengcaioaContext context, IMapper mapper) { _context = context; _mapper = mapper; } public ResultEntity save(FiCustomerrecievemoneyDTO dto) { ResultEntity resultEntity = new ResultEntity(); try { var entity = _mapper.Map<FiCustomerrecievemoney>(dto); if (String.IsNullOrEmpty(entity.Id)) { entity.Id = Guid.NewGuid().ToString(); _context.FiCustomerrecievemoneys.Add(entity); } else { var updateproject = _context.FiCustomerrecievemoneys.Find(entity.Id); updateproject.CustomerId = entity.CustomerId; updateproject.Recievemoney = entity.Recievemoney; updateproject.PayType = entity.PayType; updateproject.AccountId = entity.AccountId; updateproject.SubjectId = entity.SubjectId; updateproject.RecordTypeId = entity.RecordTypeId; updateproject.PayTime = entity.PayTime; updateproject.Remark = entity.Remark; updateproject.RecStatus = entity.RecStatus; updateproject.Modifier = entity.Modifier; updateproject.Modifytime = entity.Modifytime; } _context.SaveChanges(); resultEntity.ReturnID = entity.Id; resultEntity.Result = true; } catch (Exception ex) { resultEntity.Result = false; resultEntity.Message = "保存失败,请联系管理员"; } return resultEntity; } public FiCustomerrecievemoneyDTO Get(string id) { var entity = _context.FiCustomerrecievemoneys.Find(id); if (entity.RecStatus != "A") { entity = new FiCustomerrecievemoney(); } var result = _mapper.Map<FiCustomerrecievemoneyDTO>(entity); return result; } public ResultDataEntity<FiCustomerrecievemoneyDTO> SearchByPaging(FiCustomerrecievemoneyDTOSearch searchEntity) { ResultDataEntity<FiCustomerrecievemoneyDTO> data = new ResultDataEntity<FiCustomerrecievemoneyDTO>(); List<FiCustomerrecievemoneyDTO> list = new List<FiCustomerrecievemoneyDTO>(); 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 PayTimestart = DateTime.Now; DateTime PayTimeend = DateTime.Now; if (!string.IsNullOrWhiteSpace(searchEntity.PayTime)) { string[] PayTimes = searchEntity.PayTime.Split("|"); DateTime.TryParse(PayTimes[0], out PayTimestart); DateTime.TryParse(PayTimes[1], out PayTimeend); PayTimeend = PayTimeend.AddDays(1); } ///FiCustomerrecievemoneys var query = (from a in _context.FiCustomerrecievemoneys join l in _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A") on a.CustomerId equals l.Id into lsss from lll in lsss.DefaultIfEmpty() join e in listCode.Where(x => x.CodeTable == "fi_account" && x.CodeField == "accounttype") on a.PayType equals e.CodeSn into esssss from eee in esssss.DefaultIfEmpty() join g in _context.FiAccounts on a.AccountId equals g.Id into gsss from ggg in gsss.DefaultIfEmpty() join h in _context.FiSubjects on a.SubjectId equals h.Id into hsss from hhh in hsss.DefaultIfEmpty() join i in _context.PltUsers on a.Creater equals i.Id into isss from iii in isss.DefaultIfEmpty() where a.RecStatus == "A" && (string.IsNullOrWhiteSpace(searchEntity.PayTime) || (a.Createtime >= PayTimestart && a.Createtime <= PayTimeend)) && (!searchEntity.Recievemoney.HasValue || a.Recievemoney == searchEntity.Recievemoney) && (string.IsNullOrWhiteSpace(searchEntity.CustomerId) || (a.CustomerId == searchEntity.CustomerId)) select new FiCustomerrecievemoneyDTO { Id = a.Id, CustomerId = a.CustomerId, CustomerName = lll.Name, PayType = a.PayType, PayTypeName = eee.Comments, SubjectId = a.SubjectId, SubjectName = hhh.Subjectname, AccountId = a.AccountId, AccountName = ggg.Accountname, Recievemoney = a.Recievemoney, RecievemoneyName = a.Recievemoney.HasValue?a.Recievemoney.Value.ToString("f2"):"0", Remark = a.Remark, Creater = a.Creater, CreaterName = iii.UserName, Createtime = a.Createtime, CreatetimeName = a.Createtime.ToString("yyyy-MM-dd HH:mm:ss"), RecStatus = a.RecStatus, Modifier = a.Modifier, Modifytime = a.Modifytime, } ).OrderByDescending(x => x.Createtime).ToList(); //if (searchEntity.totalrows == 0) searchEntity.totalrows = query.Count(); data.Heji1 = Math.Round(query.Sum(x => x.Recievemoney) ?? 0, 2); var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); data.DangyeHeji1 = Math.Round(lianlist.Sum(x => x.Recievemoney) ?? 0, 2); data.LoadData(searchEntity, lianlist); return data; } /// <summary> /// 修改主表状态 /// </summary> /// <param name="id">主id</param> /// <param name="userid">用户</param> /// <returns></returns> public ResultEntity ModifyStatus(string id, string userid) { ResultEntity result = new ResultEntity(); result.Result = true; var model = _context.FiCustomerrecievemoneys.Find(id); if (model != null) { model.RecStatus = "D"; model.Modifier = userid; model.Modifytime = DateTime.Now; _context.SaveChanges(); } return result; } public List<FiCustomerrecievemoneyDTO> GetList(string customerid = "") { var entity = _context.FiCustomerrecievemoneys.Where(x => x.CustomerId == customerid && x.RecStatus == "A"); var result = _mapper.Map<List<FiCustomerrecievemoneyDTO>>(entity); return result; } } } zhengcaioa/Services/OrderBanciOrderService.cs
@@ -59,6 +59,7 @@ updateproject.Modifier = entity.Modifier; updateproject.Modifytime = entity.Modifytime; updateproject.Shenfenzheng = entity.Shenfenzheng; updateproject.OrderId = entity.OrderId; } _context.SaveChanges(); @@ -251,5 +252,33 @@ return result; } /// <summary> /// 修改主表状态 /// </summary> /// <param name="id">主id</param> /// <param name="userid">用户</param> /// <returns></returns> public ResultEntity DeleteStatus(string OrderId) { ResultEntity result = new ResultEntity(); result.Result = true; if (string.IsNullOrEmpty(OrderId)) { result.Result = false; result.Message = "必须填写订单id"; } var model = _context.OrderBanciOrders.Where(x=>x.OrderId == OrderId).FirstOrDefault(); if (model != null) { model.RecStatus = "D"; model.Modifier = "1"; model.Modifytime = DateTime.Now; _context.SaveChanges(); } return result; } } } zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs
@@ -388,5 +388,45 @@ return new JsonResult(returnMsg); } /// <summary> /// 保存 /// </summary> /// <param name="data">岗位实体类对象</param> /// <returns></returns> /// public IActionResult Delete(string OrderId) { //var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); //ViewData["curentuser"] = curentuser; ReturnMsg<OrderBanciOrderDTO> returnMsg = new ReturnMsg<OrderBanciOrderDTO>(); returnMsg.code = 2; try { ResultEntity resultEntity = _orderBanciOrderService.DeleteStatus(OrderId); if (resultEntity.Result) { returnMsg.code = 1; returnMsg.count = 1; returnMsg.returnObj = null; } else { returnMsg.error = resultEntity.Message; } } catch (Exception ex) { returnMsg.code = 2; returnMsg.error = "没有获取到token"; returnMsg.count = 0; } return new JsonResult(returnMsg); } } } zhengcaioa/zhengcaioa/Controllers/Finance/FiOrderrecievemoneyController.cs
@@ -34,11 +34,13 @@ private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService; private readonly IProjectService _projectService; private readonly IUserService _userService; private readonly IFiCustomerrecievemoneyService _fiCustomerrecievemoneyService; public FiOrderrecievemoneyController(ILogger<FiOrderrecievemoneyController> logger, ILiaotianService liaotianService, IFiOrderrecievemoneyService fiOrderrecievemoneyService, ICooperOrderService cooperOrderService, IFiSubjectService ifiSubjectService , IFiAccountService fiAccountService, IFiAccountRecordService iFiAccountRecordService, ICooperatecustomCustomerService cooperatecustomCustomerService , IProjectService projectService , IUserService userService) , IUserService userService , IFiCustomerrecievemoneyService fiCustomerrecievemoneyService) { _logger = logger; _liaotianService = liaotianService; @@ -50,6 +52,7 @@ _cooperatecustomCustomerService = cooperatecustomCustomerService; _projectService = projectService; _userService = userService; _fiCustomerrecievemoneyService = fiCustomerrecievemoneyService; } public IActionResult Index() @@ -255,5 +258,145 @@ return View(); } public IActionResult EditCustomer(string id = null, string CustomerId = null) { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; FiCustomerrecievemoneyDTO dto = new FiCustomerrecievemoneyDTO(); if (!String.IsNullOrEmpty(id)) { dto = _fiCustomerrecievemoneyService.Get(id); } else { dto.PayTime = DateTime.Now; dto.CustomerId = CustomerId; } var cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(CustomerId); dto.CustomerName = cooperatecustomCustomerDTO.Name; dto.Yufukuan = cooperatecustomCustomerDTO.Yufukuan??0; ViewBag.PayType = _liaotianService.GetSYScode("fi_account", "accounttype"); ViewBag.accounttype = _liaotianService.GetSYScode("fi_account", "accounttype"); ViewBag.FiSubject = _ifiSubjectService.GetList().Where(x => x.Subjecttype == "01").ToList(); ViewData.Model = dto; return View(); } /// <summary> /// 保存 /// </summary> /// <param name="data">岗位实体类对象</param> /// <returns></returns> /// [HttpPost] public IActionResult SaveCustomer(FiCustomerrecievemoneyDTO data) { ResultEntity resultEntity = new ResultEntity(); var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; using (TransactionScope scope = new TransactionScope()) { data.RecStatus = "A"; if (String.IsNullOrEmpty(data.Id)) { data.Creater = curentuser.Id; data.Createtime = DateTime.Now; } data.Modifier = curentuser.Id; data.Modifytime = DateTime.Now; resultEntity = _fiCustomerrecievemoneyService.save(data); CooperatecustomCustomerDTO cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(data.CustomerId); if(cooperatecustomCustomerDTO.Yufukuan.HasValue) cooperatecustomCustomerDTO.Yufukuan = cooperatecustomCustomerDTO.Yufukuan.Value + data.Recievemoney.Value; else cooperatecustomCustomerDTO.Yufukuan = data.Recievemoney.Value; resultEntity = _cooperatecustomCustomerService.saveyufukuan(cooperatecustomCustomerDTO); FiAccountRecordDTO data1 = new FiAccountRecordDTO(); data1.RecStatus = "A"; data1.Creater = curentuser.Id; data1.Createtime = DateTime.Now; data1.Modifier = curentuser.Id; data1.Modifytime = DateTime.Now; data1.SubjectId = data.SubjectId; data1.AccountId = data.AccountId; data1.Money = data.Recievemoney; data1.PaymentUnit = cooperatecustomCustomerDTO.Name; data1.OperationalMatters ="客户预付款:" + data.Remark; FiAccountDTO firmAccount = _fiAccountService.Get(data1.AccountId); data1.RecordTypeId = "1";//收入 data1.Department = ""; firmAccount.AllIncome = (firmAccount.AllIncome ?? 0) + data1.Money; firmAccount.Balance = (firmAccount.Balance ?? 0) + data1.Money; data1.AccountMoney = firmAccount.Balance; resultEntity = _iFiAccountRecordService.save(data1); resultEntity = _fiAccountService.save(firmAccount); scope.Complete(); } return new JsonResult(resultEntity); } public IActionResult IndexCustomerdtl(string CustomerId) { 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.CustomerId = CustomerId; return View(); } public IActionResult GetListCustomerdel(FiCustomerrecievemoneyDTOSearch search) { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); return new JsonResult(_fiCustomerrecievemoneyService.SearchByPaging(search)); } } } zhengcaioa/zhengcaioa/Startup.cs
@@ -156,6 +156,7 @@ services.AddScoped(typeof(IAskService), typeof(AskService)); services.AddScoped(typeof(IAdmGoodsRecordService), typeof(AdmGoodsRecordService)); services.AddScoped(typeof(IExpertTestTopicService), typeof(ExpertTestTopicService)); services.AddScoped(typeof(IFiCustomerrecievemoneyService), typeof(FiCustomerrecievemoneyService)); //zcweb services.AddScoped(typeof(IDtChannelArticleNewsService), typeof(DtChannelArticleNewsService)); zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/EditCustomer.cshtml
New file @@ -0,0 +1,386 @@ @model DTO.FiCustomerrecievemoneyDTO @using DTO; @using zhengcaioa.Models; @{ List<SysCodeDtl> PayType = ViewData["PayType"] as List<SysCodeDtl>; //付款类型 List<FiSubjectDTO> FiSubject = ViewData["FiSubject"] as List<FiSubjectDTO>; //科目 List<SysCodeDtl> accounttype = ViewData["accounttype"] as List<SysCodeDtl>; //账户类型 } @{ Layout = null; } <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <meta name="description" content=""> <meta name="author" content="ThemeBucket"> <title>@(SiteConfig.SiteName)</title> <link href="~/css/bootstrap.min.css" rel="stylesheet"> <link href="~/css/font-awesome.min.css" rel="stylesheet"> <link href="~/css/animate.min.css" rel="stylesheet"> @*<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">*@ <link href="~/css/style.min.css" rel="stylesheet"> <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet"> @*<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">*@ @*<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">*@ <link href="~/css/style.min.css" rel="stylesheet"> <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" /> <link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" /> <style type="text/css"> .webuploader-pick { position: relative; display: inline-block; cursor: pointer; background: #00b7ee; padding: 8px 14px 7px 14px; color: #fff; text-align: center; border-radius: 3px; overflow: hidden; } div.clearfix > label { padding-top: 8px; } .chosen-container { border-radius: 1px; border: 1px solid #e5e6e7; } .col-md-1.control-label { padding-right: 0px; font-weight: 400; } </style> <!-- jqgrid--> @*<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">*@ <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script> <script src="~/js/bootstrap.min.js"></script> @*<script src="~/js/plugins/bootstro/bootstro.js"></script>*@ <!--容器--> @*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@ @*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@ @*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@ <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script> @*<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>*@ <script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script> @*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@ @*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@ <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script> <script src="~/js/plugins/webuploader/webuploader.min.js"></script> <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script> <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script> @*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@ @*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@ <script src="~/js/TUJS.js"></script> </head> <body class="gray-bg" style="overflow:auto"> <form id="formtest"> <div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;"> <div class="row"> <div class="col-sm-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> <h5> <i class="fa fa-list"></i> 基本信息</h5> </div> <div id="div_content" class="ibox-content" style="background-color:white;"> <div class="row"> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">客户名称:</label> <label class="text-left col-sm-1 col-md-1 control-label"> @Model.CustomerName </label> <label class="text-left col-sm-1 col-md-1 control-label"> </label> <label class="text-right col-sm-1 col-md-1 control-label">预付款余额(元):</label> <label class="text-left col-sm-1 col-md-1 control-label"> @Model.Yufukuan.ToString("F2") </label> <label class="text-left col-sm-1 col-md-1 control-label"> </label> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">存入金额(元):<i class="red">*</i></label> <div class="col-sm-2 col-md-2" grouptype="Vdata"> <input class="form-control" label="存入金额(元)" name="Recievemoney" id="Recievemoney" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="CheckNum(this);"> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">收款方式:<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <select id="PayType" class="form-control" name="PayType" data-placeholder="选择 序列 ..."> @foreach (var item in PayType) { @if (!item.CodeSn.Equals(Model.PayType)) { <option value="@item.CodeSn" hassubinfo="true"> @item.Comments </option> } else { <option value="@item.CodeSn" hassubinfo="true" selected="selected"> @item.Comments </option> } } } </select> <input type="hidden" id="CustomerId" name="CustomerId" value="@Model.CustomerId" /> </div> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">账户名称:<i class="red">*</i></label> <div class="col-sm-2 col-md-2" grouptype="Vdata"> <select id="AccountId" class="form-control" name="AccountId" data-placeholder="选择 序列 ..."> <option value="" hassubinfo="true">请选择</option> </select> </div> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">科目名称:<i class="red">*</i></label> <div class="col-sm-2 col-md-2" grouptype="Vdata"> <select id="SubjectId" class="form-control" name="SubjectId" data-placeholder="选择 序列 ..."> <option value="" hassubinfo="true">请选择</option> @foreach (var item in FiSubject) { @if (!item.Id.Equals(Model.SubjectId)) { <option value="@item.Id" hassubinfo="true"> @item.Subjectname </option> } else { <option value="@item.Id" hassubinfo="true" selected="selected"> @item.Subjectname </option> } } } </select> </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-8 col-md-8"> <textarea class="form-control bt" id="Remark" name="Remark" title="备注" isempty="" maxlength="4000" length="long">@Model.Remark</textarea> </div> </div> </div> </div> </div> </div> </div> </div> <div class="wrapper wrapper-content" style="margin-top:0px"></div> <div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px "> <div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="功能按钮:“保存”,“删除”"> <a class="btn btn-success" href="javascript:void(0)" onclick="savePosition();" style="margin-left:4px; border-radius:4px;"> <i class="glyphicon glyphicon-ok"></i> <span class="bold">提交</span> </a> </div> </div> </form> <script type="text/javascript"> var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95; $("#div_content").height(hh); toastr.options = { "closeButton": true, "debug": false, "progressBar": true, "positionClass": "toast-bottom-right", "onclick": null, "showDuration": "300", "hideDuration": "600", "timeOut": "4500", "extendedTimeOut": "600", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" }; //laydate({ elem: "#PayTime", format: 'YYYY/MM/DD', istime: true, event: "focus" }); // 保存岗位信息 var savePosition = function () { if ($("#Recievemoney").val() == '') { toastr.warning("收款金额不能为空"); return; } if ($("#PayType").val() == '') { toastr.warning("收款方式不能为空"); return; } //if ($("#PayTime").val() == '') { // toastr.warning("收款日期不能为空"); // return; //} if ($("#AccountId").val() == '') { toastr.warning("收款账户不能为空"); return; } if ($("#SubjectId").val() == '') { toastr.warning("收款科目不能为空"); return; } if (parseFloat($("#Recievemoney").val()) < 0) { toastr.warning("收款金额不能小于0"); return; } //if (parseFloat($("#Recievemoney").val()) > parseFloat($("#WeishouMoney").html().trim())) { // toastr.warning("本次收款金额大于订单未付款!为了您的账务正确性请重新复查!"); // return; //} //var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" } $.ajax({ type: "POST", url: "/FiOrderrecievemoney/SaveCustomer", dataType: "json", global: false, data: $('form').serializeArray(), success: function (data) { if (data.Result) { // parent._afterSave(true); parent.layer.msg('成功保存', { icon: 6 }); //window.location = "/Project/add?id=" + data.ReturnID; try { _pageAutoClose();//自动关闭页面方法 } catch (err) { parent._CloseTab1("/FiOrderrecievemoney/EditCustomer/"); } } else { // toastr.error("失败"); parent.layer.msg(data.Message, { icon: 5 }); } }, error: function () { parent.layer.msg('失败', { icon: 5 }); } }); } $("#PayType").change(function () { var PayType = $("#PayType").val(); $.ajax({ type: "GET", url: "/FiAccountIncome/getAccount?Accounttype=" + PayType, dataType: "json", global: false, data: "", success: function (data) { var city = $("#AccountId"); 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].Id + '" hassubinfo="true">' + data[i].Accountname + '</option>'; city.append(o); } } }, error: function () { parent.layer.msg('失败', { icon: 5 }); } }); }); $("#PayType").trigger("change"); function _pageAutoClose() { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } //用户只能输入正负数与小数 function CheckNum(obj) { if (isNaN(obj.value) && !/^-$/.test(obj.value)) { obj.value = ""; } if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(obj.value)) { obj.value = obj.value.replace(/\.\d{2,}$/, obj.value.substr(obj.value.indexOf('.'), 3)); } } </script> </body> </html> zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/IndexCustomer.cshtml
@@ -32,7 +32,13 @@ { 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>"; return "<a onclick=\"OpenWindow('存款','100%','100%', '/FiOrderrecievemoney/EditCustomer?id=&CustomerId=" + rowObject.Id + "')\" >存款</a>"; } }, { label: '存款明细', name: 'Name111111', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { return "<a onclick=\"OpenWindow('" + rowObject.Name+"存款明细','100%','100%', '/FiOrderrecievemoney/IndexCustomerdtl?id=&CustomerId=" + rowObject.Id + "')\" >存款明细</a>"; } }, zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/IndexCustomerdtl.cshtml
New file @@ -0,0 +1,77 @@ @{ ViewBag.Title = "FiOrderrecievemoney"; Layout = "~/Views/Shared/_Layout_Search.cshtml"; } @section headerStyle{ <script type="text/javascript"> var OrderType = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.OrderType))'; var Fkzt = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Fkzt))'; var CustomerId = '@Html.Raw(ViewBag.CustomerId)'; loseherght = 30; dataCol = [ { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, { label: '操作金额', name: 'RecievemoneyName', labtype: 'txt', hidden: false, width: 100 }, { label: '收款方式', name: 'PayTypeName', labtype: 'txt', hidden: false, width: 100 }, { label: '账户名称', name: 'AccountName', labtype: 'txt', hidden: false, width: 100 }, { label: '科目名称', name: 'SubjectName', labtype: 'txt', hidden: false, width: 100 }, { label: '操作人', name: 'CreaterName', labtype: 'txt', hidden: false, width: 100 }, { label: '备注', name: 'Remark', labtype: 'txt', hidden: false, width: 200 }, { label: '操作时间', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100 }, ]; dataUrl = "/FiOrderrecievemoney/GetListCustomerdel?CustomerId=" + CustomerId; searchCol = [ { label: '操作时间', name: 'PayTime', labtype: 'datearea', hidden: false }, { label: '金额', name: 'Recievemoney', labtype: 'txt', hidden: false }, ]; 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> }