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.
214 lines
5.8 KiB
214 lines
5.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 ICSRCVIQCsController : ControllerBase
|
|
{
|
|
|
|
ICSRCVIQCsApp App = new ICSRCVIQCsApp();
|
|
// GET: WMS/ICSRCVIQCs
|
|
public ActionResult ICSRCVIQCs()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult Rejection()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult WWRejection()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult ICSInspectionDetail()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
//采购
|
|
[HttpGet]
|
|
public ActionResult GetICSInspection(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetICSInspection(ref pagination, queryJson);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
//委外
|
|
[HttpGet]
|
|
public ActionResult GetICSInspection2(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetICSInspection2(ref pagination, queryJson);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
//工单
|
|
[HttpGet]
|
|
public ActionResult GetICSInspection3(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetICSInspection3(ref pagination, queryJson);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
//不良原因
|
|
[HttpGet]
|
|
public ActionResult Select_ICSBadReason(string InvCode)
|
|
{
|
|
var data = App.Select_ICSBadReason(InvCode);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
//不良代码
|
|
[HttpGet]
|
|
public ActionResult GetSelectICSBadCode(string InvCode)
|
|
{
|
|
var data = App.GetSelectICSBadCode(InvCode);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 创建检验表
|
|
/// </summary>
|
|
/// <param name="keyValue"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult CreateICSInspection(string keyValue, string ICSInspections)
|
|
{
|
|
string msg = App.CreateICSInspection(keyValue, ICSInspections);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("添加成功!");
|
|
}
|
|
}
|
|
|
|
//生成拒收单
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult CreateRejection(string keyValue,string Type)
|
|
{
|
|
string msg = "";
|
|
if (Type=="1")
|
|
{
|
|
msg = App.CreateRejection(keyValue);
|
|
}
|
|
else
|
|
{
|
|
msg = App.CreateWWRejection(keyValue);
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("操作成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("" + msg + "");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 删除拒收单
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DelectRejection(string keyValue)
|
|
{
|
|
string msg = App.DelectRejection(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DelectWWRejection(string keyValue)
|
|
{
|
|
string msg = App.DelectWWRejection(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult GetInventoryInspection(Pagination pagination, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetInventoryInspection(ref pagination, InvCode);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SaveICSInspectionDetail(string ICSMTDOC, string InvCode)
|
|
{
|
|
string msg = App.SaveICSInspectionDetail(ICSMTDOC, InvCode);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("保存成功!");
|
|
}
|
|
}
|
|
}
|
|
}
|