diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo
index ae886eaa..5b8815fa 100644
Binary files a/.vs/SGGL_SeDin/v17/.wsuo and b/.vs/SGGL_SeDin/v17/.wsuo differ
diff --git a/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj b/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj
index cf24d76b..c4c16785 100644
--- a/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj
+++ b/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj
@@ -215,6 +215,7 @@
+
@@ -3389,6 +3390,13 @@
imageUp.ashx
+
+ ActionPlanListEdit.aspx
+ ASPXCodeBehind
+
+
+ ActionPlanListEdit.aspx
+
diff --git a/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx b/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx
new file mode 100644
index 00000000..92649606
--- /dev/null
+++ b/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx
@@ -0,0 +1,249 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionPlanListEdit.aspx.cs" Inherits="FineUIPro.Mobile.ZHGL.Plan.ActionPlanListEdit" %>
+
+
+
+
+
+
+ 编辑实施计划
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx.cs b/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx.cs
new file mode 100644
index 00000000..f17ac9b4
--- /dev/null
+++ b/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx.cs
@@ -0,0 +1,807 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Mobile.ZHGL.Plan
+{
+ public partial class ActionPlanListEdit : PageBase
+ {
+ #region 定义项
+ ///
+ /// 主键
+ ///
+ public string ActionPlanListId
+ {
+ get
+ {
+ return (string)ViewState["ActionPlanListId"];
+ }
+ set
+ {
+ ViewState["ActionPlanListId"] = value;
+ }
+ }
+ ///
+ /// 项目主键
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+
+ public int ContactImg
+ {
+ get
+ {
+ return Convert.ToInt32(ViewState["ContactImg"]);
+ }
+ set
+ {
+ ViewState["ContactImg"] = value;
+ }
+ }
+
+ ///
+ /// 定义会签意见集合
+ ///
+ public static List approves = new List();
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ this.ActionPlanListId = Request.Params["ActionPlanListId"];
+ var q = (from x in Funs.DB.Person_Persons where x.UnitId == Const.UnitId_SEDIN && x.DepartId == Const.Depart_constructionId && x.RoleIds != null && x.RoleIds != Const.NoOfficeRole && x.RoleIds != string.Empty && (!x.IsPost.HasValue || x.IsPost == true) orderby x.PersonName select x).ToList();
+ Model.ActionPlan_ActionPlanList actionPlanList = BLL.ActionPlanListService.GetActionPlanListById(this.ActionPlanListId);
+ if (actionPlanList != null)
+ {
+ var compileMan = BLL.Person_PersonsService.GetPerson_PersonsById(actionPlanList.CompileMan);
+ if (compileMan != null)
+ {
+ q.Add(compileMan);
+ }
+ }
+ this.drpCompileMan.DataTextField = "PersonName";
+ this.drpCompileMan.DataValueField = "PersonId";
+ this.drpCompileMan.DataSource = q;
+ this.drpCompileMan.DataBind();
+ Funs.FineUIPleaseSelect(this.drpCompileMan);
+ this.drpReviewMan.DataTextField = "PersonName";
+ this.drpReviewMan.DataValueField = "PersonId";
+ this.drpReviewMan.DataSource = q;
+ this.drpReviewMan.DataBind();
+ Funs.FineUIPleaseSelect(this.drpReviewMan);
+ this.drpPerson.DataTextField = "PersonName";
+ this.drpPerson.DataValueField = "PersonId";
+ this.drpPerson.DataSource = q;
+ this.drpPerson.DataBind();
+ Funs.FineUIPleaseSelect(this.drpPerson);
+ BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
+ ContactImg = 0;
+ if (!string.IsNullOrEmpty(this.ActionPlanListId))
+ {
+ if (actionPlanList != null)
+ {
+ HFActionPlanListId.Text = this.ActionPlanListId;
+ this.ProjectId = actionPlanList.ProjectId;
+ //if (this.ProjectId != this.CurrUser.LoginProjectId)
+ //{
+ // BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpCompileMan, this.ProjectId, null, null, false);
+ //}
+ if (actionPlanList.Edition != null)
+ {
+ txtEdition.Text = actionPlanList.Edition.ToString();
+ }
+ ///读取编号
+ this.txtActionPlanListCode.Text = actionPlanList.ActionPlanListCode;
+ this.txtActionPlanListName.Text = actionPlanList.ActionPlanListName;
+ this.txtVersionNo.Text = actionPlanList.VersionNo;
+ if (!string.IsNullOrEmpty(actionPlanList.ProjectType))
+ {
+ this.drpProjectType.SelectedValue = actionPlanList.ProjectType;
+ }
+ else
+ {
+ this.drpProjectType.Hidden = true;
+ }
+ if (!string.IsNullOrEmpty(actionPlanList.ProjectId))
+ {
+ this.drpProject.SelectedValue = actionPlanList.ProjectId;
+ }
+ if (!string.IsNullOrEmpty(actionPlanList.CompileMan))
+ {
+ this.drpCompileMan.SelectedValue = actionPlanList.CompileMan;
+ }
+ if (actionPlanList.CompileDate != null)
+ {
+ this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", actionPlanList.CompileDate);
+ }
+ if (actionPlanList.IsReview == true)
+ {
+ this.rblIsReview.SelectedValue = "True";
+ this.drpReviewMan.Hidden = false;
+ this.drpReviewMan.SelectedValue = actionPlanList.ReviewMan;
+ }
+ else
+ {
+ this.rblIsReview.SelectedValue = "False";
+ }
+ List list = BLL.ActionPlanListApproveService.GetReviewingPersonIds(this.ActionPlanListId);
+ if (list.Count > 0)
+ {
+ this.drpPerson.SelectedValueArray = list.ToArray();
+ }
+ bindApprove();
+ if (actionPlanList.States == Const.ActionPlanList_ReCompile || actionPlanList.States == Const.ActionPlanList_Compile)
+ {
+ agree.Hidden = true;
+ options.Hidden = true;
+ optio.Hidden = true;
+ }
+ if (actionPlanList.States == Const.ActionPlanList_Review)
+ {
+ txtActionPlanListCode.Readonly = true;
+ txtActionPlanListName.Readonly = true;
+ txtVersionNo.Readonly = true;
+ drpProjectType.Readonly = true;
+ drpCompileMan.Readonly = true;
+ txtCompileDate.Readonly = true;
+ rblIsReview.Readonly = true;
+ drpReviewMan.Readonly = true;
+ ContactImg = -1;
+ }
+ else if (actionPlanList.States == Const.ActionPlanList_Reviewing)
+ {
+ txtActionPlanListCode.Readonly = true;
+ txtActionPlanListName.Readonly = true;
+ txtVersionNo.Readonly = true;
+ drpProjectType.Readonly = true;
+ drpCompileMan.Readonly = true;
+ txtCompileDate.Readonly = true;
+ rblIsReview.Readonly = true;
+ drpReviewMan.Readonly = true;
+ drpPerson.Readonly = true;
+ ContactImg = -1;
+ }
+ else if (actionPlanList.States == Const.ActionPlanList_Review2)
+ {
+ txtActionPlanListCode.Readonly = true;
+ txtActionPlanListName.Readonly = true;
+ txtVersionNo.Readonly = true;
+ drpProjectType.Readonly = true;
+ drpCompileMan.Readonly = true;
+ txtCompileDate.Readonly = true;
+ rblIsReview.Readonly = true;
+ drpReviewMan.Readonly = true;
+ drpPerson.Readonly = true;
+ rblIsCompanyReview.Hidden = false;
+ if (actionPlanList.IsCompanyReview == true)
+ {
+ rblIsCompanyReview.SelectedValue = "True";
+ gvDepart.Hidden = false;
+ BindDepart();
+ }
+ else
+ {
+ rblIsCompanyReview.SelectedValue = "False";
+ }
+ ContactImg = -1;
+ }
+ else if (actionPlanList.States == Const.ActionPlanList_DepartReview)
+ {
+ txtActionPlanListCode.Readonly = true;
+ txtActionPlanListName.Readonly = true;
+ txtVersionNo.Readonly = true;
+ drpProjectType.Readonly = true;
+ drpCompileMan.Readonly = true;
+ txtCompileDate.Readonly = true;
+ rblIsReview.Readonly = true;
+ drpReviewMan.Readonly = true;
+ drpPerson.Readonly = true;
+ rblIsCompanyReview.Hidden = false;
+ if (actionPlanList.IsCompanyReview == true)
+ {
+ rblIsCompanyReview.SelectedValue = "True";
+ gvDepart.Hidden = false;
+ BindDepart();
+ }
+ else
+ {
+ rblIsCompanyReview.SelectedValue = "False";
+ }
+ ContactImg = -1;
+ this.btnNew.Hidden = true;
+ this.btnMenuEdit.Hidden = true;
+ this.btnMenuDelete.Hidden = true;
+ this.gvDepart.EnableRowDoubleClickEvent = false;
+ }
+ //提交版本人多次修改
+ //if (actionPlanList.CompileMan.Equals(CurrUser.PersonId))
+ //{
+ // txtActionPlanListCode.Enabled = true;
+ // txtActionPlanListName.Enabled = true;
+ // txtVersionNo.Enabled = true;
+ // drpProjectType.Enabled = true;
+ // drpCompileMan.Enabled = true;
+ // txtCompileDate.Enabled = true;
+ // ContactImg = 0;
+ // Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetActionPlanListApproveByApproveMan(ActionPlanListId, CurrUser.PersonId);
+ // if (approve == null)
+ // {
+ // rblIsAgree.Hidden = true;
+ // rblIsAgree.Required = false;
+ // options.Hidden = true;
+ // txtOptions.Required = false;
+ // optio.Hidden = true;
+ // }
+ //}
+ }
+ WindowAtt_Close(null, null);
+ }
+ else
+ {
+ this.drpCompileMan.SelectedValue = this.CurrUser.PersonId;
+ this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ this.trAtt.Hidden = true;
+ agree.Hidden = true;
+ txtEdition.Text = "0";
+ options.Hidden = true;
+ optio.Hidden = true;
+ plApprove2.Hidden = true;
+ ////自动生成编码
+ //this.txtActionPlanListCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.OfficeActionPlanListMenuId, this.ProjectId, this.CurrUser.UnitId);
+ this.txtActionPlanListName.Text = this.SimpleForm1.Title;
+ this.txtVersionNo.Text = "V1.0";
+ //this.drpProjectType.Hidden = true;
+ this.drpReviewMan.SelectedValue = this.CurrUser.PersonId;
+ this.drpPerson.Hidden = true;
+ }
+ }
+ }
+
+ ///
+ /// 审批列表
+ ///
+ private void bindApprove()
+ {
+ var list = ActionPlanListApproveService.getListData(ActionPlanListId);
+ gvApprove.DataSource = list;
+ gvApprove.DataBind();
+ }
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (this.drpCompileMan.SelectedValue == BLL.Const._Null)
+ {
+ Alert.ShowInTop("请选择编制人!", MessageBoxIcon.Warning);
+ return;
+ }
+ this.SaveData(BLL.Const.BtnSave);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+ }
+
+ ///
+ /// 提交按钮
+ ///
+ ///
+ ///
+ protected void btnSubmit_Click(object sender, EventArgs e)
+ {
+ if (this.drpCompileMan.SelectedValue == BLL.Const._Null)
+ {
+ Alert.ShowInTop("请选择编制人!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (string.IsNullOrEmpty(HFActionPlanListId.Text))
+ {
+ Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (rblIsReview.SelectedValue == "True" && this.drpPerson.SelectedItemArray.Length == 1 && this.drpPerson.SelectedValue == Const._Null && this.rblIsAgree.SelectedValue == "true")
+ {
+ Alert.ShowInTop("请选择评审人员!", MessageBoxIcon.Warning);
+ return;
+ }
+ this.SaveData(BLL.Const.BtnSubmit);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+ }
+
+ ///
+ /// 保存数据
+ ///
+ ///
+ private void SaveData(string type)
+ {
+ Model.ActionPlan_ActionPlanList actionPlanList = new Model.ActionPlan_ActionPlanList
+ {
+ ActionPlanListCode = this.txtActionPlanListCode.Text.Trim(),
+ ActionPlanListName = this.txtActionPlanListName.Text.Trim(),
+ VersionNo = this.txtVersionNo.Text.Trim(),
+ ProjectType = this.drpProjectType.SelectedValue,
+ };
+ if (this.drpProject.SelectedValue != BLL.Const._Null)
+ {
+ actionPlanList.ProjectId = this.drpProject.SelectedValue;
+ }
+ if (this.drpCompileMan.SelectedValue != BLL.Const._Null)
+ {
+ actionPlanList.CompileMan = this.drpCompileMan.SelectedValue;
+ }
+ if (!string.IsNullOrEmpty(this.txtCompileDate.Text.Trim()))
+ {
+ actionPlanList.CompileDate = Convert.ToDateTime(this.txtCompileDate.Text.Trim());
+ }
+ actionPlanList.IsReview = Convert.ToBoolean(this.rblIsReview.SelectedValue);
+ if (this.drpReviewMan.SelectedValue != BLL.Const._Null)
+ {
+ actionPlanList.ReviewMan = this.drpReviewMan.SelectedValue;
+ }
+ int edtion = Convert.ToInt32(txtEdition.Text);
+ actionPlanList.Edition = edtion;
+ if (rblIsCompanyReview.Hidden == false)
+ {
+ actionPlanList.IsCompanyReview = Convert.ToBoolean(this.rblIsCompanyReview.SelectedValue);
+ }
+ if (!string.IsNullOrEmpty(this.ActionPlanListId))
+ {
+ actionPlanList.ActionPlanListId = this.ActionPlanListId;
+ Model.ActionPlan_ActionPlanList actionPlanList1 = ActionPlanListService.GetActionPlanListById(ActionPlanListId);
+ if (type == BLL.Const.BtnSubmit)
+ {
+ if (actionPlanList1.States == Const.ActionPlanList_Review || actionPlanList1.States == Const.ActionPlanList_Compile || actionPlanList1.States == Const.ActionPlanList_ReCompile)
+ {
+ Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetConstructSoluAppByApproveMan(ActionPlanListId, CurrUser.PersonId, Convert.ToInt32(actionPlanList1.Edition));
+ if (type == BLL.Const.BtnSubmit)
+ {
+ approve.ApproveDate = DateTime.Now;
+ }
+ approve.Edition = Convert.ToInt32(edtion);
+ approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
+ approve.ApproveIdea = txtOptions.Text.Trim();
+ ActionPlanListApproveService.UpdateActionPlanListApprove(approve);
+ if (approve.IsAgree == true)
+ {
+ foreach (var item in this.drpPerson.SelectedValueArray)
+ {
+ if (item != Const._Null)
+ {
+ Model.ActionPlan_ActionPlanListApprove approve2 = new Model.ActionPlan_ActionPlanListApprove();
+ approve2.ActionPlanListId = actionPlanList.ActionPlanListId;
+ approve2.ApproveMan = item;
+ approve2.ApproveType = Const.ActionPlanList_Reviewing;
+ approve2.Edition = Convert.ToInt32(edtion);
+ BLL.ActionPlanListApproveService.AddActionPlanListApprove(approve2);
+ }
+ }
+ actionPlanList.States = Const.ActionPlanList_Reviewing;
+ }
+ else
+ {
+ Model.ActionPlan_ActionPlanListApprove reApprove = new Model.ActionPlan_ActionPlanListApprove();
+ reApprove.ActionPlanListId = actionPlanList.ActionPlanListId;
+ reApprove.ApproveMan = actionPlanList1.CompileMan;
+ reApprove.ApproveType = Const.ActionPlanList_ReCompile;
+ edtion++;
+ reApprove.Edition = edtion;
+ ActionPlanListApproveService.AddActionPlanListApprove(reApprove);
+ actionPlanList.States = Const.ActionPlanList_ReCompile;
+ }
+ }
+ else if (actionPlanList1.States == Const.ActionPlanList_Reviewing)
+ {
+ actionPlanList.States = Const.ActionPlanList_Reviewing;
+ Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetConstructSoluAppByApproveMan(ActionPlanListId, CurrUser.PersonId, Convert.ToInt32(actionPlanList1.Edition));
+ if (approve != null)
+ {
+ approve.ApproveDate = DateTime.Now;
+ approve.ApproveIdea = this.txtOptions.Text.Trim();
+ approve.IsAgree = Convert.ToBoolean(this.rblIsAgree.SelectedValue);
+ BLL.ActionPlanListApproveService.UpdateActionPlanListApprove(approve);
+ }
+ List approve3s = BLL.ActionPlanListApproveService.GetReviewings(ActionPlanListId, edtion); //审批集合
+ List approve3Ends = BLL.ActionPlanListApproveService.GetReviewingEnds(ActionPlanListId, edtion); //审批完成集合
+ int okNum = approve3Ends.Count(x => x.IsAgree == true); //审批同意数量
+ if (approve3s.Count == approve3Ends.Count)
+ {
+ if (approve3s.Count == okNum) //全部同意,返回评审负责人办理
+ {
+ Model.ActionPlan_ActionPlanListApprove approve2 = new Model.ActionPlan_ActionPlanListApprove();
+ approve2.ActionPlanListId = actionPlanList.ActionPlanListId;
+ approve2.ApproveMan = actionPlanList.ReviewMan;
+ approve2.ApproveType = Const.ActionPlanList_Review2;
+ approve2.Edition = Convert.ToInt32(edtion);
+ BLL.ActionPlanListApproveService.AddActionPlanListApprove(approve2);
+ actionPlanList.States = Const.ActionPlanList_Review2;
+ }
+ else //有人不同意,(编制人)修改
+ {
+ Model.ActionPlan_ActionPlanListApprove reApprove = new Model.ActionPlan_ActionPlanListApprove();
+ reApprove.ActionPlanListId = actionPlanList.ActionPlanListId;
+ reApprove.ApproveMan = actionPlanList1.CompileMan;
+ reApprove.ApproveType = Const.ActionPlanList_ReCompile;
+ edtion++;
+ reApprove.Edition = edtion;
+ ActionPlanListApproveService.AddActionPlanListApprove(reApprove);
+ actionPlanList.States = Const.ActionPlanList_ReCompile;
+ actionPlanList.Edition = edtion;
+ }
+ }
+ }
+ else if (actionPlanList1.States == Const.ActionPlanList_Review2)
+ {
+ if (rblIsCompanyReview.SelectedValue == "True") //公司部门评审
+ {
+ OAWebSevice.PushoaActionPlan(); //推送OA待办
+ Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetConstructSoluAppByApproveMan(ActionPlanListId, CurrUser.PersonId, Convert.ToInt32(actionPlanList1.Edition));
+ if (type == BLL.Const.BtnSubmit)
+ {
+ approve.ApproveDate = DateTime.Now;
+ }
+ approve.Edition = Convert.ToInt32(edtion);
+ approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
+ approve.ApproveIdea = txtOptions.Text.Trim();
+ ActionPlanListApproveService.UpdateActionPlanListApprove(approve);
+ actionPlanList.States = Const.ActionPlanList_DepartReview;
+ }
+ else //备案
+ {
+ Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetConstructSoluAppByApproveMan(ActionPlanListId, CurrUser.PersonId, Convert.ToInt32(actionPlanList1.Edition));
+ if (type == BLL.Const.BtnSubmit)
+ {
+ approve.ApproveDate = DateTime.Now;
+ }
+ approve.Edition = Convert.ToInt32(edtion);
+ approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
+ approve.ApproveIdea = txtOptions.Text.Trim();
+ ActionPlanListApproveService.UpdateActionPlanListApprove(approve);
+ actionPlanList.States = Const.ActionPlanList_Complete;
+ }
+ }
+ else if (actionPlanList1.States == Const.ActionPlanList_DepartReview)
+ {
+ actionPlanList.States = Const.ActionPlanList_DepartReview;
+ Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetConstructSoluAppByApproveMan(ActionPlanListId, CurrUser.PersonId, Convert.ToInt32(actionPlanList1.Edition));
+ if (approve != null)
+ {
+ approve.ApproveDate = DateTime.Now;
+ approve.ApproveIdea = this.txtOptions.Text.Trim();
+ approve.IsAgree = Convert.ToBoolean(this.rblIsAgree.SelectedValue);
+ BLL.ActionPlanListApproveService.UpdateActionPlanListApprove(approve);
+ OAWebSevice.DoneRequestActionPlan(approve.ActionPlanListApproveId); //处理待办流程
+ }
+ List approve3s = BLL.ActionPlanListApproveService.GetDepartReviewings(ActionPlanListId, edtion); //审批集合
+ List approve3Ends = BLL.ActionPlanListApproveService.GetDepartReviewingEnds(ActionPlanListId, edtion); //审批完成集合
+ int okNum = approve3Ends.Count(x => x.IsAgree == true); //审批同意数量
+ if (approve3s.Count == approve3Ends.Count)
+ {
+ if (approve3s.Count == okNum) //全部同意,审批完成
+ {
+ actionPlanList.States = Const.ActionPlanList_Complete;
+ }
+ else //有人不同意,(编制人)修改
+ {
+ Model.ActionPlan_ActionPlanListApprove reApprove = new Model.ActionPlan_ActionPlanListApprove();
+ reApprove.ActionPlanListId = actionPlanList.ActionPlanListId;
+ reApprove.ApproveMan = actionPlanList1.CompileMan;
+ reApprove.ApproveType = Const.ActionPlanList_ReCompile;
+ edtion++;
+ reApprove.Edition = edtion;
+ ActionPlanListApproveService.AddActionPlanListApprove(reApprove);
+ actionPlanList.States = Const.ActionPlanList_ReCompile;
+ actionPlanList.Edition = edtion;
+ }
+ }
+ }
+ }
+ else
+ {
+ actionPlanList.States = actionPlanList1.States;
+ }
+ //提交时候,更新提交版本
+ //if (CurrUser.PersonId.Equals(actionPlanList1.CompileMan))
+ //{
+ // if (actionPlanList1.States != Const.ActionPlanList_Audit)
+ // {
+ // edtion++;
+ // }
+ // actionPlanList.Edition = Convert.ToInt32(edtion);
+ // actionPlanList.States = Const.ActionPlanList_Audit;
+ //}
+ BLL.ActionPlanListService.UpdateActionPlanList(actionPlanList);
+ BLL.LogService.AddSys_Log(this.CurrUser, this.txtActionPlanListCode.Text, this.ActionPlanListId, BLL.Const.OfficeActionPlanListMenuId, Const.BtnModify);
+ }
+ else
+ {
+ if (!string.IsNullOrEmpty(HFActionPlanListId.Text))
+ {
+ actionPlanList.ActionPlanListId = HFActionPlanListId.Text;
+ }
+ else
+ {
+ actionPlanList.ActionPlanListId = SQLHelper.GetNewID(typeof(Model.ActionPlan_ActionPlanList));
+ }
+ actionPlanList.States = BLL.Const.ActionPlanList_Compile;
+ if (type == BLL.Const.BtnSubmit)
+ {
+ if (rblIsReview.SelectedValue == "True") //施工管理部评审
+ {
+ actionPlanList.States = BLL.Const.ActionPlanList_Reviewing;
+ }
+ else
+ {
+ actionPlanList.States = BLL.Const.ActionPlanList_Complete;
+ }
+ }
+ BLL.ActionPlanListService.AddActionPlanList(actionPlanList);
+ if (type == BLL.Const.BtnSubmit)
+ {
+ Model.ActionPlan_ActionPlanListApprove approve1 = new Model.ActionPlan_ActionPlanListApprove();
+ approve1.ActionPlanListId = actionPlanList.ActionPlanListId;
+ approve1.ApproveDate = DateTime.Now;
+ approve1.ApproveMan = this.CurrUser.PersonId;
+ approve1.ApproveType = Const.ActionPlanList_Compile;
+ approve1.Edition = Convert.ToInt32(txtEdition.Text);
+ ActionPlanListApproveService.AddActionPlanListApprove(approve1);
+ if (rblIsReview.SelectedValue == "True") //施工管理部评审
+ {
+ foreach (var item in this.drpPerson.SelectedValueArray)
+ {
+ if (item != Const._Null)
+ {
+ Model.ActionPlan_ActionPlanListApprove approve2 = new Model.ActionPlan_ActionPlanListApprove();
+ approve2.ActionPlanListId = actionPlanList.ActionPlanListId;
+ approve2.ApproveMan = item;
+ approve2.ApproveType = Const.ActionPlanList_Reviewing;
+ approve2.Edition = Convert.ToInt32(edtion);
+ BLL.ActionPlanListApproveService.AddActionPlanListApprove(approve2);
+ }
+ }
+ }
+ }
+ else
+ {
+ Model.ActionPlan_ActionPlanListApprove approve1 = new Model.ActionPlan_ActionPlanListApprove();
+ approve1.ActionPlanListId = actionPlanList.ActionPlanListId;
+ approve1.ApproveMan = this.CurrUser.PersonId;
+ approve1.ApproveType = Const.ActionPlanList_Compile;
+ approve1.Edition = Convert.ToInt32(txtEdition.Text);
+ ActionPlanListApproveService.AddActionPlanListApprove(approve1);
+ }
+ BLL.LogService.AddSys_Log(this.CurrUser, this.txtActionPlanListCode.Text, this.ActionPlanListId, BLL.Const.OfficeActionPlanListMenuId, Const.BtnAdd);
+ }
+
+ }
+ #endregion
+
+ #region 附件上传
+ ///
+ /// 上传附件
+ ///
+ ///
+ ///
+ protected void btnAttachUrl_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(HFActionPlanListId.Text)) //新增记录
+ {
+ HFActionPlanListId.Text = SQLHelper.GetNewID(typeof(Model.ActionPlan_ActionPlanList));
+ }
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ActionPlanListAttachUrl&menuId={1}&type={2}", HFActionPlanListId.Text, BLL.Const.OfficeActionPlanListMenuId, ContactImg)));
+ }
+
+ protected void btnapprove_Click(object sender, EventArgs e)
+ {
+ //HFConstructSolutionId.Text
+ var approve = ActionPlanListApproveService.GetActionPlanListApproveByApproveMan(HFActionPlanListId.Text, CurrUser.PersonId);
+ if (approve != null)
+ {
+ var approveId = approve.ActionPlanListApproveId;
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
+ String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/ActionPlanListAttachUrl&menuId={2}",
+ 0, approveId, Const.OfficeActionPlanListMenuId)));
+ }
+ }
+ #endregion
+
+ protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
+ {
+ this.divC.InnerHtml = string.Empty;
+ var getAtt = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == HFActionPlanListId.Text);
+ if (getAtt != null)
+ {
+ this.divC.InnerHtml = UploadAttachmentService.ShowAttachment("../../", getAtt.AttachUrl);
+ }
+ else
+ {
+ this.trAtt.Hidden = true;
+ }
+ }
+
+ public string depart(Object DepartId)
+ {
+ return DepartService.getDepartNameById(DepartId.ToString());
+ }
+
+ public string man(Object man)
+ {
+ string appman = string.Empty;
+ if (Person_PersonsService.GetPerson_PersonsById(man.ToString()) != null)
+ {
+ appman = Person_PersonsService.GetPerson_PersonsById(man.ToString()).PersonName;
+ }
+ return appman;
+ }
+
+ protected void gvApprove_RowCommand(object sender, GridCommandEventArgs e)
+ {
+ object[] keys = gvApprove.DataKeys[e.RowIndex];
+ string fileId = string.Empty;
+ if (keys == null)
+ {
+ return;
+ }
+ else
+ {
+ fileId = keys[0].ToString();
+ }
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
+ String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/ActionPlanListAttachUrl&menuId={2}",
+ -1, fileId, Const.OfficeActionPlanListMenuId)));
+ }
+
+ protected void rblIsReview_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (this.rblIsReview.SelectedValue == "True")
+ {
+ this.drpReviewMan.Hidden = false;
+ this.drpPerson.Hidden = false;
+ }
+ else
+ {
+ this.drpReviewMan.Hidden = true;
+ this.drpPerson.Hidden = true;
+ this.drpReviewMan.SelectedValue = this.CurrUser.PersonId;
+ }
+ }
+
+ protected void rblIsCompanyReview_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (this.rblIsCompanyReview.SelectedValue == "True")
+ {
+ this.gvDepart.Hidden = false;
+ BindDepart();
+ }
+ else
+ {
+ this.gvDepart.Hidden = true;
+ }
+ }
+
+ private void BindDepart()
+ {
+ Model.ActionPlan_ActionPlanList actionPlanList = BLL.ActionPlanListService.GetActionPlanListById(this.ActionPlanListId);
+ var list = ActionPlanListApproveService.getDepartListData(ActionPlanListId, actionPlanList.Edition);
+ gvDepart.DataSource = list;
+ gvDepart.DataBind();
+ }
+
+ ///
+ /// 关闭弹出窗口
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, EventArgs e)
+ {
+ BindDepart();
+ }
+
+ protected void btnNew_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartEdit.aspx?ActionPlanListId={0}", this.ActionPlanListId, "编辑 - ")));
+ }
+
+ #region 编辑
+ ///
+ /// 双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ this.EditData();
+ }
+
+ ///
+ /// 右键编辑事件
+ ///
+ ///
+ ///
+ protected void btnMenuEdit_Click(object sender, EventArgs e)
+ {
+ this.EditData();
+ }
+
+ ///
+ /// 编辑数据方法
+ ///
+ private void EditData()
+ {
+ if (gvDepart.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string id = gvDepart.SelectedRowID;
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartEdit.aspx?ActionPlanListApproveId={0}", id, "编辑 - ")));
+ }
+ #endregion
+
+ #region 删除
+ ///
+ /// 右键删除事件
+ ///
+ ///
+ ///
+ protected void btnMenuDelete_Click(object sender, EventArgs e)
+ {
+ if (gvDepart.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in gvDepart.SelectedRowIndexArray)
+ {
+ string rowID = gvDepart.DataKeys[rowIndex][0].ToString();
+ BLL.ActionPlanListApproveService.DeleteActionPlanListApprovesByActionPlanListApproveId(rowID);
+ }
+ BindDepart();
+ ShowNotify("删除数据成功!(表格数据已重新绑定)", MessageBoxIcon.Success);
+ }
+ }
+
+ ///
+ /// 判断是否可以删除
+ ///
+ ///
+ private bool judgementDelete(string id, bool isShow)
+ {
+ string content = string.Empty;
+
+ if (string.IsNullOrEmpty(content))
+ {
+ return true;
+ }
+ else
+ {
+ if (isShow)
+ {
+ Alert.ShowInTop(content);
+ }
+ return false;
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx.designer.cs b/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx.designer.cs
new file mode 100644
index 00000000..efb5a551
--- /dev/null
+++ b/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx.designer.cs
@@ -0,0 +1,440 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Mobile.ZHGL.Plan
+{
+
+
+ public partial class ActionPlanListEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtActionPlanListCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtActionPlanListCode;
+
+ ///
+ /// txtActionPlanListName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtActionPlanListName;
+
+ ///
+ /// drpProject 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpProject;
+
+ ///
+ /// txtVersionNo 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtVersionNo;
+
+ ///
+ /// drpProjectType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpProjectType;
+
+ ///
+ /// drpCompileMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpCompileMan;
+
+ ///
+ /// txtCompileDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtCompileDate;
+
+ ///
+ /// rblIsReview 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblIsReview;
+
+ ///
+ /// drpReviewMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpReviewMan;
+
+ ///
+ /// drpPerson 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpPerson;
+
+ ///
+ /// rblIsCompanyReview 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblIsCompanyReview;
+
+ ///
+ /// gvDepart 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid gvDepart;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// Label5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label5;
+
+ ///
+ /// Label4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label4;
+
+ ///
+ /// trAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow trAtt;
+
+ ///
+ /// ContentPanel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel2;
+
+ ///
+ /// divC 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divC;
+
+ ///
+ /// agree 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow agree;
+
+ ///
+ /// rblIsAgree 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblIsAgree;
+
+ ///
+ /// options 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow options;
+
+ ///
+ /// txtOptions 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtOptions;
+
+ ///
+ /// optio 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow optio;
+
+ ///
+ /// btnapprove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnapprove;
+
+ ///
+ /// plApprove2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow plApprove2;
+
+ ///
+ /// gvApprove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid gvApprove;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// lbTemp 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbTemp;
+
+ ///
+ /// btnAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAttachUrl;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// txtEdition 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField txtEdition;
+
+ ///
+ /// HFActionPlanListId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField HFActionPlanListId;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnSubmit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSubmit;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuEdit;
+
+ ///
+ /// btnMenuDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDelete;
+ }
+}