20231114本部检查检查管理优化
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>现场安全检查</title>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<script src="../res/js/jquery-3.3.1.min.js" type="text/javascript"></script>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" />
|
||||
<script src="../../res/js/jquery-3.3.1.min.js"></script>
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
@@ -43,59 +43,65 @@
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="检查标准" EnableCollapse="false" runat="server"
|
||||
BoxFlex="1" DataKeyNames="ID" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="1" DataIDField="ID" AllowSorting="true" SortField="SortIndex" SortDirection="ASC"
|
||||
OnSort="Grid1_Sort" EnableTextSelection="True" EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="主键" ColumnID="ID" DataField="ID" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="序号" ColumnID="SortIndex" DataField="SortIndex"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="60px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检查项目" ColumnID="CheckItem" DataField="CheckItem"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检查标准" ColumnID="CheckStandard" DataField="CheckStandard"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="400px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检查方法" ColumnID="CheckMethod" DataField="CheckMethod"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="300px" >
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检查结果" ColumnID="CheckResult" DataField="CheckResult"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="160px">
|
||||
<Editor>
|
||||
<f:TextArea ID="txtCheckResult" runat="server">
|
||||
</f:TextArea>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="基准分" ColumnID="BaseScore" DataField="BaseScore"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="100px" FieldType="Double">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtBaseScore" runat="server" NoDecimal="false" NoNegative="true" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="扣减分" ColumnID="DeletScore" DataField="DeletScore"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="100px" FieldType="Double">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtDeletScore" runat="server" NoDecimal="false" NoNegative="true" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="实得分" ColumnID="GetScore" DataField="GetScore"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="100px" FieldType="Double">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<%-- <f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />--%>
|
||||
<f:Listener Event="afteredit" Handler="onGridAfterEdit" />
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="检查标准" EnableCollapse="false" runat="server"
|
||||
BoxFlex="1" DataKeyNames="ID" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="1" DataIDField="ID" AllowSorting="true" SortField="SortIndex" SortDirection="ASC"
|
||||
OnSort="Grid1_Sort" EnableTextSelection="True" EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="主键" ColumnID="ID" DataField="ID" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="序号" ColumnID="SortIndex" DataField="SortIndex"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="60px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检查项目" ColumnID="CheckItem" DataField="CheckItem"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检查标准" ColumnID="CheckStandard" DataField="CheckStandard"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="220px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检查方法" ColumnID="CheckMethod" DataField="CheckMethod"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="300px">
|
||||
</f:RenderField>
|
||||
<f:RenderCheckField Width="100px" ColumnID="IsSelect" DataField="IsSelect" HeaderText="是否适用" />
|
||||
<f:RenderField HeaderText="检查结果" ColumnID="CheckResult" DataField="CheckResult"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="200px">
|
||||
<Editor>
|
||||
<f:TextArea ID="txtCheckResult" runat="server">
|
||||
</f:TextArea>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="基准分" ColumnID="BaseScore" DataField="BaseScore"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="70px" FieldType="Double">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtBaseScore" runat="server" NoDecimal="false" NoNegative="true" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="扣减分" ColumnID="DeletScore" DataField="DeletScore"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="70px" FieldType="Double">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtDeletScore" runat="server" NoDecimal="false" NoNegative="true" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="实得分" ColumnID="GetScore" DataField="GetScore"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="70px" FieldType="Double">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
<f:Listener Event="afteredit" Handler="onGridAfterEdit" />
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="lbTotalCheckScore" runat="server" Label="检查得分"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="66% 34%">
|
||||
<Items>
|
||||
<f:Label ID="lbTotal100Score" runat="server"></f:Label>
|
||||
@@ -127,64 +133,64 @@
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var grid1ClientID = '<%= Grid1.ClientID %>';
|
||||
var lbTotal100ScoreClientID = '<%= lbTotal100Score.ClientID %>';
|
||||
<%-- var hdTotalDeletScore6_7ClientID = '<%= hdTotalDeletScore6_7.ClientID %>';--%>
|
||||
|
||||
<%-- var lbTotalLastScoreClientID = '<%= lbTotalLastScore.ClientID %>';--%>
|
||||
var lbEvaluationResultClientID = '<%= lbEvaluationResult.ClientID %>';
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
var lbTotalCheckScoreClientID = '<%= lbTotalCheckScore.ClientID %>';
|
||||
var lbEvaluationResultClientID = '<%= lbEvaluationResult.ClientID %>'; // 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
// F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
//合并列
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['SortIndex', 'CheckItem', 'CheckMethod', 'CheckResult','BaseScore','DeletScore','GetScore'], {
|
||||
this.mergeColumns(['SortIndex', 'CheckItem', 'CheckMethod', 'CheckResult', 'BaseScore', 'DeletScore', 'GetScore'], {
|
||||
dependsFirst: true
|
||||
});
|
||||
}
|
||||
|
||||
function onGridAfterEdit(event, value, params) {
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
function onGridAfterEdit(event, value, params) {
|
||||
var me = this, columnId = params.columnId, rowId = params.rowId;
|
||||
if (columnId === 'DeletScore' || columnId === 'BaseScore') {
|
||||
var baseS = me.getCellValue(rowId, 'BaseScore') * 1.0;;
|
||||
var deleteS = me.getCellValue(rowId, 'DeletScore') * 1.0;;
|
||||
if (columnId === 'DeletScore' || columnId === 'BaseScore' || columnId === 'IsSelect') {
|
||||
var baseS = me.getCellValue(rowId, 'BaseScore');
|
||||
var deleteS = me.getCellValue(rowId, 'DeletScore');
|
||||
me.updateCellValue(rowId, 'GetScore', (baseS - deleteS).toFixed(2));
|
||||
}
|
||||
|
||||
updateSummary();
|
||||
}
|
||||
|
||||
function updateSummary() {
|
||||
var me = F(grid1ClientID), baseScoreTotal = 0, deletScoreTotal = 0, getScoreTotal = 0;
|
||||
me.getRowEls().each(function (index, tr) {
|
||||
baseScoreTotal += me.getCellValue(tr, 'BaseScore') * 1.0;
|
||||
deletScoreTotal += me.getCellValue(tr, 'DeletScore') * 1.0;
|
||||
getScoreTotal += me.getCellValue(tr, 'GetScore') * 1.0;
|
||||
var me = F(grid1ClientID), baseScoreTotal = 0, deletScoreTotal = 0, getScoreTotal = 0;
|
||||
me.getRowEls().each(function (index, tr) {
|
||||
var ischecked = me.getCellValue(tr, 'IsSelect');
|
||||
if (ischecked) {
|
||||
baseScoreTotal += me.getCellValue(tr, 'BaseScore');
|
||||
deletScoreTotal += me.getCellValue(tr, 'DeletScore');
|
||||
getScoreTotal += me.getCellValue(tr, 'GetScore');
|
||||
}
|
||||
});
|
||||
|
||||
// 第三个参数 true,强制更新,不显示左上角的更改标识
|
||||
me.updateSummaryCellValue('CheckItem', '合计分', true);
|
||||
me.updateSummaryCellValue('BaseScore', baseScoreTotal, true);
|
||||
me.updateSummaryCellValue('DeletScore', deletScoreTotal, true);
|
||||
me.updateSummaryCellValue('GetScore', getScoreTotal, true);
|
||||
|
||||
var pValue=((getScoreTotal / baseScoreTotal) * 100).toFixed(2);
|
||||
var lab100 = "本表百分制得分 = (实查项实得分之和/实查项应得满分之和*100) " + pValue + " 分";
|
||||
F(lbTotal100ScoreClientID).setValue(lab100);
|
||||
// 第三个参数 true,强制更新,不显示左上角的更改标识
|
||||
me.updateSummaryCellValue('CheckItem', '合计分', true);
|
||||
me.updateSummaryCellValue('BaseScore', baseScoreTotal, true);
|
||||
me.updateSummaryCellValue('DeletScore', deletScoreTotal, true);
|
||||
me.updateSummaryCellValue('GetScore', getScoreTotal, true);
|
||||
|
||||
// var lastScore = pValue - F(hdTotalDeletScore6_7ClientID).value;
|
||||
//var lablast = "综合评定得分 = 本表得分 - 负面清单罚分 = " + lastScore + " 分";
|
||||
//F(lbTotalLastScoreClientID).setValue(lablast);
|
||||
var pValue = ((getScoreTotal / baseScoreTotal) * 100).toFixed(2);
|
||||
F(lbTotalCheckScoreClientID).setValue(pValue);
|
||||
|
||||
var str= "";
|
||||
var str = "";
|
||||
if (pValue >= 80) {
|
||||
str = "A级(合格)";
|
||||
}
|
||||
str = "A级【合格】";
|
||||
}
|
||||
else if (pValue >= 71 && pValue <= 79) {
|
||||
str = "B级(基本合格)";
|
||||
}
|
||||
str = "B级【基本合格】";
|
||||
}
|
||||
else if (pValue <= 70) {
|
||||
str = "C级(不合格)";
|
||||
}
|
||||
F(lbEvaluationResultClientID).setValue(str);
|
||||
str = "C级【不合格】";
|
||||
}
|
||||
F(lbEvaluationResultClientID).setValue(str);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -74,7 +74,14 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
{
|
||||
this.lbTotal100Score.Text = "本表百分制得分 = (实查项实得分之和/实查项应得满分之和*100) 分";
|
||||
}
|
||||
|
||||
if (table1.Total100Score.HasValue)
|
||||
{
|
||||
this.lbTotalCheckScore.Text = table1.Total100Score.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lbTotalCheckScore.Text = "100";
|
||||
}
|
||||
//if (table1.TotalLastScore.HasValue)
|
||||
//{
|
||||
// this.lbTotalLastScore.Text = "综合评定得分 = 本表得分 - 负面清单罚分 = " + table1.TotalLastScore + " 分";
|
||||
@@ -95,19 +102,9 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
#region 数据绑定
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT [ID],
|
||||
[SortIndex],
|
||||
[CheckItem],
|
||||
[CheckStandard],
|
||||
[CheckMethod],
|
||||
[CheckResult],
|
||||
[BaseScore],
|
||||
[DeletScore],
|
||||
[GetScore],
|
||||
[Type],
|
||||
[CheckNoticeId]"
|
||||
+ @" FROM ProjectSupervision_Check1"
|
||||
+ @" WHERE Type='1' AND CheckNoticeId=@CheckNoticeId ORDER BY SortIndex";
|
||||
string strSql = @"SELECT CheckNoticeId,ID,SortIndex,CheckItem,CheckStandard,CheckMethod,CheckResult,BaseScore,DeletScore,GetScore,Type,IsSelect
|
||||
FROM ProjectSupervision_Check1
|
||||
WHERE Type='1' AND CheckNoticeId=@CheckNoticeId ORDER BY SortIndex";
|
||||
SqlParameter[] parameter = new SqlParameter[]
|
||||
{
|
||||
new SqlParameter("@CheckNoticeId",this.CheckNoticeId),
|
||||
@@ -116,29 +113,6 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
this.Grid1.DataSource = tb;
|
||||
//求和
|
||||
this.OutputSummaryData(tb);
|
||||
|
||||
if (tb.Rows.Count == 0)
|
||||
{
|
||||
string strSql2 = @"SELECT [ID],
|
||||
[SortIndex],
|
||||
[CheckItem],
|
||||
[CheckStandard],
|
||||
[CheckMethod],
|
||||
[BaseScore],
|
||||
[Type],
|
||||
[Indexs],
|
||||
NULL as DeletScore,
|
||||
[BaseScore] AS GetScore"
|
||||
+ @" FROM [dbo].[ProjectSupervision_CheckTemplate]"
|
||||
+ @" WHERE Type='1' ORDER BY [Indexs]";
|
||||
List<SqlParameter> listStr2 = new List<SqlParameter>();
|
||||
|
||||
SqlParameter[] parameter2 = listStr2.ToArray();
|
||||
DataTable tb2 = SQLHelper.GetDataTableRunText(strSql2, parameter2);
|
||||
this.Grid1.DataSource = tb2;
|
||||
//求和
|
||||
this.OutputSummaryData(tb2);
|
||||
}
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
|
||||
@@ -151,35 +125,13 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
decimal baseScoreTotal = 0;
|
||||
decimal deletScoreTotal = 0;
|
||||
decimal getScoreTotal = 0;
|
||||
List<string> lists = new List<string>();
|
||||
foreach (DataRow row in source.Rows)
|
||||
{
|
||||
var checks = BLL.ProjectSupervision_Check1Service.GetCheck1ByCheckItem(row["CheckItem"].ToString(), this.CheckNoticeId);
|
||||
if (checks != null)
|
||||
if (row["IsSelect"].ToString() == "True")
|
||||
{
|
||||
if (!lists.Contains(checks.CheckItem))
|
||||
{
|
||||
baseScoreTotal += Funs.GetNewDecimalOrZero(row["BaseScore"].ToString());
|
||||
deletScoreTotal += Funs.GetNewDecimalOrZero(row["DeletScore"].ToString());
|
||||
getScoreTotal += Funs.GetNewDecimalOrZero(row["GetScore"].ToString());
|
||||
|
||||
lists.Add(row["CheckItem"].ToString());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var temp = Funs.DB.ProjectSupervision_CheckTemplate.FirstOrDefault(x => x.CheckItem == row["CheckItem"].ToString() && x.Type == "1");
|
||||
if (temp != null)
|
||||
{
|
||||
if (!lists.Contains(temp.CheckItem))
|
||||
{
|
||||
baseScoreTotal += Funs.GetNewDecimalOrZero(row["BaseScore"].ToString());
|
||||
deletScoreTotal += Funs.GetNewDecimalOrZero(row["DeletScore"].ToString());
|
||||
getScoreTotal += Funs.GetNewDecimalOrZero(row["GetScore"].ToString());
|
||||
|
||||
lists.Add(row["CheckItem"].ToString());
|
||||
}
|
||||
}
|
||||
baseScoreTotal += Funs.GetNewDecimalOrZero(row["BaseScore"].ToString());
|
||||
deletScoreTotal += Funs.GetNewDecimalOrZero(row["DeletScore"].ToString());
|
||||
getScoreTotal += Funs.GetNewDecimalOrZero(row["GetScore"].ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,44 +171,23 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
}
|
||||
if (this.Grid1.GetModifiedData().Count > 0)
|
||||
{
|
||||
BLL.ProjectSupervision_Check1Service.DeleteCheckByNoticeId(this.CheckNoticeId);
|
||||
|
||||
//BLL.ProjectSupervision_Check1Service.DeleteCheckByNoticeId(this.CheckNoticeId);
|
||||
JArray teamGroupData = this.Grid1.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
var checks = BLL.ProjectSupervision_Check1Service.GetCheck1ByCheckItem(values.Value<string>("CheckItem"), this.CheckNoticeId);
|
||||
if (checks == null)
|
||||
{
|
||||
Model.ProjectSupervision_Check1 newCheck = new Model.ProjectSupervision_Check1();
|
||||
newCheck.ID = SQLHelper.GetNewID();
|
||||
newCheck.SortIndex = Funs.GetNewInt(values.Value<string>("SortIndex"));
|
||||
newCheck.CheckItem = values.Value<string>("CheckItem");
|
||||
newCheck.CheckStandard = values.Value<string>("CheckStandard");
|
||||
newCheck.CheckMethod = values.Value<string>("CheckMethod");
|
||||
newCheck.CheckResult = values.Value<string>("CheckResult");
|
||||
newCheck.BaseScore = Funs.GetNewDecimalOrZero(values.Value<string>("BaseScore"));
|
||||
newCheck.DeletScore = Funs.GetNewDecimalOrZero(values.Value<string>("DeletScore"));
|
||||
newCheck.GetScore = Funs.GetNewDecimalOrZero(values.Value<string>("GetScore"));
|
||||
newCheck.Type = "1";
|
||||
newCheck.CheckNoticeId = this.CheckNoticeId;
|
||||
BLL.ProjectSupervision_Check1Service.AddCheck1(newCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ProjectSupervision_Check1 newCheck = new Model.ProjectSupervision_Check1();
|
||||
newCheck.ID = SQLHelper.GetNewID();
|
||||
newCheck.SortIndex = checks.SortIndex;
|
||||
newCheck.CheckItem = checks.CheckItem;
|
||||
newCheck.CheckStandard = values.Value<string>("CheckStandard");
|
||||
newCheck.CheckMethod = checks.CheckMethod;
|
||||
newCheck.CheckResult = checks.CheckResult;
|
||||
newCheck.BaseScore = checks.BaseScore;
|
||||
newCheck.DeletScore = checks.DeletScore;
|
||||
newCheck.GetScore = checks.GetScore;
|
||||
newCheck.Type = "1";
|
||||
newCheck.CheckNoticeId = this.CheckNoticeId;
|
||||
BLL.ProjectSupervision_Check1Service.AddCheck1(newCheck);
|
||||
JObject values = teamGroupRow.Value<JObject>("values"); bool isSelect = Convert.ToBoolean(values.Value<string>("IsSelect"));
|
||||
if (isSelect)
|
||||
{
|
||||
var taleItem = Funs.DB.ProjectSupervision_Check1.FirstOrDefault(x => x.ID == values.Value<string>("ID"));
|
||||
if (taleItem != null)
|
||||
{
|
||||
taleItem.CheckResult = values.Value<string>("CheckResult");
|
||||
taleItem.IsSelect = Convert.ToBoolean(values.Value<string>("IsSelect"));
|
||||
taleItem.BaseScore = Funs.GetNewDecimalOrZero(values.Value<string>("BaseScore"));
|
||||
taleItem.DeletScore = Funs.GetNewDecimalOrZero(values.Value<string>("DeletScore"));
|
||||
taleItem.GetScore = (taleItem.BaseScore - taleItem.DeletScore);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -269,15 +200,12 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
var tale1Item = from x in Funs.DB.ProjectSupervision_Check1 where x.CheckNoticeId == this.CheckNoticeId && x.Type == "1" orderby x.SortIndex select x;
|
||||
if (tale1Item.Count() > 0)
|
||||
{
|
||||
List<string> lists = new List<string>();
|
||||
foreach (var item in tale1Item)
|
||||
{
|
||||
var result = lists.Exists(t => t == item.CheckItem);//如果是相同的检查项目,则只增加其中一条的分数
|
||||
if (!result)
|
||||
if (item.IsSelect == true)
|
||||
{
|
||||
totalBaseScore += item.BaseScore.Value;
|
||||
totalDeletScore += item.DeletScore.Value;
|
||||
lists.Add(item.CheckItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,7 +214,7 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
totalGetScore = totalBaseScore - totalDeletScore;
|
||||
decimal sS = (totalGetScore / totalBaseScore) * 100;
|
||||
total100Score = Math.Round(sS, 2);
|
||||
totalLastScore = total100Score; //total100Score - Funs.GetNewDecimalOrZero(this.hdTotalDeletScore6_7.Text));
|
||||
totalLastScore = total100Score;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +131,15 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtDeletScore;
|
||||
|
||||
/// <summary>
|
||||
/// lbTotalCheckScore 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbTotalCheckScore;
|
||||
|
||||
/// <summary>
|
||||
/// lbTotal100Score 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.tileFont {
|
||||
font-weight:600;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -25,7 +29,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="300px" Title="监督检查" TitleToolTip="监督检查" ShowBorder="true"
|
||||
EnableCollapse="true" Width="350px" Title="监督检查" TitleToolTip="监督检查" ShowBorder="true"
|
||||
ShowHeader="false" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="VBox" AutoScroll="true">
|
||||
<Items>
|
||||
<f:DatePicker ID="txtCheckStartTimeS" runat="server" Label="开始时间" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
|
||||
@@ -37,7 +41,7 @@
|
||||
</Items>
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" EnableCollapse="true" ShowHeader="true" Title="监督检查节点树"
|
||||
OnNodeCommand="tvControlItem_NodeCommand" AutoLeafIdentification="true" Height="620px"
|
||||
OnNodeCommand="tvControlItem_NodeCommand" AutoLeafIdentification="true" Height="650px"
|
||||
runat="server" EnableTextSelection="true">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
@@ -48,6 +52,7 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lb1" Text="安全检查" CssClass="tileFont"></f:Label>
|
||||
<%--<f:Button ID="btnFind" Text="安全监督检查管理办法" Icon="Find" runat="server" OnClick="btnFind_Click">
|
||||
</f:Button>--%>
|
||||
<f:HiddenField runat="server" ID="hdCheckNoticeId"></f:HiddenField>
|
||||
@@ -107,13 +112,6 @@
|
||||
<f:Form ID="Form2" ShowBorder="true" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:Label ID="Label1" runat="server" Text="现场安全检查" >
|
||||
</f:Label>
|
||||
<%-- <f:Label ID="lblSubjectUnitId" runat="server" Label="受检对象"></f:Label>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<%-- <f:Label ID="lblCheckDate" runat="server" Label="生效日">
|
||||
@@ -125,7 +123,9 @@
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<Items>
|
||||
<f:Label ID="Label1" runat="server" Text="现场安全检查" CssClass="tileFont">
|
||||
</f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnCheck1" Text="编辑" Icon="TableEdit" runat="server" OnClick="btnCheck1_Click" Hidden="true">
|
||||
</f:Button>
|
||||
@@ -139,14 +139,7 @@
|
||||
<Items>
|
||||
<f:Form ID="Form4" ShowBorder="true" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:Label ID="Label9" runat="server" Text="检查报告" >
|
||||
</f:Label>
|
||||
<%--<f:Label ID="lblCheckObject" runat="server" Label="受检对象"></f:Label>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<Rows>
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<%-- <f:Label ID="lblCheckStartTime" runat="server" Label="生效日">
|
||||
@@ -159,6 +152,8 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Label ID="Label9" runat="server" Text="检查报告" CssClass="tileFont">
|
||||
</f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill4" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnCheck3" Text="编辑" Icon="TableEdit" runat="server" OnClick="btnCheck3_Click" Hidden="true">
|
||||
</f:Button>
|
||||
@@ -172,14 +167,7 @@
|
||||
<Items>
|
||||
<f:Form ID="Form3" ShowBorder="true" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:Label ID="Label5" runat="server" Text="隐患整改" >
|
||||
</f:Label>
|
||||
<%-- <f:Label ID="lblUnitId" runat="server" Label="受检对象"></f:Label>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<Rows>
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<%-- <f:Label ID="lblCheckedDate" runat="server" Label="生效日">
|
||||
@@ -192,6 +180,8 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Label ID="Label5" runat="server" Text="隐患整改" CssClass="tileFont">
|
||||
</f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill3" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnCheck2" Text="编辑" ToolTip="编辑隐患整改" Icon="TableEdit" runat="server" OnClick="btnCheck2_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
string window = String.Format("CheckNoticeEdit.aspx?CheckNoticeId={0}", this.CheckNoticeId, "编辑 - ");
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(window));
|
||||
}
|
||||
@@ -300,6 +300,38 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// <param name="e"></param>
|
||||
protected void btnCheck1_Click(object sender, EventArgs e)
|
||||
{
|
||||
var checkInfo = BLL.CheckNoticeService.GetCheckNoticeById(this.CheckNoticeId);
|
||||
if (checkInfo != null)
|
||||
{
|
||||
var getCheckCount = Funs.DB.ProjectSupervision_Check1.Where(x => x.CheckNoticeId == this.CheckNoticeId).Count();
|
||||
if (getCheckCount == 0)
|
||||
{
|
||||
////增加明细
|
||||
var checkTemplate = from x in Funs.DB.ProjectSupervision_CheckTemplate where x.Type == "1" select x;
|
||||
if (checkTemplate.Count() > 0)
|
||||
{
|
||||
foreach (var item in checkTemplate)
|
||||
{
|
||||
Model.ProjectSupervision_Check1 check1 = new Model.ProjectSupervision_Check1
|
||||
{
|
||||
CheckNoticeId = this.CheckNoticeId,
|
||||
ID = SQLHelper.GetNewID(),
|
||||
SortIndex = item.SortIndex,
|
||||
CheckItem = item.CheckItem,
|
||||
CheckStandard = item.CheckStandard,
|
||||
CheckMethod = item.CheckMethod,
|
||||
BaseScore = item.BaseScore,
|
||||
DeletScore = 0,
|
||||
GetScore = item.BaseScore,
|
||||
Type = item.Type
|
||||
};
|
||||
Funs.DB.ProjectSupervision_Check1.InsertOnSubmit(check1);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string window = String.Format("CheckContentEdit.aspx?CheckNoticeId={0}", this.CheckNoticeId, "编辑 - ");
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(window));
|
||||
}
|
||||
|
||||
+36
-27
@@ -95,6 +95,15 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// lb1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lb1;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckNoticeId 控件。
|
||||
/// </summary>
|
||||
@@ -221,15 +230,6 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// lblResult 控件。
|
||||
/// </summary>
|
||||
@@ -248,6 +248,15 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill2 控件。
|
||||
/// </summary>
|
||||
@@ -284,15 +293,6 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form4;
|
||||
|
||||
/// <summary>
|
||||
/// Label9 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label9;
|
||||
|
||||
/// <summary>
|
||||
/// lblCheckReportResult 控件。
|
||||
/// </summary>
|
||||
@@ -311,6 +311,15 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar4;
|
||||
|
||||
/// <summary>
|
||||
/// Label9 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label9;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill4 控件。
|
||||
/// </summary>
|
||||
@@ -347,15 +356,6 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form3;
|
||||
|
||||
/// <summary>
|
||||
/// Label5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label5;
|
||||
|
||||
/// <summary>
|
||||
/// lblCheckResult 控件。
|
||||
/// </summary>
|
||||
@@ -374,6 +374,15 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// Label5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label5;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill3 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user