20250929 人工时处理

This commit is contained in:
2025-09-29 13:54:52 +08:00
parent a33a1ca50c
commit 56c9aa33ab
11 changed files with 129 additions and 51 deletions
@@ -4,55 +4,68 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtJobNo" runat="server" Label="Job No" Readonly="true">
<f:TextBox ID="txtJobNo" runat="server" Label="Job No" Readonly="true" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpDiscipline" runat="server" Label="Discipline" EnableGroup="true" EnableEdit="true" ShowRedStar="true" ></f:DropDownList>
<%-- <f:TextBox ID="txtDiscipline" runat="server" Label="Discipline" Readonly="true">
<f:DropDownList ID="drpDiscipline" runat="server" Label="Discipline" EnableGroup="true" EnableEdit="true" ShowRedStar="true" LabelWidth="120px"></f:DropDownList>
<%-- <f:TextBox ID="txtDiscipline" runat="server" Label="Discipline" Readonly="true">
</f:TextBox>--%>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtAccount" runat="server" Label="Account" >
<f:TextBox ID="txtAccount" runat="server" Label="Account" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtEngineerName" runat="server" Label="EngineerName" Readonly="true">
<f:TextBox ID="txtEngineerName" runat="server" Label="EngineerName" Readonly="true" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtManHours" runat="server" Label="ManHours">
<f:TextBox ID="txtManHours" runat="server" Label="ManHours" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="20% 80%">
<f:FormRow>
<Items>
<f:CheckBoxList ID="checkPhase" Label="Phase" runat="server" LabelWidth="120px">
<Items>
<f:CheckItem Text="Study/Concept Planning" Value="Study/Concept Planning" Selected="true" />
<f:CheckItem Text="Execution" Value="Execution" />
</Items>
<Listeners>
<f:Listener Event="change" Handler="onCheckBoxListChange" />
</Listeners>
</f:CheckBoxList>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="20% 80%">
<Items>
<f:Label ID="Label1" runat="server"></f:Label>
<f:CheckBox ID="cbNotApplicable1" runat="server" AutoPostBack="true" Text="Account Disabled?"></f:CheckBox>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
@@ -67,5 +80,15 @@
</Toolbars>
</f:Form>
</form>
<script type="text/javascript">
// 同时只能选中一项
function onCheckBoxListChange(event, checkbox, isChecked) {
var me = this;
if (isChecked) {
me.setValue(checkbox.getInputValue());
}
__doPostBack('', 'CheckBoxList1Change');
}
</script>
</body>
</html>
@@ -60,13 +60,15 @@ namespace FineUIPro.Web.ManHours
if (p.AccountDisabled == 1) {
cbNotApplicable1.Checked = true;
}
if (!string.IsNullOrEmpty(p.Phase))
{
checkPhase.SelectedValueArray = p.Phase.Split(',');
}
}
}
}
}
/// <summary>
/// 提交按钮
/// </summary>
@@ -86,6 +86,15 @@ namespace FineUIPro.Web.ManHours
/// </remarks>
protected global::FineUIPro.TextBox txtManHours;
/// <summary>
/// checkPhase 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList checkPhase;
/// <summary>
/// Label1 控件。
/// </summary>
@@ -49,10 +49,10 @@
<f:FormRow>
<Items>
<f:CheckBoxList ID="checkPhase" Label="Phase" runat="server" LabelWidth="120px">
<Items>
<%--<Items>
<f:CheckItem Text="Study/Concept Planning" Value="Study/Concept Planning" Selected="true" />
<f:CheckItem Text="Execution" Value="Execution" />
</Items>
</Items>--%>
<Listeners>
<f:Listener Event="change" Handler="onCheckBoxListChange" />
</Listeners>
@@ -36,7 +36,26 @@ namespace FineUIPro.Web.ManHours
{
this.txtAccount.Text = p.ProjectControl_Account;
}
var plans = BLL.ResourcePlanService.GetResourcePlanByEProjectId(eProjectId);
if (plans.Count < 2 && plans.FirstOrDefault().Phase == "Study/Concept Planning")
{
checkPhase.Items.Clear();
List<string> lists = new List<string>();
lists.Add("Study/Concept Planning");
checkPhase.DataSource = lists;
checkPhase.DataBind();
checkPhase.SelectedValueArray = lists[0].Split(',');
}
else
{
checkPhase.Items.Clear();
List<string> lists = new List<string>();
lists.Add("Study/Concept Planning");
lists.Add("Execution");
checkPhase.DataSource = lists;
checkPhase.DataBind();
}
}
}
else
@@ -125,7 +125,7 @@
</f:Window>
<f:Window ID="Window3" Title="ManHours(Plan)" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Parent" EnableResize="false" runat="server" OnClose="Window3_Close" IsModal="true"
Width="500px" Height="350px">
Width="600px" Height="400px">
</f:Window>
<f:Window ID="Window4" Title="AddManHours(Plan)" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Parent" EnableResize="false" runat="server" OnClose="Window3_Close" IsModal="true"