You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
3.0 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System.Collections;
using Aspose.Cells;
using Microsoft.AspNetCore.Mvc;
using Estsh.Core.Services.IServices;
using Estsh.Core.Model.Result;
using Estsh.Core.Models;
using System.Text.Json;
using Estsh.Core.Controllers;
using Estsh.Core.Util;
/***************************************************************************************************
*
* 更新人sitong.dong
* 描述:生成盘点单
* 修改时间2022.06.22
* 修改日志:系统迭代升级
*
**************************************************************************************************/
namespace Estsh.Core.Web.Controllers
{
/// <summary>
/// 盘点单生产
/// </summary>
public class CheckOrderCreateController :BaseController
{
private ICheckOrderCreateService service;
public CheckOrderCreateController(ICheckOrderCreateService _service)
{
this.service = _service;
}
//
// GET: /CheckOrderCreate/
public ActionResult Index()
{
return View();
}
/// <summary>
/// 获取生成盘点单列表数据
/// </summary>
/// <param name="CartonTrackName">菜单名称</param>
/// <param name="pager">分页</param>
/// <param name="direction">排序方式</param>
/// <param name="sort">排序列</param>
/// <returns></returns>
public ActionResult getCheckOrderCreateListByPage(Pager pager, String direction, String sort, string cbChkCommand)
{
if ((string.IsNullOrEmpty(cbChkCommand)) || cbChkCommand == "null")
{
return Json("");
}
Hashtable result = new Hashtable();
result.Add("pager.pageNo", pager.pageNo);
Hashtable dataHt = this.service.getCheckOrderCreateListByPage( cbChkCommand);
result.Add("rows", dataHt["dataList"]);
result.Add("pager.totalRows", dataHt["totalCount"]);
result.Add("sort", sort);
result.Add("direction", direction);
return Json(result);
}
/// <summary>
///盘点单集合
/// </summary>
/// <returns>数据集</returns>
public ActionResult GetChkCommandList()
{
Hashtable resault = new Hashtable();
List<KeyValueResult> list = service.GetChkCommandList();
resault.Add("list", list);
return Json(resault);
}
/// <summary>
/// 盘点单生成
/// </summary>
/// <param name="cbChkCommand"></param>
/// <returns></returns>
public ActionResult CreateChkNo(string cbChkCommand)
{
Hashtable resault = new Hashtable();
string userId = CurrentEmp.EmpId.ToString();
List<dynamic> list = service.CreateChkNo(cbChkCommand, userId);
string message = list[0].r_msg;
resault.Add("message", message);
return Json(resault);
}
}
}