merge: 将 fea-mat 合并到 master
合入材料炉批号开关、项目设置精简及任务单条件提示,保留 master 的材料数量编辑、单位工程排序和材料匹配优先顺序。
This commit is contained in:
@@ -14,25 +14,6 @@
|
||||
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox"
|
||||
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server" AutoScroll="true">
|
||||
<Items>
|
||||
<f:GroupPanel ID="GroupPanel0" Layout="Anchor" Title="通用环境设置" runat="server">
|
||||
<Items>
|
||||
<f:Form ID="Form4" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
Layout="VBox" BodyPadding="10px" runat="server" RedStarPosition="BeforeText"
|
||||
LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow runat="server">
|
||||
<Items>
|
||||
|
||||
<f:CheckBox ID="ckbIsYunMou" runat="server" Label="云眸人脸识别" Text="是否启用" LabelWidth="200">
|
||||
</f:CheckBox>
|
||||
<f:Label runat="server"></f:Label>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
<f:GroupPanel ID="GroupPanel2" Layout="Anchor" Title="焊接环境设置" runat="server" >
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="false" Layout="VBox"
|
||||
@@ -44,6 +25,12 @@
|
||||
</f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:CheckBox ID="ckbUseMaterialBatch" runat="server" Label="材料炉批号" Text="材料是否使用炉批号" Checked="true" LabelWidth="200">
|
||||
</f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:CheckBox ID="ckbJointB" runat="server" Label="焊口编号" Text="对接焊缝是否带B前缀" LabelWidth="200">
|
||||
@@ -126,78 +113,12 @@
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
<f:GroupPanel ID="GroupPanel3" Layout="Anchor" Title="模型颜色设置" runat="server">
|
||||
<Items>
|
||||
<f:Form ID="Form3" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
Layout="VBox" BodyPadding="10px" runat="server" RedStarPosition="BeforeText"
|
||||
LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow runat="server">
|
||||
<Items>
|
||||
<f:NumberBox ID="txtPipelineNOComplete" Label="未完成(透明显示)" runat="server" MaxValue="100" Hidden="true"
|
||||
LabelWidth="180px" NoNegative="true" NoDecimal="true">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtPipelineComplete" Label="已完成(透明显示)" runat="server" MaxValue="100" Hidden="true"
|
||||
LabelWidth="180px" NoNegative="true" NoDecimal="true">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpJointNOCompleteColor" Label="未完成(颜色)" runat="server" LabelWidth="180px">
|
||||
<f:ListItem Value="#FF0000" Text="红" />
|
||||
<f:ListItem Value="#FFFF00" Text="黄" />
|
||||
<f:ListItem Value="#00FF00" Text="绿" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpJointCompleteColor" Label="已完成(颜色)" runat="server"
|
||||
ShowRedStar="true" Required="true" LabelWidth="180px">
|
||||
<f:ListItem Value="#FF0000" Text="红" />
|
||||
<f:ListItem Value="#FFFF00" Text="黄" />
|
||||
<f:ListItem Value="#00FF00" Text="绿" />
|
||||
</f:DropDownList>
|
||||
<%--<f:TextBox ID="txtJointNOCompleteColor" runat="server" Label="焊口未完成" LabelWidth="180px"></f:TextBox>
|
||||
<f:TextBox ID="txtJointCompleteColor" runat="server" Label="焊口已完成" LabelWidth="180px"></f:TextBox>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
|
||||
|
||||
<f:GroupPanel ID="GroupPanel1" Layout="Anchor" Title="质量环境设置" runat="server">
|
||||
<Items>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
Layout="VBox" BodyPadding="10px" runat="server" RedStarPosition="BeforeText"
|
||||
LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow runat="server">
|
||||
<Items>
|
||||
<f:NumberBox ID="txtRemindDay" Label="检试验设备到期提醒天数" runat="server"
|
||||
LabelWidth="180px" DecimalPrecision="1" NoNegative="true">
|
||||
</f:NumberBox>
|
||||
<f:Label runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow runat="server">
|
||||
<Items>
|
||||
<f:NumberBox ID="txtStarTime" runat="server" NoDecimal="true" NoNegative="false" Label="月报开始日期" MinValue="1" MaxValue="31"
|
||||
LabelWidth="180" Width="210">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtEndTime" NoDecimal="true" NoNegative="false" Label="月报结束日期" LabelWidth="180" Width="210" runat="server" MinValue="1" MaxValue="31">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
</Items>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="提交数据" ValidateForms="SimpleForm1"
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="提交数据" ValidateForms="Form2"
|
||||
Hidden="true" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
|
||||
@@ -4,7 +4,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using FineUIPro;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace FineUIPro.Web.common.ProjectSet
|
||||
{
|
||||
@@ -51,35 +50,16 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
ShowNotify("请选择项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
#region 云眸
|
||||
///通用
|
||||
var getProject = ProjectService.GetProjectByProjectId(projectId);
|
||||
if (getProject != null)
|
||||
bool useMaterialBatch = BLL.Project_SysSetService.UsesMaterialBatchNumber(projectId);
|
||||
if (useMaterialBatch && !this.ckbUseMaterialBatch.Checked)
|
||||
{
|
||||
getProject.IsYunMou = this.ckbIsYunMou.Checked;
|
||||
if (this.ckbIsYunMou.Checked)
|
||||
string warning = BLL.Project_SysSetService.GetDisableMaterialBatchWarning(projectId);
|
||||
if (warning != "")
|
||||
{
|
||||
var token = YunMouHelper.getToken();
|
||||
string data;
|
||||
data = Regex.Replace(getProject.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
|
||||
YunMouHelper.addDevicesGroups(getProject.ProjectName, data, token);
|
||||
var groupId = YunMouHelper.addPermissionGroups(getProject.ProjectName, token);
|
||||
if (!string.IsNullOrEmpty(groupId))
|
||||
{
|
||||
getProject.YunMouGroupId = groupId;
|
||||
}
|
||||
ShowNotify(warning, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
var token = YunMouHelper.getToken();
|
||||
string data;
|
||||
data = Regex.Replace(getProject.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
|
||||
YunMouHelper.deleteDevicesGroups(data, token);//删除设备分组,如果有子节点,可以不删除
|
||||
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
#endregion
|
||||
#region 焊接
|
||||
// 焊接
|
||||
Model.Project_Sys_Set dayReport = BLL.Project_SysSetService.GetSysSetBySetId("1", projectId);
|
||||
@@ -172,6 +152,7 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
}
|
||||
BLL.Project_SysSetService.AddSet(newThickness);
|
||||
}
|
||||
UpsertMaterialBatchSetting(projectId);
|
||||
if (this.ckbPdms.Checked)
|
||||
{
|
||||
pdms.IsAuto = true;
|
||||
@@ -183,21 +164,6 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
UpsertBatchSetting("5", projectId);
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
private void SaveColorModelSettings(string projectId)
|
||||
{
|
||||
UpsertByName("管线未完成", projectId, this.txtPipelineNOComplete.Text.Trim());
|
||||
UpsertByName("管线已完成", projectId, this.txtPipelineComplete.Text.Trim());
|
||||
UpsertByName("焊口未完成", projectId, this.drpJointNOCompleteColor.SelectedValue.Trim());
|
||||
UpsertByName("焊口已完成", projectId, this.drpJointCompleteColor.SelectedValue.Trim());
|
||||
}
|
||||
|
||||
private void SaveQualitySettings(string projectId)
|
||||
{
|
||||
UpsertByName("检试验设备到期提醒天数", projectId, this.txtRemindDay.Text.Trim());
|
||||
UpsertByName("月报开始日期", projectId, this.txtStarTime.Text.Trim());
|
||||
UpsertByName("月报结束日期", projectId, this.txtEndTime.Text.Trim());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Upsert Helpers
|
||||
@@ -221,6 +187,28 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
}
|
||||
}
|
||||
|
||||
private void UpsertMaterialBatchSetting(string projectId)
|
||||
{
|
||||
var existing = BLL.Project_SysSetService.GetSysSetBySetId(BLL.Project_SysSetService.MaterialBatchSetId, projectId);
|
||||
if (existing != null)
|
||||
{
|
||||
existing.SetName = BLL.Project_SysSetService.MaterialBatchSetName;
|
||||
existing.IsAuto = this.ckbUseMaterialBatch.Checked;
|
||||
BLL.Project_SysSetService.UpdateSet(existing);
|
||||
}
|
||||
else
|
||||
{
|
||||
var newSet = new Model.Project_Sys_Set
|
||||
{
|
||||
SetId = BLL.Project_SysSetService.MaterialBatchSetId,
|
||||
ProjectId = projectId,
|
||||
SetName = BLL.Project_SysSetService.MaterialBatchSetName,
|
||||
IsAuto = this.ckbUseMaterialBatch.Checked
|
||||
};
|
||||
BLL.Project_SysSetService.AddSet(newSet);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpsertValueById(string setId, string projectId, string value, string setName = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value)) return;
|
||||
@@ -244,28 +232,6 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
}
|
||||
}
|
||||
|
||||
private void UpsertByName(string setName, string projectId, string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value)) return;
|
||||
var existing = BLL.Project_SysSetService.GetSysSetBySetName(setName, projectId);
|
||||
if (existing != null)
|
||||
{
|
||||
existing.SetValue = value;
|
||||
BLL.Project_SysSetService.UpdateSet(existing);
|
||||
}
|
||||
else
|
||||
{
|
||||
var newSet = new Model.Project_Sys_Set
|
||||
{
|
||||
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
|
||||
ProjectId = projectId,
|
||||
SetName = setName,
|
||||
SetValue = value
|
||||
};
|
||||
BLL.Project_SysSetService.AddSet(newSet);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpsertTrustSetting(string setId, string projectId, string selectedValue)
|
||||
{
|
||||
var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId);
|
||||
@@ -353,6 +319,7 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
/// </summary>
|
||||
private void Show(string projectId)
|
||||
{
|
||||
this.ckbUseMaterialBatch.Checked = true;
|
||||
var q = from x in Funs.DB.Project_Sys_Set where x.ProjectId == projectId select x;
|
||||
if (q.Any())
|
||||
{
|
||||
@@ -365,33 +332,12 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
SetBatchFromDict(dict, "5");
|
||||
SetCheckFromDict(dict, "6", this.ckbJointB);
|
||||
SetCheckFromDict(dict, "7", this.ckbThickness);
|
||||
SetCheckFromDict(dict, BLL.Project_SysSetService.MaterialBatchSetId, this.ckbUseMaterialBatch);
|
||||
SetRadioValueFromDict(dict, "8", this.rblPressUnit, defaultValue: "2");
|
||||
if (dict.ContainsKey("9")) this.AvevaNetUrl.Text = dict["9"].SetValue;
|
||||
SetCheckFromDict(dict, "10", this.ckPressMustCheckBItem);
|
||||
if (dict.ContainsKey("11")) this.rbMaterialColorAttribute.SelectedValue = dict["11"].SetValue == "1" ? "1" : "2";
|
||||
}
|
||||
var getProject = ProjectService.GetProjectByProjectId(projectId);
|
||||
if (getProject != null && getProject.IsYunMou == true)
|
||||
{
|
||||
this.ckbIsYunMou.Checked = true;
|
||||
}
|
||||
//颜色模型设置
|
||||
var m1 = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
|
||||
if (m1 != null) this.txtPipelineNOComplete.Text = m1.SetValue;
|
||||
var m2 = BLL.Project_SysSetService.GetSysSetBySetName("管线已完成", this.CurrUser.LoginProjectId);
|
||||
if (m2 != null) this.txtPipelineComplete.Text = m2.SetValue;
|
||||
var m3 = BLL.Project_SysSetService.GetSysSetBySetName("焊口未完成", this.CurrUser.LoginProjectId);
|
||||
if (m3 != null) this.drpJointNOCompleteColor.SelectedValue = m3.SetValue;
|
||||
var m4 = BLL.Project_SysSetService.GetSysSetBySetName("焊口已完成", this.CurrUser.LoginProjectId);
|
||||
if (m4 != null) this.drpJointCompleteColor.SelectedValue = m4.SetValue;
|
||||
|
||||
///质量页面呈现
|
||||
var c1 = BLL.Project_SysSetService.GetSysSetBySetName("检试验设备到期提醒天数", this.CurrUser.LoginProjectId);
|
||||
if (c1 != null) this.txtRemindDay.Text = c1.SetValue;
|
||||
var c2 = BLL.Project_SysSetService.GetSysSetBySetName("月报开始日期", this.CurrUser.LoginProjectId);
|
||||
if (c2 != null) this.txtStarTime.Text = c2.SetValue; else this.txtStarTime.Text = "25";
|
||||
var c3 = BLL.Project_SysSetService.GetSysSetBySetName("月报结束日期", this.CurrUser.LoginProjectId);
|
||||
if (c3 != null) this.txtEndTime.Text = c3.SetValue; else this.txtEndTime.Text = "24";
|
||||
}
|
||||
|
||||
private void SetCheckFromDict(Dictionary<string, Model.Project_Sys_Set> dict, string setId, CheckBox checkBox)
|
||||
@@ -446,4 +392,4 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+9
-126
@@ -50,33 +50,6 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Region Region2;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel0 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel0;
|
||||
|
||||
/// <summary>
|
||||
/// Form4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form4;
|
||||
|
||||
/// <summary>
|
||||
/// ckbIsYunMou 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckbIsYunMou;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel2 控件。
|
||||
/// </summary>
|
||||
@@ -104,6 +77,15 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckbPdms;
|
||||
|
||||
/// <summary>
|
||||
/// ckbUseMaterialBatch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckbUseMaterialBatch;
|
||||
|
||||
/// <summary>
|
||||
/// ckbJointB 控件。
|
||||
/// </summary>
|
||||
@@ -266,105 +248,6 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox AvevaNetUrl;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel3;
|
||||
|
||||
/// <summary>
|
||||
/// Form3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form3;
|
||||
|
||||
/// <summary>
|
||||
/// txtPipelineNOComplete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPipelineNOComplete;
|
||||
|
||||
/// <summary>
|
||||
/// txtPipelineComplete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPipelineComplete;
|
||||
|
||||
/// <summary>
|
||||
/// drpJointNOCompleteColor 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpJointNOCompleteColor;
|
||||
|
||||
/// <summary>
|
||||
/// drpJointCompleteColor 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpJointCompleteColor;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemindDay 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtRemindDay;
|
||||
|
||||
/// <summary>
|
||||
/// txtStarTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtStarTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtEndTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtEndTime;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user