From adfe53d56273a21dccfc20401c1c1059d5ce5beb Mon Sep 17 00:00:00 2001
From: LR-20210131IOQH\Administrator <jackcold@163.com>
Date: 星期二, 08 六月 2021 15:08:50 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/zhengcaioa
---
zhengcaioa/Services/ProjectService.cs | 10
zhengcaioa/DTO/ExpertDTO.cs | 7
zhengcaioa/zhengcaioa/Views/Expert/Index.cshtml | 9
zhengcaioa/DTO/AdmAttendanceRuleDTO.cs | 57 +
zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml | 2
zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs | 85 +
zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml | 53 +
zhengcaioa/zhengcaioa/Startup.cs | 3
zhengcaioa/Model/AdmAskLeaveOff.cs | 2
zhengcaioa/Model/zhengcaioaContext.cs | 29
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs | 7
zhengcaioa/IServices/IAdmAttendanceRuleService.cs | 23
zhengcaioa/Services/ExpertService.cs | 85 ++
zhengcaioa/zhengcaioa/Views/ExpertsApply/Index.cshtml | 124 +++
zhengcaioa/Services/AdmAttendanceRuleService.cs | 238 ++++++
zhengcaioa/zhengcaioa/Views/Project/Add.cshtml | 2
zhengcaioa/zhengcaioa/Controllers/ProjectController.cs | 4
zhengcaioa/Model/AdmAttendanceRulesDtl.cs | 4
zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs | 13
zhengcaioa/zhengcaioa/Views/ExpertsApply/ExpertsApply.cshtml | 946 ++++++++++++++++++++++++
zhengcaioa/zhengcaioa/Views/Signin/AttendanceRule.cshtml | 385 +++++++---
zhengcaioa/zhengcaioa/Controllers/Expert/ExpertsApplyController.cs | 160 ++++
22 files changed, 2,059 insertions(+), 189 deletions(-)
diff --git a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
index b5f928a..1e2ba33 100644
--- a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
+++ b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -140,8 +140,11 @@
CreateMap<AdmMemoBookDTO, AdmMemoBook>();
CreateMap<AdmAttendanceRulesDtl, AdmAttendanceRulesDtlDTO>();
- CreateMap<AdmAttendanceRulesDtlDTO, AdmAttendanceRule>();
-
+ CreateMap<AdmAttendanceRulesDtlDTO, AdmAttendanceRulesDtl>();
+
+ CreateMap<AdmAttendanceRule, AdmAttendanceRuleDTO>();
+ CreateMap<AdmAttendanceRuleDTO, AdmAttendanceRule>();
+
CreateMap<AdmBreakPrecedent, AdmBreakPrecedentDTO>();
CreateMap<AdmBreakPrecedentDTO, AdmBreakPrecedent>();
diff --git a/zhengcaioa/DTO/AdmAttendanceRuleDTO.cs b/zhengcaioa/DTO/AdmAttendanceRuleDTO.cs
index 80c52c3..9b3c0fb 100644
--- a/zhengcaioa/DTO/AdmAttendanceRuleDTO.cs
+++ b/zhengcaioa/DTO/AdmAttendanceRuleDTO.cs
@@ -8,14 +8,46 @@
public partial class AdmAttendanceRuleDTO
{
public string Id { get; set; }
- public string Code { get; set; }
- public string Name { get; set; }
- public string Remark { get; set; }
+ public int WeekStart { get; set; }
+ public int WeekEnd { get; set; }
+ public string WorkingStart { get; set; }
+ public string WorkingEnd { get; set; }
+ public string OffworkStart { get; set; }
+ public string OffworkEnd { get; set; }
+ public decimal FullAttendance { get; set; }
+ public decimal LatePayment1 { get; set; }
+ public decimal LatePayment2 { get; set; }
+ public decimal LatePayment3 { get; set; }
+ public decimal LatePayment4 { get; set; }
+ public decimal Absenteeism { get; set; }
+ public decimal AbsenteeismPayment1 { get; set; }
+ public decimal AbsenteeismPayment2 { get; set; }
+ public decimal PersonalPayment1 { get; set; }
+ public decimal PersonalPayment2 { get; set; }
+ public decimal PersonalPayment3 { get; set; }
+ public decimal PersonalPayment4 { get; set; }
+ public decimal SickPayment1 { get; set; }
+ public decimal SickPayment2 { get; set; }
+ public decimal SickPayment3 { get; set; }
+ public decimal SickPayment4 { get; set; }
+ public string Holiday { get; set; }
+ public string Rest { get; set; }
+ public int Gala { get; set; }
+ public int Weekend1 { get; set; }
+ public int Usually { 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; }
+
+ public string[] holiday_s { get; set; }
+ public string[] holiday_e { get; set; }
+
+ public string[] rest_s { get; set; }
+ public string[] rest_e { get; set; }
+ public List<AdmAttendanceRulesDtlDTO> admAttendanceRulesDtlDTOs { get; set; }
+
}
@@ -23,16 +55,17 @@
/// 鏄庣粏
/// </summary>
public partial class AdmAttendanceRulesDtlDTO
- {
-
+ {
+
public string Id { get; set; }
public string Pid { get; set; }
- public string Value1 { get; set; }
- public string Value2 { get; set; }
- public string Value3 { get; set; }
- public string Value4 { get; set; }
- public string Value5 { get; set; }
- public string Value6 { get; set; }
- public string RecStatus { get; set; }
+ public string ValueStart { get; set; }
+ public string ValueEnd { get; set; }
+ public string Name { 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; }
}
}
diff --git a/zhengcaioa/DTO/ExpertDTO.cs b/zhengcaioa/DTO/ExpertDTO.cs
index 027ddd4..996b538 100644
--- a/zhengcaioa/DTO/ExpertDTO.cs
+++ b/zhengcaioa/DTO/ExpertDTO.cs
@@ -19,11 +19,15 @@
public string Postal { get; set; }
public string ExpertType { get; set; }
public string Level { get; set; }
+ public string LevelName { get; set; }
public string Phone1 { get; set; }
public string Phone2 { get; set; }
public string Qq { get; set; }
public string Wechat { get; set; }
public string ReviewItem { get; set; }
+
+
+ public string ReviewItemSelect { get; set; }
public string CertiNumber { get; set; }
public string CertiFont { get; set; }
public string CertiBack { get; set; }
@@ -36,6 +40,7 @@
public string Modifier { get; set; }
public DateTime Modifytime { get; set; }
public string TitileCerti1 { get; set; }
+ public string ShenheStatus { get; set; }
public string TitileCerti2 { get; set; }
public string TitileCerti3 { get; set; }
public string TitileCerti4 { get; set; }
@@ -61,6 +66,8 @@
public string CertiNumber { get; set; }
public string Phone1 { get; set; }
public int JoinCount { get; set; }
+
+ public string ShenheStatus { get; set; }
}
#endregion
diff --git a/zhengcaioa/IServices/IAdmAttendanceRuleService.cs b/zhengcaioa/IServices/IAdmAttendanceRuleService.cs
new file mode 100644
index 0000000..a54319e
--- /dev/null
+++ b/zhengcaioa/IServices/IAdmAttendanceRuleService.cs
@@ -0,0 +1,23 @@
+锘縰sing DTO;
+using Microsoft.AspNetCore.Mvc.Rendering;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using zhengcaioa.Models;
+namespace IServices
+{
+ public interface IAdmAttendanceRuleService
+ {
+ ResultEntity save(AdmAttendanceRuleDTO dto);
+
+ AdmAttendanceRuleDTO Get(string id);
+
+ ResultEntity saveDtl(AdmAttendanceRulesDtlDTO dto);
+
+ AdmAttendanceRulesDtlDTO GetDtl(string id);
+
+ List<AdmAttendanceRulesDtlDTO> GetDtlList(string pid);
+
+ ResultEntity RemoveDtlList(string pid);
+ }
+}
diff --git a/zhengcaioa/Model/AdmAskLeaveOff.cs b/zhengcaioa/Model/AdmAskLeaveOff.cs
index 6270855..fbb1720 100644
--- a/zhengcaioa/Model/AdmAskLeaveOff.cs
+++ b/zhengcaioa/Model/AdmAskLeaveOff.cs
@@ -12,12 +12,12 @@
public string Lavetype { get; set; }
public DateTime? StratTime { get; set; }
public DateTime? EndTime { get; set; }
- public string Remark { get; set; }
public string MedicalRecord { 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; }
+ public string Remark { get; set; }
}
}
diff --git a/zhengcaioa/Model/AdmAttendanceRulesDtl.cs b/zhengcaioa/Model/AdmAttendanceRulesDtl.cs
index 5bc2dbe..d724517 100644
--- a/zhengcaioa/Model/AdmAttendanceRulesDtl.cs
+++ b/zhengcaioa/Model/AdmAttendanceRulesDtl.cs
@@ -9,8 +9,8 @@
{
public string Id { get; set; }
public string Pid { get; set; }
- public DateTime ValueStart { get; set; }
- public DateTime ValueEnd { get; set; }
+ public string ValueStart { get; set; }
+ public string ValueEnd { get; set; }
public string Name { get; set; }
public string RecStatus { get; set; }
public string Creater { get; set; }
diff --git a/zhengcaioa/Model/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs
index c65c3f7..5bd4626 100644
--- a/zhengcaioa/Model/zhengcaioaContext.cs
+++ b/zhengcaioa/Model/zhengcaioaContext.cs
@@ -210,9 +210,9 @@
modelBuilder.Entity<AdmAttendanceRule>(entity =>
{
- entity.HasNoKey();
-
entity.ToTable("ADM_AttendanceRules");
+
+ entity.Property(e => e.Id).HasMaxLength(50);
entity.Property(e => e.Absenteeism)
.HasColumnType("decimal(18, 2)")
@@ -247,10 +247,6 @@
.IsRequired()
.HasMaxLength(50)
.HasColumnName("holiday");
-
- entity.Property(e => e.Id)
- .IsRequired()
- .HasMaxLength(50);
entity.Property(e => e.LatePayment1)
.HasColumnType("decimal(18, 2)")
@@ -340,21 +336,19 @@
entity.Property(e => e.Weekend1).HasColumnName("weekend");
entity.Property(e => e.WorkingEnd)
- .IsRequired()
.HasMaxLength(50)
.HasColumnName("working_end");
entity.Property(e => e.WorkingStart)
- .IsRequired()
.HasMaxLength(50)
.HasColumnName("working_start");
});
modelBuilder.Entity<AdmAttendanceRulesDtl>(entity =>
{
- entity.HasNoKey();
-
entity.ToTable("ADM_AttendanceRules_dtl");
+
+ entity.Property(e => e.Id).HasMaxLength(50);
entity.Property(e => e.Creater)
.IsRequired()
@@ -366,10 +360,6 @@
.HasColumnType("datetime")
.HasColumnName("createtime")
.HasDefaultValueSql("(getdate())");
-
- entity.Property(e => e.Id)
- .IsRequired()
- .HasMaxLength(50);
entity.Property(e => e.Modifier)
.IsRequired()
@@ -385,7 +375,6 @@
entity.Property(e => e.Name).HasMaxLength(200);
entity.Property(e => e.Pid)
- .IsRequired()
.HasMaxLength(50)
.HasColumnName("pid");
@@ -396,14 +385,12 @@
.HasDefaultValueSql("('A')");
entity.Property(e => e.ValueEnd)
- .HasColumnType("date")
- .HasColumnName("value_end")
- .HasDefaultValueSql("(getdate())");
+ .HasMaxLength(50)
+ .HasColumnName("value_end");
entity.Property(e => e.ValueStart)
- .HasColumnType("date")
- .HasColumnName("value_start")
- .HasDefaultValueSql("(getdate())");
+ .HasMaxLength(50)
+ .HasColumnName("value_start");
});
modelBuilder.Entity<AdmBreakPrecedent>(entity =>
diff --git a/zhengcaioa/Services/AdmAttendanceRuleService.cs b/zhengcaioa/Services/AdmAttendanceRuleService.cs
new file mode 100644
index 0000000..f761361
--- /dev/null
+++ b/zhengcaioa/Services/AdmAttendanceRuleService.cs
@@ -0,0 +1,238 @@
+锘縰sing 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 AdmAttendanceRuleService:IAdmAttendanceRuleService
+ {
+ private readonly zhengcaioaContext _context;
+ private readonly IMapper _mapper;
+ public AdmAttendanceRuleService(zhengcaioaContext context, IMapper mapper)
+ {
+ _context = context;
+ _mapper = mapper;
+ }
+
+ public ResultEntity save(AdmAttendanceRuleDTO dto)
+ {
+ ResultEntity resultEntity = new ResultEntity();
+ try
+ {
+
+
+ var entity = _mapper.Map<AdmAttendanceRule>(dto);
+
+
+ if (String.IsNullOrEmpty(entity.Id))
+ {
+
+ entity.Id = Guid.NewGuid().ToString();
+ dto.Id = entity.Id;
+ _context.AdmAttendanceRules.Add(entity);
+ }
+ else
+ {
+ var updateproject = _context.AdmAttendanceRules.Find(entity.Id);
+
+ updateproject.WeekStart = entity.WeekStart;
+ updateproject.WeekEnd = entity.WeekEnd;
+ updateproject.WorkingStart = entity.WorkingStart;
+ updateproject.WorkingEnd = entity.WorkingEnd;
+ updateproject.OffworkStart = entity.OffworkStart;
+ updateproject.OffworkEnd = entity.OffworkEnd;
+ updateproject.FullAttendance = entity.FullAttendance;
+ updateproject.LatePayment1 = entity.LatePayment1;
+ updateproject.LatePayment2 = entity.LatePayment2;
+ updateproject.LatePayment3 = entity.LatePayment3;
+
+ updateproject.LatePayment4 = entity.LatePayment4;
+ updateproject.Absenteeism = entity.Absenteeism;
+ updateproject.AbsenteeismPayment1 = entity.AbsenteeismPayment1;
+ updateproject.AbsenteeismPayment2 = entity.AbsenteeismPayment2;
+ updateproject.PersonalPayment1 = entity.PersonalPayment1;
+
+ updateproject.PersonalPayment2 = entity.PersonalPayment2;
+ updateproject.PersonalPayment3 = entity.PersonalPayment3;
+ updateproject.PersonalPayment4 = entity.PersonalPayment4;
+ updateproject.SickPayment1 = entity.SickPayment1;
+ updateproject.SickPayment2 = entity.SickPayment2;
+ updateproject.SickPayment3 = entity.SickPayment3;
+ updateproject.SickPayment4 = entity.SickPayment4;
+ updateproject.Holiday = entity.Holiday;
+ updateproject.Rest = entity.Rest;
+ updateproject.Gala = entity.Gala;
+ updateproject.Weekend1 = entity.Weekend1;
+ updateproject.Usually = entity.Usually;
+
+
+ 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 AdmAttendanceRuleDTO Get(string id)
+ {
+ var entity = new AdmAttendanceRule();
+
+
+
+ if(string.IsNullOrEmpty(id))
+ entity = _context.AdmAttendanceRules.FirstOrDefault();
+ else
+ entity = _context.AdmAttendanceRules.Find(id);
+
+
+ if (entity == null)
+ {
+ entity = new AdmAttendanceRule();
+ }
+
+ var result = _mapper.Map<AdmAttendanceRuleDTO>(entity);
+
+
+ return result;
+ }
+
+
+
+
+ public ResultEntity saveDtl(AdmAttendanceRulesDtlDTO dto)
+ {
+ ResultEntity resultEntity = new ResultEntity();
+ try
+ {
+
+
+ var entity = _mapper.Map<AdmAttendanceRulesDtl>(dto);
+
+
+ if (String.IsNullOrEmpty(entity.Id))
+ {
+ entity.Id = Guid.NewGuid().ToString();
+ _context.AdmAttendanceRulesDtls.Add(entity);
+ }
+ else
+ {
+ var updateproject = _context.AdmAttendanceRulesDtls.Find(entity.Id);
+
+ updateproject.Pid = entity.Pid;
+ updateproject.ValueStart = entity.ValueStart;
+ updateproject.ValueEnd = entity.ValueEnd;
+ updateproject.Name = entity.Name;
+
+
+ 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 AdmAttendanceRulesDtlDTO GetDtl(string id)
+ {
+ var entity = new AdmAttendanceRulesDtl();
+ if (string.IsNullOrEmpty(id))
+ entity = _context.AdmAttendanceRulesDtls.FirstOrDefault();
+ else
+ entity = _context.AdmAttendanceRulesDtls.Find(id);
+
+
+
+
+
+ if (entity == null)
+ {
+ entity = new AdmAttendanceRulesDtl();
+ }
+
+ var result = _mapper.Map<AdmAttendanceRulesDtlDTO>(entity);
+
+
+ return result;
+ }
+
+ public List<AdmAttendanceRulesDtlDTO> GetDtlList(string pid)
+ {
+
+
+
+ var entity = _context.AdmAttendanceRulesDtls.ToList();
+
+
+ if (!string.IsNullOrEmpty(pid))
+ entity = entity.Where(x => x.Pid == pid).ToList();
+
+
+ var result = _mapper.Map<List<AdmAttendanceRulesDtlDTO>>(entity);
+
+
+ return result;
+ }
+
+
+
+ public ResultEntity RemoveDtlList(string pid)
+ {
+ ResultEntity resultEntity = new ResultEntity();
+ try
+ {
+ var admAttendanceRulesDtls = _context.AdmAttendanceRulesDtls.Where(x => x.Pid == pid).ToList();
+
+ foreach(var admAttendanceRulesDtl in admAttendanceRulesDtls)
+ {
+ _context.AdmAttendanceRulesDtls.Remove(admAttendanceRulesDtl);
+ }
+ _context.SaveChanges();
+ resultEntity.ReturnID = pid;
+ resultEntity.Result = true;
+
+
+
+
+
+
+ }
+ catch (Exception ex)
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "淇濆瓨澶辫触锛岃鑱旂郴绠$悊鍛�";
+
+ }
+ return resultEntity;
+ }
+
+ }
+}
diff --git a/zhengcaioa/Services/ExpertService.cs b/zhengcaioa/Services/ExpertService.cs
index 151f686..cb7a5f4 100644
--- a/zhengcaioa/Services/ExpertService.cs
+++ b/zhengcaioa/Services/ExpertService.cs
@@ -72,6 +72,7 @@
updateplExpert.TitileCerti8 = expert.TitileCerti8;
updateplExpert.TitileCerti9 = expert.TitileCerti9;
updateplExpert.TitileCerti10 = expert.TitileCerti10;
+ updateplExpert.ShenheStatus = expert.ShenheStatus;
}
_context.SaveChanges();
@@ -100,6 +101,26 @@
public ResultDataEntity<ExpertDTO> SearchByPaging(ExpertDTOSearch searchEntity)
{
+
+
+ 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
+ }
+ );
+
ResultDataEntity<ExpertDTO> data = new ResultDataEntity<ExpertDTO>();
List<ExpertDTO> list = new List<ExpertDTO>();
//绛涢��
@@ -108,18 +129,72 @@
{
ExpertId = q.Key.ExpertId,
JoinCount = q.Count(),
- }
- )
+ })
+
+
on a.Id equals h.ExpertId
into hsss
from hhh in hsss.DefaultIfEmpty()
+
+
+ join c in listCode.Where(x => x.CodeTable == "experts" && x.CodeField == "level")
+ on a.Level equals c.CodeSn
+ into csss
+ from ccc in csss.DefaultIfEmpty()
+
+
where a.RecStatus == "A"
&& (searchEntity.JoinCount<=0 || hhh.JoinCount >= searchEntity.JoinCount)
- select a).ToList();
+ select new ExpertDTO
+ {
+ Id = a.Id,
+ Name = a.Name,
+ Sex = a.Sex,
+ InfoSource = a.InfoSource,
+ IdCard = a.IdCard,
+ Province = a.Province,
+ AreaId = a.AreaId,
+ City = a.City,
+
+ Address = a.Address,
+ Postal = a.Postal,
+ ExpertType = a.ExpertType,
+
+ Level = a.Level,
+ LevelName = ccc.Comments,
+ Phone1 = a.Phone1,
+ Phone2 = a.Phone2,
+ Qq = a.Qq,
+
+ Remark = a.Remark,
+
+ Creater = a.Creater,
+ Createtime = a.Createtime,
+
+ RecStatus = a.RecStatus,
+ Modifier = a.Modifier,
+ Modifytime = a.Modifytime,
+
+ Wechat = a.Wechat,
+ ReviewItem = a.ReviewItem,
+ CertiNumber = a.CertiNumber,
+ CertiFont = a.CertiFont,
+ CertiBack = a.CertiBack,
+ TitileCerti = a.TitileCerti,
+
+ Sort = a.Sort,
+ ShenheStatus = a.ShenheStatus,
+
+
+ }).ToList();
if (!string.IsNullOrEmpty(searchEntity.Name))
{
query = query.Where(m => m.Name.Contains(searchEntity.Name)).ToList();
+ }
+ if (!string.IsNullOrEmpty(searchEntity.ShenheStatus))
+ {
+ query = query.Where(m => m.ShenheStatus == searchEntity.ShenheStatus).ToList();
}
if (!string.IsNullOrEmpty(searchEntity.ExpertType))
{
@@ -167,9 +242,9 @@
if (searchEntity.totalrows == 0)
searchEntity.totalrows = query.Count();
var expertlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
- list = _mapper.Map<List<ExpertDTO>>(expertlist);
+ //list = _mapper.Map<List<ExpertDTO>>(expertlist);
- data.LoadData(searchEntity, list);
+ data.LoadData(searchEntity, expertlist);
return data;
}
diff --git a/zhengcaioa/Services/ProjectService.cs b/zhengcaioa/Services/ProjectService.cs
index e57e271..2543a63 100644
--- a/zhengcaioa/Services/ProjectService.cs
+++ b/zhengcaioa/Services/ProjectService.cs
@@ -27,6 +27,16 @@
ResultEntity resultEntity = new ResultEntity();
try
{
+ var checkUserSn = _context.Projects.Where(x => x.Name == projectDTO.Name && x.RecStatus == "A" && x.Id != projectDTO.Id).FirstOrDefault();
+ if (checkUserSn != null && (string.IsNullOrWhiteSpace(projectDTO.Id) || (!string.IsNullOrWhiteSpace(projectDTO.Id) && checkUserSn.Id != projectDTO.Id)))
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "椤圭洰閲嶅";
+ return resultEntity;
+ }
+
+
+
var project = _mapper.Map<Project>(projectDTO);
// var ZhuanjiaList = projectDTO.ZhuanjiaList;
//if(ZhuanjiaList!=null&& ZhuanjiaList.Length > 0)
diff --git a/zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs b/zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs
index 2bfd86d..ee4d050 100644
--- a/zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs
@@ -10,6 +10,7 @@
using zhengcaioa.Models;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json.Linq;
+using System.Transactions;
namespace zhengcaioa.Controllers.AdmManagement
{
@@ -18,12 +19,15 @@
private readonly ILogger<SigninController> _logger;
private readonly IAdmSigninService _signinService;
private readonly ISysAttachmentService _sysAttachmentService;
+ private readonly IAdmAttendanceRuleService _attendanceRuleService;
[CheckLogin]
- public SigninController(ILogger<SigninController> logger, IAdmSigninService signinService, ISysAttachmentService sysAttachmentService)
+ public SigninController(ILogger<SigninController> logger, IAdmSigninService signinService, ISysAttachmentService sysAttachmentService
+ , IAdmAttendanceRuleService attendanceRuleService)
{
_logger = logger;
_signinService = signinService;
_sysAttachmentService = sysAttachmentService;
+ _attendanceRuleService = attendanceRuleService;
}
#region 鑰冨嫟绛惧埌鎵撳崱
@@ -236,25 +240,80 @@
#region 鑰冨嫟瑙勫垯
public IActionResult AttendanceRule()
{
+ AdmAttendanceRuleDTO admAttendanceRuleDTO = _attendanceRuleService.Get("");
+ admAttendanceRuleDTO.admAttendanceRulesDtlDTOs = _attendanceRuleService.GetDtlList("");
+
+ ViewData.Model = admAttendanceRuleDTO;
return View();
}
- public string SaveAttendanceRule(object leaveOff)
+ public string SaveAttendanceRule(AdmAttendanceRuleDTO dto)
{
+ ResultEntity resultEntity = new ResultEntity();
+ dto.Holiday = "1";
+ dto.Rest = "1";
+ resultEntity.Result = false;
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ViewData["curentuser"] = curentuser;
- //leaveOff.RecStatus = "A";
- //if (String.IsNullOrEmpty(leaveOff.Id))
- //{
- // leaveOff.Creater = curentuser.Id;
- // leaveOff.Createtime = DateTime.Now;
- //}
- //leaveOff.Modifier = curentuser.Id;
- //leaveOff.Modifytime = DateTime.Now;
+ using (TransactionScope scope = new TransactionScope())
+ {
+ dto.RecStatus = "A";
+ if (String.IsNullOrEmpty(dto.Id))
+ {
+ dto.Creater = curentuser.Id;
+ dto.Createtime = DateTime.Now;
+ }
+ dto.Modifier = curentuser.Id;
+ dto.Modifytime = DateTime.Now;
- //ResultEntity resultEntity = _signinService.SaveAskLeaveOff(leaveOff);
- var ss = leaveOff;
- return JsonConvert.SerializeObject(null);
+ resultEntity = _attendanceRuleService.save(dto);
+
+
+ _attendanceRuleService.RemoveDtlList(dto.Id);
+
+ for (int i = 0; i < dto.holiday_s.Length; i++)
+ {
+ if(!String.IsNullOrEmpty(dto.holiday_s[i]) && !String.IsNullOrEmpty(dto.holiday_e[i]))
+ {
+ AdmAttendanceRulesDtlDTO admAttendanceRulesDtlDTO = new AdmAttendanceRulesDtlDTO();
+ admAttendanceRulesDtlDTO.Pid = dto.Id;
+ admAttendanceRulesDtlDTO.ValueStart = dto.holiday_s[i];
+ admAttendanceRulesDtlDTO.ValueEnd = dto.holiday_e[i];
+ admAttendanceRulesDtlDTO.Name = "jiejiari";
+ admAttendanceRulesDtlDTO.RecStatus = "A";
+ admAttendanceRulesDtlDTO.Creater = curentuser.Id;
+ admAttendanceRulesDtlDTO.Createtime = DateTime.Now;
+ admAttendanceRulesDtlDTO.Modifier = admAttendanceRulesDtlDTO.Creater;
+ admAttendanceRulesDtlDTO.Modifytime = admAttendanceRulesDtlDTO.Createtime;
+ resultEntity = _attendanceRuleService.saveDtl(admAttendanceRulesDtlDTO);
+ }
+
+ }
+ for (int i = 0; i < dto.rest_s.Length; i++)
+ {
+ if (!String.IsNullOrEmpty(dto.rest_s[i]) && !String.IsNullOrEmpty(dto.rest_e[i]))
+ {
+ AdmAttendanceRulesDtlDTO admAttendanceRulesDtlDTO = new AdmAttendanceRulesDtlDTO();
+ admAttendanceRulesDtlDTO.Pid = dto.Id;
+ admAttendanceRulesDtlDTO.ValueStart = dto.rest_s[i];
+ admAttendanceRulesDtlDTO.ValueEnd = dto.rest_e[i];
+ admAttendanceRulesDtlDTO.Name = "tiaoxiuri";
+ admAttendanceRulesDtlDTO.RecStatus = "A";
+ admAttendanceRulesDtlDTO.Creater = curentuser.Id;
+ admAttendanceRulesDtlDTO.Createtime = DateTime.Now;
+ admAttendanceRulesDtlDTO.Modifier = admAttendanceRulesDtlDTO.Creater;
+ admAttendanceRulesDtlDTO.Modifytime = admAttendanceRulesDtlDTO.Createtime;
+ resultEntity = _attendanceRuleService.saveDtl(admAttendanceRulesDtlDTO);
+ }
+
+
+ }
+ scope.Complete();
+ }
+
+
+ // var ss = leaveOff;
+ return JsonConvert.SerializeObject(resultEntity);
}
#endregion
}
diff --git a/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs b/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs
index 006781b..e587055 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs
@@ -55,7 +55,7 @@
ViewBag.level = _liaotianService.GetSYScode("experts", "level").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
ViewBag.Province = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList();
// ViewBag.City = _projectService.Getshi( ).Select(x => new { code = x.CodeId, label = x.Name }).ToList();
- ViewBag.level = _liaotianService.GetSYScode("experts", "level").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ ViewBag.ReviewItem = _liaotianService.GetSYScode("experts", "ReviewItem").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
return View();
}
@@ -64,6 +64,7 @@
public string GetList(ExpertDTOSearch search)
{
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ search.ShenheStatus = "A";
ViewData["curentuser"] = curentuser;
return JsonConvert.SerializeObject(_expertService.SearchByPaging(search));
}
@@ -105,7 +106,7 @@
ViewBag.sex = _liaotianService.GetSYScode("plt_user", "sex");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
ViewBag.expertType = _liaotianService.GetSYScode("experts", "expertType");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
ViewBag.level = _liaotianService.GetSYScode("experts", "level");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
-
+ ViewBag.ReviewItem = _liaotianService.GetSYScode("experts", "ReviewItem");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
ViewBag.Province = _projectService.Getsheng();//.Select(x => new { code = x.CodeId, label = x.Name }).ToList();
@@ -180,6 +181,8 @@
{
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ViewData["curentuser"] = curentuser;
+ data.ShenheStatus = "A";
+ data.ReviewItem = data.ReviewItemSelect;
data.RecStatus = "A";
if (String.IsNullOrEmpty(data.Id))
{
@@ -346,5 +349,11 @@
}
#endregion
+
+
+
+
+
+
}
}
diff --git a/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertsApplyController.cs b/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertsApplyController.cs
new file mode 100644
index 0000000..2473722
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Controllers/Expert/ExpertsApplyController.cs
@@ -0,0 +1,160 @@
+锘縰sing Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.Extensions.Logging;
+using IServices;
+using DTO;
+using Newtonsoft.Json;
+using zhengcaioa.Models;
+using Microsoft.AspNetCore.Http;
+using zhengcaioa.IService;
+using System.IO;
+using Microsoft.Extensions.Configuration;
+
+namespace zhengcaioa.Controllers.Expert
+{
+ public class ExpertsApplyController : Controller
+ {
+ private readonly ILogger<ExpertsApplyController> _logger;
+ private readonly IExpertService _expertService;
+ private readonly ILiaotianService _liaotianService;
+ private readonly IProjectService _projectService;
+ private readonly IUserService _userService;
+ public ExpertsApplyController(ILogger<ExpertsApplyController> logger, IExpertService expertService, IProjectService projectService, ILiaotianService liaotianService, IUserService userService)
+ {
+ _logger = logger;
+ _expertService = expertService;
+ _projectService = projectService;
+ _liaotianService = liaotianService;
+ _userService = userService;
+ }
+
+ #region 涓撳鐢宠锛岃瘎瀹�
+
+ public ActionResult ExpertsApply(string id = null)
+ {
+
+ //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 = "Save";
+ actionEntity.PageIco = "glyphicon glyphicon-ok";
+ actionEntity.ActionName = "淇濆瓨";
+ actionlist.Add(actionEntity);
+
+ ViewData["ActionInfo"] = actionlist;
+
+ ExpertDTO expertDTO = new ExpertDTO();
+ if (!string.IsNullOrEmpty(id))
+ {
+ expertDTO = _expertService.Get(id);
+ }
+ else
+ {
+ expertDTO.Province = "510000";
+ expertDTO.City = "510100";
+ }
+ // var sheng = _projectService.Getsheng();
+
+
+ // ViewBag.InfoSource = _liaotianService.GetSYScode("CooperatecustomCustomer", "khly");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ ViewBag.sex = _liaotianService.GetSYScode("plt_user", "sex");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ // ViewBag.expertType = _liaotianService.GetSYScode("experts", "expertType");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ // ViewBag.level = _liaotianService.GetSYScode("experts", "level");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ ViewBag.ReviewItem = _liaotianService.GetSYScode("experts", "ReviewItem");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+
+
+ ViewBag.Province = _projectService.Getsheng();//.Select(x => new { code = x.CodeId, label = x.Name }).ToList();
+ ViewBag.City = _projectService.Getshi(expertDTO.Province);//.Select(x => new { code = x.CodeId, label = x.Name }).ToList();
+ ViewData.Model = expertDTO;
+ return View();
+ }
+
+
+
+
+
+ //public string Get(string id = null)
+ //{
+ // ExpertDTO expertDTO = new ExpertDTO();
+ // if (!String.IsNullOrEmpty(id))
+ // {
+ // expertDTO = _expertService.Get(id);
+ // }
+
+ // return JsonConvert.SerializeObject(expertDTO);
+ //}
+
+
+ /// <summary>
+ /// 淇濆瓨
+ /// </summary>
+ /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param>
+ /// <returns></returns>
+ [HttpPost]
+
+ public string ExpertsApplySave(ExpertDTO data)
+ {
+ //var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ //ViewData["curentuser"] = curentuser;
+ data.ReviewItem = data.ReviewItemSelect;
+ data.InfoSource = "00";
+ data.ExpertType = "0";
+ data.Level = "0";
+ data.RecStatus = "A";
+ data.ShenheStatus = "D";
+ if (String.IsNullOrEmpty(data.Id))
+ {
+ data.Creater = "1";
+ data.Createtime = DateTime.Now;
+ }
+ data.Modifier = "1";
+ data.Modifytime = DateTime.Now;
+
+ ResultEntity resultEntity = _expertService.save(data);
+
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ #endregion
+
+
+
+ public IActionResult Index()
+ {
+ 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.expertType = _liaotianService.GetSYScode("experts", "expertType").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ ViewBag.level = _liaotianService.GetSYScode("experts", "level").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ ViewBag.Province = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList();
+ // ViewBag.City = _projectService.Getshi( ).Select(x => new { code = x.CodeId, label = x.Name }).ToList();
+ ViewBag.ReviewItem = _liaotianService.GetSYScode("experts", "ReviewItem").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ return View();
+ }
+
+ #region 鏌ヨ
+ [CheckLogin]
+ public string GetList(ExpertDTOSearch search)
+ {
+ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ search.ShenheStatus = "D";
+ ViewData["curentuser"] = curentuser;
+ return JsonConvert.SerializeObject(_expertService.SearchByPaging(search));
+ }
+ #endregion
+ }
+}
diff --git a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
index ee71b47..440d18c 100644
--- a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
@@ -450,7 +450,9 @@
var td1 = table[i + 1].QuerySelector("td");
if (td1 != null)
{
- projectDTO.Zhuanjia = table[i + 1].QuerySelector("td").TextContent.Trim();//OuterHtml
+ string ssss = table[i + 1].QuerySelector("td").TextContent.Trim();
+ ssss = ssss.Replace("锛堢粍闀匡級", "").Replace("(缁勯暱)", "").Replace(",", "銆�").Replace("锛堣瘎瀹$粍闀匡級", "").Replace("(璇勫缁勯暱)", "").Replace("锛�", "銆�").Replace("璇勫缁勯暱锛�", "").Replace("缁勯暱锛�", "").Replace("缁勫憳锛�","");
+ projectDTO.Zhuanjia = ssss;//OuterHtml
}
}
diff --git a/zhengcaioa/zhengcaioa/Startup.cs b/zhengcaioa/zhengcaioa/Startup.cs
index eebad5c..444a18f 100644
--- a/zhengcaioa/zhengcaioa/Startup.cs
+++ b/zhengcaioa/zhengcaioa/Startup.cs
@@ -110,6 +110,9 @@
services.AddScoped(typeof(IFiMemberService), typeof(FiMemberService));
services.AddScoped(typeof(IFiBookService), typeof(FiBookService));
+ services.AddScoped(typeof(IAdmAttendanceRuleService), typeof(AdmAttendanceRuleService));
+
+
services.AddAutoMapper(typeof(AutoMapperConfigs));
services.AddUEditorService("ueditor.json", true, "wwwroot");
services.AddMvc(options =>{
diff --git a/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml
index 58d6415..17b3a96 100644
--- a/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Edit.cshtml
@@ -473,6 +473,8 @@
};
$("#Ywjl").chosen();
+ $("#Hyfl").chosen();
+
var id = '@Model.Id';
var bUpload = false;
diff --git a/zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml
index e036a26..f73c653 100644
--- a/zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/Expert/Edit.cshtml
@@ -8,9 +8,11 @@
List<SysCodeDtl> InfoSource = ViewData["InfoSource"] as List<SysCodeDtl>; //瀹㈡埛鏉ユ簮
List<SysCodeDtl> expertType = ViewData["expertType"] as List<SysCodeDtl>; //涓撳绫诲瀷
List<SysCodeDtl> level = ViewData["level"] as List<SysCodeDtl>; //涓撳绛夌骇
+ List<SysCodeDtl> ReviewItem = ViewData["ReviewItem"] as List<SysCodeDtl>; //璇勫鍝佺洰
+
}
@{
- Layout = null;
+ Layout = null;
}
<!DOCTYPE html>
@@ -233,7 +235,7 @@
}
}
- }
+
</select>
@@ -252,7 +254,31 @@
<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="ReviewItem" id="ReviewItem" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.ReviewItem" autocomplete="off">
+ <select id="ReviewItem" class="form-control" name="ReviewItem" multiple data-placeholder="閫夋嫨 搴忓垪 ...">
+ <option value="" hassubinfo="true">璇烽�夋嫨</option>
+ @foreach (var item in ReviewItem)
+ {
+ @if (Model.ReviewItem !=null && Model.ReviewItem.Split(',').Contains(item.CodeSn))
+ {
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeSn" hassubinfo="true" >
+ @item.Comments
+ </option>
+ }
+
+ }
+
+
+ </select>
+
+
+
+
</div>
</div>
@@ -265,7 +291,7 @@
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">鎵�灞炲尯鍩�</label>
<div class="col-sm-2 col-md-2">
- <div style="width:120px;float:left;">
+ <div style="width:110px;float:left;">
<select id="Province" class="form-control" name="Province" data-placeholder="閫夋嫨 搴忓垪 ..." style="font-weight:normal;">
<option value="" hassubinfo="true">璇烽�夋嫨</option>
@foreach (var item in Province)
@@ -288,7 +314,7 @@
</select>
</div>
- <div style="width:120px;float:left;">
+ <div style="width:110px;float:left;">
<select id="City" class="form-control" name="City" data-placeholder="閫夋嫨 搴忓垪 ..." style="font-weight:normal;">
<option value="" hassubinfo="true">璇烽�夋嫨</option>
@foreach (var item in City)
@@ -323,14 +349,14 @@
</div>
<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-right col-sm-1 col-md-1 control-label">鑱旂郴鐢佃瘽1</label>
<div class="col-sm-2 col-md-2">
- <input class="form-control" label="鑱旂郴鐢佃瘽" name="Phone1" id="Phone1" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Phone1" autocomplete="off">
+ <input class="form-control" label="鑱旂郴鐢佃瘽1" name="Phone1" id="Phone1" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Phone1" autocomplete="off">
</div>
- <label class="text-right col-sm-1 col-md-1 control-label">鑱旂郴鐢佃瘽</label>
+ <label class="text-right col-sm-1 col-md-1 control-label">鑱旂郴鐢佃瘽2</label>
<div class="col-sm-2 col-md-2">
- <input class="form-control" label="鑱旂郴鐢佃瘽" name="Phone2" id="Phone2" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Phone2" autocomplete="off">
+ <input class="form-control" label="鑱旂郴鐢佃瘽2" name="Phone2" id="Phone2" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Phone2" autocomplete="off">
</div>
<label class="text-right col-sm-1 col-md-1 control-label">QQ</label>
@@ -728,7 +754,14 @@
});
}
+
+ $("#ReviewItem").chosen({
+ search_contains: true,
+ disable_search_threshold: 5
+ });
+
+
});
@@ -841,7 +874,7 @@
//var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" }
$.ajax({
type: "POST",
- url: "/Expert/Save",
+ url: "/Expert/Save?ReviewItemSelect=" + $("#ReviewItem").val(),
dataType: "json",
global: false,
data: $('form').serializeArray(),
diff --git a/zhengcaioa/zhengcaioa/Views/Expert/Index.cshtml b/zhengcaioa/zhengcaioa/Views/Expert/Index.cshtml
index ecf541f..e05866f 100644
--- a/zhengcaioa/zhengcaioa/Views/Expert/Index.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/Expert/Index.cshtml
@@ -9,6 +9,7 @@
var expertType = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.expertType))';
var Province = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Province))';
var level = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.level))';
+ var ReviewItem = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ReviewItem))';
dataCol = [
{ label: 'id', name: 'Id', labtype: 'txt', hidden: true },
@@ -20,8 +21,8 @@
}
},
{ label: '涓撳璇佸彿', name: 'CertiNumber', labtype: 'txt', hidden: false },
- { label: '涓昏璇勫鍝佺洰', name: 'ReviewItem', labtype: 'txt', hidden: false },
- { label: '涓撳绛夌骇', name: 'Level', labtype: 'txt', hidden: false },
+ { label: '涓昏璇勫鍝佺洰', name: 'ReviewItem', labtype: 'txt', hidden: true },
+ { label: '涓撳绛夌骇', name: 'LevelName', labtype: 'txt', hidden: false },
{ label: '鑱旂郴鐢佃瘽', name: 'Phone1', labtype: 'txt', hidden: false },
{ label: '鍚堜綔娆℃暟', name: 'Level', labtype: 'txt', hidden: true },
{
@@ -62,7 +63,7 @@
{ label: '甯�', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '1%', cccwidth: '7%' },
{ label: '涓撳濮撳悕', name: 'Name', labtype: 'txt', hidden: false },
{ label: '涓撳绫诲瀷', name: 'ExpertType', labtype: 'combox', hidden: false, data: JSON.parse(expertType)/*,cwidth: '5%', cccwidth: '28%' */ },
- { label: '璇勫鍝佺洰', name: 'ReviewItem', labtype: 'txt', hidden: false },
+ { label: '璇勫鍝佺洰', name: 'ReviewItem', labtype: 'combox', hidden: false, data: JSON.parse(ReviewItem) },
{ label: '涓撳绾у埆', name: 'Level', labtype: 'combox', hidden: false, data: JSON.parse(level) },
{ label: '涓撳璇佸彿', name: 'CertiNumber', labtype: 'txt', hidden: false },
{ label: '鑱旂郴鐢佃瘽', name: 'Phone1', labtype: 'txt', hidden: false },
@@ -112,7 +113,7 @@
global: false,
data: "",
success: function (data) {
-
+
var city = $("#PBSCity");
city.find('option').remove();
var aaa = '<option value="" hassubinfo="true">璇烽�夋嫨</option>';
diff --git a/zhengcaioa/zhengcaioa/Views/ExpertsApply/ExpertsApply.cshtml b/zhengcaioa/zhengcaioa/Views/ExpertsApply/ExpertsApply.cshtml
new file mode 100644
index 0000000..1fef082
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/ExpertsApply/ExpertsApply.cshtml
@@ -0,0 +1,946 @@
+锘緻model DTO.ExpertDTO
+@using DTO;
+@using zhengcaioa.Models;
+@{
+ List<Area> Province = ViewData["Province"] as List<Area>; //鐪�
+ List<Area> City = ViewData["City"] as List<Area>; //甯�
+ List<SysCodeDtl> Sex = ViewData["sex"] as List<SysCodeDtl>; //瀹㈡埛绫诲瀷
+ //List<SysCodeDtl> InfoSource = ViewData["InfoSource"] as List<SysCodeDtl>; //瀹㈡埛鏉ユ簮
+ //List<SysCodeDtl> expertType = ViewData["expertType"] as List<SysCodeDtl>; //涓撳绫诲瀷
+ //List<SysCodeDtl> level = ViewData["level"] as List<SysCodeDtl>; //涓撳绛夌骇
+ List<SysCodeDtl> ReviewItem = ViewData["ReviewItem"] 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;
+ }
+
+ .img-box {
+ height: 120px;
+ width: 120px;
+ float: left;
+ padding-left: 0px !important;
+ padding-right: 20px;
+ /*border:1px solid #c3cbe5;*/
+ }
+
+ .img-box img {
+ height: 80px;
+ width: 80px;
+ }
+
+ .img-box p {
+ width: 80px;
+ text-align: center;
+ }
+
+ .img-row {
+ height: 80px !important;
+ padding-right: 2px !important;
+ }
+
+ .img-row label {
+ height: 30px;
+ line-height: 80px;
+ }
+ </style>
+
+ <!-- jqgrid-->
+ <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
+ <script src="~/js/bootstrap.min.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/imgUpload.js"></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">淇℃伅鏉ユ簮<i class="red">*</i></label>
+ <div class="col-sm-2 col-md-2">
+ <select id="InfoSource" class="form-control" name="InfoSource" data-placeholder="閫夋嫨 搴忓垪 ..." style="font-weight:normal;">
+ <option value="" hassubinfo="true">璇烽�夋嫨</option>
+ @foreach (var item in InfoSource)
+ {
+ @if (!item.CodeSn.Equals(Model.InfoSource))
+ {
+ <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="Id" name="Id" value="@Model.Id" />
+ </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="ExpertType" class="form-control" name="expertType" data-placeholder="閫夋嫨 搴忓垪 ...">
+ <option value="" hassubinfo="true">璇烽�夋嫨</option>
+ @foreach (var item in expertType)
+ {
+ @if (!item.CodeSn.Equals(Model.ExpertType))
+ {
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
+ }
+
+ }
+ }
+
+ </select>
+
+ </div>*@
+ <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">
+ <input class="form-control" label="璇︾粏鍦板潃" name="Name" id="Name" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Name" autocomplete="off">
+ </div>
+ <label class="text-right col-sm-1 col-md-1 control-label">鎬у埆<i class="red">*</i></label>
+ <div class="col-sm-2 col-sm-2" grouptype="Vdata">
+ <select id="Sex" class="form-control" name="Sex" data-placeholder="閫夋嫨 搴忓垪 ..." style="font-weight:normal;">
+ <option value="" hassubinfo="true">璇烽�夋嫨</option>
+ @foreach (var item in Sex)
+ {
+ @if (!item.CodeId.Equals(Model.Sex))
+ {
+ <option value="@item.CodeId" hassubinfo="true">
+ @item.Comments
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeId" hassubinfo="true" selected="selected">
+ @item.Comments
+ </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">涓撳绾у埆<i class="red">*</i></label>
+ <div class="col-sm-2 col-md-2" grouptype="Vdata">
+ <select id="Level" class="form-control" name="Level" data-placeholder="閫夋嫨 搴忓垪 ...">
+ <option value="" hassubinfo="true">璇烽�夋嫨</option>
+ @foreach (var item in level)
+ {
+ @if (!item.CodeSn.Equals(Model.Level))
+ {
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
+ }
+
+ }
+
+
+ </select>
+
+ </div>*@
+
+ <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" grouptype="Vdata">
+ <input class="form-control" label="韬唤璇佸彿" name="IdCard" id="IdCard" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.IdCard" autocomplete="off">
+ </div>
+
+ <label 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="CertiNumber" id="CertiNumber" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.CertiNumber">
+ </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="ReviewItem" class="form-control" name="ReviewItem" multiple data-placeholder="閫夋嫨 搴忓垪 ...">
+ <option value="" hassubinfo="true">璇烽�夋嫨</option>
+ @foreach (var item in ReviewItem)
+ {
+ @if (Model.ReviewItem != null && Model.ReviewItem.Split(',').Contains(item.CodeSn))
+ {
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
+ }
+
+ }
+
+
+ </select>
+
+
+
+
+ </div>
+ </div>
+
+
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+ <label class="text-right col-sm-1 col-md-1 control-label">閫氫俊鍦板潃</label>
+ <div class="col-sm-5 col-md-5">
+ <input class="form-control" label="閫氫俊鍦板潃" name="Address" id="Address" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Address" autocomplete="off">
+ </div>
+
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">鎵�灞炲尯鍩�</label>
+ <div class="col-sm-2 col-md-2">
+ <div style="width:110px;float:left;">
+ <select id="Province" class="form-control" name="Province" data-placeholder="閫夋嫨 搴忓垪 ..." style="font-weight:normal;">
+ <option value="" hassubinfo="true">璇烽�夋嫨</option>
+ @foreach (var item in Province)
+ {
+ @if (!item.CodeId.Equals(Model.Province))
+ {
+ <option value="@item.CodeId" hassubinfo="true">
+ @item.Name
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeId" hassubinfo="true" selected="selected">
+ @item.Name
+ </option>
+ }
+
+
+ }
+
+ </select>
+ </div>
+ <div style="width:110px;float:left;">
+ <select id="City" class="form-control" name="City" data-placeholder="閫夋嫨 搴忓垪 ..." style="font-weight:normal;">
+ <option value="" hassubinfo="true">璇烽�夋嫨</option>
+ @foreach (var item in City)
+ {
+ @if (!item.CodeId.Equals(Model.City))
+ {
+ <option value="@item.CodeId" hassubinfo="true">
+ @item.Name
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeId" hassubinfo="true" selected="selected">
+ @item.Name
+ </option>
+ }
+
+
+ }
+
+ </select>
+ </div>
+ </div>
+
+
+
+ <label class="text-right col-sm-1 col-md-1 control-label">閭斂缂栫爜</label>
+ <div class="col-sm-2 col-md-2">
+ <input class="form-control" label="閭斂缂栫爜" name="Postal" id="Postal" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Postal" autocomplete="off">
+ </div>
+
+
+ </div>
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+ <label class="text-right col-sm-1 col-md-1 control-label">鑱旂郴鐢佃瘽1</label>
+ <div class="col-sm-2 col-md-2">
+ <input class="form-control" label="鑱旂郴鐢佃瘽1" name="Phone1" id="Phone1" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Phone1" autocomplete="off">
+ </div>
+
+ <label class="text-right col-sm-1 col-md-1 control-label">鑱旂郴鐢佃瘽2</label>
+ <div class="col-sm-2 col-md-2">
+ <input class="form-control" label="鑱旂郴鐢佃瘽2" name="Phone2" id="Phone2" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Phone2" autocomplete="off">
+ </div>
+
+ <label class="text-right col-sm-1 col-md-1 control-label">QQ</label>
+ <div class="col-sm-2 col-md-2">
+ <input class="form-control" label="QQ鍙�" name="Qq" id="Qq" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Qq" autocomplete="off">
+ </div>
+
+ <label class="text-right col-sm-1 col-md-1 control-label">寰俊</label>
+ <div class="col-sm-2 col-md-2">
+ <input class="form-control" label="寰俊" name="Wechat" id="Wechat" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Wechat" autocomplete="off">
+ </div>
+
+ </div>
+
+
+ @*<div class="ibox-title">
+ <h5> <i class="fa fa-list"></i> 瀹㈡埛璧勬枡</h5>
+ </div>*@
+ <style>
+ .divImg {
+ height: 80px;
+ width: 80px;
+ }
+ </style>
+
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+ <div class="col-sm-1 col-md-1 img-row">
+ <label class="text-right control-label">涓撳璇佷功</label>
+ </div>
+ <div class="col-sm-6 col-md-6">
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="frontImg" class="frontImg"></div>
+ <input type="hidden" id="CertiFont" name="CertiFont" value="@Model.CertiFont" />
+ <p>涓婁紶姝i潰</p>
+ </div>
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="BackImg" class="BackImg"></div>
+ <input type="hidden" id="CertiBack" name="CertiBack" value="@Model.CertiBack" />
+ <p>涓婁紶鑳岄潰</p>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+ <div class="col-sm-1 col-md-1 img-row">
+ <label class="text-right control-label">鑱岀О璇佷功</label>
+ </div>
+
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg" class="TitileImg"></div>
+ <input type="hidden" id="TitileCerti" name="TitileCerti" value="@Model.TitileCerti" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg1" class="TitileImg1"></div>
+ <input type="hidden" id="TitileCerti1" name="TitileCerti1" value="@Model.TitileCerti1" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg2" class="TitileImg2"></div>
+ <input type="hidden" id="TitileCerti2" name="TitileCerti2" value="@Model.TitileCerti2" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg3" class="TitileImg3"></div>
+ <input type="hidden" id="TitileCerti3" name="TitileCerti3" value="@Model.TitileCerti3" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg4" class="TitileImg4"></div>
+ <input type="hidden" id="TitileCerti4" name="TitileCerti4" value="@Model.TitileCerti4" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+ @*</div>
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+ <div class="col-sm-1 col-md-1 img-row">
+
+ </div>*@
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg5" class="TitileImg5"></div>
+ <input type="hidden" id="TitileCerti5" name="TitileCerti5" value="@Model.TitileCerti5" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+
+
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg6" class="TitileImg6"></div>
+ <input type="hidden" id="TitileCerti6" name="TitileCerti6" value="@Model.TitileCerti6" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg7" class="TitileImg7"></div>
+ <input type="hidden" id="TitileCerti7" name="TitileCerti7" value="@Model.TitileCerti7" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg8" class="TitileImg8"></div>
+ <input type="hidden" id="TitileCerti8" name="TitileCerti8" value="@Model.TitileCerti8" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg9" class="TitileImg9"></div>
+ <input type="hidden" id="TitileCerti9" name="TitileCerti9" value="@Model.TitileCerti9" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+ <div class="col-sm-2 col-md-2 img-box">
+ <div id="TitileImg10" class="TitileImg10"></div>
+ <input type="hidden" id="TitileCerti10" name="TitileCerti10" value="@Model.TitileCerti10" />
+ <p>涓婁紶鑱岀О璇佷功</p>
+ </div>
+
+ </div>
+
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+
+ <label class="text-right col-sm-1 col-md-1 control-label">澶囨敞</label>
+ <div class="col-sm-6 col-md-6">
+ <textarea id="Remark" name="Remark" style="overflow-y:hidden" cols="100" rows="10">@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="saveExpert();" 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"
+ };
+
+ var imgs = {
+ BackImg: '',
+ BackImg: '',
+ TitileImg: '',
+ TitileImg1: '',
+ TitileImg2: '',
+ TitileImg3: '',
+ TitileImg4: '',
+ TitileImg5: '',
+ TitileImg6: '',
+ TitileImg7: '',
+ TitileImg8: '',
+ TitileImg9: '',
+ TitileImg10: '',
+
+ }
+
+
+
+ var imgPath = "@Url.Content("~/UploadFile/")";
+
+ //鍒濆鍖栧浘鐗囦笂浼燿iv
+ new DragImgUpload("#frontImg", {
+ callback: function (files) {
+ imgs.frontImg = imgUploadCallback(files);
+ if (imgs.frontImg !== "") {
+ $("#CertiFont").val(imgPath + imgs.frontImg);
+ }
+ }
+ });
+ new DragImgUpload("#BackImg", {
+ callback: function (files) {
+ imgs.BackImg = imgUploadCallback(files);
+ if (imgs.BackImg !== "") {
+ $("#CertiBack").val(imgPath + imgs.BackImg);
+ }
+ }
+ });
+ new DragImgUpload("#TitileImg", {
+ callback: function (files) {
+ imgs.TitileImg = imgUploadCallback(files);
+ if (imgs.TitileImg !== "") {
+ $("#TitileCerti").val(imgPath + imgs.TitileImg);
+ }
+
+ }
+ });
+ new DragImgUpload("#TitileImg1", {
+ callback: function (files) {
+ imgs.TitileImg1 = imgUploadCallback(files);
+ if (imgs.TitileImg1!== "") {
+ $("#TitileCerti1").val(imgPath + imgs.TitileImg1);
+ }
+
+ }
+ });
+ new DragImgUpload("#TitileImg2", {
+ callback: function (files) {
+ imgs.TitileImg2 = imgUploadCallback(files);
+ if (imgs.TitileImg2 !== "") {
+ $("#TitileCerti2").val(imgPath + imgs.TitileImg2);
+ }
+
+ }
+ });
+ new DragImgUpload("#TitileImg3", {
+ callback: function (files) {
+ imgs.TitileImg3 = imgUploadCallback(files);
+ if (imgs.TitileImg3 !== "") {
+ $("#TitileCerti3").val(imgPath + imgs.TitileImg3);
+ }
+
+ }
+ });
+ new DragImgUpload("#TitileImg4", {
+ callback: function (files) {
+ imgs.TitileImg4 = imgUploadCallback(files);
+ if (imgs.TitileImg4 !== "") {
+ $("#TitileCerti4").val(imgPath + imgs.TitileImg4);
+ }
+
+ }
+ });
+ new DragImgUpload("#TitileImg5", {
+ callback: function (files) {
+ imgs.TitileImg5 = imgUploadCallback(files);
+ if (imgs.TitileImg5 !== "") {
+ $("#TitileCerti5").val(imgPath + imgs.TitileImg5);
+ }
+
+ }
+ });
+ new DragImgUpload("#TitileImg6", {
+ callback: function (files) {
+ imgs.TitileImg6 = imgUploadCallback(files);
+ if (imgs.TitileImg6 !== "") {
+ $("#TitileCerti6").val(imgPath + imgs.TitileImg6);
+ }
+
+ }
+ });
+ new DragImgUpload("#TitileImg7", {
+ callback: function (files) {
+ imgs.TitileImg7 = imgUploadCallback(files);
+ if (imgs.TitileImg7 !== "") {
+ $("#TitileCerti7").val(imgPath + imgs.TitileImg7);
+ }
+
+ }
+ });
+ new DragImgUpload("#TitileImg8", {
+ callback: function (files) {
+ imgs.TitileImg8 = imgUploadCallback(files);
+ if (imgs.TitileImg8 !== "") {
+ $("#TitileCerti8").val(imgPath + imgs.TitileImg8);
+ }
+
+ }
+ });
+ new DragImgUpload("#TitileImg9", {
+ callback: function (files) {
+ imgs.TitileImg9 = imgUploadCallback(files);
+ if (imgs.TitileImg9 !== "") {
+ $("#TitileCerti9").val(imgPath + imgs.TitileImg9);
+ }
+
+ }
+ });
+ new DragImgUpload("#TitileImg10", {
+ callback: function (files) {
+ imgs.TitileImg10 = imgUploadCallback(files);
+ if (imgs.TitileImg10 !== "") {
+ $("#TitileCerti10").val(imgPath + imgs.TitileImg10);
+ }
+
+ }
+ });
+
+ $(function () {
+
+
+ imgs.frontImg = $.trim( $("#CertiFont").val() );
+ imgs.BackImg = $.trim( $("#CertiBack").val());
+ imgs.TitileImg = $.trim($("#TitileCerti").val());
+ imgs.TitileImg1 = $.trim($("#TitileCerti1").val());
+ imgs.TitileImg2 = $.trim($("#TitileCerti2").val());
+ imgs.TitileImg3 = $.trim($("#TitileCerti3").val());
+ imgs.TitileImg4 = $.trim($("#TitileCerti4").val());
+ imgs.TitileImg5 = $.trim($("#TitileCerti5").val());
+ imgs.TitileImg6 = $.trim($("#TitileCerti6").val());
+ imgs.TitileImg7 = $.trim($("#TitileCerti7").val());
+ imgs.TitileImg8 = $.trim($("#TitileCerti8").val());
+ imgs.TitileImg9 = $.trim($("#TitileCerti9").val());
+ imgs.TitileImg10 = $.trim($("#TitileCerti10").val());
+
+ if (imgs.frontImg !== "") {
+ $("#frontImg img").each(function (i) {
+ $(this).attr("src", imgs.frontImg);
+ });
+ }
+
+ if (imgs.BackImg !== "") {
+
+ $("#BackImg img").each(function (i) {
+ $(this).attr("src", imgs.BackImg);
+ });
+ }
+
+ if (imgs.TitileImg !== "") {
+ $("#TitileImg img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg);
+ });
+ }
+
+ if (imgs.TitileImg1 !== "") {
+ $("#TitileImg1 img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg1);
+ });
+ }
+
+ if (imgs.TitileImg2 !== "") {
+ $("#TitileImg2 img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg2);
+ });
+ }
+
+ if (imgs.TitileImg3 !== "") {
+ $("#TitileImg3 img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg3);
+ });
+ }
+
+ if (imgs.TitileImg4 !== "") {
+ $("#TitileImg4 img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg4);
+ });
+ }
+
+ if (imgs.TitileImg5 !== "") {
+ $("#TitileImg5 img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg5);
+ });
+ }
+
+ if (imgs.TitileImg6 !== "") {
+ $("#TitileImg6 img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg6);
+ });
+ }
+
+ if (imgs.TitileImg7 !== "") {
+ $("#TitileImg7 img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg7);
+ });
+ }
+
+ if (imgs.TitileImg8 !== "") {
+ $("#TitileImg8 img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg8);
+ });
+ }
+
+ if (imgs.TitileImg9 !== "") {
+ $("#TitileImg9 img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg9);
+ });
+ }
+
+ if (imgs.TitileImg10 !== "") {
+ $("#TitileImg10 img").each(function (i) {
+ $(this).attr("src", imgs.TitileImg10);
+ });
+ }
+
+
+
+ $("#ReviewItem").chosen({
+ search_contains: true,
+ disable_search_threshold: 5
+ });
+
+
+ });
+
+
+
+
+ function imgUploadCallback(files) {
+ var fileName = "";
+ var file = files[0];
+ var sendData = new FormData();
+ sendData.append('img', files[0]);
+ $.ajax({
+ type: "post",
+ url: "@Url.Content("~/Expert/UploadImage")",
+ data: sendData,
+ async:false,
+ contentType: false,
+ processData: false,
+ success: function (res) {
+ fileName = res;// FilePath + file.name;
+ //parent.layer.msg("淇敼鎴愬姛锛�");
+ },
+ error: function (data) {
+ fileName = "";
+ }
+ });
+
+ return fileName;
+ };
+ var id = '@Model.Id';
+ var bUpload = false;
+ var bAdd = false; // 鏂板鎿嶄綔
+ var fileId = ""; // 涓婁紶鏂囦欢鐢熸垚鐨処d
+ var bEditFile = false; // 缂栬緫鏃讹紝鏄惁鍏宠仈浜嗛檮浠�
+ var bDeleteFile = false; // 鍒犻櫎鎿嶄綔
+ var attachment_id = 0; // 闄勪欢id
+ var imgLoad = new Object();
+
+
+
+
+
+ // 淇濆瓨宀椾綅淇℃伅
+ var saveExpert = function () {
+
+ if ($("#Name").val() == '') {
+ toastr.warning("涓撳濮撳悕涓嶈兘涓虹┖");
+ return;
+ };
+ if (Verify.isNull($("#Province").val()) || Verify.isNull($("#City").val()) ) {
+ toastr.warning("鍖哄煙涓嶈兘涓虹┖");
+ return;
+ }
+ if ($("#IdCard").val() == '') {
+ toastr.warning("韬唤璇佸彿涓嶈兘涓虹┖");
+ return;
+ }
+
+
+
+ if ($.trim($("#ReviewItem").val()) == '') {
+ toastr.warning("璇勫椤圭洰涓嶈兘涓虹┖");
+ return;
+ }
+
+ if ($("#Sex").val() == '') {
+ 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: "/ExpertsApply/ExpertsApplySave?ReviewItemSelect=" + $("#ReviewItem").val(),
+ dataType: "json",
+ global: false,
+ data: $('form').serializeArray(),
+ success: function (data) {
+
+
+
+ if (data.Result) {
+ // parent._afterSave(true);
+
+ //window.location = "/Project/add?id=" + data.ReturnID;
+ layer.msg('鎴愬姛淇濆瓨', { icon: 5 }, function () {
+ try {
+ _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶
+ }
+ catch (err) {
+ try {
+ parent._CloseTab1("/ExpertsApply/ExpertsApply");
+ }
+ catch (err) {
+
+ var browserName = navigator.appName;
+ if (browserName == "Netscape") {
+ window.location.href = "about:blank";聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽//鍏抽敭鏄繖鍙ヨ瘽
+ window.close();
+ } else if (browserName == "Microsoft Internet Explorer") {
+ window.opener = null;
+ window.close();
+ }
+
+ }
+ }
+ });
+
+
+
+ }
+ else {
+ // toastr.error("澶辫触");
+ layer.msg(data.Message, { icon: 5 });
+ }
+
+ },
+ error: function () {
+
+
+ layer.msg('澶辫触', { icon: 5 });
+ }
+ });
+ }
+
+
+ $("#Province").change(function () {
+
+ var sheng = $("#Province").val();
+ $.ajax({
+ type: "GET",
+ url: "/Project/getCity?shengid=" + sheng,
+ dataType: "json",
+ global: false,
+ data: "",
+ success: function (data) {
+
+ var city = $("#City");
+ 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);
+ }
+ }
+ },
+ error: function () {
+
+
+ parent.layer.msg('澶辫触', { icon: 5 });
+ }
+ });
+ });
+
+
+
+
+
+ function addresschushi() {
+ var sheng = $.trim($("#Province").find("option:selected").text());
+ var city = $.trim($("#City").find("option:selected").text());
+ var Address = $("#Address");
+
+ Address.val(sheng + city + AreaId.replace("璇烽�夋嫨", ""));
+ }
+
+ if ($("#Id").val() == '') {
+
+ addresschushi();
+ }
+
+
+ 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;
+ }
+ </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/zhengcaioa/zhengcaioa/Views/ExpertsApply/Index.cshtml b/zhengcaioa/zhengcaioa/Views/ExpertsApply/Index.cshtml
new file mode 100644
index 0000000..32db5aa
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/ExpertsApply/Index.cshtml
@@ -0,0 +1,124 @@
+锘緻{
+ ViewBag.Title = "Expert";
+ Layout = "~/Views/Shared/_Layout_Search.cshtml";
+}
+@section headerStyle{
+ <script type="text/javascript">
+
+
+ @*var expertType = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.expertType))';*@
+ var Province = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Province))';
+ var ReviewItem = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ReviewItem))';
+
+ dataCol = [
+ { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
+
+ {
+ label: '濮撳悕', name: 'Name', labtype: 'txt', hidden: false
+ },
+ { label: '涓撳璇佸彿', name: 'CertiNumber', labtype: 'txt', hidden: false },
+ { label: '涓昏璇勫鍝佺洰', name: 'ReviewItem', labtype: 'txt', hidden: true },
+ { label: '涓撳绛夌骇', name: 'LevelName', labtype: 'txt', hidden: true },
+ { label: '鑱旂郴鐢佃瘽', name: 'Phone1', labtype: 'txt', hidden: false },
+ { label: '鍚堜綔娆℃暟', name: 'Level', labtype: 'txt', hidden: true },
+ {
+ label: '涓撳璇�', name: 'CertiFont', align: "center", sortable: false, editable: true,// labtype: 'txt', hidden: false
+ formatter: function (cellvalue, options, rowObject) {
+ return '<img src="' + rowObject.CertiFont + '" style="width:50px;height:30px;" />' +
+ '<img src="' + rowObject.CertiBack + '" style="width:50px;height:30px;" />';
+ }
+ },
+ {
+ label: '鑱岀О璇�', name: 'TitileCerti', align: "center", sortable: false, editable: true, //labtype: 'txt', hidden: false,
+ formatter: function (cellvalue, options, rowObject) {
+ // return '<img src="' + cellvalue + '" style="width:50px;height:30px;" />';
+ return '<img src="' + rowObject.TitileCerti + '" style="width:50px;height:30px;" />';
+ }
+ },
+
+
+ {
+ label: '瀹℃牳', name: '', labtype: 'txt', hidden: false,
+ formatter: function (cellvalue, options, rowObject) {
+ return "<a onclick=\"OpenWindow('涓撳瀹℃牳','98%','100%', '/expert/Edit?id=" + rowObject.Id + "')\" >瀹℃牳</a>";
+ }
+ },
+
+ { label: '鐘舵��', name: 'RecStatus', labtype: 'txt', hidden: true },
+ { label: '鍒涘缓浜�', name: 'Creater', labtype: 'txt', hidden: true },
+ { label: '鍒涘缓鏃堕棿', name: 'Createtime', labtype: 'txt', hidden: true },
+ { label: '淇敼浜�', name: 'Modifier', labtype: 'txt', hidden: true },
+ { label: '淇敼鏃堕棿', name: 'Modifytime', labtype: 'txt', hidden: true }
+
+ ];
+ dataUrl = "/ExpertsApply/GetList";
+ searchCol = [
+ { label: '褰曞叆鏃堕棿', name: 'Createtime', labtype: 'datearea', hidden: false },
+ { label: '鐪�', name: 'Province', labtype: 'combox', hidden: false, data: JSON.parse(Province), cwidth: '5%', cccwidth: '6.5%' },
+ { label: '甯�', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '1%', cccwidth: '7%' },
+ { label: '涓撳濮撳悕', name: 'Name', labtype: 'txt', hidden: false },
+ //{ label: '涓撳绫诲瀷', name: 'ExpertType', labtype: 'combox', hidden: false, data: JSON.parse(expertType)/*,cwidth: '5%', cccwidth: '28%' */ },
+ { label: '璇勫鍝佺洰', name: 'ReviewItem', labtype: 'combox', hidden: false, data: JSON.parse(ReviewItem)},
+ //{ label: '涓撳绾у埆', name: 'Level', labtype: 'combox', hidden: false, data: JSON.parse(level) },
+ { label: '涓撳璇佸彿', name: 'CertiNumber', labtype: 'txt', hidden: false },
+ { label: '鑱旂郴鐢佃瘽', name: 'Phone1', labtype: 'txt', hidden: false },
+ //{ label: '鍚堜綔娆℃暟>=', name: 'JoinCount', 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("鍒犻櫎鎴愬姛");
+ /**/
+ }
+ }
+
+
+ $(function () {
+ $("#PBSProvince").change(function () {
+ let Province = $("#PBSProvince").val();
+ $.ajax({
+ type: "GET",
+ url: "/Project/getCity?shengid=" + Province,
+ 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 () { }
+ });
+ });
+
+
+ });
+ </script>
+}
+
diff --git a/zhengcaioa/zhengcaioa/Views/Project/Add.cshtml b/zhengcaioa/zhengcaioa/Views/Project/Add.cshtml
index 669980e..1db8bf7 100644
--- a/zhengcaioa/zhengcaioa/Views/Project/Add.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/Project/Add.cshtml
@@ -723,7 +723,7 @@
}
else {
// toastr.error("澶辫触");
- parent.layer.msg('澶辫触', { icon: 5 });
+ parent.layer.msg(data.Message, { icon: 5 });
}
},
diff --git a/zhengcaioa/zhengcaioa/Views/Signin/AttendanceRule.cshtml b/zhengcaioa/zhengcaioa/Views/Signin/AttendanceRule.cshtml
index 306dbd6..0beb6b4 100644
--- a/zhengcaioa/zhengcaioa/Views/Signin/AttendanceRule.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/Signin/AttendanceRule.cshtml
@@ -1,5 +1,15 @@
-锘緻{
+锘緻model DTO.AdmAttendanceRuleDTO
+@using DTO;
+@using zhengcaioa.Models;
+@{
Layout = null;
+ List< AdmAttendanceRulesDtlDTO > admAttendanceRulesDtlDTOs = Model.admAttendanceRulesDtlDTOs;
+
+ var jiejiari = admAttendanceRulesDtlDTOs.Where(x=>x.Name=="jiejiari").ToList();
+
+ var tiaoxiuri = admAttendanceRulesDtlDTOs.Where(x => x.Name == "tiaoxiuri").ToList();
+
+
}
<!DOCTYPE html>
<html>
@@ -55,8 +65,8 @@
padding-bottom: 15px !important;
}
- .addBtn{
- top:10px;
+ .addBtn {
+ top: 10px;
}
</style>
@@ -99,8 +109,9 @@
<h5 style="color:cornflowerblue;">宸ヤ綔鏃�:</h5>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<div class="col-sm-6 col-md-6">
- 鍛� <input type="number" value="1" name="WeekStart" id="WeekStart" style="width:100px;"> -
- 鍛� <input type="number" value="5" name="WeekEnd" id="WeekEnd" style="width:100px;">
+ 鍛� <input type="number" value="@Model.WeekStart" name="WeekStart" id="WeekStart" style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)" > -
+ 鍛� <input type="number" value="@Model.WeekEnd" name="WeekEnd" id="WeekEnd" style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)" >
+ <input type="hidden" value="@Model.Id" id="Id" name="Id" >
</div>
</div>
@@ -108,8 +119,8 @@
<h5 style="color:cornflowerblue;">涓婄彮鏃堕棿:</h5>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<div class="col-sm-6 col-md-6">
- <span>涓婂崍锛�</span><input class="layui-input layer-date ldate form-control" type="text" value="09:00" name="WorkingStart" id="WorkingStart" placeholder="HH:mm:ss" style="width:100px;">-
- <input type="text" value="12:00" class="layui-input layer-date ldate form-control" name="WorkingEnd" id="WorkingEnd" placeholder="HH:mm:ss" style="width:100px;">
+ <span>涓婂崍锛�</span><input type="number" value="@Model.WorkingStart" name="WorkingStart" id="WorkingStart"style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">-
+ <input type="number" value="@Model.WorkingEnd" name="WorkingEnd" id="WorkingEnd" style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
</div>
</div>
@@ -117,8 +128,8 @@
<div class="clearfix layer-area" style="padding-bottom:15px;">
<div class="col-sm-6 col-md-6">
- <span>涓嬪崍锛�</span><input type="text" class="layui-input layer-date ldate form-control" value="13:00" name="OffworkStart" id="OffworkStart" style="width:100px;">-
- <input type="text" class="layui-input layer-date ldate form-control" value="18:00" name="OffworkEnd" id="OffworkEnd" style="width:100px;">
+ <span>涓嬪崍锛�</span><input type="number" value="@Model.OffworkStart" name="OffworkStart" id="OffworkStart" style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">-
+ <input type="number" value="@Model.OffworkEnd" name="OffworkEnd" id="OffworkEnd" style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
</div>
</div>
@@ -126,17 +137,17 @@
<div class="clearfix layer-area" style="padding-bottom:15px;">
<div class="col-sm-6 col-md-6">
<span>鍏ㄥ嫟濂�</span>
- <input type="number" value="200.00" name="FullAttendance" id="FullAttendance" style="width:150px">鍏�
+ <input type="number" value="@Model.FullAttendance" name="FullAttendance" id="FullAttendance" style="width:150px" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
</div>
</div>
<h5 style="color:cornflowerblue;">杩熷埌鎵f:</h5>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<div class="col-sm-8 col-md-8">
- <span>15鍒嗛挓</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="LatePayment1">鍏�
- <span>30鍒嗛挓</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="LatePayment2">鍏�
- <span>1灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="50.00" name="LatePayment3">鍏�
- <span>2灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="100.00" name="LatePayment4">鍏�
+ <span>15鍒嗛挓</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.LatePayment1" name="LatePayment1" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
+ <span>30鍒嗛挓</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.LatePayment2" name="LatePayment2" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
+ <span>1灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.LatePayment3" name="LatePayment3" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
+ <span>2灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.LatePayment4" name="LatePayment4" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
</div>
</div>
@@ -144,51 +155,107 @@
<h5 style="color:cornflowerblue;">鏃峰伐鎵f:</h5>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<div class="col-sm-6 col-md-6">
- <span>杩熷埌</span><input style="width:150px" type="number" min="0" step="1" max="999999" value="120" name="Absenteeism">鍒嗛挓璁颁负鏃峰伐
- <span>鍗婂ぉ</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="50.00" name="AbsenteeismPayment1">鍏�
- <span>1澶�</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="200.00" name="AbsenteeismPayment2">鍏�
+ <span>杩熷埌</span><input style="width:150px" type="number" min="0" step="1" max="999999" value="@Model.Absenteeism" name="Absenteeism" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍒嗛挓璁颁负鏃峰伐
+ <span>鍗婂ぉ</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.AbsenteeismPayment1" name="AbsenteeismPayment1" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
+ <span>1澶�</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.AbsenteeismPayment2" name="AbsenteeismPayment2" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
</div>
</div>
<h5 style="color:cornflowerblue;">浜嬪亣鎵f:</h5>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<div class="col-sm-8 col-md-8">
- <span>1灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="PersonalPayment1">鍏�
- <span>2灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="PersonalPayment2">鍏�
- <span>鍗婂ぉ</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="PersonalPayment3">鍏�
- <span>1澶�</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="50.00" name="PersonalPayment4">鍏�
+ <span>1灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.PersonalPayment1" name="PersonalPayment1" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
+ <span>2灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.PersonalPayment2" name="PersonalPayment2" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> 鍏�
+ <span>鍗婂ぉ</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.PersonalPayment3" name="PersonalPayment3" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
+ <span>1澶�</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.PersonalPayment4" name="PersonalPayment4" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
</div>
</div>
<h5 style="color:cornflowerblue;">鐥呭亣鎵f:</h5>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<div class="col-sm-8 col-md-8">
- <span>1灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="SickPayment1">鍏�
- <span>2灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="SickPayment2">鍏�
- <span>鍗婂ぉ</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="SickPayment3">鍏�
- <span>1澶�</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="100.00" name="SickPayment4">鍏�
+ <span>1灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.SickPayment1" name="SickPayment1" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
+ <span>2灏忔椂</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.SickPayment2" name="SickPayment2" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
+ <span>鍗婂ぉ</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.SickPayment3" name="SickPayment3" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
+ <span>1澶�</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.SickPayment4" name="SickPayment4" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">鍏�
</div>
</div>
<h5 style="color:red;">鑺傚亣鏃�:</h5>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<div class="col-sm-3 col-md-3">
- <div class="setSelect">
- <input type="text" value="" class="layui-input layer-date ldate form-control " id="holiday_s1" name="holiday_s" style="width:150px;"> -
- <input type="text" value="" class="layui-input layer-date ldate form-control" id="holiday_e1" name="holiday_e" style="width:150px;">
- <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addBtn(this)" data-type="1">+</button>
- </div>
+ @if (jiejiari == null || jiejiari.Count == 0)
+ {
+ <div class="setSelect">
+ <input type="text" value="" class="layui-input layer-date ldate form-control holiday_s" id="holiday_s1" name="holiday_s" style="width:150px;" onfocus='laydate({elem:"#holiday_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
+ <input type="text" value="" class="layui-input layer-date ldate form-control holiday_e" id="holiday_e1" name="holiday_e" style="width:150px;" onfocus='laydate({elem:"#holiday_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
+ <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addBtn(this)" data-type="1">+</button>
+ </div>
+ }
+ else
+ {
+ for (int i = 0; i < jiejiari.Count; i++)
+ {
+ if (i == 0)
+ {
+ <div class="setSelect">
+ <input type="text" value="@jiejiari[i].ValueStart" class="layui-input layer-date ldate form-control holiday_s" id="@("holiday_s"+(i+1))" name="holiday_s" style="width:150px;" onfocus='laydate({elem:"#holiday_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
+ <input type="text" value="@jiejiari[i].ValueEnd" class="layui-input layer-date ldate form-control holiday_e" id="@("holiday_e"+(i+1))" name="holiday_e" style="width:150px;" onfocus='laydate({elem:"#holiday_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
+ <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addBtn(this)" data-type="1">+</button>
+ </div>
+ }
+ else
+ {
+ <div class="setSelect">
+ <input type="text" value="@jiejiari[i].ValueStart" class="layui-input layer-date ldate form-control holiday_s" id="@("holiday_s"+(i+1))" name="holiday_s" style="width:150px;" onfocus='laydate({elem:"#holiday_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
+ <input type="text" value="@jiejiari[i].ValueEnd" class="layui-input layer-date ldate form-control holiday_e" id="@("holiday_e"+(i+1))" name="holiday_e" style="width:150px;" onfocus='laydate({elem:"#holiday_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
+ <button type="button" class="addBtn" onclick="delBtn(this,0,'holiday')" data-type="1">-</button>
+ </div>
+ }
+
+
+ }
+
+ }
+
</div>
</div>
<h5 style="color:red;">璋冧紤鏃�:</h5>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<div class="col-sm-3 col-md-3">
- <div class="setSelect">
- <input type="text" value="" class="layui-input layer-date ldate form-control " id="rest_s1" name="rest_s" style="width:150px;"> -
- <input type="text" value="" class="layui-input layer-date ldate form-control " id="rest_e1" name="rest_e" style="width:150px;">
- <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addRestBtn(this)" data-type="1">+</button>
- </div>
+ @if (tiaoxiuri == null || tiaoxiuri.Count == 0)
+ {
+ <div class="setSelect">
+ <input type="text" value="" class="layui-input layer-date ldate form-control rest_s" id="rest_s1" name="rest_s" style="width:150px;" onfocus='laydate({elem:"#rest_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
+ <input type="text" value="" class="layui-input layer-date ldate form-control rest_e" id="rest_e1" name="rest_e" style="width:150px;" onfocus='laydate({elem:"#rest_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
+ <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addRestBtn(this)" data-type="1">+</button>
+ </div>
+ }
+ else
+ {
+ for (int i = 0; i < tiaoxiuri.Count; i++)
+ {
+ if (i == 0)
+ {
+ <div class="setSelect">
+ <input type="text" value="@tiaoxiuri[i].ValueStart" class="layui-input layer-date ldate form-control rest_s" id="@("rest_s"+(i+1))" name="rest_s" style="width:150px;" onfocus='laydate({elem:"#rest_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
+ <input type="text" value="@tiaoxiuri[i].ValueEnd" class="layui-input layer-date ldate form-control rest_e" id="@("rest_e"+(i+1))" name="rest_e" style="width:150px;" onfocus='laydate({elem:"#rest_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
+ <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addRestBtn(this)" data-type="1">+</button>
+ </div>
+ }
+ else
+ {
+ <div class="setSelect">
+ <input type="text" value="@tiaoxiuri[i].ValueStart" class="layui-input layer-date ldate form-control rest_s" id="@("rest_s"+(i+1))" name="rest_s" style="width:150px;" onfocus='laydate({elem:"#rest_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
+ <input type="text" value="@tiaoxiuri[i].ValueEnd" class="layui-input layer-date ldate form-control rest_e" id="@("rest_e"+(i+1))" name="rest_e" style="width:150px;" onfocus='laydate({elem:"#rest_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
+ <button type="button" class="addBtn" onclick="delBtn(this,0,'rest')" data-type="1">-</button>
+ </div>
+ }
+
+ }
+ }
+
</div>
</div>
@@ -198,17 +265,42 @@
<span>鑺傚亣鏃�</span>
<label>
1鍊�
- <input name="Gala" type="radio" checked="" value="1" class="type_b">
+ @if (Model.Gala == 1)
+ {
+ <input name="Gala" type="radio" value="1" class="type_b" checked="checked">
+ }
+ else
+ {
+ <input name="Gala" type="radio" value="1" class="type_b" >
+
+ }
+
</label>
<label>
2鍊�
- <input name="Gala" type="radio" value="2" class="type_b">
+ @if (Model.Gala == 2)
+ {
+ <input name="Gala" type="radio" value="2" class="type_b" checked="checked">
+ }
+ else
+ {
+ <input name="Gala" type="radio" value="2" class="type_b">
+
+ }
</label>
<label>
3鍊�
- <input name="Gala" type="radio" value="3" class="type_b">
+ @if (Model.Gala == 3)
+ {
+ <input name="Gala" type="radio" value="3" class="type_b" checked="checked">
+ }
+ else
+ {
+ <input name="Gala" type="radio" value="3" class="type_b">
+
+ }
</label>
</div>
@@ -216,10 +308,34 @@
<div class="clearfix layer-area" style="padding-bottom:15px; height:45px;">
<div class="col-sm-6 col-md-6">
<span>鍛ㄦ湯</span>
- <label>1鍊� <input name="Weekend1" type="radio" checked="" value="1" class="type_b"></label>
+ <label>
+ 1鍊�
+ @if (Model.Weekend1 == 1)
+ {
+ <input name="Weekend1" type="radio" checked="checked" value="1" class="type_b">
+ }
+ else
+ {
+ <input name="Weekend1" type="radio" value="1" class="type_b">
+
+ }
+
+
+ </label>
- <label>2鍊�<input name="Weekend1" type="radio" value="2" class="type_b"></label>
+ <label>
+ 2鍊�
+ @if (Model.Weekend1 == 2)
+ {
+ <input name="Weekend1" type="radio" checked="checked" value="2" class="type_b">
+ }
+ else
+ {
+ <input name="Weekend1" type="radio" value="2" class="type_b">
+
+ }
+ </label>
</div>
</div>
@@ -227,16 +343,38 @@
<div class="clearfix layer-area" style="padding-bottom:15px;height:45px;">
<div class="col-sm-6 col-md-6">
<span>骞虫椂</span>
- <label for="p1">1鍊�/灏忔椂<input id="p1" name="usually" type="radio" checked="" value="1" class="type_b"></label>
+ <label for="p1">
+ 1鍊�/灏忔椂
+ @if (Model.Usually == 1)
+ {
+ <input name="Usually" type="radio" checked="checked" value="1" class="type_b">
+ }
+ else
+ {
+ <input name="Usually" type="radio" value="1" class="type_b">
+
+ }
+ </label>
- <label for="p2">2鍊�/灏忔椂<input id="p2" name="usually" type="radio" value="2" class="type_b"></label>
+ <label for="Usually">
+ 2鍊�/灏忔椂
+ @if (Model.Usually == 2)
+ {
+ <input name="Usually" type="radio" checked="checked" value="2" class="type_b">
+ }
+ else
+ {
+ <input name="Usually" type="radio" value="2" class="type_b">
+
+ }
+ </label>
</div>
</div>
<div class="clearfix layer-area" style="padding-bottom:15px;height:45px;">
<div class="col-sm-6 col-md-6">
<span></span>
- <input name="holiday" value="" type="hidden" id="holiday">
- <input name="rest" value="" type="hidden" id="rest">
+ @*<input name="holiday" value="" type="hidden" id="holiday">
+ <input name="rest" value="" type="hidden" id="rest">*@
</div>
</div>
</div>
@@ -248,7 +386,7 @@
<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="SaveAttendanceRule();" style="margin-left:4px; border-radius:4px;">
<i class="glyphicon glyphicon-ok"></i> <span class="bold">鎻愪氦</span>
</a>
@@ -318,11 +456,11 @@
//});
- laydate({ elem: "#holiday_e1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
- laydate({ elem: "#holiday_s1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
- laydate({ elem: "#rest_s1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
- laydate({ elem: "#rest_e1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
-
+ //laydate({ elem: "#holiday_e1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
+ //laydate({ elem: "#holiday_s1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
+ //laydate({ elem: "#rest_s1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
+ //laydate({ elem: "#rest_e1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
+
});
var _SigninList = function () {
@@ -330,14 +468,14 @@
}
// 淇濆瓨鎵撳崱淇℃伅
function SaveAttendanceRule(signinType) {
-
+
$.ajax({
type: "POST",
url: "/Signin/SaveAttendanceRule",
dataType: "json",
global: false,
- data: $('form').serializeArray(),
+ data: $('form').serializeArray(),
success: function (data) {
toastr.success("淇濆瓨鎴愬姛");
},
@@ -358,88 +496,105 @@
//鎻愪氦璇锋眰
- $('#searchBtn').on('click', function () {
- var holiday = '';
- $('.holiday_s').each(function () {
- var holiday_s = $(this).val();
- var holiday_e = $(this).next('.holiday_e').val();
- if (holiday_s != '' && holiday_e != '') {
- holiday += ',' + holiday_s + '+' + holiday_e;
- }
-
- })
- holiday = holiday.substring(1)
- if (holiday) {
- $('#holiday').val(holiday);
- }
- var rest = '';
- $('.rest_s').each(function () {
- var rest_s = $(this).val();
- var rest_e = $(this).next('.rest_e').val();
- if (rest_s != '' && rest_e != '') {
- rest += ',' + rest_s + '+' + rest_e;
- }
-
- })
- rest = rest.substring(1)
- if (rest) {
- $('#rest').val(rest);
- }
- formFile = new FormData($('#form')[0]);
+ var SaveAttendanceRule = function () {
+
$.ajax({
- url: "/index.php/home/index/attendance.html",
- type: 'POST',
- data: formFile,
- async: true,
- cache: false,
- contentType: false,
- processData: false,
- // traditional:true,
- // dataType:'json',
- success: function (res) {
- console.log(res);
- if (res.status == 1) {
- layer.alert(res.msg)
- } else {
- layer.alert(res.msg)
+ type: "POST",
+ url: "/Signin/SaveAttendanceRule",
+ dataType: "json",
+ global: false,
+ data: $('form').serializeArray(),
+ success: function (data) {
+
+
+
+ if (data.Result) {
+ // parent._afterSave(true);
+ parent.layer.msg('鎴愬姛淇濆瓨', { icon: 6 });
+ window.location = "/Signin/AttendanceRule";
+
+
+ //try {
+ // _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶
+ //}
+ //catch (err) {
+ // parent._CloseTab1("/Signin/SaveAttendanceRule/");
+ //}
+
}
+ else {
+ // toastr.error("澶辫触");
+ parent.layer.msg(data.Message, { icon: 5 });
+ }
+
+ },
+ error: function () {
+
+
+ parent.layer.msg('澶辫触', { icon: 5 });
}
- })
- });
+ });
+ } ;
//鏈湀鑺傚亣鏃ヨ缃�
function addBtn(obj) {
+
+ var int = $('.holiday_s').length - 1;
+ var id = $('.holiday_s').eq(int).attr('id');
+ var holiday_ss = parseInt(id.replace("holiday_s", "")) + 1;
+
+ var int1 = $('.holiday_e').length - 1
+ var id1 = $('.holiday_e').eq(int1).attr('id');
+ var holiday_es = parseInt(id1.replace("holiday_e", "")) + 1;
+
var html = ' <div class="setSelect">\n' +
' <span></span>\n' +
- ' <input type="text" value="" class="layui-input layer-date ldate form-control" name="holiday_s[]" class="Wdate holiday_s" style="width:150px;"> -\n' +
- ' <input type="text" value="" class="layui-input layer-date ldate form-control" name="holiday_e[]" class="Wdate holiday_e" style="width:150px;">\n' +
+ ' <input type="text" value="" class="layui-input layer-date ldate form-control holiday_s" id="holiday_s' + holiday_ss + '" name="holiday_s" style="width:150px;" onfocus=\'laydate({elem:"#holiday_s' + holiday_ss + '",format:"YYYY-MM-DD",theme:"#fdd5004"})\' /> -\n' +
+ ' <input type="text" value="" class="layui-input layer-date ldate form-control holiday_e" id="holiday_e' + holiday_es + '" name="holiday_e" style="width:150px;" onfocus=\'laydate({elem:"#holiday_e' + holiday_es + '",format:"YYYY-MM-DD",theme:"#fdd5004"})\' />\n' +
' <button type="button" class="addBtn" onclick="delBtn(this,0,\'holida\')" data-type="1">-</button>\n' +
' </div>'
- $(obj).parent('div').after(html);
+ $(obj).parent('div').parent('div').append(html);
- }
+
+
+
+
+
+
+
+ };
function addRestBtn(obj) {
+ var int = $('.rest_s').length - 1;
+ var id = $('.rest_s').eq(int).attr('id');
+ var rest_ss = parseInt(id.replace("rest_s", "")) + 1;
+
+ var int1 = $('.rest_e').length - 1
+ var id1 = $('.rest_e').eq(int1).attr('id');
+ var rest_ee = parseInt(id1.replace("rest_e", "")) + 1;
+
var html = ' <div class="setSelect">\n' +
' <span></span>\n' +
- ' <input type="text" value="" class="layui-input layer-date ldate form-control" name="rest_s[]" class="Wdate rest_s" style="width:150px;"> -\n' +
- ' <input type="text" value="" class="layui-input layer-date ldate form-control" name="rest_e[]" class="Wdate rest_e" style="width:150px;">\n' +
+ ' <input type="text" value="" class="layui-input layer-date ldate form-control rest_s" id="rest_s' + rest_ss + '" name="rest_s" style="width:150px;" onfocus=\'laydate({elem:"#rest_s' + rest_ss + '",format:"YYYY-MM-DD",theme:"#fdd5004"})\' /> -\n' +
+ ' <input type="text" value="" class="layui-input layer-date ldate form-control rest_e" id="rest_e' + rest_ee + '" name="rest_e" style="width:150px;" onfocus=\'laydate({elem:"#rest_e' + rest_ee + '",format:"YYYY-MM-DD",theme:"#fdd5004"})\' />\n' +
' <button type="button" class="addBtn" onclick="delBtn(this,0,\'rest\')" data-type="1">-</button>\n' +
' </div>'
- $(obj).parent('div').after(html);
- }
+ $(obj).parent('div').parent('div').append(html);
+
+
+ };
function delBtn(obj, id, tb) {
- if (id > 0) {
- var url = "/index.php/home/white/del.html"
- $.post(url, { id: id, tb: tb }, function (res) {
- if (res.status == 1) {
- $(obj).parent().remove();
- } else {
- layer.alert(res.msg)
- }
- })
- }
+ //if (id > 0) {
+ // var url = "/index.php/home/white/del.html"
+ // $.post(url, { id: id, tb: tb }, function (res) {
+ // if (res.status == 1) {
+ // $(obj).parent().remove();
+ // } else {
+ // layer.alert(res.msg)
+ // }
+ // })
+ //}
$(obj).parent().remove();
}
--
Gitblit v1.9.1