@@ -49,6 +49,19 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取数据字典明显根据分类编号 | |||
/// </summary> | |||
/// <param name="itemCode">分类编号</param> | |||
/// <param name="keyword">查询条件</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetDetailList(string keyword) | |||
{ | |||
var data = purchase_EduIBLL.GetDataList( keyword); | |||
return JsonResult(data); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
@@ -90,6 +103,19 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDetailData(string keyValue) | |||
{ | |||
var Purchase_Edu_DetailsData = purchase_EduIBLL.GetPurchase_Edu_DetailsList(keyValue); | |||
return Success(Purchase_Edu_DetailsData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
@@ -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_Edu_ApplyController : MvcControllerBase | |||
{ | |||
private Purchase_Edu_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Edu_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_Edu_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_Edu_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Edu_ApplyEntity( keyValue ); | |||
var Purchase_Edu_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Edu_ApplydetailsList( Purchase_Edu_applyData.Id ); | |||
//var Purchase_EduData = purchase_Edu_ApplyIBLL.GetPurchase_EduEntity( Purchase_Edu_applydetailsData.purchaseid ); | |||
var jsonData = new { | |||
Purchase_Edu_apply = Purchase_Edu_applyData, | |||
Purchase_Edu_applydetails = Purchase_Edu_applydetailsData, | |||
//Purchase_Edu = Purchase_EduData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Edu_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Edu_ApplydetailsList(Data.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Edu_apply = Data, | |||
Purchase_Edu_applydetails = Purchase_Edu_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_Edu_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_Edu_applydetailsList, string strpurchase_EduEntity) | |||
{ | |||
Purchase_Edu_ApplyEntity entity = strEntity.ToObject<Purchase_Edu_ApplyEntity>(); | |||
List<Purchase_Edu_ApplydetailsEntity> purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject<List<Purchase_Edu_ApplydetailsEntity>>(); | |||
purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_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_Edu_ApplyIBLL.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_Info_ApplyController : MvcControllerBase | |||
{ | |||
private Purchase_Info_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Info_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_Edu_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_Info_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Info_ApplyEntity( keyValue ); | |||
var Purchase_Info_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Info_ApplydetailsList( Purchase_Info_applyData.Id ); | |||
//var Purchase_InfoData = purchase_Edu_ApplyIBLL.GetPurchase_InfoEntity( Purchase_Info_applydetailsData.purchaseid ); | |||
var jsonData = new { | |||
Purchase_Info_apply = Purchase_Info_applyData, | |||
Purchase_Info_applydetails = Purchase_Info_applydetailsData, | |||
//Purchase_Info = Purchase_InfoData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Info_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Info_ApplydetailsList(Data.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Info_apply = Data, | |||
Purchase_Info_applydetails = Purchase_Info_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_Edu_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_Edu_applydetailsList, string strpurchase_EduEntity) | |||
{ | |||
Purchase_Info_ApplyEntity entity = strEntity.ToObject<Purchase_Info_ApplyEntity>(); | |||
List<Purchase_Info_ApplydetailsEntity> purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject<List<Purchase_Info_ApplydetailsEntity>>(); | |||
purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_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_Edu_ApplyIBLL.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_Logistic_ApplyController : MvcControllerBase | |||
{ | |||
private Purchase_Logistic_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Logistic_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_Edu_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_Logistic_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Logistic_ApplyEntity( keyValue ); | |||
var Purchase_Logistic_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Logistic_ApplydetailsList( Purchase_Logistic_applyData.Id ); | |||
//var Purchase_LogisticData = purchase_Edu_ApplyIBLL.GetPurchase_LogisticEntity( Purchase_Logistic_applydetailsData.purchaseid ); | |||
var jsonData = new { | |||
Purchase_Logistic_apply = Purchase_Logistic_applyData, | |||
Purchase_Logistic_applydetails = Purchase_Logistic_applydetailsData, | |||
//Purchase_Logistic = Purchase_LogisticData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Logistic_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Logistic_ApplydetailsList(Data.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Logistic_apply = Data, | |||
Purchase_Logistic_applydetails = Purchase_Logistic_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_Edu_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_Edu_applydetailsList, string strpurchase_EduEntity) | |||
{ | |||
Purchase_Logistic_ApplyEntity entity = strEntity.ToObject<Purchase_Logistic_ApplyEntity>(); | |||
List<Purchase_Logistic_ApplydetailsEntity> purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject<List<Purchase_Logistic_ApplydetailsEntity>>(); | |||
purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_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_Edu_ApplyIBLL.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_Other_ApplyController : MvcControllerBase | |||
{ | |||
private Purchase_Other_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Other_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_Edu_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_Other_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Other_ApplyEntity( keyValue ); | |||
var Purchase_Other_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Other_ApplydetailsList( Purchase_Other_applyData.Id ); | |||
//var Purchase_OtherData = purchase_Edu_ApplyIBLL.GetPurchase_OtherEntity( Purchase_Other_applydetailsData.purchaseid ); | |||
var jsonData = new { | |||
Purchase_Other_apply = Purchase_Other_applyData, | |||
Purchase_Other_applydetails = Purchase_Other_applydetailsData, | |||
//Purchase_Other = Purchase_OtherData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Other_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Other_ApplydetailsList(Data.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Other_apply = Data, | |||
Purchase_Other_applydetails = Purchase_Other_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_Edu_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_Edu_applydetailsList, string strpurchase_EduEntity) | |||
{ | |||
Purchase_Other_ApplyEntity entity = strEntity.ToObject<Purchase_Other_ApplyEntity>(); | |||
List<Purchase_Other_ApplydetailsEntity> purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject<List<Purchase_Other_ApplydetailsEntity>>(); | |||
purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_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_Edu_ApplyIBLL.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_Print_ApplyController : MvcControllerBase | |||
{ | |||
private Purchase_Print_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Print_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_Edu_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_Print_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Print_ApplyEntity( keyValue ); | |||
var Purchase_Print_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Print_ApplydetailsList( Purchase_Print_applyData.Id ); | |||
//var Purchase_PrintData = purchase_Edu_ApplyIBLL.GetPurchase_PrintEntity( Purchase_Print_applydetailsData.purchaseid ); | |||
var jsonData = new { | |||
Purchase_Print_apply = Purchase_Print_applyData, | |||
Purchase_Print_applydetails = Purchase_Print_applydetailsData, | |||
//Purchase_Print = Purchase_PrintData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Print_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Print_ApplydetailsList(Data.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Print_apply = Data, | |||
Purchase_Print_applydetails = Purchase_Print_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_Edu_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_Edu_applydetailsList, string strpurchase_EduEntity) | |||
{ | |||
Purchase_Print_ApplyEntity entity = strEntity.ToObject<Purchase_Print_ApplyEntity>(); | |||
List<Purchase_Print_ApplydetailsEntity> purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject<List<Purchase_Print_ApplydetailsEntity>>(); | |||
purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_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_Edu_ApplyIBLL.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_Student_ApplyController : MvcControllerBase | |||
{ | |||
private Purchase_Student_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Student_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_Edu_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_Student_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Student_ApplyEntity( keyValue ); | |||
var Purchase_Student_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Student_ApplydetailsList( Purchase_Student_applyData.Id ); | |||
//var Purchase_StudentData = purchase_Edu_ApplyIBLL.GetPurchase_StudentEntity( Purchase_Student_applydetailsData.purchaseid ); | |||
var jsonData = new { | |||
Purchase_Student_apply = Purchase_Student_applyData, | |||
Purchase_Student_applydetails = Purchase_Student_applydetailsData, | |||
//Purchase_Student = Purchase_StudentData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Student_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Student_ApplydetailsList(Data.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Student_apply = Data, | |||
Purchase_Student_applydetails = Purchase_Student_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_Edu_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_Edu_applydetailsList, string strpurchase_EduEntity) | |||
{ | |||
Purchase_Student_ApplyEntity entity = strEntity.ToObject<Purchase_Student_ApplyEntity>(); | |||
List<Purchase_Student_ApplydetailsEntity> purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject<List<Purchase_Student_ApplydetailsEntity>>(); | |||
purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_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_Edu_ApplyIBLL.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_Work_ApplyController : MvcControllerBase | |||
{ | |||
private Purchase_Work_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Work_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_Edu_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_Work_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Work_ApplyEntity( keyValue ); | |||
var Purchase_Work_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Work_ApplydetailsList( Purchase_Work_applyData.Id ); | |||
//var Purchase_WorkData = purchase_Edu_ApplyIBLL.GetPurchase_WorkEntity( Purchase_Work_applydetailsData.purchaseid ); | |||
var jsonData = new { | |||
Purchase_Work_apply = Purchase_Work_applyData, | |||
Purchase_Work_applydetails = Purchase_Work_applydetailsData, | |||
//Purchase_Work = Purchase_WorkData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Work_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Work_ApplydetailsList(Data.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Work_apply = Data, | |||
Purchase_Work_applydetails = Purchase_Work_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_Edu_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_Edu_applydetailsList, string strpurchase_EduEntity) | |||
{ | |||
Purchase_Work_ApplyEntity entity = strEntity.ToObject<Purchase_Work_ApplyEntity>(); | |||
List<Purchase_Work_ApplydetailsEntity> purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject<List<Purchase_Work_ApplydetailsEntity>>(); | |||
purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_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_Edu_ApplyIBLL.ModifyStatus(keyValue, status, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -107,7 +107,7 @@ var bootstrap = function ($, learun) { | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
@@ -116,7 +116,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Edu"]').lrGetFormData()); | |||
postData.strpurchase_Edu_DetailsList = JSON.stringify($('#Purchase_Edu_Details').jfGridGet('rowdatas')); | |||
postData.strPurchase_Edu_DetailsList = JSON.stringify($('#Purchase_Edu_Details').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
@@ -123,7 +123,7 @@ var bootstrap = function ($, learun) { | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
@@ -143,7 +143,7 @@ var bootstrap = function ($, learun) { | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前课程异动记录未提交,请提交后再查看!"); | |||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
@@ -206,6 +206,19 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
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 | |||
@@ -222,7 +235,6 @@ var bootstrap = function ($, learun) { | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: '2-7',// 填写流程对应模板编号 | |||
processId: processId, | |||
@@ -231,7 +243,6 @@ var bootstrap = function ($, learun) { | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
@@ -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_Edu_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_Edu/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_Edu/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_Edu_apply"]').lrGetFormData()); | |||
//postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Edu_applydetails').jfGridGet('rowdatas')); | |||
//postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Edu"]').lrGetFormData()); | |||
//$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_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_Edu_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_Edu_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_Edu_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_Edu_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_Edu_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_Edu_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_Edu_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu_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_Edu_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Edu_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_Edu/GetDetailList | |||
learun.layerForm({ | |||
id: 'findback', | |||
title: '新增明细', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/FindBack', | |||
width: 860, | |||
height: 580, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
$("#detaildel").on('click', function () { | |||
var keyValue = $('#Purchase_Edu_applydetails').jfGridValue('purchaseid'); | |||
selectedRow = $('#Purchase_Edu_applydetails').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$('#Purchase_Edu_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_Edu_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_Edu/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_Edu_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_Edu_applydetails').jfGridGet('rowdatas').length | |||
for (var i = 0; i < datas; i++) { | |||
$('#Purchase_Edu_applydetails').jfGridSet('removeRow', $('#Purchase_Edu_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_Edu_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_Edu_apply"]').lrGetFormData()); | |||
postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Edu_applydetails').jfGridGet('rowdatas')); | |||
postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Edu"]').lrGetFormData()); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_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_Edu_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_Edu_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_Edu_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_Edu_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_Edu_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_Edu_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_Edu_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu_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_Edu_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Edu_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_Edu_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_Edu/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_Edu_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_Edu_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_Edu_Apply"]').lrGetFormData()); | |||
postData.strPurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Edu_applydetails').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,47 @@ | |||
@{ | |||
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 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_Edu_Apply/Index.js") |
@@ -0,0 +1,240 @@ | |||
/* * 版 本 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(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_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_Edu_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_Edu_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_Edu_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_Edu_Apply/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_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-1',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "报账状态", name: "ApplyStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
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 | |||
@@ -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_Info_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_Info/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_Info/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_Info_apply"]').lrGetFormData()); | |||
//postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Info_applydetails').jfGridGet('rowdatas')); | |||
//postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Info"]').lrGetFormData()); | |||
//$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_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_Info_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_Info_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_Info_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_Info_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_Info_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_Info_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_Info_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info_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_Info_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Info_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_Info/GetDetailList | |||
learun.layerForm({ | |||
id: 'findback', | |||
title: '新增明细', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/FindBack', | |||
width: 860, | |||
height: 580, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
$("#detaildel").on('click', function () { | |||
var keyValue = $('#Purchase_Info_applydetails').jfGridValue('purchaseid'); | |||
selectedRow = $('#Purchase_Info_applydetails').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$('#Purchase_Info_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_Info_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_Info/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_Info_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_Info_applydetails').jfGridGet('rowdatas').length | |||
for (var i = 0; i < datas; i++) { | |||
$('#Purchase_Info_applydetails').jfGridSet('removeRow', $('#Purchase_Info_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_Info_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_Info_apply"]').lrGetFormData()); | |||
postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Info_applydetails').jfGridGet('rowdatas')); | |||
postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Info"]').lrGetFormData()); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_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_Info_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_Info_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_Info_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_Info_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_Info_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_Info_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_Info_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info_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_Info_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Info_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_Info_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_Info/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_Info_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_Info_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_Info_Apply"]').lrGetFormData()); | |||
postData.strPurchase_Info_applydetailsList = JSON.stringify($('#Purchase_Info_applydetails').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,47 @@ | |||
@{ | |||
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 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_Info_Apply/Index.js") |
@@ -0,0 +1,240 @@ | |||
/* * 版 本 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(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info_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_Info_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_Info_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_Info_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_Info_Apply/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info_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-4',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "报账状态", name: "ApplyStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
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 | |||
@@ -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_Logistic_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_Logistic/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_Logistic/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_Logistic_apply"]').lrGetFormData()); | |||
//postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Logistic_applydetails').jfGridGet('rowdatas')); | |||
//postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Logistic"]').lrGetFormData()); | |||
//$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_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_Logistic_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_Logistic_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_Logistic_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_Logistic_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_Logistic_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_Logistic_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_Logistic_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic_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_Logistic_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Logistic_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_Logistic/GetDetailList | |||
learun.layerForm({ | |||
id: 'findback', | |||
title: '新增明细', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/FindBack', | |||
width: 860, | |||
height: 580, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
$("#detaildel").on('click', function () { | |||
var keyValue = $('#Purchase_Logistic_applydetails').jfGridValue('purchaseid'); | |||
selectedRow = $('#Purchase_Logistic_applydetails').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$('#Purchase_Logistic_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_Logistic_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_Logistic/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_Logistic_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_Logistic_applydetails').jfGridGet('rowdatas').length | |||
for (var i = 0; i < datas; i++) { | |||
$('#Purchase_Logistic_applydetails').jfGridSet('removeRow', $('#Purchase_Logistic_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_Logistic_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_Logistic_apply"]').lrGetFormData()); | |||
postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Logistic_applydetails').jfGridGet('rowdatas')); | |||
postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Logistic"]').lrGetFormData()); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_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_Logistic_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_Logistic_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_Logistic_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_Logistic_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_Logistic_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_Logistic_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_Logistic_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic_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_Logistic_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Logistic_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_Logistic_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_Logistic/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_Logistic_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_Logistic_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_Logistic_Apply"]').lrGetFormData()); | |||
postData.strPurchase_Logistic_applydetailsList = JSON.stringify($('#Purchase_Logistic_applydetails').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,47 @@ | |||
@{ | |||
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 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_Logistic_Apply/Index.js") |
@@ -0,0 +1,240 @@ | |||
/* * 版 本 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(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_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_Logistic_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_Logistic_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_Logistic_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_Logistic_Apply/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_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-3',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "报账状态", name: "ApplyStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
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 | |||
@@ -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_Other_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_Other/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_Other/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_Other_apply"]').lrGetFormData()); | |||
//postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Other_applydetails').jfGridGet('rowdatas')); | |||
//postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Other"]').lrGetFormData()); | |||
//$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_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_Other_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_Other_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_Other_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_Other_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_Other_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_Other_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_Other_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other_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_Other_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Other_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_Other/GetDetailList | |||
learun.layerForm({ | |||
id: 'findback', | |||
title: '新增明细', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/FindBack', | |||
width: 860, | |||
height: 580, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
$("#detaildel").on('click', function () { | |||
var keyValue = $('#Purchase_Other_applydetails').jfGridValue('purchaseid'); | |||
selectedRow = $('#Purchase_Other_applydetails').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$('#Purchase_Other_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_Other_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_Other/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_Other_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_Other_applydetails').jfGridGet('rowdatas').length | |||
for (var i = 0; i < datas; i++) { | |||
$('#Purchase_Other_applydetails').jfGridSet('removeRow', $('#Purchase_Other_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_Other_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_Other_apply"]').lrGetFormData()); | |||
postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Other_applydetails').jfGridGet('rowdatas')); | |||
postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Other"]').lrGetFormData()); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_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_Other_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_Other_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_Other_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_Other_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_Other_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_Other_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_Other_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other_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_Other_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Other_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_Other_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_Other/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_Other_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_Other_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_Other_Apply"]').lrGetFormData()); | |||
postData.strPurchase_Other_applydetailsList = JSON.stringify($('#Purchase_Other_applydetails').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,47 @@ | |||
@{ | |||
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 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_Other_Apply/Index.js") |
@@ -0,0 +1,240 @@ | |||
/* * 版 本 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(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other_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_Other_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_Other_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_Other_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_Other_Apply/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other_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-2',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "报账状态", name: "ApplyStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
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 | |||
@@ -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_Print_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_Print/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_Print/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_Print_apply"]').lrGetFormData()); | |||
//postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Print_applydetails').jfGridGet('rowdatas')); | |||
//postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Print"]').lrGetFormData()); | |||
//$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_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_Print_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_Print_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_Print_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_Print_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_Print_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_Print_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_Print_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print_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_Print_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Print_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_Print/GetDetailList | |||
learun.layerForm({ | |||
id: 'findback', | |||
title: '新增明细', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/FindBack', | |||
width: 860, | |||
height: 580, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
$("#detaildel").on('click', function () { | |||
var keyValue = $('#Purchase_Print_applydetails').jfGridValue('purchaseid'); | |||
selectedRow = $('#Purchase_Print_applydetails').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$('#Purchase_Print_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_Print_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_Print/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_Print_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_Print_applydetails').jfGridGet('rowdatas').length | |||
for (var i = 0; i < datas; i++) { | |||
$('#Purchase_Print_applydetails').jfGridSet('removeRow', $('#Purchase_Print_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_Print_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_Print_apply"]').lrGetFormData()); | |||
postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Print_applydetails').jfGridGet('rowdatas')); | |||
postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Print"]').lrGetFormData()); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_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_Print_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_Print_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_Print_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_Print_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_Print_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_Print_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_Print_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print_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_Print_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Print_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_Print_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_Print/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_Print_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_Print_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_Print_Apply"]').lrGetFormData()); | |||
postData.strPurchase_Print_applydetailsList = JSON.stringify($('#Purchase_Print_applydetails').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,47 @@ | |||
@{ | |||
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 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_Print_Apply/Index.js") |
@@ -0,0 +1,240 @@ | |||
/* * 版 本 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(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print_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_Print_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_Print_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_Print_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_Print_Apply/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print_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-6',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "报账状态", name: "ApplyStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
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 | |||
@@ -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_Student_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_Student/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_Student/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_Student_apply"]').lrGetFormData()); | |||
//postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Student_applydetails').jfGridGet('rowdatas')); | |||
//postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Student"]').lrGetFormData()); | |||
//$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_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_Student_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_Student_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_Student_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_Student_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_Student_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_Student_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_Student_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student_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_Student_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student_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_Student/GetDetailList | |||
learun.layerForm({ | |||
id: 'findback', | |||
title: '新增明细', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/FindBack', | |||
width: 860, | |||
height: 580, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
$("#detaildel").on('click', function () { | |||
var keyValue = $('#Purchase_Student_applydetails').jfGridValue('purchaseid'); | |||
selectedRow = $('#Purchase_Student_applydetails').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$('#Purchase_Student_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_Student_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_Student/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_Student_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_Student_applydetails').jfGridGet('rowdatas').length | |||
for (var i = 0; i < datas; i++) { | |||
$('#Purchase_Student_applydetails').jfGridSet('removeRow', $('#Purchase_Student_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_Student_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_Student_apply"]').lrGetFormData()); | |||
postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Student_applydetails').jfGridGet('rowdatas')); | |||
postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Student"]').lrGetFormData()); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_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_Student_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_Student_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_Student_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_Student_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_Student_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_Student_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_Student_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student_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_Student_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student_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_Student_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_Student/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_Student_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_Student_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_Student_Apply"]').lrGetFormData()); | |||
postData.strPurchase_Student_applydetailsList = JSON.stringify($('#Purchase_Student_applydetails').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,47 @@ | |||
@{ | |||
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 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_Student_Apply/Index.js") |
@@ -0,0 +1,240 @@ | |||
/* * 版 本 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(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student_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_Student_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_Student_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_Student_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_Student_Apply/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student_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-8',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "报账状态", name: "ApplyStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
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 | |||
@@ -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_Work_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_Work/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_Work/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_Work_apply"]').lrGetFormData()); | |||
//postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Work_applydetails').jfGridGet('rowdatas')); | |||
//postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Work"]').lrGetFormData()); | |||
//$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_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_Work_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_Work_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_Work_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_Work_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_Work_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_Work_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_Work_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work_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_Work_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work_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_Work/GetDetailList | |||
learun.layerForm({ | |||
id: 'findback', | |||
title: '新增明细', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/FindBack', | |||
width: 860, | |||
height: 580, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
$("#detaildel").on('click', function () { | |||
var keyValue = $('#Purchase_Work_applydetails').jfGridValue('purchaseid'); | |||
selectedRow = $('#Purchase_Work_applydetails').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$('#Purchase_Work_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_Work_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_Work/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_Work_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_Work_applydetails').jfGridGet('rowdatas').length | |||
for (var i = 0; i < datas; i++) { | |||
$('#Purchase_Work_applydetails').jfGridSet('removeRow', $('#Purchase_Work_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_Work_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_Work_apply"]').lrGetFormData()); | |||
postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Work_applydetails').jfGridGet('rowdatas')); | |||
postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Work"]').lrGetFormData()); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_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_Work_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_Work_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_Work_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_Work_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_Work_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_Work_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_Work_apply"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work_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_Work_applydetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work_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_Work_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_Work/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_Work_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_Work_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_Work_Apply"]').lrGetFormData()); | |||
postData.strPurchase_Work_applydetailsList = JSON.stringify($('#Purchase_Work_applydetails').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,47 @@ | |||
@{ | |||
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 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_Work_Apply/Index.js") |
@@ -0,0 +1,240 @@ | |||
/* * 版 本 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(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work_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_Work_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_Work_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_Work_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_Work_Apply/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work_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-7',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -412,10 +412,16 @@ | |||
<Compile Include="Areas\LogisticsManagement\Controllers\DormitoryReturnController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_EduController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_InfoController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Info_ApplyController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_LogisticController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Logistic_ApplyController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_OtherController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Other_ApplyController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_PrintController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Print_ApplyController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_StudentController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Student_ApplyController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Work_ApplyController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\LogisticsManagementAreaRegistration.cs" /> | |||
<Compile Include="Areas\LR_AuthorizeModule\Controllers\AuthorizeController.cs" /> | |||
<Compile Include="Areas\LR_AuthorizeModule\Controllers\FilterIPController.cs" /> | |||
@@ -887,6 +893,7 @@ | |||
<Compile Include="Areas\PersonnelManagement\Controllers\WP_OfficeConfigController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\VoteManagementController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_WorkController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_Edu_ApplyController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -1394,22 +1401,48 @@ | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu_Apply\FindBack.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu_Apply\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info_Apply\FindBack.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info_Apply\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info_Apply\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info_Apply\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic_Apply\FindBack.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic_Apply\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic_Apply\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic_Apply\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other_Apply\FindBack.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other_Apply\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other_Apply\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other_Apply\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\FindBack.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\Index.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\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\FindBack.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\Index.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\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\Index.js" /> | |||
<Content Include="Areas\LR_AuthorizeModule\Views\Authorize\AppForm.js" /> | |||
<Content Include="Areas\LR_AuthorizeModule\Views\Authorize\Form.css" /> | |||
<Content Include="Areas\LR_AuthorizeModule\Views\Authorize\Form.js" /> | |||
@@ -6524,6 +6557,10 @@ | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu_Apply\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu_Apply\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu_Apply\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu_Apply\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -7866,6 +7903,32 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\GraduateReturnBooks.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuGraduateCondition\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuGraduateCondition\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu_Apply\FindBack.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu_Apply\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info_Apply\FindBack.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info_Apply\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info_Apply\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info_Apply\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic_Apply\FindBack.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic_Apply\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic_Apply\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic_Apply\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other_Apply\FindBack.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other_Apply\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other_Apply\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other_Apply\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\FindBack.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print_Apply\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\FindBack.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student_Apply\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work_Apply\FindBack.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\Index.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -12,4 +12,5 @@ | |||
<!--塔里木中间库一卡通--> | |||
<!--<add name="TLMYKTDBString" connectionString="Data Source=orcl;Persist Security Info=True;User ID=bjqj;Password=bjqj;" providerName="System.Data.OracleClient" />--> | |||
<add name="TLMZYMIDDLEString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=39.98.73.155)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=TLMZYMIDDLE)));Persist Security Info=True;User ID=digitalschool;Password=digitalschool;" providerName="Oracle.ManagedDataAccess.Client" /> | |||
<add name="CollegeMISFor30" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_娄底;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
</connectionStrings> |
@@ -42,8 +42,11 @@ | |||
<typeAlias alias="PurchaseOtherMethod" type="Learun.Application.WorkFlow.PurchaseOtherMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseEduMethod" type="Learun.Application.WorkFlow.PurchaseEduMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchasePrintMethod" type="Learun.Application.WorkFlow.PurchasePrintMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseEduApplyMethod" type="Learun.Application.WorkFlow.PurchaseEduApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuLeaveManagementMethod" type="Learun.Application.WorkFlow.StuLeaveManagementMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuCancelLeaveManageMethod" type="Learun.Application.WorkFlow.StuCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuCancelLeaveManageMethod" type="Learun.Application.WorkFlow.StuCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Acc_DormitoryChangeMethod" type="Learun.Application.WorkFlow.Acc_DormitoryChangeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuCancelDisciplineManagementMethod" type="Learun.Application.WorkFlow.StuCancelDisciplineManagementMethod,Learun.Application.WorkFlow" /> | |||
@@ -100,6 +103,9 @@ | |||
<type type="IWorkFlowMethod" mapTo="PurchaseOtherMethod" name="PurchaseOtherMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseEduMethod" name="PurchaseEduMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchasePrintMethod" name="PurchasePrintMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseEduApplyMethod" name="PurchaseEduApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuLeaveManagementMethod" name="StuLeaveManagementMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuCancelLeaveManageMethod" name="StuCancelLeaveManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Acc_DormitoryChangeMethod" name="Acc_DormitoryChangeMethod"></type> | |||
@@ -190,6 +190,7 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Compile Include="Bootstraper.cs" /> | |||
<Compile Include="Modules\PurchaseApply\PurchaseEduApplyApi.cs" /> | |||
<Compile Include="Modules\Purchase\PurchaseEduApi.cs" /> | |||
<Compile Include="Modules\Purchase\PurchaseInfoApi.cs" /> | |||
<Compile Include="Modules\Purchase\PurchaseLogisticApi.cs" /> | |||
@@ -28,6 +28,7 @@ namespace Learun.Application.WebApi | |||
{ | |||
Get["/pagelist"] = GetPageList; | |||
Get["/form"] = GetForm; | |||
Get["/formdetail"] = GetFormDetails; | |||
Post["/delete"] = DeleteForm; | |||
Post["/save"] = SaveForm; | |||
Post["/submit"] = Submit; | |||
@@ -70,6 +71,19 @@ namespace Learun.Application.WebApi | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetFormDetails(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
var Purchase_Edu_DetailsData = purchaseeduIBLL.GetPurchase_Edu_DetailsList(keyValue); | |||
return Success(Purchase_Edu_DetailsData); | |||
} | |||
///// <summary> | |||
///// 获取页面显示列表数据 | |||
@@ -0,0 +1,152 @@ | |||
using Nancy; | |||
using Learun.Util; | |||
using System.Collections.Generic; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System; | |||
using Learun.Application.WorkFlow; | |||
namespace Learun.Application.WebApi | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-06-03 14:29 | |||
/// 描 述:系部数据 | |||
/// </summary> | |||
public class PurchaseEduApplyApi : BaseApi | |||
{ | |||
private Purchase_Edu_ApplyIBLL purchaseeduIBLL = new Purchase_Edu_ApplyBLL(); | |||
private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL(); | |||
/// <summary> | |||
/// 注册接口 | |||
/// <summary> | |||
public PurchaseEduApplyApi() | |||
: base("/learun/adms/purchaseeduapply") | |||
{ | |||
Get["/pagelist"] = GetPageList; | |||
Get["/form"] = GetForm; | |||
Post["/delete"] = DeleteForm; | |||
Post["/save"] = SaveForm; | |||
Post["/submit"] = Submit; | |||
//Get["/shList"] = GetshList; | |||
} | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表分页数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetPageList(dynamic _) | |||
{ | |||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||
var data = purchaseeduIBLL.GetPageList(parameter.pagination, parameter.queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = parameter.pagination.total, | |||
page = parameter.pagination.page, | |||
records = parameter.pagination.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetForm(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
var Purchase_EduData = purchaseeduIBLL.GetPurchase_Edu_ApplyEntity(keyValue); | |||
var Purchase_Edu_DetailsData = purchaseeduIBLL.GetPurchase_Edu_ApplydetailsList(Purchase_EduData.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Edu = Purchase_EduData, | |||
Purchase_Edu_Details = Purchase_Edu_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
///// <summary> | |||
///// 获取页面显示列表数据 | |||
///// <summary> | |||
///// <param name="_"></param> | |||
///// <returns></returns> | |||
//public Response GetshList(dynamic _) | |||
//{ | |||
// FundsApplyEntity parameter = this.GetReqData<FundsApplyEntity>(); | |||
// var FundsApplyData = fundsApplyIBLL.GetEntityByProcessId(parameter.ProcessId); | |||
// var FundsApplyDetailData = fundsApplyDetailIBLL.GetListByApplyId(FundsApplyData.Id); | |||
// var jsonData = new | |||
// { | |||
// FundsApply = FundsApplyData, | |||
// FundsApplyDetail = FundsApplyDetailData, | |||
// }; | |||
// return Success(jsonData); | |||
//} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response DeleteForm(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
purchaseeduIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response SaveForm(dynamic _) | |||
{ | |||
//Purchase_EduEntity entity = strEntity.ToObject<Purchase_EduEntity>(); | |||
//List<Purchase_Edu_DetailsEntity> purchase_Edu_DetailsList = strpurchase_Edu_DetailsList.ToObject<List<Purchase_Edu_DetailsEntity>>(); | |||
//purchase_EduIBLL.SaveEntity(keyValue, entity, purchase_Edu_DetailsList); | |||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||
Purchase_Edu_ApplyEntity entity = parameter.strEntity.ToObject<Purchase_Edu_ApplyEntity>(); | |||
List<Purchase_Edu_ApplydetailsEntity> detailList = parameter.DetailList.ToObject<List<Purchase_Edu_ApplydetailsEntity>>(); | |||
//var code = entity.EnCode; | |||
purchaseeduIBLL.SaveEntity(parameter.keyValue, entity, detailList); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 提交 | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response Submit(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
var processId = Guid.NewGuid().ToString(); | |||
purchaseeduIBLL.ModifyStatus(keyValue, 1, processId); | |||
UserInfo userInfo = LoginUserInfo.Get(); | |||
nWFProcessIBLL.CreateFlow("2-1", processId, "", 1, "", userInfo); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
#region 私有类 | |||
/// <summary> | |||
/// 表单实体类 | |||
/// <summary> | |||
private class ReqFormEntity | |||
{ | |||
public string keyValue { get; set; } | |||
public string strEntity { get; set; } | |||
public string DetailList { get; set; } | |||
} | |||
#endregion | |||
} | |||
} |
@@ -17,6 +17,13 @@ | |||
<typeAlias alias="PurchaseOtherMethod" type="Learun.Application.WorkFlow.PurchaseOtherMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseEduMethod" type="Learun.Application.WorkFlow.PurchaseEduMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchasePrintMethod" type="Learun.Application.WorkFlow.PurchasePrintMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseEduApplyMethod" type="Learun.Application.WorkFlow.PurchaseEduApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseInfoApplyMethod" type="Learun.Application.WorkFlow.PurchaseInfoApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseLogisticApplyMethod" type="Learun.Application.WorkFlow.PurchaseLogisticApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseOtherApplyMethod" type="Learun.Application.WorkFlow.PurchaseOtherApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchasePrintApplyMethod" type="Learun.Application.WorkFlow.PurchasePrintApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseStudentApplyMethod" type="Learun.Application.WorkFlow.PurchaseStudentApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseWorkApplyMethod" type="Learun.Application.WorkFlow.PurchaseWorkApplyMethod,Learun.Application.WorkFlow" /> | |||
<!--任务调度器--> | |||
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | |||
@@ -42,6 +49,13 @@ | |||
<type type="IWorkFlowMethod" mapTo="PurchaseOtherMethod" name="PurchaseOtherMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseEduMethod" name="PurchaseEduMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchasePrintMethod" name="PurchasePrintMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseEduApplyMethod" name="PurchaseEduApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseInfoApplyMethod" name="PurchaseInfoApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseLogisticApplyMethod" name="PurchaseLogisticApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseOtherApplyMethod" name="PurchaseOtherApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchasePrintApplyMethod" name="PurchasePrintApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseStudentApplyMethod" name="PurchaseStudentApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseWorkApplyMethod" name="PurchaseWorkApplyMethod"></type> | |||
</container> | |||
<container name="TsIOCcontainer"> | |||
<!--<type type="ITSMethod" mapTo="TestTask" name="taskioc"></type>--> | |||
@@ -130,15 +130,27 @@ | |||
<Compile Include="LogisticsManagement\Purchase_EduMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_InfoMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info_ApplydetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info_ApplyMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_LogisticMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic_ApplydetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic_ApplyMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_OtherMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other_ApplydetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other_ApplyMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_PrintMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print_ApplydetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print_ApplyMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_StudentMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student_ApplydetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student_ApplyMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work_ApplydetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work_ApplyMap.cs" /> | |||
<Compile Include="LR_App\DTImgMap.cs" /> | |||
<Compile Include="LR_App\FunctionMap.cs" /> | |||
<Compile Include="LR_App\FunctionSchemeMap.cs" /> | |||
@@ -628,6 +640,8 @@ | |||
<Compile Include="PersonnelManagement\VoteManagementMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_WorkMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu_ApplyMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu_ApplydetailsMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -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_Edu_ApplydetailsMap : EntityTypeConfiguration<Purchase_Edu_ApplydetailsEntity> | |||
{ | |||
public Purchase_Edu_ApplydetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_EDU_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-07-14 12:15 | |||
/// 描 述:教务报账申请 | |||
/// </summary> | |||
public class Purchase_Edu_ApplyMap : EntityTypeConfiguration<Purchase_Edu_ApplyEntity> | |||
{ | |||
public Purchase_Edu_ApplyMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_EDU_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_Info_ApplydetailsMap : EntityTypeConfiguration<Purchase_Info_ApplydetailsEntity> | |||
{ | |||
public Purchase_Info_ApplydetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_INFO_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-07-14 12:15 | |||
/// 描 述:教务报账申请 | |||
/// </summary> | |||
public class Purchase_Info_ApplyMap : EntityTypeConfiguration<Purchase_Info_ApplyEntity> | |||
{ | |||
public Purchase_Info_ApplyMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_INFO_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_Logistic_ApplyMap : EntityTypeConfiguration<Purchase_Logistic_ApplyEntity> | |||
{ | |||
public Purchase_Logistic_ApplyMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_LOGISTIC_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_Logistic_ApplydetailsMap : EntityTypeConfiguration<Purchase_Logistic_ApplydetailsEntity> | |||
{ | |||
public Purchase_Logistic_ApplydetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_LOGISTIC_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-07-14 12:15 | |||
/// 描 述:教务报账申请 | |||
/// </summary> | |||
public class Purchase_Other_ApplyMap : EntityTypeConfiguration<Purchase_Other_ApplyEntity> | |||
{ | |||
public Purchase_Other_ApplyMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_OTHER_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_Other_ApplydetailsMap : EntityTypeConfiguration<Purchase_Other_ApplydetailsEntity> | |||
{ | |||
public Purchase_Other_ApplydetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_OTHER_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-07-14 12:15 | |||
/// 描 述:教务报账申请 | |||
/// </summary> | |||
public class Purchase_Print_ApplyMap : EntityTypeConfiguration<Purchase_Print_ApplyEntity> | |||
{ | |||
public Purchase_Print_ApplyMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_PRINT_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_Print_ApplydetailsMap : EntityTypeConfiguration<Purchase_Print_ApplydetailsEntity> | |||
{ | |||
public Purchase_Print_ApplydetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_PRINT_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-07-14 12:15 | |||
/// 描 述:教务报账申请 | |||
/// </summary> | |||
public class Purchase_Student_ApplyMap : EntityTypeConfiguration<Purchase_Student_ApplyEntity> | |||
{ | |||
public Purchase_Student_ApplyMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_STUDENT_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_Student_ApplydetailsMap : EntityTypeConfiguration<Purchase_Student_ApplydetailsEntity> | |||
{ | |||
public Purchase_Student_ApplydetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_STUDENT_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-07-14 12:15 | |||
/// 描 述:教务报账申请 | |||
/// </summary> | |||
public class Purchase_Work_ApplyMap : EntityTypeConfiguration<Purchase_Work_ApplyEntity> | |||
{ | |||
public Purchase_Work_ApplyMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_WORK_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_Work_ApplydetailsMap : EntityTypeConfiguration<Purchase_Work_ApplydetailsEntity> | |||
{ | |||
public Purchase_Work_ApplydetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_WORK_APPLYDETAILS"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -392,26 +392,56 @@ | |||
<Compile Include="LogisticsManagement\Purchase_Info\Purchase_InfoIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info\Purchase_InfoService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info\Purchase_Info_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info_Apply\Purchase_Info_ApplyBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info_Apply\Purchase_Info_ApplydetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info_Apply\Purchase_Info_ApplyEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info_Apply\Purchase_Info_ApplyIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info_Apply\Purchase_Info_ApplyService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic\Purchase_LogisticBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic\Purchase_LogisticEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic\Purchase_LogisticIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic\Purchase_LogisticService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic\Purchase_Logistic_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic_Apply\Purchase_Logistic_ApplyBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic_Apply\Purchase_Logistic_ApplydetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic_Apply\Purchase_Logistic_ApplyEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic_Apply\Purchase_Logistic_ApplyIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic_Apply\Purchase_Logistic_ApplyService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other\Purchase_OtherBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other\Purchase_OtherEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other\Purchase_OtherIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other\Purchase_OtherService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other\Purchase_Other_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other_Apply\Purchase_Other_ApplyBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other_Apply\Purchase_Other_ApplydetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other_Apply\Purchase_Other_ApplyEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other_Apply\Purchase_Other_ApplyIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other_Apply\Purchase_Other_ApplyService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print\Purchase_PrintBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print\Purchase_PrintEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print\Purchase_PrintIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print\Purchase_PrintService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print\Purchase_Print_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print_Apply\Purchase_Print_ApplyBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print_Apply\Purchase_Print_ApplydetailsEntity.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_ApplyService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_Student_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student_Apply\Purchase_Student_ApplyBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student_Apply\Purchase_Student_ApplydetailsEntity.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_ApplyService.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_ApplyEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work_Apply\Purchase_Work_ApplyIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work_Apply\Purchase_Work_ApplyService.cs" /> | |||
<Compile Include="LR_CodeDemo\GantProject\GantProjectBLL.cs" /> | |||
<Compile Include="LR_CodeDemo\GantProject\GantProjectIBLL.cs" /> | |||
<Compile Include="LR_CodeDemo\GantProject\GantProjectService.cs" /> | |||
@@ -1920,6 +1950,11 @@ | |||
<Compile Include="LogisticsManagement\Purchase_Work\Purchase_WorkService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work\Purchase_WorkBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work\Purchase_WorkIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu_Apply\Purchase_Edu_ApplyEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu_Apply\Purchase_Edu_ApplydetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu_Apply\Purchase_Edu_ApplyService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu_Apply\Purchase_Edu_ApplyBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu_Apply\Purchase_Edu_ApplyIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -42,6 +42,30 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_EduEntity> GetDataList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return purchase_EduService.GetDataList( queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu_Details表数据 | |||
@@ -94,6 +94,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
/// </summary> | |||
[Column("ProcessId")] | |||
public string ProcessId { get; set; } | |||
/// <summary> | |||
/// 报账状态 | |||
/// </summary> | |||
[Column("APPLYSTATUS")] | |||
public int ApplyStatus { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -115,6 +120,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
@@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
/// <returns></returns> | |||
IEnumerable<Purchase_EduEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_EduEntity> GetDataList(string queryJson); | |||
/// <summary> | |||
/// 获取Purchase_Edu_Details表数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
@@ -39,7 +39,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
t.CreatorName, | |||
t.TotalAmount, | |||
t.Remark, | |||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime | |||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.Applystatus | |||
"); | |||
strSql.Append(" FROM Purchase_Edu t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
@@ -57,6 +57,13 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
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=0 and CheckStatus=2)"); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Purchase_EduEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -71,6 +78,57 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_EduEntity> 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_Edu 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_EduEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu_Details表数据 | |||
@@ -306,11 +364,13 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
//审核通过 | |||
if (status == 2) | |||
{ | |||
} | |||
} | |||
else | |||
{ | |||
entity.Status = status; | |||
} | |||
//更新课程异动表的审核状态 | |||
entity.Status = 1; | |||
entity.CheckStatus = status; | |||
entity.CheckUserId = loginUserInfo.userId; | |||
entity.CheckUserName = loginUserInfo.realName; | |||
@@ -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_Edu_ApplyBLL : Purchase_Edu_ApplyIBLL | |||
{ | |||
private Purchase_Edu_ApplyService purchase_Edu_ApplyService = new Purchase_Edu_ApplyService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Edu_ApplyEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return purchase_Edu_ApplyService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu_Applydetails表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Edu_ApplydetailsEntity> GetPurchase_Edu_ApplydetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_Edu_ApplyService.GetPurchase_Edu_ApplydetailsList(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu_Apply表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Edu_ApplyEntity GetPurchase_Edu_ApplyEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_Edu_ApplyService.GetPurchase_Edu_ApplyEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu_Applydetails表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Edu_ApplydetailsEntity GetPurchase_Edu_ApplydetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_Edu_ApplyService.GetPurchase_Edu_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_Edu_ApplyEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return purchase_Edu_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_Edu_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_Edu_ApplyEntity entity,List<Purchase_Edu_ApplydetailsEntity> purchase_Edu_applydetailsList) | |||
{ | |||
try | |||
{ | |||
purchase_Edu_ApplyService.SaveEntity(keyValue, entity,purchase_Edu_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_Edu_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_Edu_ApplyService.ModifyStatusByProcessId(status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |