fix create
This commit is contained in:
parent
82e9545799
commit
a3337ac736
@ -8,7 +8,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">Изделие:</div>
|
<div class="col-4">Изделие:</div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<select id="Repair" name="Repair" class="form-control" asp-items="@(new SelectList(@ViewBag.Repairs,"Id", "RepairName"))"></select>
|
<select id="repair" name="repair" class="form-control" asp-items="@(new SelectList(@ViewBag.Repairs,"Id", "RepairName"))"></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -25,26 +25,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
@section scripts{
|
||||||
$('#Repair').on('change', function () {
|
<script>
|
||||||
check();
|
$('#repair').on('change', function () {
|
||||||
});
|
check();
|
||||||
$('#count').on('change', function () {
|
});
|
||||||
check();
|
$('#count').on('change', function () {
|
||||||
});
|
check();
|
||||||
|
});
|
||||||
|
|
||||||
function check() {
|
function check() {
|
||||||
var count = $('#count').val();
|
var count = $('#count').val();
|
||||||
var Repair = $('#Repair').val();
|
var repair = $('#repair').val();
|
||||||
if (count && Repair) {
|
if (count && repair) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/Home/Calc",
|
url: "/Home/Calc",
|
||||||
data: { count: count, Repair: Repair },
|
data: { count: count, repair: repair },
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
$("#sum").val(result);
|
$("#sum").val(result);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user