修改施工日志
This commit is contained in:
@@ -146,6 +146,10 @@ namespace FineUIPro.Web.AttachFile
|
||||
Grid1.DataSource = SourceData();
|
||||
}
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(Request.Params["ConstructionLog"]))
|
||||
{
|
||||
Grid1.DataSource = GetConstructionLogSourceData();
|
||||
}
|
||||
else
|
||||
{
|
||||
Grid1.DataSource = GetSourceData();
|
||||
@@ -519,6 +523,50 @@ namespace FineUIPro.Web.AttachFile
|
||||
return (JArray)Session[sessionName];
|
||||
}
|
||||
|
||||
private JArray GetConstructionLogSourceData()
|
||||
{
|
||||
if (Session[sessionName] == null && !string.IsNullOrEmpty(ToKeyId))
|
||||
{
|
||||
Session[sessionName] = new JArray();
|
||||
List<Model.AttachFile> sours = new List<Model.AttachFile>();
|
||||
List<string> lists = Funs.GetStrListByStr(ToKeyId, ',');
|
||||
sours = (from x in Funs.DB.AttachFile where lists.Contains(x.ToKeyId) select x).ToList();
|
||||
string attachSource = string.Empty;
|
||||
if (sours.Count>0)
|
||||
{
|
||||
foreach (var sour in sours)
|
||||
{
|
||||
string url = sour.AttachUrl.Replace('\\', '/');
|
||||
List<string> list = Funs.GetStrListByStr(url, ',');
|
||||
if (list.Count() > 0)
|
||||
{
|
||||
int i = 0;
|
||||
foreach (var item in list)
|
||||
{
|
||||
string atturl = Funs.RootPath + item.Replace(';', ' ').Trim();
|
||||
if (File.Exists(atturl))
|
||||
{
|
||||
i += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i > 0)
|
||||
{
|
||||
attachSource += sour.AttachSource;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(attachSource))
|
||||
{
|
||||
attachSource = attachSource.Replace("][", ",");
|
||||
Session[sessionName] = JArray.Parse(attachSource);
|
||||
}
|
||||
}
|
||||
return (JArray)Session[sessionName];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@@ -593,11 +593,11 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
}
|
||||
}
|
||||
this.txtRemark.Text = string.Empty;
|
||||
this.txtHSETodaySummary.Text = string.Empty;
|
||||
this.txtHSETodaySummary.Text = "安全事故:次;安全检查:次;安全检查累计问题项:项,已整改:项。";
|
||||
this.txtHSETodaySummaryRemark.Text = string.Empty;
|
||||
this.txtHSETomorrowPlan.Text = string.Empty;
|
||||
this.txtHSETomorrowPlanRemark.Text = string.Empty;
|
||||
this.txtCQMSTodaySummary.Text = string.Empty;
|
||||
this.txtCQMSTodaySummary.Text = "质量事故:次;质量检查:次;质量验收:项;质量检查问题累计:项,已整改:项。";
|
||||
this.txtCQMSTodaySummaryRemark.Text = string.Empty;
|
||||
this.txtCQMSTomorrowPlan.Text = string.Empty;
|
||||
this.txtCQMSTomorrowPlanRemark.Text = string.Empty;
|
||||
@@ -833,7 +833,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
foreach (JObject mergedRow in Grid2.GetMergedData()) //机械数量
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
for (int i = 0; i < list2.Count; i++)
|
||||
{
|
||||
Model.ZHGL_ConstructionLogMachine newItem = new Model.ZHGL_ConstructionLogMachine();
|
||||
newItem.ConstructionLogMachineId = SQLHelper.GetNewID();
|
||||
|
||||
@@ -40,8 +40,12 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Button ID="imgBtnFile" Text="现场照片" ToolTip="查看" Icon="TableCell" runat="server"
|
||||
OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
<f:HiddenField runat="server" ID="hdWorkPostId"></f:HiddenField>
|
||||
<f:HiddenField runat="server" ID="hdMachineId"></f:HiddenField>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Text="发布" ToolTip="发布项目施工日志" Icon="SystemSave" runat="server" OnClick="btnSave_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
</Items>
|
||||
|
||||
@@ -1235,6 +1235,30 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
TextNew();
|
||||
}
|
||||
|
||||
protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.txtCompileDate.Text.Trim()))
|
||||
{
|
||||
Alert.ShowInTop("请选择日期!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
DateTime today = DateTime.Now.Date;
|
||||
if (!string.IsNullOrEmpty(this.txtCompileDate.Text.Trim()))
|
||||
{
|
||||
today = Convert.ToDateTime(this.txtCompileDate.Text.Trim()).Date;
|
||||
}
|
||||
var personLogs = from x in Funs.DB.ZHGL_ConstructionLog
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.CompileDate == today
|
||||
orderby x.CompileDate descending
|
||||
select x;
|
||||
string logIds = string.Empty;
|
||||
foreach (var personLog in personLogs)
|
||||
{
|
||||
logIds += personLog.ConstructionLogId + ",";
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&ConstructionLog=ConstructionLog&path=FileUpload/ConstructionLog&menuId={2}", -1, logIds, BLL.Const.ConstructionLogMenuId)));
|
||||
}
|
||||
|
||||
protected void btnWorkEfficiency_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.txtCompileDate.Text.Trim()))
|
||||
|
||||
+9
@@ -93,6 +93,15 @@ namespace FineUIPro.Web.PZHGL.InformationProject {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// imgBtnFile 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <summary>
|
||||
/// hdWorkPostId 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -20,4 +20,5 @@
|
||||
<TreeNode id="A5A31FE8-0643-4396-99E3-A4A31A947789" Text="无损检测工程" NavigateUrl="PHTGL/BillOfQuantities/TemQuantityList.aspx?Type=8"></TreeNode>
|
||||
<TreeNode id="481E6B1E-A3D5-4012-B828-FE62EB6BA861" Text="消防工程" NavigateUrl="PHTGL/BillOfQuantities/TemQuantityList.aspx?Type=9"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="34037636-4BEC-44A9-8267-7830F021AF02" Text="公司平均工效统计" NavigateUrl="PZHGL/InformationProject/CompanyConstructionLogWorkEfficiencySum.aspx"></TreeNode>
|
||||
</Tree>
|
||||
Reference in New Issue
Block a user