Browse Source

新增工单状态筛选

master
lilili 2 years ago
parent
commit
bed01da1b4
  1. 77
      WMS-BS/NFine.Application/WMS/PickMaterialApp.cs
  2. 46
      WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml

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

@ -601,14 +601,19 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
else ''
end as IsNew,
case when max(k.TransCode) is null then '' else '' end as IsOccupy,
case when sum(a.Quantity) =sum(IssueQuantity) then ''
when sum(a.Quantity)!=sum(IssueQuantity) AND sum(IssueQuantity)>0 then ''
else '' end as Status,
g.Status as Status1,
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.ID
from ICSOApply a
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 (SELECT ApplyCode,
case when sum(Quantity) =sum(IssueQuantity) AND sum(IssueQuantity)>0 then ''
else '' end as Status
from ICSOApply
where WorkPoint='{WorkPoint}'
group by ApplyCode) g on a.ApplyCode = g.ApplyCode
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLotInfoLog ) k on a.ApplyCode=k.TransCode and a.WorkPoint=k.WorkPoint and k.TransType='15'
@ -641,7 +646,20 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo
}
sqlString.Append(@"group by a.ApplyCode,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.ID ) t where row=1");
f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.ID,g.Status ) t where row=1");
if (!string.IsNullOrWhiteSpace(queryParam["Status"].ToString()))
{
if (queryParam["Status1"].ToString() == "1")
{
sqlString.Append($@" AND t.Status1='已过账' ");
}
else
{
sqlString.Append($@" AND t.Status1='未过账' ");
}
}
#endregion
return Repository().FindTablePageBySql(sqlString.ToString(), parameter.ToArray(), ref jqgridparam);
@ -931,13 +949,13 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo
else ''
end as IsNew,
case when max(k.TransCode) is null then '' else '' end as IsOccupy,
case when sum(a.Quantity)=sum(a.OutQuantity) then ''
when sum(a.Quantity)!=sum(a.OutQuantity) and sum(a.OutQuantity)>0 then ''
else '' END AS Status,
f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1,
g.Status as Status1,
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.ID
from ICSOtherOut a
left join ICSMOPickMerge e on a.ID = e.SourceID and a.WorkPoint = e.WorkPoint
left join (SELECT OutCode,case when sum(Quantity) =sum(OutQuantity) AND sum(OutQuantity)>0 then '' else '' end as Status
from ICSOtherOut where WorkPoint='{WorkPoint}' group by OutCode) g on a.OutCode = g.OutCode
left join ICSExtension f on a.ExtensionID = f.ID and a.WorkPoint = f.WorkPoint
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
@ -973,7 +991,19 @@ f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1,
}
sqlString.Append(@" group by a.OutCode,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.ID) t where t.row=1");
f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.ID,g.Status) t where t.row=1");
if (!string.IsNullOrWhiteSpace(queryParam["Status"].ToString()))
{
if (queryParam["Status1"].ToString() == "1")
{
sqlString.Append($@" AND t.Status1='已过账' ");
}
else
{
sqlString.Append($@" AND t.Status1='未过账' ");
}
}
return Repository().FindTablePageBySql(sqlString.ToString(), parameter.ToArray(), ref jqgridparam);
}
@ -1119,21 +1149,17 @@ f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1,
// sql += " WHERE 1=1 and e.ID is null ";
sqlString.Append($@"select * from (select row_number() over(partition by a.TransferNO order by a.TransferNO) row,
a.TransferNO as Code,a.ID,CONVERT(varchar(100),a.CreateDateTime,23) as MTIME,a.CreatePerson as MUSER,
case
when max(e.SourceID) is null then ''
else ''
end as IsNew,
case when max(k.TransCode) is null then '' else '' end as IsOccupy,
case when sum(a.Quantity)=sum(a.TransferQuantity) then ''
when sum(a.Quantity)!=sum(a.TransferQuantity) and sum(a.TransferQuantity)>0 then ''
else '' END AS Status,
g.Status as Status1,
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
from ICSTransfer a
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 (SELECT TransferNO,case when sum(Quantity) =sum(TransferQuantity) AND sum(TransferQuantity)>0 then '' else '' end as Status
from ICSTransfer where WorkPoint='{WorkPoint}' group by TransferNO) g on a.TransferNO = g.TransferNO
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.ToWarehouseCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.FromWarehouseCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLotInfoLog ) k on a.TransferNO=k.TransCode and a.WorkPoint=k.WorkPoint and k.TransType='15'
where a.WorkPoint = '{WorkPoint}' and a.Status = '2'");
if (!string.IsNullOrWhiteSpace(queryJson))
@ -1164,7 +1190,20 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo
}
sqlString.Append(@"group by a.TransferNO,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.ID,a.TransferQuantity) t where t.row=1");
f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.ID,a.TransferQuantity,g.Status) t where t.row=1");
if (!string.IsNullOrWhiteSpace(queryParam["Status"].ToString()))
{
if (queryParam["Status1"].ToString() == "1")
{
sqlString.Append($@" AND t.Status1='已过账' ");
}
else
{
sqlString.Append($@" AND t.Status1='未过账' ");
}
}
#endregion
return Repository().FindTablePageBySql(sqlString.ToString(), parameter.ToArray(), ref jqgridparam);

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

