This commit is contained in:
2024-04-23 16:41:35 +08:00
10 changed files with 1349 additions and 1393 deletions
@@ -949,6 +949,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//自动设置表格样式
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
#region 7.3
@@ -1193,7 +1225,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
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 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
@@ -1252,6 +1315,39 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//自动设置表格样式
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
@@ -2022,6 +2022,9 @@
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<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:HiddenField ID="hdId" runat="server">
</f:HiddenField>
@@ -2048,4 +2051,18 @@
function onGrid10DataLoad(event) {
this.mergeColumns(['CreateMan']);
}
var Window1ClientID = '<%= ContentPanel1.ClientID %>';
function refresh() {
// 第一个参数: 遮罩层的透明度
F(Window1ClientID).showLoading(0.8);
$('[id$="_Button5"]').click();
}
function rehiden() {
F(Window1ClientID).hideLoading();
}
</script>
@@ -6,6 +6,7 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Newtonsoft.Json.Linq;
using System.Threading;
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 (Funs.GetNewDateTime(this.txtStartDate.Text.Trim()) > Funs.GetNewDateTime(this.txtEndDate.Text.Trim()))
{
Alert.ShowInTop("开始时间不能大于结束时间!", MessageBoxIcon.Warning);
return;
}
if (AddOrUpdate == "update")
{
lodAllGrid("1");
}
else
{
lodAllGrid("0");
}
PageContext.RegisterStartupScript("refresh();");
}
}
protected void btnLoad_Click(object sender, EventArgs e) {
if (AddOrUpdate == "update")
{
lodAllGrid("1");
PageContext.RegisterStartupScript("rehiden();");
}
else
{
lodAllGrid("0");
PageContext.RegisterStartupScript("rehiden();");
}
}
#endregion
#region Grid1方法
File diff suppressed because it is too large Load Diff