diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo
index 12d33752..83e0e602 100644
Binary files a/.vs/SGGL_SeDin/v17/.wsuo and b/.vs/SGGL_SeDin/v17/.wsuo differ
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index bf1404e0..c8e002ca 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1464,6 +1464,7 @@
+
diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs
index a8952a3f..08607442 100644
--- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs
@@ -355,10 +355,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
protected void btnPrint_Click(object sender, EventArgs e)
{
- Print(Grid1.SelectedRowIDArray);
- HJGL_PipelineComponentService.UpdateIsPrint(Grid1.SelectedRowIDArray); //打印后修改打印状态
+ if (Print(Grid1.SelectedRowIDArray))
+ {
+
+ HJGL_PipelineComponentService.UpdateIsPrint(Grid1.SelectedRowIDArray); //打印后修改打印状态
+ }
}
- private void Print(string[] PipelineComponentId)
+ private bool Print(string[] PipelineComponentId)
{
BLL.FastReportService.ResetData();
@@ -370,8 +373,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
else
{
- ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
- return;
+ ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
+ return false;
}
BLL.FastReportService.AddFastreportTable(tb);
string initTemplatePath = "";
@@ -382,7 +385,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
- }
+ }
+
+ return true;
}
///
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs
index 86fb613c..c454fe58 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs
@@ -8,7 +8,7 @@ using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web.UI.DataVisualization.Charting;
-
+using System.Threading.Tasks;
namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
public partial class WeldReportEdit : PageBase
@@ -253,7 +253,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
}
//dt = this.LINQToDataTable(task);
}
-
+
+ task = task.OrderBy(x => x.PipelineCode).ThenBy(x => x.WeldJointNum).ToList();
Grid1.RecordCount = task.Count;
Grid1.DataSource = task;
Grid1.DataBind();
@@ -322,33 +323,23 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
return StateName;
}
#region 焊接日报 提交事件
- ///
- /// 编辑焊接日报
- ///
- ///
- ///
- protected void btnSave_Click(object sender, EventArgs e)
+ // 检查用户权限
+ private bool HasPermission()
+ {
+ return CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_WeldTaskMenuId, Const.BtnSave);
+ }
+ // 获取焊接信息
+ private List GetWeldJointView()
+ {
+ return Funs.DB.View_HJGL_WeldJoint
+ .Where(x => x.WeldingDailyId == WeldingDailyId)
+ .OrderBy(x => x.PipelineCode)
+ .ThenBy(x => x.WeldJointCode)
+ .ToList();
+ }
+ // 创建新的焊接日报
+ private Model.HJGL_WeldingDaily CreateNewWeldingDaily()
{
- if (!CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, this.CurrUser.PersonId,
- Const.HJGL_WeldTaskMenuId, Const.BtnSave))
- {
- ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
- return;
- }
- if (BLL.WeldingDailyService.IsExistWeldingDailyCode(this.txtWeldingDailyCode.Text,
- !string.IsNullOrEmpty(this.WeldingDailyId) ? this.WeldingDailyId : "", CurrUser.LoginProjectId))
- {
- ShowNotify("日报编号已存在,请重新录入", MessageBoxIcon.Warning);
- return;
- }
-
- if (string.IsNullOrEmpty(this.txtWeldingDate.Text) ||
- string.IsNullOrEmpty(this.txtWeldingDailyCode.Text.Trim()))
- {
- ShowNotify("日报告号、焊接日期不能为空", MessageBoxIcon.Warning);
- return;
- }
-
Model.HJGL_WeldingDaily newWeldingDaily = new Model.HJGL_WeldingDaily
{
WeldingDailyCode = this.txtWeldingDailyCode.Text.Trim(),
@@ -364,14 +355,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
newWeldingDaily.UnitWorkId = this.drpUnitWork.SelectedValue;
}
-
- //List GetWeldingDailyItem = this.CollectGridJointInfo();
- string errlog = string.Empty;
- var weldJointView = (from x in BLL.Funs.DB.View_HJGL_WeldJoint where x.WeldingDailyId == this.WeldingDailyId orderby x.PipelineCode, x.WeldJointCode
- select x).ToList();
-
- string eventArg = string.Empty;
-
+ return newWeldingDaily;
+ }
+ //焊工资质判断
+ private void CheckWelderQualification()
+ {
#region 焊工资质判断这里取消
//foreach (var item in GetWeldingDailyItem)
@@ -464,7 +452,43 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
//}
#endregion
+ }
+ ///
+ /// 编辑焊接日报
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (!HasPermission())
+ {
+ ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (BLL.WeldingDailyService.IsExistWeldingDailyCode(this.txtWeldingDailyCode.Text,
+ !string.IsNullOrEmpty(this.WeldingDailyId) ? this.WeldingDailyId : "", CurrUser.LoginProjectId))
+ {
+ ShowNotify("日报编号已存在,请重新录入", MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (string.IsNullOrEmpty(this.txtWeldingDate.Text) ||
+ string.IsNullOrEmpty(this.txtWeldingDailyCode.Text.Trim()))
+ {
+ ShowNotify("日报告号、焊接日期不能为空", MessageBoxIcon.Warning);
+ return;
+ }
+ // 创建新的焊接日报
+ var newWeldingDaily = CreateNewWeldingDaily();
+ // 获取焊接信息
+ var weldJointView = GetWeldJointView();
+
+ string errlog = string.Empty;
+ string eventArg = string.Empty;
+ // 焊工资质判断
+ // CheckWelderQualification(weldJointView);
+
if (eventArg == string.Empty) //焊工焊接的所有焊口资质都符合要求)
{
if (!string.IsNullOrEmpty(this.WeldingDailyId))
@@ -646,9 +670,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
#endregion
- ChanggeState(); //更新焊口属性
-
- //更新焊口属性
+ System.Threading.Tasks.Task.Run(() =>
+ {
+ ChanggeState();
+ });
+
if (string.IsNullOrEmpty(errlog))
{
ShowNotify("保存成功!", MessageBoxIcon.Success);
diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackEdit.aspx.cs
index ae7a3f76..527b7f88 100644
--- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackEdit.aspx.cs
@@ -195,7 +195,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
}
//SaveGrid1();
- PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
#region 获取按钮权限
diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetectionGrid.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetectionGrid.aspx.cs
index 6c225e04..e11b0c6c 100644
--- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetectionGrid.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetectionGrid.aspx.cs
@@ -33,7 +33,8 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
ContractId = Request.Params["ContractId"];
- GridTable.Columns.Add("Id");
+ GridTable.Columns.Add("Id");
+ GridTable.Columns.Add("SerialNumber");
ListItem[] list = new ListItem[8];
list[0] = new ListItem("主项号", "MainItemCode");
list[1] = new ListItem("主项名称", "MainItemName");
@@ -316,6 +317,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
foreach (var item in sublist)
{
DataRow row = tempTable.NewRow();
+ row["SerialNumber"] = item.SerialNumber;
row["Id"] = item.Id;
row["MainItemCode"] = item.MainItemCode;
row["MainItemName"] = item.MainItemName;
@@ -362,7 +364,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
GridTable.Rows.Add(newRow);
}
Grid1.RecordCount = count;
- Grid1.DataSource = GridTable;
+ Grid1.DataSource = GridTable.AsEnumerable().OrderBy(x => x["SerialNumber"].ToString(), new CustomComparer());;
Grid1.DataBind();
}
}
diff --git a/SGGL/FineUIPro.Web/res/DataInTable.js b/SGGL/FineUIPro.Web/res/DataInTable.js
new file mode 100644
index 00000000..8991b854
--- /dev/null
+++ b/SGGL/FineUIPro.Web/res/DataInTable.js
@@ -0,0 +1,60 @@
+
+function parse(y) {
+ var box = document.getElementById("box");
+ //获取进度条div的宽度
+ var x = box.style.width;
+ x = parseInt(x) + 1;
+ y = y + 1;
+ //将y值加上百分号赋值给box的宽度。这样每次+1就可以实现进度条占父容器的100%;
+ box.style.width = y + "%";
+ //将y值加上百分号并赋值给显示下载百分比的div上
+ document.getElementById("box").innerHTML = y + "%";
+ //判断当y已经100的时候,也就是进度条的宽度和父容器的宽度一致的时候停止。
+ if (y >= 100) {
+
+ document.getElementById("box").innerHTML = "100%";
+ }
+}
+
+
+
+
+
+function printX() {
+ var userid = document.getElementById('id-inputEl').value;
+ F.ui.Window2.show();
+ parse(0);
+ var begin = setInterval(function () {
+ PageMethods.getPercent(userid,function (result) {
+ parse(result);
+ if (result >= 100) {
+ F.ui.Window2.hide();
+ clearInterval(begin);
+ print();
+ }
+ });
+ }, 1000 );
+ y = 0;
+
+
+}
+function print() {
+ PageMethods.
+ setTimeout(function () {
+ var message = document.getElementById('message-inputEl').value;
+ console.log(message);
+ notify(message);
+ }, 1000); // 1000毫秒,即1秒
+}
+// 通知框
+function notify(msg) {
+ F.notify({
+ message: msg,
+ messageIcon: 'information',
+ target: '_top',
+ header: false,
+ displayMilliseconds: 3 * 1000,
+ positionX: 'center',
+ positionY: 'center'
+ });
+}
\ No newline at end of file