From 1c4f3bce3d88557b7ddb5f0a49b4be5e91b416f1 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 14 十月 2021 13:42:33 +0800
Subject: [PATCH] 专家测试--题库管理
---
zhengcaioa/IServices/IExpertTestTopicService.cs | 6
zhengcaioa/DTO/ExpertTestTopicpeizhiDTO.cs | 25 +
zhengcaioa/zhengcaioa/Views/ExpertTestTopic/print.cshtml | 6
zhengcaioa/Model/ExpertTestResult.cs | 19
zhengcaioa/Model/ExpertTestTopicpeizhi.cs | 22
zhengcaioa/Services/ExpertTestTopicService.cs | 265 +++++++++++
zhengcaioa/DTO/ExpertTestTopicDTO.cs | 13
zhengcaioa/Model/ExpertTestTopic.cs | 1
zhengcaioa/Model/zhengcaioaContext.cs | 101 ++++
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs | 5
zhengcaioa/DTO/ExpertTestResultDTO.cs | 19
zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Edit.cshtml | 683 ++++++++++++++++++++++++++--
zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Index.cshtml | 26
zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs | 142 +++++
14 files changed, 1,240 insertions(+), 93 deletions(-)
diff --git a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
index c83d6de..1b98bc7 100644
--- a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
+++ b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -282,6 +282,11 @@
CreateMap<ExpertTestTopicjiexi, ExpertTestTopicjiexiDTO>();
CreateMap<ExpertTestTopicjiexiDTO, ExpertTestTopicjiexi>();
+ CreateMap<ExpertTestResult, ExpertTestResultDTO>();
+ CreateMap<ExpertTestResultDTO, ExpertTestResult>();
+
+ CreateMap<ExpertTestTopicpeizhi, ExpertTestTopicpeizhiDTO>();
+ CreateMap<ExpertTestTopicpeizhiDTO, ExpertTestTopicpeizhi>();
}
}
}
diff --git a/zhengcaioa/DTO/ExpertTestResultDTO.cs b/zhengcaioa/DTO/ExpertTestResultDTO.cs
new file mode 100644
index 0000000..9cbd230
--- /dev/null
+++ b/zhengcaioa/DTO/ExpertTestResultDTO.cs
@@ -0,0 +1,19 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace DTO
+{
+ public class ExpertTestResultDTO
+ {
+ public string Id { get; set; }
+ public string Resulttype { get; set; }
+ public string ResulttypeName { get; set; }
+ public string Result { 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/ExpertTestTopicDTO.cs b/zhengcaioa/DTO/ExpertTestTopicDTO.cs
index 0c29c0a..2790a72 100644
--- a/zhengcaioa/DTO/ExpertTestTopicDTO.cs
+++ b/zhengcaioa/DTO/ExpertTestTopicDTO.cs
@@ -38,11 +38,24 @@
public string[] Anwser { get; set; }
public string[] Shifouzhengqu { get; set; }
+
+ public List<ExpertTestTopicjiexiDTO> expertTestTopicjiexiDTOs { get; set; }
+
+ public string Jiexi { get; set; }
+
+ public string[] Falv { get; set; }
+ public string[] Fatiao { get; set; }
+
+ public string[] Flag { get; set; }
+
}
public class ExpertTestTopicDTOSearch : SearchEntity
{
+
+ public string Area { get; set; }
+
public string Topictype { get; set; }
public string Zhishitype { get; set; }
public string Zhongdian { get; set; }
diff --git a/zhengcaioa/DTO/ExpertTestTopicpeizhiDTO.cs b/zhengcaioa/DTO/ExpertTestTopicpeizhiDTO.cs
new file mode 100644
index 0000000..92df839
--- /dev/null
+++ b/zhengcaioa/DTO/ExpertTestTopicpeizhiDTO.cs
@@ -0,0 +1,25 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace DTO
+{
+ public class ExpertTestTopicpeizhiDTO
+ {
+ public string Id { get; set; }
+ public string ShijianId { get; set; }
+ public string Topictype { get; set; }
+ public string TopictypeName { get; set; }
+ public string Zhishitype { get; set; }
+ public string ZhishitypeName { get; set; }
+ public decimal? Fenshu { get; set; }
+ public string FenshuName { get; set; }
+ public decimal? Fenzhi { get; set; }
+ public string FenzhiName { 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/IServices/IExpertTestTopicService.cs b/zhengcaioa/IServices/IExpertTestTopicService.cs
index 7307dc9..5244a77 100644
--- a/zhengcaioa/IServices/IExpertTestTopicService.cs
+++ b/zhengcaioa/IServices/IExpertTestTopicService.cs
@@ -34,5 +34,11 @@
ResultEntity ModifyStatusjiexi(string id, string userid);
+ List<ExpertTestResultDTO> GetListResult();
+ ResultEntity saveResult(ExpertTestResultDTO dto);
+
+ List<ExpertTestTopicpeizhiDTO> GetListpeizhi();
+ ResultEntity savepeizhi(ExpertTestTopicpeizhiDTO dto);
+
}
}
diff --git a/zhengcaioa/Model/ExpertTestResult.cs b/zhengcaioa/Model/ExpertTestResult.cs
new file mode 100644
index 0000000..5098441
--- /dev/null
+++ b/zhengcaioa/Model/ExpertTestResult.cs
@@ -0,0 +1,19 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+#nullable disable
+
+namespace zhengcaioa.Models
+{
+ public partial class ExpertTestResult
+ {
+ public string Id { get; set; }
+ public string Resulttype { get; set; }
+ public string Result { 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/Model/ExpertTestTopic.cs b/zhengcaioa/Model/ExpertTestTopic.cs
index 3b7fbfd..6ffe2cd 100644
--- a/zhengcaioa/Model/ExpertTestTopic.cs
+++ b/zhengcaioa/Model/ExpertTestTopic.cs
@@ -20,5 +20,6 @@
public DateTime Createtime { get; set; }
public string Modifier { get; set; }
public DateTime Modifytime { get; set; }
+ public string Jiexi { get; set; }
}
}
diff --git a/zhengcaioa/Model/ExpertTestTopicpeizhi.cs b/zhengcaioa/Model/ExpertTestTopicpeizhi.cs
new file mode 100644
index 0000000..003682a
--- /dev/null
+++ b/zhengcaioa/Model/ExpertTestTopicpeizhi.cs
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+#nullable disable
+
+namespace zhengcaioa.Models
+{
+ public partial class ExpertTestTopicpeizhi
+ {
+ public string Id { get; set; }
+ public string ShijianId { get; set; }
+ public string Topictype { get; set; }
+ public string Zhishitype { get; set; }
+ public decimal? Fenshu { get; set; }
+ public decimal? Fenzhi { 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/Model/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs
index e07f6f2..f37fe82 100644
--- a/zhengcaioa/Model/zhengcaioaContext.cs
+++ b/zhengcaioa/Model/zhengcaioaContext.cs
@@ -117,6 +117,8 @@
public virtual DbSet<ExpertTestTopic> ExpertTestTopics { get; set; }
public virtual DbSet<ExpertTestTopicanwser> ExpertTestTopicanwsers { get; set; }
public virtual DbSet<ExpertTestTopicjiexi> ExpertTestTopicjiexis { get; set; }
+ public virtual DbSet<ExpertTestResult> ExpertTestResults { get; set; }
+ public virtual DbSet<ExpertTestTopicpeizhi> ExpertTestTopicpeizhis { get; set; }
#region 琛屾斂绠$悊
public virtual DbSet<AskLeave> AskLeaves { get; set; }
@@ -6466,6 +6468,10 @@
.HasColumnName("createtime")
.HasDefaultValueSql("(getdate())");
+ entity.Property(e => e.Jiexi)
+ .HasMaxLength(4000)
+ .HasColumnName("jiexi");
+
entity.Property(e => e.JiexiStatus)
.HasMaxLength(1)
.HasColumnName("jiexi_status")
@@ -6616,6 +6622,101 @@
.HasMaxLength(50)
.HasColumnName("topic");
});
+ modelBuilder.Entity<ExpertTestResult>(entity =>
+ {
+ entity.ToTable("expert_test_result");
+
+ entity.Property(e => e.Id).HasMaxLength(50);
+
+ entity.Property(e => e.Creater)
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnName("creater")
+ .HasDefaultValueSql("('1')");
+
+ entity.Property(e => e.Createtime)
+ .HasColumnType("datetime")
+ .HasColumnName("createtime")
+ .HasDefaultValueSql("(getdate())");
+
+ entity.Property(e => e.Modifier)
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnName("modifier")
+ .HasDefaultValueSql("('1')");
+
+ entity.Property(e => e.Modifytime)
+ .HasColumnType("datetime")
+ .HasColumnName("modifytime")
+ .HasDefaultValueSql("(getdate())");
+
+ entity.Property(e => e.RecStatus)
+ .IsRequired()
+ .HasMaxLength(1)
+ .HasColumnName("rec_status")
+ .HasDefaultValueSql("('A')");
+
+ entity.Property(e => e.Result)
+ .HasMaxLength(100)
+ .HasColumnName("result");
+
+ entity.Property(e => e.Resulttype)
+ .HasMaxLength(50)
+ .HasColumnName("resulttype");
+ });
+
+ modelBuilder.Entity<ExpertTestTopicpeizhi>(entity =>
+ {
+ entity.ToTable("expert_test_topicpeizhi");
+
+ entity.Property(e => e.Id).HasMaxLength(50);
+
+ entity.Property(e => e.Creater)
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnName("creater")
+ .HasDefaultValueSql("('1')");
+
+ entity.Property(e => e.Createtime)
+ .HasColumnType("datetime")
+ .HasColumnName("createtime")
+ .HasDefaultValueSql("(getdate())");
+
+ entity.Property(e => e.Fenshu)
+ .HasColumnType("numeric(18, 4)")
+ .HasColumnName("fenshu");
+
+ entity.Property(e => e.Fenzhi)
+ .HasColumnType("numeric(18, 4)")
+ .HasColumnName("fenzhi");
+
+ entity.Property(e => e.Modifier)
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnName("modifier")
+ .HasDefaultValueSql("('1')");
+
+ entity.Property(e => e.Modifytime)
+ .HasColumnType("datetime")
+ .HasColumnName("modifytime")
+ .HasDefaultValueSql("(getdate())");
+
+ entity.Property(e => e.RecStatus)
+ .IsRequired()
+ .HasMaxLength(1)
+ .HasColumnName("rec_status")
+ .HasDefaultValueSql("('A')");
+
+ entity.Property(e => e.ShijianId).HasMaxLength(50);
+
+ entity.Property(e => e.Topictype)
+ .HasMaxLength(50)
+ .HasColumnName("topictype");
+
+ entity.Property(e => e.Zhishitype)
+ .HasMaxLength(50)
+ .HasColumnName("zhishitype");
+ });
#region 琛屾斂绠$悊瀹炰綋绫�
modelBuilder.Entity<SignIn>(entity =>
diff --git a/zhengcaioa/Services/ExpertTestTopicService.cs b/zhengcaioa/Services/ExpertTestTopicService.cs
index 36a11e2..fda7dfc 100644
--- a/zhengcaioa/Services/ExpertTestTopicService.cs
+++ b/zhengcaioa/Services/ExpertTestTopicService.cs
@@ -65,7 +65,7 @@
updateproject.RecStatus = entity.RecStatus;
updateproject.Modifier = entity.Modifier;
updateproject.Modifytime = entity.Modifytime;
-
+ updateproject.Jiexi = entity.Jiexi;
}
@@ -103,6 +103,44 @@
}
}
}
+
+
+
+ //瑙f瀽
+
+ var expertTestTopicjiexis = _context.ExpertTestTopicjiexis.Where(x => x.Topic == dto.Id).ToList();
+ if (expertTestTopicjiexis != null && expertTestTopicjiexis.Count > 0)
+ {
+ foreach (var expertTestTopicjiexi in expertTestTopicjiexis)
+ {
+ _context.ExpertTestTopicjiexis.Remove(expertTestTopicjiexi);
+ }
+ }
+ var Falv = dto.Falv;
+ if (Falv != null && Falv.Length > 0)
+ {
+ for (int i = 0; i < Falv.Length; i++)
+ {
+ if (!string.IsNullOrEmpty(dto.Falv[i]))
+ {
+ ExpertTestTopicjiexi expertTestTopicjiexi = new ExpertTestTopicjiexi();
+
+ expertTestTopicjiexi.Id = Guid.NewGuid().ToString();
+ expertTestTopicjiexi.Topic = dto.Id;
+
+
+ expertTestTopicjiexi.Falv = dto.Falv[i];
+ expertTestTopicjiexi.Fatiao = dto.Fatiao[i];
+ expertTestTopicjiexi.Flag = dto.Flag[i];
+ expertTestTopicjiexi.Creater = dto.Modifier;
+ expertTestTopicjiexi.Createtime = DateTime.Now;
+ expertTestTopicjiexi.Modifier = dto.Modifier;
+ expertTestTopicjiexi.Modifytime = DateTime.Now;
+ _context.ExpertTestTopicjiexis.Add(expertTestTopicjiexi);
+ }
+ }
+ }
+
_context.SaveChanges();
@@ -233,9 +271,10 @@
&& (string.IsNullOrWhiteSpace(searchEntity.JiexiStatus) || a.JiexiStatus == searchEntity.JiexiStatus.Trim())
&& (string.IsNullOrWhiteSpace(searchEntity.ShenpiStatus) || a.ShenpiStatus == searchEntity.ShenpiStatus.Trim())
&& (string.IsNullOrWhiteSpace(searchEntity.Topic) || a.Topic.Contains(searchEntity.Topic.Trim()))
-
+ && (string.IsNullOrWhiteSpace(searchEntity.Area) || a.Area == searchEntity.Area.Trim())
+
@@ -251,6 +290,7 @@
ZhongdianName = ggg.Comments,
JiexiStatus = a.JiexiStatus,
JiexiStatusName = hhh.Comments,
+ Jiexi = a.Jiexi,
ShenpiStatus = a.ShenpiStatus,
ShenpiStatusName = iii.Comments,
Area = a.Area,
@@ -666,5 +706,226 @@
return result;
}
+
+
+ /// <summary>
+ /// 鑾峰彇鎵�鏈夋湁鏁堣鑹�
+ /// </summary>
+ /// <returns></returns>
+ public List<ExpertTestResultDTO> GetListResult()
+ {
+ 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
+ }
+ );
+
+ var listRole = (from a in _context.ExpertTestResults
+
+ join e in listCode.Where(x => x.CodeTable == "expert_test_result" && x.CodeField == "resulttype")
+ on a.Resulttype equals e.CodeSn
+ into esssss
+ from eee in esssss.DefaultIfEmpty()
+
+
+
+ where a.RecStatus == "A"
+ //&& (string.IsNullOrWhiteSpace(topicId) || a.Topic == topicId.Trim())
+ select new ExpertTestResultDTO
+ {
+ Id = a.Id,
+ Resulttype = a.Resulttype,
+
+ ResulttypeName = eee.Comments,
+ Result = a.Result,
+
+
+ Creater = a.Creater,
+ Createtime = a.Createtime,
+
+ RecStatus = a.RecStatus,
+ Modifier = a.Modifier,
+ Modifytime = a.Modifytime,
+
+ }
+ ).OrderBy(x => x).ToList();
+
+ return listRole;
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇鎵�鏈夋湁鏁堣鑹�
+ /// </summary>
+ /// <returns></returns>
+ public List<ExpertTestTopicpeizhiDTO> GetListpeizhi()
+ {
+ 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
+ }
+ );
+
+ var listRole = (from a in _context.ExpertTestTopicpeizhis
+
+ join e in listCode.Where(x => x.CodeTable == "expert_test_topic" && x.CodeField == "topictype")
+ on a.Topictype equals e.CodeSn
+ into esssss
+ from eee in esssss.DefaultIfEmpty()
+
+ join f in listCode.Where(x => x.CodeTable == "expert_test_topic" && x.CodeField == "zhishitype")
+ on a.Zhishitype equals f.CodeSn
+ into fsssss
+ from fff in fsssss.DefaultIfEmpty()
+
+
+ where a.RecStatus == "A"
+ //&& (string.IsNullOrWhiteSpace(topicId) || a.Topic == topicId.Trim())
+ select new ExpertTestTopicpeizhiDTO
+ {
+ Id = a.Id,
+ ShijianId = a.ShijianId,
+ Topictype = a.Topictype,
+ TopictypeName = eee.Comments,
+ Zhishitype = a.Zhishitype,
+ ZhishitypeName = fff.Comments,
+ Fenshu = a.Fenshu,
+ Fenzhi = a.Fenzhi,
+
+ Creater = a.Creater,
+ Createtime = a.Createtime,
+
+ RecStatus = a.RecStatus,
+ Modifier = a.Modifier,
+ Modifytime = a.Modifytime,
+
+ }
+ ).OrderBy(x => x.Topictype).ThenBy(x => x.Zhishitype).ToList();
+
+ return listRole;
+ }
+
+
+ public ResultEntity saveResult(ExpertTestResultDTO dto)
+ {
+ ResultEntity resultEntity = new ResultEntity();
+ try
+ {
+
+
+ var entity = _mapper.Map<ExpertTestResult>(dto);
+
+
+ if (String.IsNullOrEmpty(entity.Id))
+ {
+ entity.Id = Guid.NewGuid().ToString();
+ dto.Id = entity.Id;
+ _context.ExpertTestResults.Add(entity);
+ }
+ else
+ {
+ var updateproject = _context.ExpertTestResults.Find(entity.Id);
+
+ updateproject.Resulttype = entity.Resulttype;
+ updateproject.Result = entity.Result;
+
+
+
+
+
+ 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 ResultEntity savepeizhi(ExpertTestTopicpeizhiDTO dto)
+ {
+ ResultEntity resultEntity = new ResultEntity();
+ try
+ {
+
+
+ var entity = _mapper.Map<ExpertTestTopicpeizhi>(dto);
+
+
+ if (String.IsNullOrEmpty(entity.Id))
+ {
+ entity.Id = Guid.NewGuid().ToString();
+ dto.Id = entity.Id;
+ _context.ExpertTestTopicpeizhis.Add(entity);
+ }
+ else
+ {
+ var updateproject = _context.ExpertTestTopicpeizhis.Find(entity.Id);
+
+ updateproject.ShijianId = entity.ShijianId;
+ updateproject.Topictype = entity.Topictype;
+ updateproject.Zhishitype = entity.Zhishitype;
+ updateproject.Fenshu = entity.Fenshu;
+ updateproject.Fenzhi = entity.Fenzhi;
+
+
+
+
+
+ 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;
+ }
+
}
}
diff --git a/zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs b/zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs
index 4900f6e..66ac251 100644
--- a/zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs
@@ -92,7 +92,21 @@
ViewBag.zhongdian = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
ViewBag.jiexi_status = _liaotianService.GetSYScode("expert_test_topic", "jiexi_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
ViewBag.shenpi_status = _liaotianService.GetSYScode("expert_test_topic", "shenpi_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
- ViewBag.Area = _areaService.GetList().Where(x => x.ParentId == "0 ").Select(x => new { code = x.CodeId, label = x.Name }).ToList();
+ var areaDTOs = _areaService.GetList().Where(x => x.ParentId == "0 ").ToList();
+ foreach (var areaDTO in areaDTOs)
+ {
+ if (areaDTO.CodeId == "510000")
+ {
+ areaDTOs.Remove(areaDTO);
+ break;
+ }
+ }
+ var areaDTOsic = new AreaDTO();
+ areaDTOsic.CodeId = "510000";
+ areaDTOsic.Name = "鍥涘窛鐪�";
+ areaDTOsic.ParentId = "0 ";
+ areaDTOs.Insert(1, areaDTOsic);
+ ViewBag.Area = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); ;
return View();
@@ -114,6 +128,8 @@
ViewData["curentuser"] = curentuser;
var expertTestTopicanwserDTOs = new List<ExpertTestTopicanwserDTO>();
+ var expertTestTopicjiexiDTOs = new List<ExpertTestTopicjiexiDTO>();
+
ExpertTestTopicDTO dto = new ExpertTestTopicDTO();
if (!String.IsNullOrEmpty(id))
{
@@ -125,14 +141,83 @@
}
dto.expertTestTopicanwserDTOs = expertTestTopicanwserDTOs;
+
+
+ expertTestTopicjiexiDTOs = _expertTestTopicService.GetListjiexi(id);
+ if (expertTestTopicjiexiDTOs.Count == 0)
+ {
+ var ssssss = new ExpertTestTopicjiexiDTO();
+ ssssss.Flag = "A";
+ expertTestTopicjiexiDTOs.Add(ssssss);
+ }
+
+ dto.expertTestTopicjiexiDTOs = expertTestTopicjiexiDTOs;
+
}
else
{
- expertTestTopicanwserDTOs.Add(new ExpertTestTopicanwserDTO());
- dto.expertTestTopicanwserDTOs = expertTestTopicanwserDTOs;
- dto.Topictype = Topictype;
- dto.Zhishitype = Zhishitype;
- dto.Area = Area;
+
+ if (Topictype == "03")
+ {
+ var expertTestTopicanwserDTO = new ExpertTestTopicanwserDTO();
+ expertTestTopicanwserDTO.Anwserno = "鈭�";
+ expertTestTopicanwserDTOs.Add(expertTestTopicanwserDTO);
+ var expertTestTopicanwserDTO1 = new ExpertTestTopicanwserDTO();
+ expertTestTopicanwserDTO1.Anwserno = "脳";
+ expertTestTopicanwserDTOs.Add(expertTestTopicanwserDTO1);
+
+
+ dto.expertTestTopicanwserDTOs = expertTestTopicanwserDTOs;
+ }
+ else
+ {
+ var expertTestTopicanwserDTO = new ExpertTestTopicanwserDTO();
+ expertTestTopicanwserDTO.Anwserno = "A";
+ expertTestTopicanwserDTOs.Add(expertTestTopicanwserDTO);
+ var expertTestTopicanwserDTO1 = new ExpertTestTopicanwserDTO();
+ expertTestTopicanwserDTO1.Anwserno = "B";
+ expertTestTopicanwserDTOs.Add(expertTestTopicanwserDTO1);
+ var expertTestTopicanwserDT2 = new ExpertTestTopicanwserDTO();
+ expertTestTopicanwserDT2.Anwserno = "C";
+ expertTestTopicanwserDTOs.Add(expertTestTopicanwserDT2);
+ var expertTestTopicanwserDT3 = new ExpertTestTopicanwserDTO();
+ expertTestTopicanwserDT3.Anwserno = "D";
+ expertTestTopicanwserDTOs.Add(expertTestTopicanwserDT3);
+
+ dto.expertTestTopicanwserDTOs = expertTestTopicanwserDTOs;
+ }
+
+
+ var ssssss = new ExpertTestTopicjiexiDTO();
+ ssssss.Flag = "A";
+ expertTestTopicjiexiDTOs.Add(ssssss);
+ dto.expertTestTopicjiexiDTOs = expertTestTopicjiexiDTOs;
+
+ if (string.IsNullOrEmpty(Topictype))
+ {
+ dto.Topictype = "01";
+ }
+ else
+ {
+ dto.Topictype = Topictype;
+ }
+ if (string.IsNullOrEmpty(Zhishitype))
+ {
+ dto.Zhishitype = "01";
+ }
+ else
+ {
+ dto.Zhishitype = Zhishitype;
+ }
+ if (string.IsNullOrEmpty(Area))
+ {
+ dto.Area = "100000";
+ }
+ else
+ {
+ dto.Area = Area;
+ }
+
}
@@ -145,7 +230,26 @@
ViewBag.zhongdian = _liaotianService.GetSYScode("system", "shifou").OrderByDescending(x=>x.Sort).ToList();
ViewBag.jiexi_status = _liaotianService.GetSYScode("expert_test_topic", "jiexi_status");
ViewBag.shenpi_status = _liaotianService.GetSYScode("expert_test_topic", "shenpi_status");
- ViewBag.Area = _areaService.GetList().Where(x => x.ParentId == "0 ").ToList();
+
+ ViewBag.Flag = _liaotianService.GetSYScode("system", "shifou");
+ ViewBag.falv = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv");
+
+
+ var areaDTOs = _areaService.GetList().Where(x => x.ParentId == "0 ").ToList();
+ foreach (var areaDTO in areaDTOs)
+ {
+ if(areaDTO.CodeId == "510000")
+ {
+ areaDTOs.Remove(areaDTO);
+ break;
+ }
+ }
+ var areaDTOsic = new AreaDTO();
+ areaDTOsic.CodeId = "510000";
+ areaDTOsic.Name = "鍥涘窛鐪�";
+ areaDTOsic.ParentId = "0 ";
+ areaDTOs.Insert(1, areaDTOsic);
+ ViewBag.Area = areaDTOs;
@@ -220,14 +324,22 @@
data.Creater = curentuser.Id;
data.Createtime = DateTime.Now;
data.ShenpiStatus = "D";
- data.JiexiStatus = "D";
+ //data.JiexiStatus = "D";
}
else
{
var ddd = _expertTestTopicService.Get(data.Id);
data.ShenpiStatus = "D";
- data.JiexiStatus = ddd.JiexiStatus;
+ //data.JiexiStatus = ddd.JiexiStatus;
+ }
+ if (string.IsNullOrEmpty(data.Jiexi))
+ {
+ data.JiexiStatus = "D";
+ }
+ else
+ {
+ data.JiexiStatus = "A";
}
data.Modifier = curentuser.Id;
data.Modifytime = DateTime.Now;
@@ -356,14 +468,22 @@
data.Creater = curentuser.Id;
data.Createtime = DateTime.Now;
data.ShenpiStatus = "A";
- data.JiexiStatus = "D";
+ //data.JiexiStatus = "D";
}
else
{
var ddd = _expertTestTopicService.Get(data.Id);
data.ShenpiStatus = "A";
- data.JiexiStatus = ddd.JiexiStatus;
+ //data.JiexiStatus = ddd.JiexiStatus;
+ }
+ if (string.IsNullOrEmpty(data.Jiexi))
+ {
+ data.JiexiStatus = "D";
+ }
+ else
+ {
+ data.JiexiStatus = "A";
}
data.Modifier = curentuser.Id;
data.Modifytime = DateTime.Now;
diff --git a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Edit.cshtml
index a148667..828458a 100644
--- a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Edit.cshtml
@@ -13,6 +13,10 @@
List<ExpertTestTopicanwserDTO> expertTestTopicanwserDTOs = Model.expertTestTopicanwserDTOs;
+ List<ExpertTestTopicjiexiDTO> expertTestTopicjiexiDTOs = Model.expertTestTopicjiexiDTOs;
+ List<SysCodeDtl> Flag = ViewData["Flag"] as List<SysCodeDtl>; //瑙f瀽鐘舵��
+ List<SysCodeDtl> falv = ViewData["falv"] as List<SysCodeDtl>; //瀹℃壒鐘舵��
+
List<DTO.PageEntity> pageEntities = ViewData["pageEntities"] as List<DTO.PageEntity>; //闂绫诲瀷
var shenhesto = pageEntities.Where(x => x.PageName == "瀹℃牳").FirstOrDefault();
@@ -124,17 +128,17 @@
<option value="" hassubinfo="true">璇烽�夋嫨</option>
@foreach (var item in topictype)
{
- @if (!item.CodeSn.Equals(Model.Topictype))
+ @if (!item.CodeSn.Equals(Model.Topictype))
{
- <option value="@item.CodeSn" hassubinfo="true">
- @item.Comments
- </option>
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
}
else
{
- <option value="@item.CodeSn" hassubinfo="true" selected="selected">
- @item.Comments
- </option>
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
}
}
@@ -153,17 +157,17 @@
<option value="" hassubinfo="true">璇烽�夋嫨</option>
@foreach (var item in zhishitype)
{
- @if (!item.CodeSn.Equals(Model.Zhishitype))
+ @if (!item.CodeSn.Equals(Model.Zhishitype))
{
- <option value="@item.CodeSn" hassubinfo="true">
- @item.Comments
- </option>
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
}
else
{
- <option value="@item.CodeSn" hassubinfo="true" selected="selected">
- @item.Comments
- </option>
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
}
}
@@ -182,17 +186,17 @@
<option value="" hassubinfo="true">璇烽�夋嫨</option>
@foreach (var item in Area)
{
- @if (!item.CodeId.Equals(Model.Area))
+ @if (!item.CodeId.Equals(Model.Area))
{
- <option value="@item.CodeId" hassubinfo="true">
- @item.Name
- </option>
+ <option value="@item.CodeId" hassubinfo="true">
+ @item.Name
+ </option>
}
else
{
- <option value="@item.CodeId" hassubinfo="true" selected="selected">
- @item.Name
- </option>
+ <option value="@item.CodeId" hassubinfo="true" selected="selected">
+ @item.Name
+ </option>
}
}
@@ -211,11 +215,11 @@
<div class="col-sm-2 col-md-2" grouptype="Vdata">
@if ("A" == Model.Zhongdian)
{
- <input type="checkbox" class="form-control" id="ZhongdianName" checked="checked" name="ZhongdianName" value="A" />
+ <input type="checkbox" id="ZhongdianName" checked="checked" name="ZhongdianName" value="A" />
}
else
{
- <input type="checkbox" class="form-control" id="ZhongdianName" name="ZhongdianName" value="A" />
+ <input type="checkbox" id="ZhongdianName" name="ZhongdianName" value="A" />
}
<input type="hidden" id="Zhongdian" name="Zhongdian" value="" />
@@ -241,76 +245,239 @@
</div>
<div id="addlist_3">
+ @if(Model.Topictype!="03"){
+
@for (int i = 0; i < expertTestTopicanwserDTOs.Count; i++)
{
<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"></label>
<div class="col-sm-2 col-md-2" style="width:5%;">
- <input class="form-control" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="@expertTestTopicanwserDTOs[i].Anwserno">
+ <input class="form-control" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="@expertTestTopicanwserDTOs[i].Anwserno" readonly="readonly">
</div>
- <label class="text-right col-sm-1 col-md-1 control-label" style="width:30px;">绛旀</label>
- <div class="col-sm-6 col-md-6" >
+ <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1">銆�</label>
+ <div class="col-sm-6 col-md-6" name="Anwser2">
<input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="@expertTestTopicanwserDTOs[i].Anwser">
</div>
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
- 鏄惁姝g‘
+ 鏄惁绛旀
</label>
-
-
+
+
+ <div class="col-sm-1 col-md-1" grouptype="Vdata" style="width:5%;">
+ @if ("A" == expertTestTopicanwserDTOs[i].Shifouzhengqu)
+ {
+ <input type="checkbox" checked="checked" name="ShifouzhengquName" value="A" onclick="checkShifouzhengqu(this)" />
+ }
+ else
+ {
+ <input type="checkbox" name="ShifouzhengquName" value="D" onclick="checkShifouzhengqu(this)" />
+ }
+ <input type="hidden" name="Shifouzhengqu" value="" />
+ @*<select class="form-control" name="Shifouzhengqu" data-placeholder="閫夋嫨 搴忓垪 ...">
+
+ @foreach (var item in zhongdian)
+ {
+ @if (!item.CodeSn.Equals(expertTestTopicanwserDTOs[i].Shifouzhengqu))
+ {
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
+ }
+
+ }
+
+ </select>*@
+
+ </div>
+
+
+
+ @*@if (i == 0)
+ {
+ <div class="col-sm-1 col-md-1" style="width:80px;">
+ <button type="button" class="addBtn" onclick="addBtn(this)" data-type="3" style="width:32px">+</button>
+ <button type="button" class="delBtn" onclick="delBtn(this)" data-type="3" style="width:32px">-</button>
+ </div>
+ }*@
+ </div>
+
+ }
+ }else{
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+ <label class="text-right col-sm-1 col-md-1 control-label"></label>
+ @for (int i = 0; i < expertTestTopicanwserDTOs.Count; i++)
+ {
+
<div class="col-sm-1 col-md-1" grouptype="Vdata" style="width:5%;">
- <select class="form-control" name="Shifouzhengqu" data-placeholder="閫夋嫨 搴忓垪 ...">
-
- @foreach (var item in zhongdian)
+ @if ("A" == expertTestTopicanwserDTOs[i].Shifouzhengqu)
+ {
+ <input type="checkbox" checked="checked" name="ShifouzhengquName" value="A" onclick="checkShifouzhengqu(this)" />
+ }
+ else
+ {
+ <input type="checkbox" name="ShifouzhengquName" value="D" onclick="checkShifouzhengqu(this)" />
+ }
+ <input type="hidden" name="Shifouzhengqu" value="" />
+
+
+ </div>
+
+ <div class="col-sm-2 col-md-2" style="width:5%;">
+ <input class="form-control" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="@expertTestTopicanwserDTOs[i].Anwserno" readonly="readonly">
+ </div>
+
+ <div class="col-sm-6 col-md-6" name="Anwser2" style="display:none;">
+ <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="@expertTestTopicanwserDTOs[i].Anwser">
+
+ </div>
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+ </div>
+
+ }
+
+
+
+ </div>
+
+
+
+
+
+
+
+
+
+
+
+ <div id="addlist_2">
+ @for (int i = 0; i < expertTestTopicjiexiDTOs.Count; i++)
+ {
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
+ 娉曞緥
+ </label>
+
+
+ <div class="col-sm-5 col-md-5" grouptype="Vdata">
+ <select class="form-control" name="Falv" data-placeholder="閫夋嫨 搴忓垪 ...">
+ <option value="" hassubinfo="true">璇烽�夋嫨</option>
+ @foreach (var item in falv)
{
- @if (!item.CodeSn.Equals(expertTestTopicanwserDTOs[i].Shifouzhengqu))
+ @if (!item.CodeSn.Equals(expertTestTopicjiexiDTOs[i].Falv))
{
- <option value="@item.CodeSn" hassubinfo="true">
- @item.Comments
- </option>
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
}
else
{
- <option value="@item.CodeSn" hassubinfo="true" selected="selected">
- @item.Comments
- </option>
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
}
}
- </select>
+ </select>
- </div>
+ </div>
-
+
+ <label class="text-right col-sm-1 col-md-1 control-label" style="width:30px;">娉曟潯</label>
+ <div class="col-sm-2 col-md-2">
+ <input class="form-control" label="娉曟潯" name="Fatiao" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="@expertTestTopicjiexiDTOs[i].Fatiao">
+
+ </div>
+
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
+ 涓昏В鏋�
+ </label>
+
+
+ <div class="col-sm-1 col-md-1" grouptype="Vdata" style="width:5%;">
+
+ @if ("A" == expertTestTopicjiexiDTOs[i].Flag)
+ {
+ <input type="checkbox" checked="checked" name="FlagName" value="A" onclick="checkFlag(this)" />
+ }
+ else
+ {
+ <input type="checkbox" name="FlagName" value="D" onclick="checkFlag(this)" />
+ }
+ <input type="hidden" name="Flag" value="" />
+
+ @*<select class="form-control" name="Flag" data-placeholder="閫夋嫨 搴忓垪 ...">
+
+ @foreach (var item in Flag)
+ {
+ @if (!item.CodeSn.Equals(expertTestTopicjiexiDTOs[i].Flag))
+ {
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
+ }
+
+ }
+
+ </select>*@
+
+ </div>
+
+
@if (i == 0)
- {
- <div class="col-sm-1 col-md-1" style="width:80px;">
- <button type="button" class="addBtn" onclick="addBtn(this)" data-type="3" style="width:32px">+</button>
- <button type="button" class="delBtn" onclick="delBtn(this)" data-type="3" style="width:32px">-</button>
- </div>
- }
- </div>
+ {
+ <div class="col-sm-1 col-md-1" style="width:80px;">
+ <button type="button" class="addBtn" onclick="addBtn(this)" data-type="2" style="width:32px">+</button>
+ <button type="button" class="delBtn" onclick="delBtn(this)" data-type="2" style="width:32px">-</button>
+ </div>
}
+ </div>
+ }
</div>
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
+
+
+
+ <label class="text-right col-sm-1 col-md-1 control-label">瑙f瀽</label>
+ <div class="col-sm-11 col-md-11">
+ <textarea class="form-control bt" id="Jiexi" name="Jiexi" title="瑙f瀽" isempty="" maxlength="4000" length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'">@Model.Jiexi</textarea>
+
+ </div>
+
+
+ </div>
</div>
-
-
-
-
-
-
-
-
-
-
-
@@ -346,7 +513,19 @@
Topic.style.height = Topic.scrollHeight + 'px';
- var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95;
+ var Jiexi = document.getElementById("Jiexi");
+
+ Jiexi.style.height = Jiexi.scrollHeight + 'px';
+ var Topictype11 = $("#Topictype").val();
+ if (Topictype11 == "03") {
+ var sss = $("div[name='Anwser2']");
+ sss.hide();
+ var ssss = $("label[name='Anwser1']");
+ ssss.hide();
+
+ }
+
+ var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2;
$("#div_content").height(hh);
toastr.options = {
@@ -460,6 +639,68 @@
} else {
$("#Zhongdian").val("D");
}
+ var sss = document.getElementsByName("ShifouzhengquName");
+ var ssss = document.getElementsByName("Shifouzhengqu");
+ for (var j = 0; j < sss.length; j++) {
+
+ if (sss[j].checked) {
+ ssss[j].value = "A";
+ } else {
+ ssss[j].value = "D";
+ }
+ }
+
+ var sss = document.getElementsByName("FlagName");
+ var ssss = document.getElementsByName("Flag");
+ for (var j = 0; j < sss.length; j++) {
+
+ if (sss[j].checked) {
+ ssss[j].value = "A";
+ } else {
+ ssss[j].value = "D";
+ }
+ }
+
+ if ($("#Topictype").val() == "01" || $("#Topictype").val() == "03") {
+ var sss = document.getElementsByName("ShifouzhengquName");
+ var booll = 0;
+ for (var i = 0; i < sss.length; i++) {
+ if (sss[i].checked) {
+ booll += 1;
+ }
+ }
+
+ if (booll != 1) {
+ toastr.warning("鍗曢�夊拰鍒ゆ柇棰樺彧鑳芥湁涓�涓纭瓟妗�");
+ return;
+ }
+ } else {
+ var sss = document.getElementsByName("ShifouzhengquName");
+ var booll = 0;
+ for (var i = 0; i < sss.length; i++) {
+ if (sss[i].checked) {
+ booll += 1;
+ }
+ }
+
+ if (booll < 1) {
+ toastr.warning("澶氬崟閫夎嚦灏戞湁涓�涓纭瓟妗�");
+ return;
+ }
+ }
+
+
+ var ssssss = document.getElementsByName("FlagName");
+ var booll11 = 0;
+ for (var i = 0; i < ssssss.length; i++) {
+ if (ssssss[i].checked) {
+ booll11 += 1;
+ }
+ }
+ if (booll11 != 1) {
+ toastr.warning("涓昏В鏋愬彧鑳芥湁涓�涓�");
+ return;
+ }
imgLoad = parent.layer.load(2, { shade: [0.2, '#fff'] });
@@ -524,6 +765,69 @@
$("#Zhongdian").val("D");
}
+ var sss = document.getElementsByName("ShifouzhengquName");
+ var ssss = document.getElementsByName("Shifouzhengqu");
+ for (var j = 0; j < sss.length; j++) {
+
+ if (sss[j].checked) {
+ ssss[j].value = "A";
+ } else {
+ ssss[j].value = "D";
+ }
+ }
+
+ var sss = document.getElementsByName("FlagName");
+ var ssss = document.getElementsByName("Flag");
+ for (var j = 0; j < sss.length; j++) {
+
+ if (sss[j].checked) {
+ ssss[j].value = "A";
+ } else {
+ ssss[j].value = "D";
+ }
+ }
+
+
+ if ($("#Topictype").val() == "01" || $("#Topictype").val() == "03") {
+ var sss = document.getElementsByName("ShifouzhengquName");
+ var booll = 0;
+ for (var i = 0; i < sss.length; i++) {
+ if (sss[i].checked) {
+ booll += 1;
+ }
+ }
+
+ if (booll != 1) {
+ toastr.warning("鍗曢�夊拰鍒ゆ柇棰樺彧鑳芥湁涓�涓纭瓟妗�");
+ return;
+ }
+ } else {
+ var sss = document.getElementsByName("ShifouzhengquName");
+ var booll = 0;
+ for (var i = 0; i < sss.length; i++) {
+ if (sss[i].checked) {
+ booll += 1;
+ }
+ }
+
+ if (booll < 1) {
+ toastr.warning("澶氬崟閫夎嚦灏戞湁涓�涓纭瓟妗�");
+ return;
+ }
+ }
+
+
+ var ssssss = document.getElementsByName("FlagName");
+ var booll11 = 0;
+ for (var i = 0; i < ssssss.length; i++) {
+ if (ssssss[i].checked) {
+ booll11 += 1;
+ }
+ }
+ if (booll11 != 1) {
+ toastr.warning("涓昏В鏋愬彧鑳芥湁涓�涓�");
+ return;
+ }
@@ -593,8 +897,8 @@
<div class="col-sm-2 col-md-2" style="width:5%;">
<input class="form-control" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="">
</div>
- <label class="text-right col-sm-1 col-md-1 control-label" style="width:30px;">绛旀</label>
- <div class="col-sm-6 col-md-6" >
+ <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1" >銆�</label>
+ <div class="col-sm-6 col-md-6" name="Anwser2" >
<input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="">
</div>
@@ -623,6 +927,61 @@
</div>`);
+ } else if (num == 2) {
+ $('#addlist_2').append(oTr);
+ $(oTr).html(` <div class="clearfix layer-area" style="padding-bottom:15px;">
+
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
+ 娉曞緥
+ </label>
+
+
+ <div class="col-sm-5 col-md-5" grouptype="Vdata" >
+
+ <select class="form-control" name="Falv" data-placeholder="閫夋嫨 搴忓垪 ...">
+ <option value="" hassubinfo="true">璇烽�夋嫨</option>
+ @foreach (var item in falv)
+ {
+
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
+
+
+ }
+
+ </select>
+
+ </div>
+
+
+ <label class="text-right col-sm-1 col-md-1 control-label" style="width:30px;">娉曟潯</label>
+ <div class="col-sm-2 col-md-2" >
+ <input class="form-control" label="娉曟潯" name="Fatiao" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="">
+
+ </div>
+
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
+ 涓昏В鏋�
+ </label>
+
+
+ <div class="col-sm-1 col-md-1" grouptype="Vdata" style="width:5%;">
+
+
+
+ <input type="checkbox" name="FlagName" value="D" onclick="checkFlag(this)" />
+
+ <input type="hidden" name="Flag" value="" />
+
+
+
+
+
+ </div>
+
+
+ </div>`);
}
}
@@ -635,8 +994,204 @@
$('#addlist_3').find('.clearfix:last').remove();
}
+ } else if (num == 2) {
+ if ($('#addlist_2').find('.clearfix').length > 1) {
+ $('#addlist_2').find('.clearfix:last').remove();
+ }
+
}
}
+
+
+ $("#Topictype").change(function () {
+
+ var Topictype = $("#Topictype").val();
+ if (Topictype == "03") {
+
+
+ $('#addlist_3').html(` <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-1 col-md-1" grouptype="Vdata" style="width:5%;">
+
+ <input type="checkbox" name="ShifouzhengquName" value="A" onclick="checkShifouzhengqu(this)" />
+
+ <input type="hidden" name="Shifouzhengqu" value="" />
+
+
+ </div>
+
+ <div class="col-sm-2 col-md-2" style="width:5%;">
+ <input class="form-control" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="脳" readonly="readonly">
+ </div>
+
+ <div class="col-sm-6 col-md-6" name="Anwser2" style="display:none;">
+ <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="">
+
+ </div>
+
+ <div class="col-sm-1 col-md-1" grouptype="Vdata" style="width:5%;">
+
+ <input type="checkbox" name="ShifouzhengquName" value="A" onclick="checkShifouzhengqu(this)" />
+
+ <input type="hidden" name="Shifouzhengqu" value="" />
+
+
+ </div>
+
+ <div class="col-sm-2 col-md-2" style="width:5%;">
+ <input class="form-control" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="鈭�" readonly="readonly">
+ </div>
+
+ <div class="col-sm-6 col-md-6" name="Anwser2" style="display:none;">
+ <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="">
+
+ </div>
+
+
+
+
+
+
+
+
+
+
+ </div>`);
+
+
+
+
+
+ } else {
+
+ $('#addlist_3').html(`
+<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-2 col-md-2" style="width:5%;">
+ <input class="form-control" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="A" readonly="readonly">
+ </div>
+ <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1">銆�</label>
+ <div class="col-sm-6 col-md-6" name="Anwser2">
+ <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="">
+
+ </div>
+
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
+ 鏄惁绛旀
+ </label>
+
+
+ <div class="col-sm-1 col-md-1" grouptype="Vdata" style="width:5%;">
+
+ <input type="checkbox" name="ShifouzhengquName" value="D" onclick="checkShifouzhengqu(this)" />
+
+ <input type="hidden" name="Shifouzhengqu" value="" />
+ </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-2 col-md-2" style="width:5%;">
+ <input class="form-control" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="B" readonly="readonly">
+ </div>
+ <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1">銆�</label>
+ <div class="col-sm-6 col-md-6" name="Anwser2">
+ <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="">
+
+ </div>
+
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
+ 鏄惁绛旀
+ </label>
+
+
+ <div class="col-sm-1 col-md-1" grouptype="Vdata" style="width:5%;">
+
+ <input type="checkbox" name="ShifouzhengquName" value="D" onclick="checkShifouzhengqu(this)" />
+
+ <input type="hidden" name="Shifouzhengqu" value="" />
+ </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-2 col-md-2" style="width:5%;">
+ <input class="form-control" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="C" readonly="readonly">
+ </div>
+ <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1">銆�</label>
+ <div class="col-sm-6 col-md-6" name="Anwser2">
+ <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="">
+
+ </div>
+
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
+ 鏄惁绛旀
+ </label>
+
+
+ <div class="col-sm-1 col-md-1" grouptype="Vdata" style="width:5%;">
+
+ <input type="checkbox" name="ShifouzhengquName" value="D" onclick="checkShifouzhengqu(this)" />
+
+ <input type="hidden" name="Shifouzhengqu" value="" />
+ </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-2 col-md-2" style="width:5%;">
+ <input class="form-control" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="D" readonly="readonly">
+ </div>
+ <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1">銆�</label>
+ <div class="col-sm-6 col-md-6" name="Anwser2">
+ <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="">
+
+ </div>
+
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
+ 鏄惁绛旀
+ </label>
+
+
+ <div class="col-sm-1 col-md-1" grouptype="Vdata" style="width:5%;">
+
+ <input type="checkbox" name="ShifouzhengquName" value="D" onclick="checkShifouzhengqu(this)" />
+
+ <input type="hidden" name="Shifouzhengqu" value="" />
+ </div>
+ </div>
+`);
+ }
+ });
+
+
+ function checkShifouzhengqu(vi) {
+
+
+ if (vi.checked) {
+ if ($("#Topictype").val() == "01" || $("#Topictype").val() == "03") {
+ var ssssss = document.getElementsByName("ShifouzhengquName");
+ for (var i = 0; i < ssssss.length; i++) {
+ ssssss[i].checked = false;
+ }
+ vi.checked = true;
+ }
+ }
+ }
+ function checkFlag(vi) {
+ if ($("#Topictype").val() == "01" || $("#Topictype").val() == "03") {
+ if (vi.checked) {
+ var ssssss = document.getElementsByName("FlagName");
+ for (var i = 0; i < ssssss.length; i++) {
+ ssssss[i].checked = false;
+ }
+ vi.checked = true;
+ }
+ }
+ }
+
</script>
</body>
</html>
\ No newline at end of file
diff --git a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Index.cshtml b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Index.cshtml
index 6071b7b..11cb849 100644
--- a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Index.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Index.cshtml
@@ -16,17 +16,17 @@
dataCol = [
{ label: 'id', name: 'Id', labtype: 'txt', hidden: true },
{
- label: '棰樺瀷', name: 'TopictypeName', labtype: 'txt', hidden: false, width: 100
+ label: '棰樺瀷', name: 'TopictypeName', labtype: 'txt', hidden: false, width: 70
},
{
- label: '鐭ヨ瘑鐐�', name: 'ZhishitypeName', labtype: 'txt', hidden: false, width: 100
+ label: '鐭ヨ瘑鐐�', name: 'ZhishitypeName', labtype: 'txt', hidden: false, width: 70
},
- { label: '鍖哄煙', name: 'AreaName', labtype: 'txt', hidden: false, width: 100 },
- { label: '璇曢', name: 'Topic', labtype: 'txt', hidden: false, width: 500 },
- { label: '閲嶇偣鏍囨敞', name: 'ZhongdianName', labtype: 'txt', hidden: false, width: 100 },
- { label: '瀹℃牳', name: 'ShenpiStatusName', labtype: 'txt', hidden: false, width: 100 },
- { label: '瑙f瀽', name: 'JiexiStatusName', labtype: 'txt', hidden: false, width: 100 },
+ { label: '鍖哄煙', name: 'AreaName', labtype: 'txt', hidden: false, width: 70 },
+ { label: '璇曢', name: 'Topic', labtype: 'txt', hidden: false, width: 300 },
+ { label: '閲嶇偣鏍囨敞', name: 'ZhongdianName', labtype: 'txt', hidden: false, width: 70 },
+ { label: '瀹℃牳', name: 'ShenpiStatusName', labtype: 'txt', hidden: false, width: 70 },
+ { label: '瑙f瀽', name: 'Jiexi', labtype: 'txt', hidden: false, width: 300 },
{
@@ -35,12 +35,12 @@
return "<a onclick=\"OpenWindow('淇敼','98%','100%', '/ExpertTestTopic/Edit?id=" + rowObject.Id + "')\" >淇敼</a> <a onclick=\"_pagedel('" + rowObject.Id + "')\" >鍒犻櫎</a>";
}
},
- {
- label: '瑙f瀽', name: 'jiexiya', labtype: 'txt', hidden: false, width: 50,
- formatter: function (cellvalue, options, rowObject) {
- return "<a onclick=\"OpenWindow('淇敼','100%','100%', '/ExpertTestTopicjiexi/Index?topocId=" + rowObject.Id + "')\" >瑙f瀽</a>";
- }
- },
+ //{
+ // label: '瑙f瀽', name: 'jiexiya', labtype: 'txt', hidden: false, width: 50,
+ // formatter: function (cellvalue, options, rowObject) {
+ // return "<a onclick=\"OpenWindow('淇敼','100%','100%', '/ExpertTestTopicjiexi/Index?topocId=" + rowObject.Id + "')\" >瑙f瀽</a>";
+ // }
+ //},
];
dataUrl = "/ExpertTestTopic/GetList?JiexiStatus=D&ShenpiStatus=D";
diff --git a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/print.cshtml b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/print.cshtml
index 544e931..6380dab 100644
--- a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/print.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/print.cshtml
@@ -62,10 +62,10 @@
<td style="width:7%;"> 棰樺瀷</td>
<td style="width:7%;"> 鐭ヨ瘑鐐�</td>
<td style="width:7%;"> 鍖哄煙</td>
- <td style="width:50%;"> 璇曢</td>
+ <td style="width:30%;"> 璇曢</td>
<td style="width:7%;"> 閲嶇偣鏍囨敞</td>
<td style="width:7%;"> 瀹℃牳</td>
- <td style="width:7%;"> 瑙f瀽</td>
+ <td style="width:30%;"> 瑙f瀽</td>
</tr>
@@ -84,7 +84,7 @@
<td> @Html.Raw(ExpertTestTopicDTO.Topic)</td>
<td> @Html.Raw(ExpertTestTopicDTO.ZhongdianName)</td>
<td> @Html.Raw(ExpertTestTopicDTO.ShenpiStatusName)</td>
- <td> @Html.Raw(ExpertTestTopicDTO.JiexiStatusName)</td>
+ <td> @Html.Raw(ExpertTestTopicDTO.Jiexi)</td>
</tr>
i++;
--
Gitblit v1.9.1