@ -47,6 +47,9 @@
var ct10 = document.getElementById("date3");
var ct11 = document.getElementById("date4");
var ct12 = document.getElementById("status3")
var ct13 = document.getElementById("status4")
var cols = new Array();
var collast = { label: "主键", name: "ID", hidden: true , key: true };
cols.push(collast);
@ -91,6 +94,8 @@
ct9.style.display = "";
ct10.style.display = "";
ct11.style.display = "";
ct12.style.display = "none";
ct13.style.display = "none";
}
else {
ct4.style.display = "none";
@ -101,6 +106,8 @@
ct9.style.display = "none";
ct10.style.display = "none";
ct11.style.display = "none";
ct12.style.display = "";
ct13.style.display = "";
}
@ -215,6 +222,7 @@
CusCode: $("#txt_CusCode").val(),
CusName: $("#txt_CusName").val(),
Status: $("#selShow2").val(),
Status1: $("#selShow3").val(),
Order: $("#txt_Order").val(),
Container: $('input[name="container"]:checked').val(),
CreateDate: $("#txt_CreateDate").val(),
@ -948,18 +956,24 @@
<td>
<div class="input-group">
<select id="selShow" name="F_Target" class="form-control" style="width: 100px;" onchange="Seach()">
@*<option value="1" selected="selected">工单备料</option>*@
@*
<option value="1" selected="selected">工单备料</option>*@
<option value="2" selected="selected" spellcheck="true">工单领料</option>
<option value="12" selected="selected">售后领料</option>
@*<option value="3" selected="selected">工单材料出库</option>*@
@*<option value="4" selected="selected">委外备料</option>*@
@*
<option value="3" selected="selected">工单材料出库</option>*@
@*
<option value="4" selected="selected">委外备料</option>*@
<option value="5" selected="selected">委外领料</option>
@*<option value="6" selected="selected">委外材料出库</option>*@
@*
<option value="6" selected="selected">委外材料出库</option>*@
<option value="7" selected="selected">销售发货</option>
<option value="8" selected="selected">其它出库</option>
@*<option value="9" selected="selected">借用</option>*@
<option value="8" selected="selected">其它出库</option>
@*
<option value="9" selected="selected">借用</option>*@
<option value="10" selected="selected">物料调拨</option>
@*<option value="11" selected="selected">两步调出</option>*@
@*
<option value="11" selected="selected">两步调出</option>*@
</select>
</div>
</td>
@ -972,13 +986,27 @@
<select id="selShow2" name="F_Target" class="form-control" style="width: 100px;">
<option value="2" selected="selected">已配料</option>
<option value="3" selected="selected">已过账</option>
@*<option value="4" selected="selected">已取消</option>*@
@*<option value="5" selected="selected">全部</option>*@
@*
<option value="4" selected="selected">已取消</option>*@
@*
<option value="5" selected="selected">全部</option>*@
<option value="1" selected="selected">未配料</option>
</select>
</div>
</td>
<td id="status3">
<label>&nbsp;&nbsp;&nbsp;状态:</label>
</td>
<td id="status4">
<div class="input-group">
<select id="selShow3" name="F_Target" class="form-control" style="width: 100px;">
<option value="1" selected="selected">已过账</option>
<option value="2" selected="selected">未过账</option>
</select>
</div>
</td>
<td style="text-align:right;"><label class="lglabel" for="txt_POCode">&nbsp;&nbsp;&nbsp;单据号</label>:</td>
<td>
<div class="input-group">

Loading…
Cancel
Save