Browse Source

新增单据是否入库查询条件和前端页面查询

master
lilili 2 years ago
parent
commit
8abd3f4aa3
  1. 67
      WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs
  2. 48
      WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml

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

@ -448,6 +448,17 @@ left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint ";
{
sql += " and f.BatchCode like '%" + queryParam["BatchCode"].ToString() + "%' ";
}
if (!string.IsNullOrWhiteSpace(queryParam["Container"].ToString()))
{
if (queryParam["Container"].ToString() == "1")
{
sql += " and a.RCVQuantity=a.Quantity ";
}
else
{
sql += " and (a.RCVQuantity<a.Quantity Or a.Quantity<=0) ";
}
}
}
if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode != "admin")
{
@ -616,7 +627,17 @@ where a.Type='2'";
{
sql += " and detail.LocationCode like '%" + queryParam["Area"].ToString() + "%' ";
}
if (!string.IsNullOrWhiteSpace(queryParam["Container"].ToString()))
{
if (queryParam["Container"].ToString() == "1")
{
sql += " and a.SDNQuantity=a.Quantity ";
}
else
{
sql += " and (a.SDNQuantity<a.Quantity Or a.Quantity<=0) ";
}
}
}
if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode != "admin")
@ -782,6 +803,17 @@ where a.Status='1'";
{
sql += " and detail.LocationCode like '%" + queryParam["Area"].ToString() + "%' ";
}
if (!string.IsNullOrWhiteSpace(queryParam["Container"].ToString()))
{
if (queryParam["Container"].ToString() == "1")
{
sql += " and a.InQuantity=a.Quantity ";
}
else
{
sql += " and (a.InQuantity<a.Quantity Or a.Quantity<=0) ";
}
}
}
if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode != "admin")
@ -1017,6 +1049,17 @@ where a.DNType='1' and a.Status='2' and a.ASNCode is null
{
sql += " and f.BatchCode like '%" + queryParam["BatchCode"].ToString() + "%' ";
}
if (!string.IsNullOrWhiteSpace(queryParam["Container"].ToString()))
{
if (queryParam["Container"].ToString() == "1")
{
sql += " and a.RCVQuantity=a.Quantity and a.Quantity!=0 ";
}
else
{
sql += " and (a.RCVQuantity<a.Quantity Or a.Quantity<=0) ";
}
}
}
if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode != "admin")
{
@ -1157,6 +1200,17 @@ where a.Status='1' and a.Type='1'";
{
sql += " and f.BatchCode like '%" + queryParam["BatchCode"].ToString() + "%' ";
}
if (!string.IsNullOrWhiteSpace(queryParam["Container"].ToString()))
{
if (queryParam["Container"].ToString() == "1")
{
sql += " and a.RCVQuantity=a.Quantity ";
}
else
{
sql += " and (a.RCVQuantity<a.Quantity Or a.Quantity<=0) ";
}
}
}
if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode != "admin")
{
@ -1826,6 +1880,17 @@ where a.DNType='3' and a.Status='2' and a.EATTRIBUTE1 is NOT null
{
sql += " and detail.LocationCode like '%" + queryParam["Area"].ToString() + "%' ";
}
if (!string.IsNullOrWhiteSpace(queryParam["Container"].ToString()))
{
if (queryParam["Container"].ToString() == "1")
{
sql += " and a.IssueNegQuantity=a.Quantity ";
}
else
{
sql += " and (a.IssueNegQuantity<a.Quantity Or a.Quantity<=0) ";
}
}
}
if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode != "admin")
{

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

@ -835,6 +835,8 @@
InvCode: $("#txt_InvCode").val(),
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
url: "/WMS/WMSCreateItemLot/GetGridJson" + "?" + Math.random(),
@ -892,6 +894,7 @@
InvCode: $("#txt_InvCode").val(),
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
page: 1,
@ -1059,6 +1062,7 @@
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
url: "/WMS/WMSCreateItemLot/GetGridJsonChengPing" + "?" + Math.random(),
@ -1131,6 +1135,7 @@
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
page: 1,
@ -1187,6 +1192,7 @@
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Location: $("#txt_Location").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
@ -1265,6 +1271,7 @@
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Location: $("#txt_Location").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
@ -1323,6 +1330,7 @@
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Location: $("#txt_Location").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
@ -1385,6 +1393,7 @@
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Location: $("#txt_Location").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
@ -1561,6 +1570,7 @@
InvCode: $("#txt_InvCode").val(),
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
url: "/WMS/WMSCreateItemLot/GetGridJsonSHDH" + "?" + Math.random(),
@ -1629,6 +1639,7 @@
InvCode: $("#txt_InvCode").val(),
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
postData: { queryJson: JSON.stringify(queryJson) },
@ -1686,6 +1697,7 @@
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
url: "/WMS/WMSCreateItemLot/GetGridJsonWWSHDH" + "?" + Math.random(),
@ -1752,6 +1764,7 @@
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
page: 1,
@ -1808,6 +1821,7 @@
InvCode: $("#txt_InvCode").val(),
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
url: "/WMS/WMSCreateItemLot/GetGridJsonKLCPRK" + "?" + Math.random(),
@ -1869,6 +1883,7 @@
InvCode: $("#txt_InvCode").val(),
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
page: 1,
@ -2169,6 +2184,7 @@
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Location: $("#txt_Location").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
url: "/WMS/WMSCreateItemLot/GetGridJsonLLSQTL" + "?" + Math.random(),
@ -2227,6 +2243,7 @@
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Location: $("#txt_Location").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
page: 1,
@ -2282,6 +2299,7 @@
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
url: "/WMS/WMSCreateItemLot/GetGridJsonCLCK" + "?" + Math.random(),
@ -2339,6 +2357,7 @@
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
page: 1,
@ -2508,6 +2527,7 @@
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
url: "/WMS/WMSCreateItemLot/GetGridJsonWWCLCK" + "?" + Math.random(),
@ -2567,6 +2587,7 @@
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
page: 1,
@ -2625,6 +2646,7 @@
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.dataGrid({
url: "/WMS/WMSCreateItemLot/GetGridJsonFGGD" + "?" + Math.random(),
@ -2684,6 +2706,7 @@
InvName: $("#txt_InvName").val(),
BatchCode: $("#txt_BatchCode").val(),
Area: $("#txt_Area").val(),
Container: $("#txt_Container :checked").val(),
}
$gridList.jqGrid('setGridParam', {
page: 1,
@ -3155,7 +3178,7 @@
//}
</script>
<div class="topPanel" style="height:100px;">
<div class="topPanel" style="height:150px;">
<div class="toolbar">
<div class="btn-group">
<a id="NF-Create" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreate()"><i class="fa fa-pencil-square-o"></i>生成条码</a>
@ -3218,7 +3241,7 @@
<tr>
<td style="text-align:right;"><label class="lglabel " for="txt_Location">&nbsp;&nbsp;&nbsp;&nbsp;仓库</label>:</td>
<td >
<td>
<div class="input-group ">
<input id="txt_Location" type="text" class="form-control " style="width: 100px;">
</div>
@ -3226,11 +3249,11 @@
@*<td style="text-align:right;"><label class="lglabel" for="txt_Location">&nbsp;&nbsp;&nbsp;&nbsp;库存地点</label>:</td>
<td>
<div class="input-group">
<input id="txt_Location" type="text" class="form-control" style="width: 100px;">
</div>
</td>*@
<td>
<div class="input-group">
<input id="txt_Location" type="text" class="form-control" style="width: 100px;">
</div>
</td>*@
<td style="text-align:right;"><label class="lglabel" for="txt_InvCode">&nbsp;&nbsp;&nbsp;&nbsp;料品编码</label>:</td>
<td>
@ -3252,6 +3275,17 @@
<input id="txt_BatchCode" type="text" class="form-control" style="width: 100px;">
</div>
</td>
<td>
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否入库:</label>
</td>
<td>
<div class="input-group" id="txt_Container">
<input type="radio" name="container" value="1" />&nbsp;是
<input type="radio" name="container" checked="checked" value="2" />&nbsp;否
</div>
</td>
<td>
<span class="input-group-btn">
<button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>

Loading…
Cancel
Save