2023-03-09 合同归档修改,安全首页修改
This commit is contained in:
@@ -20,6 +20,8 @@ namespace FineUIPro.Web.PHTGL.Filing
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.DepartService.InitDepartDropDownList(this.drpDepartId, false);
|
||||
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
GetButtonPower();
|
||||
BindGrid();
|
||||
@@ -34,8 +36,96 @@ namespace FineUIPro.Web.PHTGL.Filing
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
string strSql = @"SELECT Rev.ContractReviewId,
|
||||
Con.ContractId,
|
||||
Con.ProjectId,
|
||||
Con.ContractName,
|
||||
Con.ContractNum,
|
||||
Con.Parties,
|
||||
Con.Currency,
|
||||
Con.ContractAmount,
|
||||
Con.DepartId,
|
||||
Con.Agent,
|
||||
(CASE Con.ContractType WHEN '1' THEN '施工总承包分包合同'
|
||||
WHEN '2' THEN '施工专业分包合同'
|
||||
WHEN '3' THEN '施工劳务分包合同'
|
||||
WHEN '4' THEN '试车服务合同'
|
||||
WHEN '5' THEN 'ds' END) AS ContractType,
|
||||
( CASE Rev.State
|
||||
WHEN @ContractCreating THEN '编制中'
|
||||
WHEN @Contract_countersign THEN '会签中'
|
||||
WHEN @ContractReviewing THEN '审批中'
|
||||
WHEN @ContractReview_Complete THEN '审批成功'
|
||||
WHEN @ContractReview_Refuse THEN '审批被拒' END) AS State ,
|
||||
Con.Remarks,
|
||||
Con.EPCCode,
|
||||
Con.ProjectShortName,
|
||||
Con.[OpeningBank-TT] as OpeningBank_TT ,
|
||||
Con.[OpeningBank-electrophore] as OpeningBank_electrophore,
|
||||
Con.[BankAccount-TT] as BankAccount_TT,
|
||||
Con.[BankAccount-electrophore] as BankAccount_electrophore,
|
||||
Con.[LineNumber-electrophore] as LineNumber_electrophore,
|
||||
Con.Retentionmoney,
|
||||
(CASE Con.Status WHEN '0' THEN '已签订'
|
||||
WHEN '1' THEN '已完毕' END) as Status,
|
||||
Con.ContactUnitOfPartyA,
|
||||
Con.ContactPersonOfPartyA,
|
||||
Con.ContactPersonOfPartyB,
|
||||
Con.ContactPersonPhoneOfPartyB,
|
||||
Con.ContactPersonEmailOfPartyB,
|
||||
Con.ContractAmountExcludingTax,
|
||||
Con.PriceMethod,
|
||||
CONVERT(varchar(100), SignedOnDate, 111) as SignedOnDate,
|
||||
CONVERT(varchar(100), ContractStartDate, 111) as ContractStartDate,
|
||||
CONVERT(varchar(100), ContractEndDate, 111) as ContractEndDate,
|
||||
Con.PricingBasis,
|
||||
(CASE Con.SubcontractingMethod WHEN '1' then '内部分包'
|
||||
WHEN '2' THEN '外部分包' END ) as SubcontractingMethod,
|
||||
(CASE Con.IsItACentralizedPurchaseSupplier WHEN '0' then '否'
|
||||
WHEN '1' THEN '是' END ) as IsItACentralizedPurchaseSupplier,
|
||||
Pro.ProjectCode,
|
||||
Pro.ProjectName,
|
||||
Dep.DepartName,
|
||||
U.PersonName AS AgentName "
|
||||
+ @" from PHTGL_ContractReview AS Rev"
|
||||
+ @" LEFT JOIN PHTGL_Contract AS Con ON Con.ContractId=Rev.ContractId"
|
||||
//+ @" left join PHTGL_ActionPlanFormation as Act on Act.EPCCode=Con.EPCCode"
|
||||
+ @" LEFT JOIN Base_Project AS Pro ON Pro.ProjectId = Con.ProjectId"
|
||||
+ @" LEFT JOIN Base_Depart AS Dep ON Dep.DepartId = Con.DepartId"
|
||||
+ @" LEFT JOIN Person_Persons AS U ON U.PersonId = Con.Agent WHERE 1=1 and Rev.State=@State";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ContractCreating", Const.ContractCreating.ToString()));
|
||||
listStr.Add(new SqlParameter("@Contract_countersign", Const.Contract_countersign));
|
||||
listStr.Add(new SqlParameter("@ContractReviewing", Const.ContractReviewing));
|
||||
listStr.Add(new SqlParameter("@ContractReview_Complete", Const.ContractReview_Complete));
|
||||
listStr.Add(new SqlParameter("@ContractReview_Refuse", Const.ContractReview_Refuse));
|
||||
listStr.Add(new SqlParameter("@State", Const.ContractReview_Complete));
|
||||
|
||||
if (!(this.CurrUser.PersonId == Const.sysglyId))
|
||||
{
|
||||
strSql += " and Con.ProjectId =@ProjectId";
|
||||
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtContractName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND Con.ContractName LIKE @ContractName";
|
||||
listStr.Add(new SqlParameter("@ContractName", "%" + this.txtContractName.Text.Trim() + "%"));
|
||||
}
|
||||
if (! string .IsNullOrEmpty(drpDepartId.SelectedValue))
|
||||
{
|
||||
strSql += " AND Con.DepartId = @DepartId";
|
||||
listStr.Add(new SqlParameter("@DepartId", drpDepartId.SelectedValue));
|
||||
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 分页 排序
|
||||
@@ -112,7 +202,7 @@ namespace FineUIPro.Web.PHTGL.Filing
|
||||
|
||||
protected void btnRset_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtActionPlanCode.Text = "";
|
||||
txtContractName.Text = "";
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
@@ -146,24 +236,17 @@ namespace FineUIPro.Web.PHTGL.Filing
|
||||
#endregion
|
||||
|
||||
#region 打印
|
||||
protected void btnPrinter_Click(object sender, EventArgs e)
|
||||
protected void btnPrinter_Click1(object sender, EventArgs e)
|
||||
{
|
||||
//if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
//{
|
||||
// Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//string Id = Grid1.SelectedRowID;
|
||||
//var Act = PHTGL_ActionPlanReviewService.GetPHTGL_ActionPlanReviewById(Id);
|
||||
//if (Act == null)
|
||||
//{
|
||||
// Alert.ShowInTop("还未创建审批流无法导出!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//string ActionPlanID = Act.ActionPlanID;
|
||||
//ActionPlanFormation actionPlanFormation = new ActionPlanFormation();
|
||||
//actionPlanFormation.Print(ActionPlanID);
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string Id = Grid1.SelectedRowID;
|
||||
PHTGL_ContractReviewService.PrintApprovalForm(Id);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user