From a7711b47c02807531f04313ae829584310f37aba Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 28 十一月 2025 12:17:10 +0800
Subject: [PATCH] 你们明天在那个公文管理公文管理那个操作操作界面增加一个审核, 好点审核呢,实际上是修改这个只有我才有一个权限, 只是只有我一个人,因为现在来看他们。相当于说, 没经过我审核,他们整些你看嘛,发你妈一些公文, 像狗屎一样,格式都不对头,在这儿乱在这儿乱写啊, 必须就是我,我审核,我点审核,你相就是复制一个修改过嘛, 相当于就是。好,必须是我,我点了审核好后头我修改好了, 提交好了才能发布。只要我没在审核里头的话,好,这个就发布不了 。好怀疑着呢,怀疑怀疑着来修改,还是在修改里头整?
---
CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx.cs | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 102 insertions(+), 1 deletions(-)
diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx.cs
index 11a0de3..42b9154 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx.cs
@@ -29,6 +29,10 @@
using CY.BLL;
using CY.WebForm.Pages.common;
using System.Transactions;
+using CY.Infrastructure.Query;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System.IO;
namespace CY.WebForm.Pages.business
{
@@ -579,7 +583,7 @@
//this.selKaipiaoshenqing.Value = "1";
//this.selPayStates.Value = "1";
- this.selHuikuanStates.Value = "1";
+ this.selPayStates.Value = "1";
@@ -720,6 +724,103 @@
UCPager1.AspNetPager.RecordCount = pagination.RecordCount;
}
+
+
+ //鏌ヨ浜嬩欢
+ protected void btn_Daochu_Click(object src, EventArgs e)
+ {
+
+ byte[] fileBytes = ExportToExcel();
+ if (fileBytes != null)
+ {
+ Response.Clear();
+ Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+ Response.AppendHeader("Content-Disposition", "attachment; filename=寮�绁ㄧ鐞嗗鍑�.xlsx");
+ Response.BinaryWrite(fileBytes);
+ Response.End();
+ }
+ else
+ {
+ // 澶勭悊瀵煎嚭澶辫触鐨勬儏鍐�
+ Response.Write("瀵煎嚭澶辫触锛岃绋嶅悗閲嶈瘯锛�");
+ }
+
+ }
+
+
+ public byte[] ExportToExcel()
+ {
+ byte[] bt = null;
+ try
+ {
+ Pagination pa = new Pagination();
+ pa.PageSize = 1000;
+ pa.PageIndex = 1;
+
+
+
+ IEnumerable<OA_Kaipiaoshenqing> results = oA_KaipiaoshenqingBLL.SelectModelPage(pa, CurrentUser.MemberId, this.txtSQBeginDate.Value, this.txtSQEndDate.Value, this.selKaipiaoshenqing.Value, this.selKehuqianshou.Value, this.selBusinessManager.Value, this.txtCustormerName.Value, this.selPayStates.Value, this.selHuikuanStates.Value);
+
+
+ // 鍒涘缓宸ヤ綔绨�
+ IWorkbook workbook = new XSSFWorkbook();
+ ISheet sheet = workbook.CreateSheet("瀵煎嚭鏁版嵁");
+
+ // 鍒涘缓琛ㄥご
+ IRow headerRow = sheet.CreateRow(0);
+ headerRow.CreateCell(0).SetCellValue("缂栧彿");
+ headerRow.CreateCell(1).SetCellValue("鐢宠寮�绁ㄦ椂闂�");
+ headerRow.CreateCell(2).SetCellValue("鐢宠绫诲瀷");
+ headerRow.CreateCell(3).SetCellValue("涓氬姟缁忕悊");
+ headerRow.CreateCell(4).SetCellValue("瀹㈡埛鍚嶇О");
+ headerRow.CreateCell(5).SetCellValue("鍙戠エ鍙风爜");
+ headerRow.CreateCell(6).SetCellValue("璁㈠崟鏁伴噺");
+ headerRow.CreateCell(7).SetCellValue("閲戦");
+ headerRow.CreateCell(8).SetCellValue("澧炲噺閲戦");
+ headerRow.CreateCell(9).SetCellValue("鍥炴閲戦");
+ headerRow.CreateCell(10).SetCellValue("鏈�杩戝偓娆�");
+ headerRow.CreateCell(11).SetCellValue("寮�绁ㄧ姸鎬�");
+
+
+ // 娣诲姞鏁版嵁
+ int rowIndex = 1;
+ foreach (var oA_Kaipiaoshenqing in results)
+ {
+ IRow row = sheet.CreateRow(rowIndex++);
+ row.CreateCell(0).SetCellValue((rowIndex - 1).ToString());
+ row.CreateCell(1).SetCellValue(oA_Kaipiaoshenqing.CreateTime.Value.ToString("yyyy-MM-dd"));
+ row.CreateCell(2).SetCellValue(oA_Kaipiaoshenqing.Shenqingleixing);
+ row.CreateCell(3).SetCellValue(oA_Kaipiaoshenqing.BusinessManager);
+ row.CreateCell(4).SetCellValue(oA_Kaipiaoshenqing.BuyerName);
+ row.CreateCell(5).SetCellValue(oA_Kaipiaoshenqing.Fapiaohao);
+ row.CreateCell(6).SetCellValue(oA_Kaipiaoshenqing.Dingdanshu.HasValue? oA_Kaipiaoshenqing.Dingdanshu.Value.ToString():"");
+ row.CreateCell(7).SetCellValue(oA_Kaipiaoshenqing.kpmoney.HasValue ? oA_Kaipiaoshenqing.kpmoney.Value.ToString() : "0");
+ row.CreateCell(8).SetCellValue(oA_Kaipiaoshenqing.Zengjianmoney.HasValue ? oA_Kaipiaoshenqing.Zengjianmoney.Value.ToString() : "0");
+ row.CreateCell(9).SetCellValue(oA_Kaipiaoshenqing.Huikuanmoney.HasValue ? oA_Kaipiaoshenqing.Huikuanmoney.Value.ToString() : "0");
+ row.CreateCell(10).SetCellValue(oA_Kaipiaoshenqing.ShoukuanTime.HasValue? oA_Kaipiaoshenqing.ShoukuanTime.Value.ToString("MM-dd HH:mm") : "");
+ row.CreateCell(11).SetCellValue(oA_Kaipiaoshenqing.KaipiaoshenqingName);
+
+
+
+ }
+
+ // 灏嗗伐浣滅翱鍐欏叆鍐呭瓨娴�
+ using (var ms = new MemoryStream())
+ {
+ workbook.Write(ms);
+ bt = ms.ToArray();
+ }
+ }
+ catch (Exception e)
+ {
+ bt = null;
+ // 璁板綍鏃ュ織
+
+ }
+ return bt;
+ }
+
+
/// <summary>
/// 鏌ヨ鍙傛暟
/// </summary>
--
Gitblit v1.9.1