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.
287 lines
7.8 KiB
287 lines
7.8 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 ICSDisassemblyDocController : ControllerBase
|
|
{
|
|
// GET: WMS/ICSDisassemblyDoc
|
|
ICSDisassemblyDocApp App = new ICSDisassemblyDocApp();
|
|
ICSDisassemblyDocEntityApp EntityApp = new ICSDisassemblyDocEntityApp();
|
|
public ActionResult ICSDisassem()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
public ActionResult ICSDisassemblyDocAdd()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[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 Code)
|
|
{
|
|
DataTable ListData = App.GetSubGridJson(Code);
|
|
var JsonData = new
|
|
{
|
|
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
//查询符合套件的在库条码
|
|
public ActionResult GetLotNoByKit(string InvCode, string WHCode, string ExtensionID, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetLotNoByKit(InvCode, WHCode, ExtensionID, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
//绑定套件
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult CreateLogByKit(string Code, string Parameter)
|
|
{
|
|
string msg = App.CreateLogByKit(Code,Parameter);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("添加成功!");
|
|
}
|
|
}
|
|
|
|
|
|
//批量生成散件条码
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult CreateInventoryLot(string Code)
|
|
{
|
|
string msg = App.CreateInventoryLot(Code);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
}
|
|
|
|
//删除条码
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
|
|
public ActionResult DeleteInventoryLot(string Code)
|
|
{
|
|
string msg = App.DeleteInventoryLot(Code);
|
|
if (string.IsNullOrWhiteSpace(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
public ActionResult ICSDisassemblyDocQuery()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
|
|
public ActionResult ICSDisassemblyDocEdit()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteDisassemblyDocApplyNeg(string keyValue)
|
|
{
|
|
string msg = EntityApp.DeleteDisassemblyDocApplyNeg(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 详情
|
|
/// </summary>
|
|
/// <param name="DABDOCCode"></param>
|
|
/// <param name="pagination"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetDisassemblyDocApplyNegDetail(string DABDOCCode, Pagination pagination)
|
|
{
|
|
DataTable ListData = EntityApp.GetDisassemblyDocApplyNegDetail(DABDOCCode, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
public void ClearTemp()
|
|
{
|
|
EntityApp.ClearTemp();
|
|
}
|
|
|
|
public ActionResult GetOOCode(string WorkPoint)
|
|
{
|
|
try
|
|
{
|
|
string Code = EntityApp.GetOOCode(WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
Code = Code,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 汇总
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public ActionResult GetDisassemblyDocApplyNeg(Pagination pagination)
|
|
{
|
|
DataTable ListData = EntityApp.GetDisassemblyDocApplyNeg(ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改弹出框的数据来源
|
|
/// </summary>
|
|
/// <param name="DABDOCCode"></param>
|
|
/// <param name="pagination"></param>
|
|
/// <returns></returns>
|
|
public ActionResult GetICSDisassemblyDocEntityReturnTemporary(string DABDOCCode, Pagination pagination)
|
|
{
|
|
DataTable table = EntityApp.GetDisassemblyDocReturnTemporary(DABDOCCode);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = table
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
}
|
|
/// <summary>
|
|
/// 新增和修改
|
|
/// </summary>
|
|
/// <param name="ICSASN"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SaveICSDisassemblyDocEntityApplyNeg(string keyValue, string deleteIDs)
|
|
{
|
|
|
|
string msg = EntityApp.SaveDisassemblyDocApplyNeg(keyValue, deleteIDs);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("保存成功!");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 零件一键入库(咖博士)
|
|
/// </summary>
|
|
/// <param name="Codes"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult PostInWareHouse(string Codes)
|
|
{
|
|
try
|
|
{
|
|
string msg = App.PostInWareHouse(Codes);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("操作成功!");
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|