-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzahialga.html
More file actions
282 lines (246 loc) · 9 KB
/
zahialga.html
File metadata and controls
282 lines (246 loc) · 9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html>
<html lang="mn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Захиалга хийх форм, НӨАТ авах төрөл, төлбөрийн сонголт, сагс дахь бүтээгдэхүүн">
<title>Захиалга</title>
</head>
<body>
<header>
<a href="home.html">
<img src="/webproject-/image/1.png" alt="Company Logo" style="width: 50px; height: 50px;">
</a>
<nav>
<a href="home.html">Нүүр</a>
<a href="app.html">Бүтээгдэхүүн</a>
<a href="salbar.html">Салбарын мэдээлэл</a>
<a href="login.html">Нэвтрэх</a>
</nav>
<div class="iconcard">
<svg class="w-6 h-6 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 10V6a3 3 0 0 1 3-3v0a3 3 0 0 1 3 3v4m3-2 .917 11.923A1 1 0 0 1 17.92 21H6.08a1 1 0 0 1-.997-1.077L6 8h12Z"/>
</svg>
<span id="cart-counter">0</span>
</div>
</header>
<section class="main-container">
<!-- Зүүн багана -->
<section class="left-column">
<!-- Захиалагчийн мэдээлэл -->
<section class="customer-info">
<h3>Захиалагчийн мэдээлэл</h3>
<div class="grid-container">
<article>
<label for="name">Овог, Нэр:</label>
<input type="text" id="name" name="name" placeholder="Овог, Нэрээ оруулна уу" required>
</article>
<article>
<label for="email">И-мэйл хаяг:</label>
<input type="email" id="email" name="email" placeholder="И-мэйл хаягаа оруулна уу" required>
</article>
<article>
<label for="phone1">Утасны дугаар 1:</label>
<input type="tel" id="phone1" name="phone1" placeholder="Утасны дугаараа оруулна уу" required>
</article>
<article>
<label for="phone2">Утасны дугаар 2:</label>
<input type="tel" id="phone2" name="phone2" placeholder="Хоёр дахь дугаараа оруулна уу (заавал биш)">
</article>
</div>
</section>
<!-- НӨАТ авах төрөл -->
<section class="noat">
<label for="vat">НӨАТ авах төрөл:</label>
<select id="vat" name="vat" required>
<option value="individual">Хувь хүн</option>
<option value="organization">Байгууллага</option>
</select>
</section>
<!-- Салбар сонгох -->
<section class="branch-selection">
<article>
<h3>Салбар сонгох</h3>
<label for="salbar">Салбар сонгох:</label>
<select id="salbar" name="salbar" required>
<option value="salbar1">Салбар 1</option>
<option value="salbar2">Салбар 2</option>
<option value="salbar3">Салбар 3</option>
<option value="salbar4">Салбар 4</option>
<option value="salbar5">Салбар 5</option>
</select>
</article>
</section>
<!-- Төлбөр төлөх хэлбэр -->
<section class="payment-methods">
<article>
<h3>Төлбөр төлөх хэлбэр</h3>
<label for="payment-cash">
<input type="radio" id="payment-cash" name="payment" value="cash" required> Бэлэн мөнгө
</label>
</article>
<article>
<label for="payment-card">
<input type="radio" id="payment-card" name="payment" value="card" required> Карт (Credit/Debit)
</label>
</article>
</section>
</section>
<!-- Баруун багана -->
<section class="right-column">
<!-- Нэмэлт тэмдэглэл -->
<section class="additional-notes">
<article>
<h3>Нэмэлт тэмдэглэл</h3>
<label for="notes">Тэмдэглэл:</label>
<textarea id="notes" name="notes" placeholder="Захиалгатай холбоотой мэдээлэл оруулна уу" rows="4"></textarea>
</article>
</section>
<zahialga-component></zahialga-component>
<!-- Үйлчилгээний нөхцөл зөвшөөрөх -->
<section class="terms-and-conditions">
<input type="checkbox" id="terms" name="terms" required>
<label for="terms">Би <a href="uilchilgee.html">үйлчилгээний нөхцөлийг</a> хүлээн зөвшөөрч байна.</label>
<button type="button" id="order-button">Захиалах</button>
</section>
</section>
</section>
</body>
</html>
<script type="module">
import "./components/zahialga-component.js"
document.getElementById('order-button').addEventListener('click', validateForm);
function validateForm() {
const name = document.getElementById('name').value;
const email = document.getElementById('email').value;
const phone1 = document.getElementById('phone1').value;
const vat = document.getElementById('vat').value;
const salbar = document.getElementById('salbar').value;
const payment = document.querySelector('input[name="payment"]:checked');
const terms = document.getElementById('terms').checked;
if (name === "" || email === "" || phone1 === "" || vat === "" || salbar === "" || !payment || !terms) {
alert("Та бүх шаардлагатай мэдээллийг оруулна уу.");
return false;
}
alert("Захиалга амжилттай илгээгдлээ!");
window.location.href = "zahialganext.html";
return true;
}
</script>
<style>
/* zahialga html iin css batmyagmar */
:root {
--main-bg-color: #ffffff;
--secondary-bg-color: #f9f9f9;
--border-color: #ddd;
--primary-color: #D8A7A1;
--text-color: #333;
--hover-color: #c5827a;
--shadow-color: rgba(0, 0, 0, 0.05);
}
body {
font-family: Arial, sans-serif;
background-color: var(--main-bg-color);
color: var(--text-color);
margin: 0;
padding: 0px;
}
.main-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 30px; /* Багануудын хоорондох зайг нэмэгдүүлсэн */
}
section {
background-color: var(--secondary-bg-color);
border: none; /* Хүрээг устгасан */
border-radius: 8px;
padding: 20px;
box-shadow: 0 1px 3px var(--shadow-color); /* Сүүдрийг зөөлөн болгосон */
}
h3 {
color: var(--primary-color);
margin: 0 0 15px 0;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
width: 100%;
padding: 10px;
border: 1px solid #eee; /* Илүү гэрэлтэй хүрээ */
border-radius: 4px;
margin-bottom: 15px;
transition: border-color 0.3s;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
border-color: var(--primary-color);
}
button {
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 4px;
padding: 10px 15px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: var(--hover-color);
}
.grid-container {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
}
article {
padding: 15px;
}
.terms-and-conditions {
display: flex;
align-items: center;
margin-top: 20px;
margin-bottom: 20px; /* Доод талд нэмэлт зай нэмсэн */
}
.terms-and-conditions input {
margin-right: 10px;
}
.terms-and-conditions button {
margin-left: auto; /* Бутлуурын зүүн талд зайг нэмэх */
padding: 10px 20px; /* Товчны доторх зайг нэмэгдүүлсэн */
font-size: 16px; /* Товчны текстийн хэмжээг нэмэгдүүлсэн */
}
@media (max-width: 768px) {
.main-container {
grid-template-columns: 1fr;
}
}
header {
width: 100%;
padding: 0px;
background-color: #D8A7A1;
display: flex;
justify-content: space-around;
align-items: center;
color: #3B1F1A;
font-weight: italic;
font-family: cursive;
}
header nav a {
margin: 0 15px;
color: #3B1F1A;
text-decoration: none;
font-size: 18px;
}
header nav a:hover {
color: #7B4B47;
}
</style>