ReceivableController.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. using LeaRun.Application.Entity.CustomerManage;
  2. using LeaRun.Application.Busines.CustomerManage;
  3. using LeaRun.Util;
  4. using LeaRun.Util.WebControl;
  5. using System.Web.Mvc;
  6. namespace LeaRun.Application.Web.Areas.CustomerManage.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 6.1
  10. /// Copyright (c) 2013-2016 上海力软信息技术有限公司
  11. /// 创 建:佘赐雄
  12. /// 日 期:2016-04-06 17:24
  13. /// 描 述:应收账款
  14. /// </summary>
  15. public class ReceivableController : MvcControllerBase
  16. {
  17. private ReceivableBLL receivablebll = new ReceivableBLL();
  18. #region 视图功能
  19. /// <summary>
  20. /// 列表页面
  21. /// </summary>
  22. /// <returns></returns>
  23. [HttpGet]
  24. public ActionResult Index()
  25. {
  26. return View();
  27. }
  28. /// <summary>
  29. /// 收款页面
  30. /// </summary>
  31. /// <returns></returns>
  32. [HttpGet]
  33. public ActionResult ReceiptForm()
  34. {
  35. return View();
  36. }
  37. #endregion
  38. #region 获取数据
  39. /// <summary>
  40. /// 获取收款单列表
  41. /// </summary>
  42. /// <param name="pagination">分页参数</param>
  43. /// <param name="queryJson">查询参数</param>
  44. /// <returns>返回分页列表Json</returns>
  45. [HttpGet]
  46. public ActionResult GetPaymentPageListJson(Pagination pagination, string queryJson)
  47. {
  48. var watch = CommonHelper.TimerStart();
  49. var data = receivablebll.GetPaymentPageList(pagination, queryJson);
  50. var jsonData = new
  51. {
  52. rows = data,
  53. total = pagination.total,
  54. page = pagination.page,
  55. records = pagination.records,
  56. costtime = CommonHelper.TimerEnd(watch)
  57. };
  58. return ToJsonResult(jsonData);
  59. }
  60. /// <summary>
  61. /// 获取收款记录列表
  62. /// </summary>
  63. /// <param name="orderId">订单Id</param>
  64. /// <returns>返回列表Json</returns>
  65. [HttpGet]
  66. public ActionResult GetPaymentRecordJson(string orderId)
  67. {
  68. var data = receivablebll.GetPaymentRecord(orderId);
  69. return ToJsonResult(data);
  70. }
  71. #endregion
  72. #region 提交数据
  73. /// <summary>
  74. /// 保存表单(新增)
  75. /// </summary>
  76. /// <param name="keyValue">主键值</param>
  77. /// <param name="entity">实体对象</param>
  78. /// <returns></returns>
  79. [HttpPost]
  80. [ValidateAntiForgeryToken]
  81. [AjaxOnly]
  82. public ActionResult SaveForm(ReceivableEntity entity)
  83. {
  84. receivablebll.SaveForm(entity);
  85. return Success("操作成功。");
  86. }
  87. #endregion
  88. }
  89. }