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.

123 lines
3.7 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;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Collections;
using Estsh.Web.Service;
using Estsh.Web.Util;
/***************************************************************************************************
*
* 作者:龚泽宇
* 创建时间2015.12.21
* 描述:发运管理
* 修改日志:龚泽宇
*
* *************************************************************************************************/
namespace Estsh.Core.Web.Controllers
{
/// <summary>
/// 发运管理
/// </summary>
public class ShipManagementController : Controller
{
private ShipManagementService service = new ShipManagementService();
//
// GET: /ShipManagement/
public ActionResult Index()
{
return View();
}
/// <summary>
/// 获取客户产线列表
/// </summary>
/// <returns></returns>
public ActionResult GetCustPDLine()
{
Hashtable result = new Hashtable();
ArrayList list = this.service.GetCustPDLine();
result.Add("list", list);
return Json(result, JsonRequestBehavior.AllowGet);
}
/// <summary>
/// 状态变更
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
public ActionResult stateChanges(string ids, string count)
{
Hashtable result = new Hashtable();
string a = "-1";
if (string.IsNullOrEmpty(count) && ids == "null")
{
result.Add("list", "数据异常,请重新操作!");
}
else if (count == "已打印")
{
a = "0";
}
else if (count == "未打印")
{
a = "1";
}
string message = "";
int iCount = this.service.stateChanges(ids, a);
if (iCount > 0)
{
message = "变更成功。";
}
else
{
message = "变更失败。";
}
ArrayList list = new ArrayList();
result.Add("message", message);
return Json(result, JsonRequestBehavior.AllowGet);
}
/// <summary>
/// 根据分页条件获取用户列表
/// </summary>
/// <param name="account"></param>
/// <param name="pager"></param>
/// <param name="direction"></param>
/// <param name="sort"></param>
/// <returns></returns>
public ActionResult getShipManagementListByPage(String account, Pager pager, String direction, String sort, string cbCustPDLine, string txtStartTime, string txtEndTime, string txtStartSeq, string txtEndSeq)
{
if (string.IsNullOrEmpty(cbCustPDLine) || cbCustPDLine == "null")
{
return Json("");
}
if (string.IsNullOrEmpty(txtStartTime))
{
return Json("");
}
if (string.IsNullOrEmpty(txtEndTime))
{
return Json("");
}
Hashtable result = new Hashtable();
result.Add("pager.pageNo", pager.pageNo);
Hashtable dataHt = this.service.getShipManagementListByPage(pager, direction, sort, cbCustPDLine, txtStartTime, txtEndTime, txtStartSeq, txtEndSeq);
result.Add("rows", dataHt["dataList"]);
result.Add("pager.totalRows", dataHt["totalCount"]);
result.Add("sort", sort);
result.Add("direction", direction);
return Json(result);
}
}
}