using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.AssetManagementSystem;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;
using Learun.Application.Base.SystemModule;
using Learun.Application.Organization;
namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2020-08-07 16:34
/// 描 述:耗材领取
///
public class Ass_ReceiveController : MvcControllerBase
{
private Ass_ReceiveIBLL ass_ReceiveIBLL = new Ass_ReceiveBLL();
private Ass_ReceiveItemIBLL assReceiveItemIbll = new Ass_ReceiveItemBLL();
private DataItemIBLL dataItemIbll = new DataItemBLL();
private Ass_AssetsInfoIBLL assAssetsInfoIbll = new Ass_AssetsInfoBLL();
private UserIBLL userIbll=new UserBLL();
#region 视图功能
///
/// 主页面
///
///
[HttpGet]
public ActionResult Index()
{
return View();
}
///
/// 表单页
///
///
[HttpGet]
public ActionResult Form()
{
return View();
}
[HttpGet]
public ActionResult FormView()
{
return View();
}
[HttpGet]
public ActionResult Inventory()
{
return View();
}
#endregion
#region 获取数据
///
/// 获取页面显示列表数据
///
/// 查询参数
///
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject();
var data = ass_ReceiveIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
///
/// 获取表单数据
///
///
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Ass_ReceiveData = ass_ReceiveIBLL.GetAss_ReceiveEntity(keyValue);
var Ass_ReceiveItem = assReceiveItemIbll.GetList(keyValue);
var jsonData = new
{
Ass_Receive = Ass_ReceiveData,
Ass_ReceiveItem
};
return Success(jsonData);
}
///
/// 获取表单数据
///
///
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var Ass_Receive = ass_ReceiveIBLL.GetEntityByProcessId(processId);
var Ass_ReceiveItem = assReceiveItemIbll.GetList(Ass_Receive.RID);
var jsonData = new
{
Ass_Receive,
Ass_ReceiveItem,
};
return Success(jsonData);
}
#endregion
///
/// 获取出库清单数据
///
/// 出库单id
///
[HttpGet]
[AjaxOnly]
public ActionResult GetInventoryInfo(string applyId)
{
var outEntity = ass_ReceiveIBLL.GetAss_ReceiveEntity(applyId);
var outItem = assReceiveItemIbll.GetList(applyId).ToList();
var unitList = dataItemIbll.GetDetailList("sldw");
var ItemList = new List