@@ -0,0 +1,187 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_ServiceController : MvcControllerBase | |||||
{ | |||||
private Purchase_ServiceIBLL Purchase_ServiceIBLL = new Purchase_ServiceBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单查看页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormView() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取数据字典明显根据分类编号 | |||||
/// </summary> | |||||
/// <param name="itemCode">分类编号</param> | |||||
/// <param name="keyword">查询条件</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetDetailList(string keyword) | |||||
{ | |||||
var data = Purchase_ServiceIBLL.GetDataList( keyword); | |||||
return JsonResult(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = Purchase_ServiceIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var Purchase_ServiceData = Purchase_ServiceIBLL.GetPurchase_ServiceEntity( keyValue ); | |||||
var Purchase_Service_DetailsData = Purchase_ServiceIBLL.GetPurchase_Service_DetailsList( Purchase_ServiceData.Id ); | |||||
var jsonData = new { | |||||
Purchase_Service = Purchase_ServiceData, | |||||
Purchase_Service_Details = Purchase_Service_DetailsData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormDetailData(string keyValue) | |||||
{ | |||||
var Purchase_Service_DetailsData = Purchase_ServiceIBLL.GetPurchase_Service_DetailsList(keyValue); | |||||
return Success(Purchase_Service_DetailsData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormDataByProcessId(string processId) | |||||
{ | |||||
var ArrangeLessonTermAttemperData = Purchase_ServiceIBLL.GetEntityByProcessId(processId); | |||||
var Purchase_Service_DetailsData = Purchase_ServiceIBLL.GetPurchase_Service_DetailsList(ArrangeLessonTermAttemperData.Id); | |||||
var jsonData = new | |||||
{ | |||||
Purchase_Service = ArrangeLessonTermAttemperData, | |||||
Purchase_Service_Details = Purchase_Service_DetailsData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
Purchase_ServiceIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity, string strPurchase_Service_DetailsList) | |||||
{ | |||||
Purchase_ServiceEntity entity = strEntity.ToObject<Purchase_ServiceEntity>(); | |||||
List<Purchase_Service_DetailsEntity> Purchase_Service_DetailsList = strPurchase_Service_DetailsList.ToObject<List<Purchase_Service_DetailsEntity>>(); | |||||
Purchase_ServiceIBLL.SaveEntity(keyValue,entity,Purchase_Service_DetailsList); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
/// <returns></returns> | |||||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
Purchase_ServiceIBLL.ModifyStatus(keyValue, status, processId); | |||||
return Success("提交成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,172 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Service_ApplyController : MvcControllerBase | |||||
{ | |||||
private Purchase_Service_ApplyIBLL Purchase_Service_ApplyIBLL = new Purchase_Service_ApplyBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 查看页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormView() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 查找带回页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FindBack() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = Purchase_Service_ApplyIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var Purchase_Service_applyData = Purchase_Service_ApplyIBLL.GetPurchase_Service_ApplyEntity( keyValue ); | |||||
var Purchase_Service_applydetailsData = Purchase_Service_ApplyIBLL.GetPurchase_Service_ApplydetailsList( Purchase_Service_applyData.Id ); | |||||
//var Purchase_ServiceData = Purchase_Service_ApplyIBLL.GetPurchase_ServiceEntity( Purchase_Service_applydetailsData.purchaseid ); | |||||
var jsonData = new { | |||||
Purchase_Service_apply = Purchase_Service_applyData, | |||||
Purchase_Service_applydetails = Purchase_Service_applydetailsData, | |||||
//Purchase_Service = Purchase_ServiceData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormDataByProcessId(string processId) | |||||
{ | |||||
var Data = Purchase_Service_ApplyIBLL.GetEntityByProcessId(processId); | |||||
var Purchase_Service_DetailsData = Purchase_Service_ApplyIBLL.GetPurchase_Service_ApplydetailsList(Data.Id); | |||||
var jsonData = new | |||||
{ | |||||
Purchase_Service_apply = Data, | |||||
Purchase_Service_applydetails = Purchase_Service_DetailsData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
Purchase_Service_ApplyIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity, string strPurchase_Service_applydetailsList, string strPurchase_ServiceEntity) | |||||
{ | |||||
Purchase_Service_ApplyEntity entity = strEntity.ToObject<Purchase_Service_ApplyEntity>(); | |||||
List<Purchase_Service_ApplydetailsEntity> Purchase_Service_applydetailsList = strPurchase_Service_applydetailsList.ToObject<List<Purchase_Service_ApplydetailsEntity>>(); | |||||
Purchase_Service_ApplyIBLL.SaveEntity(keyValue,entity,Purchase_Service_applydetailsList); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
/// <returns></returns> | |||||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
Purchase_Service_ApplyIBLL.ModifyStatus(keyValue, status, processId); | |||||
return Success("提交成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,174 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_TravelController : MvcControllerBase | |||||
{ | |||||
private Purchase_TravelIBLL Purchase_TravelIBLL = new Purchase_TravelBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单查看页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormView() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取数据字典明显根据分类编号 | |||||
/// </summary> | |||||
/// <param name="itemCode">分类编号</param> | |||||
/// <param name="keyword">查询条件</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetDetailList(string keyword) | |||||
{ | |||||
var data = Purchase_TravelIBLL.GetDataList( keyword); | |||||
return JsonResult(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = Purchase_TravelIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var Purchase_TravelData = Purchase_TravelIBLL.GetPurchase_TravelEntity( keyValue ); | |||||
//var Purchase_Travel_DetailsData = Purchase_TravelIBLL.GetPurchase_Travel_DetailsList( Purchase_TravelData.Id ); | |||||
var jsonData = new { | |||||
Purchase_Travel = Purchase_TravelData, | |||||
//Purchase_Travel_Details = Purchase_Travel_DetailsData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormDataByProcessId(string processId) | |||||
{ | |||||
var ArrangeLessonTermAttemperData = Purchase_TravelIBLL.GetEntityByProcessId(processId); | |||||
//var Purchase_Travel_DetailsData = Purchase_TravelIBLL.GetPurchase_Travel_DetailsList(ArrangeLessonTermAttemperData.Id); | |||||
var jsonData = new | |||||
{ | |||||
Purchase_Travel = ArrangeLessonTermAttemperData, | |||||
//Purchase_Travel_Details = Purchase_Travel_DetailsData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
Purchase_TravelIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity, string strPurchase_Travel_DetailsList) | |||||
{ | |||||
Purchase_TravelEntity entity = strEntity.ToObject<Purchase_TravelEntity>(); | |||||
// List<Purchase_Travel_DetailsEntity> Purchase_Travel_DetailsList = strPurchase_Travel_DetailsList.ToObject<List<Purchase_Travel_DetailsEntity>>(); | |||||
Purchase_TravelIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
/// <returns></returns> | |||||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
Purchase_TravelIBLL.ModifyStatus(keyValue, status, processId); | |||||
return Success("提交成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,172 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Travel_ApplyController : MvcControllerBase | |||||
{ | |||||
private Purchase_Travel_ApplyIBLL Purchase_Travel_ApplyIBLL = new Purchase_Travel_ApplyBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 查看页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormView() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 查找带回页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FindBack() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = Purchase_Travel_ApplyIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var Purchase_Travel_applyData = Purchase_Travel_ApplyIBLL.GetPurchase_Travel_ApplyEntity( keyValue ); | |||||
var Purchase_Travel_applydetailsData = Purchase_Travel_ApplyIBLL.GetPurchase_Travel_ApplydetailsList( Purchase_Travel_applyData.Id ); | |||||
//var Purchase_TravelData = Purchase_Travel_ApplyIBLL.GetPurchase_TravelEntity( Purchase_Travel_applydetailsData.purchaseid ); | |||||
var jsonData = new { | |||||
Purchase_Travel_apply = Purchase_Travel_applyData, | |||||
Purchase_Travel_applydetails = Purchase_Travel_applydetailsData, | |||||
//Purchase_Travel = Purchase_TravelData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormDataByProcessId(string processId) | |||||
{ | |||||
var Data = Purchase_Travel_ApplyIBLL.GetEntityByProcessId(processId); | |||||
var Purchase_Travel_DetailsData = Purchase_Travel_ApplyIBLL.GetPurchase_Travel_ApplydetailsList(Data.Id); | |||||
var jsonData = new | |||||
{ | |||||
Purchase_Travel_apply = Data, | |||||
Purchase_Travel_applydetails = Purchase_Travel_DetailsData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
Purchase_Travel_ApplyIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity, string strPurchase_Travel_applydetailsList, string strPurchase_TravelEntity) | |||||
{ | |||||
Purchase_Travel_ApplyEntity entity = strEntity.ToObject<Purchase_Travel_ApplyEntity>(); | |||||
List<Purchase_Travel_ApplydetailsEntity> Purchase_Travel_applydetailsList = strPurchase_Travel_applydetailsList.ToObject<List<Purchase_Travel_ApplydetailsEntity>>(); | |||||
Purchase_Travel_ApplyIBLL.SaveEntity(keyValue,entity,Purchase_Travel_applydetailsList); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
/// <returns></returns> | |||||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
Purchase_Travel_ApplyIBLL.ModifyStatus(keyValue, status, processId); | |||||
return Success("提交成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,32 @@ | |||||
@{ | |||||
ViewBag.Title = "申请类"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service"> | |||||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||||
<input id="DepartmentId" type="text" readonly class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" style="display:none"/> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service"> | |||||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" style="display:none"/> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service" > | |||||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service" > | |||||
<div class="lr-form-item-title">备注</div> | |||||
<input id="Remark" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service" > | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="FilePath" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item lr-form-item-grid" > | |||||
<div id="Purchase_Service_Details"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Service/Form.js") |
@@ -0,0 +1,141 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-06-25 18:33 | |||||
* 描 述:申请类 | |||||
*/ | |||||
var acceptClick; | |||||
var computeamount; | |||||
var userinfo; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||||
console.log(userinfo) | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
//加载部门、用户 | |||||
$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||||
learun.clientdata.getAsync('department', { | |||||
key: userinfo.departmentId, | |||||
callback: function (_data) { | |||||
$('#DepartmentId').val(_data.name); | |||||
$('#DepartmentName')[0].lrvalue = _data.name; | |||||
} | |||||
}); | |||||
//加载用户 | |||||
$('#CreatorId')[0].lrvalue = userinfo.userId; | |||||
$('#CreatorName')[0].lrvalue = userinfo.realName; | |||||
$('#CreatorId').val(userinfo.realName); | |||||
$('#FilePath').lrUploader(); | |||||
$('#Purchase_Service_Details').jfGrid({ | |||||
headData: [ | |||||
{ | |||||
label: '劳务维修内容', name: 'ServiceContent', width: 150, align: 'left', | |||||
edit: { | |||||
type:'input' | |||||
} | |||||
}, | |||||
{ | |||||
label: '估值', name: 'Price', width:100, align: 'left', | |||||
edit: { | |||||
type: 'input', | |||||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||||
}, | |||||
change: function (data, num) {// 行数据和行号 | |||||
if (!isNaN(data.Price)) { | |||||
computeamount(); | |||||
} else { | |||||
learun.alert.warning("只能是数字"); | |||||
data.Price=0 | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
{ | |||||
label: '人数', name: 'Peoplecount', width: 100, align: 'left', | |||||
edit: { | |||||
type: 'input', | |||||
} | |||||
}, | |||||
{ | |||||
label: '天数', name: 'Days', width: 100, align: 'left', | |||||
edit: { | |||||
type:'input' | |||||
} | |||||
}, | |||||
{ | |||||
label: '标准', name: 'Standar', width: 100, align: 'left', | |||||
edit: { | |||||
type:'input' | |||||
} | |||||
}, | |||||
{ | |||||
label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true | |||||
}, | |||||
], | |||||
isEdit: true, | |||||
height: 400, | |||||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||||
computeamount(); | |||||
}, | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = {}; | |||||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Service"]').lrGetFormData()); | |||||
postData.strPurchase_Service_DetailsList = JSON.stringify($('#Purchase_Service_Details').jfGridGet('rowdatas')); | |||||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
computeamount= function () { | |||||
var rowdatas = $('#Purchase_Service_Details').jfGridGet('rowdatas'); | |||||
var totalamount = 0; | |||||
for (var i = 0; i < rowdatas.length; i++) { | |||||
if (rowdatas[i].Price) { | |||||
totalamount += parseFloat( rowdatas[i].Price); | |||||
} | |||||
} | |||||
$('#TotalAmount').val(totalamount); | |||||
if ($("#TotalAmount").val() != '') { | |||||
if (parseFloat($("#TotalAmount").val()) > 0) { | |||||
if ($('#TotalAmount').parent().find('.lr-field-error-info').length > 0) { | |||||
$('#TotalAmount').parent().find('.lr-field-error-info')[0].remove(); | |||||
$('#TotalAmount').removeClass('lr-field-error'); | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,56 @@ | |||||
@{ | |||||
ViewBag.Title = "教学调度"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<style> | |||||
.searchRow { | |||||
margin-bottom: 20px; | |||||
} | |||||
.text-center { | |||||
padding: 10px 0; | |||||
} | |||||
.btnRow > div { | |||||
color: #0094ff; | |||||
cursor: pointer; | |||||
width: 100px; | |||||
} | |||||
.AttemperType { | |||||
display: none; | |||||
} | |||||
</style> | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service" style="display:none"> | |||||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="CreateTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="SubmitTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service"> | |||||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" style="display:none" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service"> | |||||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly /> | |||||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly style="display:none" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service"> | |||||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<input id="Remark" type="text" readonly class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="FilePath"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||||
<div id="Purchase_Service_Details"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Service/FormView.js") |
@@ -0,0 +1,131 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-09-26 10:47 | |||||
* 描 述:办公采购申请 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
// 设置权限 | |||||
var setAuthorize; | |||||
// 设置表单数据 | |||||
var setFormData; | |||||
// 验证数据是否填写完整 | |||||
var validForm; | |||||
// 保存数据 | |||||
var save; | |||||
//绑定原课程安排 | |||||
var bindData; | |||||
//绑定新课程安排 | |||||
var bindDataNew; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
// 设置权限 | |||||
setAuthorize = function (data) { | |||||
}; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
////加载部门、用户 | |||||
//$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||||
//learun.clientdata.getAsync('department', { | |||||
// key: userinfo.departmentId, | |||||
// callback: function (_data) { | |||||
// $('#DepartmentId').val(_data.name); | |||||
// $('#DepartmentName')[0].lrvalue = _data.name; | |||||
// } | |||||
//}); | |||||
////加载用户 | |||||
//$('#CreatorId')[0].lrvalue = userinfo.userId; | |||||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||||
//$('#CreatorId').val(userinfo.realName); | |||||
$('#FilePath').lrUploader({ isUpload: false }); | |||||
$('#Purchase_Service_Details').jfGrid({ | |||||
headData: [ | |||||
{ label: '劳务维修内容', name: 'ServiceContent', width: 100, align: 'left' }, | |||||
{ label: '估值', name: 'Price', width: 100, align: 'left' }, | |||||
{ label: '人数', name: 'Peoplecount', width: 100, align: 'left' }, | |||||
{ label: '天数', name: 'Days', width: 100, align: 'left' }, | |||||
{ label: '标准', name: 'Standar', width: 100, align: 'left' }, | |||||
{ label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true }, | |||||
], | |||||
isEdit: false, | |||||
height: 400, | |||||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||||
computeamount(); | |||||
}, | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
console.log(keyValue) | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
}; | |||||
// 设置表单数据 | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service/GetFormDataByProcessId?processId=' + processId, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id] && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
//if (id == 'ArrangeLessonTermAttemper') { | |||||
keyValue = data[id].Id; | |||||
//} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | |||||
validForm = function () { | |||||
if (!$('#form').lrValidform()) { | |||||
return false; | |||||
} | |||||
return true; | |||||
}; | |||||
// 保存数据 | |||||
save = function (processId, callBack, i) { | |||||
var formData = $('body').lrGetFormData(); | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = {}; | |||||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Service"]').lrGetFormData()); | |||||
postData.strPurchase_Service_DetailsList = JSON.stringify($('#Purchase_Service_Details').jfGridGet('rowdatas')); | |||||
//var postData = { | |||||
// strEntity: JSON.stringify(formData) | |||||
//}; | |||||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(res, i); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,49 @@ | |||||
@{ | |||||
ViewBag.Title = "申请类"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout " > | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">备注关键字</div> | |||||
<input id="keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">审核状态</div> | |||||
<div id="checkstatus"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">报账状态</div> | |||||
<div id="ApplyStatus"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Service/Index.js") |
@@ -0,0 +1,264 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-06-25 18:33 | |||||
* 描 述:申请类 | |||||
*/ | |||||
var refreshGirdData; | |||||
var selectedRow; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var logbegin = ''; | |||||
var logend = ''; | |||||
var processId = ''; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
selectfn: function (begin, end) { | |||||
logbegin = begin; | |||||
logend = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#checkstatus').lrselect({ | |||||
data: [{ text: '待审核', value: '0' }, { text: '审核中', value: '1' }, { text: '已审核', value: '2' }], | |||||
text: 'text', | |||||
value: 'value', | |||||
}); | |||||
$('#ApplyStatus').lrselect({ | |||||
data: [{ text: '待报账', value: '0' }, { text: '报账中', value: '1' }, { text: '已报账', value: '2' }], | |||||
text: 'text', | |||||
value: 'value', | |||||
}); | |||||
// 刷新 | |||||
// 查询 | |||||
$('#btn_Search').on('click', function () { | |||||
var keyword = $('#txt_Keyword').val(); | |||||
page.search({ keyword: keyword }); | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service/Form', | |||||
width: 1000, | |||||
height: 800, | |||||
callBack: function (id) { | |||||
//res = top[id].save('', function () { | |||||
// page.search(); | |||||
//}); | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status == 1) {//提交 | |||||
learun.alert.warning("当前课程异动记录已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service/Form?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
callBack: function (id) { | |||||
var res = false; | |||||
// 验证数据 | |||||
//res = top[id].validForm(); | |||||
// 保存数据 | |||||
//if (res) { | |||||
//res = top[id].save('', function () { | |||||
// page.search(); | |||||
//}); | |||||
return top[id].acceptClick(refreshGirdData); | |||||
//} | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status !== 0) { | |||||
learun.alert.warning("当前课程异动记录已提交,无法删除!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service/DeleteForm', { keyValue: keyValue}, function () { | |||||
//refreshGirdData(); | |||||
page.search(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 提交 | |||||
$('#lr_submit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status !== 0) { | |||||
learun.alert.warning("当前记录已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
processId = learun.newGuid(); | |||||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||||
//selectedRow.ProcessId = processId; | |||||
refreshGirdData(res, {}); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status == 0) { | |||||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'formview', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service/FormView?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 600, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service/GetPageList', | |||||
headData: [ | |||||
{ label: "部门", name: "DepartmentId", width: 150, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
return row.DepartmentName; | |||||
} | |||||
}, | |||||
{ | |||||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
return row.CreatorName; | |||||
} | |||||
}, | |||||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left"}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "状态", name: "Status", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 1) { | |||||
return '<span class=\"label label-success\" >已提交</span>'; | |||||
} else { | |||||
return '<span class=\"label label-default\" >未提交</span>'; | |||||
} | |||||
} | |||||
}, | |||||
//{ | |||||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||||
// formatter: function (cellvalue, row) { | |||||
// return row.CheckUserName; | |||||
// } | |||||
//}, | |||||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 1) { | |||||
return '<span class=\"label label-warning\" >审核中</span>'; | |||||
} else if (cellvalue == 2) { | |||||
return '<span class=\"label label-success\" >审核通过</span>'; | |||||
} else { | |||||
return '<span class=\"label label-default\" >草稿</span>'; | |||||
} | |||||
} | |||||
}, | |||||
{ | |||||
label: "报账状态", name: "ApplyStatus", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
console.log(cellvalue) | |||||
if (cellvalue == 0) { | |||||
return '<span class=\"label label-default\" >待报账</span>'; | |||||
} else if (cellvalue == 1) { | |||||
return '<span class=\"label label-warning\" >报账中</span>'; | |||||
} else if (cellvalue == 2) { | |||||
return '<span class=\"label label-success\" >已报账</span>'; | |||||
} | |||||
} | |||||
}, | |||||
], | |||||
mainId:'Id', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = logbegin; | |||||
param.EndTime = logend; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function (res, postData) { | |||||
if (res && res.code && res.code == 200) { | |||||
// 发起流程 | |||||
var postData = { | |||||
schemeCode: '1-14',// 填写流程对应模板编号 | |||||
processId: processId, | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,33 @@ | |||||
@{ | |||||
ViewBag.Title = "教务报账申请"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout " > | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch"></div> | |||||
</div> | |||||
@*<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">填报部门</div> | |||||
<div id="DepartmentId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">收款人</div> | |||||
<input id="Payee" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div>*@ | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Service_Apply/FindBack.js") |
@@ -0,0 +1,158 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-07-14 12:15 | |||||
* 描 述:教务报账申请 | |||||
*/ | |||||
var acceptClick; | |||||
var refreshGirdData; | |||||
var list=[]; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var startTime; | |||||
var endTime; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 时间搜索框 | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '1', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#DepartmentId').lrDepartmentSelect(); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service/GetPageList', | |||||
headData: [ | |||||
{ | |||||
label: "部门", name: "DepartmentId", width: 150, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
return row.DepartmentName; | |||||
} | |||||
}, | |||||
{ | |||||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
return row.CreatorName; | |||||
} | |||||
}, | |||||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left" }, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
], | |||||
mainId: 'Id', | |||||
isPage: true, | |||||
isMultiselect: true, | |||||
onSelectRow: function (rowdata, type) { | |||||
if (type) { | |||||
list.push(rowdata) | |||||
//let temp = {} | |||||
//list = list.reduce((prev, curv) => { | |||||
// if (temp[curv.StuNo]) { } | |||||
// else { | |||||
// temp[curv.StuNo] = true | |||||
// prev.push(curv) | |||||
// } | |||||
// return prev | |||||
//}, []) | |||||
} else { | |||||
list = $.grep(list, function (item, index) { | |||||
return item.Id!=rowdata.Id | |||||
}) | |||||
} | |||||
console.log(list) | |||||
}, | |||||
isSubGrid: true, | |||||
subGridExpanded: function (subContentId, rowItem) { | |||||
$('#' + subContentId).jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service/GetFormDetailData?keyValue=' + rowItem.Id, | |||||
headData: [ | |||||
{ label: "采购物品名称", name: "Name", width: 100, align: "left" }, | |||||
{ label: "价格", name: "Price", width: 130, align: "left" }, | |||||
{ label: "采购数量", name: "Quantity", width: 100, align: "left" }, | |||||
{ label: "单位", name: "Unit", width: 150, align: "left" }, | |||||
{ label: "用途", name: "UseTo", width: 150, align: "left" }, | |||||
], | |||||
mainId: 'LessonNo', | |||||
isPage: false, | |||||
sidx: 'ReviewTime desc' | |||||
}); | |||||
var param; | |||||
param = param || {}; | |||||
param.StuNo = rowItem.StuNo; | |||||
$('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
param.ApplyStatus = 0; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
//console.log(list) | |||||
if (list.length > 0) { | |||||
if (!!callBack) { | |||||
callBack(list); | |||||
return true; | |||||
} | |||||
} else { | |||||
} | |||||
//if (!$('body').lrValidform()) { | |||||
// return false; | |||||
//} | |||||
//var postData = {}; | |||||
//postData.strEntity = JSON.stringify($('[data-table="Purchase_Service_apply"]').lrGetFormData()); | |||||
//postData.strPurchase_Service_applydetailsList = JSON.stringify($('#Purchase_Service_applydetails').jfGridGet('rowdatas')); | |||||
//postData.strPurchase_ServiceEntity = JSON.stringify($('[data-table="Purchase_Service"]').lrGetFormData()); | |||||
//$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// // 保存成功后才回调 | |||||
// if (!!callBack) { | |||||
// callBack(); | |||||
// } | |||||
//}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,47 @@ | |||||
@{ | |||||
ViewBag.Title = "教务报账申请"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">填报部门</div> | |||||
<input id="DepartmentId" type="text" readonly class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">填报人</div> | |||||
<input id="Creator" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">填报时间</div> | |||||
<input id="Createtime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Createtime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">收款人<font face="宋体">*</font></div> | |||||
<input id="Payee" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">附件张数</div> | |||||
<input id="Attachcount" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">申请报账金额<font face="宋体">*</font></div> | |||||
<input id="Totalamount" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="FilePath"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">核准金额</div> | |||||
<input id="Approvalamount" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">明细操作</div> | |||||
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" /> | |||||
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||||
<div id="Purchase_Service_applydetails"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Service_Apply/Form.js") |
@@ -0,0 +1,163 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-07-14 12:15 | |||||
* 描 述:教务报账申请 | |||||
*/ | |||||
var acceptClick; | |||||
var userinfo; | |||||
var selectedRow; | |||||
var refreshGirdData; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||||
$("#detailadd").on('click', function () { | |||||
selectedRow = null; | |||||
///LogisticsManagement/Purchase_Service/GetDetailList | |||||
learun.layerForm({ | |||||
id: 'findback', | |||||
title: '新增明细', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/FindBack', | |||||
width: 860, | |||||
height: 580, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
$("#detaildel").on('click', function () { | |||||
var keyValue = $('#Purchase_Service_applydetails').jfGridValue('purchaseid'); | |||||
selectedRow = $('#Purchase_Service_applydetails').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||||
if (res) { | |||||
$('#Purchase_Service_applydetails').jfGridSet('removeRow', selectedRow.purchaseid); | |||||
let totalamount = parseFloat($('#Totalamount').val()); | |||||
totalamount -= selectedRow.TotalAmount; | |||||
$('#Totalamount').val(totalamount); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||||
learun.clientdata.getAsync('department', { | |||||
key: userinfo.departmentId, | |||||
callback: function (_data) { | |||||
$('#DepartmentId').val(_data.name); | |||||
} | |||||
}); | |||||
$('#Creator')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||||
$('#Creator').val(learun.clientdata.get(['userinfo']).realName); | |||||
$('#Createtime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||||
$('#FilePath').lrUploader(); | |||||
$('#Purchase_Service_applydetails').jfGrid({ | |||||
headData: [ | |||||
{ | |||||
label: '采购单备注', name: 'Remark', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '金额', name: 'TotalAmount', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '时间', name: 'CreateTime', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide:true | |||||
} | |||||
], | |||||
//isEdit:true, | |||||
isSubGrid: true, | |||||
mainId:'purchaseid', | |||||
height: 400, | |||||
isSubGrid: true, | |||||
subGridExpanded: function (subContentId, rowItem) { | |||||
$('#' + subContentId).jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service/GetFormDetailData?keyValue=' + rowItem.purchaseid, | |||||
headData: [ | |||||
{ label: "采购物品名称", name: "Name", width: 100, align: "left" }, | |||||
{ label: "价格", name: "Price", width: 130, align: "left" }, | |||||
{ label: "采购数量", name: "Quantity", width: 100, align: "left" }, | |||||
{ label: "单位", name: "Unit", width: 150, align: "left" }, | |||||
{ label: "用途", name: "UseTo", width: 150, align: "left", }, | |||||
], | |||||
mainId: 'LessonNo', | |||||
isPage: false, | |||||
sidx: 'ReviewTime desc' | |||||
}); | |||||
var param; | |||||
param = param || {}; | |||||
param.StuNo = rowItem.StuNo; | |||||
$('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/GetFormData?keyValue=' + keyValue, function (data) { | |||||
console.log(data) | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
refreshGirdData = function (e) { | |||||
//console.log(e) | |||||
//计算总金额 | |||||
let totalamount = 0; | |||||
//清楚所有 | |||||
var datas = $('#Purchase_Service_applydetails').jfGridGet('rowdatas').length | |||||
for (var i = 0; i < datas; i++) { | |||||
$('#Purchase_Service_applydetails').jfGridSet('removeRow', $('#Purchase_Service_applydetails').jfGridGet('rowdatas')[0].purchaseid); | |||||
} | |||||
for (var i = 0; i < e.length; i++) { | |||||
var itemdata = { | |||||
'Id': '', | |||||
'Remark': e[i].Remark, | |||||
'TotalAmount': e[i].TotalAmount, | |||||
'CreateTime': e[i].CreateTime, | |||||
'purchaseid': e[i].Id | |||||
}; | |||||
$('#Purchase_Service_applydetails').jfGridSet('addRow', itemdata); | |||||
totalamount += e[i].TotalAmount; | |||||
} | |||||
$('#Totalamount').val(totalamount); | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = {}; | |||||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Service_apply"]').lrGetFormData()); | |||||
postData.strPurchase_Service_applydetailsList = JSON.stringify($('#Purchase_Service_applydetails').jfGridGet('rowdatas')); | |||||
//postData.strPurchase_ServiceEntity = JSON.stringify($('[data-table="Purchase_Service"]').lrGetFormData()); | |||||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,47 @@ | |||||
@{ | |||||
ViewBag.Title = "教务报账申请"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">填报部门</div> | |||||
<input id="DepartmentId" type="text" disabled readonly class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">填报人</div> | |||||
<input id="Creator" type="text" disabled readonly class="form-control currentInfo lr-currentInfo-user" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">填报时间</div> | |||||
<input id="Createtime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Createtime').trigger('change'); } })" disabled readonly/> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">收款人<font face="宋体">*</font></div> | |||||
<input id="Payee" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" disabled readonly/> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">附件张数</div> | |||||
<input id="Attachcount" type="text" class="form-control" disabled/> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">申请报账金额<font face="宋体">*</font></div> | |||||
<input id="Totalamount" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" disabled readonly/> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="FilePath"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply"> | |||||
<div class="lr-form-item-title">核准金额</div> | |||||
<input id="Approvalamount" type="text" class="form-control" disabled readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">明细操作</div> | |||||
@*<input id="detailadd" type="button" class="btn btn-success" value="新增明细" /> | |||||
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" />*@ | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||||
<div id="Purchase_Service_applydetails"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Service_Apply/FormView.js") |
@@ -0,0 +1,141 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-09-26 10:47 | |||||
* 描 述:办公采购申请 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
// 设置权限 | |||||
var setAuthorize; | |||||
// 设置表单数据 | |||||
var setFormData; | |||||
// 验证数据是否填写完整 | |||||
var validForm; | |||||
// 保存数据 | |||||
var save; | |||||
//绑定原课程安排 | |||||
var bindData; | |||||
//绑定新课程安排 | |||||
var bindDataNew; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
// 设置权限 | |||||
setAuthorize = function (data) { | |||||
}; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#FilePath').lrUploader({ isUpload: false }); | |||||
$('#Purchase_Service_applydetails').jfGrid({ | |||||
headData: [ | |||||
{ | |||||
label: '采购单备注', name: 'Remark', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '金额', name: 'TotalAmount', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '时间', name: 'CreateTime', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide: true | |||||
} | |||||
], | |||||
//isEdit:true, | |||||
isSubGrid: true, | |||||
mainId: 'purchaseid', | |||||
height: 400, | |||||
isSubGrid: true, | |||||
subGridExpanded: function (subContentId, rowItem) { | |||||
$('#' + subContentId).jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service/GetFormDetailData?keyValue=' + rowItem.purchaseid, | |||||
headData: [ | |||||
{ label: "采购物品名称", name: "Name", width: 100, align: "left" }, | |||||
{ label: "价格", name: "Price", width: 130, align: "left" }, | |||||
{ label: "采购数量", name: "Quantity", width: 100, align: "left" }, | |||||
{ label: "单位", name: "Unit", width: 150, align: "left" }, | |||||
{ label: "用途", name: "UseTo", width: 150, align: "left", }, | |||||
], | |||||
mainId: 'LessonNo', | |||||
isPage: false, | |||||
sidx: 'ReviewTime desc' | |||||
}); | |||||
var param; | |||||
param = param || {}; | |||||
param.StuNo = rowItem.StuNo; | |||||
$('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
console.log(keyValue) | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
}; | |||||
// 设置表单数据 | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/GetFormDataByProcessId?processId=' + processId, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id] && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
//if (id == 'ArrangeLessonTermAttemper') { | |||||
keyValue = data[id].Id; | |||||
//} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | |||||
validForm = function () { | |||||
if (!$('#form').lrValidform()) { | |||||
return false; | |||||
} | |||||
return true; | |||||
}; | |||||
// 保存数据 | |||||
save = function (processId, callBack, i) { | |||||
var formData = $('body').lrGetFormData(); | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = {}; | |||||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Service_Apply"]').lrGetFormData()); | |||||
postData.strPurchase_Service_applydetailsList = JSON.stringify($('#Purchase_Service_applydetails').jfGridGet('rowdatas')); | |||||
//var postData = { | |||||
// strEntity: JSON.stringify(formData) | |||||
//}; | |||||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(res, i); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,51 @@ | |||||
@{ | |||||
ViewBag.Title = "教务报账申请"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout " > | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">填报部门</div> | |||||
<div id="DepartmentId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">审核状态</div> | |||||
<div id="checkstatus"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">收款人</div> | |||||
<input id="Payee" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" > | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" > | |||||
<a id="lr-sub" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
<a id="lr-view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Service_Apply/Index.js") |
@@ -0,0 +1,245 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-07-14 12:15 | |||||
* 描 述:教务报账申请 | |||||
*/ | |||||
var refreshGirdData; | |||||
var selectedRow; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var startTime; | |||||
var endTime; | |||||
var processId = ''; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 时间搜索框 | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '1', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#DepartmentId').lrDepartmentSelect(); | |||||
$('#checkstatus').lrselect({ | |||||
data: [{ text: '待审核', value: '0' }, { text: '审核中', value: '1' }, { text: '已审核', value: '2' }], | |||||
text: 'text', | |||||
value: 'value', | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/Form', | |||||
//url: top.$.rootUrl + '/lr_codedemo/griddemo/editindex', | |||||
width: 1000, | |||||
height: 800, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status != 0) { | |||||
learun.alert.warning("当前记录已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/Form?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status != 0) { | |||||
learun.alert.warning("当前记录已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/DeleteForm', { keyValue: keyValue}, function () { | |||||
//refreshGirdData(); | |||||
page.search(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 提交 | |||||
$('#lr-sub').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
console.log(keyValue) | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status != 0) { | |||||
learun.alert.warning("当前记录已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
processId = learun.newGuid(); | |||||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||||
//selectedRow.ProcessId = processId; | |||||
refreshGirdData(res, {}); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 查看 | |||||
$('#lr-view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status == 0) { | |||||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'formview', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/FormView?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Service_Apply/GetPageList', | |||||
headData: [ | |||||
{ label: "填报部门", name: "DepartmentId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('department', { | |||||
key: value, | |||||
callback: function (_data) { | |||||
callback(_data.name); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "填报人", name: "Creator", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('user', { | |||||
key: value, | |||||
callback: function (_data) { | |||||
callback(_data.name); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "填报时间", name: "Createtime", width: 100, align: "left"}, | |||||
{ label: "收款人", name: "Payee", width: 100, align: "left"}, | |||||
{ label: "附件张数", name: "Attachcount", width: 100, align: "left"}, | |||||
{ label: "申请报账金额", name: "Totalamount", width: 100, align: "left"}, | |||||
//{ label: "附件上传", name: "FilePath", width: 100, align: "left"}, | |||||
{ label: "核准金额", name: "Approvalamount", width: 100, align: "left" }, | |||||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "状态", name: "Status", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 1) { | |||||
return '<span class=\"label label-success\" >已提交</span>'; | |||||
} else { | |||||
return '<span class=\"label label-default\" >未提交</span>'; | |||||
} | |||||
} | |||||
}, | |||||
//{ | |||||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||||
// formatter: function (cellvalue, row) { | |||||
// return row.CheckUserName; | |||||
// } | |||||
//}, | |||||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 1) { | |||||
return '<span class=\"label label-warning\" >审核中</span>'; | |||||
} else if (cellvalue == 2) { | |||||
return '<span class=\"label label-success\" >审核通过</span>'; | |||||
} else { | |||||
return '<span class=\"label label-default\" >草稿</span>'; | |||||
} | |||||
} | |||||
}, | |||||
], | |||||
mainId:'Id', | |||||
isPage: true | |||||
}); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function (res, postData) { | |||||
//$('#gridtable').jfGridSet('reload'); | |||||
if (res && res.code && res.code == 200) { | |||||
// 发起流程 | |||||
var postData = { | |||||
schemeCode: '1-13',// 填写流程对应模板编号 | |||||
processId: processId, | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,42 @@ | |||||
@{ | |||||
ViewBag.Title = "申请类"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
@*<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||||
<input id="DepartmentId" type="text" readonly class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" style="display:none"/> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" style="display:none" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">随行人员<font face="宋体">*</font></div> | |||||
<input id="Follows" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">出差原因</div> | |||||
<input id="Reason" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">开始时间</div> | |||||
@*<input id="Starttime" type="text" class="form-control" />*@ | |||||
<input id="Starttime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Starttime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">结束时间</div> | |||||
@*<input id="Endtime" type="text" class="form-control" />*@ | |||||
<input id="Endtime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Endtime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="FilePath"></div> | |||||
</div> | |||||
@*<div class="col-xs-12 lr-form-item lr-form-item-grid" > | |||||
<div id="Purchase_Travel_Details"></div> | |||||
</div>*@ | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel/Form.js") |
@@ -0,0 +1,71 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-06-25 18:33 | |||||
* 描 述:申请类 | |||||
*/ | |||||
var acceptClick; | |||||
var computeamount; | |||||
var userinfo; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||||
console.log(userinfo) | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
//加载部门、用户 | |||||
//$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||||
//learun.clientdata.getAsync('department', { | |||||
// key: userinfo.departmentId, | |||||
// callback: function (_data) { | |||||
// $('#DepartmentId').val(_data.name); | |||||
// $('#DepartmentName')[0].lrvalue = _data.name; | |||||
// } | |||||
//}); | |||||
//加载用户 | |||||
$('#CreatorId')[0].lrvalue = userinfo.userId; | |||||
$('#CreatorName')[0].lrvalue = userinfo.realName; | |||||
$('#CreatorId').val(userinfo.realName); | |||||
$('#FilePath').lrUploader(); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = {}; | |||||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Travel"]').lrGetFormData()); | |||||
//postData.strPurchase_Travel_DetailsList = JSON.stringify($('#Purchase_Travel_Details').jfGridGet('rowdatas')); | |||||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,56 @@ | |||||
@{ | |||||
ViewBag.Title = "教学调度"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<style> | |||||
.searchRow { | |||||
margin-bottom: 20px; | |||||
} | |||||
.text-center { | |||||
padding: 10px 0; | |||||
} | |||||
.btnRow > div { | |||||
color: #0094ff; | |||||
cursor: pointer; | |||||
width: 100px; | |||||
} | |||||
.AttemperType { | |||||
display: none; | |||||
} | |||||
</style> | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel" style="display:none"> | |||||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="CreateTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="SubmitTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" style="display:none" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly /> | |||||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly style="display:none" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<input id="Remark" type="text" readonly class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="FilePath"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||||
<div id="Purchase_Travel_Details"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel/FormView.js") |
@@ -0,0 +1,131 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-09-26 10:47 | |||||
* 描 述:办公采购申请 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
// 设置权限 | |||||
var setAuthorize; | |||||
// 设置表单数据 | |||||
var setFormData; | |||||
// 验证数据是否填写完整 | |||||
var validForm; | |||||
// 保存数据 | |||||
var save; | |||||
//绑定原课程安排 | |||||
var bindData; | |||||
//绑定新课程安排 | |||||
var bindDataNew; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
// 设置权限 | |||||
setAuthorize = function (data) { | |||||
}; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
////加载部门、用户 | |||||
//$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||||
//learun.clientdata.getAsync('department', { | |||||
// key: userinfo.departmentId, | |||||
// callback: function (_data) { | |||||
// $('#DepartmentId').val(_data.name); | |||||
// $('#DepartmentName')[0].lrvalue = _data.name; | |||||
// } | |||||
//}); | |||||
////加载用户 | |||||
//$('#CreatorId')[0].lrvalue = userinfo.userId; | |||||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||||
//$('#CreatorId').val(userinfo.realName); | |||||
$('#FilePath').lrUploader({ isUpload: false }); | |||||
$('#Purchase_Travel_Details').jfGrid({ | |||||
headData: [ | |||||
{ label: '采购物品名称', name: 'Name', width: 100, align: 'left' }, | |||||
{ label: '价格', name: 'Price', width: 100, align: 'left' }, | |||||
{ label: '采购数量', name: 'Quantity', width: 100, align: 'left' }, | |||||
{ label: '单位', name: 'Unit', width: 100, align: 'left' }, | |||||
{ label: '用途', name: 'UseTo', width: 100, align: 'left' }, | |||||
{ label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true }, | |||||
], | |||||
isEdit: false, | |||||
height: 400, | |||||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||||
computeamount(); | |||||
}, | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
console.log(keyValue) | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
}; | |||||
// 设置表单数据 | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/GetFormDataByProcessId?processId=' + processId, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id] && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
//if (id == 'ArrangeLessonTermAttemper') { | |||||
keyValue = data[id].Id; | |||||
//} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | |||||
validForm = function () { | |||||
if (!$('#form').lrValidform()) { | |||||
return false; | |||||
} | |||||
return true; | |||||
}; | |||||
// 保存数据 | |||||
save = function (processId, callBack, i) { | |||||
var formData = $('body').lrGetFormData(); | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = {}; | |||||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Travel"]').lrGetFormData()); | |||||
postData.strPurchase_Travel_DetailsList = JSON.stringify($('#Purchase_Travel_Details').jfGridGet('rowdatas')); | |||||
//var postData = { | |||||
// strEntity: JSON.stringify(formData) | |||||
//}; | |||||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(res, i); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,49 @@ | |||||
@{ | |||||
ViewBag.Title = "申请类"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout " > | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">备注关键字</div> | |||||
<input id="keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">审核状态</div> | |||||
<div id="checkstatus"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">报账状态</div> | |||||
<div id="ApplyStatus"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel/Index.js") |
@@ -0,0 +1,264 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-06-25 18:33 | |||||
* 描 述:申请类 | |||||
*/ | |||||
var refreshGirdData; | |||||
var selectedRow; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var logbegin = ''; | |||||
var logend = ''; | |||||
var processId = ''; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
selectfn: function (begin, end) { | |||||
logbegin = begin; | |||||
logend = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#checkstatus').lrselect({ | |||||
data: [{ text: '待审核', value: '0' }, { text: '审核中', value: '1' }, { text: '已审核', value: '2' }], | |||||
text: 'text', | |||||
value: 'value', | |||||
}); | |||||
$('#ApplyStatus').lrselect({ | |||||
data: [{ text: '待报账', value: '0' }, { text: '报账中', value: '1' }, { text: '已报账', value: '2' }], | |||||
text: 'text', | |||||
value: 'value', | |||||
}); | |||||
// 刷新 | |||||
// 查询 | |||||
$('#btn_Search').on('click', function () { | |||||
var keyword = $('#txt_Keyword').val(); | |||||
page.search({ keyword: keyword }); | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/Form', | |||||
width: 1000, | |||||
height: 800, | |||||
callBack: function (id) { | |||||
//res = top[id].save('', function () { | |||||
// page.search(); | |||||
//}); | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status == 1) {//提交 | |||||
learun.alert.warning("当前课程异动记录已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/Form?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
callBack: function (id) { | |||||
var res = false; | |||||
// 验证数据 | |||||
//res = top[id].validForm(); | |||||
// 保存数据 | |||||
//if (res) { | |||||
//res = top[id].save('', function () { | |||||
// page.search(); | |||||
//}); | |||||
return top[id].acceptClick(refreshGirdData); | |||||
//} | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status !== 0) { | |||||
learun.alert.warning("当前课程异动记录已提交,无法删除!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/DeleteForm', { keyValue: keyValue}, function () { | |||||
//refreshGirdData(); | |||||
page.search(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 提交 | |||||
$('#lr_submit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status !== 0) { | |||||
learun.alert.warning("当前记录已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
processId = learun.newGuid(); | |||||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||||
//selectedRow.ProcessId = processId; | |||||
refreshGirdData(res, {}); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status == 0) { | |||||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'formview', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/FormView?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 600, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/GetPageList', | |||||
headData: [ | |||||
{ label: "部门", name: "DepartmentId", width: 150, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
return row.DepartmentName; | |||||
} | |||||
}, | |||||
{ | |||||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
return row.CreatorName; | |||||
} | |||||
}, | |||||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left"}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "状态", name: "Status", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 1) { | |||||
return '<span class=\"label label-success\" >已提交</span>'; | |||||
} else { | |||||
return '<span class=\"label label-default\" >未提交</span>'; | |||||
} | |||||
} | |||||
}, | |||||
//{ | |||||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||||
// formatter: function (cellvalue, row) { | |||||
// return row.CheckUserName; | |||||
// } | |||||
//}, | |||||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 1) { | |||||
return '<span class=\"label label-warning\" >审核中</span>'; | |||||
} else if (cellvalue == 2) { | |||||
return '<span class=\"label label-success\" >审核通过</span>'; | |||||
} else { | |||||
return '<span class=\"label label-default\" >草稿</span>'; | |||||
} | |||||
} | |||||
}, | |||||
{ | |||||
label: "报账状态", name: "ApplyStatus", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
console.log(cellvalue) | |||||
if (cellvalue == 0) { | |||||
return '<span class=\"label label-default\" >待报账</span>'; | |||||
} else if (cellvalue == 1) { | |||||
return '<span class=\"label label-warning\" >报账中</span>'; | |||||
} else if (cellvalue == 2) { | |||||
return '<span class=\"label label-success\" >已报账</span>'; | |||||
} | |||||
} | |||||
}, | |||||
], | |||||
mainId:'Id', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = logbegin; | |||||
param.EndTime = logend; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function (res, postData) { | |||||
if (res && res.code && res.code == 200) { | |||||
// 发起流程 | |||||
var postData = { | |||||
schemeCode: '0.1',// 填写流程对应模板编号 | |||||
processId: processId, | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,33 @@ | |||||
@{ | |||||
ViewBag.Title = "教务报账申请"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout " > | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch"></div> | |||||
</div> | |||||
@*<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">填报部门</div> | |||||
<div id="DepartmentId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">收款人</div> | |||||
<input id="Payee" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div>*@ | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/FindBack.js") |
@@ -0,0 +1,158 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-07-14 12:15 | |||||
* 描 述:教务报账申请 | |||||
*/ | |||||
var acceptClick; | |||||
var refreshGirdData; | |||||
var list=[]; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var startTime; | |||||
var endTime; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 时间搜索框 | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '1', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#DepartmentId').lrDepartmentSelect(); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/GetPageList', | |||||
headData: [ | |||||
{ | |||||
label: "部门", name: "DepartmentId", width: 150, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
return row.DepartmentName; | |||||
} | |||||
}, | |||||
{ | |||||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
return row.CreatorName; | |||||
} | |||||
}, | |||||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left" }, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
], | |||||
mainId: 'Id', | |||||
isPage: true, | |||||
isMultiselect: true, | |||||
onSelectRow: function (rowdata, type) { | |||||
if (type) { | |||||
list.push(rowdata) | |||||
//let temp = {} | |||||
//list = list.reduce((prev, curv) => { | |||||
// if (temp[curv.StuNo]) { } | |||||
// else { | |||||
// temp[curv.StuNo] = true | |||||
// prev.push(curv) | |||||
// } | |||||
// return prev | |||||
//}, []) | |||||
} else { | |||||
list = $.grep(list, function (item, index) { | |||||
return item.Id!=rowdata.Id | |||||
}) | |||||
} | |||||
console.log(list) | |||||
}, | |||||
isSubGrid: true, | |||||
subGridExpanded: function (subContentId, rowItem) { | |||||
$('#' + subContentId).jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/GetFormDetailData?keyValue=' + rowItem.Id, | |||||
headData: [ | |||||
{ label: "采购物品名称", name: "Name", width: 100, align: "left" }, | |||||
{ label: "价格", name: "Price", width: 130, align: "left" }, | |||||
{ label: "采购数量", name: "Quantity", width: 100, align: "left" }, | |||||
{ label: "单位", name: "Unit", width: 150, align: "left" }, | |||||
{ label: "用途", name: "UseTo", width: 150, align: "left" }, | |||||
], | |||||
mainId: 'LessonNo', | |||||
isPage: false, | |||||
sidx: 'ReviewTime desc' | |||||
}); | |||||
var param; | |||||
param = param || {}; | |||||
param.StuNo = rowItem.StuNo; | |||||
$('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
param.ApplyStatus = 0; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
//console.log(list) | |||||
if (list.length > 0) { | |||||
if (!!callBack) { | |||||
callBack(list); | |||||
return true; | |||||
} | |||||
} else { | |||||
} | |||||
//if (!$('body').lrValidform()) { | |||||
// return false; | |||||
//} | |||||
//var postData = {}; | |||||
//postData.strEntity = JSON.stringify($('[data-table="Purchase_Travel_apply"]').lrGetFormData()); | |||||
//postData.strPurchase_Travel_applydetailsList = JSON.stringify($('#Purchase_Travel_applydetails').jfGridGet('rowdatas')); | |||||
//postData.strPurchase_TravelEntity = JSON.stringify($('[data-table="Purchase_Travel"]').lrGetFormData()); | |||||
//$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// // 保存成功后才回调 | |||||
// if (!!callBack) { | |||||
// callBack(); | |||||
// } | |||||
//}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,47 @@ | |||||
@{ | |||||
ViewBag.Title = "教务报账申请"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">填报部门</div> | |||||
<input id="DepartmentId" type="text" readonly class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">填报人</div> | |||||
<input id="Creator" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">填报时间</div> | |||||
<input id="Createtime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Createtime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">收款人<font face="宋体">*</font></div> | |||||
<input id="Payee" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">附件张数</div> | |||||
<input id="Attachcount" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">申请报账金额<font face="宋体">*</font></div> | |||||
<input id="Totalamount" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="FilePath"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">核准金额</div> | |||||
<input id="Approvalamount" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">明细操作</div> | |||||
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" /> | |||||
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||||
<div id="Purchase_Travel_applydetails"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Form.js") |
@@ -0,0 +1,163 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-07-14 12:15 | |||||
* 描 述:教务报账申请 | |||||
*/ | |||||
var acceptClick; | |||||
var userinfo; | |||||
var selectedRow; | |||||
var refreshGirdData; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||||
$("#detailadd").on('click', function () { | |||||
selectedRow = null; | |||||
///LogisticsManagement/Purchase_Travel/GetDetailList | |||||
learun.layerForm({ | |||||
id: 'findback', | |||||
title: '新增明细', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/FindBack', | |||||
width: 860, | |||||
height: 580, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
$("#detaildel").on('click', function () { | |||||
var keyValue = $('#Purchase_Travel_applydetails').jfGridValue('purchaseid'); | |||||
selectedRow = $('#Purchase_Travel_applydetails').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||||
if (res) { | |||||
$('#Purchase_Travel_applydetails').jfGridSet('removeRow', selectedRow.purchaseid); | |||||
let totalamount = parseFloat($('#Totalamount').val()); | |||||
totalamount -= selectedRow.TotalAmount; | |||||
$('#Totalamount').val(totalamount); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||||
learun.clientdata.getAsync('department', { | |||||
key: userinfo.departmentId, | |||||
callback: function (_data) { | |||||
$('#DepartmentId').val(_data.name); | |||||
} | |||||
}); | |||||
$('#Creator')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||||
$('#Creator').val(learun.clientdata.get(['userinfo']).realName); | |||||
$('#Createtime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||||
$('#FilePath').lrUploader(); | |||||
$('#Purchase_Travel_applydetails').jfGrid({ | |||||
headData: [ | |||||
{ | |||||
label: '采购单备注', name: 'Remark', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '金额', name: 'TotalAmount', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '时间', name: 'CreateTime', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide:true | |||||
} | |||||
], | |||||
//isEdit:true, | |||||
isSubGrid: true, | |||||
mainId:'purchaseid', | |||||
height: 400, | |||||
isSubGrid: true, | |||||
subGridExpanded: function (subContentId, rowItem) { | |||||
$('#' + subContentId).jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/GetFormDetailData?keyValue=' + rowItem.purchaseid, | |||||
headData: [ | |||||
{ label: "采购物品名称", name: "Name", width: 100, align: "left" }, | |||||
{ label: "价格", name: "Price", width: 130, align: "left" }, | |||||
{ label: "采购数量", name: "Quantity", width: 100, align: "left" }, | |||||
{ label: "单位", name: "Unit", width: 150, align: "left" }, | |||||
{ label: "用途", name: "UseTo", width: 150, align: "left", }, | |||||
], | |||||
mainId: 'LessonNo', | |||||
isPage: false, | |||||
sidx: 'ReviewTime desc' | |||||
}); | |||||
var param; | |||||
param = param || {}; | |||||
param.StuNo = rowItem.StuNo; | |||||
$('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/GetFormData?keyValue=' + keyValue, function (data) { | |||||
console.log(data) | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
refreshGirdData = function (e) { | |||||
//console.log(e) | |||||
//计算总金额 | |||||
let totalamount = 0; | |||||
//清楚所有 | |||||
var datas = $('#Purchase_Travel_applydetails').jfGridGet('rowdatas').length | |||||
for (var i = 0; i < datas; i++) { | |||||
$('#Purchase_Travel_applydetails').jfGridSet('removeRow', $('#Purchase_Travel_applydetails').jfGridGet('rowdatas')[0].purchaseid); | |||||
} | |||||
for (var i = 0; i < e.length; i++) { | |||||
var itemdata = { | |||||
'Id': '', | |||||
'Remark': e[i].Remark, | |||||
'TotalAmount': e[i].TotalAmount, | |||||
'CreateTime': e[i].CreateTime, | |||||
'purchaseid': e[i].Id | |||||
}; | |||||
$('#Purchase_Travel_applydetails').jfGridSet('addRow', itemdata); | |||||
totalamount += e[i].TotalAmount; | |||||
} | |||||
$('#Totalamount').val(totalamount); | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = {}; | |||||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Travel_apply"]').lrGetFormData()); | |||||
postData.strPurchase_Travel_applydetailsList = JSON.stringify($('#Purchase_Travel_applydetails').jfGridGet('rowdatas')); | |||||
//postData.strPurchase_TravelEntity = JSON.stringify($('[data-table="Purchase_Travel"]').lrGetFormData()); | |||||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,47 @@ | |||||
@{ | |||||
ViewBag.Title = "教务报账申请"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">填报部门</div> | |||||
<input id="DepartmentId" type="text" disabled readonly class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">填报人</div> | |||||
<input id="Creator" type="text" disabled readonly class="form-control currentInfo lr-currentInfo-user" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">填报时间</div> | |||||
<input id="Createtime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Createtime').trigger('change'); } })" disabled readonly/> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">收款人<font face="宋体">*</font></div> | |||||
<input id="Payee" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" disabled readonly/> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">附件张数</div> | |||||
<input id="Attachcount" type="text" class="form-control" disabled/> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">申请报账金额<font face="宋体">*</font></div> | |||||
<input id="Totalamount" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" disabled readonly/> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="FilePath"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply"> | |||||
<div class="lr-form-item-title">核准金额</div> | |||||
<input id="Approvalamount" type="text" class="form-control" disabled readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">明细操作</div> | |||||
@*<input id="detailadd" type="button" class="btn btn-success" value="新增明细" /> | |||||
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" />*@ | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||||
<div id="Purchase_Travel_applydetails"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/FormView.js") |
@@ -0,0 +1,141 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-09-26 10:47 | |||||
* 描 述:办公采购申请 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
// 设置权限 | |||||
var setAuthorize; | |||||
// 设置表单数据 | |||||
var setFormData; | |||||
// 验证数据是否填写完整 | |||||
var validForm; | |||||
// 保存数据 | |||||
var save; | |||||
//绑定原课程安排 | |||||
var bindData; | |||||
//绑定新课程安排 | |||||
var bindDataNew; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
// 设置权限 | |||||
setAuthorize = function (data) { | |||||
}; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#FilePath').lrUploader({ isUpload: false }); | |||||
$('#Purchase_Travel_applydetails').jfGrid({ | |||||
headData: [ | |||||
{ | |||||
label: '采购单备注', name: 'Remark', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '金额', name: 'TotalAmount', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '时间', name: 'CreateTime', width: 120, align: 'left' | |||||
}, | |||||
{ | |||||
label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide: true | |||||
} | |||||
], | |||||
//isEdit:true, | |||||
isSubGrid: true, | |||||
mainId: 'purchaseid', | |||||
height: 400, | |||||
isSubGrid: true, | |||||
subGridExpanded: function (subContentId, rowItem) { | |||||
$('#' + subContentId).jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/GetFormDetailData?keyValue=' + rowItem.purchaseid, | |||||
headData: [ | |||||
{ label: "采购物品名称", name: "Name", width: 100, align: "left" }, | |||||
{ label: "价格", name: "Price", width: 130, align: "left" }, | |||||
{ label: "采购数量", name: "Quantity", width: 100, align: "left" }, | |||||
{ label: "单位", name: "Unit", width: 150, align: "left" }, | |||||
{ label: "用途", name: "UseTo", width: 150, align: "left", }, | |||||
], | |||||
mainId: 'LessonNo', | |||||
isPage: false, | |||||
sidx: 'ReviewTime desc' | |||||
}); | |||||
var param; | |||||
param = param || {}; | |||||
param.StuNo = rowItem.StuNo; | |||||
$('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
console.log(keyValue) | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
}; | |||||
// 设置表单数据 | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/GetFormDataByProcessId?processId=' + processId, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id] && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
//if (id == 'ArrangeLessonTermAttemper') { | |||||
keyValue = data[id].Id; | |||||
//} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | |||||
validForm = function () { | |||||
if (!$('#form').lrValidform()) { | |||||
return false; | |||||
} | |||||
return true; | |||||
}; | |||||
// 保存数据 | |||||
save = function (processId, callBack, i) { | |||||
var formData = $('body').lrGetFormData(); | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = {}; | |||||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Travel_Apply"]').lrGetFormData()); | |||||
postData.strPurchase_Travel_applydetailsList = JSON.stringify($('#Purchase_Travel_applydetails').jfGridGet('rowdatas')); | |||||
//var postData = { | |||||
// strEntity: JSON.stringify(formData) | |||||
//}; | |||||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(res, i); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,51 @@ | |||||
@{ | |||||
ViewBag.Title = "教务报账申请"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout " > | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">填报部门</div> | |||||
<div id="DepartmentId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">审核状态</div> | |||||
<div id="checkstatus"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">收款人</div> | |||||
<input id="Payee" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" > | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" > | |||||
<a id="lr-sub" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
<a id="lr-view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Index.js") |
@@ -0,0 +1,245 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-07-14 12:15 | |||||
* 描 述:教务报账申请 | |||||
*/ | |||||
var refreshGirdData; | |||||
var selectedRow; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var startTime; | |||||
var endTime; | |||||
var processId = ''; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 时间搜索框 | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '1', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#DepartmentId').lrDepartmentSelect(); | |||||
$('#checkstatus').lrselect({ | |||||
data: [{ text: '待审核', value: '0' }, { text: '审核中', value: '1' }, { text: '已审核', value: '2' }], | |||||
text: 'text', | |||||
value: 'value', | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/Form', | |||||
//url: top.$.rootUrl + '/lr_codedemo/griddemo/editindex', | |||||
width: 1000, | |||||
height: 800, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status != 0) { | |||||
learun.alert.warning("当前记录已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/Form?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status != 0) { | |||||
learun.alert.warning("当前记录已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/DeleteForm', { keyValue: keyValue}, function () { | |||||
//refreshGirdData(); | |||||
page.search(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 提交 | |||||
$('#lr-sub').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
console.log(keyValue) | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status != 0) { | |||||
learun.alert.warning("当前记录已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
processId = learun.newGuid(); | |||||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||||
//selectedRow.ProcessId = processId; | |||||
refreshGirdData(res, {}); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 查看 | |||||
$('#lr-view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (selectedRow.Status == 0) { | |||||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'formview', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/FormView?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/GetPageList', | |||||
headData: [ | |||||
{ label: "填报部门", name: "DepartmentId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('department', { | |||||
key: value, | |||||
callback: function (_data) { | |||||
callback(_data.name); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "填报人", name: "Creator", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('user', { | |||||
key: value, | |||||
callback: function (_data) { | |||||
callback(_data.name); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "填报时间", name: "Createtime", width: 100, align: "left"}, | |||||
{ label: "收款人", name: "Payee", width: 100, align: "left"}, | |||||
{ label: "附件张数", name: "Attachcount", width: 100, align: "left"}, | |||||
{ label: "申请报账金额", name: "Totalamount", width: 100, align: "left"}, | |||||
//{ label: "附件上传", name: "FilePath", width: 100, align: "left"}, | |||||
{ label: "核准金额", name: "Approvalamount", width: 100, align: "left" }, | |||||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "状态", name: "Status", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 1) { | |||||
return '<span class=\"label label-success\" >已提交</span>'; | |||||
} else { | |||||
return '<span class=\"label label-default\" >未提交</span>'; | |||||
} | |||||
} | |||||
}, | |||||
//{ | |||||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||||
// formatter: function (cellvalue, row) { | |||||
// return row.CheckUserName; | |||||
// } | |||||
//}, | |||||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 1) { | |||||
return '<span class=\"label label-warning\" >审核中</span>'; | |||||
} else if (cellvalue == 2) { | |||||
return '<span class=\"label label-success\" >审核通过</span>'; | |||||
} else { | |||||
return '<span class=\"label label-default\" >草稿</span>'; | |||||
} | |||||
} | |||||
}, | |||||
], | |||||
mainId:'Id', | |||||
isPage: true | |||||
}); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function (res, postData) { | |||||
//$('#gridtable').jfGridSet('reload'); | |||||
if (res && res.code && res.code == 200) { | |||||
// 发起流程 | |||||
var postData = { | |||||
schemeCode: '1-5',// 填写流程对应模板编号 | |||||
processId: processId, | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -410,7 +410,11 @@ | |||||
<Compile Include="Areas\LogisticsManagement\Controllers\APAppointmentPsychologistController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\APAppointmentPsychologistController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\CompanyNewsController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\CompanyNewsController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\DormitoryReturnController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\DormitoryReturnController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_TravelController.cs" /> | |||||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_ServiceController.cs" /> | |||||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_EduController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\Purchase_EduController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Service_ApplyController.cs" /> | |||||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Travel_ApplyController.cs" /> | |||||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_InfoController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\Purchase_InfoController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Info_ApplyController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Info_ApplyController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_LogisticController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\Purchase_LogisticController.cs" /> | ||||
@@ -1431,6 +1435,13 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\Form.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\FormView.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\FormView.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\Index.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\Index.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service\Form.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service\FormView.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service\Index.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service_Apply\FindBack.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service_Apply\Form.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service_Apply\FormView.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service_Apply\Index.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Student\Form.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student\FormView.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Student\FormView.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student\Index.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Student\Index.js" /> | ||||
@@ -1438,6 +1449,13 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\Form.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\FormView.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\FormView.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\Index.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\Index.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel\Form.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel\FormView.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel\Index.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel_Apply\FindBack.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel_Apply\Form.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel_Apply\FormView.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel_Apply\Index.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work\FormView.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Work\FormView.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\FindBack.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\FindBack.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\Form.js" /> | ||||
@@ -7929,6 +7947,20 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\Form.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\Form.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\FormView.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\FormView.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\Index.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\Index.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service\Form.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service\FormView.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service\Index.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service_Apply\FindBack.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service_Apply\Form.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service_Apply\FormView.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Service_Apply\Index.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel\Form.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel\FormView.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel\Index.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel_Apply\FindBack.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel_Apply\Form.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel_Apply\FormView.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel_Apply\Index.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -145,10 +145,17 @@ | |||||
<Compile Include="LogisticsManagement\Purchase_Print_ApplydetailsMap.cs" /> | <Compile Include="LogisticsManagement\Purchase_Print_ApplydetailsMap.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Print_ApplyMap.cs" /> | <Compile Include="LogisticsManagement\Purchase_Print_ApplyMap.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Print_DetailsMap.cs" /> | <Compile Include="LogisticsManagement\Purchase_Print_DetailsMap.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_ServiceMap.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service_ApplydetailsMap.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service_ApplyMap.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service_DetailsMap.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_StudentMap.cs" /> | <Compile Include="LogisticsManagement\Purchase_StudentMap.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Student_ApplydetailsMap.cs" /> | <Compile Include="LogisticsManagement\Purchase_Student_ApplydetailsMap.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Student_ApplyMap.cs" /> | <Compile Include="LogisticsManagement\Purchase_Student_ApplyMap.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Student_DetailsMap.cs" /> | <Compile Include="LogisticsManagement\Purchase_Student_DetailsMap.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_TravelMap.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Travel_ApplydetailsMap.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Travel_ApplyMap.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Work_ApplydetailsMap.cs" /> | <Compile Include="LogisticsManagement\Purchase_Work_ApplydetailsMap.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Work_ApplyMap.cs" /> | <Compile Include="LogisticsManagement\Purchase_Work_ApplyMap.cs" /> | ||||
<Compile Include="LR_App\DTImgMap.cs" /> | <Compile Include="LR_App\DTImgMap.cs" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_ServiceMap : EntityTypeConfiguration<Purchase_ServiceEntity> | |||||
{ | |||||
public Purchase_ServiceMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("PURCHASE_SERVICE"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Service_ApplyMap : EntityTypeConfiguration<Purchase_Service_ApplyEntity> | |||||
{ | |||||
public Purchase_Service_ApplyMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("PURCHASE_SERVICE_APPLY"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Service_ApplydetailsMap : EntityTypeConfiguration<Purchase_Service_ApplydetailsEntity> | |||||
{ | |||||
public Purchase_Service_ApplydetailsMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("PURCHASE_SERVICE_APPLYDETAILS"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_Service_DetailsMap : EntityTypeConfiguration<Purchase_Service_DetailsEntity> | |||||
{ | |||||
public Purchase_Service_DetailsMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("PURCHASE_SERVICE_DETAILS"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_TravelMap : EntityTypeConfiguration<Purchase_TravelEntity> | |||||
{ | |||||
public Purchase_TravelMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("PURCHASE_TRAVEL"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Travel_ApplyMap : EntityTypeConfiguration<Purchase_Travel_ApplyEntity> | |||||
{ | |||||
public Purchase_Travel_ApplyMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("PURCHASE_TRAVEL_APPLY"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Travel_ApplydetailsMap : EntityTypeConfiguration<Purchase_Travel_ApplydetailsEntity> | |||||
{ | |||||
public Purchase_Travel_ApplydetailsMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("PURCHASE_TRAVEL_APPLYDETAILS"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -427,6 +427,16 @@ | |||||
<Compile Include="LogisticsManagement\Purchase_Print_Apply\Purchase_Print_ApplyEntity.cs" /> | <Compile Include="LogisticsManagement\Purchase_Print_Apply\Purchase_Print_ApplyEntity.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Print_Apply\Purchase_Print_ApplyIBLL.cs" /> | <Compile Include="LogisticsManagement\Purchase_Print_Apply\Purchase_Print_ApplyIBLL.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Print_Apply\Purchase_Print_ApplyService.cs" /> | <Compile Include="LogisticsManagement\Purchase_Print_Apply\Purchase_Print_ApplyService.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Service\Purchase_ServiceBLL.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service\Purchase_ServiceEntity.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service\Purchase_ServiceIBLL.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service\Purchase_ServiceService.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service\Purchase_Service_DetailsEntity.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service_Apply\Purchase_Service_ApplyBLL.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service_Apply\Purchase_Service_ApplydetailsEntity.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service_Apply\Purchase_Service_ApplyEntity.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service_Apply\Purchase_Service_ApplyIBLL.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Service_Apply\Purchase_Service_ApplyService.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentBLL.cs" /> | <Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentBLL.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentEntity.cs" /> | <Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentEntity.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentIBLL.cs" /> | <Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentIBLL.cs" /> | ||||
@@ -437,6 +447,15 @@ | |||||
<Compile Include="LogisticsManagement\Purchase_Student_Apply\Purchase_Student_ApplyEntity.cs" /> | <Compile Include="LogisticsManagement\Purchase_Student_Apply\Purchase_Student_ApplyEntity.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Student_Apply\Purchase_Student_ApplyIBLL.cs" /> | <Compile Include="LogisticsManagement\Purchase_Student_Apply\Purchase_Student_ApplyIBLL.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Student_Apply\Purchase_Student_ApplyService.cs" /> | <Compile Include="LogisticsManagement\Purchase_Student_Apply\Purchase_Student_ApplyService.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Travel\Purchase_TravelBLL.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Travel\Purchase_TravelEntity.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Travel\Purchase_TravelIBLL.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Travel\Purchase_TravelService.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Travel_Apply\Purchase_Travel_ApplyBLL.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Travel_Apply\Purchase_Travel_ApplydetailsEntity.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Travel_Apply\Purchase_Travel_ApplyEntity.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Travel_Apply\Purchase_Travel_ApplyIBLL.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Travel_Apply\Purchase_Travel_ApplyService.cs" /> | |||||
<Compile Include="LogisticsManagement\Purchase_Work_Apply\Purchase_Work_ApplyBLL.cs" /> | <Compile Include="LogisticsManagement\Purchase_Work_Apply\Purchase_Work_ApplyBLL.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Work_Apply\Purchase_Work_ApplydetailsEntity.cs" /> | <Compile Include="LogisticsManagement\Purchase_Work_Apply\Purchase_Work_ApplydetailsEntity.cs" /> | ||||
<Compile Include="LogisticsManagement\Purchase_Work_Apply\Purchase_Work_ApplyEntity.cs" /> | <Compile Include="LogisticsManagement\Purchase_Work_Apply\Purchase_Work_ApplyEntity.cs" /> | ||||
@@ -0,0 +1,272 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_ServiceBLL : Purchase_ServiceIBLL | |||||
{ | |||||
private Purchase_ServiceService Purchase_ServiceService = new Purchase_ServiceService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_ServiceEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_ServiceService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_ServiceEntity> GetDataList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_ServiceService.GetDataList( queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Details表数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_Service_DetailsEntity> GetPurchase_Service_DetailsList(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_ServiceService.GetPurchase_Service_DetailsList(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_ServiceEntity GetPurchase_ServiceEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_ServiceService.GetPurchase_ServiceEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Details表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_Service_DetailsEntity GetPurchase_Service_DetailsEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_ServiceService.GetPurchase_Service_DetailsEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Purchase_ServiceEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_ServiceService.GetEntityByProcessId(processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_ServiceService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, Purchase_ServiceEntity entity,List<Purchase_Service_DetailsEntity> Purchase_Service_DetailsList) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_ServiceService.SaveEntity(keyValue, entity,Purchase_Service_DetailsList); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_ServiceService.ModifyStatus(keyValue, status, processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 修改课程异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatusByProcessId(int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_ServiceService.ModifyStatusByProcessId(status, processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,129 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_ServiceEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 申请部门name | |||||
/// </summary> | |||||
[Column("DEPARTMENTNAME")] | |||||
public string DepartmentName { get; set; } | |||||
/// <summary> | |||||
/// 申请部门 | |||||
/// </summary> | |||||
[Column("DEPARTMENTID")] | |||||
public string DepartmentId { get; set; } | |||||
/// <summary> | |||||
/// 申请人 | |||||
/// </summary> | |||||
[Column("CREATORID")] | |||||
public string CreatorId { get; set; } | |||||
/// <summary> | |||||
/// 申请人 | |||||
/// </summary> | |||||
[Column("CREATORNAME")] | |||||
public string CreatorName { get; set; } | |||||
/// <summary> | |||||
/// 申请时间 | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
/// <summary> | |||||
/// 采购总价 | |||||
/// </summary> | |||||
[Column("TOTALAMOUNT")] | |||||
public decimal? TotalAmount { get; set; } | |||||
/// <summary> | |||||
/// 备注 | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// 附件 | |||||
/// </summary> | |||||
[Column("FILEPATH")] | |||||
public string FilePath { get; set; } | |||||
/// <summary> | |||||
/// 是否草稿箱 | |||||
/// </summary> | |||||
[Column("STATUS")] | |||||
public int Status { get; set; } | |||||
/// <summary> | |||||
/// 提交时间 | |||||
/// </summary> | |||||
[Column("SUBMITTIME")] | |||||
public DateTime? SubmitTime { get; set; } | |||||
/// <summary> | |||||
/// 审核时间 | |||||
/// </summary> | |||||
[Column("CheckTime")] | |||||
public DateTime? CheckTime { get; set; } | |||||
/// <summary> | |||||
/// 审核人id | |||||
/// </summary> | |||||
[Column("CHECKUSERID")] | |||||
public string CheckUserId { get; set; } | |||||
/// <summary> | |||||
/// 审核人 | |||||
/// </summary> | |||||
[Column("CHECKUSERNAME")] | |||||
public string CheckUserName { get; set; } | |||||
/// <summary> | |||||
/// 审核状态 | |||||
/// </summary> | |||||
[Column("CHECKSTATUS")] | |||||
public int CheckStatus { get; set; } | |||||
/// <summary> | |||||
/// 工作流Id | |||||
/// </summary> | |||||
[Column("ProcessId")] | |||||
public string ProcessId { get; set; } | |||||
/// <summary> | |||||
/// 报账状态 | |||||
/// </summary> | |||||
[Column("APPLYSTATUS")] | |||||
public int ApplyStatus { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
this.CreateTime = DateTime.Now; | |||||
this.Status = 0; | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,89 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public interface Purchase_ServiceIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Purchase_ServiceEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Purchase_ServiceEntity> GetDataList(string queryJson); | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Details表数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
IEnumerable<Purchase_Service_DetailsEntity> GetPurchase_Service_DetailsList(string keyValue); | |||||
/// <summary> | |||||
/// 获取Purchase_Service表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Purchase_ServiceEntity GetPurchase_ServiceEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Details表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Purchase_Service_DetailsEntity GetPurchase_Service_DetailsEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
Purchase_ServiceEntity GetEntityByProcessId(string processId); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, Purchase_ServiceEntity entity,List<Purchase_Service_DetailsEntity> purchase_Work_DetailsList); | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
void ModifyStatus(string keyValue, int status, string processId); | |||||
/// <summary> | |||||
/// 修改异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
void ModifyStatusByProcessId(int status, string processId); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,405 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_ServiceService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_ServiceEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.DepartmentId, | |||||
t.DepartmentName, | |||||
t.CreatorId, | |||||
t.CreatorName, | |||||
t.TotalAmount, | |||||
t.Remark, | |||||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.Applystatus | |||||
"); | |||||
strSql.Append(" FROM Purchase_Service t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( t.CreateTime >= @startTime AND t.CreateTime <= @endTime ) "); | |||||
} | |||||
if (!queryParam["keyword"].IsEmpty()) | |||||
{ | |||||
dp.Add("@remark", "%" + queryParam["keyword"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND (t.remark Like @remark) "); | |||||
} | |||||
if (!queryParam["ApplyStatus"].IsEmpty()) | |||||
{ | |||||
//报账状态 | |||||
//采购审批通过且报账状态为0的数据 | |||||
dp.Add("@ApplyStatus", queryParam["ApplyStatus"].ToString(), DbType.String); | |||||
strSql.Append(" AND (t.ApplyStatus=@ApplyStatus)"); | |||||
} | |||||
if (!queryParam["checkstatus"].IsEmpty()) | |||||
{ | |||||
//审核状态 | |||||
//采购审批通过且报账状态为0的数据 | |||||
dp.Add("@CheckStatus", queryParam["checkstatus"].ToString(), DbType.String); | |||||
strSql.Append(" AND (t.CheckStatus=@CheckStatus)"); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Purchase_ServiceEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_ServiceEntity> GetDataList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.DepartmentId, | |||||
t.DepartmentName, | |||||
t.CreatorId, | |||||
t.CreatorName, | |||||
t.TotalAmount, | |||||
t.Remark, | |||||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.ApplyStatus | |||||
"); | |||||
strSql.Append(" FROM Purchase_Service t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["Crreator"].IsEmpty()) | |||||
{ | |||||
dp.Add("CreatorId", queryParam["Crreator"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND t.CreatorId = @CreatorId "); | |||||
} | |||||
if (!queryParam["keyword"].IsEmpty()) | |||||
{ | |||||
dp.Add("@remark", "%" + queryParam["keyword"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND (t.remark Like @remark) "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Purchase_ServiceEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Details表数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_Service_DetailsEntity> GetPurchase_Service_DetailsList(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindList<Purchase_Service_DetailsEntity>(t=>t.Fid == keyValue ); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_ServiceEntity GetPurchase_ServiceEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_ServiceEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Details表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_Service_DetailsEntity GetPurchase_Service_DetailsEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_Service_DetailsEntity>(t=>t.Fid == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Purchase_ServiceEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_ServiceEntity>(t => t.ProcessId == processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var Purchase_ServiceEntity = GetPurchase_ServiceEntity(keyValue); | |||||
db.Delete<Purchase_ServiceEntity>(t=>t.Id == keyValue); | |||||
db.Delete<Purchase_Service_DetailsEntity>(t=>t.Fid == Purchase_ServiceEntity.Id); | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, Purchase_ServiceEntity entity,List<Purchase_Service_DetailsEntity> Purchase_Service_DetailsList) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
var Purchase_ServiceEntityTmp = GetPurchase_ServiceEntity(keyValue); | |||||
entity.Modify(keyValue); | |||||
db.Update(entity); | |||||
db.Delete<Purchase_Service_DetailsEntity>(t=>t.Fid == Purchase_ServiceEntityTmp.Id); | |||||
foreach (Purchase_Service_DetailsEntity item in Purchase_Service_DetailsList) | |||||
{ | |||||
item.Create(); | |||||
item.Fid = Purchase_ServiceEntityTmp.Id; | |||||
db.Insert(item); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
db.Insert(entity); | |||||
foreach (Purchase_Service_DetailsEntity item in Purchase_Service_DetailsList) | |||||
{ | |||||
item.Create(); | |||||
item.Fid = entity.Id; | |||||
db.Insert(item); | |||||
} | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
var now = DateTime.Now; | |||||
var entity = this.BaseRepository("CollegeMIS").FindEntity<Purchase_ServiceEntity>(x => x.Id == keyValue); | |||||
if (entity != null) | |||||
{ | |||||
entity.Status = status; | |||||
entity.ProcessId = processId; | |||||
entity.SubmitTime = now; | |||||
entity.CheckStatus = 1; | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 修改异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatusByProcessId(int status, string processId) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
var now = DateTime.Now; | |||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
try | |||||
{ | |||||
var entity = db.FindEntity<Purchase_ServiceEntity>(x => x.ProcessId == processId); | |||||
if (entity != null) | |||||
{ | |||||
//审核通过 | |||||
if (status == 2) | |||||
{ | |||||
} | |||||
else | |||||
{ | |||||
entity.Status = status; | |||||
} | |||||
//更新课程异动表的审核状态 | |||||
entity.CheckStatus = status; | |||||
entity.CheckUserId = loginUserInfo.userId; | |||||
entity.CheckUserName = loginUserInfo.realName; | |||||
entity.CheckTime = now; | |||||
db.Update(entity); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,79 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_Service_DetailsEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 所属主表ID | |||||
/// </summary> | |||||
[Column("FID")] | |||||
public string Fid { get; set; } | |||||
/// <summary> | |||||
/// 人数 | |||||
/// </summary> | |||||
[Column("PEOPLECOUNT")] | |||||
public string Peoplecount { get; set; } | |||||
/// <summary> | |||||
/// 估价 | |||||
/// </summary> | |||||
[Column("PRICE")] | |||||
public decimal? Price { get; set; } | |||||
/// <summary> | |||||
/// 天数 | |||||
/// </summary> | |||||
[Column("DAYS")] | |||||
public string Days { get; set; } | |||||
/// <summary> | |||||
/// 标准 | |||||
/// </summary> | |||||
[Column("STANDAR")] | |||||
public string Standar { get; set; } | |||||
/// <summary> | |||||
/// 维修内容 | |||||
/// </summary> | |||||
[Column("SERVICECONTENT")] | |||||
public string ServiceContent { get; set; } | |||||
/// <summary> | |||||
/// CreateTime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
this.CreateTime = DateTime.Now; | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,249 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Service_ApplyBLL : Purchase_Service_ApplyIBLL | |||||
{ | |||||
private Purchase_Service_ApplyService Purchase_Service_ApplyService = new Purchase_Service_ApplyService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_Service_ApplyEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_Service_ApplyService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Applydetails表数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_Service_ApplydetailsEntity> GetPurchase_Service_ApplydetailsList(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_Service_ApplyService.GetPurchase_Service_ApplydetailsList(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Apply表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_Service_ApplyEntity GetPurchase_Service_ApplyEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_Service_ApplyService.GetPurchase_Service_ApplyEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Applydetails表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_Service_ApplydetailsEntity GetPurchase_Service_ApplydetailsEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_Service_ApplyService.GetPurchase_Service_ApplydetailsEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Purchase_Service_ApplyEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_Service_ApplyService.GetEntityByProcessId(processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_Service_ApplyService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, Purchase_Service_ApplyEntity entity,List<Purchase_Service_ApplydetailsEntity> Purchase_Service_applydetailsList) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_Service_ApplyService.SaveEntity(keyValue, entity,Purchase_Service_applydetailsList); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_Service_ApplyService.ModifyStatus(keyValue, status, processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 修改课程异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatusByProcessId(int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_Service_ApplyService.ModifyStatusByProcessId(status, processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,129 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Service_ApplyEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// DepartmentId | |||||
/// </summary> | |||||
[Column("DEPARTMENTID")] | |||||
public string DepartmentId { get; set; } | |||||
/// <summary> | |||||
/// Creator | |||||
/// </summary> | |||||
[Column("CREATOR")] | |||||
public string Creator { get; set; } | |||||
/// <summary> | |||||
/// Createtime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? Createtime { get; set; } | |||||
/// <summary> | |||||
/// Payee | |||||
/// </summary> | |||||
[Column("PAYEE")] | |||||
public string Payee { get; set; } | |||||
/// <summary> | |||||
/// Attachcount | |||||
/// </summary> | |||||
[Column("ATTACHCOUNT")] | |||||
public string Attachcount { get; set; } | |||||
/// <summary> | |||||
/// Totalamount | |||||
/// </summary> | |||||
[Column("TOTALAMOUNT")] | |||||
public decimal? Totalamount { get; set; } | |||||
/// <summary> | |||||
/// FilePath | |||||
/// </summary> | |||||
[Column("FILEPATH")] | |||||
public string FilePath { get; set; } | |||||
/// <summary> | |||||
/// Remark | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// Approvalamount | |||||
/// </summary> | |||||
[Column("APPROVALAMOUNT")] | |||||
public decimal? Approvalamount { get; set; } | |||||
/// <summary> | |||||
/// Status | |||||
/// </summary> | |||||
[Column("STATUS")] | |||||
public int Status { get; set; } | |||||
/// <summary> | |||||
/// SubmitTime | |||||
/// </summary> | |||||
[Column("SUBMITTIME")] | |||||
public DateTime? SubmitTime { get; set; } | |||||
/// <summary> | |||||
/// CheckTime | |||||
/// </summary> | |||||
[Column("CHECKTIME")] | |||||
public DateTime? CheckTime { get; set; } | |||||
/// <summary> | |||||
/// CheckUserId | |||||
/// </summary> | |||||
[Column("CHECKUSERID")] | |||||
public string CheckUserId { get; set; } | |||||
/// <summary> | |||||
/// CheckUserName | |||||
/// </summary> | |||||
[Column("CHECKUSERNAME")] | |||||
public string CheckUserName { get; set; } | |||||
/// <summary> | |||||
/// CheckStatus | |||||
/// </summary> | |||||
[Column("CHECKSTATUS")] | |||||
public int CheckStatus { get; set; } | |||||
/// <summary> | |||||
/// ProcessId | |||||
/// </summary> | |||||
[Column("PROCESSID")] | |||||
public string ProcessId { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
[NotMapped] | |||||
public string deptname { set; get; } | |||||
[NotMapped] | |||||
public string creatorname { set; get; } | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,82 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public interface Purchase_Service_ApplyIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Purchase_Service_ApplyEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Purchase_Service_applydetails表数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
IEnumerable<Purchase_Service_ApplydetailsEntity> GetPurchase_Service_ApplydetailsList(string keyValue); | |||||
/// <summary> | |||||
/// 获取Purchase_Service_apply表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Purchase_Service_ApplyEntity GetPurchase_Service_ApplyEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取Purchase_Service_applydetails表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Purchase_Service_ApplydetailsEntity GetPurchase_Service_ApplydetailsEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
Purchase_Service_ApplyEntity GetEntityByProcessId(string processId); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, Purchase_Service_ApplyEntity entity,List<Purchase_Service_ApplydetailsEntity> Purchase_Service_applydetailsList); | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
void ModifyStatus(string keyValue, int status, string processId); | |||||
/// <summary> | |||||
/// 修改异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
void ModifyStatusByProcessId(int status, string processId); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,401 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Service_ApplyService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_Service_ApplyEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var database = this.BaseRepository().getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.DepartmentId, | |||||
c.f_fullname as deptname, | |||||
t.Creator, | |||||
b.f_realname as creatorname, | |||||
t.Createtime, | |||||
t.Payee, | |||||
t.Attachcount, | |||||
t.Totalamount, | |||||
t.FilePath, | |||||
t.Approvalamount, | |||||
t.Status, | |||||
t.submittime, | |||||
t.checktime, | |||||
t.checkstatus | |||||
"); | |||||
strSql.Append(" FROM Purchase_Service_Apply t "); | |||||
strSql.Append(" left join " + database + ".dbo.LR_Base_User b on b.F_UserId=t.creator "); | |||||
strSql.Append(" left join " + database + ".dbo.LR_Base_Department c on c.F_DepartmentId=t.departmentId"); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( t.Createtime >= @startTime AND t.Createtime <= @endTime ) "); | |||||
} | |||||
if (!queryParam["DepartmentId"].IsEmpty()) | |||||
{ | |||||
dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DepartmentId = @DepartmentId "); | |||||
} | |||||
if (!queryParam["checkstatus"].IsEmpty()) | |||||
{ | |||||
dp.Add("checkstatus", queryParam["checkstatus"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.checkstatus = @checkstatus "); | |||||
} | |||||
if (!queryParam["Payee"].IsEmpty()) | |||||
{ | |||||
dp.Add("Payee", "%" + queryParam["Payee"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.Payee Like @Payee "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Purchase_Service_ApplyEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Applydetails表数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_Service_ApplydetailsEntity> GetPurchase_Service_ApplydetailsList(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = "select a.*,b.Remark,b.Createtime,b.totalamount from Purchase_Service_Applydetails a left join Purchase_Service b on b.id=a.purchaseid where applyid='"+keyValue+"'"; | |||||
var data = this.BaseRepository("CollegeMIS").FindList<Purchase_Service_ApplydetailsEntity>(sql);// as List<Purchase_Service_ApplydetailsEntity>; | |||||
//this.BaseRepository("CollegeMIS").FindList<Purchase_Service_ApplydetailsEntity>(t => t.applyid == keyValue); | |||||
return data; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Apply表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_Service_ApplyEntity GetPurchase_Service_ApplyEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_Service_ApplyEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Service_Applydetails表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_Service_ApplydetailsEntity GetPurchase_Service_ApplydetailsEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_Service_ApplydetailsEntity>(t=>t.applyid == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Purchase_Service_ApplyEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_Service_ApplyEntity>(t => t.ProcessId == processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var Purchase_Service_ApplyEntity = GetPurchase_Service_ApplyEntity(keyValue); | |||||
var Purchase_Service_ApplydetailsEntity = GetPurchase_Service_ApplydetailsEntity(Purchase_Service_ApplyEntity.Id); | |||||
db.Delete<Purchase_Service_ApplyEntity>(t=>t.Id == keyValue); | |||||
db.Delete<Purchase_Service_ApplydetailsEntity>(t=>t.applyid == Purchase_Service_ApplyEntity.Id); | |||||
//同时要更新对应账单的报账状态 | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, Purchase_Service_ApplyEntity entity,List<Purchase_Service_ApplydetailsEntity> Purchase_Service_ApplydetailsList) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
var Purchase_Service_ApplyEntityTmp = GetPurchase_Service_ApplyEntity(keyValue); | |||||
var Purchase_Service_ApplydetailsEntityTmp = GetPurchase_Service_ApplydetailsEntity(Purchase_Service_ApplyEntityTmp.Id); | |||||
entity.Modify(keyValue); | |||||
db.Update(entity); | |||||
db.Delete<Purchase_Service_ApplydetailsEntity>(t=>t.applyid == Purchase_Service_ApplyEntityTmp.Id); | |||||
foreach (Purchase_Service_ApplydetailsEntity item in Purchase_Service_ApplydetailsList) | |||||
{ | |||||
item.Create(); | |||||
item.applyid = Purchase_Service_ApplyEntityTmp.Id; | |||||
db.Insert(item); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
db.Insert(entity); | |||||
foreach (Purchase_Service_ApplydetailsEntity item in Purchase_Service_ApplydetailsList) | |||||
{ | |||||
item.Create(); | |||||
item.applyid = entity.Id; | |||||
db.Insert(item); | |||||
} | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
var now = DateTime.Now; | |||||
var db = this.BaseRepository("CollegeMIS"); | |||||
db.BeginTrans(); | |||||
var entity = this.BaseRepository("CollegeMIS").FindEntity<Purchase_Service_ApplyEntity>(x => x.Id == keyValue); | |||||
if (entity != null) | |||||
{ | |||||
entity.Status = status; | |||||
entity.ProcessId = processId; | |||||
entity.SubmitTime = now; | |||||
entity.CheckStatus = 1; | |||||
db.Update(entity); | |||||
//所有子表数据状态更新为报账中 | |||||
var details= this.BaseRepository("CollegeMIS").FindList<Purchase_Service_ApplydetailsEntity>(x => x.applyid == keyValue); | |||||
foreach (var item in details) | |||||
{ | |||||
var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity<Purchase_ServiceEntity>(x => x.Id == item.purchaseid); | |||||
purchasemodel.ApplyStatus = 1; | |||||
db.Update(purchasemodel); | |||||
} | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 修改异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatusByProcessId(int status, string processId) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
var now = DateTime.Now; | |||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
try | |||||
{ | |||||
var entity = db.FindEntity<Purchase_Service_ApplyEntity>(x => x.ProcessId == processId); | |||||
if (entity != null) | |||||
{ | |||||
//获取所有的账单数据 | |||||
var details = this.BaseRepository("CollegeMIS").FindList<Purchase_Service_ApplydetailsEntity>(x => x.applyid == entity.Id); | |||||
//审核通过 | |||||
if (status == 2) | |||||
{ | |||||
foreach (var item in details) | |||||
{ | |||||
var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity<Purchase_ServiceEntity>(x => x.Id == item.purchaseid); | |||||
purchasemodel.ApplyStatus = 2; | |||||
db.Update(purchasemodel); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
//这里是回滚订单到草稿箱 | |||||
entity.Status = status; | |||||
//把对应的账单数据报账状态回滚到待报账 | |||||
foreach (var item in details) | |||||
{ | |||||
var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity<Purchase_ServiceEntity>(x => x.Id == item.purchaseid); | |||||
purchasemodel.ApplyStatus = 0; | |||||
db.Update(purchasemodel); | |||||
} | |||||
} | |||||
//更新课程异动表的审核状态 | |||||
entity.CheckStatus = status; | |||||
entity.CheckUserId = loginUserInfo.userId; | |||||
entity.CheckUserName = loginUserInfo.realName; | |||||
entity.CheckTime = now; | |||||
db.Update(entity); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,60 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Service_ApplydetailsEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// applyid | |||||
/// </summary> | |||||
[Column("APPLYID")] | |||||
public string applyid { get; set; } | |||||
/// <summary> | |||||
/// purchaseid | |||||
/// </summary> | |||||
[Column("PURCHASEID")] | |||||
public string purchaseid { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
[NotMapped] | |||||
public string Remark { set; get; } | |||||
[NotMapped] | |||||
public double TotalAmount { set; get; } | |||||
[NotMapped] | |||||
public string CreateTime { set; get; } | |||||
} | |||||
} | |||||
@@ -0,0 +1,226 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_TravelBLL : Purchase_TravelIBLL | |||||
{ | |||||
private Purchase_TravelService Purchase_TravelService = new Purchase_TravelService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_TravelEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_TravelService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_TravelEntity> GetDataList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_TravelService.GetDataList( queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Travel表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_TravelEntity GetPurchase_TravelEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_TravelService.GetPurchase_TravelEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Purchase_TravelEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_TravelService.GetEntityByProcessId(processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_TravelService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, Purchase_TravelEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_TravelService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_TravelService.ModifyStatus(keyValue, status, processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 修改课程异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatusByProcessId(int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_TravelService.ModifyStatusByProcessId(status, processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,133 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_TravelEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 申请人 | |||||
/// </summary> | |||||
[Column("CREATORID")] | |||||
public string CreatorId { get; set; } | |||||
/// <summary> | |||||
/// 申请人 | |||||
/// </summary> | |||||
[Column("CREATORNAME")] | |||||
public string CreatorName { get; set; } | |||||
/// <summary> | |||||
/// 申请时间 | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
/// <summary> | |||||
/// 随行人员 | |||||
/// </summary> | |||||
[Column("FOLLOWS")] | |||||
public string Follows { get; set; } | |||||
/// <summary> | |||||
/// 原因 | |||||
/// </summary> | |||||
[Column("REASON")] | |||||
public string Reason { get; set; } | |||||
/// <summary> | |||||
/// 开始时间 | |||||
/// </summary> | |||||
[Column("STARTTIME")] | |||||
public DateTime? Starttime { get; set; } | |||||
/// <summary> | |||||
/// 结束时间 | |||||
/// </summary> | |||||
[Column("ENDTIME")] | |||||
public DateTime? Endtime { get; set; } | |||||
/// <summary> | |||||
/// 附件 | |||||
/// </summary> | |||||
[Column("FILEPATH")] | |||||
public string FilePath { get; set; } | |||||
/// <summary> | |||||
/// 是否草稿箱 | |||||
/// </summary> | |||||
[Column("STATUS")] | |||||
public int Status { get; set; } | |||||
/// <summary> | |||||
/// 提交时间 | |||||
/// </summary> | |||||
[Column("SUBMITTIME")] | |||||
public DateTime? SubmitTime { get; set; } | |||||
/// <summary> | |||||
/// 审核时间 | |||||
/// </summary> | |||||
[Column("CheckTime")] | |||||
public DateTime? CheckTime { get; set; } | |||||
/// <summary> | |||||
/// 审核人id | |||||
/// </summary> | |||||
[Column("CHECKUSERID")] | |||||
public string CheckUserId { get; set; } | |||||
/// <summary> | |||||
/// 审核人 | |||||
/// </summary> | |||||
[Column("CHECKUSERNAME")] | |||||
public string CheckUserName { get; set; } | |||||
/// <summary> | |||||
/// 审核状态 | |||||
/// </summary> | |||||
[Column("CHECKSTATUS")] | |||||
public int CheckStatus { get; set; } | |||||
/// <summary> | |||||
/// 工作流Id | |||||
/// </summary> | |||||
[Column("PROCESSID")] | |||||
public string ProcessId { get; set; } | |||||
/// <summary> | |||||
/// 报账状态 | |||||
/// </summary> | |||||
[Column("APPLYSTATUS")] | |||||
public int ApplyStatus { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
this.CreateTime = DateTime.Now; | |||||
this.Status = 0; | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,78 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public interface Purchase_TravelIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Purchase_TravelEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Purchase_TravelEntity> GetDataList(string queryJson); | |||||
/// <summary> | |||||
/// 获取Purchase_Travel表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Purchase_TravelEntity GetPurchase_TravelEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
Purchase_TravelEntity GetEntityByProcessId(string processId); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, Purchase_TravelEntity entity); | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
void ModifyStatus(string keyValue, int status, string processId); | |||||
/// <summary> | |||||
/// 修改异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
void ModifyStatusByProcessId(int status, string processId); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,347 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-06-25 18:33 | |||||
/// 描 述:申请类 | |||||
/// </summary> | |||||
public class Purchase_TravelService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_TravelEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.CreatorId, | |||||
t.CreatorName, | |||||
t.Follows, | |||||
t.Reason, | |||||
t.Starttime, | |||||
t.Endtime, | |||||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.Applystatus | |||||
"); | |||||
strSql.Append(" FROM Purchase_Travel t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( t.CreateTime >= @startTime AND t.CreateTime <= @endTime ) "); | |||||
} | |||||
if (!queryParam["keyword"].IsEmpty()) | |||||
{ | |||||
dp.Add("@Reason", "%" + queryParam["keyword"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND (t.Reason Like @Reason) "); | |||||
} | |||||
if (!queryParam["ApplyStatus"].IsEmpty()) | |||||
{ | |||||
//报账状态 | |||||
//采购审批通过且报账状态为0的数据 | |||||
dp.Add("@ApplyStatus", queryParam["ApplyStatus"].ToString(), DbType.String); | |||||
strSql.Append(" AND (t.ApplyStatus=@ApplyStatus)"); | |||||
} | |||||
if (!queryParam["checkstatus"].IsEmpty()) | |||||
{ | |||||
//审核状态 | |||||
//采购审批通过且报账状态为0的数据 | |||||
dp.Add("@CheckStatus", queryParam["checkstatus"].ToString(), DbType.String); | |||||
strSql.Append(" AND (t.CheckStatus=@CheckStatus)"); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Purchase_TravelEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_TravelEntity> GetDataList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.DepartmentId, | |||||
t.DepartmentName, | |||||
t.CreatorId, | |||||
t.CreatorName, | |||||
t.TotalAmount, | |||||
t.Remark, | |||||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.ApplyStatus | |||||
"); | |||||
strSql.Append(" FROM Purchase_Travel t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["Crreator"].IsEmpty()) | |||||
{ | |||||
dp.Add("CreatorId", queryParam["Crreator"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND t.CreatorId = @CreatorId "); | |||||
} | |||||
if (!queryParam["keyword"].IsEmpty()) | |||||
{ | |||||
dp.Add("@remark", "%" + queryParam["keyword"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND (t.remark Like @remark) "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Purchase_TravelEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Travel表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_TravelEntity GetPurchase_TravelEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_TravelEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Purchase_TravelEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_TravelEntity>(t => t.ProcessId == processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var Purchase_TravelEntity = GetPurchase_TravelEntity(keyValue); | |||||
db.Delete<Purchase_TravelEntity>(t=>t.Id == keyValue); | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, Purchase_TravelEntity entity) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
var Purchase_TravelEntityTmp = GetPurchase_TravelEntity(keyValue); | |||||
entity.Modify(keyValue); | |||||
db.Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
db.Insert(entity); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
var now = DateTime.Now; | |||||
var entity = this.BaseRepository("CollegeMIS").FindEntity<Purchase_TravelEntity>(x => x.Id == keyValue); | |||||
if (entity != null) | |||||
{ | |||||
entity.Status = status; | |||||
entity.ProcessId = processId; | |||||
entity.SubmitTime = now; | |||||
entity.CheckStatus = 1; | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 修改异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatusByProcessId(int status, string processId) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
var now = DateTime.Now; | |||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
try | |||||
{ | |||||
var entity = db.FindEntity<Purchase_TravelEntity>(x => x.ProcessId == processId); | |||||
if (entity != null) | |||||
{ | |||||
//审核通过 | |||||
if (status == 2) | |||||
{ | |||||
} | |||||
else | |||||
{ | |||||
entity.Status = status; | |||||
} | |||||
//更新课程异动表的审核状态 | |||||
entity.CheckStatus = status; | |||||
entity.CheckUserId = loginUserInfo.userId; | |||||
entity.CheckUserName = loginUserInfo.realName; | |||||
entity.CheckTime = now; | |||||
db.Update(entity); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,249 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Travel_ApplyBLL : Purchase_Travel_ApplyIBLL | |||||
{ | |||||
private Purchase_Travel_ApplyService Purchase_Travel_ApplyService = new Purchase_Travel_ApplyService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_Travel_ApplyEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_Travel_ApplyService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Travel_Applydetails表数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_Travel_ApplydetailsEntity> GetPurchase_Travel_ApplydetailsList(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_Travel_ApplyService.GetPurchase_Travel_ApplydetailsList(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Travel_Apply表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_Travel_ApplyEntity GetPurchase_Travel_ApplyEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_Travel_ApplyService.GetPurchase_Travel_ApplyEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Travel_Applydetails表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_Travel_ApplydetailsEntity GetPurchase_Travel_ApplydetailsEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_Travel_ApplyService.GetPurchase_Travel_ApplydetailsEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Purchase_Travel_ApplyEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return Purchase_Travel_ApplyService.GetEntityByProcessId(processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_Travel_ApplyService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, Purchase_Travel_ApplyEntity entity,List<Purchase_Travel_ApplydetailsEntity> Purchase_Travel_applydetailsList) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_Travel_ApplyService.SaveEntity(keyValue, entity,Purchase_Travel_applydetailsList); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_Travel_ApplyService.ModifyStatus(keyValue, status, processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 修改课程异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatusByProcessId(int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
Purchase_Travel_ApplyService.ModifyStatusByProcessId(status, processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,129 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Travel_ApplyEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// DepartmentId | |||||
/// </summary> | |||||
[Column("DEPARTMENTID")] | |||||
public string DepartmentId { get; set; } | |||||
/// <summary> | |||||
/// Creator | |||||
/// </summary> | |||||
[Column("CREATOR")] | |||||
public string Creator { get; set; } | |||||
/// <summary> | |||||
/// Createtime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? Createtime { get; set; } | |||||
/// <summary> | |||||
/// Payee | |||||
/// </summary> | |||||
[Column("PAYEE")] | |||||
public string Payee { get; set; } | |||||
/// <summary> | |||||
/// Attachcount | |||||
/// </summary> | |||||
[Column("ATTACHCOUNT")] | |||||
public string Attachcount { get; set; } | |||||
/// <summary> | |||||
/// Totalamount | |||||
/// </summary> | |||||
[Column("TOTALAMOUNT")] | |||||
public decimal? Totalamount { get; set; } | |||||
/// <summary> | |||||
/// FilePath | |||||
/// </summary> | |||||
[Column("FILEPATH")] | |||||
public string FilePath { get; set; } | |||||
/// <summary> | |||||
/// Remark | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// Approvalamount | |||||
/// </summary> | |||||
[Column("APPROVALAMOUNT")] | |||||
public decimal? Approvalamount { get; set; } | |||||
/// <summary> | |||||
/// Status | |||||
/// </summary> | |||||
[Column("STATUS")] | |||||
public int Status { get; set; } | |||||
/// <summary> | |||||
/// SubmitTime | |||||
/// </summary> | |||||
[Column("SUBMITTIME")] | |||||
public DateTime? SubmitTime { get; set; } | |||||
/// <summary> | |||||
/// CheckTime | |||||
/// </summary> | |||||
[Column("CHECKTIME")] | |||||
public DateTime? CheckTime { get; set; } | |||||
/// <summary> | |||||
/// CheckUserId | |||||
/// </summary> | |||||
[Column("CHECKUSERID")] | |||||
public string CheckUserId { get; set; } | |||||
/// <summary> | |||||
/// CheckUserName | |||||
/// </summary> | |||||
[Column("CHECKUSERNAME")] | |||||
public string CheckUserName { get; set; } | |||||
/// <summary> | |||||
/// CheckStatus | |||||
/// </summary> | |||||
[Column("CHECKSTATUS")] | |||||
public int CheckStatus { get; set; } | |||||
/// <summary> | |||||
/// ProcessId | |||||
/// </summary> | |||||
[Column("PROCESSID")] | |||||
public string ProcessId { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
[NotMapped] | |||||
public string deptname { set; get; } | |||||
[NotMapped] | |||||
public string creatorname { set; get; } | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,82 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public interface Purchase_Travel_ApplyIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Purchase_Travel_ApplyEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Purchase_Travel_applydetails表数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
IEnumerable<Purchase_Travel_ApplydetailsEntity> GetPurchase_Travel_ApplydetailsList(string keyValue); | |||||
/// <summary> | |||||
/// 获取Purchase_Travel_apply表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Purchase_Travel_ApplyEntity GetPurchase_Travel_ApplyEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取Purchase_Travel_applydetails表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Purchase_Travel_ApplydetailsEntity GetPurchase_Travel_ApplydetailsEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
Purchase_Travel_ApplyEntity GetEntityByProcessId(string processId); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, Purchase_Travel_ApplyEntity entity,List<Purchase_Travel_ApplydetailsEntity> Purchase_Travel_applydetailsList); | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交课程异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
void ModifyStatus(string keyValue, int status, string processId); | |||||
/// <summary> | |||||
/// 修改异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
void ModifyStatusByProcessId(int status, string processId); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,401 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Travel_ApplyService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_Travel_ApplyEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var database = this.BaseRepository().getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.DepartmentId, | |||||
c.f_fullname as deptname, | |||||
t.Creator, | |||||
b.f_realname as creatorname, | |||||
t.Createtime, | |||||
t.Payee, | |||||
t.Attachcount, | |||||
t.Totalamount, | |||||
t.FilePath, | |||||
t.Approvalamount, | |||||
t.Status, | |||||
t.submittime, | |||||
t.checktime, | |||||
t.checkstatus | |||||
"); | |||||
strSql.Append(" FROM Purchase_Travel_Apply t "); | |||||
strSql.Append(" left join " + database + ".dbo.LR_Base_User b on b.F_UserId=t.creator "); | |||||
strSql.Append(" left join " + database + ".dbo.LR_Base_Department c on c.F_DepartmentId=t.departmentId"); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( t.Createtime >= @startTime AND t.Createtime <= @endTime ) "); | |||||
} | |||||
if (!queryParam["DepartmentId"].IsEmpty()) | |||||
{ | |||||
dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DepartmentId = @DepartmentId "); | |||||
} | |||||
if (!queryParam["checkstatus"].IsEmpty()) | |||||
{ | |||||
dp.Add("checkstatus", queryParam["checkstatus"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.checkstatus = @checkstatus "); | |||||
} | |||||
if (!queryParam["Payee"].IsEmpty()) | |||||
{ | |||||
dp.Add("Payee", "%" + queryParam["Payee"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.Payee Like @Payee "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Purchase_Travel_ApplyEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Travel_Applydetails表数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Purchase_Travel_ApplydetailsEntity> GetPurchase_Travel_ApplydetailsList(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = "select a.*,b.Remark,b.Createtime,b.totalamount from Purchase_Travel_Applydetails a left join Purchase_Travel b on b.id=a.purchaseid where applyid='"+keyValue+"'"; | |||||
var data = this.BaseRepository("CollegeMIS").FindList<Purchase_Travel_ApplydetailsEntity>(sql);// as List<Purchase_Travel_ApplydetailsEntity>; | |||||
//this.BaseRepository("CollegeMIS").FindList<Purchase_Travel_ApplydetailsEntity>(t => t.applyid == keyValue); | |||||
return data; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Travel_Apply表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_Travel_ApplyEntity GetPurchase_Travel_ApplyEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_Travel_ApplyEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Purchase_Travel_Applydetails表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Purchase_Travel_ApplydetailsEntity GetPurchase_Travel_ApplydetailsEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_Travel_ApplydetailsEntity>(t=>t.applyid == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Purchase_Travel_ApplyEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_Travel_ApplyEntity>(t => t.ProcessId == processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var Purchase_Travel_ApplyEntity = GetPurchase_Travel_ApplyEntity(keyValue); | |||||
var Purchase_Travel_ApplydetailsEntity = GetPurchase_Travel_ApplydetailsEntity(Purchase_Travel_ApplyEntity.Id); | |||||
db.Delete<Purchase_Travel_ApplyEntity>(t=>t.Id == keyValue); | |||||
db.Delete<Purchase_Travel_ApplydetailsEntity>(t=>t.applyid == Purchase_Travel_ApplyEntity.Id); | |||||
//同时要更新对应账单的报账状态 | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, Purchase_Travel_ApplyEntity entity,List<Purchase_Travel_ApplydetailsEntity> Purchase_Travel_ApplydetailsList) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
var Purchase_Travel_ApplyEntityTmp = GetPurchase_Travel_ApplyEntity(keyValue); | |||||
var Purchase_Travel_ApplydetailsEntityTmp = GetPurchase_Travel_ApplydetailsEntity(Purchase_Travel_ApplyEntityTmp.Id); | |||||
entity.Modify(keyValue); | |||||
db.Update(entity); | |||||
db.Delete<Purchase_Travel_ApplydetailsEntity>(t=>t.applyid == Purchase_Travel_ApplyEntityTmp.Id); | |||||
foreach (Purchase_Travel_ApplydetailsEntity item in Purchase_Travel_ApplydetailsList) | |||||
{ | |||||
item.Create(); | |||||
item.applyid = Purchase_Travel_ApplyEntityTmp.Id; | |||||
db.Insert(item); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
db.Insert(entity); | |||||
foreach (Purchase_Travel_ApplydetailsEntity item in Purchase_Travel_ApplydetailsList) | |||||
{ | |||||
item.Create(); | |||||
item.applyid = entity.Id; | |||||
db.Insert(item); | |||||
} | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 提交异动记录 | |||||
/// </summary> | |||||
/// <param name="keyValue">课程异动表主键</param> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatus(string keyValue, int status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
var now = DateTime.Now; | |||||
var db = this.BaseRepository("CollegeMIS"); | |||||
db.BeginTrans(); | |||||
var entity = this.BaseRepository("CollegeMIS").FindEntity<Purchase_Travel_ApplyEntity>(x => x.Id == keyValue); | |||||
if (entity != null) | |||||
{ | |||||
entity.Status = status; | |||||
entity.ProcessId = processId; | |||||
entity.SubmitTime = now; | |||||
entity.CheckStatus = 1; | |||||
db.Update(entity); | |||||
//所有子表数据状态更新为报账中 | |||||
var details= this.BaseRepository("CollegeMIS").FindList<Purchase_Travel_ApplydetailsEntity>(x => x.applyid == keyValue); | |||||
foreach (var item in details) | |||||
{ | |||||
var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity<Purchase_TravelEntity>(x => x.Id == item.purchaseid); | |||||
purchasemodel.ApplyStatus = 1; | |||||
db.Update(purchasemodel); | |||||
} | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 修改异动表的审核状态 | |||||
/// </summary> | |||||
/// <param name="status">审核状态</param> | |||||
/// <param name="processId">流程Id</param> | |||||
public void ModifyStatusByProcessId(int status, string processId) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
var now = DateTime.Now; | |||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
try | |||||
{ | |||||
var entity = db.FindEntity<Purchase_Travel_ApplyEntity>(x => x.ProcessId == processId); | |||||
if (entity != null) | |||||
{ | |||||
//获取所有的账单数据 | |||||
var details = this.BaseRepository("CollegeMIS").FindList<Purchase_Travel_ApplydetailsEntity>(x => x.applyid == entity.Id); | |||||
//审核通过 | |||||
if (status == 2) | |||||
{ | |||||
foreach (var item in details) | |||||
{ | |||||
var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity<Purchase_TravelEntity>(x => x.Id == item.purchaseid); | |||||
purchasemodel.ApplyStatus = 2; | |||||
db.Update(purchasemodel); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
//这里是回滚订单到草稿箱 | |||||
entity.Status = status; | |||||
//把对应的账单数据报账状态回滚到待报账 | |||||
foreach (var item in details) | |||||
{ | |||||
var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity<Purchase_TravelEntity>(x => x.Id == item.purchaseid); | |||||
purchasemodel.ApplyStatus = 0; | |||||
db.Update(purchasemodel); | |||||
} | |||||
} | |||||
//更新课程异动表的审核状态 | |||||
entity.CheckStatus = status; | |||||
entity.CheckUserId = loginUserInfo.userId; | |||||
entity.CheckUserName = loginUserInfo.realName; | |||||
entity.CheckTime = now; | |||||
db.Update(entity); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,60 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-07-14 12:15 | |||||
/// 描 述:教务报账申请 | |||||
/// </summary> | |||||
public class Purchase_Travel_ApplydetailsEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// applyid | |||||
/// </summary> | |||||
[Column("APPLYID")] | |||||
public string applyid { get; set; } | |||||
/// <summary> | |||||
/// purchaseid | |||||
/// </summary> | |||||
[Column("PURCHASEID")] | |||||
public string purchaseid { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
[NotMapped] | |||||
public string Remark { set; get; } | |||||
[NotMapped] | |||||
public double TotalAmount { set; get; } | |||||
[NotMapped] | |||||
public string CreateTime { set; get; } | |||||
} | |||||
} | |||||
@@ -97,7 +97,11 @@ | |||||
<Compile Include="Delegate\NWFDelegateRelationEntity.cs" /> | <Compile Include="Delegate\NWFDelegateRelationEntity.cs" /> | ||||
<Compile Include="Delegate\NWFDelegateRuleEntity.cs" /> | <Compile Include="Delegate\NWFDelegateRuleEntity.cs" /> | ||||
<Compile Include="Delegate\NWFDelegateService.cs" /> | <Compile Include="Delegate\NWFDelegateService.cs" /> | ||||
<Compile Include="NodeMethod\PurchaseServiceApplyMethod.cs" /> | |||||
<Compile Include="NodeMethod\PurchaseTravelApplyMethod.cs" /> | |||||
<Compile Include="NodeMethod\PurchaseEduApplyMethod.cs" /> | <Compile Include="NodeMethod\PurchaseEduApplyMethod.cs" /> | ||||
<Compile Include="NodeMethod\PurchaseTravelMethod.cs" /> | |||||
<Compile Include="NodeMethod\PurchaseServiceMethod.cs" /> | |||||
<Compile Include="NodeMethod\PurchaseEduMethod.cs" /> | <Compile Include="NodeMethod\PurchaseEduMethod.cs" /> | ||||
<Compile Include="NodeMethod\PurchaseInfoApplyMethod.cs" /> | <Compile Include="NodeMethod\PurchaseInfoApplyMethod.cs" /> | ||||
<Compile Include="NodeMethod\PurchaseInfoMethod.cs" /> | <Compile Include="NodeMethod\PurchaseInfoMethod.cs" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Learun.Application.WorkFlow | |||||
{ | |||||
public class PurchaseServiceApplyMethod : IWorkFlowMethod | |||||
{ | |||||
Purchase_Service_ApplyIBLL purchase_ServiceapplyIBLL = new Purchase_Service_ApplyBLL(); | |||||
public void Execute(WfMethodParameter parameter) | |||||
{ | |||||
if (parameter.code == "agree") | |||||
{ | |||||
purchase_ServiceapplyIBLL.ModifyStatusByProcessId(2, parameter.processId); | |||||
} | |||||
else | |||||
{ | |||||
purchase_ServiceapplyIBLL.ModifyStatusByProcessId(0, parameter.processId); | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Learun.Application.WorkFlow | |||||
{ | |||||
public class PurchaseServiceMethod : IWorkFlowMethod | |||||
{ | |||||
Purchase_ServiceIBLL purchase_ServiceIBLL = new Purchase_ServiceBLL(); | |||||
public void Execute(WfMethodParameter parameter) | |||||
{ | |||||
if (parameter.code == "agree") | |||||
{ | |||||
purchase_ServiceIBLL.ModifyStatusByProcessId(2, parameter.processId); | |||||
} | |||||
else | |||||
{ | |||||
purchase_ServiceIBLL.ModifyStatusByProcessId(0, parameter.processId); | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Learun.Application.WorkFlow | |||||
{ | |||||
public class PurchaseTravelApplyMethod : IWorkFlowMethod | |||||
{ | |||||
Purchase_Travel_ApplyIBLL purchase_TravelapplyIBLL = new Purchase_Travel_ApplyBLL(); | |||||
public void Execute(WfMethodParameter parameter) | |||||
{ | |||||
if (parameter.code == "agree") | |||||
{ | |||||
purchase_TravelapplyIBLL.ModifyStatusByProcessId(2, parameter.processId); | |||||
} | |||||
else | |||||
{ | |||||
purchase_TravelapplyIBLL.ModifyStatusByProcessId(0, parameter.processId); | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Learun.Application.WorkFlow | |||||
{ | |||||
public class PurchaseTravelMethod : IWorkFlowMethod | |||||
{ | |||||
Purchase_TravelIBLL purchase_TravelIBLL = new Purchase_TravelBLL(); | |||||
public void Execute(WfMethodParameter parameter) | |||||
{ | |||||
if (parameter.code == "agree") | |||||
{ | |||||
purchase_TravelIBLL.ModifyStatusByProcessId(2, parameter.processId); | |||||
} | |||||
else | |||||
{ | |||||
purchase_TravelIBLL.ModifyStatusByProcessId(0, parameter.processId); | |||||
} | |||||
} | |||||
} | |||||
} |