From 6464e225c346a46139be82051aabb1450c7482c9 Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Mon, 13 Nov 2023 17:46:33 +0800 Subject: [PATCH] 2023-11-13 --- .vs/SGGL_SeDin/v17/.wsuo | Bin 265216 -> 264192 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 1 + .../HJGL/PreDesign/PrePipeline.aspx.cs | 17 ++- .../HJGL/WeldingManage/WeldReportEdit.aspx.cs | 104 +++++++++++------- .../ContractCompile/ContractTrackEdit.aspx.cs | 2 +- ...ContractTrackProgressDetectionGrid.aspx.cs | 6 +- SGGL/FineUIPro.Web/res/DataInTable.js | 60 ++++++++++ 7 files changed, 142 insertions(+), 48 deletions(-) create mode 100644 SGGL/FineUIPro.Web/res/DataInTable.js diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index 12d33752132c24fc031836cc38cb65b44926d573..83e0e602c095982177369224946228eef59f9d4e 100644 GIT binary patch delta 2349 zcmcJQYiyHM7{`0g`*!QPc5A!tLN{>h#xj?6c3X$rxHXe-8P~{A5)n6KL>-p`?HDjv zK{5zn7=2_f#!HqG8xlVl)?kgF3i!oDg%CoFABjN_R5YM+Tm3(yg=$zdQBL#gIq&m4 z=RN2A&-0!WJZcFJS_Y?;8Ff0H1fz*W0+mjHU0?!mfWoM?@|Xz8wHZswzZjaBPn+a! z@d4eEi_AI`{1$+&39{x^h`kh0`pp|*>IPi0NT`LbR1gO`VbudO$N=S_0q_LMP@CwK zT4=t{p(tG6KipYNK2_Cc!)=ATc##XO8c+>tK^+*2$6rpe?LplLrhsQb6KDY(Hx>0X zFdYa;(NF2*%gb1~1R>k)Czwda{d47Q$E?RxMRnWfeGCqJ^v_zbq4^^yMC`cdEyjx~Yd` zU6AJIw@L&ozr?Z31gwU4=pM+w(EI;qbEA|ijYwiEtqbcj#vBS+n48hb3b59$0gNj}5jCn<^1EHX_Fk+j{Msb14Jo9Ji?^uTOMi zn#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vH8n05J0TScc-Cyjsd22Zc$&O2lkF>>6RK}i^120! zYKbG4gs?~`bFNQao0>q>)C79bs2toSRH~IW8YHZ8uSfM{&?drK7tLdN3r*@$3*8VO z&ZIP)PQ`E*rP?DQa=oaEW9d~AZWCx@4n3SB(4b0B3qAVqIe~`H3RE$ + 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