2023-04-25-001

This commit is contained in:
李鹏飞 2023-04-25 21:38:01 +08:00
parent 6813e22226
commit 418ef0bd4a
15 changed files with 207 additions and 33 deletions

View File

@ -0,0 +1,7 @@
alter table PHTGL_ContractStandingBook add UnitId varchar(50)
alter table PHTGL_BidDocumentsStandingBook add UnitId varchar(50)
alter table PHTGL_BidDocumentsStandingBook add DepartId varchar(50)
update Sys_Role set IsSystemBuilt=1 where RoleName like '%ºÏͬ¹ÜÀí%'
update [Sys_Menu] set IsEnd=1 where MenuId='0A5DF9F5-B6B5-41B8-8951-C203C5749495'
update [Sys_Menu] set IsEnd=1 where MenuId='C18B4A2E-7BE7-43E6-A969-8A6292D19987'

View File

@ -351,6 +351,7 @@
/// 无损检测工岗位Id
/// </summary>
public static string WorkPost_Checker = "595999E9-75A8-4064-9BD1-9EE02F236297";
#endregion
#region
@ -413,6 +414,19 @@
/// 系统管理员
/// </summary>
public const string SystemManager = "4001f8c8-7f55-4660-822a-6b129ecf0342";
/// <summary>
/// 赛鼎施工管理部合同管理(能看到所有信息)
/// </summary>
public const string SedinHTGLManager = "58994640-5469-4cb0-b725-b6bec4e710ae";
/// <summary>
/// 赛鼎其他部门合同管理(只能看见本部门)
/// </summary>
public const string SedinHTGLDepartManager = "46e1ec69-4bae-4972-b278-a40185986876";
/// <summary>
/// 分子公司合同管理(只能看见要公司信息)
/// </summary>
public const string OtherHTGLManager = "65073269-0a14-4655-8f9e-981104b37de9";
#endregion
#region

View File

