1
This commit is contained in:
parent
6c3b737926
commit
3308d39707
@ -43,7 +43,7 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
|||||||
string F_SFYJKH = rptTitles.FirstOrDefault(a => a.TitleKey == "F_SFYJKH").TitleValue.ToString();
|
string F_SFYJKH = rptTitles.FirstOrDefault(a => a.TitleKey == "F_SFYJKH").TitleValue.ToString();
|
||||||
|
|
||||||
//string FPath = "应收账款对账单【简易版】.xlsx";
|
//string FPath = "应收账款对账单【简易版】.xlsx";
|
||||||
string FPath = string.Format("{0}-{1}-应收账款对账单.xlsx", DateTime.Now.ToString("yyyyMMdd"), fClient);
|
string FPath = string.Format("{0}-{1}-应收账款对账单.xlsx", string.IsNullOrWhiteSpace(fDate) ? DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") : fDate, fClient);
|
||||||
|
|
||||||
// 在临时文件目录,生成一个完整的文件名: C:\Program Files\Kingdee\K3Cloud\WebSite\...\JD.xls
|
// 在临时文件目录,生成一个完整的文件名: C:\Program Files\Kingdee\K3Cloud\WebSite\...\JD.xls
|
||||||
string filePath = PathUtils.GetPhysicalPath(KeyConst.TEMPFILEPATH, Path.GetFileName(FPath));
|
string filePath = PathUtils.GetPhysicalPath(KeyConst.TEMPFILEPATH, Path.GetFileName(FPath));
|
||||||
@ -93,6 +93,8 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
|||||||
|
|
||||||
//获取工作簿中的第一个工作表(索引为0)
|
//获取工作簿中的第一个工作表(索引为0)
|
||||||
ISheet sheet = workbook.GetSheetAt(0);
|
ISheet sheet = workbook.GetSheetAt(0);
|
||||||
|
//冻结该工作表至13行
|
||||||
|
sheet.CreateFreezePane(0, 13);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -279,7 +281,10 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
|||||||
//将新创建或获取的单元格的值修改
|
//将新创建或获取的单元格的值修改
|
||||||
cell22.SetCellValue("");
|
cell22.SetCellValue("");
|
||||||
var YFHpriceSumZW = ToChineseNumber(YFHpriceSum, Context);
|
var YFHpriceSumZW = ToChineseNumber(YFHpriceSum, Context);
|
||||||
cell3.SetCellValue("贵公司截至 " + (string.IsNullOrWhiteSpace(fDate) ? DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") : fDate) + " 共欠我公司货款金额为:" + YFHpriceSum.ToString("N") + "元(大写:" + YFHpriceSumZW + ")");
|
|
||||||
|
string CommonDate = string.IsNullOrWhiteSpace(fDate) ? DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") : fDate;
|
||||||
|
|
||||||
|
cell3.SetCellValue("贵公司截至 " + CommonDate + " 共欠我公司货款金额为:" + YFHpriceSum.ToString("N") + "元(大写:" + YFHpriceSumZW + ")");
|
||||||
//将新创建或获取的单元格的值修改
|
//将新创建或获取的单元格的值修改
|
||||||
cell.SetCellValue("尊敬的 " + fClient + " 客户您好,我公司已根据合同/订单的要求向贵公司交付相关产品并请验收确认,鉴于我公司对贵公司已通知发货部分的交付义务已完成,");
|
cell.SetCellValue("尊敬的 " + fClient + " 客户您好,我公司已根据合同/订单的要求向贵公司交付相关产品并请验收确认,鉴于我公司对贵公司已通知发货部分的交付义务已完成,");
|
||||||
cell2.SetCellValue(fClient);
|
cell2.SetCellValue(fClient);
|
||||||
@ -320,10 +325,16 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
|||||||
// rowi = sheet.CreateRow(j + list.Count - 1);
|
// rowi = sheet.CreateRow(j + list.Count - 1);
|
||||||
// j = 12;
|
// j = 12;
|
||||||
//}
|
//}
|
||||||
|
string Number = list[i]["Number"].ToString();
|
||||||
ICell c1 = rowi.CreateCell(0); c1.SetCellValue(list[i]["Number"].ToString()); c1.CellStyle = cellStyle3;
|
string CONTRACTNUMBER = list[i]["CONTRACTNUMBER"].ToString();
|
||||||
|
if (list[i]["Number"].ToString() == "待核销")
|
||||||
|
{
|
||||||
|
Number = "";
|
||||||
|
CONTRACTNUMBER = list[i]["Number"].ToString();
|
||||||
|
}
|
||||||
|
ICell c1 = rowi.CreateCell(0); c1.SetCellValue(Number); c1.CellStyle = cellStyle3;
|
||||||
ICell c2 = rowi.CreateCell(1); c2.SetCellValue(""+date+""); c2.CellStyle = cellStyle2;
|
ICell c2 = rowi.CreateCell(1); c2.SetCellValue(""+date+""); c2.CellStyle = cellStyle2;
|
||||||
ICell c3 = rowi.CreateCell(2); c3.SetCellValue(list[i]["CONTRACTNUMBER"].ToString()); c3.CellStyle = cellStyle2;
|
ICell c3 = rowi.CreateCell(2); c3.SetCellValue(CONTRACTNUMBER); c3.CellStyle = cellStyle2;
|
||||||
ICell c4 = rowi.CreateCell(3); c4.SetCellValue(list[i]["ProjectName"].ToString()); c4.CellStyle = cellStyle2;
|
ICell c4 = rowi.CreateCell(3); c4.SetCellValue(list[i]["ProjectName"].ToString()); c4.CellStyle = cellStyle2;
|
||||||
ICell c5 = rowi.CreateCell(4); c5.SetCellValue(Convert.ToDouble(OrderAmount)); c5.CellStyle = cellStyle;
|
ICell c5 = rowi.CreateCell(4); c5.SetCellValue(Convert.ToDouble(OrderAmount)); c5.CellStyle = cellStyle;
|
||||||
ICell c6 = rowi.CreateCell(5); c6.SetCellValue(Convert.ToDouble(ShipmentsAmount )); c6.CellStyle = cellStyle;
|
ICell c6 = rowi.CreateCell(5); c6.SetCellValue(Convert.ToDouble(ShipmentsAmount )); c6.CellStyle = cellStyle;
|
||||||
@ -561,7 +572,7 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
|||||||
//移除第二个工作表
|
//移除第二个工作表
|
||||||
workbook.RemoveSheetAt(1);
|
workbook.RemoveSheetAt(1);
|
||||||
//重命名工作表
|
//重命名工作表
|
||||||
workbook.SetSheetName(0,string.Format("简易版{0}",DateTime.Now.ToString("yyyy-MM-dd")));
|
workbook.SetSheetName(0,string.Format("简易版{0}", CommonDate));
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Excel代码2
|
#region Excel代码2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user