new Vue({
el: "#js-calculator",
data: {
readyMixed: [
{
mark: "Ð’7,5",
params: "M100 П3 F50 W2",
types: [
{ type: "gravel", value: "", cost: 2250 },
{ type: "granite", value: "", cost: 2450 }
]
},
{
mark: "Ð’12,5",
params: "М150 П3 F50 W4",
types: [
{ type: "gravel", value: "", cost: 2450 },
{ type: "granite", value: "", cost: 2600 }
]
},
{
mark: "Ð’15",
params: "М200 П3 F100 W6",
types: [
{ type: "gravel", value: "", cost: 2550 },
{ type: "granite", value: "", cost: 2700 }
]
},
{
mark: "Ð’20",
params: "М250 П4 F200 W8",
types: [
{ type: "gravel", value: "", cost: 2650 },
{ type: "granite", value: "", cost: 2850 }
]
},
{
mark: "Ð’22,5",
params: "М300 П4 F200 W6",
types: [
{ type: "gravel", value: "", cost: 2700 },
{ type: "granite", value: "", cost: 2950 }
]
},
{
mark: "Ð’25",
params: "M350 П4 F300 W8",
types: [
{ type: "gravel", value: "", cost: 2800 },
{ type: "granite", value: "", cost: 3200 }
]
},
{
mark: "Ð’30",
params: "М400 П4 F300 W10",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 3350 }
]
},
{
mark: "Ð’35",
params: "М450 П4 F300 W12",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 3500 }
]
},
{
mark: "Ð’40",
params: "М550 П4 F300 W12",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 3850 }
]
},
{
mark: "Ð’45",
params: "М600 П4 F300 W12",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 4550 }
]
},
{
mark: "Ð’60",
params: "М800 П4 F300 W14",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 5450 }
]
}
],
lean: [
{ mark: "M100", types: [{ type: "any", value: "", cost: 2250 }] },
{ mark: "M150", types: [{ type: "any", value: "", cost: 2450 }] },
{ mark: "M200", types: [{ type: "any", value: "", cost: 2550 }] },
{ mark: "M250", types: [{ type: "any", value: "", cost: 2650 }] },
{ mark: "M300", types: [{ type: "any", value: "", cost: 2700 }] }
],
expanded: [
{ mark: "M50", types: [{ type: "any", value: "", cost: 2250 }] },
{ mark: "M100", types: [{ type: "any", value: "", cost: 2450 }] },
{ mark: "M150", types: [{ type: "any", value: "", cost: 2550 }] },
{ mark: "M200", types: [{ type: "any", value: "", cost: 2650 }] },
{ mark: "M300", types: [{ type: "any", value: "", cost: 2700 }] }
],
solution: [
{ mark: "M100", types: [{ type: "any", value: "", cost: 2250 }] },
{ mark: "M150", types: [{ type: "any", value: "", cost: 2450 }] },
{ mark: "M200", types: [{ type: "any", value: "", cost: 2550 }] },
{ mark: "M250", types: [{ type: "any", value: "", cost: 2650 }] }
],
delivery: [
{ text: "до 5 км", cost: "300 руб / m3" },
{ text: "до 5-10 км", cost: "350 руб / m3" },
{ text: "до 10-15 км", cost: "400 руб / m3" },
{ text: "до 15-20 км", cost: "450 руб / m3" },
{ text: "до 20-25 км", cost: "500 руб / m3" },
{ text: "до 25-30 км", cost: "550 руб / m3" }
],
result: 0
},
computed: {
currentTabData: function() {
return this.tabs[this.currentTabIndex].data;
},
currentTab: function() {
return this.tabs[this.currentTabIndex];
}
},
methods: {
valueUpdated: function() {
function t(t) {
t.forEach(function(t) {
t.types.forEach(function(t) {
console.log(t.value),
t.value > 0 &&
((i.value += t.value), (i.result += t.cost * t.value));
});
});
}
var i = { value: 0, result: 0 };
t(this.readyMixed),
t(this.lean),
t(this.expanded),
t(this.solution),
i.value > 9 && (i.result = parseInt(i.result / 100 * 95)),
(this.result = i.result);
}
}
}),
$('a[href*="#"]')
.not('[href="#"]')
.not('[href="#0"]')
.click(function(t) {
if (
location.pathname.replace(/^\//, "") ==
this.pathname.replace(/^\//, "") &&
location.hostname == this.hostname
) {
var i = $(this.hash);
(i = i.length ? i : $("[name=" + this.hash.slice(1) + "]")).length &&
(t.preventDefault(),
$("html, body").animate(
{ scrollTop: i.offset().top },
1e3,
function() {
var t = $(i);
if ((t.focus(), t.is(":focus"))) return !1;
t.attr("tabindex", "-1"), t.focus();
}
));
}
}),
$("#bg-modal").on("click", function() {
$("#bg-modal").fadeOut(300), $(".modal").fadeOut(300);
}),
$("[data-open]").on("click", function() {
openModal($(this).attr("data-open"));
}),
$("[data-close]").on("click", function(t) {
closeModal($(this).attr("data-close"));
}),
$("form").submit(function(t) {
t.preventDefault();
var e = $(this),
o = e.serializeArray(),
s = {},
n = e.find('[data-req="true"]'),
r = !0;
for (i = 0; i < o.length; i++) s[o[i].name] = o[i].value;
if (
($.each(n, function(t, i) {
var e = (i = $(i)).attr("name");
"" == s[e] || null == s[e]
? (i.addClass("js-error"), console.log(e), (r = !1))
: i.removeClass("js-error");
}),
r)
)
return (
console.log("Send"),
(cleararray = e.find('[data-clear="true"]')),
$.each(cleararray, function(t, i) {
$(i).val("");
}),
$.ajax(
{
method: "post",
url: "php/send.php",
data: o,
error: function(t, i, e) {
console.log(t.responseText + "|\n" + i + "|\n" + e);
}
},
"json"
),
$(".modal").fadeOut(300),
openModal("#thx"),
!1
);
}),
new Vue({
el: "#js-calculator",
data: {
readyMixed: [
{
mark: "Ð’7,5",
params: "M100 П3 F50 W2",
types: [
{ type: "gravel", value: "", cost: 2250 },
{ type: "granite", value: "", cost: 2450 }
]
},
{
mark: "Ð’12,5",
params: "М150 П3 F50 W4",
types: [
{ type: "gravel", value: "", cost: 2450 },
{ type: "granite", value: "", cost: 2600 }
]
},
{
mark: "Ð’15",
params: "М200 П3 F100 W6",
types: [
{ type: "gravel", value: "", cost: 2550 },
{ type: "granite", value: "", cost: 2700 }
]
},
{
mark: "Ð’20",
params: "М250 П4 F200 W8",
types: [
{ type: "gravel", value: "", cost: 2650 },
{ type: "granite", value: "", cost: 2850 }
]
},
{
mark: "Ð’22,5",
params: "М300 П4 F200 W6",
types: [
{ type: "gravel", value: "", cost: 2700 },
{ type: "granite", value: "", cost: 2950 }
]
},
{
mark: "Ð’25",
params: "M350 П4 F300 W8",
types: [
{ type: "gravel", value: "", cost: 2800 },
{ type: "granite", value: "", cost: 3200 }
]
},
{
mark: "Ð’30",
params: "М400 П4 F300 W10",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 3350 }
]
},
{
mark: "Ð’35",
params: "М450 П4 F300 W12",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 3500 }
]
},
{
mark: "Ð’40",
params: "М550 П4 F300 W12",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 3850 }
]
},
{
mark: "Ð’45",
params: "М600 П4 F300 W12",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 4550 }
]
},
{
mark: "Ð’60",
params: "М800 П4 F300 W14",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 5450 }
]
}
],
lean: [
{ mark: "M100", types: [{ type: "any", value: "", cost: 2250 }] },
{ mark: "M150", types: [{ type: "any", value: "", cost: 2450 }] },
{ mark: "M200", types: [{ type: "any", value: "", cost: 2550 }] },
{ mark: "M250", types: [{ type: "any", value: "", cost: 2650 }] },
{ mark: "M300", types: [{ type: "any", value: "", cost: 2700 }] }
],
expanded: [
{ mark: "M50", types: [{ type: "any", value: "", cost: 2250 }] },
{ mark: "M100", types: [{ type: "any", value: "", cost: 2450 }] },
{ mark: "M150", types: [{ type: "any", value: "", cost: 2550 }] },
{ mark: "M200", types: [{ type: "any", value: "", cost: 2650 }] },
{ mark: "M300", types: [{ type: "any", value: "", cost: 2700 }] }
],
solution: [
{ mark: "M100", types: [{ type: "any", value: "", cost: 2250 }] },
{ mark: "M150", types: [{ type: "any", value: "", cost: 2450 }] },
{ mark: "M200", types: [{ type: "any", value: "", cost: 2550 }] },
{ mark: "M250", types: [{ type: "any", value: "", cost: 2650 }] }
],
delivery: [
{ text: "до 5 км", cost: "300 руб / m3" },
{ text: "до 5-10 км", cost: "350 руб / m3" },
{ text: "до 10-15 км", cost: "400 руб / m3" },
{ text: "до 15-20 км", cost: "450 руб / m3" },
{ text: "до 20-25 км", cost: "500 руб / m3" },
{ text: "до 25-30 км", cost: "550 руб / m3" }
],
result: 0
},
computed: {
currentTabData: function() {
return this.tabs[this.currentTabIndex].data;
},
currentTab: function() {
return this.tabs[this.currentTabIndex];
}
},
methods: {
valueUpdated: function() {
function t(t) {
t.forEach(function(t) {
t.types.forEach(function(t) {
console.log(t.value),
t.value > 0 &&
((i.value += t.value), (i.result += t.cost * t.value));
});
});
}
var i = { value: 0, result: 0 };
t(this.readyMixed),
t(this.lean),
t(this.expanded),
t(this.solution),
i.value > 9 && (i.result = parseInt(i.result / 100 * 95)),
(this.result = i.result);
}
}
}),
$('a[href*="#"]')
.not('[href="#"]')
.not('[href="#0"]')
.click(function(t) {
if (
location.pathname.replace(/^\//, "") ==
this.pathname.replace(/^\//, "") &&
location.hostname == this.hostname
) {
var i = $(this.hash);
(i = i.length ? i : $("[name=" + this.hash.slice(1) + "]")).length &&
(t.preventDefault(),
$("html, body").animate(
{ scrollTop: i.offset().top },
1e3,
function() {
var t = $(i);
if ((t.focus(), t.is(":focus"))) return !1;
t.attr("tabindex", "-1"), t.focus();
}
));
}
}),
$("#bg-modal").on("click", function() {
$("#bg-modal").fadeOut(300), $(".modal").fadeOut(300);
}),
$("[data-open]").on("click", function() {
openModal($(this).attr("data-open"));
}),
$("[data-close]").on("click", function(t) {
closeModal($(this).attr("data-close"));
}),
$("form").submit(function(t) {
t.preventDefault();
var e = $(this),
o = e.serializeArray(),
s = {},
n = e.find('[data-req="true"]'),
r = !0;
for (i = 0; i < o.length; i++) s[o[i].name] = o[i].value;
if (
($.each(n, function(t, i) {
var e = (i = $(i)).attr("name");
"" == s[e] || null == s[e]
? (i.addClass("js-error"), console.log(e), (r = !1))
: i.removeClass("js-error");
}),
r)
)
return (
console.log("Send"),
(cleararray = e.find('[data-clear="true"]')),
$.each(cleararray, function(t, i) {
$(i).val("");
}),
$.ajax(
{
method: "post",
url: "php/send.php",
data: o,
error: function(t, i, e) {
console.log(t.responseText + "|\n" + i + "|\n" + e);
}
},
"json"
),
$(".modal").fadeOut(300),
openModal("#thx"),
!1
);
}),
new Vue({
el: "#js-calculator",
data: {
readyMixed: [
{
mark: "Ð’7,5",
params: "M100 П3 F50 W2",
types: [
{ type: "gravel", value: "", cost: 2250 },
{ type: "granite", value: "", cost: 2450 }
]
},
{
mark: "Ð’12,5",
params: "М150 П3 F50 W4",
types: [
{ type: "gravel", value: "", cost: 2450 },
{ type: "granite", value: "", cost: 2600 }
]
},
{
mark: "Ð’15",
params: "М200 П3 F100 W6",
types: [
{ type: "gravel", value: "", cost: 2550 },
{ type: "granite", value: "", cost: 2700 }
]
},
{
mark: "Ð’20",
params: "М250 П4 F200 W8",
types: [
{ type: "gravel", value: "", cost: 2650 },
{ type: "granite", value: "", cost: 2850 }
]
},
{
mark: "Ð’22,5",
params: "М300 П4 F200 W6",
types: [
{ type: "gravel", value: "", cost: 2700 },
{ type: "granite", value: "", cost: 2950 }
]
},
{
mark: "Ð’25",
params: "M350 П4 F300 W8",
types: [
{ type: "gravel", value: "", cost: 2800 },
{ type: "granite", value: "", cost: 3200 }
]
},
{
mark: "Ð’30",
params: "М400 П4 F300 W10",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 3350 }
]
},
{
mark: "Ð’35",
params: "М450 П4 F300 W12",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 3500 }
]
},
{
mark: "Ð’40",
params: "М550 П4 F300 W12",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 3850 }
]
},
{
mark: "Ð’45",
params: "М600 П4 F300 W12",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 4550 }
]
},
{
mark: "Ð’60",
params: "М800 П4 F300 W14",
types: [
{ type: "gravel" },
{ type: "granite", value: "", cost: 5450 }
]
}
],
lean: [
{ mark: "M100", types: [{ type: "any", value: "", cost: 2250 }] },
{ mark: "M150", types: [{ type: "any", value: "", cost: 2450 }] },
{ mark: "M200", types: [{ type: "any", value: "", cost: 2550 }] },
{ mark: "M250", types: [{ type: "any", value: "", cost: 2650 }] },
{ mark: "M300", types: [{ type: "any", value: "", cost: 2700 }] }
],
expanded: [
{ mark: "M50", types: [{ type: "any", value: "", cost: 2250 }] },
{ mark: "M100", types: [{ type: "any", value: "", cost: 2450 }] },
{ mark: "M150", types: [{ type: "any", value: "", cost: 2550 }] },
{ mark: "M200", types: [{ type: "any", value: "", cost: 2650 }] },
{ mark: "M300", types: [{ type: "any", value: "", cost: 2700 }] }
],
solution: [
{ mark: "M100", types: [{ type: "any", value: "", cost: 2250 }] },
{ mark: "M150", types: [{ type: "any", value: "", cost: 2450 }] },
{ mark: "M200", types: [{ type: "any", value: "", cost: 2550 }] },
{ mark: "M250", types: [{ type: "any", value: "", cost: 2650 }] }
],
delivery: [
{ text: "до 5 км", cost: "300 руб / m3" },
{ text: "до 5-10 км", cost: "350 руб / m3" },
{ text: "до 10-15 км", cost: "400 руб / m3" },
{ text: "до 15-20 км", cost: "450 руб / m3" },
{ text: "до 20-25 км", cost: "500 руб / m3" },
{ text: "до 25-30 км", cost: "550 руб / m3" }
],
result: 0
},
computed: {
currentTabData: function() {
return this.tabs[this.currentTabIndex].data;
},
currentTab: function() {
return this.tabs[this.currentTabIndex];
}
},
methods: {
valueUpdated: function() {
function t(t) {
t.forEach(function(t) {
t.types.forEach(function(t) {
console.log(t.value),
t.value > 0 &&
((i.value += t.value), (i.result += t.cost * t.value));
});
});
}
var i = { value: 0, result: 0 };
t(this.readyMixed),
t(this.lean),
t(this.expanded),
t(this.solution),
i.value > 9 && (i.result = parseInt(i.result / 100 * 95)),
(this.result = i.result);
}
}
}),
$('a[href*="#"]')
.not('[href="#"]')
.not('[href="#0"]')
.click(function(t) {
if (
location.pathname.replace(/^\//, "") ==
this.pathname.replace(/^\//, "") &&
location.hostname == this.hostname
) {
var i = $(this.hash);
(i = i.length ? i : $("[name=" + this.hash.slice(1) + "]")).length &&
(t.preventDefault(),
$("html, body").animate(
{ scrollTop: i.offset().top },
1e3,
function() {
var t = $(i);
if ((t.focus(), t.is(":focus"))) return !1;
t.attr("tabindex", "-1"), t.focus();
}
));
}
}),
$("#bg-modal").on("click", function() {
$("#bg-modal").fadeOut(300), $(".modal").fadeOut(300);
}),
$("[data-open]").on("click", function() {
openModal($(this).attr("data-open"));
}),
$("[data-close]").on("click", function(t) {
closeModal($(this).attr("data-close"));
}),
$("form").submit(function(t) {
t.preventDefault();
var e = $(this),
o = e.serializeArray(),
s = {},
n = e.find('[data-req="true"]'),
r = !0;
for (i = 0; i < o.length; i++) s[o[i].name] = o[i].value;
if (
($.each(n, function(t, i) {
var e = (i = $(i)).attr("name");
"" == s[e] || null == s[e]
? (i.addClass("js-error"), console.log(e), (r = !1))
: i.removeClass("js-error");
}),
r)
)
return (
console.log("Send"),
(cleararray = e.find('[data-clear="true"]')),
$.each(cleararray, function(t, i) {
$(i).val("");
}),
$.ajax(
{
method: "post",
url: "php/send.php",
data: o,
error: function(t, i, e) {
console.log(t.responseText + "|\n" + i + "|\n" + e);
}
},
"json"
),
$(".modal").fadeOut(300),
openModal("#thx"),
!1
);
}),
<script type="text/javascript">
window.onload = function () {
var city = ymaps.geolocation.city;
if (city == 'Наро-фоминск') {
jQuery("#user-city").text('НАРО-ФОМИНСКИЙ РАЙОН');
} else if (city == 'Апрелевка') {
jQuery("#user-city").text('Апрелевка');
} else if (city == 'Балашиха') {
jQuery("#user-city").text('Балашиха');
} else if (city == 'Бронницы') {
jQuery("#user-city").text('Бронницы');
} else if (city == 'Видное') {
jQuery("#user-city").text('Видное');
} else if (city == 'Дзержинский') {
jQuery("#user-city").text('Дзержинский');
} else if (city == 'Дмитров') {
jQuery("#user-city").text('Дмитров');
} else if (city == 'Долгопрудный') {
jQuery("#user-city").text('Долгопрудный');
} else if (city == 'Домодедово') {
jQuery("#user-city").text('Домодедово');
} else if (city == 'Железнодорожный') {
jQuery("#user-city").text('Железнодорожный');
} else if (city == 'Жуковски') {
jQuery("#user-city").text('Жуковский');
} else if (city == 'Звенигород') {
jQuery("#user-city").text('Звенигород');
} else if (city == 'Ивантеевка') {
jQuery("#user-city").text('Ивантеевка');
} else if (city == 'Истра') {
jQuery("#user-city").text('Истра');
} else if (city == 'Клин') {
jQuery("#user-city").text('Клин');
} else if (city == 'Коломна') {
jQuery("#user-city").text('Коломна');
} else if (city == 'Королев') {
jQuery("#user-city").text('Королев');
} else if (city == 'Котельники') {
jQuery("#user-city").text('Котельники');
} else if (city == 'Красноармейск') {
jQuery("#user-city").text('Красноармейск');
} else if (city == 'Красногорск') {
jQuery("#user-city").text('Красногорск');
} else if (city == 'Лобня') {
jQuery("#user-city").text('Лобня');
} else if (city == 'Лосино-Петровский') {
jQuery("#user-city").text('Лосино-Петровский');
} else if (city == 'Луховицы') {
jQuery("#user-city").text('Луховицы');
} else if (city == 'Лыткарино') {
jQuery("#user-city").text('Лыткарино');
} else if (city == 'Люберцы') {
jQuery("#user-city").text('Люберцы');
} else if (city == 'Мытищи') {
jQuery("#user-city").text('Мытищи');
} else if (city == 'Ногинск') {
jQuery("#user-city").text('Ногинск');
} else if (city == 'Одинцово') {
jQuery("#user-city").text('Одинцово');
} else if (city == 'Павловский-Посад') {
jQuery("#user-city").text('Павловский-Посад');
} else if (city == 'Подольск') {
jQuery("#user-city").text('Подольс');
} else if (city == 'Пушкино') {
jQuery("#user-city").text('Пушкино');
} else if (city == 'Раменское') {
jQuery("#user-city").text('Раменское');
} else if (city == 'Реутов') {
jQuery("#user-city").text('Реутов');
} else if (city == 'Серпухов') {
jQuery("#user-city").text('Серпухов');
} else if (city == 'Солнечногорск') {
jQuery("#user-city").text('Солнечногорск');
} else if (city == 'Фрязино') {
jQuery("#user-city").text('Фрязино');
} else if (city == 'Химки') {
jQuery("#user-city").text('Химки');
} else if (city == 'Чехов') {
jQuery("#user-city").text('Чехов');
} else if (city == 'Щелково') {
jQuery("#user-city").text('Щелково');
} else if (city == 'Электрогорск') {
jQuery("#user-city").text('Электрогорск');
} else if (city == 'Электросталь') {
jQuery("#user-city").text('Электросталь');
} else if (city == 'Очаковское шоссе') {
jQuery("#user-city").text('Очаковское шоссе');
} else {
jQuery("#user-city").text('МОСКВА');
coords = [55.763833, 37.620393];
coords_two = [55.824617, 37.609082];
}
ymaps.ready(init);
function init() {
var myMap;
myMap = new ymaps.Map("map", {
center: coords,
zoom: 8
});
myMap.behaviors.disable('scrollZoom');
myMap.controls.add("zoomControl", {
position: { top: 15, left: 15 }
});
var myPlacemark = new ymaps.Placemark(coords, {
// Чтобы балун и хинт открывались на метке, необходимо задать ей определенные свойства.
balloonContentBody: "Содержимое <em>балуна</em> метки",
});
myMap.geoObjects.add(myPlacemark);
var myPlacemark = new ymaps.Placemark(coords_two, {
// Чтобы балун и хинт открывались на метке, необходимо задать ей определенные свойства.
balloonContentBody: "Содержимое <em>балуна</em> метки",
});
myMap.geoObjects.add(myPlacemark);
var circle = new ymaps.Circle([coords, 50000], {}, {
geodesic: true,
fillColor: "#DB709377",
strokeColor: "#990066",
strokeOpacity: 0.8,
strokeWidth: 2
});
myMap.geoObjects.add(circle);
}
}
</script>