CY_ECommercePlatform/CY.BLL/OA/OA_WorkPlanBLL.cs
@@ -91,9 +91,9 @@ /// <param name="EvaluationStatus"></param> /// <param name="RewardType"></param> /// <returns></returns> public IEnumerable<Model.OA_WorkPlan> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId, Guid SentStaffId, Guid ReciveStaffId, int? PlanType, int? PlanDataType, string PlanTitle, DateTime? BeginPlanStartTime, DateTime? EndPlanStartTime, DateTime? BeginPlanRunTime, DateTime? EndPlanRunTime, string PlanPeople, int? PlanStatus, int? ApprovalStatus, int? EvaluationStatus, int? RewardType, string RewardContent= null, string PlanContent = null) public IEnumerable<Model.OA_WorkPlan> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId, Guid SentStaffId, Guid ReciveStaffId, int? PlanType, int? PlanDataType, string PlanTitle, DateTime? BeginPlanStartTime, DateTime? EndPlanStartTime, DateTime? BeginPlanRunTime, DateTime? EndPlanRunTime, string PlanPeople, int? PlanStatus, int? ApprovalStatus, int? EvaluationStatus, int? RewardType, string RewardContent= null, string PlanContent = null, string BaocunStatus = null) { return iOA_WorkPlanDAL.SelectModelPage(pagination, MemberId, SentStaffId, ReciveStaffId, PlanType, PlanDataType, PlanTitle, BeginPlanStartTime, EndPlanStartTime, BeginPlanRunTime, EndPlanRunTime, PlanPeople, PlanStatus, ApprovalStatus, EvaluationStatus, RewardType, RewardContent, PlanContent); return iOA_WorkPlanDAL.SelectModelPage(pagination, MemberId, SentStaffId, ReciveStaffId, PlanType, PlanDataType, PlanTitle, BeginPlanStartTime, EndPlanStartTime, BeginPlanRunTime, EndPlanRunTime, PlanPeople, PlanStatus, ApprovalStatus, EvaluationStatus, RewardType, RewardContent, PlanContent, BaocunStatus); } /// <summary> CY_ECommercePlatform/CY.IDAL/OA/IOA_WorkPlanDAL.cs
@@ -47,7 +47,7 @@ /// <param name="EvaluationStatus"></param> /// <param name="RewardType"></param> /// <returns></returns> IEnumerable<Model.OA_WorkPlan> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId, Guid SentStaffId, Guid ReciveStaffId, int? PlanType, int? PlanDataType, string PlanTitle, DateTime? BeginPlanStartTime, DateTime? EndPlanStartTime, DateTime? BeginPlanRunTime, DateTime? EndPlanRunTime, string PlanPeople, int? PlanStatus, int? ApprovalStatus, int? EvaluationStatus, int? RewardType, string RewardContent = null, string PlanContent = null); IEnumerable<Model.OA_WorkPlan> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId, Guid SentStaffId, Guid ReciveStaffId, int? PlanType, int? PlanDataType, string PlanTitle, DateTime? BeginPlanStartTime, DateTime? EndPlanStartTime, DateTime? BeginPlanRunTime, DateTime? EndPlanRunTime, string PlanPeople, int? PlanStatus, int? ApprovalStatus, int? EvaluationStatus, int? RewardType, string RewardContent = null, string PlanContent = null, string BaocunStatus = null); /// <summary> /// 删除工作安排 CY_ECommercePlatform/CY.Model/CY.Model.csproj
@@ -284,6 +284,7 @@ <Compile Include="OA\OA_WorkReminder.cs" /> <Compile Include="OA\OA_CarExamined.cs" /> <Compile Include="OA\OA_Yujihuikuan.cs" /> <Compile Include="OA\Responsebody.cs" /> <Compile Include="Pay\PaymentAccountModelByAdmin.cs" /> <Compile Include="Pay\PaymentAccountQueryModel.cs" /> <Compile Include="Pay\PaymentAccountQueryModelByAdmin.cs" /> CY_ECommercePlatform/CY.Model/OA/OA_WorkPlan.cs
@@ -81,15 +81,15 @@ { if (EvaluationStatus == 1) { return "已报销"; return "已付款"; } else if (EvaluationStatus == 2) { return "未报销"; return "未付款"; } else return "未报销"; return "未付款"; } else { @@ -367,7 +367,7 @@ { if (ApprovalStatus == 0) { return "未批复"; return "未审批"; } else if (ApprovalStatus == 1) { @@ -377,8 +377,12 @@ { return "不批准"; } else if (ApprovalStatus == 3) { return "未提交"; } else return "未批复"; return "未审批"; } else { CY_ECommercePlatform/CY.Model/OA/Responsebody.cs
New file @@ -0,0 +1,15 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CY.Model { public class Responsebody { public string statusCode { get; set; } public int code { get; set; } public string data { get; set; } public string timestamp { get; set; } } } CY_ECommercePlatform/CY.SQLDAL/OA/OA_WorkPlanDAL.cs
@@ -294,7 +294,7 @@ /// <param name="EvaluationStatus"></param> /// <param name="RewardType"></param> /// <returns></returns> public IEnumerable<Model.OA_WorkPlan> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId, Guid SentStaffId, Guid ReciveStaffId, int? PlanType, int? PlanDataType, string PlanTitle, DateTime? BeginPlanStartTime, DateTime? EndPlanStartTime, DateTime? BeginPlanRunTime, DateTime? EndPlanRunTime, string PlanPeople, int? PlanStatus, int? ApprovalStatus, int? EvaluationStatus, int? RewardType, string RewardContent = null, string PlanContent = null) public IEnumerable<Model.OA_WorkPlan> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId, Guid SentStaffId, Guid ReciveStaffId, int? PlanType, int? PlanDataType, string PlanTitle, DateTime? BeginPlanStartTime, DateTime? EndPlanStartTime, DateTime? BeginPlanRunTime, DateTime? EndPlanRunTime, string PlanPeople, int? PlanStatus, int? ApprovalStatus, int? EvaluationStatus, int? RewardType, string RewardContent = null, string PlanContent = null, string BaocunStatus = null) { try { @@ -338,10 +338,14 @@ if (ApprovalStatus >= 0) { if (ApprovalStatus == 1) condition += " and ( a.ApprovalStatus = '1' or a.ApprovalStatus = '3' )"; condition += " and (( a.PlanDataType = 17 and a.ApprovalStatus = '1' ) or ( a.PlanDataType != 17 and (a.ApprovalStatus = '3' or a.ApprovalStatus = '1') ))"; else condition += " and a.ApprovalStatus = '" + ApprovalStatus + "'"; } if (!string.IsNullOrEmpty(BaocunStatus)) { condition += " and a.ApprovalStatus != '" + BaocunStatus + "'"; } if (EvaluationStatus >= 0) { if (EvaluationStatus == 5) CY_ECommercePlatform/CY.WebForm/CY.WebForm.csproj
@@ -106,6 +106,7 @@ <Reference Include="System.Data" /> <Reference Include="System.Core" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System.Transactions" /> <Reference Include="System.Web.Extensions" /> <Reference Include="System.Xml.Linq" /> CY_ECommercePlatform/CY.WebForm/Pages/business/OrderList.aspx
@@ -387,12 +387,13 @@ <th width="55"> 订单类别 </th> <th style="text-align: center;"> 印件名称 </th> <th style="width:50px;"> 合同序号 </th> <th style="text-align: center;"> 印件名称 </th> <th width="36"> 数量 </th> @@ -507,15 +508,16 @@ <td style="text-align: center;"> <%#Eval("PrintType.PrintName")%> </td> <td style="text-align: center;"> <div style="word-wrap: break-word; text-align:justify;"> <%#Eval("Duiyinghetongbianhao").ToString().Length > 10 ? (Eval("Duiyinghetongbianhao").ToString().Substring(0, 10)) : Eval("Duiyinghetongbianhao").ToString()%> </div> </td> <td style="text-align: center; color:<%#(Eval("OrderExtend.ExigencyCaseId").ToString()=="-1" && int.Parse(Eval("OrderState").ToString()) <5 && int.Parse(Eval("OrderState").ToString()) > 0)?"red":""%>;"> <span title="<%#Eval("DocumentName")%>"><%#Eval("DocumentName").ToString().Length >22? (Eval("DocumentName").ToString().Substring(0,22)+".."):Eval("DocumentName").ToString() %></span> </td> <td style="text-align: center;"> <div style="word-wrap: break-word; text-align:justify;"> <a href='javascript:void(0)' title='<%#Eval("Duiyinghetongbianhao").ToString()%>' class='a_under' onclick='View("<%#Eval("BuyerId")%>")'><%#Eval("Duiyinghetongbianhao").ToString().Length > 5 ? (Eval("Duiyinghetongbianhao").ToString().Substring(0, 5)) : Eval("Duiyinghetongbianhao").ToString()%></a> </div> </td> <td> <%#Eval("OrderExtend.PrintNum")%> CY_ECommercePlatform/CY.WebForm/Pages/financial/BaoxiaoFukuanEdit.aspx
@@ -34,8 +34,8 @@ 科目名称: </td> <td> <select id="selSubject" runat="server" datatextfield="SubjectName" datavaluefield="Keyid" keepdefaultstyle="true" msg="请选择科目名称" > </select> <input type="hidden" id="selSubject" runat="server" /> <input runat="server" id="selSubjectName" type="text" readonly ="readonly" /> </td> </tr> @@ -68,7 +68,7 @@ 摘要: </td> <td> <textarea runat="server" class="req" id="txtOperationalMatters" style="height: 40px" msg="请填写摘要"></textarea> <textarea runat="server" class="req" id="txtOperationalMatters" style="height: 40px" msg="请填写摘要" readonly="readonly" ></textarea> </td> </tr> <tr style="display: none"> CY_ECommercePlatform/CY.WebForm/Pages/financial/BaoxiaoFukuanEdit.aspx.cs
@@ -70,10 +70,10 @@ protected void InitialData() { var keyid = Request["keyid"].ToInt32(); //科目名称 selSubject.DataSource = _OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "贷"); selSubject.DataBind(); selSubject.Items.Insert(0, new ListItem("请选择", "")); ////科目名称 //selSubject.DataSource = _OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "贷"); //selSubject.DataBind(); //selSubject.Items.Insert(0, new ListItem("请选择", "")); ///账户类型 selAcoountType.DataSource = _Sys_DictionaryBLL.GetDataByType("账户类型"); @@ -85,6 +85,7 @@ { var oA_WorkPlan = bll_OA_WorkPlanBll.GetModelByKeyid(keyid); this.selSubject.Value = oA_WorkPlan.RewardResult; this.selSubjectName.Value = oA_WorkPlan.RewardContent; this.txtMoney.Value = oA_WorkPlan.PlanMoney.Value.ToString("0.00"); this.txtPaymentUnit.Value = oA_WorkPlan.PlanPeople; var oA_Department = oA_DepartmentBll.GetModelByKeyid(oA_WorkPlan.DepartId); CY_ECommercePlatform/CY.WebForm/Pages/financial/BaoxiaoFukuanEdit.aspx.designer.cs
@@ -57,7 +57,16 @@ /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlSelect selSubject; protected global::System.Web.UI.HtmlControls.HtmlInputHidden selSubject; /// <summary> /// selSubjectName 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlInputText selSubjectName; /// <summary> /// txtMoney 控件。 CY_ECommercePlatform/CY.WebForm/Pages/work/BaoxiaoFukuanList.aspx
@@ -90,17 +90,19 @@ </td> <td class="ali03"> 报销状态: 付款状态: </td> <td> <select keepdefaultstyle="true" runat="server" id="selEvaluationStatus"> <option value="-1">全部</option> <option value="1">已报销</option> <option value="2">未报销</option> <option value="1">已付款</option> <option value="2">未付款</option> </select> </td> <td> <asp:Button ID="btn_Submit" Text="查询" runat="server" OnClick="btn_Search_Click" /> <asp:Button ID="Button1" Text="导出" runat="server" OnClick="btn_Daochu_Click" /> </td> </tr> </table> @@ -137,6 +139,9 @@ <th width="130" style="text-align: center"> 申请日期 </th> <th width="130" style="text-align: center"> 报销单号 </th> <th width="70" style="text-align: center"> 部门 </th> @@ -159,7 +164,7 @@ 附件 </th> <th width="150" style="text-align: center"> 报销状态 付款状态 </th> <th width="250" style="text-align: center"> 操作 @@ -176,6 +181,9 @@ </td> <td style="text-align: center"> <%#Eval("PlanStartTime", "{0:yyyy-MM-dd}")%> </td> <td style="text-align: center"> <%#Eval("EvaluationContent")%> </td> <td style="text-align: center"> <%#Eval("DepartName")%> @@ -213,7 +221,7 @@ </asp:Repeater> <tr class="StatisticsMoney"> <td colspan="7" class="ali03"> <td colspan="8" class="ali03"> 合计: </td> <td colspan="5" class="ali01"> CY_ECommercePlatform/CY.WebForm/Pages/work/BaoxiaoFukuanList.aspx.cs
@@ -9,6 +9,9 @@ using CY.Model; using CY.Infrastructure.Query; using CY.Infrastructure.Common; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; using System.IO; namespace CY.WebForm.Pages.work { @@ -224,5 +227,137 @@ { BindList(); } //查询事件 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(); DateTime? beginTime = null; DateTime? endTime = null; pa.PageSize = 10000; pa.PageIndex = 1; var oA_WorkPlans = bll_OA_WorkPlanBll.SelectModelPage(pa, CurrentUser.MemberId, Guid.Empty, Guid.Empty, 3, 17, "", null, null, string.IsNullOrEmpty(this.txtRegTimeStart.Value) ? beginTime : Convert.ToDateTime(this.txtRegTimeStart.Value), string.IsNullOrEmpty(this.txtRegTimeEnd.Value) ? endTime : Convert.ToDateTime(this.txtRegTimeEnd.Value), this.txtPlanPeople.Value.Trim(), -1, 1, this.selEvaluationStatus.Value.ToInt32(), null, this.TxtRewardContent.Value.Trim(), this.txtPlanContent.Value.Trim()); // 创建工作簿 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("审批人1"); headerRow.CreateCell(10).SetCellValue("审批时间1"); headerRow.CreateCell(11).SetCellValue("审批结果1"); headerRow.CreateCell(12).SetCellValue("审批人2"); headerRow.CreateCell(13).SetCellValue("审批时间2"); headerRow.CreateCell(14).SetCellValue("审批结果2"); headerRow.CreateCell(15).SetCellValue("审批人3"); headerRow.CreateCell(16).SetCellValue("审批时间3"); headerRow.CreateCell(17).SetCellValue("审批结果3"); // 添加数据 int rowIndex = 1; foreach (var order in oA_WorkPlans) { IRow row = sheet.CreateRow(rowIndex++); row.CreateCell(0).SetCellValue((rowIndex-1).ToString()); row.CreateCell(1).SetCellValue(order.PlanStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss")); row.CreateCell(2).SetCellValue(order.EvaluationContent); row.CreateCell(3).SetCellValue(order.DepartName); row.CreateCell(4).SetCellValue(order.PlanPeople); row.CreateCell(5).SetCellValue(order.RewardContent); row.CreateCell(6).SetCellValue(order.PlanContent); row.CreateCell(7).SetCellValue(order.PlanMoney.ToString()); row.CreateCell(8).SetCellValue(order.EvaluationStatusName); var oA_WorkPlan_Shenpis = oA_WorkPlan_ShenpiBLL.GetModelByKaipiaoId(order.Keyid.Value).OrderBy(x => x.Keyid).ToList(); foreach (var a_WorkPlan_Shenpi in oA_WorkPlan_Shenpis) { var oA_Staff = oA_StaffBLL.GetModelByMemberId(a_WorkPlan_Shenpi.ApprovalStaffId); if (oA_Staff != null) { a_WorkPlan_Shenpi.ApprovalStaffName = oA_Staff.Name; } } if (oA_WorkPlan_Shenpis.Count > 0) { row.CreateCell(9).SetCellValue(oA_WorkPlan_Shenpis[0].ApprovalStaffName); row.CreateCell(10).SetCellValue(oA_WorkPlan_Shenpis[0].ApprovalTime.Value.ToString("yyyy-MM-dd HH:mm:ss")); row.CreateCell(11).SetCellValue(oA_WorkPlan_Shenpis[0].ApprovalStatusName); } if (oA_WorkPlan_Shenpis.Count > 1) { row.CreateCell(12).SetCellValue(oA_WorkPlan_Shenpis[1].ApprovalStaffName); row.CreateCell(13).SetCellValue(oA_WorkPlan_Shenpis[1].ApprovalTime.Value.ToString("yyyy-MM-dd HH:mm:ss")); row.CreateCell(14).SetCellValue(oA_WorkPlan_Shenpis[1].ApprovalStatusName); } if (oA_WorkPlan_Shenpis.Count > 2) { row.CreateCell(15).SetCellValue(oA_WorkPlan_Shenpis[2].ApprovalStaffName); row.CreateCell(16).SetCellValue(oA_WorkPlan_Shenpis[2].ApprovalTime.Value.ToString("yyyy-MM-dd HH:mm:ss")); row.CreateCell(17).SetCellValue(oA_WorkPlan_Shenpis[2].ApprovalStatusName); } } // 将工作簿写入内存流 using (var ms = new MemoryStream()) { workbook.Write(ms); bt = ms.ToArray(); } } catch (Exception e) { bt = null; // 记录日志 } return bt; } } } CY_ECommercePlatform/CY.WebForm/Pages/work/BaoxiaoFukuanList.aspx.designer.cs
@@ -105,6 +105,15 @@ protected global::System.Web.UI.WebControls.Button btn_Submit; /// <summary> /// Button1 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.WebControls.Button Button1; /// <summary> /// RepClientList 控件。 /// </summary> /// <remarks> CY_ECommercePlatform/CY.WebForm/Pages/work/BaoxiaoReplyAdd.aspx
@@ -40,7 +40,7 @@ 金额: </td> <td> <span id="spanPlanMoney" runat="server"></span> <input id="txtPlanMoney" type="text" class="float req" runat="server" style=" width:180px;" /> <%-- <span id="spanPlanMoney" runat="server"></span>--%> </td> </tr> <tr> @@ -49,7 +49,8 @@ 科目: </td> <td> <span id="spanSubject" runat="server"></span> <select id="selSubject" class="Sreq" runat="server" datatextfield="SubjectName" datavaluefield="Keyid" keepdefaultstyle="true" msg="请选择科目名称" onchange="ChangeThisSubject(this);" > </select> <%-- <span id="spanSubject" runat="server"></span>--%> </td> </tr> <tr> @@ -58,7 +59,7 @@ 摘要: </td> <td> <span id="spanPlanContent" runat="server"></span> <textarea id="txtPlanContent" runat="server" style="width: 390px; height: 50px;" class="req" msg="请输入摘要"></textarea><%-- <span id="spanPlanContent" runat="server"></span>--%> </td> </tr> <tr> CY_ECommercePlatform/CY.WebForm/Pages/work/BaoxiaoReplyAdd.aspx.cs
@@ -14,6 +14,7 @@ using CY.Infrastructure.DESEncrypt; using CY.Infrastructure.Query; using System.Transactions; using CY.BLL.OA; namespace CY.WebForm.Pages.work { @@ -31,6 +32,7 @@ OA_StaffBLL oA_StaffBLL = null; OA_DepartmentBll oA_DepartmentBll = null; public string planDataType = ""; OA_SubjectSetBLL _OA_SubjectSetBLL = null; public BaoxiaoReplyAdd() { oA_WorkReminderBll = new OA_WorkPlanBll(); @@ -42,6 +44,7 @@ oA_WorkPlan_ShenpiBLL = new OA_WorkPlan_shenpiBLL(); oA_StaffBLL = new OA_StaffBLL(); oA_DepartmentBll = new OA_DepartmentBll(); _OA_SubjectSetBLL = new OA_SubjectSetBLL(); } //页面加载 @@ -56,6 +59,11 @@ //数据加载 public void InitData() { //科目名称 this.selSubject.DataSource = _OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "贷"); this.selSubject.DataBind(); // this.selSubject.Items.Insert(0, new ListItem("请选择", "")); OA_WorkPlan m_OA_WorkPlan = oA_WorkReminderBll.GetModelByKeyid(Request["keyid"].ToInt32()); if (m_OA_WorkPlan != null) { @@ -68,10 +76,10 @@ this.spanPlanPeople.InnerText = m_OA_WorkPlan.PlanPeople.ToString(); this.spanPlanMoney.InnerText = m_OA_WorkPlan.PlanMoney.Value.ToString("0.00"); this.txtPlanMoney.Value = m_OA_WorkPlan.PlanMoney.Value.ToString("0.00"); this.spanSubject.InnerText = m_OA_WorkPlan.RewardContent.ToString(); this.spanPlanContent.InnerText = m_OA_WorkPlan.PlanContent.ToString(); this.selSubject.Value = m_OA_WorkPlan.RewardResult; this.txtPlanContent.Value = m_OA_WorkPlan.PlanContent; this.spanHoubufapiaoStatus.InnerText = m_OA_WorkPlan.HoubufapiaoStatusName; var sss = oA_WorkPlan_AttachmentBLL.GetModelByKaipiaoId(Request["keyid"].ToInt32().Value); @@ -124,6 +132,11 @@ if (m_OA_WorkPlan.ApprovalStatus == 1 || m_OA_WorkPlan.ApprovalStatus == 2) { JavaScript.MessageBox("该报销已经审批完成", this); return; } if (m_OA_WorkPlan.PlanMoney< this.txtPlanMoney.Value.ToDecimal2()) { JavaScript.MessageBox("修改后的报销金额不能大于原报销金额", this); return; } var oA_WorkPlan_Shenpis = oA_WorkPlan_ShenpiBLL.GetModelByKaipiaoId(Request["keyid"].ToInt32().Value).ToList(); @@ -185,7 +198,15 @@ } } m_OA_WorkPlan.PlanMoney = this.txtPlanMoney.Value.ToDecimal2(); m_OA_WorkPlan.RewardResult = this.selSubject.Value; m_OA_WorkPlan.PlanContent = this.txtPlanContent.Value; var a_SubjectSet = _OA_SubjectSetBLL.getSingleSubject(this.selSubject.Value.ToInt32()); if (a_SubjectSet != null) { m_OA_WorkPlan.RewardContent = a_SubjectSet.SubjectName; } DateTime nowTime = DateTime.Now; @@ -222,6 +243,10 @@ m_OA_WorkPlan.LastUpdateTime = nowTime; res = oA_WorkReminderBll.UpdateModel(m_OA_WorkPlan); } else { res = oA_WorkReminderBll.UpdateModel(m_OA_WorkPlan); } CY_ECommercePlatform/CY.WebForm/Pages/work/BaoxiaoReplyAdd.aspx.designer.cs
@@ -60,31 +60,31 @@ protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanPlanPeople; /// <summary> /// spanPlanMoney 控件。 /// txtPlanMoney 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanPlanMoney; protected global::System.Web.UI.HtmlControls.HtmlInputText txtPlanMoney; /// <summary> /// spanSubject 控件。 /// selSubject 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanSubject; protected global::System.Web.UI.HtmlControls.HtmlSelect selSubject; /// <summary> /// spanPlanContent 控件。 /// txtPlanContent 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanPlanContent; protected global::System.Web.UI.HtmlControls.HtmlTextArea txtPlanContent; /// <summary> /// RepClientList 控件。 CY_ECommercePlatform/CY.WebForm/Pages/work/BaoxiaoReplyList.aspx
@@ -90,12 +90,12 @@ </td> <td class="ali03"> 批复结果: 审批结果: </td> <td> <select keepdefaultstyle="true" runat="server" id="selApprovalStatus"> <option value="-1">全部</option> <option value="0">未批复</option> <option value="0">未审批</option> <option value="1">批准</option> <option value="2">不批准</option> </select> @@ -138,6 +138,9 @@ <th width="130" style="text-align: center"> 申请日期 </th> <th width="130" style="text-align: center"> 报销单号 </th> <th width="70" style="text-align: center"> 部门 </th> @@ -160,7 +163,7 @@ 附件 </th> <th width="150" style="text-align: center"> 报销状态 审批状态 </th> <th width="250" style="text-align: center"> 操作 @@ -177,6 +180,9 @@ </td> <td style="text-align: center"> <%#Eval("PlanStartTime", "{0:yyyy-MM-dd}")%> </td> <td style="text-align: center"> <%#Eval("EvaluationContent")%> </td> <td style="text-align: center"> <%#Eval("DepartName")%> @@ -214,7 +220,7 @@ </asp:Repeater> <tr class="StatisticsMoney"> <td colspan="7" class="ali03"> <td colspan="8" class="ali03"> 合计: </td> <td colspan="5" class="ali01"> CY_ECommercePlatform/CY.WebForm/Pages/work/BaoxiaoReplyList.aspx.cs
@@ -107,7 +107,7 @@ DateTime? endTime = null; pa.PageSize = UCPager1.AspNetPager.PageSize; pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex; var oA_WorkPlans = bll_OA_WorkPlanBll.SelectModelPage(pa, CurrentUser.MemberId, Guid.Empty, Guid.Empty, 3, 17, "", null, null, string.IsNullOrEmpty(this.txtRegTimeStart.Value) ? beginTime : Convert.ToDateTime(this.txtRegTimeStart.Value), string.IsNullOrEmpty(this.txtRegTimeEnd.Value) ? endTime : Convert.ToDateTime(this.txtRegTimeEnd.Value), this.txtPlanPeople.Value.Trim(), -1, this.selApprovalStatus.Value.ToInt32(), null, null,this.TxtRewardContent.Value.Trim(), this.txtPlanContent.Value.Trim()); var oA_WorkPlans = bll_OA_WorkPlanBll.SelectModelPage(pa, CurrentUser.MemberId, Guid.Empty, Guid.Empty, 3, 17, "", null, null, string.IsNullOrEmpty(this.txtRegTimeStart.Value) ? beginTime : Convert.ToDateTime(this.txtRegTimeStart.Value), string.IsNullOrEmpty(this.txtRegTimeEnd.Value) ? endTime : Convert.ToDateTime(this.txtRegTimeEnd.Value), this.txtPlanPeople.Value.Trim(), -1, this.selApprovalStatus.Value.ToInt32(), null, null,this.TxtRewardContent.Value.Trim(), this.txtPlanContent.Value.Trim(),"3"); var oA_Staff = oA_StaffBLL.GetModelByMemberId(CurrentUser.TrueMemberId); foreach (var oA_WorkPlan in oA_WorkPlans) CY_ECommercePlatform/CY.WebForm/Pages/work/MyBaoxiaoAdd.aspx
@@ -270,7 +270,11 @@ <tr> <td colspan="2" style="text-align: center;"> <asp:Button ID="btn_submit" runat="server" OnClick="btn_submit_form" Text="提交" /> <asp:Button ID="Button1" runat="server" OnClick="btn_baocun_form" Text="保存" /> <asp:Button ID="btn_submit" runat="server" OnClick="btn_submit_form" Text="提交" /> <asp:Button ID="Button2" runat="server" OnClick="btn_jixu_form" Text="继续报销" /> </td> </tr> </table> CY_ECommercePlatform/CY.WebForm/Pages/work/MyBaoxiaoAdd.aspx.cs
@@ -15,6 +15,8 @@ using CY.Infrastructure.Query; using CY.BLL.OA; using System.Transactions; using System.Net.Http; using System.Web.Script.Serialization; namespace CY.WebForm.Pages.work { @@ -32,6 +34,7 @@ OA_SubjectSetBLL _OA_SubjectSetBLL = null; OA_WorkPlan_attachmentBLL oA_WorkPlan_AttachmentBLL = null; OA_WorkPlan_shenpiBLL oA_WorkPlan_ShenpiBLL = null; string url = "https://yocaisim.51zhengcai.com/api/CYOSSetting/GetShowID";// "http://192.168.0.36:5000/api/CYOSSetting/GetShowID"; public string reado = ""; public MyBaoxiaoAdd() { @@ -61,7 +64,7 @@ //科目名称 this.selSubject.DataSource = _OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "贷"); this.selSubject.DataBind(); this.selSubject.Items.Insert(0, new ListItem("请选择", "")); // this.selSubject.Items.Insert(0, new ListItem("请选择", "")); InitData(); @@ -73,17 +76,27 @@ { if (Request["keyid"].ToInt32() > 0) { var oA_WorkPlan_Shenpis = oA_WorkPlan_ShenpiBLL.GetModelByKaipiaoId(Request["keyid"].ToInt32().Value).ToList(); if (oA_WorkPlan_Shenpis.Count > 0) // var oA_WorkPlan_Shenpis = oA_WorkPlan_ShenpiBLL.GetModelByKaipiaoId(Request["keyid"].ToInt32().Value).ToList(); OA_WorkPlan m_OA_WorkPlan = oA_WorkReminderBll.GetModelByKeyid(Request["keyid"].ToInt32()); if (m_OA_WorkPlan.ApprovalStatus != 3 && string.IsNullOrEmpty(Request["zaici"]) ) { txtPlanMoney.Disabled = true; selSubject.Disabled = true; txtPlanContent.Disabled = true; selHoubufapiaoStatus.Disabled = true; this.Button1.Enabled = false; this.Button2.Enabled = false; } OA_WorkPlan m_OA_WorkPlan = oA_WorkReminderBll.GetModelByKeyid(Request["keyid"].ToInt32()); if (!string.IsNullOrEmpty(Request["zaici"])) { this.Button1.Enabled = false; this.Button2.Enabled = false; this.btn_submit.Text = "再次提交"; } if (m_OA_WorkPlan != null) { @@ -130,7 +143,12 @@ DateTime nowTime = DateTime.Now; OA_WorkPlan m_OA_WorkPlan = oA_WorkReminderBll.GetModelByKeyid(Request["keyid"].ToInt32()); OA_WorkPlan m_OA_WorkPlan = null; if (string.IsNullOrEmpty(Request["zaici"])) { m_OA_WorkPlan = oA_WorkReminderBll.GetModelByKeyid(Request["keyid"].ToInt32()); ; } if (m_OA_WorkPlan == null) { m_OA_WorkPlan = new OA_WorkPlan(); @@ -138,6 +156,277 @@ m_OA_WorkPlan.ApprovalStaffId = Guid.Empty; m_OA_WorkPlan.ApprovalStaffName = ""; m_OA_WorkPlan.ApprovalStatus = 0; m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.EvaluationStaff = ""; m_OA_WorkPlan.EvaluationStaffId = Guid.Empty; m_OA_WorkPlan.EvaluationStatus = 2; m_OA_WorkPlan.EvaluationTime = nowTime; m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.RewardType = 1; m_OA_WorkPlan.PlanStartTime = nowTime; m_OA_WorkPlan.PlanStatus = 1; m_OA_WorkPlan.SentStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.MemberId = CurrentUser.MemberId; OA_Staff m_OA_Staff = oA_StaffBLL.GetModelByMemberId(CurrentUser.TrueMemberId); if (m_OA_Staff != null) m_OA_WorkPlan.DepartId = m_OA_Staff.DepartmentId; else m_OA_WorkPlan.DepartId = 0; m_OA_WorkPlan.PlanPeople = CurrentUser.TrueName; m_OA_WorkPlan.ReciveStaffId = CurrentUser.TrueMemberId; } else { if (m_OA_WorkPlan.ApprovalStatus == 3) { m_OA_WorkPlan.ApprovalStatus = 0; } } if (string.IsNullOrEmpty(m_OA_WorkPlan.EvaluationContent)) { using (var client = new HttpClient()) { HttpResponseMessage response = client.GetAsync(url).Result; response.EnsureSuccessStatusCode(); string responseBody = response.Content.ReadAsStringAsync().Result; JavaScriptSerializer serializer = new JavaScriptSerializer(); var person = serializer.Deserialize<Responsebody>(responseBody); if (person != null && person.code == 1) { m_OA_WorkPlan.EvaluationContent = person.data; } else { JavaScript.MessageBox("生成报销单号失败", this); return; } } } //m_OA_WorkPlan.EvaluationContent = ""; m_OA_WorkPlan.RewardResult = this.selSubject.Value; var a_SubjectSet = _OA_SubjectSetBLL.getSingleSubject(this.selSubject.Value.ToInt32()); if (a_SubjectSet != null) { m_OA_WorkPlan.RewardContent = a_SubjectSet.SubjectName; } m_OA_WorkPlan.PlanComplany = ""; m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.HoubufapiaoStatus = this.selHoubufapiaoStatus.Value.ToInt32(); m_OA_WorkPlan.PlanContent = this.txtPlanContent.Value.Trim(); m_OA_WorkPlan.PlanDataType = 17; m_OA_WorkPlan.PlanMoney = this.txtPlanMoney.Value.Trim().ToDecimal2() ?? 0; m_OA_WorkPlan.PlanRemark = ""; m_OA_WorkPlan.PlanRunTime = DateTime.Now; m_OA_WorkPlan.PlanTitle = ""; m_OA_WorkPlan.PlanType = 3; m_OA_WorkPlan.LastUpdateTime = nowTime; if (Request["keyid"].ToInt32() > 0 && string.IsNullOrEmpty(Request["zaici"])) { bool res = true; var oA_WorkPlan_Shenpis = oA_WorkPlan_ShenpiBLL.GetModelByKaipiaoId(Request["keyid"].ToInt32().Value).ToList(); if (oA_WorkPlan_Shenpis.Count == 0) { res = oA_WorkReminderBll.UpdateModel(m_OA_WorkPlan); } if (res) { //var HideKeyidFapiao = Request["HideKeyidFapiao"].Split(','); var HideAttachmentFapiao = Request["HideAttachmentFapiao"].Split(','); var HideKeyidFujian = Request["HideKeyidFujian"].Split(','); var HideAttachmentFujian = Request["HideAttachmentFujian"].Split(','); //需要删除的附件 var oA_WorkPlan_Attachments = oA_WorkPlan_AttachmentBLL.GetModelByKaipiaoId(m_OA_WorkPlan.Keyid.Value); List<int> HideKeyidFujianid = new List<int>(); for (int i = 0; i < HideKeyidFapiao.Length; i++) { if (!string.IsNullOrEmpty(HideKeyidFapiao[i]) && HideKeyidFapiao[i].ToInt32() != 0) { HideKeyidFujianid.Add(HideKeyidFapiao[i].ToInt32().Value); } } for (int i = 0; i < HideKeyidFujian.Length; i++) { if (!string.IsNullOrEmpty(HideKeyidFujian[i]) && HideKeyidFujian[i].ToInt32() != 0) { HideKeyidFujianid.Add(HideKeyidFujian[i].ToInt32().Value); } } var oA_WorkPlan_Attachments1 = oA_WorkPlan_Attachments.Where(x => !HideKeyidFujianid.Contains(x.Keyid)).ToList(); foreach(var oa_WorkPlan_Attachment in oA_WorkPlan_Attachments1) { res = oA_WorkPlan_AttachmentBLL.DeleteModel(oa_WorkPlan_Attachment); } for (int i = 0; i < HideKeyidFapiao.Length; i++) { if (string.IsNullOrEmpty(HideKeyidFapiao[i])) { var a_WorkPlan_Attachment = new OA_WorkPlan_attachment(); a_WorkPlan_Attachment.OA_WorkPlanId = m_OA_WorkPlan.Keyid; a_WorkPlan_Attachment.AttachmentType = 1; a_WorkPlan_Attachment.PlanAttachment = HideAttachmentFapiao[i]; a_WorkPlan_Attachment.CreateTime = DateTime.Now; a_WorkPlan_Attachment.Operator = CurrentUser.TrueName; var sss = oA_WorkPlan_AttachmentBLL.InsertModel(a_WorkPlan_Attachment); } else { continue; } } for (int i = 0; i < HideKeyidFujian.Length; i++) { if (string.IsNullOrEmpty(HideKeyidFujian[i])) { var a_WorkPlan_Attachment = new OA_WorkPlan_attachment(); a_WorkPlan_Attachment.OA_WorkPlanId = m_OA_WorkPlan.Keyid; a_WorkPlan_Attachment.AttachmentType = 2; a_WorkPlan_Attachment.PlanAttachment = HideAttachmentFujian[i]; a_WorkPlan_Attachment.CreateTime = DateTime.Now; a_WorkPlan_Attachment.Operator = CurrentUser.TrueName; var sss = oA_WorkPlan_AttachmentBLL.InsertModel(a_WorkPlan_Attachment); } else { continue; } } scope.Complete(); JavaScript.MessageBox("更新成功", this, true, true); } else JavaScript.MessageBox("操作失败", this); } else { var aaaa = oA_WorkReminderBll.InserModelAndGetId(m_OA_WorkPlan); m_OA_WorkPlan.Keyid = aaaa; if (aaaa > 0) { //var HideKeyidFapiao = Request["HideKeyidFapiao"].Split(','); var HideAttachmentFapiao = Request["HideAttachmentFapiao"].Split(','); var HideKeyidFujian = Request["HideKeyidFujian"].Split(','); var HideAttachmentFujian = Request["HideAttachmentFujian"].Split(','); for (int i = 0; i < HideKeyidFapiao.Length; i++) { if (HideKeyidFapiao[i]!="0") { var a_WorkPlan_Attachment = new OA_WorkPlan_attachment(); a_WorkPlan_Attachment.OA_WorkPlanId = m_OA_WorkPlan.Keyid; a_WorkPlan_Attachment.AttachmentType = 1; a_WorkPlan_Attachment.PlanAttachment = HideAttachmentFapiao[i]; a_WorkPlan_Attachment.CreateTime = DateTime.Now; a_WorkPlan_Attachment.Operator = CurrentUser.TrueName; var sss = oA_WorkPlan_AttachmentBLL.InsertModel(a_WorkPlan_Attachment); } else { continue; } } for (int i = 0; i < HideKeyidFujian.Length; i++) { if ( HideKeyidFujian[i] != "0") { var a_WorkPlan_Attachment = new OA_WorkPlan_attachment(); a_WorkPlan_Attachment.OA_WorkPlanId = m_OA_WorkPlan.Keyid; a_WorkPlan_Attachment.AttachmentType = 2; a_WorkPlan_Attachment.PlanAttachment = HideAttachmentFujian[i]; a_WorkPlan_Attachment.CreateTime = DateTime.Now; a_WorkPlan_Attachment.Operator = CurrentUser.TrueName; var sss = oA_WorkPlan_AttachmentBLL.InsertModel(a_WorkPlan_Attachment); } else { continue; } } scope.Complete(); JavaScript.MessageBox("新增成功", this, true, true); } else JavaScript.MessageBox("操作失败", this); } } catch (Exception ex) { PAGEHandleException(ex); JavaScript.MessageBox("操作失败", this); } finally { // 释放资源 scope.Dispose(); } } } //表单保存 protected void btn_baocun_form(object sender, EventArgs e) { var HideKeyidFapiao = Request["HideKeyidFapiao"].Split(','); //if (HideKeyidFapiao.Length <= 1 && this.selHoubufapiaoStatus.Value == "1") //{ // JavaScript.MessageBox("选择有发票必须上传发票", this); // return; //} using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted, Timeout = TransactionManager.MaximumTimeout } ) ) { try { DateTime nowTime = DateTime.Now; OA_WorkPlan m_OA_WorkPlan = oA_WorkReminderBll.GetModelByKeyid(Request["keyid"].ToInt32()); if (m_OA_WorkPlan == null) { m_OA_WorkPlan = new OA_WorkPlan(); } else { } m_OA_WorkPlan.ApprovalContent = ""; m_OA_WorkPlan.ApprovalStaffId = Guid.Empty; m_OA_WorkPlan.ApprovalStaffName = ""; m_OA_WorkPlan.ApprovalStatus = 3; m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.EvaluationContent = ""; m_OA_WorkPlan.EvaluationStaff = ""; @@ -161,11 +450,6 @@ m_OA_WorkPlan.PlanPeople = CurrentUser.TrueName; m_OA_WorkPlan.ReciveStaffId = CurrentUser.TrueMemberId; } else { } m_OA_WorkPlan.RewardResult = this.selSubject.Value; var a_SubjectSet = _OA_SubjectSetBLL.getSingleSubject(this.selSubject.Value.ToInt32()); if (a_SubjectSet != null) @@ -343,5 +627,247 @@ } } //表单保存 protected void btn_jixu_form(object sender, EventArgs e) { var HideKeyidFapiao = Request["HideKeyidFapiao"].Split(','); //if (HideKeyidFapiao.Length <= 1 && this.selHoubufapiaoStatus.Value == "1") //{ // JavaScript.MessageBox("选择有发票必须上传发票", this); // return; //} using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted, Timeout = TransactionManager.MaximumTimeout } ) ) { try { DateTime nowTime = DateTime.Now; OA_WorkPlan m_OA_WorkPlan = oA_WorkReminderBll.GetModelByKeyid(Request["keyid"].ToInt32()); if (m_OA_WorkPlan == null) { m_OA_WorkPlan = new OA_WorkPlan(); } else { } m_OA_WorkPlan.ApprovalContent = ""; m_OA_WorkPlan.ApprovalStaffId = Guid.Empty; m_OA_WorkPlan.ApprovalStaffName = ""; m_OA_WorkPlan.ApprovalStatus = 3; m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.EvaluationContent = ""; m_OA_WorkPlan.EvaluationStaff = ""; m_OA_WorkPlan.EvaluationStaffId = Guid.Empty; m_OA_WorkPlan.EvaluationStatus = 2; m_OA_WorkPlan.EvaluationTime = nowTime; m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.RewardType = 1; m_OA_WorkPlan.PlanStartTime = nowTime; m_OA_WorkPlan.PlanStatus = 1; m_OA_WorkPlan.SentStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.MemberId = CurrentUser.MemberId; OA_Staff m_OA_Staff = oA_StaffBLL.GetModelByMemberId(CurrentUser.TrueMemberId); if (m_OA_Staff != null) m_OA_WorkPlan.DepartId = m_OA_Staff.DepartmentId; else m_OA_WorkPlan.DepartId = 0; m_OA_WorkPlan.PlanPeople = CurrentUser.TrueName; m_OA_WorkPlan.ReciveStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.RewardResult = this.selSubject.Value; var a_SubjectSet = _OA_SubjectSetBLL.getSingleSubject(this.selSubject.Value.ToInt32()); if (a_SubjectSet != null) { m_OA_WorkPlan.RewardContent = a_SubjectSet.SubjectName; } m_OA_WorkPlan.PlanComplany = ""; m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.HoubufapiaoStatus = this.selHoubufapiaoStatus.Value.ToInt32(); m_OA_WorkPlan.PlanContent = this.txtPlanContent.Value.Trim(); m_OA_WorkPlan.PlanDataType = 17; m_OA_WorkPlan.PlanMoney = this.txtPlanMoney.Value.Trim().ToDecimal2() ?? 0; m_OA_WorkPlan.PlanRemark = ""; m_OA_WorkPlan.PlanRunTime = DateTime.Now; m_OA_WorkPlan.PlanTitle = ""; m_OA_WorkPlan.PlanType = 3; m_OA_WorkPlan.LastUpdateTime = nowTime; if (Request["keyid"].ToInt32() > 0) { bool res = true; var oA_WorkPlan_Shenpis = oA_WorkPlan_ShenpiBLL.GetModelByKaipiaoId(Request["keyid"].ToInt32().Value).ToList(); if (oA_WorkPlan_Shenpis.Count == 0) { res = oA_WorkReminderBll.UpdateModel(m_OA_WorkPlan); } if (res) { //var HideKeyidFapiao = Request["HideKeyidFapiao"].Split(','); var HideAttachmentFapiao = Request["HideAttachmentFapiao"].Split(','); var HideKeyidFujian = Request["HideKeyidFujian"].Split(','); var HideAttachmentFujian = Request["HideAttachmentFujian"].Split(','); //需要删除的附件 var oA_WorkPlan_Attachments = oA_WorkPlan_AttachmentBLL.GetModelByKaipiaoId(m_OA_WorkPlan.Keyid.Value); List<int> HideKeyidFujianid = new List<int>(); for (int i = 0; i < HideKeyidFapiao.Length; i++) { if (!string.IsNullOrEmpty(HideKeyidFapiao[i]) && HideKeyidFapiao[i].ToInt32() != 0) { HideKeyidFujianid.Add(HideKeyidFapiao[i].ToInt32().Value); } } for (int i = 0; i < HideKeyidFujian.Length; i++) { if (!string.IsNullOrEmpty(HideKeyidFujian[i]) && HideKeyidFujian[i].ToInt32() != 0) { HideKeyidFujianid.Add(HideKeyidFujian[i].ToInt32().Value); } } var oA_WorkPlan_Attachments1 = oA_WorkPlan_Attachments.Where(x => !HideKeyidFujianid.Contains(x.Keyid)).ToList(); foreach (var oa_WorkPlan_Attachment in oA_WorkPlan_Attachments1) { res = oA_WorkPlan_AttachmentBLL.DeleteModel(oa_WorkPlan_Attachment); } for (int i = 0; i < HideKeyidFapiao.Length; i++) { if (string.IsNullOrEmpty(HideKeyidFapiao[i])) { var a_WorkPlan_Attachment = new OA_WorkPlan_attachment(); a_WorkPlan_Attachment.OA_WorkPlanId = m_OA_WorkPlan.Keyid; a_WorkPlan_Attachment.AttachmentType = 1; a_WorkPlan_Attachment.PlanAttachment = HideAttachmentFapiao[i]; a_WorkPlan_Attachment.CreateTime = DateTime.Now; a_WorkPlan_Attachment.Operator = CurrentUser.TrueName; var sss = oA_WorkPlan_AttachmentBLL.InsertModel(a_WorkPlan_Attachment); } else { continue; } } for (int i = 0; i < HideKeyidFujian.Length; i++) { if (string.IsNullOrEmpty(HideKeyidFujian[i])) { var a_WorkPlan_Attachment = new OA_WorkPlan_attachment(); a_WorkPlan_Attachment.OA_WorkPlanId = m_OA_WorkPlan.Keyid; a_WorkPlan_Attachment.AttachmentType = 2; a_WorkPlan_Attachment.PlanAttachment = HideAttachmentFujian[i]; a_WorkPlan_Attachment.CreateTime = DateTime.Now; a_WorkPlan_Attachment.Operator = CurrentUser.TrueName; var sss = oA_WorkPlan_AttachmentBLL.InsertModel(a_WorkPlan_Attachment); } else { continue; } } scope.Complete(); JavaScript.MessageBox("更新成功", this); Response.Redirect("/Pages/work/MyBaoxiaoAdd.aspx"); } else JavaScript.MessageBox("操作失败", this); } else { var aaaa = oA_WorkReminderBll.InserModelAndGetId(m_OA_WorkPlan); m_OA_WorkPlan.Keyid = aaaa; if (aaaa > 0) { //var HideKeyidFapiao = Request["HideKeyidFapiao"].Split(','); var HideAttachmentFapiao = Request["HideAttachmentFapiao"].Split(','); var HideKeyidFujian = Request["HideKeyidFujian"].Split(','); var HideAttachmentFujian = Request["HideAttachmentFujian"].Split(','); for (int i = 0; i < HideKeyidFapiao.Length; i++) { if (string.IsNullOrEmpty(HideKeyidFapiao[i])) { var a_WorkPlan_Attachment = new OA_WorkPlan_attachment(); a_WorkPlan_Attachment.OA_WorkPlanId = m_OA_WorkPlan.Keyid; a_WorkPlan_Attachment.AttachmentType = 1; a_WorkPlan_Attachment.PlanAttachment = HideAttachmentFapiao[i]; a_WorkPlan_Attachment.CreateTime = DateTime.Now; a_WorkPlan_Attachment.Operator = CurrentUser.TrueName; var sss = oA_WorkPlan_AttachmentBLL.InsertModel(a_WorkPlan_Attachment); } else { continue; } } for (int i = 0; i < HideKeyidFujian.Length; i++) { if (string.IsNullOrEmpty(HideKeyidFujian[i])) { var a_WorkPlan_Attachment = new OA_WorkPlan_attachment(); a_WorkPlan_Attachment.OA_WorkPlanId = m_OA_WorkPlan.Keyid; a_WorkPlan_Attachment.AttachmentType = 2; a_WorkPlan_Attachment.PlanAttachment = HideAttachmentFujian[i]; a_WorkPlan_Attachment.CreateTime = DateTime.Now; a_WorkPlan_Attachment.Operator = CurrentUser.TrueName; var sss = oA_WorkPlan_AttachmentBLL.InsertModel(a_WorkPlan_Attachment); } else { continue; } } scope.Complete(); JavaScript.MessageBox("新增成功", this); Response.Redirect("/Pages/work/MyBaoxiaoAdd.aspx"); } else JavaScript.MessageBox("操作失败", this); } } catch (Exception ex) { PAGEHandleException(ex); JavaScript.MessageBox("操作失败", this); } finally { // 释放资源 scope.Dispose(); } } } } } CY_ECommercePlatform/CY.WebForm/Pages/work/MyBaoxiaoAdd.aspx.designer.cs
@@ -132,6 +132,15 @@ protected global::System.Web.UI.HtmlControls.HtmlSelect selHoubufapiaoStatus; /// <summary> /// Button1 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.WebControls.Button Button1; /// <summary> /// btn_submit 控件。 /// </summary> /// <remarks> @@ -139,5 +148,14 @@ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.WebControls.Button btn_submit; /// <summary> /// Button2 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.WebControls.Button Button2; } } CY_ECommercePlatform/CY.WebForm/Pages/work/MyBaoxiaoList.aspx
@@ -21,6 +21,11 @@ top.Dialog.open({ URL: "/Pages/work/MyBaoxiaoAdd.aspx?keyid=" + keyid, Title: "修改报销", Width: 550, Height: 600 }); } //再次提交 function onZaiciEdit(keyid) { top.Dialog.open({ URL: "/Pages/work/MyBaoxiaoAdd.aspx?keyid=" + keyid + "&&zaici=zaici", Title: "再次提交", Width: 550, Height: 600 }); } //删除 function onDele(keyid) { top.Dialog.confirm("确定要删除该记录吗?", function () { @@ -84,14 +89,26 @@ </td> <td class="ali03"> 批复结果: 审批结果: </td> <td> <select keepdefaultstyle="true" runat="server" id="selApprovalStatus"> <option value="-1">全部</option> <option value="0">未批复</option> <option value="3">未提交</option> <option value="0">未审批</option> <option value="1">批准</option> <option value="2">不批准</option> </select> </td> <td class="ali03"> 付款状态: </td> <td> <select keepdefaultstyle="true" runat="server" id="selEvaluationStatus"> <option value="-1">全部</option> <option value="1">已付款</option> <option value="2">未付款</option> </select> </td> <td> @@ -132,6 +149,9 @@ <th width="130" style="text-align: center"> 申请日期 </th> <th width="130" style="text-align: center"> 报销单号 </th> <th width="70" style="text-align: center"> 科目 </th> @@ -148,9 +168,12 @@ 附件 </th> <th width="150" style="text-align: center"> 报销状态 审批状态 </th> <th width="150" style="text-align: center"> 付款状态 </th> <th width="200" style="text-align: center"> 操作 </th> </tr> @@ -158,13 +181,16 @@ <ItemTemplate> <tr> <td> <input type="checkbox" value='<%#Eval("Keyid")%>' class='<%#(Eval("Nengfoushanchu").ToString()=="1" )?"AlreadyReply":""%>' /> <input type="checkbox" value='<%#Eval("Keyid")%>' /> </td> <td style="text-align: center"> <%#Container.ItemIndex + 1+ this.UCPager1.PageSize * (this.UCPager1.PageIndex - 1)%> </td> <td style="text-align: center"> <%#Eval("PlanStartTime", "{0:yyyy-MM-dd}")%> </td> <td style="text-align: center"> <%#Eval("EvaluationContent")%> </td> <td style="text-align: center"> <%#Eval("RewardContent")%> @@ -184,10 +210,15 @@ <td style="text-align: center"> <%#Eval("ApprovalStatusName")%> </td> <td style="text-align: center"> <%#Eval("EvaluationStatusName")%> </td> <td class="Operate " style="text-align: center"> <span menu_member_case_id="case_PlanView" menu_member_case_name="查看" onclick="onView('<%#Eval("Keyid")%>')">查看</span> <span menu_member_case_id="case_PlanEdit" menu_member_case_name="修改" onclick="onEdit('<%#Eval("Keyid")%>')" class='<%#(Eval("Nengfoushenpi").ToString()=="1")?"AlreadyReply":""%>'>修改</span> <span menu_member_case_id="case_PlanDele" menu_member_case_name="删除" onclick="onDele('<%#Eval("Keyid")%>')" class='<%#(Eval("Nengfoushanchu").ToString()=="1" )?"AlreadyReply":""%>'>删除</span> <span menu_member_case_id="case_ZaiciEdit" menu_member_case_name="再次提交" onclick="onZaiciEdit('<%#Eval("Keyid")%>')" class='<%#(Eval("ApprovalStatus").ToString()!="2")?"AlreadyReply":""%>'>再次提交</span> </td> </tr> </ItemTemplate> @@ -196,7 +227,7 @@ </asp:Repeater> <tr class="StatisticsMoney"> <td colspan="5" class="ali03"> <td colspan="6" class="ali03"> 合计: </td> <td colspan="5" class="ali01"> CY_ECommercePlatform/CY.WebForm/Pages/work/MyBaoxiaoList.aspx.cs
@@ -40,14 +40,15 @@ } if (Request["delete"] != null) { var oA_WorkPlan_Shenpis = oA_WorkPlan_ShenpiBLL.GetModelByKaipiaoId(Request["delete"].ToInt32().Value).ToList(); if (oA_WorkPlan_Shenpis.Count > 0 ) //var oA_WorkPlan_Shenpis = oA_WorkPlan_ShenpiBLL.GetModelByKaipiaoId(Request["delete"].ToInt32().Value).ToList(); OA_WorkPlan model = bll_OA_WorkPlanBll.GetModelByKeyid(Request["delete"].ToInt32()); if (model.ApprovalStatus !=4 ) { JavaScript.MessageBox("已有审批信息,不能删除", this); JavaScript.MessageBox("已提交信息,不能删除", this); return; } OA_WorkPlan model = bll_OA_WorkPlanBll.GetModelByKeyid(Request["delete"].ToInt32()); if (model != null && model.Keyid != null) { bll_OA_WorkPlanBll.DeleteModel(model, CurrentUser.TrueName); @@ -110,7 +111,7 @@ DateTime? endTime = null; pa.PageSize = UCPager1.AspNetPager.PageSize; pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex; var oA_WorkPlans = bll_OA_WorkPlanBll.SelectModelPage(pa, CurrentUser.MemberId, Guid.Empty, CurrentUser.TrueMemberId, 3, 17, "", null, null, string.IsNullOrEmpty(this.txtRegTimeStart.Value) ? beginTime : Convert.ToDateTime(this.txtRegTimeStart.Value), string.IsNullOrEmpty(this.txtRegTimeEnd.Value) ? endTime : Convert.ToDateTime(this.txtRegTimeEnd.Value), "", -1, this.selApprovalStatus.Value.ToInt32(), null, null,this.TxtRewardContent.Value.Trim(), this.txtPlanContent.Value.Trim()); var oA_WorkPlans = bll_OA_WorkPlanBll.SelectModelPage(pa, CurrentUser.MemberId, Guid.Empty, CurrentUser.TrueMemberId, 3, 17, "", null, null, string.IsNullOrEmpty(this.txtRegTimeStart.Value) ? beginTime : Convert.ToDateTime(this.txtRegTimeStart.Value), string.IsNullOrEmpty(this.txtRegTimeEnd.Value) ? endTime : Convert.ToDateTime(this.txtRegTimeEnd.Value), "", -1, this.selApprovalStatus.Value.ToInt32(), this.selEvaluationStatus.Value.ToInt32(), null,this.TxtRewardContent.Value.Trim(), this.txtPlanContent.Value.Trim()); foreach (var oA_WorkPlan in oA_WorkPlans) { var sss = oA_WorkPlan_AttachmentBLL.GetModelByKaipiaoId(oA_WorkPlan.Keyid.Value); @@ -146,23 +147,23 @@ { oA_WorkPlan.Nengfoushenpi = 1; } if( oA_WorkPlan.ApprovalStatus == 1 && oA_WorkPlan.HoubufapiaoStatus != 2) if((oA_WorkPlan.ApprovalStatus == 0 || oA_WorkPlan.ApprovalStatus == 1) && oA_WorkPlan.HoubufapiaoStatus != 2) { oA_WorkPlan.Nengfoushenpi = 1; } var oA_WorkPlan_Shenpis = oA_WorkPlan_ShenpiBLL.GetModelByKaipiaoId(oA_WorkPlan.Keyid.Value).ToList(); if (oA_WorkPlan_Shenpis.Count> 0 && oA_WorkPlan.HoubufapiaoStatus != 2) { oA_WorkPlan.Nengfoushenpi = 1; } if (oA_WorkPlan.ApprovalStatus == 2 || oA_WorkPlan.ApprovalStatus == 1) { oA_WorkPlan.Nengfoushanchu = 1; } if (oA_WorkPlan_Shenpis.Count > 0 ) { oA_WorkPlan.Nengfoushanchu = 1; } //var oA_WorkPlan_Shenpis = oA_WorkPlan_ShenpiBLL.GetModelByKaipiaoId(oA_WorkPlan.Keyid.Value).ToList(); //if (oA_WorkPlan_Shenpis.Count> 0 && oA_WorkPlan.HoubufapiaoStatus != 2) //{ // oA_WorkPlan.Nengfoushenpi = 1; //} //if (oA_WorkPlan.ApprovalStatus == 2 || oA_WorkPlan.ApprovalStatus == 1) //{ // oA_WorkPlan.Nengfoushanchu = 1; //} //if (oA_WorkPlan_Shenpis.Count > 0 ) //{ // oA_WorkPlan.Nengfoushanchu = 1; //} CY_ECommercePlatform/CY.WebForm/Pages/work/MyBaoxiaoList.aspx.designer.cs
@@ -87,6 +87,15 @@ protected global::System.Web.UI.HtmlControls.HtmlSelect selApprovalStatus; /// <summary> /// selEvaluationStatus 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlSelect selEvaluationStatus; /// <summary> /// btn_Submit 控件。 /// </summary> /// <remarks>