This commit is contained in:
2024-04-22 14:12:42 +08:00
6 changed files with 353 additions and 222 deletions
@@ -949,6 +949,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//自动设置表格样式 //自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths); table.AutoFit(AutoFitBehavior.FixedColumnWidths);
} }
else {
isYm = true;
numberIndex = 1;
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
//跳过页眉的表头
while (isYm)
{
if (table.Range.Text.Substring(0, 2) != "序号")
{
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
}
else
{
isYm = false;
}
}
//创建合计
Row rowhj = new Row(doc);
double numcount0 = table.FirstRow.Cells[0].CellFormat.Width;
double numcount1 = table.FirstRow.Cells[1].CellFormat.Width;
double numcount2 = table.FirstRow.Cells[2].CellFormat.Width;
double numcount3 = table.FirstRow.Cells[3].CellFormat.Width;
double numcount4 = table.FirstRow.Cells[4].CellFormat.Width;
double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4;
rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
}
#endregion #endregion
#region 7.3 #region 7.3
@@ -1193,7 +1225,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.AutoFit(AutoFitBehavior.FixedColumnWidths); table.AutoFit(AutoFitBehavior.FixedColumnWidths);
} }
else { else {
isYm = true;
numberIndex = 1;
whileIndex += 1; whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
//跳过页眉的表头
while (isYm)
{
if (table.Range.Text.Substring(0, 2) != "序号")
{
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
}
else
{
isYm = false;
}
}
//创建合计
Row rowhj = new Row(doc);
double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
double numcount2 = table.Rows[0].Cells[2].CellFormat.Width;
double numcount3 = table.Rows[0].Cells[3].CellFormat.Width;
double numcount4 = table.Rows[0].Cells[4].CellFormat.Width;
double numcount5 = table.Rows[0].Cells[5].CellFormat.Width;
double numcount6 = table.Rows[0].Cells[6].CellFormat.Width;
double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6;
rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
} }
#endregion #endregion
@@ -1252,6 +1315,39 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//自动设置表格样式 //自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths); table.AutoFit(AutoFitBehavior.FixedColumnWidths);
} }
else {
isYm = true;
numberIndex = 1;
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
//跳过页眉的表头
while (isYm)
{
if (table.Range.Text.Substring(0, 2) != "序号")
{
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
}
else
{
isYm = false;
}
}
//创建合计
Row rowhj = new Row(doc);
double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
double numcount2 = table.Rows[0].Cells[2].CellFormat.Width;
double numcount3 = table.Rows[0].Cells[3].CellFormat.Width;
double numcount4 = table.Rows[0].Cells[4].CellFormat.Width;
double numcount5 = table.Rows[0].Cells[5].CellFormat.Width;
double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5;
rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
}
#endregion #endregion
@@ -2022,6 +2022,9 @@
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
<f:Button ID="Button1" Icon="SystemSave" runat="server" ToolTip="保存" Text="保存" OnClick="btnSave_Click"> <f:Button ID="Button1" Icon="SystemSave" runat="server" ToolTip="保存" Text="保存" OnClick="btnSave_Click">
</f:Button>
<f:Button ID="Button5" Icon="SystemSave" runat="server" ToolTip="保存" Text="保存" OnClick="btnLoad_Click" Hidden="true">
</f:Button> </f:Button>
<f:HiddenField ID="hdId" runat="server"> <f:HiddenField ID="hdId" runat="server">
</f:HiddenField> </f:HiddenField>
@@ -2048,4 +2051,18 @@
function onGrid10DataLoad(event) { function onGrid10DataLoad(event) {
this.mergeColumns(['CreateMan']); this.mergeColumns(['CreateMan']);
} }
var Window1ClientID = '<%= ContentPanel1.ClientID %>';
function refresh() {
// 第一个参数: 遮罩层的透明度
F(Window1ClientID).showLoading(0.8);
$('[id$="_Button5"]').click();
}
function rehiden() {
F(Window1ClientID).hideLoading();
}
</script> </script>
@@ -6,6 +6,7 @@ using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using BLL; using BLL;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System.Threading;
namespace FineUIPro.Web.CQMS.ManageReportNew namespace FineUIPro.Web.CQMS.ManageReportNew
{ {
@@ -308,22 +309,28 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{ {
if (!string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) && !string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) if (!string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) && !string.IsNullOrEmpty(this.txtEndDate.Text.Trim()))
{ {
if (Funs.GetNewDateTime(this.txtStartDate.Text.Trim()) > Funs.GetNewDateTime(this.txtEndDate.Text.Trim())) if (Funs.GetNewDateTime(this.txtStartDate.Text.Trim()) > Funs.GetNewDateTime(this.txtEndDate.Text.Trim()))
{ {
Alert.ShowInTop("开始时间不能大于结束时间!", MessageBoxIcon.Warning); Alert.ShowInTop("开始时间不能大于结束时间!", MessageBoxIcon.Warning);
return; return;
} }
if (AddOrUpdate == "update") PageContext.RegisterStartupScript("refresh();");
{
lodAllGrid("1");
}
else
{
lodAllGrid("0");
}
} }
} }
protected void btnLoad_Click(object sender, EventArgs e) {
if (AddOrUpdate == "update")
{
lodAllGrid("1");
PageContext.RegisterStartupScript("rehiden();");
}
else
{
lodAllGrid("0");
PageContext.RegisterStartupScript("rehiden();");
}
}
#endregion #endregion
#region Grid1方法 #region Grid1方法
@@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.ManageReportNew { namespace FineUIPro.Web.CQMS.ManageReportNew
{
public partial class MonthReportEdit { public partial class MonthReportEdit
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@@ -1857,6 +1859,15 @@ namespace FineUIPro.Web.CQMS.ManageReportNew {
/// </remarks> /// </remarks>
protected global::FineUIPro.Button Button1; protected global::FineUIPro.Button Button1;
/// <summary>
/// Button5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button Button5;
/// <summary> /// <summary>
/// hdId 控件。 /// hdId 控件。
/// </summary> /// </summary>
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB