Aggiunto tasto per visualizzare i dettagli dei movimenti. Id 624 Redmine
This commit is contained in:
@@ -162,7 +162,7 @@
|
||||
</site>
|
||||
<site name="StockManMVC" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\StockMan\StockManMVC" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\marco\Documents\VisualStudioProjects\StockMan\StockManMVC" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:4539:localhost" />
|
||||
@@ -170,7 +170,7 @@
|
||||
</site>
|
||||
<site name="SiteSelector" id="3">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\StockMan\SiteSelector" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\marco\Documents\VisualStudioProjects\StockMan\SiteSelector" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:3526:localhost" />
|
||||
|
||||
Binary file not shown.
@@ -422,7 +422,7 @@ namespace StockManMVC.Controllers
|
||||
}
|
||||
|
||||
|
||||
// GET: Items/Duplicate/5
|
||||
// GET: ItemFluxes/Duplicate/5
|
||||
public ActionResult Duplicate(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
@@ -446,6 +446,90 @@ namespace StockManMVC.Controllers
|
||||
//return RedirectToAction("Details", "Items", new { ID = ItemID, StockItemID = ItemID });
|
||||
}
|
||||
|
||||
// GET: ItemFluxes/Read/5
|
||||
public ActionResult Read(int? id,string mode)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||
}
|
||||
if (mode == null)
|
||||
{
|
||||
mode = "std";
|
||||
}
|
||||
// recupero item
|
||||
ItemFlux itemFlux = db.ItemFlux.Find(id);
|
||||
if (itemFlux == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
// recupero SOLO gli scaffali ammissibili
|
||||
var query = db.Location.Where(o => o.LocType.IsStock).Join(db.ItemStock.Where(s => s.ItemID == itemFlux.ItemID),
|
||||
l => l.ID,
|
||||
s => s.LocationID,
|
||||
(l, s) => new { l.ID, l.Descr });
|
||||
// calcolo sfondo e location ammesse da vari casi tipo movimento
|
||||
string CurrStyle = "";
|
||||
ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", itemFlux.LocationID);
|
||||
ViewBag.ExtLocationID = new SelectList(db.Location, "ID", "Descr", itemFlux.ExtLocationID);
|
||||
switch (itemFlux.MovTypeID)
|
||||
{
|
||||
case "CAR":
|
||||
// per partire scelgo la posizione di default ric ordini
|
||||
ViewBag.LocationID = new SelectList(db.Location.Where(o => o.LocType.IsStock), "ID", "Descr", itemFlux.LocationID);
|
||||
ViewBag.ExtLocationID = new SelectList(db.Location.Where(o => o.LocType.IsFor), "ID", "Descr", itemFlux.ExtLocationID);
|
||||
CurrStyle = "bg-success";
|
||||
break;
|
||||
case "SCAR":
|
||||
if (query.Count() > 0)
|
||||
{
|
||||
ViewBag.LocationID = new SelectList(query, "ID", "Descr");
|
||||
}
|
||||
ViewBag.ExtLocationID = new SelectList(db.Location.Where(o => o.LocType.IsCli), "ID", "Descr", itemFlux.ExtLocationID);
|
||||
ViewBag.enabEditVal = false;
|
||||
CurrStyle = "bg-danger";
|
||||
break;
|
||||
case "MOV":
|
||||
ViewBag.ExtLocationID = new SelectList(db.Location.Where(o => o.LocType.IsStock), "ID", "Descr", itemFlux.ExtLocationID);
|
||||
ViewBag.enabEditVal = false;
|
||||
CurrStyle = "bg-primary";
|
||||
break;
|
||||
case "OFOR":
|
||||
ViewBag.LocationID = new SelectList(db.Location.Where(o => o.LocType.IsStock), "ID", "Descr", itemFlux.LocationID);
|
||||
ViewBag.ExtLocationID = new SelectList(db.Location.Where(o => o.LocType.IsFor), "ID", "Descr", itemFlux.ExtLocationID);
|
||||
CurrStyle = "bg-info";
|
||||
break;
|
||||
case "RETT":
|
||||
if (query.Count() > 0)
|
||||
{
|
||||
ViewBag.LocationID = new SelectList(query, "ID", "Descr");
|
||||
}
|
||||
ViewBag.ExtLocationID = new SelectList(db.Location, "ID", "Descr", itemFlux.ExtLocationID);
|
||||
ViewBag.enabEditVal = false;
|
||||
CurrStyle = "bg-warning";
|
||||
break;
|
||||
case "ND":
|
||||
default:
|
||||
ViewBag.ExtLocationID = new SelectList(db.Location, "ID", "Descr", itemFlux.ExtLocationID);
|
||||
CurrStyle = "bg-default";
|
||||
break;
|
||||
}
|
||||
// altri valori in viewbag
|
||||
ViewBag.CurrStyle = CurrStyle;
|
||||
ViewBag.MovTypeID = new SelectList(db.MovType, "ID", "Descr", itemFlux.MovTypeID);
|
||||
ViewBag.ItemID = new SelectList(db.Item, "ID", "Descr", itemFlux.ItemID);
|
||||
ViewBag.OperatorID = new SelectList(db.Operator, "ID", "CodExt", itemFlux.OperatorID);
|
||||
if (mode == "std")
|
||||
{
|
||||
return PartialView(itemFlux);
|
||||
}
|
||||
else
|
||||
{
|
||||
return View(itemFlux);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// GET: ItemFluxes/Edit/5
|
||||
public ActionResult Edit(int? id, string mode)
|
||||
{
|
||||
|
||||
@@ -582,6 +582,7 @@
|
||||
<Content Include="Views\Shared\_menuTop.cshtml" />
|
||||
<Content Include="Views\Items\_Delete.cshtml" />
|
||||
<Content Include="Views\ItemFluxes\_ListByItem.cshtml" />
|
||||
<Content Include="Views\ItemFluxes\Read.cshtml" />
|
||||
<None Include="Web.IIS01.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
@model StockManMVC.Models.ItemFlux
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Edit";
|
||||
}
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<strong>Modifica Movimento</strong>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal @ViewBag.CurrStyle">
|
||||
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
||||
@Html.HiddenFor(model => model.ID)
|
||||
@*@Html.DropDownList("ItemID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" })*@
|
||||
@*@Html.DropDownList("MovTypeID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" })*@
|
||||
|
||||
@*<div class="form-group">
|
||||
@Html.LabelFor(model => model.ItemID, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.DropDownList("ItemID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" })
|
||||
@Html.ValidationMessageFor(model => model.ItemID, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.MovTypeID, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.DropDownList("MovTypeID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" })
|
||||
@Html.ValidationMessageFor(model => model.MovTypeID, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.ExtLocationID, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.DropDownList("ExtLocationID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" })
|
||||
@Html.ValidationMessageFor(model => model.ExtLocationID, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.CodDoc, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.CodDoc, new { htmlAttributes = new { @class = "form-control", disabled = "disabled", @readonly = "readonly" } })
|
||||
@Html.ValidationMessageFor(model => model.CodDoc, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.dtMov, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(model => model.dtMov, new { @Value = Model.dtMov.ToString("yyyy-MM-dd"), @class = "form-control date-picker", type = "date", disabled = "disabled", @readonly = "readonly" })
|
||||
@*@Html.EditorFor(model => model.dtMov, "DateTime", new { htmlAttributes = new { @class = "form-control date-picker", type="date" } })*@
|
||||
@Html.ValidationMessageFor(model => model.dtMov, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.Qta, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.Qta, new { htmlAttributes = new { @class = "form-control", disabled = "disabled", @readonly = "readonly" } })
|
||||
@Html.ValidationMessageFor(model => model.Qta, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.TotValue, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.TotValue, new { htmlAttributes = new { @class = "form-control", disabled = "disabled", @readonly = "readonly" } })
|
||||
@Html.ValidationMessageFor(model => model.TotValue, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.LocationID, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.DropDownList("LocationID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" })
|
||||
@Html.ValidationMessageFor(model => model.LocationID, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.Note, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@*@Html.TextAreaFor(model => model.Note, 3, 50, new { htmlAttributes = new { @class = "form-control", @disabled = "disabled"} })*@
|
||||
@Html.EditorFor(model => model.Note, new { htmlAttributes = new { @class = "form-control", disabled = "disabled", @readonly = "readonly" } })
|
||||
@Html.ValidationMessageFor(model => model.Note, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*<div class="form-group">
|
||||
@Html.LabelFor(model => model.OperatorID, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.DropDownList("OperatorID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" })
|
||||
@Html.ValidationMessageFor(model => model.OperatorID, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
@*<div class="form-group no-color row">
|
||||
<div class="col-sm-6">
|
||||
<button type="submit" value="Save" class="btn btn-primary form-control">Salva modifiche <i class="glyphicon glyphicon-ok-circle"></i></button>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<a href="@Url.Action("Details", "Items", new { id=Model.ItemID, StockItemID= Model.ItemID })" class="btn btn-info form-control">Annulla <i class="glyphicon glyphicon-retweet"></i></a>
|
||||
</div>
|
||||
</div>*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -52,6 +52,7 @@
|
||||
@Html.DisplayFor(modelItem => item.Location1.Descr)
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<button class="btn btn-xs btn-default" title="Mostra" onclick="LoadItemFluxReadOnly(@item.ID);"><i class="glyphicon glyphicon-search"></i></button>
|
||||
<button class="btn btn-xs btn-warning" title="Clona" onclick="LoadItemFluxDupl(@item.ID);"><i class="glyphicon glyphicon-duplicate"></i></button>
|
||||
<button class="btn btn-xs btn-primary @delStyle" title="Modifica" onclick="LoadItemFluxEdit(@item.ID);"><i class="glyphicon glyphicon-edit"></i></button>
|
||||
@Html.ActionLink(" ", "ConvOrder", new { ID = item.ID }, new { @class = "btn btn-xs btn-info glyphicon glyphicon-flash " + @delStyle + " " + @convStyle })
|
||||
|
||||
@@ -134,5 +134,10 @@
|
||||
$("#divBtnIF").hide();
|
||||
}
|
||||
|
||||
function LoadItemFluxReadOnly(ID) {
|
||||
$("#divCreateMov").load('@(Url.Action("Read", "ItemFluxes", null, Request.Url.Scheme))?ID=' + ID + '&mode=std');
|
||||
$("#divBtnIF").hide();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
Binary file not shown.
Binary file not shown.
@@ -8,3 +8,8 @@ C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\StockMan\VersGen\bi
|
||||
C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\StockMan\VersGen\obj\Debug\VersGen.csprojResolveAssemblyReference.cache
|
||||
C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\StockMan\VersGen\obj\Debug\VersGen.dll
|
||||
C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\StockMan\VersGen\obj\Debug\VersGen.pdb
|
||||
C:\Users\marco\Documents\VisualStudioProjects\StockMan\VersGen\bin\Debug\VersGen.dll
|
||||
C:\Users\marco\Documents\VisualStudioProjects\StockMan\VersGen\bin\Debug\VersGen.pdb
|
||||
C:\Users\marco\Documents\VisualStudioProjects\StockMan\VersGen\obj\Debug\VersGen.csprojResolveAssemblyReference.cache
|
||||
C:\Users\marco\Documents\VisualStudioProjects\StockMan\VersGen\obj\Debug\VersGen.dll
|
||||
C:\Users\marco\Documents\VisualStudioProjects\StockMan\VersGen\obj\Debug\VersGen.pdb
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user