后端控制宽度

parent f981c990
...@@ -3806,9 +3806,9 @@ ...@@ -3806,9 +3806,9 @@
是否显示 true显示 是否显示 true显示
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.SecondColumnDictionary.Fixed"> <member name="P:Performance.DtoModels.SecondColumnDictionary.Width">
<summary> <summary>
是否固定 宽度
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.SecondColumnDictionary.Sort"> <member name="P:Performance.DtoModels.SecondColumnDictionary.Sort">
......
...@@ -15,9 +15,9 @@ public class SecondColumnDictionary ...@@ -15,9 +15,9 @@ public class SecondColumnDictionary
/// </summary> /// </summary>
public bool IsTrue { get; set; } public bool IsTrue { get; set; }
/// <summary> /// <summary>
/// 是否固定 /// 宽度
/// </summary> /// </summary>
public string Fixed { get; set; } public string Width { get; set; }
/// <summary> /// <summary>
/// 排序 /// 排序
/// </summary> /// </summary>
...@@ -39,16 +39,16 @@ public SecondColumnDictionary() ...@@ -39,16 +39,16 @@ public SecondColumnDictionary()
{ {
} }
public SecondColumnDictionary(string label, string key, bool isTrue, int sort, string site = "Table", string fix = "", string type = "", string color = "") public SecondColumnDictionary(string label, string key, bool isTrue, int sort, string site = "Table", string type = "", string color = "")
{ {
Label = label; Label = label;
Key = key; Key = key;
IsTrue = isTrue; IsTrue = isTrue;
Sort = sort; Sort = sort;
Site = site; Site = site;
Fixed = fix;
Type = type; Type = type;
Color = color; Color = color;
Width = ((label ?? "").Length * 20 + 10).ToString();
} }
} }
} }
...@@ -147,9 +147,9 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute ...@@ -147,9 +147,9 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
{ {
var maps = new List<SecondColumnDictionary>() var maps = new List<SecondColumnDictionary>()
{ {
new SecondColumnDictionary("人员工号",nameof(ag_bodysource.WorkNumber),true,100, fix:"Left"), new SecondColumnDictionary("人员工号",nameof(ag_bodysource.WorkNumber),true,100),
new SecondColumnDictionary("姓名",nameof(ag_bodysource.Name),true,100, fix:"Left"), new SecondColumnDictionary("姓名",nameof(ag_bodysource.Name),true,100),
new SecondColumnDictionary("科室",nameof(ag_bodysource.Department),true,100, fix:"Left"), new SecondColumnDictionary("科室",nameof(ag_bodysource.Department),true,100),
new SecondColumnDictionary("领取平均绩效",nameof(ag_bodysource.Post),true,100 ), new SecondColumnDictionary("领取平均绩效",nameof(ag_bodysource.Post),true,100 ),
new SecondColumnDictionary("人员系数",nameof(ag_bodysource.StaffCoefficient),false,200, color: "title_color" ), new SecondColumnDictionary("人员系数",nameof(ag_bodysource.StaffCoefficient),false,200, color: "title_color" ),
...@@ -163,7 +163,7 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute ...@@ -163,7 +163,7 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
new SecondColumnDictionary("单项奖励合计",nameof(ag_bodysource.DeptReward),true,499 ), new SecondColumnDictionary("单项奖励合计",nameof(ag_bodysource.DeptReward),true,499 ),
new SecondColumnDictionary("可分配绩效",nameof(ag_bodysource.DistPerformance),true,500 ), new SecondColumnDictionary("可分配绩效",nameof(ag_bodysource.DistPerformance),true,500 ),
new SecondColumnDictionary("医院其他绩效(参考)",nameof(ag_bodysource.OtherPerformance),true,501 ), new SecondColumnDictionary("医院其他绩效",nameof(ag_bodysource.OtherPerformance),true,501 ),
new SecondColumnDictionary("夜班工作量绩效",nameof(ag_bodysource.NightWorkPerformance),true,502 ), new SecondColumnDictionary("夜班工作量绩效",nameof(ag_bodysource.NightWorkPerformance),true,502 ),
//new SecondColumnDictionary("预留比例",nameof(ag_bodysource.ReservedRatio),false,601 ), //new SecondColumnDictionary("预留比例",nameof(ag_bodysource.ReservedRatio),false,601 ),
......
...@@ -530,10 +530,11 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo ...@@ -530,10 +530,11 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo
new Tuple<string, string, Func<per_employee, object>>("人员系数", "StaffCoefficient", (t) => 1), new Tuple<string, string, Func<per_employee, object>>("人员系数", "StaffCoefficient", (t) => 1),
new Tuple<string, string, Func<per_employee, object>>("职称", "JobTitle", (t) => t.JobTitle), new Tuple<string, string, Func<per_employee, object>>("职称", "JobTitle", (t) => t.JobTitle),
new Tuple<string, string, Func<per_employee, object>>("预留年度考核比例", "ReservedRatio", (t) => t.ReservedRatio), new Tuple<string, string, Func<per_employee, object>>("预留年度考核比例", "ReservedRatio", (t) => t.ReservedRatio),
new Tuple<string, string, Func<per_employee, object>>("医院其他绩效", "OtherPerformance", (t) => 0) new Tuple<string, string, Func<per_employee, object>>("医院其他绩效", "OtherPerformance", (t) => 0),
new Tuple<string, string, Func<per_employee, object>>("实发绩效工资金额", "ShifaAmountOfPerformancePay", (t) => 0)
}; };
var specialColumns = new string[] { "FullName", "OtherPerformance" }; var specialColumns = new string[] { "FullName", "OtherPerformance", "ShifaAmountOfPerformancePay" };
foreach (var item in groupData) foreach (var item in groupData)
{ {
...@@ -548,10 +549,12 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo ...@@ -548,10 +549,12 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo
var data = new BodyItem(headItem); var data = new BodyItem(headItem);
data.RowNumber = lastNumber; data.RowNumber = lastNumber;
if (specialColumns.Contains(column.Item2)) if (column.Item2 == "FullName")
{ data.Value = item.DoctorName;
data.Value = column.Item2 == "OtherPerformance" ? item.Amount : item.DoctorName; else if (column.Item2 == "OtherPerformance")
} data.Value = item.Amount;
else if (column.Item2 == "ShifaAmountOfPerformancePay")
data.Value = item.Amount;
else else
{ {
var value = column.Item3.Invoke(employee); var value = column.Item3.Invoke(employee);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment