修改项目策划、总包合同
This commit is contained in:
@@ -69,7 +69,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.ProjectPlanId = Request.Params["ProjectPlanId"];
|
||||
ProjectService.InitAllProjectDropDownList(this.drpProject, true);
|
||||
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) select x).ToList();
|
||||
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_ProjectPlan ProjectPlan = BLL.ProjectPlanService.GetProjectPlanById(this.ProjectPlanId);
|
||||
if (ProjectPlan != null)
|
||||
{
|
||||
@@ -129,12 +129,11 @@ namespace FineUIPro.Web.ZHGL.Plan
|
||||
bindApprove();
|
||||
if (ProjectPlan.States == Const.ProjectPlan_ReCompile || ProjectPlan.States == Const.ProjectPlan_Compile)
|
||||
{
|
||||
agree.Hidden = true;
|
||||
options.Hidden = true;
|
||||
optio.Hidden = true;
|
||||
this.Opinion.Hidden = true;
|
||||
}
|
||||
if (ProjectPlan.States == Const.ProjectPlan_Reviewing)
|
||||
{
|
||||
BindGrid();
|
||||
txtProjectPlanCode.Readonly = true;
|
||||
txtProjectPlanName.Readonly = true;
|
||||
txtVersionNo.Readonly = true;
|
||||
@@ -145,27 +144,6 @@ namespace FineUIPro.Web.ZHGL.Plan
|
||||
drpPerson.Readonly = true;
|
||||
ContactImg = -1;
|
||||
}
|
||||
//提交版本人多次修改
|
||||
if (ProjectPlan.CompileMan.Equals(CurrUser.PersonId))
|
||||
{
|
||||
txtProjectPlanCode.Enabled = true;
|
||||
txtProjectPlanName.Enabled = true;
|
||||
txtVersionNo.Enabled = true;
|
||||
drpProjectType.Enabled = true;
|
||||
drpProject.Readonly = true;
|
||||
drpCompileMan.Enabled = true;
|
||||
txtCompileDate.Enabled = true;
|
||||
ContactImg = 0;
|
||||
Model.ActionPlan_ProjectPlanApprove approve = ProjectPlanApproveService.GetProjectPlanApproveByApproveMan(ProjectPlanId, CurrUser.PersonId);
|
||||
if (approve == null)
|
||||
{
|
||||
rblIsAgree.Hidden = true;
|
||||
rblIsAgree.Required = false;
|
||||
options.Hidden = true;
|
||||
txtOptions.Required = false;
|
||||
optio.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
WindowAtt_Close(null, null);
|
||||
}
|
||||
@@ -174,11 +152,9 @@ namespace FineUIPro.Web.ZHGL.Plan
|
||||
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.Opinion.Hidden = true;
|
||||
////自动生成编码
|
||||
//this.txtProjectPlanCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.OfficeProjectPlanMenuId, this.ProjectId, this.CurrUser.UnitId);
|
||||
this.txtProjectPlanName.Text = this.SimpleForm1.Title;
|
||||
@@ -192,7 +168,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
||||
/// </summary>
|
||||
private void bindApprove()
|
||||
{
|
||||
var list = ProjectPlanApproveService.getListData(ProjectPlanId);
|
||||
var list = ProjectPlanOpinionService.getListData(ProjectPlanId, this.CurrUser.PersonId);
|
||||
gvApprove.DataSource = list;
|
||||
gvApprove.DataBind();
|
||||
}
|
||||
@@ -287,8 +263,6 @@ namespace FineUIPro.Web.ZHGL.Plan
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
}
|
||||
approve.Edition = Convert.ToInt32(edtion);
|
||||
approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue);
|
||||
approve.ApproveIdea = txtOptions.Text.Trim();
|
||||
ProjectPlanApproveService.UpdateProjectPlanApprove(approve);
|
||||
if (approve.IsAgree == true)
|
||||
{
|
||||
@@ -325,31 +299,13 @@ namespace FineUIPro.Web.ZHGL.Plan
|
||||
if (approve != null)
|
||||
{
|
||||
approve.ApproveDate = DateTime.Now;
|
||||
approve.ApproveIdea = this.txtOptions.Text.Trim();
|
||||
approve.IsAgree = Convert.ToBoolean(this.rblIsAgree.SelectedValue);
|
||||
BLL.ProjectPlanApproveService.UpdateProjectPlanApprove(approve);
|
||||
}
|
||||
List<Model.ActionPlan_ProjectPlanApprove> approve3s = BLL.ProjectPlanApproveService.GetReviewings(ProjectPlanId, edtion); //审批集合
|
||||
List<Model.ActionPlan_ProjectPlanApprove> approve3Ends = BLL.ProjectPlanApproveService.GetReviewingEnds(ProjectPlanId, edtion); //审批完成集合
|
||||
int okNum = approve3Ends.Count(x => x.IsAgree == true); //审批同意数量
|
||||
if (approve3s.Count == approve3Ends.Count)
|
||||
{
|
||||
if (approve3s.Count == okNum) //全部同意,审批完成
|
||||
{
|
||||
ProjectPlan.States = Const.ProjectPlan_Complete;
|
||||
}
|
||||
else //有人不同意,(编制人)修改
|
||||
{
|
||||
Model.ActionPlan_ProjectPlanApprove reApprove = new Model.ActionPlan_ProjectPlanApprove();
|
||||
reApprove.ProjectPlanId = ProjectPlan.ProjectPlanId;
|
||||
reApprove.ApproveMan = ProjectPlan1.CompileMan;
|
||||
reApprove.ApproveType = Const.ProjectPlan_ReCompile;
|
||||
edtion++;
|
||||
reApprove.Edition = edtion;
|
||||
ProjectPlanApproveService.AddProjectPlanApprove(reApprove);
|
||||
ProjectPlan.States = Const.ProjectPlan_ReCompile;
|
||||
ProjectPlan.Edition= edtion;
|
||||
}
|
||||
ProjectPlan.States = Const.ProjectPlan_Complete;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -492,5 +448,94 @@ namespace FineUIPro.Web.ZHGL.Plan
|
||||
String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/ProjectPlanAttachUrl&menuId={2}",
|
||||
-1, fileId, Const.OfficeProjectPlanMenuId)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var opinions = BLL.ProjectPlanOpinionService.GetProjectPlanOpinionByProjectPlanId(this.ProjectPlanId, this.CurrUser.PersonId);
|
||||
this.Grid1.DataSource = opinions;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
|
||||
#region 新增
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectPlanOpinionEdit.aspx?ProjectPlanId={0}", this.ProjectPlanId, "编辑 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑数据方法
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectPlanOpinionEdit.aspx?ProjectPlanOpinionId={0}", id, "编辑 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
BLL.EquipmentInItemService.DeleteEquipmentInItemById(rowID);
|
||||
}
|
||||
BindGrid();
|
||||
ShowNotify("删除数据成功!(表格数据已重新绑定)", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user