@ -28,6 +28,8 @@ namespace BLL
{
var q = from x in db.PHTGL_BidDocumentsStandingBook
where
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
(string.IsNullOrEmpty(table.DepartId) || x.DepartId.Contains(table.DepartId)) &&
(string.IsNullOrEmpty(table.BidDocumentsStandingBookId) || x.BidDocumentsStandingBookId.Contains(table.BidDocumentsStandingBookId)) &&
(string.IsNullOrEmpty(table.EPCCode) || x.EPCCode.Contains(table.EPCCode)) &&
(string.IsNullOrEmpty(table.ProjectShortName) || x.ProjectShortName.Contains(table.ProjectShortName)) &&
@ -70,6 +72,8 @@ namespace BLL
select new
{
x.BidDocumentsStandingBookId,
x.UnitId,
x.DepartId,
x.EPCCode,
x.ProjectShortName,
x.ProjectCode,
@ -106,6 +110,8 @@ namespace BLL
Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook
{
BidDocumentsStandingBookId = newtable.BidDocumentsStandingBookId,
UnitId= newtable.UnitId,
DepartId= newtable.DepartId,
EPCCode = newtable.EPCCode,
ProjectShortName = newtable.ProjectShortName,
ProjectCode = newtable.ProjectCode,
@ -145,6 +151,8 @@ namespace BLL
if (table != null)
{
table.BidDocumentsStandingBookId = newtable.BidDocumentsStandingBookId;
table.UnitId= newtable.UnitId;
table.DepartId= newtable.DepartId;
table.EPCCode = newtable.EPCCode;
table.ProjectShortName = newtable.ProjectShortName;
table.ProjectCode = newtable.ProjectCode;

View File

@ -27,6 +27,7 @@ namespace BLL
where
(string.IsNullOrEmpty(table.ContractId) || x.ContractId.Contains(table.ContractId)) &&
(string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) &&
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
(string.IsNullOrEmpty(table.ContractName) || x.ContractName.Contains(table.ContractName)) &&
(string.IsNullOrEmpty(table.ContractNum) || x.ContractNum.Contains(table.ContractNum)) &&
(string.IsNullOrEmpty(table.Parties) || x.Parties.Contains(table.Parties)) &&
@ -98,6 +99,7 @@ namespace BLL
{
x.ContractId,
x.ProjectId,
x.UnitId,
x.ContractName,
x.ContractNum,
x.Parties,
@ -216,6 +218,7 @@ namespace BLL
{
ContractId = newtable.ContractId,
ProjectId = newtable.ProjectId,
UnitId=newtable.UnitId,
ProjectName= newtable.ProjectName,
ProjectCode= newtable.ProjectCode,
ContractName = newtable.ContractName,
@ -283,6 +286,7 @@ namespace BLL
if (newContract != null)
{
newContract.ProjectId = contract.ProjectId;
newContract.UnitId= contract.UnitId;
newContract.ProjectName=contract.ProjectName;
newContract.ProjectCode=contract.ProjectCode;
newContract.ContractCode = contract.ContractCode;

View File

@ -92,7 +92,20 @@ namespace BLL
}
return name;
}
public static string getDepartNameById(object departId)
{
string name = string.Empty;
if (departId!=null&& !string.IsNullOrEmpty(departId.ToString()))
{
var dep = Funs.DB.Base_Depart.FirstOrDefault(e => e.DepartId == departId.ToString());
if (dep != null)
{
name = dep.DepartName;
}
}
return name;
}
#region
/// <summary>
/// 表下拉框

View File

@ -88,11 +88,26 @@ namespace FineUIPro.Web.PHTGL.Filing
_BidDocumentsStandingBook.ProjectId = this.CurrUser.LoginProjectId;
}
}
if (!string.IsNullOrEmpty(drpDepartId.SelectedValue) )
{
var RoleIds = this.CurrUser.RoleIds;
if (RoleIds.Contains(Const.SedinHTGLManager))
{
//model.UnitId=this.CurrUser.UnitId;
}
else if (RoleIds.Contains(Const.OtherHTGLManager))
{
_BidDocumentsStandingBook.UnitId = this.CurrUser.UnitId;
}
else if (RoleIds.Contains(Const.SedinHTGLDepartManager))
{
_BidDocumentsStandingBook.UnitId = this.CurrUser.UnitId;
_BidDocumentsStandingBook.DepartId = this.CurrUser.DepartId;
}
else
{
_BidDocumentsStandingBook.UnitId = "normal";
}
if (dropState.SelectedValue!=Const._Null)
{

View File

@ -88,6 +88,8 @@ namespace FineUIPro.Web.PHTGL.Filing
protected void btnSave_Click(object sender, EventArgs e)
{
Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook();
table.UnitId = this.CurrUser.UnitId;
table.DepartId=this.CurrUser.DepartId;
table.EPCCode = this.txtEPCCode.Text;
table.ProjectShortName = this.txtProjectShortName.Text;
table.ProjectCode = this.txtProjectCode.Text;
@ -177,6 +179,8 @@ namespace FineUIPro.Web.PHTGL.Filing
return;
}
Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook();
table.UnitId = this.CurrUser.UnitId;
table.DepartId = this.CurrUser.DepartId;
table.EPCCode = this.txtEPCCode.Text;
table.ProjectShortName = this.txtProjectShortName.Text;
table.ProjectCode = this.txtProjectCode.Text;

View File

@ -73,6 +73,8 @@ namespace FineUIPro.Web.PHTGL.Filing
protected void btnSave_Click(object sender, EventArgs e)
{
Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook();
table.UnitId = this.CurrUser.UnitId;
table.DepartId = this.CurrUser.DepartId;
table.EPCCode = this.txtEPCCode.Text;
table.ProjectShortName = this.txtProjectShortName.Text;
table.ProjectCode = this.txtProjectCode.Text;
@ -158,6 +160,8 @@ namespace FineUIPro.Web.PHTGL.Filing
return;
}
Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook();
table.UnitId = this.CurrUser.UnitId;
table.DepartId = this.CurrUser.DepartId;
table.EPCCode = this.txtEPCCode.Text;
table.ProjectShortName = this.txtProjectShortName.Text;
table.ProjectCode = this.txtProjectCode.Text;

View File

@ -200,6 +200,8 @@ namespace FineUIPro.Web.PHTGL.Filing
Model.PHTGL_BidDocumentsStandingBook _BidDocumentsStandingBook = new PHTGL_BidDocumentsStandingBook();
_BidDocumentsStandingBook.BidDocumentsStandingBookId = SQLHelper.GetNewID();
_BidDocumentsStandingBook.State = 0;
_BidDocumentsStandingBook.UnitId = this.CurrUser.UnitId;
_BidDocumentsStandingBook.DepartId = this.CurrUser.DepartId;
if (Type=="1")
{
_BidDocumentsStandingBook.ProjectId = this.CurrUser.LoginProjectId;

View File

@ -61,24 +61,24 @@
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="true">
>
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="EPCCode" EnableLock="true" Locked="true" DataField="EPCCode" Width="120px" FieldType="String" HeaderText="总承包合同编号" TextAlign="Center"
<f:RenderField ColumnID="EPCCode" DataField="EPCCode" Width="120px" FieldType="String" HeaderText="总承包合同编号" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="ProjectName" EnableLock="true" Locked="true" DataField="ProjectName" Width="180px" FieldType="String" HeaderText="项目名称" TextAlign="Center"
<f:RenderField ColumnID="ProjectName" DataField="ProjectName" Width="180px" FieldType="String" HeaderText="项目名称" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="ProjectCode" EnableLock="true" Locked="true" DataField="ProjectCode" Width="180px" FieldType="String" HeaderText="项目代码" TextAlign="Center"
<f:RenderField ColumnID="ProjectCode" DataField="ProjectCode" Width="180px" FieldType="String" HeaderText="项目代码" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="ContractName" EnableLock="true" Locked="true" DataField="ContractName" Width="180px" FieldType="String" HeaderText="合同名称" TextAlign="Center"
<f:RenderField ColumnID="ContractName" DataField="ContractName" Width="180px" FieldType="String" HeaderText="合同名称" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="ContractNum" EnableLock="true" Locked="true" DataField="ContractNum" Width="180px" FieldType="String" HeaderText="合同编号" TextAlign="Center"
<f:RenderField ColumnID="ContractNum" DataField="ContractNum" Width="180px" FieldType="String" HeaderText="合同编号" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="States" Width="180px" HeaderText="状态" HeaderTextAlign="Center"
@ -99,9 +99,11 @@
<f:RenderField ColumnID="ContractAmount" DataField="ContractAmount" Width="120px" FieldType="String" HeaderText="合同金额" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="DepartName" DataField="DepartName" Width="120px" FieldType="String" HeaderText="主办部门" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField HeaderText="主办部门" Width="100px" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="txtDepartId" Text='<%# BLL.DepartService.getDepartNameById(Eval("DepartId")) %>' runat="server" Height="25px" ></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="Agent" DataField="Agent" Width="120px" FieldType="String" HeaderText="经办人" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>

View File

@ -38,10 +38,27 @@ namespace FineUIPro.Web.PHTGL.Filing
private void BindGrid()
{
var model = new Model.PHTGL_ContractStandingBook();
if (drpDepartId.SelectedValue!=Const._Null)
var RoleIds = this.CurrUser.RoleIds;
if (RoleIds.Contains(Const.SedinHTGLManager))
{
model.DepartId = drpDepartId.SelectedValue;
//model.UnitId=this.CurrUser.UnitId;
}
else if (RoleIds.Contains(Const.OtherHTGLManager))
{
model.UnitId = this.CurrUser.UnitId;
}
else if (RoleIds.Contains(Const.SedinHTGLDepartManager))
{
model.UnitId = this.CurrUser.UnitId;
model.DepartId= this.CurrUser.DepartId;
}
else
{
model.UnitId = "normal";
}
if (!string.IsNullOrEmpty(txtContractName.Text.Trim()))
{
model.ContractName = txtContractName.Text.Trim();
@ -52,7 +69,10 @@ namespace FineUIPro.Web.PHTGL.Filing
}
var list= BLL.ContractStandingBookService.GetPHTGL_ContractStandingBookByModle( model);
//var list= BLL.ContractStandingBookService.getListData( model, Grid1);
if (drpDepartId.SelectedValue != Const._Null)
{
list=list.Where(d => d.DepartId==drpDepartId.SelectedValue). ToList();
}
Grid1.RecordCount = list.Count;
var table = this.GetPagedDataTable(Grid1, list);
Grid1.DataSource = table;

View File

@ -176,6 +176,15 @@ namespace FineUIPro.Web.PHTGL.Filing
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbImageUrl;
/// <summary>
/// txtDepartId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label txtDepartId;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>

View File

@ -74,9 +74,6 @@ namespace FineUIPro.Web.PHTGL.Filing
this.GetButtonPower();
BindingTab1();
}
}
@ -115,27 +112,28 @@ namespace FineUIPro.Web.PHTGL.Filing
txtContactPersonOfPartyB.Text = contract.ContactPersonOfPartyB;
txtContactPersonPhoneOfPartyB.Text = contract.ContactPersonPhoneOfPartyB;
txtContactPersonEmailOfPartyB.Text = contract.ContactPersonEmailOfPartyB;
txtContractAmountExcludingTax.Text = contract.ContractAmountExcludingTax.ToString();
txtContractAmountExcludingTax.Text = contract.ContractAmountExcludingTax;
txtPriceMethod.Text = contract.PriceMethod;
txtSignedOnDate.Text = contract.SignedOnDate.ToString();
txtContractStartDate.Text = contract.ContractStartDate.ToString();
txtContractEndDate.Text = contract.ContractEndDate.ToString();
txtSignedOnDate.Text = contract.SignedOnDate;
txtContractStartDate.Text = contract.ContractStartDate;
txtContractEndDate.Text = contract.ContractEndDate;
txtPricingBasis.Text = contract.PricingBasis;
txtStatus.Text = contract.Status;
txtSubcontractingMethod.Text = contract.SubcontractingMethod;
txtIsItACentralizedPurchaseSupplier.Text = contract.IsItACentralizedPurchaseSupplier.ToString();
txtIsItACentralizedPurchaseSupplier.Text = contract.IsItACentralizedPurchaseSupplier;
this.txtAgent.Text = contract.Agent;
this.txtContractType.Text = contract.ContractType;
this.txtConfirmWay.Text= contract.ConfirmWay;
this.txtDepart.Text=BLL.DepartService.getDepartNameById(contract.DepartId);
this.txtContractAmount.Text = contract.ContractAmount.ToString();
this.txtContractAmount.Text = contract.ContractAmount;
}
else
{
this.txtAgent.Text = this.CurrUser.PersonName;
this.txtDepart.Text = BLL.DepartService.getDepartNameById(CurrUser.DepartId);
}
}
else
{
this.txtAgent.Text = this.CurrUser.PersonName;
this.txtDepart.Text = BLL.DepartService.getDepartNameById(this.CurrUser.DepartId);
}
}
@ -173,7 +171,7 @@ namespace FineUIPro.Web.PHTGL.Filing
void Save(string Type)
{
Model.PHTGL_ContractStandingBook contract = new Model.PHTGL_ContractStandingBook();
contract.UnitId = this.CurrUser.UnitId;
contract.EPCCode = this.txtEPCCode.Text;
contract.ContractAttribute = this.txtContractAttribute.Text;
contract.ContractName = this.txtContractName.Text;
@ -207,6 +205,7 @@ namespace FineUIPro.Web.PHTGL.Filing
contract.ContractType = this.txtContractType.Text;
contract.ConfirmWay = this.txtConfirmWay.Text;
contract.DepartId = this.CurrUser.DepartId;
contract.ContractAmount = this.txtContractAmount.Text;
if (Type==Const.BtnSubmit)
{

View File

@ -198,6 +198,7 @@ namespace FineUIPro.Web.PHTGL.Filing
{
Model.PHTGL_ContractStandingBook _ContractStandingBook = new PHTGL_ContractStandingBook();
_ContractStandingBook.ContractId = SQLHelper.GetNewID();
_ContractStandingBook.UnitId = this.CurrUser.UnitId;
_ContractStandingBook.States = 0;
_ContractStandingBook.DepartId = this.CurrUser.DepartId;
_ContractStandingBook.Agent = this.CurrUser.PersonName;

View File

@ -170628,6 +170628,10 @@ namespace Model
private string _BidUnitFileCode;
private string _UnitId;
private string _DepartId;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -170672,6 +170676,10 @@ namespace Model
partial void OnBidNoticeCodeChanged();
partial void OnBidUnitFileCodeChanging(string value);
partial void OnBidUnitFileCodeChanged();
partial void OnUnitIdChanging(string value);
partial void OnUnitIdChanged();
partial void OnDepartIdChanging(string value);
partial void OnDepartIdChanged();
#endregion
public PHTGL_BidDocumentsStandingBook()
@ -170879,7 +170887,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposedInviter", DbType="VarChar(100)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposedInviter", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string ProposedInviter
{
get
@ -171079,6 +171087,46 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="VarChar(50)")]
public string UnitId
{
get
{
return this._UnitId;
}
set
{
if ((this._UnitId != value))
{
this.OnUnitIdChanging(value);
this.SendPropertyChanging();
this._UnitId = value;
this.SendPropertyChanged("UnitId");
this.OnUnitIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartId", DbType="VarChar(50)")]
public string DepartId
{
get
{
return this._DepartId;
}
set
{
if ((this._DepartId != value))
{
this.OnDepartIdChanging(value);
this.SendPropertyChanging();
this._DepartId = value;
this.SendPropertyChanged("DepartId");
this.OnDepartIdChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@ -173263,6 +173311,8 @@ namespace Model
private string _MainContent;
private string _UnitId;
private EntityRef<Base_Project> _Base_Project;
#region
@ -173375,6 +173425,8 @@ namespace Model
partial void OnClauseChanged();
partial void OnMainContentChanging(string value);
partial void OnMainContentChanged();
partial void OnUnitIdChanging(string value);
partial void OnUnitIdChanged();
#endregion
public PHTGL_ContractStandingBook()
@ -174447,6 +174499,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="VarChar(50)")]
public string UnitId
{
get
{
return this._UnitId;
}
set
{
if ((this._UnitId != value))
{
this.OnUnitIdChanging(value);
this.SendPropertyChanging();
this._UnitId = value;
this.SendPropertyChanged("UnitId");
this.OnUnitIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HTGL_ContractStandingBook_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{