Browse Source

新增检验合格单、退料单上传货柜变色功能

master
lilili 1 year ago
parent
commit
83541d5182
  1. 23
      WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs
  2. 10
      WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml

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

@ -1075,7 +1075,7 @@ where a.Status='2'";
string sql = @"select a.ID, '' as 'POCode',-- d.POCode,d.Sequence as POSequence,
'' as POSequence,a.ModificationDate,a.TrackingNumber,a.NonconformingForm,a.POID,
a.DNCode,a.Sequence,a.VenCode,a.DepCode AS VenName,a.WHCode,a.InvCode,a.DNID,a.DNDetailID,a.WorkPoint,a.InspectionType,a.InvoDescribe,a.Unity,a.StockIndicator, b.InvName,b.InvStd,b.InvDesc,b.InvUnit, b.DrawingNo,
b.Version AS Version1, detail.LocationCode AS Area,
b.Version AS Version1, detail.LocationCode AS Area,a.EATTRIBUTE3,
CAST(a.Quantity AS DECIMAL(18,{0})) as Quantity ,CAST(a.Amount AS DECIMAL(18,{0})) as Amount,CAST(a.RCVQuantity AS DECIMAL(18,{0})) as RCVQuantity,CAST(a.UnitPrice AS DECIMAL(18,{0})) as UnitPrice,a.Currency,a.CreatePerson,a.CreateDateTime,CAST(c.LOTQTY AS DECIMAL(18,{0})) as LOTQTY
,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
@ -2455,7 +2455,7 @@ where a.DNType='3' and a.Status='2' and a.EATTRIBUTE1 is NOT null
#region [SQL]
string sql = @"select a.ID,a.ApplyNegCode,a.Sequence,a.SourceDetailID,a.InvCode,b.InvName,b.InvDesc,b.InvStd,b.InvUnit,d.CreateDateTime,
CAST(a.Quantity AS DECIMAL(18,{0})) as Quantity ,CAST(a.Amount AS DECIMAL(18,{0})) as Amount,CAST(a.IssueNegQuantity AS DECIMAL(18,{0})) as IssueNegQuantity
,a.ExtensionID,a.MUSERName,a.MTIME ,CAST(c.LOTQTY AS DECIMAL(18,{0})) as LOTQTY
,a.ExtensionID,a.MUSERName,a.MTIME ,CAST(c.LOTQTY AS DECIMAL(18,{0})) as LOTQTY,a.EATTRIBUTE
,a.WHCode,detail.LocationCode AS Area,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
,Case When a.WHCode+';'+detail.LocationCode in (select F_Define1+';'+F_Define2 from Sys_SRM_ItemsDetail where F_Define3='HGAreaConfig')
@ -3365,7 +3365,7 @@ CAST( (a.Quantity-ISNULL(c.LOTQTY,0)) as DECIMAL(18,{0})) as thisCreateQty,isnu
string MUSERNAME = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName;
string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(',');
string DocNoInfo = DocNoList.TrimEnd(',');
StringBuilder stringBuilder = new StringBuilder();
string InspectJosn = "";
List<string> DocListSave = new List<string>();
#region 检验合格单
@ -3384,7 +3384,7 @@ CAST( (a.Quantity-ISNULL(c.LOTQTY,0)) as DECIMAL(18,{0})) as thisCreateQty,isnu
InspectJosn += "\"ORD_TIPOOP\":\"V\",";
InspectJosn += "\"ORD_CLIENTE\":\"" + WorkPoint + "\"";
InspectJosn += "},";
}
}
}
InspectJosn = InspectJosn.TrimEnd(',');
InspectJosn += "],";
@ -3413,6 +3413,7 @@ CAST( (a.Quantity-ISNULL(c.LOTQTY,0)) as DECIMAL(18,{0})) as thisCreateQty,isnu
InspectJosn += "\"RIG_HOSTINF\": " + dt.Rows[i]["Sequence"].ToString() + "";
InspectJosn += "},";
}
stringBuilder.Append($@"'{DocNO}',");
}
InspectJosn = InspectJosn.TrimEnd(',');
InspectJosn += "]";
@ -3518,6 +3519,7 @@ CAST( (a.Quantity-ISNULL(c.LOTQTY,0)) as DECIMAL(18,{0})) as thisCreateQty,isnu
InspectJosn += "\"RIG_HOSTINF\": " + dt.Rows[i]["Sequence"].ToString() + "";
InspectJosn += "},";
}
stringBuilder.Append($@"'{DocNO}',");
}
InspectJosn = InspectJosn.TrimEnd(',');
InspectJosn += "]";
@ -3547,6 +3549,19 @@ CAST( (a.Quantity-ISNULL(c.LOTQTY,0)) as DECIMAL(18,{0})) as thisCreateQty,isnu
ICSHGResult hgresult = JsonConvert.DeserializeObject<ICSHGResult>(result.TrimStart('[').TrimEnd(']'));
throw new Exception("货柜单据传输接口调用报错,主要报错信息:" + hgresult.PrimaryError + ",次要报错信息:" + hgresult.SecondaryError + "");
}
string sb = stringBuilder.ToString().TrimEnd(',');
string sqlString=string.Empty;
if (Type == "7")
{
sqlString = $@"UPDATE ICSDeliveryNotice SET EATTRIBUTE3='1' WHERE DNCode IN ({sb})";
}
if (Type == "12")
{
sqlString = $@" UPDATE ICSMOApplyNegDetail SET EATTRIBUTE='1' WHERE ApplyNegCode in ({sb});";
}
if (!sqlString.IsEmpty()) { }
SqlHelper.CmdExecuteNonQueryLi(sqlString.ToString());
}
return "";
}

10
WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml

@ -446,6 +446,8 @@
cols.push(collast);
var collast = { label: '区域类型', name: 'AreaType', width: 10, align: 'left', hidden: true };
cols.push(collast);
var collast = { label: '类型', name: 'EATTRIBUTE3', width: 10, align: 'left', hidden: true };
cols.push(collast);
}
//审核委外到货单生成条码
if (Type == '8') {
@ -681,6 +683,8 @@
cols.push(collast);
var collast = { label: '区域类型', name: 'AreaType', width: 10, align: 'left', hidden: true };
cols.push(collast);
var collast = { label: '类型', name: 'EATTRIBUTE', width: 10, align: 'left', hidden: true };
cols.push(collast);
}
//材料出库退料生成条码
if (Type == '13') {
@ -1697,7 +1701,8 @@
for (var i = 0; i < strIds.length; i++) {
var strValue = $("#gridList").jqGrid("getCell", strIds[i], "LOTQTY");//得到单元格数据
var strValue1 = $("#gridList").jqGrid("getCell", strIds[i], "Quantity");//得到单元格数据
if (strValue == strValue1) {
var check = $("#gridList").jqGrid("getCell", strIds[i], "EATTRIBUTE3");//得到单元格数据
if (strValue == strValue1 || check=='1') {
$("#" + strIds[i]).find("td").css("background-color", "yellow");
}
}
@ -2346,7 +2351,8 @@
for (var i = 0; i < strIds.length; i++) {
var strValue = $("#gridList").jqGrid("getCell", strIds[i], "LOTQTY");//得到单元格数据
var strValue1 = $("#gridList").jqGrid("getCell", strIds[i], "Quantity");//得到单元格数据
if (strValue == strValue1) {
var check = $("#gridList").jqGrid("getCell", strIds[i], "EATTRIBUTE");//得到单元格数据
if (strValue == strValue1 || check=='1') {
$("#" + strIds[i]).find("td").css("background-color", "yellow");
}
}

Loading…
Cancel
Save