Merge branch 'master' of http://47.104.102.122:3000/xiaju/SGGL_JT
This commit is contained in:
@@ -219,6 +219,10 @@ namespace FineUIPro.Web.Controls
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(Request.Params["ProjectUnitId"]))
|
||||
{
|
||||
this.CreateCode_Simple(Request.Params["strCode"]);
|
||||
}
|
||||
|
||||
this.Image1.ImageUrl = "~/" + this.QRCodeAttachUrl;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1099,6 +1099,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
newPerson.IsForeign = persons[i].IsForeign;
|
||||
newPerson.IsOutside = persons[i].IsOutside;
|
||||
newPerson.IsUsed = persons[i].IsUsedName == "是" ? true : false;
|
||||
newPerson.IsUsedType = persons[i].IsUsedName == "是" ? "1" : "0";
|
||||
newPerson.IsCardUsed = persons[i].IsCardUsedName == "是" ? true : false;
|
||||
BLL.PersonService.AddPerson(newPerson);
|
||||
|
||||
@@ -1142,6 +1143,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
getPerson.OutResult = persons[i].OutResult;
|
||||
getPerson.Telephone = persons[i].Telephone;
|
||||
getPerson.IsUsed = persons[i].IsUsedName == "是" ? true : false;
|
||||
getPerson.IsUsedType = persons[i].IsUsedName == "是" ? "1" : "0";
|
||||
getPerson.IsCardUsed = persons[i].IsCardUsedName == "是" ? true : false;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -8,12 +8,9 @@
|
||||
<title>人员信息</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row.Red {
|
||||
background-color: red;
|
||||
}
|
||||
.LabelColor {
|
||||
color: Red;
|
||||
.Yellow {
|
||||
font-size: small;
|
||||
background-color: Yellow;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -83,10 +80,12 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpIsUsedName" runat="server" Label="是否在岗" EnableEdit="true"
|
||||
Width="200px" LabelWidth="100px" LabelAlign="right" ForceSelection="false">
|
||||
<f:ListItem Value="是" Text="是" />
|
||||
<f:ListItem Value="否" Text="否" />
|
||||
<f:DropDownList ID="drpIsUsedTypeName" runat="server" Label="状态" EnableEdit="true"
|
||||
Width="200px" LabelWidth="70px" LabelAlign="right" ForceSelection="false">
|
||||
<f:ListItem Value="" Text="请选择"/>
|
||||
<f:ListItem Value="待审核" Text="待审核"/>
|
||||
<f:ListItem Value="在岗" Text="在岗" />
|
||||
<f:ListItem Value="离岗" Text="离岗"/>
|
||||
</f:DropDownList>
|
||||
<f:CheckBox runat="server" ID="ckIdCardInfoNotOK" Label="身份信息不齐全" LabelAlign="right" LabelWidth="120px">
|
||||
</f:CheckBox>
|
||||
@@ -96,6 +95,8 @@
|
||||
<f:Button ID="btSearch" ToolTip="查询" Icon="SystemSearch" runat="server" OnClick="TextBox_TextChanged" Text="查询"></f:Button>
|
||||
<f:Button ID="btnNew" ToolTip="增加" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click" Text="增加">
|
||||
</f:Button>
|
||||
<f:Button ID="btnApprove" ToolTip="批量审核" Icon="UserGo" runat="server" Hidden="true" Text="批量审核" OnClick="btnApprove_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPersonOut" ToolTip="批量出场" Icon="UserGo" runat="server" Hidden="true" Text="批量出场" OnClick="btnPersonOut_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" Hidden="true" runat="server" Text="导入"
|
||||
@@ -149,7 +150,7 @@
|
||||
<%-- <f:RenderField HeaderText="电话" ColumnID="Telephone" DataField="Telephone" SortField="Telephone"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="110px">
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField HeaderText="在场" ColumnID="IsUsedName" DataField="IsUsedName" SortField="IsUsedName"
|
||||
<f:RenderField HeaderText="在场" ColumnID="IsUsedTypeName" DataField="IsUsedTypeName" SortField="IsUsedTypeName"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="60px">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="OutTime" DataField="OutTime" SortField="OutTime"
|
||||
|
||||
@@ -228,15 +228,20 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
strSql += " AND UnitId IS NULL";
|
||||
}
|
||||
if (drpIsUsedName.SelectedValue == "是")
|
||||
if (drpIsUsedTypeName.SelectedValue == "待审核")
|
||||
{
|
||||
strSql += " AND IsUsed = @IsUsed";
|
||||
listStr.Add(new SqlParameter("@IsUsed", "1"));
|
||||
strSql += " AND IsUsedType = @IsUsedType";
|
||||
listStr.Add(new SqlParameter("@IsUsedType", "2"));
|
||||
}
|
||||
else
|
||||
else if (drpIsUsedTypeName.SelectedValue == "在岗")
|
||||
{
|
||||
strSql += " AND IsUsed = @IsUsed";
|
||||
listStr.Add(new SqlParameter("@IsUsed", "0"));
|
||||
strSql += " AND IsUsedType = @IsUsedType";
|
||||
listStr.Add(new SqlParameter("@IsUsedType", "1"));
|
||||
}
|
||||
else if (drpIsUsedTypeName.SelectedValue == "离岗")
|
||||
{
|
||||
strSql += " AND IsUsedType = @IsUsedType";
|
||||
listStr.Add(new SqlParameter("@IsUsedType", "0"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
|
||||
{
|
||||
@@ -294,19 +299,17 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
//for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
//{
|
||||
// string personId = Grid1.Rows[i].DataKeys[0].ToString();
|
||||
|
||||
// var isNull = from x in db.EduTrain_TrainRecordDetail
|
||||
// join y in db.EduTrain_TrainRecord on x.TrainingId equals y.TrainingId
|
||||
// where y.ProjectId == this.ProjectId && x.PersonId == personId
|
||||
// select x;
|
||||
// //if (isNull.Count() == 0) ////未参加过培训的人员
|
||||
// //{
|
||||
// // Grid1.Rows[i].RowCssClass = "Red";
|
||||
// //}
|
||||
//}
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
string personId = Grid1.Rows[i].DataKeys[0].ToString();
|
||||
var person = BLL.PersonService.GetPersonById(personId);
|
||||
|
||||
if (person.IsUsedType=="2") //待审批
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "Yellow";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -569,6 +572,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
this.btnPersonUnit.Hidden = false;
|
||||
}
|
||||
this.btnApprove.Hidden = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -711,6 +715,34 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 批量审核
|
||||
/// <summary>
|
||||
/// 批量审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnApprove_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var ids = Grid1.SelectedRowIDArray;
|
||||
foreach (var id in ids)
|
||||
{
|
||||
var person = PersonService.GetPersonById(id);
|
||||
if (person.IsUsedType == "2")
|
||||
{
|
||||
person.IsUsedType = "1";
|
||||
PersonService.UpdatePerson(person);
|
||||
}
|
||||
}
|
||||
ShowNotify("操作完成!", MessageBoxIcon.Success);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
@@ -777,6 +809,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
|
||||
var person = Funs.DB.View_SitePerson_Person.FirstOrDefault(x => x.PersonId == Grid1.SelectedRowID);
|
||||
var personData = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == Grid1.SelectedRowID);
|
||||
|
||||
if (person != null)
|
||||
{
|
||||
@@ -903,7 +936,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
join user in Funs.DB.Sys_User on TestPlan.PlanManId equals user.UserId into gUser
|
||||
from user in gUser.DefaultIfEmpty()
|
||||
where x.TestManId == person.PersonId
|
||||
// where x.TestManId == "d9f795a2-b8eb-4872-9e4c-4a3dba028b5c"
|
||||
orderby x.TestEndTime descending
|
||||
select new
|
||||
{
|
||||
@@ -998,20 +1030,16 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
helper.AddImage(string.Empty, "sign2", 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
DateTime dateTime2 = new DateTime(2024, 6, 25);
|
||||
// 构建格式化的字符串
|
||||
string date2 = $" {dateTime2.Year} 年 {dateTime2.Month:D2} 月 {dateTime2.Day:D2} 日";
|
||||
string date2 = personData.SignTime.HasValue
|
||||
? $" {personData.SignTime.Value.Year} 年 {personData.SignTime.Value.Month:D2} 月 {personData.SignTime.Value.Day:D2} 日"
|
||||
: "";
|
||||
|
||||
string IdentityCard = person.IdentityCard;
|
||||
string Telephone = person.Telephone;
|
||||
|
||||
// 假设我们有一个DateTime对象
|
||||
DateTime dateTime = new DateTime(2024, 6, 25);
|
||||
|
||||
// 提取年、月、日
|
||||
int year = dateTime.Year;
|
||||
int month = dateTime.Month;
|
||||
int day = dateTime.Day;
|
||||
string year = person.InTime.HasValue ? person.InTime.Value.Year.ToString() : "";
|
||||
string month = person.InTime.HasValue ? person.InTime.Value.Month.ToString() : "";
|
||||
string day = person.InTime.HasValue ? person.InTime.Value.Day.ToString() : "";
|
||||
|
||||
string sign3 = AttachFileService.getFileUrl(person.PersonId + "_3");
|
||||
if (!string.IsNullOrEmpty(sign3))
|
||||
|
||||
@@ -186,13 +186,13 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpIsUsedName 控件。
|
||||
/// drpIsUsedTypeName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpIsUsedName;
|
||||
protected global::FineUIPro.DropDownList drpIsUsedTypeName;
|
||||
|
||||
/// <summary>
|
||||
/// ckIdCardInfoNotOK 控件。
|
||||
@@ -239,6 +239,15 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnApprove 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnApprove;
|
||||
|
||||
/// <summary>
|
||||
/// btnPersonOut 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -141,10 +141,16 @@
|
||||
<f:CheckBox runat="server" ID="ckIsOutside" Label="外聘" LabelAlign="Right"></f:CheckBox>
|
||||
<f:TextBox ID="txtTelephone" runat="server" Label="电话" LabelAlign="Right" MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:RadioButtonList ID="rblIsUsed" runat="server" Label="人员在场" LabelAlign="Right" Required="True" ShowRedStar="True">
|
||||
<f:RadioItem Value="True" Text="是" />
|
||||
<f:RadioItem Value="False" Text="否" />
|
||||
</f:RadioButtonList>
|
||||
<%-- <f:RadioButtonList ID="rblIsUsed" runat="server" Label="人员在场" LabelAlign="Right" Required="True" ShowRedStar="True"> --%>
|
||||
<%-- <f:RadioItem Value="True" Text="是" /> --%>
|
||||
<%-- <f:RadioItem Value="False" Text="否" /> --%>
|
||||
<%-- </f:RadioButtonList> --%>
|
||||
|
||||
<f:DropDownList ID="drpIsUsedType" runat="server" Label="状态" EnableEdit="true" Required="True" ShowRedStar="True" LabelAlign="right" >
|
||||
<f:ListItem Value="2" Text="待审核"/>
|
||||
<f:ListItem Value="1" Text="在岗"/>
|
||||
<f:ListItem Value="0" Text="离岗"/>
|
||||
</f:DropDownList>
|
||||
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
@@ -169,8 +169,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
this.drpMaritalStatus.SelectedValue = person.MaritalStatus;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(person.IsUsedType))
|
||||
{
|
||||
this.drpIsUsedType.SelectedValue = person.IsUsedType;
|
||||
}
|
||||
this.txtIdcardAddress.Text = person.IdcardAddress;
|
||||
this.rblIsUsed.SelectedValue = person.IsUsed ? "True" : "False";
|
||||
// this.rblIsUsed.SelectedValue = person.IsUsed ? "True" : "False";
|
||||
this.rblIsCardUsed.SelectedValue = person.IsCardUsed ? "True" : "False";
|
||||
this.txtCardNo.Text = person.CardNo;
|
||||
this.txtPersonName.Text = person.PersonName;
|
||||
@@ -270,7 +274,8 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
this.txtCardNo.Text = string.Empty;
|
||||
}
|
||||
this.txtInTime.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now);
|
||||
this.rblIsUsed.SelectedValue = "True";
|
||||
// this.rblIsUsed.SelectedValue = "True";
|
||||
this.drpIsUsedType.SelectedValue = "在岗";
|
||||
this.rblIsCardUsed.SelectedValue = "True";
|
||||
}
|
||||
}
|
||||
@@ -421,9 +426,14 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
person.PostTitleId = this.drpTitle.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.rblIsUsed.SelectedValue))
|
||||
// if (!string.IsNullOrEmpty(this.rblIsUsed.SelectedValue))
|
||||
// {
|
||||
// person.IsUsed = Convert.ToBoolean(this.rblIsUsed.SelectedValue);
|
||||
// }
|
||||
person.IsUsed = true;
|
||||
if (!string.IsNullOrEmpty(this.drpIsUsedType.SelectedValue))
|
||||
{
|
||||
person.IsUsed = Convert.ToBoolean(this.rblIsUsed.SelectedValue);
|
||||
person.IsUsedType = this.drpIsUsedType.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.rblIsCardUsed.SelectedValue))
|
||||
{
|
||||
|
||||
@@ -402,13 +402,13 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
protected global::FineUIPro.TextBox txtTelephone;
|
||||
|
||||
/// <summary>
|
||||
/// rblIsUsed 控件。
|
||||
/// drpIsUsedType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblIsUsed;
|
||||
protected global::FineUIPro.DropDownList drpIsUsedType;
|
||||
|
||||
/// <summary>
|
||||
/// Panel5 控件。
|
||||
|
||||
@@ -122,6 +122,9 @@
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" Hidden="true"
|
||||
Icon="Pencil" runat="server" Text="编辑">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnORCode" OnClick="btnQR_Click" EnablePostBack="true" Hidden="true"
|
||||
Icon="TableRefresh" runat="server" Text="二维码">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Hidden="true"
|
||||
Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除">
|
||||
</f:MenuButton>
|
||||
|
||||
@@ -333,6 +333,7 @@ namespace FineUIPro.Web.ProjectData
|
||||
this.btnMenuEdit.Hidden = true;
|
||||
this.btnMenuDelete.Hidden = true;
|
||||
}
|
||||
this.btnORCode.Hidden = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -406,5 +407,19 @@ namespace FineUIPro.Web.ProjectData
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
//二维码生成
|
||||
protected void btnQR_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
string strCode = "https://lygcgs.com.cn/JT/web/index.html?ProjectUnitId=" + Grid1.SelectedRowID;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/Controls/SeeQRImage.aspx?ProjectUnitId={0}&strCode={1}", Grid1.SelectedRowID, strCode), "二维码查看", 400, 400));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -194,6 +194,15 @@ namespace FineUIPro.Web.ProjectData
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnORCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnORCode;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user