Browse Source

调整接口

master
lilili 2 years ago
parent
commit
9115fd717c
  1. 23
      WMS-BS/NFine.Application/WMS/PickMaterialApp.cs
  2. 26
      WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml

23
WMS-BS/NFine.Application/WMS/PickMaterialApp.cs

@ -124,12 +124,14 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'";
case when sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName != 'JOB' then ''
else (case when sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName = 'JOB' then '' else '' end) end as Status,
f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 ,
f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID
f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID,
case when a.MUSER!= 'JOB' then a.MUSER else '' end AS PickName
from ICSMOApply a
left JOIN ICSInventory b ON b.InvCode=a.InvCode
LEFT JOIN ICSInventoryDetail detail ON b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint
left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint
left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint
where a.WorkPoint='{WorkPoint}' and a.EATTRIBUTE!='17'");
if (!string.IsNullOrWhiteSpace(queryJson))
@ -189,13 +191,13 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'";
sqlString.Append(@" group by a.ApplyCode, a.WorkPoint,a.IssueQuantity,a.CreateDateTime,a.createperson,
f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1,f.cFree2,
f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.WHCode,detail.LocationCode,a.ID,a.EATTRIBUTE,a.Sets,a.OrderInvCode,a.OrderInvDescribe,a.BillType,a.Remarks,a.Desks,a.DispatchNumber,a.DispatcherName,
a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.InvDescribe,a.Unit,a.StockIndicator,a.MUSERName) as t where t.row=1");
a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.InvDescribe,a.Unit,a.StockIndicator,a.MUSERName,a.MUSER ) as t where t.row=1");
if (!string.IsNullOrWhiteSpace(queryParam["Status"].ToString()))
{
if (queryParam["Status"].ToString() == "3")
{
sqlString.Append($@" AND t.Status='已过' ");
sqlString.Append($@" AND t.Status='已过' ");
}
else if (queryParam["Status"].ToString() == "2")
{
@ -1887,17 +1889,22 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
picksql = string.Format(picksql, MUSER, WorkPoint);
SqlHelper.ExecuteNonQuery(picksql);
picksql = "";
foreach (DataRow pickdr in table.Rows)
if (table.Rows.Count>0)
{
picksql += @" INSERT INTO ICSPickPrintTemp
foreach (DataRow pickdr in table.Rows)
{
picksql += @" INSERT INTO ICSPickPrintTemp
(ID,DocNO,INVCode,iQuantity,WHCode,BinCode,LotNO,QTYTotal,SendQTY,MUSER,MUSERNAME,WorkPoint)
VALUES
(NEWID(),'{0}','{1}',{2},'{3}','{4}','{5}',{6},{7},'{8}','{9}','{10}')";
(NEWID(),'{0}','{1}',{2},'{3}','{4}','{5}',{6},{7},'{8}','{9}','{10}') ;
UPDATE ICSMOApply SET MUSER='{8}' WHERE ApplyCode='{0}' ;";
picksql = string.Format(picksql, pickdr["Code"].ToString(), pickdr["InvCode"].ToString(), Convert.ToDecimal(pickdr["iQuantity"])
, pickdr["WarehouseCode"].ToString(), pickdr["LocationCode"].ToString(), pickdr["LotNO"].ToString()
, Convert.ToDecimal(pickdr["QTYTotal"]), Convert.ToDecimal(pickdr["SendQTY"]), MUSER, MUSERNAME, WorkPoint);
}
}
SqlHelper.ExecuteNonQuery(picksql);
}
#endregion
var result = ConvertCellToString(table);
if (Invmes.Rows.Count > 0)

26
WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml

@ -166,6 +166,29 @@
if (Type == 2||Type==12) {
var collast = { label: '状态', name: 'Status', width: 150, align: 'left' };
cols.push(collast);
var collast = { label: '物料号(父项生产订单物料)', name: 'OrderInvCode', width: 150, align: 'left' };
cols.push(collast);
var collast = { label: '物料描述(父项生产订单主物料)', name: 'OrderInvDescribe', width: 150, align: 'left' };
cols.push(collast);
var collast = { label: '调度工号', name: 'DispatchNumber', width: 120, align: 'left', };
cols.push(collast);
var collast = { label: '调度姓名', name: 'DispatcherName', width: 120, align: 'left' };
cols.push(collast);
var collast = { label: '收料人工号', name: 'ReceiverNumber', width: 150, align: 'left' };
cols.push(collast);
var collast = { label: '收料人姓名', name: 'ReceiverName', width: 150, align: 'left' };
cols.push(collast);
var collast = { label: '紧急程度', name: 'Urgency', width: 120, align: 'left', };
cols.push(collast);
var collast = { label: '需求日期', name: 'NeedDate', width: 120, align: 'left' };
cols.push(collast);
var collast = { label: '需求时间', name: 'NeedTime', width: 120, align: 'left', };
cols.push(collast);
var collast = { label: '工位', name: 'Desks', width: 100, align: 'left' };
cols.push(collast);
var collast = { label: '拣料人姓名', name: 'PickName', width: 100, align: 'left' };
cols.push(collast);
ct4.style.display = "";
ct5.style.display = "";
ct6.style.display = "";
@ -466,6 +489,7 @@
});
$("#btn_search").click(function () {
var warehouse = $("#warehouse a.active").attr('data-value');
var Types = $("#selShow").val();
var queryJson = {
POCode: $("#txt_POCode").val(),
InvCode: $("#txt_InvCode").val(),
@ -481,7 +505,7 @@
NeedDate: $("#txt_NeedDate").val()
}
$gridList.jqGrid('setGridParam', {
postData: { queryJson: JSON.stringify(queryJson) },
postData: { queryJson: JSON.stringify(queryJson) ,Type:Types},
}).trigger('reloadGrid');
});

Loading…
Cancel
Save