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.
2476 lines
82 KiB
2476 lines
82 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;
|
|
using System.Xml;
|
|
|
|
namespace NFine.Web.Areas.WMS.Controllers
|
|
{
|
|
public class WMSCreateItemLotController : ControllerBase
|
|
{
|
|
// GET: WMS/WMSCreateItemLot
|
|
|
|
private WMSCreateItemLotApp App = new WMSCreateItemLotApp();
|
|
public ActionResult CreateItemLot()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult From()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult FromNew()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult FromPN()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult FromHG()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult FormMoPick()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult ImportLot()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult YLCreateItemLot()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult ICSLotRebind()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult PNCreateItemLot()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult SelectICSExtensionEnable()
|
|
{
|
|
var data = App.SelectICSExtensionEnable();
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult GetComplete()
|
|
{
|
|
var data = App.GetComplete();
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult GetWWComplete()
|
|
{
|
|
var data = App.GetWWComplete();
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[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 GetICSMOPick(Pagination pagination, string MODetailID, string workpoint)
|
|
{
|
|
DataTable ListData = App.GetICSMOPick(MODetailID, workpoint, 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());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonByCreate(string ApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonByCreate(ApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetVendorLotNo(string VenCode, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetVendorLotNo(VenCode, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
VendorLotNo = ListData.Rows[0][0].ToString(),
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitForm(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
|
|
{
|
|
int i = App.CreateItemLotNo(ApplyNegCode, Sequence, keyValue, WorkPoint, AMEnable);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteItemLot(string keyValue)
|
|
{
|
|
keyValue = keyValue.Substring(1, keyValue.Length - 2);
|
|
//WorkPoint = WorkPoint.Substring(1, WorkPoint.Length - 2);
|
|
string msg = App.DeleteItemLot(keyValue);
|
|
if (string.IsNullOrWhiteSpace(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 成品工单批量删除条码
|
|
/// </summary>
|
|
/// <param name="keyValue"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult BatchDeleteItemLot(string MOCodes)
|
|
{
|
|
MOCodes = MOCodes.Substring(1, MOCodes.Length - 2);
|
|
string msg = App.BatchDeleteItemLot(MOCodes);
|
|
if (string.IsNullOrWhiteSpace(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWeiWai(string OApplyNegCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormWeiWai(OApplyNegCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWeiWaiNew(string OApplyNegCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormWeiWaiNew(OApplyNegCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//成品
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormChengPing(string MOCode, string Sequence, string keyValue, string WorkPoint, float Quantity)
|
|
{
|
|
int i = App.SubmitFormChengPing(MOCode, Sequence, keyValue, WorkPoint, Quantity);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
//成品
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormChengPingNew(string MOCode, string Sequence, string keyValue, string WorkPoint, float Quantity)
|
|
{
|
|
int i = App.SubmitFormChengPingNew(MOCode, Sequence, keyValue, WorkPoint, Quantity);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
//成品
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormChengPingHG(string MOCode, string Sequence, string keyValue, string WorkPoint, float Quantity)
|
|
{
|
|
int i = App.SubmitFormChengPingHG(MOCode, Sequence, keyValue, WorkPoint, Quantity);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//销售退货
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormXiaoShou(string SDNCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
|
|
{
|
|
int i = App.SubmitFormXiaoShou(SDNCode, Sequence, keyValue, WorkPoint, AMEnable);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//销售退货
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormXiaoShouNew(string SDNCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
|
|
{
|
|
int i = App.SubmitFormXiaoShouNew(SDNCode, Sequence, keyValue, WorkPoint, AMEnable);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
//其他
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormQiTa(string InCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
|
|
{
|
|
int i = App.SubmitFormQiTa(InCode, Sequence, keyValue, WorkPoint, AMEnable);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
//其他
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormQiTaNew(string InCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
|
|
{
|
|
int i = App.SubmitFormQiTaNew(InCode, Sequence, keyValue, WorkPoint, AMEnable);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 打印数据参数:服务器的URL+打印的文件名,转化为Base64编码
|
|
/// </summary>
|
|
protected string strPrintData;
|
|
/// <summary>
|
|
/// 标识是否安装了控件
|
|
/// </summary>
|
|
protected bool bIsInstallPrintControl = true;
|
|
/// <summary>
|
|
/// 打印控件的Cookie值
|
|
/// </summary>
|
|
protected string strPrintControlCookie = "";
|
|
|
|
/// <summary>
|
|
/// 获取Url中去掉文件名的路径
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
private string GetUrlPath()
|
|
{
|
|
string strUrl = Request.Url.ToString();
|
|
int iEnd = strUrl.LastIndexOf("/");
|
|
strUrl = strUrl.Substring(0, iEnd + 1);
|
|
|
|
return strUrl;
|
|
}
|
|
|
|
|
|
//打印
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult PrintItemLot(string keyValue, string WorkPoint, string Type)
|
|
{
|
|
// string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location;
|
|
keyValue = keyValue.Substring(1, keyValue.Length - 2);
|
|
WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location;
|
|
string strPrintFileName = Server.MapPath("/ReportFile/") + "纷纷无法b_成品条码.fr3";
|
|
PrintJson pJson = new PrintJson(Server.MapPath("./PrintTemp"), strPrintFileName);
|
|
pJson.CheckRegister("苏州智合诚信息科技有限公司", "56DD3B4C172D0D140841CAC98A58A819F4E28EDA5D6E45711DDD64F6A439F68B6A7870CD7DAFD69A919CB870207FE4BB206F92BE3D53C221B019E0797E739EBA4"); //注册信息
|
|
//pJson.CheckRegister("注册姓名", "8ECCCD6A1302DFEE1A6456A5D"); //注册信息
|
|
//pJson.AddPrintParam("ShopName", "测试酒楼");
|
|
//pJson.AddPrintParam("PrintDepositAdd", "说明:本单据为贵客押金收取凭证,盖章有效。退房时请出示,遗失者自负,请妥善保存。退房时间为12:00时,延时退房18:00时以前按半天房费收取,18:00时以后算全天房价。押金单有效期为一个月,过期作废。 贵重物品请交前台寄存,未寄存丢失自负。 谢谢!");
|
|
SetCookieAndURL(pJson);// 设置控件调用的Cookie值,判断是否安装了打印控件
|
|
string strSql = "";
|
|
if (Type == "1")
|
|
{
|
|
strSql = @"select a.LotNo, c.ApplyNegCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
|
|
FROM dbo.ICSInventoryLot a
|
|
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
|
|
left join ICSMOApplyNegDetail c on b.TransCode=c.ApplyNegCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
|
|
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
|
|
where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
|
|
}
|
|
if (Type == "2")
|
|
{
|
|
strSql = @"select a.LotNo, c.OApplyNegCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
|
|
FROM dbo.ICSInventoryLot a
|
|
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
|
|
left join ICSOApplyNegDetail c on b.TransCode=c.OApplyNegCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
|
|
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
|
|
where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
|
|
}
|
|
if (Type == "3")
|
|
{
|
|
strSql = @"select a.LotNo, c.MOCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
|
|
FROM dbo.ICSInventoryLot a
|
|
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
|
|
left join ICSMO c on b.TransCode=c.MOCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
|
|
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
|
|
where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
|
|
}
|
|
if (Type == "5")
|
|
{
|
|
strSql = @"select a.LotNo, c.InCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
|
|
FROM dbo.ICSInventoryLot a
|
|
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
|
|
left join ICSOtherIn c on b.TransCode=c.InCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
|
|
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
|
|
where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
|
|
}
|
|
if (Type == "6")
|
|
{
|
|
strSql = @"select a.LotNo, c.ReturnCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
|
|
FROM dbo.ICSInventoryLot a
|
|
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
|
|
left join ICSReturn c on b.TransCode=c.ReturnCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
|
|
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
|
|
where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
|
|
}
|
|
if (Type == "7")
|
|
{
|
|
strSql = @"select a.LotNo, c.DNCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
|
|
FROM dbo.ICSInventoryLot a
|
|
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
|
|
left join ICSDeliveryNotice c on b.TransCode=c.DNCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
|
|
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
|
|
where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
|
|
}
|
|
if (Type == "8")
|
|
{
|
|
strSql = @"select a.LotNo, c.ODNCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
|
|
FROM dbo.ICSInventoryLot a
|
|
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
|
|
left join ICSODeliveryNotice c on b.TransCode=c.ODNCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
|
|
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
|
|
where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
|
|
}
|
|
if (Type == "9")
|
|
{
|
|
strSql = @" select a.LotNo, c.RCVCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
|
|
FROM dbo.ICSInventoryLot a
|
|
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
|
|
left join ICSManufactureReceive c on b.TransCode=c.RCVCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
|
|
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
|
|
|
|
where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
|
|
}
|
|
if (Type == "10")
|
|
{
|
|
strSql = @"select a.LotNo, c.DNCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
|
|
FROM dbo.ICSInventoryLot a
|
|
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
|
|
left join ICSDeliveryNotice c on b.TransCode=c.DNCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
|
|
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
|
|
where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
|
|
}
|
|
if (Type == "11")
|
|
{
|
|
strSql = @"select a.LotNo, c.ODNCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
|
|
FROM dbo.ICSInventoryLot a
|
|
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
|
|
left join ICSODeliveryNotice c on b.TransCode=c.ODNCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
|
|
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
|
|
where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
|
|
}
|
|
//string strSql = @"Select * From CashLog";
|
|
DataTable dtCashLog = DbHelper.ExecuteTable(DbHelper.ConnectionString, CommandType.Text, strSql, true, null);
|
|
// string strPrintTempFile = pJson.ShowReport(dtCashLog); //产生JSON文件内容
|
|
string strPrintTempFile = pJson.ShowReport(dtCashLog); //导出PDF文件
|
|
|
|
//把服务器的URL + 此文件名 传递给控件,由控件下载还原数据进行打印
|
|
string strServerURL = GetUrlPath() + "PrintTemp/";
|
|
string strData = strServerURL + strPrintTempFile;
|
|
strPrintData = PrintFunction.EnBase64(strData);
|
|
var JsonData = new
|
|
{
|
|
strPrintData_1 = strPrintData,
|
|
bIsInstallPrintControl_1 = bIsInstallPrintControl,
|
|
strPrintControlCookie_1 = strPrintControlCookie
|
|
};
|
|
//多站点
|
|
string sql = @"UPDATE dbo.ICSInventoryLot
|
|
SET PrintTimes=ISNULL(PrintTimes,0)+1,
|
|
LastPrintUser='',
|
|
LastPrintTime=GETDATE()
|
|
WHERE ID IN (" + keyValue.TrimEnd(',') + ") and WorkPoint in ('" + WorkPoint.TrimEnd(',') + "')";
|
|
SqlHelper.ExecuteNonQuery(sql);
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 设置控件调用的Cookie值,判断是否安装了打印控件
|
|
/// </summary>
|
|
/// <param name="pJson"></param>
|
|
private void SetCookieAndURL(PrintJson pJson)
|
|
{
|
|
bIsInstallPrintControl = false;
|
|
strPrintControlCookie = "";
|
|
HttpCookie pCookieInstall = Request.Cookies["InstallPrintControl"];
|
|
if (pCookieInstall != null)
|
|
{ //Cookie存在
|
|
strPrintControlCookie = pCookieInstall.Value.ToString();
|
|
|
|
//以Cookie值查找在数据表中是否存在
|
|
string strSql = @"Select * From sys_SRM_CheckInstall Where Cookie = @Cookie";
|
|
SqlParameter[] pmcCookie = { new SqlParameter("Cookie", strPrintControlCookie) };
|
|
using (SqlDataReader drCookie = DbHelper.ExecuteReader(DbHelper.ConnectionString, CommandType.Text, strSql, pmcCookie))
|
|
{
|
|
if (drCookie.Read())
|
|
{ //标识为已经安装
|
|
bIsInstallPrintControl = true;
|
|
}
|
|
drCookie.Close();
|
|
}
|
|
//更新Cookie的保存时间
|
|
pCookieInstall.Expires = DateTime.Now.AddYears(10);
|
|
Response.SetCookie(pCookieInstall);
|
|
}
|
|
else
|
|
{//Cookie不存在,则新建Cookie
|
|
strPrintControlCookie = System.Guid.NewGuid().ToString();
|
|
pCookieInstall = new HttpCookie("InstallPrintControl", strPrintControlCookie);
|
|
pCookieInstall.Expires = DateTime.Now.AddYears(10);
|
|
Response.Cookies.Add(pCookieInstall);
|
|
}
|
|
|
|
string strUrl = Server.MapPath("/PrintTemp/") + "IsCheckInstall";
|
|
|
|
pJson.SetCookieAndURL(strPrintControlCookie, strUrl);
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonWeiWai(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonWeiWai(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 GetSubGridJsonWeiWai(string OApplyNegCode, string Sequence, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonWeiWai(OApplyNegCode, Sequence, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonWeiWaiByCreate(string OApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonWeiWaiByCreate(OApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.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());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询(成品)
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonChengPingByCreate(string MOCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonChengPingByCreate(MOCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonXiaoShou(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonXiaoShou(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 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());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询(销售退货)
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonXiaoShouByCreate(string SDNCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonXiaoShouByCreate(SDNCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询(其他入库)
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonQiTaByCreate(string InCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonQiTaByCreate(InCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
//归还
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonGuiHuan(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonGuiHuan(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 GetGridJsonSHDH(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonSHDH(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 GetGridJsonWWSHDH(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonWWSHDH(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 GetGridJsonKLCPRK(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonKLCPRK(queryJson, ref pagination);
|
|
var JsonData = new
|
|
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询(审核到货单)
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonSHDHByCreate(string DNCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonSHDHByCreate(DNCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询(审核委外到货单)
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonWWSHDHByCreate(string ODNCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonWWSHDHByCreate(ODNCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询(审核委外到货单)
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonKLCPRKByCreate(string RCVCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonKLCPRKByCreate(RCVCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询(归还)
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonGuiHuanByCreate(string ReturnCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonGuiHuanByCreate(ReturnCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
//归还
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormGuiHuan(string ReturnCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormGuiHuan(ReturnCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//审核到货单
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormSHDH(string DNCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
|
|
{
|
|
int i = App.SubmitFormSHDH(DNCode, Sequence, keyValue, WorkPoint, AMEnable);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
//审核委外到货单
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWWSHDH(string ODNCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
|
|
{
|
|
int i = App.SubmitFormWWSHDH(ODNCode, Sequence, keyValue, WorkPoint, AMEnable);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
//开立成品入库
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormKLCPRK(string RCVCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormKLCPRK(RCVCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
//委外拒收单
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonWWJSD(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonWWJSD(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 GetGridJsonJSD(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonJSD(queryJson, 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 SubmitFormJSD(string DNCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormJSD(DNCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
//审核委外到货单
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWWJSD(string ODNCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormWWJSD(ODNCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//领料申请退料
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonLLSQTL(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonLLSQTL(queryJson, ref pagination);
|
|
var JsonData = new
|
|
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询(领料申请退料)
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonJSDByCreate(string DNCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonJSDByCreate(DNCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击生成条码查询(领料申请退料)
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonWWJSDByCreate(string ODNCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonWWJSDByCreate(ODNCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
//获取委外退料源头条码
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetWeiWaiTLSrcLot(string OApplyNegCode, string Sequence, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetWeiWaiTLSrcLot(OApplyNegCode, Sequence, WorkPoint);
|
|
return Content(ListData.ToJson());
|
|
}
|
|
//获取领料申请源头条码
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetLLSQSrcLot(string ApplyNegCode, string Sequence, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetLLSQSrcLot(ApplyNegCode, Sequence, WorkPoint);
|
|
return Content(ListData.ToJson());
|
|
}
|
|
//获取条码备用字段568(派纳特殊需求---销售退货直接取单据备用字段信息)
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSSDDocEATTRIBUTEInfo(string SSDCode, string Sequence, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetSSDDocEATTRIBUTEInfo(SSDCode, Sequence, WorkPoint);
|
|
return Content(ListData.ToJson());
|
|
}
|
|
//获取业务源头条码备用字段568(派纳特殊需求)
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSrcLotNoInfoPN(string LotNo, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetSrcLotNoInfoPN(LotNo, WorkPoint);
|
|
return Content(ListData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonLLSQDByCreate(string ApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonLLSQDByCreate(ApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
//领料申请退料生成条码
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormLLSQTL(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormLLSQTL(ApplyNegCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
//领料申请退料生成条码
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormLLSQTLNew(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormLLSQTLNew(ApplyNegCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
//材料出库退料
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonCLCK(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonCLCK(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 GetSubGridJsonCLCKByCreate(string ApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonCLCKByCreate(ApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
//材料出库退料生成条码
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormCLCKT(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormCLCKT(ApplyNegCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!请确认单据状态是否为已审核。");
|
|
}
|
|
}
|
|
|
|
//委外领料
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonWWLLTL(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonWWLLTL(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 GetSubGridJsonWWLLByCreate(string OApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonWWLLByCreate(OApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
//委外领料申请退料
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWWLL(string OApplyNegCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormWWLL(OApplyNegCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//委外材料出库
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonWWCLCK(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonWWCLCK(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 GetSubGridJsonWWCLByCreate(string OApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonWWCLByCreate(OApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWWCL(string OApplyNegCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormWWCL(OApplyNegCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//返工工单
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonFGGD(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonFGGD(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 GetSubGridJsonFGGDCreate(string FGGDMOCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonFGGDCreate(FGGDMOCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormFGGD(string FGGDMOCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormFGGD(FGGDMOCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 锐腾两步调入单获去单据信息
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonTransferByCreate(string TransferNO, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonTransferByCreate(TransferNO, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 锐腾两部调入单生成条码
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormTransfer(string TransferNO, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormTransfer(TransferNO, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetQiSetNum(string keyValue)
|
|
{
|
|
var rows = App.GetQiSetNum(keyValue);
|
|
|
|
return Content(rows.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetLoadShow()
|
|
{
|
|
DataTable ListData = App.GetLoadShow();
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetFreeEnble()
|
|
{
|
|
DataTable ListData = App.GetFreeEnble();
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public void StatementExportAll(string Type, string ID)
|
|
{
|
|
//ID = ID.Substring(0, ID.Length - 2);
|
|
DataTable dt = App.StatementExportAll(Type, ID);
|
|
AsposeCell.Export(dt);
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonBHGTM(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonBHGTM(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 GetSubGridJsonBHGTM(string LotNo, string Type, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonBHGTM(LotNo, Type, 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 SubmitFormBHGTM(string LotNo, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormBHGTM(LotNo, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult SelGDLX()
|
|
{
|
|
var data = App.SelGDLX();
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult CheckParentMO()
|
|
{
|
|
try
|
|
{
|
|
var data = App.CheckParentMO();
|
|
return Content(data.ToJson());
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult GetInvBatchEnable(string InvCode)
|
|
{
|
|
var data = App.GetInvBatchEnable(InvCode);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
//副产品
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonFCP(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonFCP(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 锐腾调入单
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonTransfer(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonTransfer(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 采购入库生成条码
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonPurchaseReceive(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonPurchaseReceive(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 采购入库单生成条码
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormCGRKDSC(string RCVCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormCGRKDSC(RCVCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormCGRKDSCNew(string RCVCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormCGRKDSCNew(RCVCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 采购入库获去单据信息
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonPurchaseReceiveByCreate(string RCVCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonPurchaseReceiveByCreate(RCVCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 委外采购入库生成条码
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonOutPurchaseReceive(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonOutPurchaseReceive(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 委外采购入库单生成条码
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWWCGRKDSC(string RCVCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormWWCGRKDSC(RCVCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 委外采购入库单生成条码(新)
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWWCGRKDSCNew(string RCVCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormWWCGRKDSCNew(RCVCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 委外采购入库获去单据信息
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonOutPurchaseReceiveByCreate(string RCVCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonOutPurchaseReceiveByCreate(RCVCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 派纳 线边仓调拨申请单生成条码
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonTransferApplicationPN(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonTransferApplicationPN(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 派纳 线边仓一步调入单生成条码
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonOneSetpTransPN(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonOneSetpTransPN(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 铭锋 退货调拨申请单生成条码
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonTransferApplication(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonTransferApplication(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 派纳 线边仓调拨申请单生成条码 保存
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormTransferApplicatioPNSave(string TransferNO, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormTransferApplicatioPNSave(TransferNO, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 派纳 线边仓一步调入单生成条码 保存
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormOneStepTransPNSave(string TransferNO, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormOneStepTransPNSave(TransferNO, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 派纳 线边仓调拨申请单生成条码 保存(非规则生成条码)
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormTransferApplicatioPNSaveNew(string TransferNO, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormTransferApplicatioPNSaveNew(TransferNO, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 派纳 线边仓一步调入单生成条码 保存(非规则生成条码)
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormOneStepTransPNSaveNew(string TransferNO, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormOneStepTransferPNSaveNew(TransferNO, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 铭锋 退货调拨申请单生成条码 保存
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormTransferApplicatioSave(string TransferNO, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormTransferApplicatioSave(TransferNO, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 铭锋 退货调拨申请单生成条码 保存
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormTransferApplicatioSaveNew(string TransferNO, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitFormTransferApplicatioSaveNew(TransferNO, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 派纳 线边仓调拨申请单获取单据信息
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonTransferApplicationByCreatePN(string TransferNO, string Sequence, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonTransferApplicationByCreatePN(TransferNO, Sequence, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 派纳 线边仓一步调入单获取单据信息
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonOneSetpTransByCreatePN(string TransferNO, string Sequence, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonOneSetpTransByCreatePN(TransferNO, Sequence, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 铭锋 退货调拨申请单获取单据信息
|
|
/// </summary>
|
|
/// <param name="TransferNO"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonTransferApplicationByCreate(string TransferNO, string Sequence, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonTransferApplicationByCreate(TransferNO, Sequence, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonFCPCreate(string FCPMOCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonFCPCreate(FCPMOCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormFCP(string FCPMOCode, string Sequence, string keyValue, string WorkPoint)
|
|
{
|
|
try
|
|
{
|
|
int i = App.SubmitFormFCP(FCPMOCode, Sequence, keyValue, WorkPoint);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGeneratedNum(string Code, string Sequence, string Type, string thisCreateQty, string InvCode, string Quantitys)
|
|
{
|
|
bool Flag = App.GetGeneratedNum(Code, Sequence, Type, thisCreateQty, InvCode, Quantitys);
|
|
var JsonData = new
|
|
{
|
|
Flag = Flag,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
//到货单一键生成条码
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormSHDHALL(string keyValue)
|
|
{
|
|
int i = App.SubmitFormSHDHALL(keyValue);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//委外到货单一键生成条码
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWWSHDHALL(string keyValue)
|
|
{
|
|
int i = App.SubmitFormWWSHDHALL(keyValue);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//开立成品入库(一键生成)
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormKLCPRKALL(string keyValue)
|
|
{
|
|
int i = App.SubmitFormKLCPRKALL(keyValue);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult SelectICSColumnEnableForLotEnable()
|
|
{
|
|
var data = App.SelectICSColumnEnableForLotEnable();
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetLoadShowForColumn()
|
|
{
|
|
DataTable ListData = App.GetLoadShowForColumn();
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetAMEnable()
|
|
{
|
|
string ListData = App.GetAMEnable();
|
|
var data = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
//查询配置-计量
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SeachMeasure()
|
|
{
|
|
DataTable ListData = App.SeachMeasure();
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询配置-开启栏位
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SeachLableofDisable()
|
|
{
|
|
DataTable ListData = App.SeachLableofDisable();
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SeachAmountEnablebyInvCode(string InvCode)
|
|
{
|
|
DataTable ListData = App.SeachAmountEnablebyInvCode(InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SeachDatabyInvCode(string InvCode)
|
|
{
|
|
DataTable ListData = App.SeachDatabyInvCode(InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
/// <summary>
|
|
/// 文件上传到本地
|
|
/// </summary>
|
|
public string UploadFile(string Code, string Sequence)
|
|
{
|
|
try
|
|
{
|
|
//string str_Year = Request.Form["txt_Year"];
|
|
//String UPLoadType = Request.Form["UPLoadType"];
|
|
HttpFileCollection hpFiles = System.Web.HttpContext.Current.Request.Files;
|
|
if (hpFiles != null && hpFiles.Count > 0)
|
|
{
|
|
|
|
string IsXls = System.IO.Path.GetExtension(hpFiles[0].FileName).ToString().ToLower();//System.IO.Path.GetExtension获得文件的扩展名
|
|
if (IsXls != ".xls" && IsXls != ".xlsx")
|
|
{
|
|
|
|
return "只可以选择Excel(.xls .xlsx)文件";//当选择的不是Excel文件时,返回
|
|
}
|
|
string filename = DateTime.Now.ToString("yyyyMMddhhmmss") + IsXls; //获取Execle文件名 DateTime日期函数
|
|
string savePath = System.Web.HttpContext.Current.Server.MapPath("~\\File\\UPLoadFile\\" + filename);//Server.MapPath 获得虚拟服务器相对路径
|
|
|
|
int iLen = hpFiles[0].ContentLength;
|
|
if (Directory.Exists(savePath)) return "文件已存在";
|
|
byte[] bData = new byte[iLen];
|
|
hpFiles[0].InputStream.Read(bData, 0, iLen);
|
|
|
|
|
|
FileStream newFile = new FileStream(savePath, FileMode.OpenOrCreate);
|
|
newFile.Write(bData, 0, bData.Length);
|
|
newFile.Flush();
|
|
int _FileSizeTemp = hpFiles[0].ContentLength;
|
|
|
|
newFile.Close();
|
|
newFile.Dispose();
|
|
//bool del = false;
|
|
string mess = "";
|
|
mess = App.LotBindCode(savePath, Code, Sequence);
|
|
if (System.IO.File.Exists(savePath))//删除文件
|
|
{
|
|
|
|
System.IO.File.Delete(savePath);
|
|
}
|
|
return mess;
|
|
|
|
}
|
|
else
|
|
{
|
|
return "获取文件失败";
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
|
|
return ex.ToString();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//生产退料(一键生成)
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormGDTLALL(string keyValue)
|
|
{
|
|
int i = App.SubmitFormGDTLALL(keyValue);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//工单成品生成条码(一键生成)
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormChengPingALL(string keyValue)
|
|
{
|
|
try
|
|
{
|
|
int i = App.SubmitFormChengPingALL(keyValue);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetVendorBatch()
|
|
{
|
|
DataTable ListData = App.GetVendorBatch();
|
|
var JsonData = new
|
|
{
|
|
VendorLotNo = ListData.Rows[0][0].ToString(),
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetVendorBatchBYInvCode(string InvCode, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetVendorBatchBYInvCode(InvCode, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
VendorLotNo = ListData.Rows[0][0].ToString(),
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
//查询返工工单数据源
|
|
[HttpGet]
|
|
public ActionResult GetReworkMo(string invcode, string Code, string SourceCode, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetReworkMo(invcode, Code, SourceCode, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
//条码重新绑定返工工单
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult LotReworkBind(string LotNo, string Code, string Sequence, string ExtensionID)
|
|
{
|
|
string msg = App.LotReworkBind(LotNo, Code, Sequence, ExtensionID);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("条码重新绑定成功!");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 一键退库(咖博士新增需求:根据生产退料单,B2、C类物料可以实现一键退库操作)
|
|
/// </summary>
|
|
/// <param name="LotNo"></param>
|
|
/// <param name="Code"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="ExtensionID"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult PostInWareHouse(string IDs)
|
|
{
|
|
try
|
|
{
|
|
string msg = App.PostInWareHouse(IDs);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("操作成功!");
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
//红字销售出库单打生成条码列表
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonWMSSSD(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonWMSSSD(queryJson, ref pagination);
|
|
var JsonData = new
|
|
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 红字销售出库单打生成条码查询
|
|
/// </summary>
|
|
/// <param name="SDNCode"></param>
|
|
/// <param name="Sequence"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonSSDByCreate(string SSDCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonSSDByCreate(SSDCode, Sequence, WorkPoint, Quantity, InvCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
//红字销售出库单生成条码
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormSSD(string SSDCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
|
|
{
|
|
int i = App.SubmitFormSSD(SSDCode, Sequence, keyValue, WorkPoint, AMEnable);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//红字销售出库单生成条码
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormSSDNew(string SSDCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
|
|
{
|
|
int i = App.SubmitFormSSDNew(SSDCode, Sequence, keyValue, WorkPoint, AMEnable);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//采购入库生成(一键)
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormCGRKALL(string keyValue)
|
|
{
|
|
int i = App.SubmitFormCGRKALL(keyValue);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//销售退货(一键)
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormXSTHALL(string keyValue)
|
|
{
|
|
int i = App.SubmitFormXSTHALL(keyValue);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
//其他入库(一键)
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormQiTaALL(string keyValue)
|
|
{
|
|
int i = App.SubmitFormQiTaALL(keyValue);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//材料出库退料(一键生成)
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormCLCKTLALL(string keyValue)
|
|
{
|
|
int i = App.SubmitFormCLCKTLALL(keyValue);
|
|
if (i > 0)
|
|
{
|
|
return Success("生成成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("生成失败!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|