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.
319 lines
8.5 KiB
319 lines
8.5 KiB
using NFine.Application.MFWMS;
|
|
using NFine.Code;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace NFine.Web.Areas.MFWMS.Controllers
|
|
{
|
|
public class ScrapDocumentDealWithController : ControllerBase
|
|
{
|
|
// GET: MFWMS/ScrapDocumentDealWith
|
|
ScrapDocumentDealWithApp App = new ScrapDocumentDealWithApp();
|
|
public ActionResult ScrapDocumentDealWith()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult ScrapNumInput()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult ScrapDocument()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult ScrappedIssue()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult OtherWarehousingAudit()
|
|
{
|
|
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 OOCode, string Sequence, string Type, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetSubGridJson(OOCode, Sequence, Type, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetDocumentsByCode(string Code, string Sequence, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetDocumentsByCode(Code, Sequence, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
//审核委外到货单
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWWSHDH(string ODNCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
string msg = App.SubmitFormWWSHDH(ODNCode, Sequence, keyValue, WorkPoint);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("报废成功!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//成品
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormChengPing(string MOCode, string Sequence, string keyValue, string WorkPoint, float Quantity)
|
|
{
|
|
string msg = App.SubmitFormChengPing(MOCode, Sequence, keyValue, WorkPoint, Quantity);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("报废成功!");
|
|
}
|
|
}
|
|
|
|
|
|
//报废出库(其他出库)批审
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult ApprovalReview(string Value)
|
|
{
|
|
|
|
string msg = App.ApprovalReview(Value);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("审核成功!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonScrappedIssue(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonScrappedIssue(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 GetSubGridJsonScrappedIssue(string Code,Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonScrappedIssue(Code, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonScrapDocument(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonScrapDocument(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 GetSubGridJsonScrapDocument(string Code, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonScrapDocument(Code, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
//委外原材报废(调拨申请单)批审
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult WWApprovalReview(string Value,string LocationCode)
|
|
{
|
|
|
|
string msg = App.WWApprovalReview(Value, LocationCode);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("审核成功!");
|
|
}
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonQiTa(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonQiTa(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 ApplyNegCode, string Sequence, string Type, string isPrint, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetSubGridJson(ApplyNegCode, Sequence, Type, isPrint, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
//其他入库一键生成批审
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormQTALL(string keyValue,string Location)
|
|
{
|
|
string msg = App.SubmitFormQTALL( keyValue, Location);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("审核成功!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult GetWHCodeByLocation(string LocationCode)
|
|
{
|
|
var data = App.GetWHCodeByLocation(LocationCode);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonChengPing(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonChengPing(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|