fix create

This commit is contained in:
Ismailov_Rovshan 2023-05-05 01:48:46 +04:00
parent 82e9545799
commit a3337ac736

View File

@ -8,7 +8,7 @@
<div class="row">
<div class="col-4">Изделие:</div>
<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 class="row">
@ -25,8 +25,9 @@
</div>
</form>
@section scripts{
<script>
$('#Repair').on('change', function () {
$('#repair').on('change', function () {
check();
});
$('#count').on('change', function () {
@ -35,12 +36,12 @@
function check() {
var count = $('#count').val();
var Repair = $('#Repair').val();
if (count && Repair) {
var repair = $('#repair').val();
if (count && repair) {
$.ajax({
method: "POST",
url: "/Home/Calc",
data: { count: count, Repair: Repair },
data: { count: count, repair: repair },
success: function (result) {
$("#sum").val(result);
}
@ -48,3 +49,4 @@
};
}
</script>
}