修改总包合同

This commit is contained in:
2023-09-05 15:17:21 +08:00
parent 390865d563
commit b53e552cfa
10 changed files with 48 additions and 213 deletions
@@ -61,8 +61,8 @@
SortField="MainContractName" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="ProjectName" DataField="ProjectName" ExpandUnusedSpace="True"
SortField="ProjectName" FieldType="String" HeaderText="项目名称" HeaderTextAlign="Center"
<f:RenderField Width="200px" ColumnID="ProjectId" DataField="ProjectId" ExpandUnusedSpace="True"
SortField="ProjectId" FieldType="String" HeaderText="项目名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="VersionNo" DataField="VersionNo" SortField="VersionNo"
@@ -36,12 +36,10 @@ namespace FineUIPro.Web.ZHGL.Plan
/// </summary>
private void BindGrid()
{
string strSql = "SELECT MainContract.MainContractId,MainContract.ProjectId,Project.ProjectName,MainContractCode,MainContract.MainContractName,MainContract.VersionNo,(CASE MainContract.ProjectType WHEN '1' THEN 'EPC' WHEN '2' THEN 'EPCM' WHEN '3' THEN 'C' WHEN '4' THEN '其他' END ) AS ProjectType,MainContract.MainContractContents,MainContract.CompileMan,Users.PersonName AS CompileManName, MainContract.CompileDate,MainContract.States"
string strSql = "SELECT MainContract.MainContractId,MainContract.ProjectId,MainContractCode,MainContract.MainContractName,MainContract.VersionNo,(CASE MainContract.ProjectType WHEN '1' THEN 'EPC' WHEN '2' THEN 'EPCM' WHEN '3' THEN 'C' WHEN '4' THEN '其他' END ) AS ProjectType,MainContract.MainContractContents,MainContract.CompileMan, MainContract.CompileDate,MainContract.States"
+ @" FROM ActionPlan_MainContract AS MainContract "
+ @" LEFT JOIN Base_Project AS Project ON MainContract.ProjectId=Project.ProjectId "
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON MainContract.MainContractId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
+ @" LEFT JOIN Person_Persons AS OperateUser ON FlowOperate.OperaterId=OperateUser.PersonId "
+ @" LEFT JOIN Person_Persons AS Users ON Users.PersonId = MainContract.CompileMan "
+ @" WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (this.drpProject.SelectedValue != BLL.Const._Null)
@@ -344,7 +342,7 @@ namespace FineUIPro.Web.ZHGL.Plan
Model.ActionPlan_MainContract MainContract = MainContractService.GetMainContractById(id);
if (MainContract != null)
{
string projectName = BLL.ProjectService.GetProjectNameByProjectId(MainContract.ProjectId);
string projectName = MainContract.ProjectId;
newUrl = uploadfilepath.Replace(".xlsx", MainContract.MainContractCode + "(" + MainContract.MainContractName + ")" + ".xlsx");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
@@ -26,9 +26,9 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList runat="server" ID="drpProject" EnableEdit="true" LabelWidth="140px" Label="项目名称"
LabelAlign="Right" >
</f:DropDownList>
<f:TextBox ID="txtProjectId" runat="server" Label="项目名称" Required="true"
ShowRedStar="true" LabelAlign="Right" LabelWidth="140px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
@@ -46,9 +46,9 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpCompileMan" runat="server" Label="编制人" LabelAlign="Right" EnableEdit="true"
LabelWidth="140px">
</f:DropDownList>
<f:TextBox ID="txtCompileMan" runat="server" Label="编制人" Required="true"
ShowRedStar="true" LabelAlign="Right" LabelWidth="140px">
</f:TextBox>
<f:DatePicker ID="txtCompileDate" runat="server" Label="编制日期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
@@ -68,7 +68,6 @@ namespace FineUIPro.Web.ZHGL.Plan
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.ProjectId = this.CurrUser.LoginProjectId;
this.MainContractId = Request.Params["MainContractId"];
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) orderby x.PersonName select x).ToList();
Model.ActionPlan_MainContract MainContract = BLL.MainContractService.GetMainContractById(this.MainContractId);
if (MainContract != null)
@@ -79,11 +78,6 @@ namespace FineUIPro.Web.ZHGL.Plan
q.Add(compileMan);
}
}
this.drpCompileMan.DataTextField = "PersonName";
this.drpCompileMan.DataValueField = "PersonId";
this.drpCompileMan.DataSource = q;
this.drpCompileMan.DataBind();
Funs.FineUIPleaseSelect(this.drpCompileMan);
this.drpPerson.DataTextField = "PersonName";
this.drpPerson.DataValueField = "PersonId";
this.drpPerson.DataSource = q;
@@ -100,7 +94,7 @@ namespace FineUIPro.Web.ZHGL.Plan
{
txtEdition.Text = MainContract.Edition.ToString();
}
this.drpProject.SelectedValue = MainContract.ProjectId;
this.txtProjectId.Text = MainContract.ProjectId;
///读取编号
this.txtMainContractCode.Text = MainContract.MainContractCode;
this.txtMainContractName.Text = MainContract.MainContractName;
@@ -113,10 +107,7 @@ namespace FineUIPro.Web.ZHGL.Plan
{
this.drpProjectType.Hidden = true;
}
if (!string.IsNullOrEmpty(MainContract.CompileMan))
{
this.drpCompileMan.SelectedValue = MainContract.CompileMan;
}
this.txtCompileMan.Text = MainContract.CompileMan;
if (MainContract.CompileDate != null)
{
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", MainContract.CompileDate);
@@ -137,8 +128,8 @@ namespace FineUIPro.Web.ZHGL.Plan
txtMainContractName.Readonly = true;
txtVersionNo.Readonly = true;
drpProjectType.Readonly = true;
drpProject.Readonly = true;
drpCompileMan.Readonly = true;
txtProjectId.Readonly = true;
txtCompileMan.Readonly = true;
txtCompileDate.Readonly = true;
drpPerson.Readonly = true;
ContactImg = -1;
@@ -148,7 +139,7 @@ namespace FineUIPro.Web.ZHGL.Plan
}
else
{
this.drpCompileMan.SelectedValue = this.CurrUser.PersonId;
this.txtCompileMan.Text = this.CurrUser.PersonName;
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.trAtt.Hidden = true;
txtEdition.Text = "0";
@@ -181,11 +172,6 @@ namespace FineUIPro.Web.ZHGL.Plan
/// <param name="e"></param>
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());
}
@@ -197,16 +183,6 @@ namespace FineUIPro.Web.ZHGL.Plan
/// <param name="e"></param>
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (this.drpProject.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
if (this.drpCompileMan.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择编制人!", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(HFMainContractId.Text))
{
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
@@ -234,14 +210,8 @@ namespace FineUIPro.Web.ZHGL.Plan
VersionNo = this.txtVersionNo.Text.Trim(),
ProjectType = this.drpProjectType.SelectedValue,
};
if (this.drpProject.SelectedValue != BLL.Const._Null)
{
MainContract.ProjectId = this.drpProject.SelectedValue;
}
if (this.drpCompileMan.SelectedValue != BLL.Const._Null)
{
MainContract.CompileMan = this.drpCompileMan.SelectedValue;
}
MainContract.ProjectId = this.txtProjectId.Text;
MainContract.CompileMan = this.txtCompileMan.Text;
if (!string.IsNullOrEmpty(this.txtCompileDate.Text.Trim()))
{
MainContract.CompileDate = Convert.ToDateTime(this.txtCompileDate.Text.Trim());
@@ -58,13 +58,13 @@ namespace FineUIPro.Web.ZHGL.Plan {
protected global::FineUIPro.TextBox txtMainContractName;
/// <summary>
/// drpProject 控件。
/// txtProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProject;
protected global::FineUIPro.TextBox txtProjectId;
/// <summary>
/// txtVersionNo 控件。
@@ -85,13 +85,13 @@ namespace FineUIPro.Web.ZHGL.Plan {
protected global::FineUIPro.DropDownList drpProjectType;
/// <summary>
/// drpCompileMan 控件。
/// txtCompileMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCompileMan;
protected global::FineUIPro.TextBox txtCompileMan;
/// <summary>
/// txtCompileDate 控件。
@@ -26,9 +26,9 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList runat="server" ID="drpProject" EnableEdit="true" LabelWidth="140px" Label="项目名称" Readonly="true"
LabelAlign="Right" >
</f:DropDownList>
<f:TextBox ID="txtProjectId" runat="server" Label="项目名称" Readonly="true"
LabelAlign="Right" LabelWidth="140px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
@@ -46,9 +46,9 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpCompileMan" runat="server" Label="编制人" LabelAlign="Right" Readonly="true"
LabelWidth="140px">
</f:DropDownList>
<f:TextBox ID="txtCompileMan" runat="server" Label="编制人" Readonly="true"
LabelAlign="Right" LabelWidth="140px">
</f:TextBox>
<f:DatePicker ID="txtCompileDate" runat="server" Label="编制日期" LabelAlign="Right" Readonly="true"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
@@ -56,7 +56,6 @@ namespace FineUIPro.Web.ZHGL.Plan
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.ProjectId = this.CurrUser.LoginProjectId;
this.MainContractId = Request.Params["MainContractId"];
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) orderby x.PersonName select x).ToList();
Model.ActionPlan_MainContract MainContract = BLL.MainContractService.GetMainContractById(this.MainContractId);
if (MainContract != null)
@@ -67,11 +66,6 @@ namespace FineUIPro.Web.ZHGL.Plan
q.Add(compileMan);
}
}
this.drpCompileMan.DataTextField = "PersonName";
this.drpCompileMan.DataValueField = "PersonId";
this.drpCompileMan.DataSource = q;
this.drpCompileMan.DataBind();
Funs.FineUIPleaseSelect(this.drpCompileMan);
this.drpPerson.DataTextField = "PersonName";
this.drpPerson.DataValueField = "PersonId";
this.drpPerson.DataSource = q;
@@ -90,7 +84,7 @@ namespace FineUIPro.Web.ZHGL.Plan
///读取编号
this.txtMainContractCode.Text = MainContract.MainContractCode;
this.txtMainContractName.Text = MainContract.MainContractName;
this.drpProject.SelectedValue = MainContract.ProjectId;
this.txtProjectId.Text = MainContract.ProjectId;
this.txtVersionNo.Text = MainContract.VersionNo;
if (!string.IsNullOrEmpty(MainContract.ProjectType))
{
@@ -100,10 +94,7 @@ namespace FineUIPro.Web.ZHGL.Plan
{
this.drpProjectType.Hidden = true;
}
if (!string.IsNullOrEmpty(MainContract.CompileMan))
{
this.drpCompileMan.SelectedValue = MainContract.CompileMan;
}
this.txtCompileMan.Text = MainContract.CompileMan;
if (MainContract.CompileDate != null)
{
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", MainContract.CompileDate);
@@ -119,7 +110,7 @@ namespace FineUIPro.Web.ZHGL.Plan
}
else
{
this.drpCompileMan.SelectedValue = this.CurrUser.PersonId;
this.txtCompileMan.Text = this.CurrUser.PersonName;
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.trAtt.Hidden = true;
txtEdition.Text = "0";
@@ -58,13 +58,13 @@ namespace FineUIPro.Web.ZHGL.Plan {
protected global::FineUIPro.TextBox txtMainContractName;
/// <summary>
/// drpProject 控件。
/// txtProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProject;
protected global::FineUIPro.TextBox txtProjectId;
/// <summary>
/// txtVersionNo 控件。
@@ -85,13 +85,13 @@ namespace FineUIPro.Web.ZHGL.Plan {
protected global::FineUIPro.DropDownList drpProjectType;
/// <summary>
/// drpCompileMan 控件。
/// txtCompileMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCompileMan;
protected global::FineUIPro.TextBox txtCompileMan;
/// <summary>
/// txtCompileDate 控件。