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

279 lines
8.0 KiB

using NFine.Application.WMS;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using NFine.Code;
using System.Data.SqlClient;
using NFine.Data.Extensions;
using System.Data.OleDb;
using System.Configuration;
using ICS.Application.Entity;
namespace NFine.Web.Areas.WMS.Controllers
{
public class BlitemController : ControllerBase
{
BlitemApp App = new BlitemApp();
// GET: WMS/Blitem
public ActionResult BlitemList()
{
return View();
}
public ActionResult ICSCheckAdd()
{
return View();
}
public ActionResult GetHierarchy()
{
return View();
}
/// <summary>
/// 盘点单查询接口
/// </summary>
/// <param name="pagination"></param>
/// <param name="queryJson"></param>
/// <returns></returns>
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetGridJson(Pagination pagination, string queryJson)
{
DataTable ListData = App.GetGridJson(queryJson, ref pagination);
var JsonData = new
{
total = pagination.total,
page = pagination.page,
records = pagination.records,
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetSubGridJson(string ID, string Sequence, Pagination pagination)
{
DataTable ListData = App.GetSubGridJson(ID, Sequence, ref pagination);
var JsonData = new
{
total = pagination.total,
page = pagination.page,
records = pagination.records,
rows = ListData,
};
return Content(JsonData.ToJson());
}
public ActionResult DeleteICSCheckDetail(string ID)
{
//keyValue = keyValue.Substring(1, keyValue.Length - 2);
//WorkPoint = WorkPoint.Substring(1, WorkPoint.Length - 2);
string msg = App.DeleteICSCheckDetail(ID);
if (string.IsNullOrWhiteSpace(msg))
{
return Success("删除成功!");
}
else
{
return Error(msg);
}
}
//获取仓库
public ActionResult GetWHCode()
{
DataTable dt = App.GetWHCode();
return Content(dt.ToJson());
}
public ActionResult GetQU(string WHCodeID)
{
DataTable dt = App.GetQU(WHCodeID);
return Content(dt.ToJson());
}
//[HttpGet]
//public ActionResult GetQU(string WHCodeID)
//{
// try
// {
// DataTable data = App.GetQU(WHCodeID);
// return Content(data.ToJson());
// }
// catch (Exception ex)
// {
// return Error(ex.ToString());
// }
//}
public ActionResult GetPai(string WHCodeID, string Qu)
{
DataTable dt = App.GetPai(WHCodeID, Qu);
return Content(dt.ToJson());
}
public ActionResult GetHuoJia(string WHCodeID, string Qu, string Pai)
{
DataTable dt = App.GetHuoJia(WHCodeID, Qu, Pai);
return Content(dt.ToJson());
}
public ActionResult GetCeng(string WHCodeID, string Qu, string Pai, string HuoJia)
{
DataTable dt = App.GetCeng(WHCodeID, Qu, Pai, HuoJia);
return Content(dt.ToJson());
}
public ActionResult GetGe(string WHCodeID, string Qu, string Pai, string HuoJia, string Ceng)
{
DataTable dt = App.GetGe(WHCodeID, Qu, Pai, HuoJia, Ceng);
return Content(dt.ToJson());
}
/// <summary>
/// 生成盘点计划
/// </summary>
/// <param name="Parameter"></param>
/// <returns></returns>
[HttpPost]
[HandlerAjaxOnly]
public ActionResult AddICSCheck(string Parameter)
{
string msg = App.AddICSCheck(Parameter);
if (!string.IsNullOrEmpty(msg))
{
return Error(msg);
}
else
{
return Success("添加成功!");
}
}
[HttpPost]
[HandlerAjaxOnly]
[ValidateAntiForgeryToken]
public ActionResult DeleteICSCheck(string keyValue)
{
string msg = App.DeleteICSCheck(keyValue);
if (string.IsNullOrEmpty(msg))
{
return Success("删除成功!");
}
else
{
return Error(msg);
}
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetGridJsonWarehouse(Pagination pagination, string queryJson)
{
DataTable ListData = App.GetGridJsonWarehouse(queryJson, ref pagination);
var JsonData = new
{
total = pagination.total,
page = pagination.page,
records = pagination.records,
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetSubGridJsonRegion(string ID, Pagination pagination)
{
DataTable ListData = App.GetSubGridJsonRegion(ID, ref pagination);
var JsonData = new
{
total = pagination.total,
page = pagination.page,
records = pagination.records,
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetSubGridJsonRow(string WHID, string Region, Pagination pagination)
{
DataTable ListData = App.GetSubGridJsonRow(WHID, Region, ref pagination);
var JsonData = new
{
total = pagination.total,
page = pagination.page,
records = pagination.records,
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetSubGridJsonGoodsShelf(string WHID, string Region, string Row, Pagination pagination)
{
DataTable ListData = App.GetSubGridJsonGoodsShelf(WHID, Region, Row, ref pagination);
var JsonData = new
{
total = pagination.total,
page = pagination.page,
records = pagination.records,
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetSubGridJsonTier(string WHID, string Region, string Row, string GoodsShelf, Pagination pagination)
{
DataTable ListData = App.GetSubGridJsonTier(WHID, Region, Row, GoodsShelf, ref pagination);
var JsonData = new
{
total = pagination.total,
page = pagination.page,
records = pagination.records,
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetSubGridJsonGrid(string WHID, string Region, string Row, string GoodsShelf, string Tier, Pagination pagination)
{
DataTable ListData = App.GetSubGridJsonGrid(WHID, Region, Row, GoodsShelf, Tier, ref pagination);
var JsonData = new
{
total = pagination.total,
page = pagination.page,
records = pagination.records,
rows = ListData,
};
return Content(JsonData.ToJson());
}
}
}