43330470d6
x lettura dinamica partial view...
139 lines
6.1 KiB
Plaintext
139 lines
6.1 KiB
Plaintext
@model IEnumerable<StockManMVC.Models.vLocationVal>
|
|
|
|
@{
|
|
ViewBag.Title = "Valorizzazione Stock Giacenze";
|
|
}
|
|
|
|
<div class="row" style="margin-top: 0.5em;">
|
|
<div class="col-sm-10 col-sm-offset-1">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<strong>Valorizzazione Stock Giacenze</strong>
|
|
</div>
|
|
<div class="panel-body">
|
|
<table class="table table-condensed table-responsive table-striped">
|
|
<tr>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Location.Descr)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.TotCurr)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.TotPend)
|
|
</th>
|
|
<th class="text-right">
|
|
@Html.DisplayNameFor(model => model.TotVal)
|
|
</th>
|
|
</tr>
|
|
|
|
@foreach (var item in Model)
|
|
{
|
|
<tr>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Location.Descr)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.TotCurr)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.TotPend)
|
|
</td>
|
|
<td class="text-right">
|
|
@Html.DisplayFor(modelItem => item.TotVal)
|
|
</td>
|
|
</tr>
|
|
}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row" style="margin-top: 0.5em;">
|
|
@*@using (Html.BeginForm("Index", "MagStatus", FormMethod.Get))
|
|
{*@
|
|
<div class="col-sm-5 col-sm-offset-1 small">
|
|
<div class="panel panel-info">
|
|
<div class="panel-heading">
|
|
<div class="row">
|
|
<div class="col-xs-4">
|
|
<strong>Locazione</strong>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<div class="form-inline">
|
|
<div class="form-group">
|
|
@*@Html.LabelFor(model => model.ExtLocationID, "Riferimento", htmlAttributes: new { @class = "control-label col-md-2" })*@
|
|
<div class="col-md-10">
|
|
@Html.DropDownList("LocationID_SX", null, "-- Selezionare --", htmlAttributes: new { @class = "form-control" })
|
|
@*@Html.ValidationMessageFor(model => model.ExtLocationID, "", new { @class = "text-danger" })*@
|
|
@*, @onchange = "this.form.submit();"*@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<button class="btn btn-warning form-control" onclick="scambiaSel();">Scambia <i class="glyphicon glyphicon-retweet"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body" id="divLocationSX">
|
|
@Html.Action("StockByLocation", new { LocationID = @ViewBag.SelSX, LocationIDTo = @ViewBag.SelDX, ShowMove = true })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-5 small">
|
|
<div class="panel panel-primary">
|
|
<div class="panel-heading">
|
|
<div class="row">
|
|
<div class="col-xs-4">
|
|
<strong>Locazione</strong>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<div class="form-inline">
|
|
<div class="form-group">
|
|
@*@Html.LabelFor(model => model.ExtLocationID, "Riferimento", htmlAttributes: new { @class = "control-label col-md-2" })*@
|
|
<div class="col-md-10">
|
|
@Html.DropDownList("LocationID_DX", null, "-- Selezionare --", htmlAttributes: new { @class = "form-control" })
|
|
@*@Html.ValidationMessageFor(model => model.ExtLocationID, "", new { @class = "text-danger" })*@
|
|
@*, @onchange = "this.form.submit();"*@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body" id="divLocationDX">
|
|
@Html.Action("StockByLocation", new { LocationID = @ViewBag.SelDX, LocationIDTo = @ViewBag.SelSX })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@*}*@
|
|
|
|
<script type="text/javascript">
|
|
|
|
function refreshSelectedData() {
|
|
var LocationIdSx = $("#LocationID_SX").val();
|
|
var LocationIdDx = $("#LocationID_DX").val();
|
|
$("#divLocationSX").load('@(Url.Action("StockByLocationAjax", "MagStatus",null, Request.Url.Scheme))?LocationId=' + LocationIdSx + '&LocationIdTo=' + LocationIdDx + '&ShowMove=true');
|
|
$("#divLocationDX").load('@(Url.Action("StockByLocationAjax", "MagStatus",null, Request.Url.Scheme))?LocationId=' + LocationIdDx + '&LocationIdTo=' + LocationIdSx + '&ShowMove=false');
|
|
}
|
|
$(document).ready(function () {
|
|
$("#LocationID_SX").change(function () {
|
|
refreshSelectedData();
|
|
});
|
|
$("#LocationID_DX").change(function () {
|
|
refreshSelectedData();
|
|
});
|
|
});
|
|
function scambiaSel()
|
|
{
|
|
var LocationIdSx = $("#LocationID_SX").val();
|
|
var LocationIdDx = $("#LocationID_DX").val();
|
|
$("#LocationID_SX").val(LocationIdDx);
|
|
$("#LocationID_DX").val(LocationIdSx);
|
|
refreshSelectedData();
|
|
}
|
|
|
|
</script>
|
|
</div>
|