Files
backend/public/dist/js/newpp.js
2024-02-01 09:53:53 +00:00

4036 lines
164 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Map variables
var saveTotalDistance = null;
var sourceMarker, destMarker;
var routeControls = [];
var popupArrays = [];
var bounds = [
[46.9130026312, 77.6166317076],
[17.5782370061, 32.5092252948],
];
var sourceLat = "",
sourceLng = "",
destLat = "",
destLng = "";
middlelng = "";
middlelat = "";
// Form Input
var selectedItem = 0;
var selectedItemCount = 0;
var selectedItemArray = [];
var saveUploadFiles = [];
var selectedSubItems = "";
var subItemsData = {};
var submitFormInput = [];
var hasSubItemGotValue = true;
// First modal inputs
let plateFirstPart = "";
let plateAlphabet = "";
let plateSecondPart = "";
let plateStateCode = "";
let phoneNumber = "";
var valuevarification = []
// Middle pins
var middlePinNumbers = 0;
var locations = [];
var reportData = [];
var startAbrarMarker = null;
var isSetStartAbrarMarker = false;
var endAbrarMarker = null;
var isSetEndAbrarMarker = false;
var middleAbrarMarker = null;
var isSetmiddleAbrarMarker = false;
var startAbrarDivIcon = L.divIcon({
html: `
<div id="pin-marker-start" class="pin-marker">
<div class="map-pin-marker">
<div class="pin-main-circle"></div>
<div class="pin-white-circle"></div>
<div class="pin-title-circle">
<span class="title-circle-text">شروع</span>
</div>
<div class="pin-main-line"></div>
</div>
<div class="pin-main-shadow">
<div class="shadow-dot">
</div>
</div>
</div>
`,
iconSize: [55, 75],
iconAnchor: [33, 64],
});
var endAbrarDivIcon = L.divIcon({
html: `
<div id="pin-marker-end" class="pin-marker">
<div class="map-pin-marker">
<div class="pin-main-circle"></div>
<div class="pin-white-circle"></div>
<div class="pin-title-circle">
<span class="title-circle-text">پایان</span>
</div>
<div class="pin-main-line"></div>
</div>
<div class="pin-main-shadow">
<div class="shadow-dot">
</div>
</div>
</div>
`,
iconSize: [55, 75],
iconAnchor: [33, 64],
});
// Create leaflet map client
var map = L.map("map", {
maxBounds: bounds,
minZoom: 6,
}).setView([34.62, 52.471], 6);
startAbrarMarker = new L.marker(startP, {
icon: startAbrarDivIcon,
draggable: true,
}).addTo(map);
endAbrarMarker = new L.marker(endP, {
icon: endAbrarDivIcon,
draggable: true,
});
// Create map tile layer
L.tileLayer("https://testmap.141.ir/141map/{z}/{x}/{y}.png", {}).addTo(map);
$("#org-pin").on("click", function () {
// Set source coordinates into local vars & text field
locations.push([map.getCenter().lat, map.getCenter().lng]);
// Drop origin marker onto map
sourceMarker = new L.marker(L.latLng(map.getCenter()), {
icon: L.icon({
iconUrl: "../dist/images/origin.png",
iconSize: [44, 60],
iconAnchor: [23, 66],
}),
draggable: true,
}).addTo(map);
// Hide origin image
$(this).hide();
// Show icons for adding new points
// $('#dest-pin').show();
$("#add-pins-box").show("slow");
// What if user wants to change its location?
sourceMarker.on("dragend", function (event) {
var marker = event.target;
var position = marker.getLatLng();
locations[0] = [position.lat, position.lng];
if (destMarker != null) drawPath();
});
});
$("#dest-pin").on("click", function () {
// Set destination coordinates into local vars & text field
locations.push([map.getCenter().lat, map.getCenter().lng]);
// Drop origin marker onto map
destMarker = new L.marker(L.latLng(map.getCenter()), {
icon: L.icon({
iconUrl: "../dist/images/destination.png",
iconSize: [44, 60],
iconAnchor: [23, 66],
}),
draggable: true,
}).addTo(map);
// Hide destination image
$(this).hide();
$("#add-pins-box .pins-add-row").hide();
// Draw path from origin to destination
drawPath();
// What if user wants to change its location?
destMarker.on("dragend", function (event) {
var marker = event.target;
var position = marker.getLatLng();
locations[locations.length - 1] = [position.lat, position.lng];
drawPath();
});
});
map.on("move", function () {
// if (!isSetStartAbrarMarker && !isSetmiddleAbrarMarkerarray[0]) {
// startAbrarMarker.setLatLng(L.latLng(map.getCenter()));
// $("#pin-marker-start").removeClass("pin-set").addClass("pin-move");
// }
if (!isSetStartAbrarMarker && !isSetEndAbrarMarker) {
startAbrarMarker.setLatLng(L.latLng(map.getCenter()));
$("#pin-marker-start").removeClass("pin-set").addClass("pin-move");
}
if (isSetStartAbrarMarker && !isSetEndAbrarMarker) {
endAbrarMarker.setLatLng(L.latLng(map.getCenter()));
$("#pin-marker-end").removeClass("pin-set").addClass("pin-move");
}
// if (isSetStartAbrarMarker && !isSetmiddleAbrarMarkerarray[0]) {
// // console.log("middleAbrarmarkerArray", middleAbrarmarkerArray[0]);
// middleAbrarmarkerArray[0].setLatLng(L.latLng(map.getCenter()));
// $("#pin-marker-middle1").removeClass("pin-set").addClass("pin-move");
// }
});
map.on("moveend", function () {
if (!isSetStartAbrarMarker && !isSetEndAbrarMarker) {
startAbrarMarker.setLatLng(L.latLng(map.getCenter()));
$("#pin-marker-start").removeClass("pin-move pin-set");
}
if (isSetStartAbrarMarker && !isSetEndAbrarMarker) {
endAbrarMarker.setLatLng(L.latLng(map.getCenter()));
$("#pin-marker-end").removeClass("pin-move pin-set");
}
});
startAbrarMarker.on("click", function () {
sourceLat = map.getCenter().lat;
sourceLng = map.getCenter().lng;
console.log("sourceee", [sourceLat, sourceLng]);
if (!isSetStartAbrarMarker) {
startAbrarMarker.setLatLng(L.latLng(map.getCenter()));
isSetStartAbrarMarker = true;
$("#pin-marker-start").removeClass("pin-move pin-warn").addClass("pin-set");
}
addSourceMarker(1);
$("#pin-marker-start").removeClass("pin-move pin-warn").addClass("pin-set");
$("#add-pins-box").show("slow");
});
endAbrarMarker.on("click", function () {
destLat = map.getCenter().lat;
destlng = map.getCenter().lng;
console.log("sourceee", [destLat, destlng]);
if (!isSetEndAbrarMarker) {
endAbrarMarker.setLatLng(L.latLng(map.getCenter()));
isSetEndAbrarMarker = true;
$("#pin-marker-end").removeClass("pin-move pin-warn").addClass("pin-set");
}
addSourceMarker(1);
$(".pins-add-row").css("display", "none");
drawPathpatrol();
});
startAbrarMarker.on("drag", function () {
console.log("hiiiiiiii");
$("#pin-marker-start").addClass("pin-move");
// checkMarkersAndDrawPath();
});
startAbrarMarker.on("dragend", function () {
console.log("hii");
$("#pin-marker-start").removeClass("pin-move");
console.log("pin move");
if ($("#pin-marker-start").hasClass("pin-set") || isSetStartAbrarMarker) {
$("#pin-marker-start").addClass("pin-set");
checkMarkersAndDrawPath();
} else {
map.setView(startAbrarMarker.getLatLng());
}
});
endAbrarMarker.on("drag", function () {
$("#pin-marker-end").addClass("pin-move");
checkMarkersAndDrawPath();
});
endAbrarMarker.on("dragend", function () {
$("#pin-marker-end").removeClass("pin-move");
if ($("#pin-marker-end").hasClass("pin-set") || isSetEndAbrarMarker) {
$("#pin-marker-end").addClass("pin-set");
checkMarkersAndDrawPath();
} else {
map.setView(endAbrarMarker.getLatLng());
}
});
function addDestinationPin() {
endAbrarMarker.addTo(map);
}
function addMiddlePin() {
middlePinNumbers++;
$("#add-pins-box").hide("slow");
$(".starter-content").append(
'\
<div class="pin-container">\
<img id="middle-pin' +
middlePinNumbers +
'" src="../dist/images/middle.png" width="55" height="75">\
</div>\
'
);
middlePinAction();
}
function selectItem(_this, index) {
selectedItem = index;
$(".submit-item-button").css("backgroundColor", "#17a2b8");
$(".submit-item-button").prop("disabled", false);
$(".item-box").children("img").css({ border: "none", "border-radius": "0" });
$(".item-box").children("span").css({ "font-weight": "normal" });
$(_this)
.children("img")
.css({ border: "3px solid #151f33", "border-radius": "100%" });
$(_this).children("span").css({ "font-weight": "bold" });
}
function nextSubItemSelection() {
$(".bottom-item-selection").hide("slow");
let titlemodal = $(
".item-container div:nth-child(" + selectedItem + ") span"
).text();
showSubItem(selectedItem, titlemodal);
}
function middlePinAction() {
$("#middle-pin" + middlePinNumbers).on("click", function () {
locations.push([map.getCenter().lat, map.getCenter().lng]);
L.marker(L.latLng(map.getCenter()), {
icon: L.icon({
iconUrl: "../dist/images/middle.png",
iconSize: [44, 60],
iconAnchor: [23, 66],
}),
// draggable: true
}).addTo(map);
// Hide origin image
$(this).hide();
// $('#vertical-menu').modal('show');
// $('.item-container').fadeIn(1000).css({'display': 'flex'});
$(".bottom-item-selection").show("slow");
// $("#next-modal-show").on('click', function () {
// if ($("#item-1").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-1-name').textContent
// showSubItem(1, titlemodal)
// }
// else if ($("#item-2").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-2-name').textContent
// showSubItem(2, titlemodal)
// }
// else if ($("#item-3").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-3-name').textContent
// showSubItem(3, titlemodal)
// }
// else if ($("#item-4").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-4-name').textContent
// showSubItem(4, titlemodal)
// }
// else if ($("#item-5").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-5-name').textContent
// showSubItem(5, titlemodal)
// }
// else if ($("#item-6").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-6-name').textContent
// showSubItem(6, titlemodal)
// }
// else if ($("#item-7").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-7-name').textContent
// showSubItem(7, titlemodal)
// }
// else if ($("#item-8").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-8-name').textContent
// showSubItem(8, titlemodal)
// }
// else if ($("#item-9").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-9-name').textContent
// showSubItem(9, titlemodal)
// }
// else if ($("#item-10").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-10-name').textContent
// showSubItem(10, titlemodal)
// }
// else if ($("#item-11").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-11-name').textContent
// showSubItem(11, titlemodal)
// }
// else if ($("#item-12").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-12-name').textContent
// showSubItem(12, titlemodal)
// }
// else if ($("#item-13").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-13-name').textContent
// showSubItem(13, titlemodal)
// }
// else if ($("#item-14").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-14-name').textContent
// showSubItem(14, titlemodal)
// }
// else if ($("#item-15").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-15-name').textContent
// showSubItem(15, titlemodal)
// }
// else if ($("#item-16").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-16-name').textContent
// showSubItem(16, titlemodal)
// }
// else if ($("#item-17").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-17-name').textContent
// showSubItem(17, titlemodal)
// }
// else if ($("#item-18").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-18-name').textContent
// showSubItem(18, titlemodal)
// }
// else if ($("#item-19").is(':checked')) {
// // console.log("hi im checked")
// // $('#vertical-menu').modal('hide');
// titlemodal = document.getElementById('item-19-name').textContent
// showSubItem(19, titlemodal)
// }
// });
// Show icons for adding new points
// $('#add-pins-box').show('slow');
// What if user wants to change its location?
// sourceMarker.on('dragend', function (event) {
// var marker = event.target;
// var position = marker.getLatLng();
// sourceLat = position.lat;
// sourceLng = position.lng;
// if (destLat != '')
// drawPath();
// });
});
}
function drawPath() {
if (routeControls.length) {
$(routeControls).each(function (index, control) {
map.removeControl(control);
routeControls.splice(routeControls.indexOf(index), 1);
});
}
// $.get(`https://testmap.141.ir/route/v1/driving/${sourceLng},${sourceLat};${destLng},${destLat}?overview=false&alternatives=true&steps=true`,
// function (data) {
routeControls.push(
L.Routing.control({
waypoints: locations,
fitSelectedRoutes: false,
draggableWaypoints: true,
createMarker: function () {
return null;
},
lineOptions: {
addWaypoints: false,
styles: [
{
color: "#28a745",
opacity: 0.8,
weight: 5,
},
],
},
})
.on("routesfound", function (e) {
var divideBy = 2;
for (let index = 0; index < popupArrays.length; index++) {
map.removeLayer(popupArrays[index]);
}
var customOptions = {
maxWidth: "300",
maxHeight: "150",
className: "customRouteEstimate",
};
var popup = new L.Popup(customOptions);
var popupLocation = new L.LatLng(
e.routes[0].coordinates[
parseInt(e.routes[0].coordinates.length / divideBy)
].lat,
e.routes[0].coordinates[
parseInt(e.routes[0].coordinates.length / divideBy)
].lng
);
var popupContent =
'<span class="distanceStyle">مسافت: </span>' +
parseFloat(e.routes[0].summary.totalDistance / 1000.0).toFixed(2) +
" کیلومتر";
saveTotalDistance = parseFloat(
parseFloat(e.routes[0].summary.totalDistance / 1000.0).toFixed(2)
);
popup.setLatLng(popupLocation);
popup.setContent(popupContent);
popupArrays.push(popup);
map.addLayer(popup);
})
.addTo(map)
);
// });
$(".leaflet-control-container").css("display", "none");
$(".leaflet-routing-container-hide").css("display", "none");
}
function handleTopMenuClick(num) {
switch (num) {
case 1: {
window.open("/rmto", "_self");
break;
}
case 2: {
$("#reportModal").modal("show");
break;
}
case 3: {
window.open("/rmtobi", "_self");
break;
}
case 4: {
window.open("/rmto", "_self");
break;
}
}
}
function showSubItem(index, name) {
// Set modal title
$("#uploadroaditem .modal-title").html(name);
selectedItem = index;
// Set modal content
let subItems = "";
$("#uploadroaditem .btn-next").show();
$("#uploadroaditem .btn-create").hide();
$(".sub-item-container").empty();
switch (selectedItem) {
case 1: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="reconstruction1" name="reconstruction">\
<label for="reconstruction1">\
ترمیم افتادگی لبه آسفالت\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item1-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="reconstruction1-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="reconstruction1-1" name="reconstruction1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="reconstruction2" name="reconstruction">\
<label for="reconstruction2">\
شانه سازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item1-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="reconstruction2-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="reconstruction2-1" name="reconstruction2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="reconstruction3" name="reconstruction">\
<label for="reconstruction3">\
پر کردن گودافتادگی یا چاله با آسفالت\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item1-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="reconstruction3-1" class="ml-3">\
تن:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="reconstruction3-1" name="reconstruction3">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="reconstruction4" name="reconstruction">\
<label for="reconstruction4">\
لکه گیری هندسی راه\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item1-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="reconstruction4-1" class="ml-3">\
مترمربع:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="reconstruction4-1" name="reconstruction4">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="reconstruction5" name="reconstruction">\
<label for="reconstruction5">\
مرمت آبشستگی راه ها و شانه راه ها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item1-5" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="reconstruction5-1" class="ml-3">\
مترمکعب:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="reconstruction5-1" name="reconstruction5">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="reconstruction6" name="reconstruction">\
<label for="reconstruction6">\
تنظیم سطح بستر حریم\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item1-6" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="reconstruction6-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="reconstruction6-1" name="reconstruction6">\
</div>\
</div>\
</div>\
';
break;
}
case 2: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="cleaning1" name="cleaning">\
<label for="cleaning1">\
پاک سازی و جاروزنی سطح راه\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item2-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="cleaning1-1" class="ml-3">\
کیلومتر - باند:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="cleaning1-1" name="cleaning1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="cleaning2" name="cleaning">\
<label for="cleaning2">\
پاک سازی و تنقیه آبروهای کوچک\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item2-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="cleaning2-1" class="ml-3">\
مترمکعب:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="cleaning2-1" name="cleaning2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="cleaning3" name="cleaning">\
<label for="cleaning3">\
پاک سازی سطح راه از لاشه حیوانات\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item2-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="cleaning3-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="cleaning3-1" name="cleaning3">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="cleaning4" name="cleaning">\
<label for="cleaning4">\
پاک سازی قنوها و آبروهای طولی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item2-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="cleaning4-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="cleaning4-1" name="cleaning4">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="cleaning5" name="cleaning">\
<label for="cleaning5">\
پاک سازی سطح راه از آثار تصادفات\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item2-5" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="cleaning5-1" class="ml-3">\
متر طول - باند:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="cleaning5-1" name="cleaning5">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="cleaning6" name="cleaning">\
<label for="cleaning6">\
علف کنی و بوته کنی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item2-6" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="cleaning6-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="cleaning6-1" name="cleaning6">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="cleaning7" name="cleaning">\
<label for="cleaning7">\
پاک سازی حریم راه از مواد زائد و نخاله های ساختمانی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item2-7" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="cleaning7-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="cleaning7-1" name="cleaning7">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="cleaning8" name="cleaning">\
<label for="cleaning8">\
جمع آوری قطعات آسیب دیده حفاظ، علائم و ...\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item2-8" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="cleaning8-1" class="ml-3">\
تن:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="cleaning8-1" name="cleaning8">\
</div>\
</div>\
</div>\
';
break;
}
case 3: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="signs1" name="signs">\
<label for="signs1">\
نصب تابلوهای اخطاری، انتظامی و مسیرنما\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item3-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="signs1-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="signs1-1" name="signs1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="signs2" name="signs">\
<label for="signs2">\
نصب تابلوهای اطلاعاتی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item3-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="signs2-1" class="ml-3">\
مترمربع:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="signs2-1" name="signs2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="signs3" name="signs">\
<label for="signs3">\
تعویض شبرنگ تابلوهای اطلاعاتی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item3-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="signs3-1" class="ml-3">\
مترمربع:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="signs3-1" name="signs3">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="signs4" name="signs">\
<label for="signs4">\
نصب بازتاب بر روی گاردریل و حفاظ های حاشیه راه و چشم گربه ای\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item3-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="signs4-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="signs4-1" name="signs4">\
</div>\
</div>\
</div>\
';
break;
}
case 4: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="shield1" name="shield">\
<label for="shield1">\
ارتقای حفاظ میانی راه ها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield1-1-1" name="shield1">\
<label for="shield1-1-1" class="mr-3">\
دو موج\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield1-1-2" name="shield1">\
<label for="shield1-1-2" class="mr-3">\
سه موج\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield1-1-3" name="shield1">\
<label for="shield1-1-3" class="mr-3">\
سوپرریل\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield1-1-4" name="shield1">\
<label for="shield1-1-4" class="mr-3">\
نیوجرسی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item4-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="shield1-2-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="shield1-2-1" name="shield1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="shield2" name="shield">\
<label for="shield2">\
ارتقای حفاظ پل ها و پرتگاه ها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield2-1-1" name="shield2">\
<label for="shield2-1-1" class="mr-3">\
دو موج\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield2-1-2" name="shield2">\
<label for="shield2-1-2" class="mr-3">\
سه موج\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield2-1-3" name="shield2">\
<label for="shield2-1-3" class="mr-3">\
سوپرریل\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield2-1-4" name="shield2">\
<label for="shield2-1-4" class="mr-3">\
نیوجرسی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item4-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="shield2-2-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="shield2-2-1" name="shield2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="shield3" name="shield">\
<label for="shield3">\
بهسازی حفاظ های موجود\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield3-1-1" name="shield3">\
<label for="shield3-1-1" class="mr-3">\
دو موج\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield3-1-2" name="shield3">\
<label for="shield3-1-2" class="mr-3">\
سه موج\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield3-1-3" name="shield3">\
<label for="shield3-1-3" class="mr-3">\
سوپرریل\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-3 sub-item4-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="radio" class="form-control text-center" id="shield3-1-4" name="shield3">\
<label for="shield3-1-4" class="mr-3">\
نیوجرسی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item4-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="shield3-2-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="shield3-2-1" name="shield3">\
</div>\
</div>\
</div>\
';
break;
}
case 5: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="lighting1" name="lighting">\
<label for="lighting1">\
روشنایی طولی راه\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting1-1-1" name="lighting1">\
<label for="lighting1-1-1" class="mr-3">\
نصب و راه اندازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting1-1-2" name="lighting1">\
<label for="lighting1-1-2" class="mr-3">\
نگهداری\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting1-1-3" name="lighting1">\
<label for="lighting1-1-3" class="mr-3">\
پاک سازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item5-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="lighting1-2-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="lighting1-2-1" name="lighting1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="lighting2" name="lighting">\
<label for="lighting2">\
روشنایی نقطه ای پارکینگ در حاشیه راه\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting2-1-1" name="lighting2">\
<label for="lighting2-1-1" class="mr-3">\
نصب و راه اندازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting2-1-2" name="lighting2">\
<label for="lighting2-1-2" class="mr-3">\
نگهداری\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting2-1-3" name="lighting2">\
<label for="lighting2-1-3" class="mr-3">\
پاک سازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item5-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="lighting2-2-1" class="ml-3">\
موردی:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="lighting2-2-1" name="lighting2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="lighting3" name="lighting">\
<label for="lighting3">\
روشنایی نقطه ای تقاطع در حاشیه راه\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting3-1-1" name="lighting3">\
<label for="lighting3-1-1" class="mr-3">\
نصب و راه اندازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting3-1-2" name="lighting3">\
<label for="lighting3-1-2" class="mr-3">\
نگهداری\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting3-1-3" name="lighting3">\
<label for="lighting3-1-3" class="mr-3">\
پاک سازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item5-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="lighting3-2-1" class="ml-3">\
موردی\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="lighting3-2-1" name="lighting3">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="lighting4" name="lighting">\
<label for="lighting4">\
روشنایی نقطه ای محل نصب دوربین در حاشیه راه\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting4-1-1" name="lighting4">\
<label for="lighting4-1-1" class="mr-3">\
نصب و راه اندازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting4-1-2" name="lighting4">\
<label for="lighting4-1-2" class="mr-3">\
نگهداری\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting4-1-3" name="lighting4">\
<label for="lighting4-1-3" class="mr-3">\
پاک سازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item5-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="lighting4-2-1" class="ml-3">\
موردی\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="lighting4-2-1" name="lighting4">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="lighting5" name="lighting">\
<label for="lighting5">\
روشنایی طولی نواحی یا گردنه های مه گیر\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-5" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting5-1-1" name="lighting5">\
<label for="lighting5-1-1" class="mr-3">\
نصب و راه اندازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-5" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting5-1-2" name="lighting5">\
<label for="lighting5-1-2" class="mr-3">\
نگهداری\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-5" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting5-1-3" name="lighting5">\
<label for="lighting5-1-3" class="mr-3">\
پاک سازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item5-5" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="lighting5-2-1" class="ml-3">\
کیلومتر\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="lighting5-2-1" name="lighting5">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="lighting6" name="lighting">\
<label for="lighting6">\
روشنایی تونل\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-6" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting6-1-1" name="lighting6">\
<label for="lighting6-1-1" class="mr-3">\
نصب و راه اندازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-6" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting6-1-2" name="lighting6">\
<label for="lighting6-1-2" class="mr-3">\
نگهداری\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item5-6" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="lighting6-1-3" name="lighting6">\
<label for="lighting6-1-3" class="mr-3">\
پاک سازی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item5-6" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="lighting6-2-1" class="ml-3">\
موردی\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="lighting6-2-1" name="lighting6">\
</div>\
</div>\
</div>\
';
break;
}
case 6: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="lining1" name="lining">\
<label for="lining1">\
خط کشی با رنگ گرم ترافیکی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item6-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="lining1-1" class="ml-3">\
کیلومتر - رنگ:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="lining1-1" name="lining1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="lining2" name="lining">\
<label for="lining2">\
خط کشی با رنگ سرد ترافیکی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item6-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="lining2-1" class="ml-3">\
کیلومتر - رنگ:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="lining2-1" name="lining2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="lining3" name="lining">\
<label for="lining3">\
ترسیم نقوش، فلش، خط نوشته و ...\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item6-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="lining3-1" class="ml-3">\
مترمربع:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="lining3-1" name="lining3">\
</div>\
</div>\
</div>\
';
break;
}
case 7: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="coloring1" name="coloring">\
<label for="coloring1">\
رنگ آمیزی پایه تابلوها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item7-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="coloring1-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="coloring1-1" name="coloring1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="coloring2" name="coloring">\
<label for="coloring2">\
رنگ آمیزی پایه چراغ ها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item7-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="coloring2-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="coloring2-1" name="coloring2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="coloring3" name="coloring">\
<label for="coloring3">\
رنگ آمیزی پایه های روشنایی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item7-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="coloring3-1" class="ml-3">\
اصله:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="coloring3-1" name="coloring3">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="coloring4" name="coloring">\
<label for="coloring4">\
رنگ آمیزی پل های عابر پیاده\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item7-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="coloring4-1" class="ml-3">\
دستگاه:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="coloring4-1" name="coloring4">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="coloring5" name="coloring">\
<label for="coloring5">\
رنگ آمیزی پایه تابلوهای دروازه ای\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item7-5" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="coloring5-1" class="ml-3">\
تعداد\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="coloring5-1" name="coloring5">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="coloring6" name="coloring">\
<label for="coloring6">\
رنگ آمیزی حفاظ ها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item7-6" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="coloring6-1" class="ml-3">\
مترمربع:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="coloring6-1" name="coloring6">\
</div>\
</div>\
</div>\
';
break;
}
case 8: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="washing1" name="washing">\
<label for="washing1">\
شستشوی علائم ایمنی اخطاری، انتظامی، مسیرنما و ...\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item8-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="washing1-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="washing1-1" name="washing1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="washing2" name="washing">\
<label for="washing2">\
شستشوی تابلوهای اطلاعاتی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item8-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="washing2-1" class="ml-3">\
مترمربع:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="washing2-1" name="washing2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="washing3" name="washing">\
<label for="washing3">\
شستشوی جداول\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item8-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="washing3-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="washing3-1" name="washing3">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="washing4" name="washing">\
<label for="washing4">\
شستشوی نیوجرسی ها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item8-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="washing4-1" class="ml-3">\
مترمربع:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="washing4-1" name="washing4">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="washing5" name="washing">\
<label for="washing5">\
شستشوی گاردریل ها و هندریل ها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item8-5" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="washing5-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="washing5-1" name="washing5">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="washing6" name="washing">\
<label for="washing6">\
شستشوی دیواره تونل ها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item8-6" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="washing6-1" class="ml-3">\
مترمربع:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="washing6-1" name="washing6">\
</div>\
</div>\
</div>\
';
break;
}
case 9: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="securing1" name="securing">\
<label for="securing1">\
ایمن سازی سرگاردریل، موانع صلب، دماغه ها و موانع صلب\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item9-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="securing1-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="securing1-1" name="securing1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="securing2" name="securing">\
<label for="securing2">\
ایمن سازی شیب شیروانی ها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item9-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="securing2-1" class="ml-3">\
کیلومتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="securing2-1" name="securing2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="securing3" name="securing">\
<label for="securing3">\
اجرای استراحتگاه\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item9-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="securing3-1" class="ml-3">\
باب:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="securing3-1" name="securing3">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="securing4" name="securing">\
<label for="securing4">\
نصب و راه اندازی چراغ های آذرخشی و چشمک زن\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item9-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="securing4-1" class="ml-3">\
دستگاه:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="securing4-1" name="securing4">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="securing5" name="securing">\
<label for="securing5">\
ایجاد شیراهای لرزاننده طولی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item9-5" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="securing5-1" class="ml-3">\
کیلومتر - شیار:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="securing5-1" name="securing5">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="securing6" name="securing">\
<label for="securing6">\
ضربه گیر استوانه ای\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item9-6" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="securing6-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="securing6-1" name="securing6">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="securing7" name="securing">\
<label for="securing7">\
نصب سرعت گیر استاندارد پلاستیکی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item9-7" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="securing7-1" class="ml-3">\
طول:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="securing7-1" name="securing7">\
</div>\
</div>\
</div>\
';
break;
}
case 10: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="privacy1" name="privacy">\
<label for="privacy1">\
ساخت و ساز\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy1-1-1" name="privacy1">\
<label for="privacy1-1-1" class="mr-3">\
اخطار\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy1-1-2" name="privacy1">\
<label for="privacy1-1-2" class="mr-3">\
تخریب\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy1-1-3" name="privacy1">\
<label for="privacy1-1-3" class="mr-3">\
مجوز\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="privacy2" name="privacy">\
<label for="privacy2">\
عبور تاسیسات زیربنایی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy2-1-1" name="privacy2">\
<label for="privacy2-1-1" class="mr-3">\
اخطار\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy2-1-2" name="privacy2">\
<label for="privacy2-1-2" class="mr-3">\
تخریب\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy2-1-3" name="privacy2">\
<label for="privacy2-1-3" class="mr-3">\
مجوز\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="privacy3" name="privacy">\
<label for="privacy3">\
راه دسترسی اختصاصی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy3-1-1" name="privacy3">\
<label for="privacy3-1-1" class="mr-3">\
اخطار\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy3-1-2" name="privacy3">\
<label for="privacy3-1-2" class="mr-3">\
تخریب\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy3-1-3" name="privacy3">\
<label for="privacy3-1-3" class="mr-3">\
مجوز\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="privacy4" name="privacy">\
<label for="privacy4">\
راه دسترسی تجمیع شده\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy4-1-1" name="privacy4">\
<label for="privacy4-1-1" class="mr-3">\
اخطار\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy4-1-2" name="privacy4">\
<label for="privacy4-1-2" class="mr-3">\
تخریب\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-4 sub-item10-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" class="form-control text-center" id="privacy4-1-3" name="privacy4">\
<label for="privacy4-1-3" class="mr-3">\
مجوز\
</label>\
</div>\
</div>\
</div>\
';
break;
}
case 11: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="bridge1" name="bridge">\
<label for="bridge1">\
تعمیرات الواسیون\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="bridge2" name="bridge">\
<label for="bridge2">\
دراواسیون و تنظیم بستر پل های بالای 6 متر\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="bridge3" name="bridge">\
<label for="bridge3">\
احداث رادیه و برید\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="bridge4" name="bridge">\
<label for="bridge4">\
مرمت و بازسازی درز انبساط\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="bridge5" name="bridge">\
<label for="bridge5">\
بازسازی نرده پل\
</label>\
</div>\
</div>\
</div>\
';
break;
}
case 12: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="tunnel1" name="tunnel">\
<label for="tunnel1">\
زهکشی طاق تونل\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="tunnel2" name="tunnel">\
<label for="tunnel2">\
مرمت و بازرسی آبروهای هدایت آب\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="tunnel3" name="tunnel">\
<label for="tunnel3">\
لاینینگ\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="tunnel4" name="tunnel">\
<label for="tunnel4">\
تعمیر و بازسازی گالری\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="tunnel5" name="tunnel">\
<label for="tunnel5">\
گاباریت\
</label>\
</div>\
</div>\
</div>\
';
break;
}
case 13: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="winterOperation1" name="winterOperation">\
<label for="winterOperation1">\
عملیات یخ زدایی با شن و نمک پاشی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item13-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="winterOperation1-1" class="ml-3">\
کیلومتر - باند:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="winterOperation1-1" name="winterOperation1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="winterOperation2" name="winterOperation">\
<label for="winterOperation2">\
برف روبی با گریدر یا تیغه برف روب\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item13-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="winterOperation2-1" class="ml-3">\
کیلومتر - باند:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="winterOperation2-1" name="winterOperation2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="winterOperation3" name="winterOperation">\
<label for="winterOperation3">\
برف روبی با بولدوزر و ماشین برف خور\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item13-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="winterOperation3-1" class="ml-3">\
کیلومتر - باند:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="winterOperation3-1" name="winterOperation3">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="winterOperation4" name="winterOperation">\
<label for="winterOperation4">\
برف روبی در شرایط کولاک و عدم دید\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item13-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="winterOperation4-1" class="ml-3">\
کیلومتر - باند:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="winterOperation4-1" name="winterOperation4">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="winterOperation5" name="winterOperation">\
<label for="winterOperation5">\
میزان نمک مصرفی\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item13-5" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="winterOperation5-1" class="ml-3">\
تن:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="winterOperation5-1" name="winterOperation5">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="winterOperation6" name="winterOperation">\
<label for="winterOperation6">\
ریزش برداری\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item13-6" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="winterOperation6-1" class="ml-3">\
مقطع:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="winterOperation6-1" name="winterOperation6">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="winterOperation7" name="winterOperation">\
<label for="winterOperation7">\
مسافرین اسکان داده شده\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item13-7" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="winterOperation7-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="winterOperation7-1" name="winterOperation7">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="winterOperation8" name="winterOperation">\
<label for="winterOperation8">\
کمک رسانی به خودرو رهاشده\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item13-8" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="winterOperation8-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="winterOperation8-1" name="winterOperation8">\
</div>\
</div>\
</div>\
';
break;
}
case 14: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="machinery1" name="machinery">\
<label for="machinery1">\
بنزین مصرفی کل ماشین آلات فعال\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-1" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="machinery1-1" class="ml-3">\
لیتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="machinery1-1" name="machinery1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="machinery2" name="machinery">\
<label for="machinery2">\
گازوئیل مصرفی کل ماشین آلات فعال\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-2" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="machinery2-1" class="ml-3">\
لیتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="machinery2-1" name="machinery2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="machinery3" name="machinery">\
<label for="machinery3">\
مواد مصرفی نفتی و انواع روغن\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-center align-items-center">\
<label for="machinery3-1" class="ml-3">\
لیتر:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="machinery3-1" name="machinery3">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="machinery4" name="machinery">\
<label for="machinery4">\
بازسازی و راه اندازی ماشین آلات\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-4 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="machinery4-1" class="ml-3">\
تعداد دستگاه:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="machinery4-1" name="machinery4">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-4 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="machinery4-2" class="ml-3">\
هزینه:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="machinery4-2" name="machinery4">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="machinery5" name="machinery">\
<label for="machinery5">\
خرید ماشین آلات\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-5 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="machinery5-1" class="ml-3">\
تعداد دستگاه:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="machinery5-1" name="machinery5">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-5 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="machinery5-2" class="ml-3">\
نوع کاربری:\
</label>\
<input type="text" class="form-control text-center" style="width: 50%" id="machinery5-2" name="machinery5">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="machinery6" name="machinery">\
<label for="machinery6">\
خرید تجهیزآلات مرتبط به ماشین آلات\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-6 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="machinery6-1" class="ml-3">\
تعداد دستگاه:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="machinery6-1" name="machinery6">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-6 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="machinery6-2" class="ml-3">\
نوع کاربری:\
</label>\
<input type="text" class="form-control text-center" style="width: 50%" id="machinery6-2" name="machinery6">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="machinery7" name="machinery">\
<label for="machinery7">\
بازدید کارشناسان از ماشین آلات استان\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-7 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="machinery7-1" class="ml-3">\
تعداد دستگاه:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="machinery7-1" name="machinery7">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item14-7 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="machinery7-2" class="ml-3">\
تعداد بازدید:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="machinery7-2" name="machinery7">\
</div>\
</div>\
</div>\
';
break;
}
case 15: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="tollhouse1" name="tollhouse">\
<label for="tollhouse1">\
راهدارخانه های بازسازی شده\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item15-1 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="tollhouse1-1" class="ml-3">\
باب:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="tollhouse1-1" name="tollhouse1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item15-1 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="tollhouse1-2" class="ml-3">\
هزینه:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="tollhouse1-2" name="tollhouse1">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="tollhouse2" name="tollhouse">\
<label for="tollhouse2">\
خرید تجهیزآلات مرتبط با راهدارخانه ها\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item15-2 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="tollhouse2-1" class="ml-3">\
تعداد:\
</label>\
<input type="number" class="form-control text-center" style="width: 50%" id="tollhouse2-1" name="tollhouse2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item15-2 mr-4" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="tollhouse2-2" class="ml-3">\
نوع:\
</label>\
<input type="text" class="form-control text-center" style="width: 50%" id="tollhouse2-2" name="tollhouse2">\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="tollhouse3" name="tollhouse">\
<label for="tollhouse3">\
جلسات تشکیل شده در خصوص مدیریت بحران و پدافند غیرعامل\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item15-3" style="display: none;">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="tollhouse3-1" class="ml-3">توضیح:</label>\
<textarea row="4" class="form-control" style="width: 70%; height: 120px; resize: none;" id="tollhouse3-1" name="tollhouse3"></textarea>\
</div>\
</div>\
</div>\
';
break;
}
case 16: {
subItems =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="emergency1" name="emergency">\
<label for="emergency1">\
پاک سازی سطح راه و رفع انسداد ناشی از ریزش کوه و سقوط بهمن\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="emergency2" name="emergency">\
<label for="emergency2">\
برقراری تردد و رفع انسداد ناشی از وقوع تصادف یا واژگونی وسایط نقلیه و پخش محموله در سطح راه\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="emergency3" name="emergency">\
<label for="emergency3">\
برقراری ارتباط و رفع انسداد ناشی از شن های روان\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="emergency4" name="emergency">\
<label for="emergency4">\
برقراری ارتباط در راه هایی که به دلیل آب بردگی دچار قطع ارتباط شده اند\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="emergency5" name="emergency">\
<label for="emergency5">\
برقراری ارتباط موقت در راه هایی که به دلیل شکستگی پل یا ریزش تونل یا ... قطع شده اند\
</label>\
</div>\
</div>\
</div>\
<div class="col-sm-12 sub-item">\
<div class="form-group radio-body clearfix">\
<div class="icheck-primary d-inline">\
<input type="checkbox" id="emergency6" name="emergency">\
<label for="emergency6">\
بستن راه و هدایت ترافیکی در مواقع اضطراری\
</label>\
</div>\
</div>\
</div>\
';
break;
}
case 17: {
subItems =
'\
<div class="col-sm-12 sub-item16">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="report" class="ml-3">توضیح:</label>\
<textarea row="4" cols="45" class="form-control" style="height: 120px; resize: none;" id="report1" name="report"></textarea>\
</div>\
</div>\
</div>\
';
break;
}
case 18: {
subItems =
'\
<div class="col-sm-12 sub-item17">\
<div class="form-group radio-body clearfix">\
<div class="d-flex justify-content-start align-items-center">\
<label for="snowWatch" class="ml-3">توضیح:</label>\
<textarea row="4" cols="45" class="form-control" style="height: 120px; resize: none;" id="snowWatch1" name="snowWatch"></textarea>\
</div>\
</div>\
</div>\
';
break;
}
}
$(".sub-item-container").append(subItems);
$("#uploadroaditem").modal({ backdrop: "static", keyboard: false });
// Show modal
$("#uploadroaditem").modal("show");
// Load necessary scripts
actionAfterShowModal(selectedItem);
}
function actionAfterShowModal(index) {
switch (index) {
case 1: {
$('input[id="reconstruction1"]').on("click", function () {
$(".sub-item1-1").show("slow");
for (let i = 1; i < 7; i++) {
// if (i == 1) continue;
if (!$("#reconstruction" + i).is(":checked")) {
$(".sub-item1-" + i).hide("slow");
}
}
});
$('input[id="reconstruction2"]').on("click", function () {
$(".sub-item1-2").show("slow");
for (let i = 1; i < 7; i++) {
// if (i == 2) continue;
if (!$("#reconstruction" + i).is(":checked")) {
$(".sub-item1-" + i).hide("slow");
}
}
});
$('input[id="reconstruction3"]').on("click", function () {
$(".sub-item1-3").show("slow");
for (let i = 1; i < 7; i++) {
// if (i == 3) continue;
if (!$("#reconstruction" + i).is(":checked")) {
$(".sub-item1-" + i).hide("slow");
}
}
});
$('input[id="reconstruction4"]').on("click", function () {
$(".sub-item1-4").show("slow");
for (let i = 1; i < 7; i++) {
// if (i == 4) continue;
if (!$("#reconstruction" + i).is(":checked")) {
$(".sub-item1-" + i).hide("slow");
}
}
});
$('input[id="reconstruction5"]').on("click", function () {
$(".sub-item1-5").show("slow");
for (let i = 1; i < 7; i++) {
// if (i == 5) continue;
if (!$("#reconstruction" + i).is(":checked")) {
$(".sub-item1-" + i).hide("slow");
}
}
});
$('input[id="reconstruction6"]').on("click", function () {
$(".sub-item1-6").show("slow");
for (let i = 1; i < 7; i++) {
// if (i == 6) continue;
if (!$("#reconstruction" + i).is(":checked")) {
$(".sub-item1-" + i).hide("slow");
}
}
});
break;
}
case 2: {
$('input[id="cleaning1"]').on("click", function () {
$(".sub-item2-1").show("slow");
for (let i = 1; i < 9; i++) {
// if (i == 1) continue;
if (!$("#cleaning" + i).is(":checked")) {
$(".sub-item2-" + i).hide("slow");
}
}
});
$('input[id="cleaning2"]').on("click", function () {
$(".sub-item2-2").show("slow");
for (let i = 1; i < 9; i++) {
// if (i == 2) continue;
if (!$("#cleaning" + i).is(":checked")) {
$(".sub-item2-" + i).hide("slow");
}
}
});
$('input[id="cleaning3"]').on("click", function () {
$(".sub-item2-3").show("slow");
for (let i = 1; i < 9; i++) {
// if (i == 3) continue;
if (!$("#cleaning" + i).is(":checked")) {
$(".sub-item2-" + i).hide("slow");
}
}
});
$('input[id="cleaning4"]').on("click", function () {
$(".sub-item2-4").show("slow");
for (let i = 1; i < 9; i++) {
// if (i == 4) continue;
if (!$("#cleaning" + i).is(":checked")) {
$(".sub-item2-" + i).hide("slow");
}
}
});
$('input[id="cleaning5"]').on("click", function () {
$(".sub-item2-5").show("slow");
for (let i = 1; i < 9; i++) {
// if (i == 5) continue;
if (!$("#cleaning" + i).is(":checked")) {
$(".sub-item2-" + i).hide("slow");
}
}
});
$('input[id="cleaning6"]').on("click", function () {
$(".sub-item2-6").show("slow");
for (let i = 1; i < 9; i++) {
// if (i == 6) continue;
if (!$("#cleaning" + i).is(":checked")) {
$(".sub-item2-" + i).hide("slow");
}
}
});
$('input[id="cleaning7"]').on("click", function () {
$(".sub-item2-7").show("slow");
for (let i = 1; i < 9; i++) {
// if (i == 7) continue;
if (!$("#cleaning" + i).is(":checked")) {
$(".sub-item2-" + i).hide("slow");
}
}
});
$('input[id="cleaning8"]').on("click", function () {
$(".sub-item2-8").show("slow");
for (let i = 1; i < 9; i++) {
// if (i == 8) continue;
if (!$("#cleaning" + i).is(":checked")) {
$(".sub-item2-" + i).hide("slow");
}
}
});
break;
}
case 3: {
$('input[id="signs1"]').on("click", function () {
$(".sub-item3-1").show("slow");
for (let i = 1; i < 5; i++) {
// if (i == 1) continue;
if (!$("#signs" + i).is(":checked")) {
$(".sub-item3-" + i).hide("slow");
}
}
});
$('input[id="signs2"]').on("click", function () {
$(".sub-item3-2").show("slow");
for (let i = 1; i < 5; i++) {
// if (i == 2) continue;
if (!$("#signs" + i).is(":checked")) {
$(".sub-item3-" + i).hide("slow");
}
}
});
$('input[id="signs3"]').on("click", function () {
$(".sub-item3-3").show("slow");
for (let i = 1; i < 5; i++) {
// if (i == 3) continue;
if (!$("#signs" + i).is(":checked")) {
$(".sub-item3-" + i).hide("slow");
}
}
});
$('input[id="signs4"]').on("click", function () {
$(".sub-item3-4").show("slow");
for (let i = 1; i < 5; i++) {
// if (i == 4) continue;
if (!$("#signs" + i).is(":checked")) {
$(".sub-item3-" + i).hide("slow");
}
}
});
break;
}
case 4: {
$('input[id="shield1"]').on("click", function () {
$(".sub-item4-1").show("slow");
for (let i = 1; i < 4; i++) {
// if (i == 1) continue;
if (!$("#shield" + i).is(":checked")) {
$(".sub-item4-" + i).hide("slow");
}
}
});
$('input[id="shield2"]').on("click", function () {
$(".sub-item4-2").show("slow");
for (let i = 1; i < 4; i++) {
// if (i == 2) continue;
if (!$("#shield" + i).is(":checked")) {
$(".sub-item4-" + i).hide("slow");
}
}
});
$('input[id="shield3"]').on("click", function () {
$(".sub-item4-3").show("slow");
for (let i = 1; i < 4; i++) {
// if (i == 3) continue;
if (!$("#shield" + i).is(":checked")) {
$(".sub-item4-" + i).hide("slow");
}
}
});
break;
}
case 5: {
$('input[id="lighting1"]').on("click", function () {
$(".sub-item5-1").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#lighting" + i).is(":checked")) {
$(".sub-item5-" + i).hide("slow");
}
}
});
$('input[id="lighting2"]').on("click", function () {
$(".sub-item5-2").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#lighting" + i).is(":checked")) {
$(".sub-item5-" + i).hide("slow");
}
}
});
$('input[id="lighting3"]').on("click", function () {
$(".sub-item5-3").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#lighting" + i).is(":checked")) {
$(".sub-item5-" + i).hide("slow");
}
}
});
$('input[id="lighting4"]').on("click", function () {
$(".sub-item5-4").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#lighting" + i).is(":checked")) {
$(".sub-item5-" + i).hide("slow");
}
}
});
$('input[id="lighting5"]').on("click", function () {
$(".sub-item5-5").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#lighting" + i).is(":checked")) {
$(".sub-item5-" + i).hide("slow");
}
}
});
$('input[id="lighting6"]').on("click", function () {
$(".sub-item5-6").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#lighting" + i).is(":checked")) {
$(".sub-item5-" + i).hide("slow");
}
}
});
break;
}
case 6: {
$('input[id="lining1"]').on("click", function () {
$(".sub-item6-1").show("slow");
for (let i = 1; i < 4; i++) {
if (!$("#lining" + i).is(":checked")) {
$(".sub-item6-" + i).hide("slow");
}
}
});
$('input[id="lining2"]').on("click", function () {
$(".sub-item6-2").show("slow");
for (let i = 1; i < 4; i++) {
if (!$("#lining" + i).is(":checked")) {
$(".sub-item6-" + i).hide("slow");
}
}
});
$('input[id="lining3"]').on("click", function () {
$(".sub-item6-3").show("slow");
for (let i = 1; i < 4; i++) {
if (!$("#lining" + i).is(":checked")) {
$(".sub-item6-" + i).hide("slow");
}
}
});
break;
}
case 7: {
$('input[id="coloring1"]').on("click", function () {
$(".sub-item7-1").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#coloring" + i).is(":checked")) {
$(".sub-item7-" + i).hide("slow");
}
}
});
$('input[id="coloring2"]').on("click", function () {
$(".sub-item7-2").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#coloring" + i).is(":checked")) {
$(".sub-item7-" + i).hide("slow");
}
}
});
$('input[id="coloring3"]').on("click", function () {
$(".sub-item7-3").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#coloring" + i).is(":checked")) {
$(".sub-item7-" + i).hide("slow");
}
}
});
$('input[id="coloring4"]').on("click", function () {
$(".sub-item7-4").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#coloring" + i).is(":checked")) {
$(".sub-item7-" + i).hide("slow");
}
}
});
$('input[id="coloring5"]').on("click", function () {
$(".sub-item7-5").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#coloring" + i).is(":checked")) {
$(".sub-item7-" + i).hide("slow");
}
}
});
$('input[id="coloring6"]').on("click", function () {
$(".sub-item7-6").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#coloring" + i).is(":checked")) {
$(".sub-item7-" + i).hide("slow");
}
}
});
break;
}
case 8: {
$('input[id="washing1"]').on("click", function () {
$(".sub-item8-1").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#washing" + i).is(":checked")) {
$(".sub-item8-" + i).hide("slow");
}
}
});
$('input[id="washing2"]').on("click", function () {
$(".sub-item8-2").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#washing" + i).is(":checked")) {
$(".sub-item8-" + i).hide("slow");
}
}
});
$('input[id="washing3"]').on("click", function () {
$(".sub-item8-3").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#washing" + i).is(":checked")) {
$(".sub-item8-" + i).hide("slow");
}
}
});
$('input[id="washing4"]').on("click", function () {
$(".sub-item8-4").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#washing" + i).is(":checked")) {
$(".sub-item8-" + i).hide("slow");
}
}
});
$('input[id="washing5"]').on("click", function () {
$(".sub-item8-5").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#washing" + i).is(":checked")) {
$(".sub-item8-" + i).hide("slow");
}
}
});
$('input[id="washing6"]').on("click", function () {
$(".sub-item8-6").show("slow");
for (let i = 1; i < 7; i++) {
if (!$("#washing" + i).is(":checked")) {
$(".sub-item8-" + i).hide("slow");
}
}
});
break;
}
case 9: {
$('input[id="securing1"]').on("click", function () {
$(".sub-item9-1").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#securing" + i).is(":checked")) {
$(".sub-item9-" + i).hide("slow");
}
}
});
$('input[id="securing2"]').on("click", function () {
$(".sub-item9-2").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#securing" + i).is(":checked")) {
$(".sub-item9-" + i).hide("slow");
}
}
});
$('input[id="securing3"]').on("click", function () {
$(".sub-item9-3").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#securing" + i).is(":checked")) {
$(".sub-item9-" + i).hide("slow");
}
}
});
$('input[id="securing4"]').on("click", function () {
$(".sub-item9-4").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#securing" + i).is(":checked")) {
$(".sub-item9-" + i).hide("slow");
}
}
});
$('input[id="securing5"]').on("click", function () {
$(".sub-item9-5").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#securing" + i).is(":checked")) {
$(".sub-item9-" + i).hide("slow");
}
}
});
$('input[id="securing6"]').on("click", function () {
$(".sub-item9-6").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#securing" + i).is(":checked")) {
$(".sub-item9-" + i).hide("slow");
}
}
});
$('input[id="securing7"]').on("click", function () {
$(".sub-item9-7").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#securing" + i).is(":checked")) {
$(".sub-item9-" + i).hide("slow");
}
}
});
break;
}
case 10: {
$('input[id="privacy1"]').on("click", function () {
$(".sub-item10-1").show("slow");
for (let i = 1; i < 5; i++) {
if (!$("#privacy" + i).is(":checked")) {
$(".sub-item10-" + i).hide("slow");
}
}
});
$('input[id="privacy2"]').on("click", function () {
$(".sub-item10-2").show("slow");
for (let i = 1; i < 5; i++) {
if (!$("#privacy" + i).is(":checked")) {
$(".sub-item10-" + i).hide("slow");
}
}
});
$('input[id="privacy3"]').on("click", function () {
$(".sub-item10-3").show("slow");
for (let i = 1; i < 5; i++) {
if (!$("#privacy" + i).is(":checked")) {
$(".sub-item10-" + i).hide("slow");
}
}
});
$('input[id="privacy4"]').on("click", function () {
$(".sub-item10-4").show("slow");
for (let i = 1; i < 5; i++) {
if (!$("#privacy" + i).is(":checked")) {
$(".sub-item10-" + i).hide("slow");
}
}
});
break;
}
case 13: {
$('input[id="winterOperation1"]').on("click", function () {
$(".sub-item13-1").show("slow");
for (let i = 1; i < 9; i++) {
if (!$("#winterOperation" + i).is(":checked")) {
$(".sub-item13-" + i).hide("slow");
}
}
});
$('input[id="winterOperation2"]').on("click", function () {
$(".sub-item13-2").show("slow");
for (let i = 1; i < 9; i++) {
if (!$("#winterOperation" + i).is(":checked")) {
$(".sub-item13-" + i).hide("slow");
}
}
});
$('input[id="winterOperation3"]').on("click", function () {
$(".sub-item13-3").show("slow");
for (let i = 1; i < 9; i++) {
if (!$("#winterOperation" + i).is(":checked")) {
$(".sub-item13-" + i).hide("slow");
}
}
});
$('input[id="winterOperation4"]').on("click", function () {
$(".sub-item13-4").show("slow");
for (let i = 1; i < 9; i++) {
if (!$("#winterOperation" + i).is(":checked")) {
$(".sub-item13-" + i).hide("slow");
}
}
});
$('input[id="winterOperation5"]').on("click", function () {
$(".sub-item13-5").show("slow");
for (let i = 1; i < 9; i++) {
if (!$("#winterOperation" + i).is(":checked")) {
$(".sub-item13-" + i).hide("slow");
}
}
});
$('input[id="winterOperation6"]').on("click", function () {
$(".sub-item13-6").show("slow");
for (let i = 1; i < 9; i++) {
if (!$("#winterOperation" + i).is(":checked")) {
$(".sub-item13-" + i).hide("slow");
}
}
});
$('input[id="winterOperation7"]').on("click", function () {
$(".sub-item13-7").show("slow");
for (let i = 1; i < 9; i++) {
if (!$("#winterOperation" + i).is(":checked")) {
$(".sub-item13-" + i).hide("slow");
}
}
});
$('input[id="winterOperation8"]').on("click", function () {
$(".sub-item13-8").show("slow");
for (let i = 1; i < 9; i++) {
if (!$("#winterOperation" + i).is(":checked")) {
$(".sub-item13-" + i).hide("slow");
}
}
});
break;
}
case 14: {
$('input[id="machinery1"]').on("click", function () {
$(".sub-item14-1").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#machinery" + i).is(":checked")) {
$(".sub-item14-" + i).hide("slow");
}
}
});
$('input[id="machinery2"]').on("click", function () {
$(".sub-item14-2").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#machinery" + i).is(":checked")) {
$(".sub-item14-" + i).hide("slow");
}
}
});
$('input[id="machinery3"]').on("click", function () {
$(".sub-item14-3").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#machinery" + i).is(":checked")) {
$(".sub-item14-" + i).hide("slow");
}
}
});
$('input[id="machinery4"]').on("click", function () {
$(".sub-item14-4").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#machinery" + i).is(":checked")) {
$(".sub-item14-" + i).hide("slow");
}
}
});
$('input[id="machinery5"]').on("click", function () {
$(".sub-item14-5").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#machinery" + i).is(":checked")) {
$(".sub-item14-" + i).hide("slow");
}
}
});
$('input[id="machinery6"]').on("click", function () {
$(".sub-item14-6").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#machinery" + i).is(":checked")) {
$(".sub-item14-" + i).hide("slow");
}
}
});
$('input[id="machinery7"]').on("click", function () {
$(".sub-item14-7").show("slow");
for (let i = 1; i < 8; i++) {
if (!$("#machinery" + i).is(":checked")) {
$(".sub-item14-" + i).hide("slow");
}
}
});
break;
}
case 15: {
$('input[id="tollhouse1"]').on("click", function () {
$(".sub-item15-1").show("slow");
for (let i = 1; i < 4; i++) {
if (!$("#tollhouse" + i).is(":checked")) {
$(".sub-item15-" + i).hide("slow");
}
}
});
$('input[id="tollhouse2"]').on("click", function () {
$(".sub-item15-2").show("slow");
for (let i = 1; i < 4; i++) {
if (!$("#tollhouse" + i).is(":checked")) {
$(".sub-item15-" + i).hide("slow");
}
}
});
$('input[id="tollhouse3"]').on("click", function () {
$(".sub-item15-3").show("slow");
for (let i = 1; i < 4; i++) {
if (!$("#tollhouse" + i).is(":checked")) {
$(".sub-item15-" + i).hide("slow");
}
}
});
break;
}
}
}
// Next button click on items modal
$("#uploadroaditem .btn-next").on("click", function () {
switch (selectedItem) {
case 1: {
saveSelectedSubItems(6, "reconstruction");
break;
}
case 2: {
saveSelectedSubItems(8, "cleaning");
break;
}
case 3: {
saveSelectedSubItems(4, "signs");
break;
}
case 4: {
saveSelectedSubItems(3, "shield");
break;
}
case 5: {
saveSelectedSubItems(6, "lighting");
break;
}
case 6: {
saveSelectedSubItems(3, "lining");
break;
}
case 7: {
saveSelectedSubItems(6, "coloring");
break;
}
case 8: {
saveSelectedSubItems(6, "washing");
break;
}
case 9: {
saveSelectedSubItems(7, "securing");
break;
}
case 10: {
saveSelectedSubItems(4, "privacy");
break;
}
case 11: {
saveSelectedSubItems(5, "bridge");
break;
}
case 12: {
saveSelectedSubItems(5, "tunnel");
break;
}
case 13: {
saveSelectedSubItems(8, "winterOperation");
break;
}
case 14: {
saveSelectedSubItems(7, "machinery");
break;
}
case 15: {
saveSelectedSubItems(3, "tollhouse");
break;
}
case 16: {
saveSelectedSubItems(6, "emergency");
break;
}
case 17: {
saveSelectedSubItems(0, "report");
break;
}
case 18: {
saveSelectedSubItems(0, "snowWatch");
break;
}
case 19: {
//saveSelectedSubItems();
break;
}
}
});
$("#uploadroaditem .btn-prev").on("click", function () {
subItemsData = {};
if ($("#uploadroaditem .btn-next").css("display") == "none") {
// Go back to sub-items modal
nextSubItemSelection();
} else {
// Go back to bottom item-selection
$("#uploadroaditem").modal("hide");
$("#uploadroaditem .btn-next").show();
$("#uploadroaditem .btn-create").hide();
$(".bottom-item-selection").show("slow");
}
});
function setSubItem(name, value) {
subItemsData[name] = value;
// console.log(name + ': ' + subItemsData[name]);
// console.log(subItemsData);
}
function saveSelectedSubItems(
selectedItemIndex = null,
selectedItemName = null
) {
valuevarification = [];
if (selectedItem < 17) {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked"))
selectedSubItems += i + "-";
}
} else {
selectedSubItems += 1 + "-";
}
// console.log('selectedItem: ', selectedItem)
submitFormInput[selectedItemCount] = {
latlng: null,
item: null,
subitems: null,
data: null,
files: null,
};
submitFormInput[selectedItemCount].latlng = [
locations[selectedItemCount + 1][0].toFixed(7),
locations[selectedItemCount + 1][1].toFixed(7),
];
submitFormInput[selectedItemCount].item = selectedItem;
selectedItemArray.push(selectedItem);
//console.log('selectedItemArray: ', selectedItemArray)
//console.log('selectedSubItems: ', selectedSubItems)
let selectedSubItemsArray = selectedSubItems.split("-");
selectedSubItems = "";
selectedSubItemsArray.pop();
submitFormInput[selectedItemCount].subitems = selectedSubItemsArray;
//console.log(submitFormInput);
hasSubItemGotValue = true;
switch (selectedItem) {
case 1: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
if ((value = $("#" + selectedItemName + i + "-1").val())) {
setSubItem(selectedItemName + i + "-1", value);
valuevarification.push(value)
} else hasSubItemGotValue = false;
}
}
break;
}
case 2: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
if ((value = $("#" + selectedItemName + i + "-1").val())) {
// console.log(value);
setSubItem(selectedItemName + i + "-1", value);
valuevarification.push(value)
} else hasSubItemGotValue = false;
}
}
break;
}
case 3: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
if ((value = $("#" + selectedItemName + i + "-1").val())) {
// console.log(value);
setSubItem(selectedItemName + i + "-1", value);
valuevarification.push(value)
} else hasSubItemGotValue = false;
}
}
break;
}
case 4: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
for (let j = 1; j < 5; j++) {
if ($("#" + selectedItemName + i + "-1-" + j).is(":checked")) {
// console.log(j);
setSubItem(selectedItemName + i + "-1-" + j, true);
hasSubItemGotValue = true;
break;
} else hasSubItemGotValue = false;
}
if ((value = $("#" + selectedItemName + i + "-2-1").val())) {
// console.log(value);
setSubItem(selectedItemName + i + "-2-1", value);
valuevarification.push(value)
} else hasSubItemGotValue = false;
}
}
// console.log(subItemsData);
break;
}
case 5: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
for (let j = 1; j < 4; j++) {
if ($("#" + selectedItemName + i + "-1-" + j).is(":checked")) {
// console.log(j);
setSubItem(selectedItemName + i + "-1-" + j, true);
} else hasSubItemGotValue = false;
}
if ($(".sub-item5-" + i + " input[type=checkbox]:checked").length) {
hasSubItemGotValue = true;
}
if ((value = $("#" + selectedItemName + i + "-2-1").val())) {
valuevarification.push(value)
// console.log(value);
setSubItem(selectedItemName + i + "-2-1", value);
} else hasSubItemGotValue = false;
}
}
break;
}
case 6: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
if ((value = $("#" + selectedItemName + i + "-1").val())) {
// console.log(value);
valuevarification.push(value)
setSubItem(selectedItemName + i + "-1", value);
} else hasSubItemGotValue = false;
}
}
break;
}
case 7: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
if ((value = $("#" + selectedItemName + i + "-1").val())) {
// console.log(value);
valuevarification.push(value)
setSubItem(selectedItemName + i + "-1", value);
} else hasSubItemGotValue = false;
}
}
break;
}
case 8: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
if ((value = $("#" + selectedItemName + i + "-1").val())) {
// console.log(value);
valuevarification.push(value)
setSubItem(selectedItemName + i + "-1", value);
} else hasSubItemGotValue = false;
}
}
break;
}
case 9: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
if ((value = $("#" + selectedItemName + i + "-1").val())) {
// console.log(value);
valuevarification.push(value)
setSubItem(selectedItemName + i + "-1", value);
} else hasSubItemGotValue = false;
}
}
break;
}
case 10: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
for (let j = 1; j < 4; j++) {
if ($("#" + selectedItemName + i + "-1-" + j).is(":checked")) {
// console.log(j);
setSubItem(selectedItemName + i + "-1-" + j, true);
} else hasSubItemGotValue = false;
}
if ($(".sub-item10-" + i + " input[type=checkbox]:checked").length) {
hasSubItemGotValue = true;
}
}
// console.log(subItemsData);
}
break;
}
case 13: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
if ((value = $("#" + selectedItemName + i + "-1").val())) {
valuevarification.push(value)
// console.log(value);
setSubItem(selectedItemName + i + "-1", value);
} else hasSubItemGotValue = false;
}
}
break;
}
case 14: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
if (i < 4) {
// First 3 items have one subitem data
if ((value = $("#" + selectedItemName + i + "-1").val())) {
valuevarification.push(value)
setSubItem(selectedItemName + i + "-1", value);
} else hasSubItemGotValue = false;
} else {
// Others have 2 subitem data
for (let j = 1; j < 3; j++) {
if ((value = $("#" + selectedItemName + i + "-" + j).val())) {
valuevarification.push(value)
// console.log(j);
setSubItem(selectedItemName + i + "-" + j, value);
} else hasSubItemGotValue = false;
}
}
}
}
break;
}
case 15: {
for (let i = 1; i <= selectedItemIndex; i++) {
if ($("#" + selectedItemName + i).is(":checked")) {
if (i == 3) {
if ((value = $("#" + selectedItemName + i + "-1").val())) {
valuevarification.push(value)
setSubItem(selectedItemName + i + "-1", value);
} else hasSubItemGotValue = false;
} else {
// Others have 2 subitem data
for (let j = 1; j < 3; j++) {
if ((value = $("#" + selectedItemName + i + "-" + j).val())) {
valuevarification.push(value)
// console.log(j);
setSubItem(selectedItemName + i + "-" + j, value);
} else hasSubItemGotValue = false;
}
}
}
}
break;
}
case 17: {
if ((value = $("#" + selectedItemName + "1").val())) {
// console.log(value);
valuevarification.push(value)
setSubItem(selectedItemName + "1", value);
} else hasSubItemGotValue = false;
break;
}
case 18: {
if ((value = $("#" + selectedItemName + "1").val())) {
// console.log(value);
valuevarification.push(value)
setSubItem(selectedItemName + "1", value);
} else hasSubItemGotValue = false;
break;
}
}
submitFormInput[selectedItemCount].data = subItemsData;
//console.log(submitFormInput);
// let selectedSubItemsArray = selectedSubItems.split('-');
// selectedSubItemsArray.pop();
// console.log('selectedSubItemsArray: ', selectedSubItemsArray);
if (selectedSubItemsArray.length < 1 || selectedSubItemsArray[0] == "") {
alert("یک یا چند مورد را انتخاب کنید!");
} else {
var selectedlenght = selectedSubItemsArray.length
var selectedvalue = valuevarification.length
console.log("selectedvalue", selectedvalue, selectedlenght)
if (selectedlenght == selectedvalue) {
showUploadPhotoModal();
}
else {
console.log("selectedSubItemsArray", selectedSubItemsArray, valuevarification)
console.log("selectedlenght", selectedlenght, selectedvalue)
alert("لطفا تمامی مقادیر را وارد کنید ");
}
}
}
function submitProject() {
if (destMarker != null && saveTotalDistance) {
let formData = new FormData();
if (sourceMarker._latlng.lat != null && sourceMarker._latlng.lng != null)
formData.append("source", [
sourceMarker._latlng.lat.toFixed(7),
sourceMarker._latlng.lng.toFixed(7),
]);
if (destMarker._latlng.lat != null && destMarker._latlng.lng != null)
formData.append("dest", [
destMarker._latlng.lat.toFixed(7),
destMarker._latlng.lng.toFixed(7),
]);
if (saveTotalDistance != null)
formData.append("distance", saveTotalDistance);
$.each(submitFormInput, function (key, value) {
if (value.latlng != null) formData.append("latlng_" + key, value.latlng);
if (value.item != null) formData.append("item_" + key, value.item);
if (value.subitems != null)
formData.append("subitems_" + key, value.subitems);
let subItemsDataStr = JSON.stringify(value.data);
if (subItemsDataStr.length > 2) {
formData.append("data_" + key, subItemsDataStr);
}
$.each(value.files, function (key_in, value_in) {
formData.append("file_" + key + "_" + key_in, value_in);
});
});
showLoaderScreen();
$('.submit-button').prop('disabled', true);
setTimeout(function () {
$.ajax({
url: "/rmto-patrol-add",
type: "POST",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
data: formData,
cache: false,
contentType: false,
processData: false,
success: function (result) {
console.log(result);
hideLoaderScreen();
alert("پروژه با موفقیت ثبت شد");
location.reload()
// window.open("/rmto-patrol", "_self");
},
error: function (error) {
console.log(error);
hideLoaderScreen();
alert("ارتباط اینترنت شما برقرار نیست. لطفا مجدد تلاش کنید.");
location.reload()
// window.open("/rmto-patrol", "_self");
},
});
}, 500);
}
}
function showUploadPhotoModal() {
$("#uploadroaditem").modal("hide");
setTimeout(function () {
$("#uploadroaditem .btn-next").hide();
$("#uploadroaditem .btn-create").show();
$("#uploadroaditem .modal-title").text("آپلود فایل‌های موردنیاز");
$("#uploadroaditem .row.sub-item-container").empty();
addUploadFormToModal();
$("#uploadroaditem").modal("show");
}, 350);
}
function addUploadFormToModal() {
let formItem =
'\
<div class="col-sm-12 sub-item">\
<div class="form-group clearfix">\
<label class="file-input-modal-container">\
<div class="file-input-modal">برای آپلود فایل اینجا را کلیک کنید</div>\
<input class="file-input" type="file" name="modalUpFile" multiple onChange="showUploadedFiles(this)">\
</label>\
<div id="uploadedItems">\
</div>\
</div>\
</div>\
';
$("#uploadroaditem .row.sub-item-container").append(formItem);
}
function showUploadedFiles(input) {
if (input.files) {
// var reader = new FileReader();
// reader.onload = function (e) {
// $('#uploadedItems')
// .append(input.value);
// };
for (let index = 0; index < input.files.length; index++) {
$("#uploadedItems").append(
'\
<div class="row" id="item-' +
index +
'">\
<div class="col-md-6"><span style="margin-right: 12px;">نام: </span><span>' +
input.files[index].name +
'</span></div>\
<div class="col-md-4"><span style="margin-right: 12px;">حجم: </span><span>' +
input.files[index].size / 1000 +
'KB</span></div>\
<div class="col-md-2"><span style="margin-right: 12px; cursor: pointer">&#10006;</span><br></div>\
</div>\
'
);
}
//console.log('input.files:');
//console.log(input.files);
//saveUploadFiles.push(input.files);
//console.log(saveUploadFiles);
//$('#uploadroaditem').modal('hide');
submitFormInput[selectedItemCount].files = input.files;
// reader.readAsDataURL(input.files[0]);
}
}
$("#uploadroaditem .btn-create").on("click", function () {
// showLoaderScreen();
// setTimeout(function () {
// hideLoaderScreen();
// window.open('road-items.html', '_self');
// }, 2000);
// saveAllInputBox();
// var formData = new FormData();
// formData.append('source-coordinates', [sourceLat, sourceLng]);
// formData.append('dest-coordinates', [destLat, destLng]);
// formData.append('item', selectedItem);
// formData.append('sub-item', selectedSubItems);
// if (subItemsData.length)
// formData.append('sub-items-data', JSON.stringify(subItemsData));
// formData.append('files', $('input[name=modalUpFile]')[0].files);
// console.log(JSON.stringify(subItemsData));
// $.ajax({
// url: '',
// type: 'POST',
// data: formData,
// cache: false,
// contentType: false,
// processData: false,
// success: function (result) {
// console.log(result);
// hideLoaderScreen();
// window.open('road-items.html', '_self');
// },
// error: function (error) {
// console.log(error);
// hideLoaderScreen();
// }
// });
$("#uploadroaditem").modal("hide");
submitFormInput[selectedItemCount].data = subItemsData;
subItemsData = {};
selectedItemCount++;
//console.log(submitFormInput);
$(".add-pins").show("slow");
});
// function saveAllInputBox() {
// submitFormInput['roadSourceCord'] = [
// sourceLat,
// sourceLng
// ];
// submitFormInput['roadDestCord'] = [
// destLat,
// destLng
// ];
// submitFormInput['roadTotalDistance'] = saveTotalDistance;
// submitFormInput['roadSelectedItem'] = selectedItem;
// submitFormInput['roadSubItemsData'] = subItemsData;
// submitFormInput['roadUploadedFiles'] = [];
// if ($('input[name=modalUpFile]')[0].files.length > 0) {
// for (let i = 0; i < $('input[name=modalUpFile]')[0].files.length; i++) {
// submitFormInput['roadUploadedFiles'][i] = $('input[name=modalUpFile]')[0].files[i].name;
// }
// }
// console.log($('input[name=modalUpFile]')[0].files);
// }
$(document).ready(function () {
$("#plateModal .modal-title").html("ثبت گزارش راهداری");
$(".plate-container").append(
'\
<div class="car-plate-container row">\
<p class="plate-info-text">برای ورود لطفا شماره پلاک ماشین یا شماره موبایل خود را وارد کنید.</p>\
<label class="col-md-4">شماره پلاک:</label>\
<div class="car-plate col-md-8">\
<img src="../dist/images/car-sign.jpg">\
<input id="first_part" name="first_part" type="tel" maxlength="2" step="1" value=""\
inputmode="numeric" tabindex="2" dir="ltr" class="car-plate-input1" pattern="d{2}" required>\
<input id="second_part" name="second_part" type="tel" maxlength="3" step="1" value=""\
inputmode="numeric" tabindex="3" dir="ltr" class="car-plate-input2" pattern="d{3}" required>\
<div class="plate-alphabet">\
<select id="plate-alphabet" name="alphabet" tabindex="2" class="plate-select">\
<option value="01">الف</option>\
<option value="02">ب</option>\
<option value="03">پ</option>\
<option value="04">ت</option>\
<option value="05">ث</option>\
<option value="06">ج</option>\
<option value="07">چ</option>\
<option value="08">ح</option>\
<option value="09">خ</option>\
<option value="10">د</option>\
<option value="11">ذ</option>\
<option value="12">ر</option>\
<option value="13">ز</option>\
<option value="14">ژ</option>\
<option value="15">س</option>\
<option value="16">ش</option>\
<option value="17">ص</option>\
<option value="18">ض</option>\
<option value="19">ط</option>\
<option value="20">ظ</option>\
<option value="21">ع</option>\
<option value="22">غ</option>\
<option value="23">ف</option>\
<option value="24">ق</option>\
<option value="25">ک</option>\
<option value="26">گ</option>\
<option value="27">ل</option>\
<option value="28">م</option>\
<option value="29">ن</option>\
<option value="30">و</option>\
<option value="31">ه</option>\
<option value="32">ی</option>\
</select>\
</div>\
<input id="state_code" name="state_code" type="tel" maxlength="2" step="1" value=""\
inputmode="numeric" tabindex="4" dir="ltr" class="car-plate-input3" pattern="d{2}" required>\
</div>\
</div>\
<div class="car-plate-container row">\
<label class="col-md-4">شماره تلفن:</label>\
<div class="col-md-8">\
<input type="tel" maxlength="11" step="1" value="" inputmode="numeric" tabindex="5"\
class="phone-number-input" id="phone-number" required>\
</div>\
</div>\
<div class="alert alert-danger error-alert" role="alert">\
لطفا شماره پلاک یا موبایل خود را وارد کنید\
</div>\
'
);
//$('#plateModal').modal({ backdrop: 'static', keyboard: false });
//$('#plateModal').modal('show');
});
$("#plateModal .btn-next").on("click", function () {
let plateFirstPartInput = $("#first_part").val();
let plateAlphabetInput = $("#plate-alphabet").find(":selected").val();
let plateSecondPartInput = $("#second_part").val();
let plateStateCodeInput = $("#state_code").val();
let phoneNumberInput = $("#phone-number").val();
if (
plateFirstPartInput == "" ||
plateSecondPartInput == "" ||
plateStateCodeInput == ""
) {
if (phoneNumberInput == "") {
$(".error-alert").show("slow");
} else {
// Get phone number
phoneNumber = phoneNumberInput;
$("#plateModal").modal("hide");
}
} else {
$(".error-alert").hide("slow");
// Get plate number
plateFirstPart = plateFirstPartInput;
plateAlphabet = plateAlphabetInput;
plateSecondPart = plateSecondPartInput;
plateStateCode = plateStateCodeInput;
$("#plateModal").modal("hide");
}
});
function showLoaderScreen() {
$(".starter-loader-container").css("display", "flex").hide().fadeIn();
}
function hideLoaderScreen() {
$(".starter-loader-container").fadeOut();
}