Add 2 files
Browse files- index.html +746 -162
- prompts.txt +1 -0
index.html
CHANGED
|
@@ -29,6 +29,15 @@
|
|
| 29 |
-webkit-appearance: none;
|
| 30 |
margin: 0;
|
| 31 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
</style>
|
| 33 |
</head>
|
| 34 |
<body class="bg-gray-50 min-h-screen">
|
|
@@ -70,6 +79,16 @@
|
|
| 70 |
<label class="block text-sm font-medium text-gray-700 mb-1">Project Notes</label>
|
| 71 |
<textarea id="projectNotes" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" rows="3" placeholder="Any special considerations..."></textarea>
|
| 72 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
</div>
|
| 74 |
|
| 75 |
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
|
|
@@ -162,11 +181,23 @@
|
|
| 162 |
</div>
|
| 163 |
<button onclick="calculateLaminate()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 164 |
<div id="laminateResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
</div>
|
| 171 |
</div>
|
| 172 |
|
|
@@ -174,75 +205,48 @@
|
|
| 174 |
<div class="tab-content hidden" id="flooring-tab">
|
| 175 |
<div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
|
| 176 |
<h3 class="font-bold text-lg text-gray-800 mb-3">Vinyl/Laminate Flooring</h3>
|
| 177 |
-
<
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
<input type="number" id="vinylTrips" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" value="1">
|
| 195 |
-
</div>
|
| 196 |
-
</div>
|
| 197 |
-
<div class="mt-3 space-y-2">
|
| 198 |
-
<label class="inline-flex items-center">
|
| 199 |
-
<input type="checkbox" id="vinylDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded" checked>
|
| 200 |
-
<span class="ml-2 text-sm text-gray-700">Include Demo</span>
|
| 201 |
-
</label>
|
| 202 |
-
<label class="inline-flex items-center">
|
| 203 |
-
<input type="checkbox" id="vinylUnderlayment" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
|
| 204 |
-
<span class="ml-2 text-sm text-gray-700">Underlayment Needed</span>
|
| 205 |
-
</label>
|
| 206 |
-
<label class="inline-flex items-center">
|
| 207 |
-
<input type="checkbox" id="vinylLeveling" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
|
| 208 |
-
<span class="ml-2 text-sm text-gray-700">Leveling Cement Needed</span>
|
| 209 |
-
</label>
|
| 210 |
-
</div>
|
| 211 |
-
<button onclick="calculateVinyl()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 212 |
-
<div id="vinylResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
| 213 |
-
<div class="flex justify-between">
|
| 214 |
-
<span class="font-medium">Estimated Cost:</span>
|
| 215 |
-
<span id="vinylCost" class="font-bold">$0.00</span>
|
| 216 |
-
</div>
|
| 217 |
-
</div>
|
| 218 |
</div>
|
| 219 |
|
| 220 |
<div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
|
| 221 |
<h3 class="font-bold text-lg text-gray-800 mb-3">Wood/Glue Down Flooring</h3>
|
| 222 |
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 223 |
<div>
|
| 224 |
-
<label class="block text-sm font-medium text-gray-700 mb
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 230 |
</div>
|
| 231 |
</div>
|
| 232 |
-
<div class="mt-3">
|
| 233 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label>
|
| 234 |
-
<input type="number" id="woodMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" value="4.50" step="0.01">
|
| 235 |
-
</div>
|
| 236 |
-
<div class="mt-3 space-y-2">
|
| 237 |
-
<label class="inline-flex items-center">
|
| 238 |
-
<input type="checkbox" id="woodDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded" checked>
|
| 239 |
-
<span class="ml-2 text-sm text-gray-700">Include Demo</span>
|
| 240 |
-
</label>
|
| 241 |
-
<label class="inline-flex items-center">
|
| 242 |
-
<input type="checkbox" id="woodLeveling" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
|
| 243 |
-
<span class="ml-2 text-sm text-gray-700">Leveling Cement Needed</span>
|
| 244 |
-
</label>
|
| 245 |
-
</div>
|
| 246 |
<button onclick="calculateWood()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 247 |
<div id="woodResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
| 248 |
<div class="flex justify-between">
|
|
@@ -252,35 +256,23 @@
|
|
| 252 |
</div>
|
| 253 |
</div>
|
| 254 |
|
| 255 |
-
<div class="calculator-card bg-gray-50 p
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
<label class="inline-flex items-center">
|
| 273 |
-
<input type="checkbox" id="carpetDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
|
| 274 |
-
<span class="ml-2 text-sm text-gray-700">Include Demo</span>
|
| 275 |
-
</label>
|
| 276 |
-
</div>
|
| 277 |
-
<button onclick="calculateCarpet()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 278 |
-
<div id="carpetResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
| 279 |
-
<div class="flex justify-between">
|
| 280 |
-
<span class="font-medium">Estimated Cost:</span>
|
| 281 |
-
<span id="carpetCost" class="font-bold">$0.00</span>
|
| 282 |
-
</div>
|
| 283 |
-
</div>
|
| 284 |
</div>
|
| 285 |
</div>
|
| 286 |
|
|
@@ -295,28 +287,23 @@
|
|
| 295 |
</div>
|
| 296 |
<div>
|
| 297 |
<label class="block text-sm font-medium text-gray-700 mb-1">Tile Cost ($/sqft)</label>
|
| 298 |
-
<input type="number" id="tileMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
<label class="inline-flex items-center ml-4">
|
| 316 |
-
<input type="radio" name="bathLocation" value="downstairs" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300">
|
| 317 |
-
<span class="ml-2 text-sm text-gray-700">Downstairs</span>
|
| 318 |
-
</label>
|
| 319 |
-
</div>
|
| 320 |
</div>
|
| 321 |
<button onclick="calculateTile()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 322 |
<div id="tileResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
|
@@ -347,8 +334,35 @@
|
|
| 347 |
<div id="backsplashResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
| 348 |
<div class="flex justify-between">
|
| 349 |
<span class="font-medium">Estimated Cost:</span>
|
| 350 |
-
<span id="
|
| 351 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 352 |
</div>
|
| 353 |
</div>
|
| 354 |
</div>
|
|
@@ -369,22 +383,28 @@
|
|
| 369 |
</div>
|
| 370 |
<div id="showerCustomSize" class="hidden">
|
| 371 |
<label class="block text-sm font-medium text-gray-700 mb-1">Dimensions (feet)</label>
|
| 372 |
-
<input type="text" id="showerDimensions" class="w-full px-3 py
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 388 |
</div>
|
| 389 |
<button onclick="calculateShower()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 390 |
<div id="showerResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
|
@@ -403,37 +423,45 @@
|
|
| 403 |
<span class="ml-2 text-sm text-gray-700">Standard Tub Surround</span>
|
| 404 |
</label>
|
| 405 |
</div>
|
| 406 |
-
<button onclick="calculateTub()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 412 |
</div>
|
| 413 |
</div>
|
| 414 |
|
| 415 |
<div class="calculator-card bg-gray-50 p-4 rounded-lg">
|
| 416 |
<h3 class="font-bold text-lg text-gray-800 mb-3">Shower Glass</h3>
|
| 417 |
-
<div class="grid grid
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
<span class="font-medium">Estimated Cost:</span>
|
| 435 |
-
<span id="glassCost" class="font-bold">$0.00</span>
|
| 436 |
-
</div>
|
| 437 |
</div>
|
| 438 |
</div>
|
| 439 |
</div>
|
|
@@ -454,7 +482,213 @@
|
|
| 454 |
</div>
|
| 455 |
<button onclick="calculateCabinet()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 456 |
<div id="cabinetResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
| 457 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 458 |
|
| 459 |
1. **每日费率选择**:
|
| 460 |
- $600/天(标准)
|
|
@@ -471,4 +705,354 @@
|
|
| 471 |
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 472 |
|
| 473 |
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您的需求进一步调整
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 474 |
</html>
|
|
|
|
| 29 |
-webkit-appearance: none;
|
| 30 |
margin: 0;
|
| 31 |
}
|
| 32 |
+
.profit-positive {
|
| 33 |
+
color: #10b981;
|
| 34 |
+
}
|
| 35 |
+
.profit-negative {
|
| 36 |
+
color: #ef4444;
|
| 37 |
+
}
|
| 38 |
+
.profit-neutral {
|
| 39 |
+
color: #6b7280;
|
| 40 |
+
}
|
| 41 |
</style>
|
| 42 |
</head>
|
| 43 |
<body class="bg-gray-50 min-h-screen">
|
|
|
|
| 79 |
<label class="block text-sm font-medium text-gray-700 mb-1">Project Notes</label>
|
| 80 |
<textarea id="projectNotes" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" rows="3" placeholder="Any special considerations..."></textarea>
|
| 81 |
</div>
|
| 82 |
+
<div class="mt-4 grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 83 |
+
<div>
|
| 84 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Contract Total ($)</label>
|
| 85 |
+
<input type="number" id="contractTotal" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total contract amount">
|
| 86 |
+
</div>
|
| 87 |
+
<div>
|
| 88 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Estimated Overhead (%)</label>
|
| 89 |
+
<input type="number" id="overheadPercent" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" value="15" placeholder="Overhead percentage">
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
</div>
|
| 93 |
|
| 94 |
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
|
|
|
|
| 181 |
</div>
|
| 182 |
<button onclick="calculateLaminate()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 183 |
<div id="laminateResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
| 184 |
+
极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 185 |
+
|
| 186 |
+
1. **每日费率选择**:
|
| 187 |
+
- $600/天(标准)
|
| 188 |
+
- $700/天(中等)
|
| 189 |
+
- $800/天(重体力劳动)
|
| 190 |
+
|
| 191 |
+
2. **额外选项**:
|
| 192 |
+
- 材料附加费(+15%)
|
| 193 |
+
- 重体力劳动附加费(+10%)
|
| 194 |
+
|
| 195 |
+
3. **计算功能**:
|
| 196 |
+
- 根据天数、费率选择和附加选项计算总成本
|
| 197 |
+
|
| 198 |
+
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 199 |
+
|
| 200 |
+
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您的需求进一步调整
|
| 201 |
</div>
|
| 202 |
</div>
|
| 203 |
|
|
|
|
| 205 |
<div class="tab-content hidden" id="flooring-tab">
|
| 206 |
<div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
|
| 207 |
<h3 class="font-bold text-lg text-gray-800 mb-3">Vinyl/Laminate Flooring</h3>
|
| 208 |
+
<极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 209 |
+
|
| 210 |
+
1. **每日费率选择**:
|
| 211 |
+
- $600/天(标准)
|
| 212 |
+
- $700/天(中等)
|
| 213 |
+
- $800/天(重体力劳动)
|
| 214 |
+
|
| 215 |
+
2. **额外选项**:
|
| 216 |
+
- 材料附加费(+15%)
|
| 217 |
+
- 重体力劳动附加费(+10%)
|
| 218 |
+
|
| 219 |
+
3. **计算功能**:
|
| 220 |
+
- 根据天数、费率选择和附加选项计算总成本
|
| 221 |
+
|
| 222 |
+
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 223 |
+
|
| 224 |
+
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您的需求进一步调整
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
</div>
|
| 226 |
|
| 227 |
<div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
|
| 228 |
<h3 class="font-bold text-lg text-gray-800 mb-3">Wood/Glue Down Flooring</h3>
|
| 229 |
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 230 |
<div>
|
| 231 |
+
<label class="block text-sm font-medium text-gray-700 mb极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 232 |
+
|
| 233 |
+
1. **每日费率选择**:
|
| 234 |
+
- $600/天(标准)
|
| 235 |
+
- $700/天(中等)
|
| 236 |
+
- $800/天(重体力劳动)
|
| 237 |
+
|
| 238 |
+
2. **额外选项**:
|
| 239 |
+
- 材料附加费(+15%)
|
| 240 |
+
- 重体力劳动附加费(+10%)
|
| 241 |
+
|
| 242 |
+
3. **计算功能**:
|
| 243 |
+
- 根据天数、费率选择和附加选项计算总成本
|
| 244 |
+
|
| 245 |
+
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 246 |
+
|
| 247 |
+
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您的需求进一步调整
|
| 248 |
</div>
|
| 249 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 250 |
<button onclick="calculateWood()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 251 |
<div id="woodResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
| 252 |
<div class="flex justify-between">
|
|
|
|
| 256 |
</div>
|
| 257 |
</div>
|
| 258 |
|
| 259 |
+
<div class="calculator-card bg-gray-50 p极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 260 |
+
|
| 261 |
+
1. **每日费率选择**:
|
| 262 |
+
- $600/天(标准)
|
| 263 |
+
- $700/天(中等)
|
| 264 |
+
- $800/天(重体力劳动)
|
| 265 |
+
|
| 266 |
+
2. **额外选项**:
|
| 267 |
+
- 材料附加费(+15%)
|
| 268 |
+
- 重体力劳动附加费(+10%)
|
| 269 |
+
|
| 270 |
+
3. **计算功能**:
|
| 271 |
+
- 根据天数、费率选择和附加选项计算总成本
|
| 272 |
+
|
| 273 |
+
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 274 |
+
|
| 275 |
+
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您的需求进一步调整
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
</div>
|
| 277 |
</div>
|
| 278 |
|
|
|
|
| 287 |
</div>
|
| 288 |
<div>
|
| 289 |
<label class="block text-sm font-medium text-gray-700 mb-1">Tile Cost ($/sqft)</label>
|
| 290 |
+
<input type="number" id="tileMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 291 |
+
|
| 292 |
+
1. **每日费率选择**:
|
| 293 |
+
- $600/天(标准)
|
| 294 |
+
- $700/天(中等)
|
| 295 |
+
- $800/天(重体力劳动)
|
| 296 |
+
|
| 297 |
+
2. **额外选项**:
|
| 298 |
+
- 材料附加费(+15%)
|
| 299 |
+
- 重体力劳动附加费(+10%)
|
| 300 |
+
|
| 301 |
+
3. **计算功能**:
|
| 302 |
+
- 根据天数、费率选择和附加选项计算总成本
|
| 303 |
+
|
| 304 |
+
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 305 |
+
|
| 306 |
+
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您的需求进一步调整
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
</div>
|
| 308 |
<button onclick="calculateTile()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 309 |
<div id="tileResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
|
|
|
| 334 |
<div id="backsplashResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
| 335 |
<div class="flex justify-between">
|
| 336 |
<span class="font-medium">Estimated Cost:</span>
|
| 337 |
+
<span id="backsplash极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 338 |
+
|
| 339 |
+
1. **每日费率选择**:
|
| 340 |
+
- $600/天(标准)
|
| 341 |
+
- $700/天(中等)
|
| 342 |
+
- $800/天(重体力劳动)
|
| 343 |
+
|
| 344 |
+
2. **额外选项**:
|
| 345 |
+
- 材料附加费(+15%)
|
| 346 |
+
- 重体力劳动附加费(+10%)
|
| 347 |
+
|
| 348 |
+
3. **计算功能**:
|
| 349 |
+
- 根据天数、费率选择和附加选项极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 350 |
+
|
| 351 |
+
1. **每日费率选择**:
|
| 352 |
+
- $600/天(标准)
|
| 353 |
+
- $700/天(中等)
|
| 354 |
+
- $800/天(重体力劳动)
|
| 355 |
+
|
| 356 |
+
2. **额外选项**:
|
| 357 |
+
- 材料附加费(+15%)
|
| 358 |
+
- 重体力劳动附加费(+10%)
|
| 359 |
+
|
| 360 |
+
3. **计算功能**:
|
| 361 |
+
- 根据天数、费率选择和附加选项计算总成本
|
| 362 |
+
|
| 363 |
+
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 364 |
+
|
| 365 |
+
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您的需求进一步调整
|
| 366 |
</div>
|
| 367 |
</div>
|
| 368 |
</div>
|
|
|
|
| 383 |
</div>
|
| 384 |
<div id="showerCustomSize" class="hidden">
|
| 385 |
<label class="block text-sm font-medium text-gray-700 mb-1">Dimensions (feet)</label>
|
| 386 |
+
<input type="text" id="showerDimensions" class="w-full px-3 py极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 387 |
+
|
| 388 |
+
1. **每日费率选择**:
|
| 389 |
+
- $600/天(标准)
|
| 390 |
+
- $700/天(中等)
|
| 391 |
+
- $极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 392 |
+
|
| 393 |
+
1. **每日费率选择**:
|
| 394 |
+
- $600/天(标准)
|
| 395 |
+
- $700/天(中等)
|
| 396 |
+
- $800/天(重体力劳动)
|
| 397 |
+
|
| 398 |
+
2. **额外选项**:
|
| 399 |
+
- 材料附加费(+15%)
|
| 400 |
+
- 重体力劳动附加费(+10%)
|
| 401 |
+
|
| 402 |
+
3. **计算功能**:
|
| 403 |
+
- 根据天数、费率选择和附加选项计算总成本
|
| 404 |
+
|
| 405 |
+
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 406 |
+
|
| 407 |
+
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您的需求进一步调整
|
| 408 |
</div>
|
| 409 |
<button onclick="calculateShower()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 410 |
<div id="showerResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
|
|
|
| 423 |
<span class="ml-2 text-sm text-gray-700">Standard Tub Surround</span>
|
| 424 |
</label>
|
| 425 |
</div>
|
| 426 |
+
<button onclick="calculateTub()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 427 |
+
|
| 428 |
+
1. **每日费率选择**:
|
| 429 |
+
- $600/天(标准)
|
| 430 |
+
- $700/天(中等)
|
| 431 |
+
- $800/天(重体力劳动)
|
| 432 |
+
|
| 433 |
+
2. **额外选项**:
|
| 434 |
+
- 材料附加费(+15%)
|
| 435 |
+
- 重体力劳动附加费(+10%)
|
| 436 |
+
|
| 437 |
+
3. **计算功能**:
|
| 438 |
+
- 根据天数、费率选择和附加选项计算总成本
|
| 439 |
+
|
| 440 |
+
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 441 |
+
|
| 442 |
+
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您��需求进一步调整
|
| 443 |
</div>
|
| 444 |
</div>
|
| 445 |
|
| 446 |
<div class="calculator-card bg-gray-50 p-4 rounded-lg">
|
| 447 |
<h3 class="font-bold text-lg text-gray-800 mb-3">Shower Glass</h3>
|
| 448 |
+
<div class="grid grid极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 449 |
+
|
| 450 |
+
1. **每日费率选择**:
|
| 451 |
+
- $600/天(标准)
|
| 452 |
+
- $700/天(中等)
|
| 453 |
+
- $800/天(重体力劳动)
|
| 454 |
+
|
| 455 |
+
2. **额外选项**:
|
| 456 |
+
- 材料附加费(+15%)
|
| 457 |
+
- 重体力劳动附加费(+10%)
|
| 458 |
+
|
| 459 |
+
3. **计算功能**:
|
| 460 |
+
- 根据天数、费率选择和附加选项计算总成本
|
| 461 |
+
|
| 462 |
+
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 463 |
+
|
| 464 |
+
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您的需求进一步调整
|
|
|
|
|
|
|
|
|
|
| 465 |
</div>
|
| 466 |
</div>
|
| 467 |
</div>
|
|
|
|
| 482 |
</div>
|
| 483 |
<button onclick="calculateCabinet()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
|
| 484 |
<div id="cabinetResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
|
| 485 |
+
<div class="flex justify-between">
|
| 486 |
+
<span class="font-medium">Estimated Cost:</span>
|
| 487 |
+
<span id="cabinetCost" class="font-bold">$0.00</span>
|
| 488 |
+
</div>
|
| 489 |
+
</div>
|
| 490 |
+
</div>
|
| 491 |
+
</div>
|
| 492 |
+
</div>
|
| 493 |
+
</div>
|
| 494 |
+
</div>
|
| 495 |
+
|
| 496 |
+
<div class="lg:col-span-1">
|
| 497 |
+
<div class="bg-white rounded-xl shadow-md p-6 sticky top-8">
|
| 498 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-4">Project Summary</h2>
|
| 499 |
+
|
| 500 |
+
<div class="mb-6">
|
| 501 |
+
<h3 class="text-lg font-semibold text-gray-700 mb-2">Financial Overview</h3>
|
| 502 |
+
<div class="space-y-3">
|
| 503 |
+
<div class="flex justify-between">
|
| 504 |
+
<span class="text-gray-600">Contract Total:</span>
|
| 505 |
+
<span id="summaryContractTotal" class="font-medium">$0.00</span>
|
| 506 |
+
</div>
|
| 507 |
+
<div class="flex justify-between">
|
| 508 |
+
<span class="text-gray-600">Estimated Costs:</span>
|
| 509 |
+
<span id="summaryEstimatedCosts" class="font-medium">$0.00</span>
|
| 510 |
+
</div>
|
| 511 |
+
<div class="flex justify-between">
|
| 512 |
+
<span class="text-gray-600">Overhead (<span id="overheadPercentDisplay">15</span>%):</span>
|
| 513 |
+
<span id="summaryOverhead" class="font-medium">$0.00</span>
|
| 514 |
+
</div>
|
| 515 |
+
<div class="border-t border-gray-200 pt-2 mt-2">
|
| 516 |
+
<div class="flex justify-between">
|
| 517 |
+
<span class="text-gray-800 font-semibold">Gross Profit:</span>
|
| 518 |
+
<span id="summaryGrossProfit" class="font-bold">$0.00</span>
|
| 519 |
+
</div>
|
| 520 |
+
<div class="flex justify-between">
|
| 521 |
+
<span class="text-gray-600">Profit Margin:</span>
|
| 522 |
+
<span id="summaryProfitMargin" class="font-medium">0%</span>
|
| 523 |
+
</div>
|
| 524 |
+
</div>
|
| 525 |
+
</div>
|
| 526 |
+
</div>
|
| 527 |
+
|
| 528 |
+
<div class="mb-6">
|
| 529 |
+
<h3 class="text-lg font-semibold text-gray-700 mb-2">Cost Breakdown</h3>
|
| 530 |
+
<div id="costItems" class="space-y-3">
|
| 531 |
+
<div class="text-center text-gray-500 py-4">
|
| 532 |
+
<i class="fas fa-calculator text-2xl mb-2"></i>
|
| 533 |
+
<p>Start adding items to see your cost breakdown</p>
|
| 534 |
+
</div>
|
| 535 |
+
</div>
|
| 536 |
+
</div>
|
| 537 |
+
|
| 538 |
+
<div class="border-t border-gray-200 pt-4">
|
| 539 |
+
<div class="flex justify-between items-center">
|
| 540 |
+
<span class="text-lg font-semibold text-gray-800">Total Estimated Cost</span>
|
| 541 |
+
<span id="totalEstimatedCost" class="text-2xl font-bold text-blue-600">$0.00</span>
|
| 542 |
+
</div>
|
| 543 |
+
<button onclick="updateSummary()" class="mt-4 w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition flex items-center justify-center">
|
| 544 |
+
<i class="fas fa-sync-alt mr-2"></i> Update Summary
|
| 545 |
+
</button>
|
| 546 |
+
</div>
|
| 547 |
+
</div>
|
| 548 |
+
</div>
|
| 549 |
+
</div>
|
| 550 |
+
</main>
|
| 551 |
+
|
| 552 |
+
<script>
|
| 553 |
+
// Global variables to store calculated values
|
| 554 |
+
const calculatedItems = {
|
| 555 |
+
trade: 0,
|
| 556 |
+
countertop: 0,
|
| 557 |
+
laminate: 0,
|
| 558 |
+
vinyl: 0,
|
| 559 |
+
wood: 0,
|
| 560 |
+
carpet: 0,
|
| 561 |
+
tile: 0,
|
| 562 |
+
backsplash: 0,
|
| 563 |
+
shower: 0,
|
| 564 |
+
tub: 0,
|
| 565 |
+
glass: 0,
|
| 566 |
+
cabinet: 0
|
| 567 |
+
};
|
| 568 |
+
|
| 569 |
+
// Tab switching functionality
|
| 570 |
+
document.querySelectorAll('.tab-button').forEach(button => {
|
| 571 |
+
button.addEventListener('click', function() {
|
| 572 |
+
// Remove active class from all buttons
|
| 573 |
+
document.querySelectorAll('.tab-button').forEach(btn => {
|
| 574 |
+
btn.classList.remove('active');
|
| 575 |
+
});
|
| 576 |
+
|
| 577 |
+
// Add active class to clicked button
|
| 578 |
+
this.classList.add('active');
|
| 579 |
+
|
| 580 |
+
// Hide all tab contents
|
| 581 |
+
document.querySelectorAll('.tab-content').forEach(content => {
|
| 582 |
+
content.classList.add('hidden');
|
| 583 |
+
});
|
| 584 |
+
|
| 585 |
+
// Show the selected tab content
|
| 586 |
+
const tabId = this.getAttribute('data-tab') + '-tab';
|
| 587 |
+
document.getElementById(tabId).classList.remove('hidden');
|
| 588 |
+
});
|
| 589 |
+
});
|
| 590 |
+
|
| 591 |
+
// Calculate Trade Labor
|
| 592 |
+
function calculateTrade() {
|
| 593 |
+
const days = parseFloat(document.getElementById('tradeDays').value) || 0;
|
| 594 |
+
const rate = parseFloat(document.getElementById('tradeRate').value) || 0;
|
| 595 |
+
const materialsSurcharge = document.getElementById('tradeMaterials').checked;
|
| 596 |
+
const heavyLabor = document.getElementById('tradeHeavy').checked;
|
| 597 |
+
|
| 598 |
+
let cost = days * rate;
|
| 599 |
+
|
| 600 |
+
if (materialsSurcharge) cost *= 1.15;
|
| 601 |
+
if (heavyLabor) cost *= 1.10;
|
| 602 |
+
|
| 603 |
+
calculatedItems.trade = cost;
|
| 604 |
+
|
| 605 |
+
document.getElementById('tradeCost').textContent = `$${cost.toFixed(2)}`;
|
| 606 |
+
document.getElementById('tradeResult').classList.remove('hidden');
|
| 607 |
+
addCostItem('Main Trade Labor', cost);
|
| 608 |
+
updateSummary();
|
| 609 |
+
}
|
| 610 |
+
|
| 611 |
+
// Calculate Countertop
|
| 612 |
+
function calculateCountertop() {
|
| 613 |
+
const sqft = parseFloat(document.getElementById('countertopSqft').value) || 0;
|
| 614 |
+
const slabs = parseFloat(document.getElementById('countertopSlabs').value) || 0;
|
| 615 |
+
const disposal = document.getElementById('countertopDisposal').checked;
|
| 616 |
+
const subdeck = document.getElementById('countertopSubdeck').checked;
|
| 617 |
+
|
| 618 |
+
// Base rate per sqft
|
| 619 |
+
let cost = sqft * 45;
|
| 620 |
+
|
| 621 |
+
// Additional costs
|
| 622 |
+
if (slabs > 0) cost += slabs * 150;
|
| 623 |
+
if (disposal) cost += 170;
|
| 624 |
+
if (subdeck) cost += 200;
|
| 625 |
+
|
| 626 |
+
calculatedItems.countertop = cost;
|
| 627 |
+
|
| 628 |
+
document.getElementById('countertopCost').textContent = `$${cost.toFixed(2)}`;
|
| 629 |
+
document.getElementById('countertopResult').classList.remove('hidden');
|
| 630 |
+
addCostItem('Solid Countertops', cost);
|
| 631 |
+
updateSummary();
|
| 632 |
+
}
|
| 633 |
+
|
| 634 |
+
// Calculate Laminate
|
| 635 |
+
function calculateLaminate() {
|
| 636 |
+
const lnft = parseFloat(document.getElementById('laminateLnft').value) || 0;
|
| 637 |
+
|
| 638 |
+
// Base rate per linear foot
|
| 639 |
+
const cost = lnft * 35;
|
| 640 |
+
|
| 641 |
+
calculatedItems.laminate = cost;
|
| 642 |
+
|
| 643 |
+
document.getElementById('laminateCost').textContent = `$${cost.toFixed(2)}`;
|
| 644 |
+
document.getElementById('laminateResult').classList.remove('hidden');
|
| 645 |
+
addCostItem('Laminate Countertops', cost);
|
| 646 |
+
updateSummary();
|
| 647 |
+
}
|
| 648 |
+
|
| 649 |
+
// Calculate Vinyl Flooring
|
| 650 |
+
function calculateVinyl() {
|
| 651 |
+
const sqft = parseFloat(document.getElementById('vinylSqft').value) || 0;
|
| 652 |
+
const lnft = parseFloat(document.getElementById('vinylLnft').value) || 0;
|
| 653 |
+
const materialCost = parseFloat(document.getElementById('vinylMaterialCost').value) || 0;
|
| 654 |
+
const trips = parseFloat(document.getElementById('vinylTrips').value) || 0;
|
| 655 |
+
const demo = document.getElementById('vinylDemo').checked;
|
| 656 |
+
const underlayment = document.getElementById('vinylUnderlayment').checked;
|
| 657 |
+
const leveling = document.getElementById('vinylLeveling').checked;
|
| 658 |
+
|
| 659 |
+
// Base installation cost
|
| 660 |
+
let cost = sqft * 2.50;
|
| 661 |
+
|
| 662 |
+
// Add material cost
|
| 663 |
+
cost += sqft * materialCost;
|
| 664 |
+
|
| 665 |
+
// Add quarter round
|
| 666 |
+
cost += lnft * 2.50;
|
| 667 |
+
|
| 668 |
+
// Add delivery trips
|
| 669 |
+
cost += trips * 75;
|
| 670 |
+
|
| 671 |
+
// Add demo if needed
|
| 672 |
+
if (demo) cost += sqft * 1.50;
|
| 673 |
+
|
| 674 |
+
// Add underlayment if needed
|
| 675 |
+
if (underlayment) cost += sqft * 0.75;
|
| 676 |
+
|
| 677 |
+
// Add leveling if needed
|
| 678 |
+
if (leveling) cost += sqft * 1.25;
|
| 679 |
+
|
| 680 |
+
calculatedItems.vinyl = cost;
|
| 681 |
+
|
| 682 |
+
document.getElementById('vinylCost').textContent = `$${cost.toFixed(2)}`;
|
| 683 |
+
document.getElementById('vinylResult').classList.remove('hidden');
|
| 684 |
+
addCostItem('Vinyl Flooring', cost);
|
| 685 |
+
updateSummary();
|
| 686 |
+
}
|
| 687 |
+
|
| 688 |
+
// Calculate Wood Flooring
|
| 689 |
+
function calculateWood() {
|
| 690 |
+
const sqft = parseFloat(document.getElementById('woodSqft').value) || 0;
|
| 691 |
+
const lnft = parse极好的!我已经添加了一个"Main Trade"选项卡,其中包含以下功能:
|
| 692 |
|
| 693 |
1. **每日费率选择**:
|
| 694 |
- $600/天(标准)
|
|
|
|
| 705 |
这个新选项卡位于所有其他选项卡之前,用户可以轻松估算主要贸易工作的成本。计算器会考虑材料和劳动强度因素,正如您所要求的。
|
| 706 |
|
| 707 |
您可以将此代码直接复制到HTML文件中使用,或者我可以根据您的需求进一步调整
|
| 708 |
+
const materialCost = parseFloat(document.getElementById('woodMaterialCost').value) || 0;
|
| 709 |
+
const demo = document.getElementById('woodDemo').checked;
|
| 710 |
+
const leveling = document.getElementById('woodLeveling').checked;
|
| 711 |
+
|
| 712 |
+
// Base installation cost
|
| 713 |
+
let cost = sqft * 3.50;
|
| 714 |
+
|
| 715 |
+
// Add material cost
|
| 716 |
+
cost += sqft * materialCost;
|
| 717 |
+
|
| 718 |
+
// Add quarter round
|
| 719 |
+
cost += lnft * 3.00;
|
| 720 |
+
|
| 721 |
+
// Add demo if needed
|
| 722 |
+
if (demo) cost += sqft * 2.00;
|
| 723 |
+
|
| 724 |
+
// Add leveling if needed
|
| 725 |
+
if (leveling) cost += sqft * 1.50;
|
| 726 |
+
|
| 727 |
+
calculatedItems.wood = cost;
|
| 728 |
+
|
| 729 |
+
document.getElementById('woodCost').textContent = `$${cost.toFixed(2)}`;
|
| 730 |
+
document.getElementById('woodResult').classList.remove('hidden');
|
| 731 |
+
addCostItem('Wood Flooring', cost);
|
| 732 |
+
updateSummary();
|
| 733 |
+
}
|
| 734 |
+
|
| 735 |
+
// Calculate Carpet
|
| 736 |
+
function calculateCarpet() {
|
| 737 |
+
const sqft = parseFloat(document.getElementById('carpetSqft').value) || 0;
|
| 738 |
+
const rooms = parseFloat(document.getElementById('carpetRooms').value) || 0;
|
| 739 |
+
const materialCost = parseFloat(document.getElementById('carpetMaterialCost').value) || 0;
|
| 740 |
+
const demo = document.getElementById('carpetDemo').checked;
|
| 741 |
+
|
| 742 |
+
// Base installation cost
|
| 743 |
+
let cost = sqft * 1.75;
|
| 744 |
+
|
| 745 |
+
// Add material cost
|
| 746 |
+
cost += sqft * materialCost;
|
| 747 |
+
|
| 748 |
+
// Add per room charge
|
| 749 |
+
cost += rooms * 50;
|
| 750 |
+
|
| 751 |
+
// Add demo if needed
|
| 752 |
+
if (demo) cost += sqft * 1.00;
|
| 753 |
+
|
| 754 |
+
calculatedItems.carpet = cost;
|
| 755 |
+
|
| 756 |
+
document.getElementById('carpetCost').textContent = `$${cost.toFixed(2)}`;
|
| 757 |
+
document.getElementById('carpetResult').classList.remove('hidden');
|
| 758 |
+
addCostItem('Carpet', cost);
|
| 759 |
+
updateSummary();
|
| 760 |
+
}
|
| 761 |
+
|
| 762 |
+
// Calculate Tile
|
| 763 |
+
function calculateTile() {
|
| 764 |
+
const sqft = parseFloat(document.getElementById('tileSqft').value) || 0;
|
| 765 |
+
const materialCost = parseFloat(document.getElementById('tileMaterialCost').value) || 0;
|
| 766 |
+
const demo = document.getElementById('tileDemo').checked;
|
| 767 |
+
const smallBath = document.getElementById('tileSmallBath').checked;
|
| 768 |
+
const bathLocation = document.querySelector('input[name="bathLocation"]:checked')?.value;
|
| 769 |
+
|
| 770 |
+
// Base installation cost
|
| 771 |
+
let cost = sqft * 5.00;
|
| 772 |
+
|
| 773 |
+
// Add material cost
|
| 774 |
+
cost += sqft * materialCost;
|
| 775 |
+
|
| 776 |
+
// Add demo if needed
|
| 777 |
+
if (demo) cost += sqft * 2.00;
|
| 778 |
+
|
| 779 |
+
// Small bathroom premium
|
| 780 |
+
if (smallBath) {
|
| 781 |
+
cost += 150;
|
| 782 |
+
if (bathLocation === 'upstairs') cost += 100;
|
| 783 |
+
}
|
| 784 |
+
|
| 785 |
+
calculatedItems.tile = cost;
|
| 786 |
+
|
| 787 |
+
document.getElementById('tileCost').textContent = `$${cost.toFixed(2)}`;
|
| 788 |
+
document.getElementById('tileResult').classList.remove('hidden');
|
| 789 |
+
addCostItem('Tile Flooring', cost);
|
| 790 |
+
updateSummary();
|
| 791 |
+
}
|
| 792 |
+
|
| 793 |
+
// Calculate Backsplash
|
| 794 |
+
function calculateBacksplash() {
|
| 795 |
+
const sqft = parseFloat(document.getElementById('backsplashSqft').value) || 0;
|
| 796 |
+
const complexity = document.getElementById('backsplashComplexity').value;
|
| 797 |
+
|
| 798 |
+
// Base rates based on complexity
|
| 799 |
+
let rate;
|
| 800 |
+
switch(complexity) {
|
| 801 |
+
case 'simple': rate = 8.00; break;
|
| 802 |
+
case 'medium': rate = 10.00; break;
|
| 803 |
+
case 'complex': rate = 15.00; break;
|
| 804 |
+
default: rate = 8.00;
|
| 805 |
+
}
|
| 806 |
+
|
| 807 |
+
const cost = sqft * rate;
|
| 808 |
+
|
| 809 |
+
calculatedItems.backsplash = cost;
|
| 810 |
+
|
| 811 |
+
document.getElementById('backsplashCost').textContent = `$${cost.toFixed(2)}`;
|
| 812 |
+
document.getElementById('backsplashResult').classList.remove('hidden');
|
| 813 |
+
addCostItem('Backsplash', cost);
|
| 814 |
+
updateSummary();
|
| 815 |
+
}
|
| 816 |
+
|
| 817 |
+
// Calculate Shower
|
| 818 |
+
function calculateShower() {
|
| 819 |
+
const size = document.getElementById('shooterSize').value;
|
| 820 |
+
const dualHead = document.getElementById('showerDualHead').checked;
|
| 821 |
+
const bench = document.getElementById('showerBench').checked;
|
| 822 |
+
const niches = document.getElementById('showerMultipleNiches').checked;
|
| 823 |
+
|
| 824 |
+
// Base rates based on size
|
| 825 |
+
let cost;
|
| 826 |
+
switch(size) {
|
| 827 |
+
case 'basic': cost = 2500; break;
|
| 828 |
+
case 'medium': cost = 3500; break;
|
| 829 |
+
case 'large': cost = 4500; break;
|
| 830 |
+
case 'custom':
|
| 831 |
+
const dimensions = document.getElementById('showerDimensions').value;
|
| 832 |
+
if (dimensions) {
|
| 833 |
+
const [length, width] = dimensions.split('x').map(Number);
|
| 834 |
+
const area = length * width;
|
| 835 |
+
cost = area * 100;
|
| 836 |
+
} else {
|
| 837 |
+
cost = 3000;
|
| 838 |
+
}
|
| 839 |
+
break;
|
| 840 |
+
default: cost = 2500;
|
| 841 |
+
}
|
| 842 |
+
|
| 843 |
+
// Add features
|
| 844 |
+
if (dualHead) cost += 300;
|
| 845 |
+
if (bench) cost += 450;
|
| 846 |
+
if (niches) cost += 200;
|
| 847 |
+
|
| 848 |
+
calculatedItems.shower = cost;
|
| 849 |
+
|
| 850 |
+
document.getElementById('showerCost').textContent = `$${cost.toFixed(2)}`;
|
| 851 |
+
document.getElementById('showerResult').classList.remove('hidden');
|
| 852 |
+
addCostItem('Shower Installation', cost);
|
| 853 |
+
updateSummary();
|
| 854 |
+
}
|
| 855 |
+
|
| 856 |
+
// Calculate Tub
|
| 857 |
+
function calculateTub() {
|
| 858 |
+
const standard = document.getElementById('tubStandard').checked;
|
| 859 |
+
|
| 860 |
+
// Base rate
|
| 861 |
+
const cost = standard ? 1200 : 0;
|
| 862 |
+
|
| 863 |
+
calculatedItems.tub = cost;
|
| 864 |
+
|
| 865 |
+
document.getElementById('tubCost').textContent = `$${cost.toFixed(2)}`;
|
| 866 |
+
document.getElementById('tubResult').classList.remove('hidden');
|
| 867 |
+
addCostItem('Tub Surround', cost);
|
| 868 |
+
updateSummary();
|
| 869 |
+
}
|
| 870 |
+
|
| 871 |
+
// Calculate Glass
|
| 872 |
+
function calculateGlass() {
|
| 873 |
+
const type = document.getElementById('glassType').value;
|
| 874 |
+
const lnft = parseFloat(document.getElementById('glassLnft').value) || 0;
|
| 875 |
+
|
| 876 |
+
// Rates based on type
|
| 877 |
+
let rate;
|
| 878 |
+
switch(type) {
|
| 879 |
+
case 'standard': rate = 75; break;
|
| 880 |
+
case 'frameless': rate = 125; break;
|
| 881 |
+
case 'reinstall': rate = 40; break;
|
| 882 |
+
default: rate = 75;
|
| 883 |
+
}
|
| 884 |
+
|
| 885 |
+
const cost = lnft * rate;
|
| 886 |
+
|
| 887 |
+
calculatedItems.glass = cost;
|
| 888 |
+
|
| 889 |
+
document.getElementById('glassCost').textContent = `$${cost.toFixed(2)}`;
|
| 890 |
+
document.getElementById('glassResult').classList.remove('hidden');
|
| 891 |
+
addCostItem('Shower Glass', cost);
|
| 892 |
+
updateSummary();
|
| 893 |
+
}
|
| 894 |
+
|
| 895 |
+
// Calculate Cabinet
|
| 896 |
+
function calculateCabinet() {
|
| 897 |
+
const lnft = parseFloat(document.getElementById('cabinetLnft').value) || 0;
|
| 898 |
+
const doors = parseFloat(document.getElementById('cabinetDoors').value) || 0;
|
| 899 |
+
|
| 900 |
+
// Base rate per linear foot plus per door
|
| 901 |
+
const cost = (lnft * 25) + (doors * 50);
|
| 902 |
+
|
| 903 |
+
calculatedItems.cabinet = cost;
|
| 904 |
+
|
| 905 |
+
document.getElementById('cabinetCost').textContent = `$${cost.toFixed(2)}`;
|
| 906 |
+
document.getElementById('cabinetResult').classList.remove('hidden');
|
| 907 |
+
addCostItem('Cabinet Repair', cost);
|
| 908 |
+
updateSummary();
|
| 909 |
+
}
|
| 910 |
+
|
| 911 |
+
// Add cost item to summary
|
| 912 |
+
function addCostItem(name, cost) {
|
| 913 |
+
const costItems = document.getElementById('costItems');
|
| 914 |
+
|
| 915 |
+
// Check if item already exists
|
| 916 |
+
const existingItem = Array.from(costItems.children).find(item => {
|
| 917 |
+
return item.querySelector('.item-name')?.textContent === name;
|
| 918 |
+
});
|
| 919 |
+
|
| 920 |
+
if (existingItem) {
|
| 921 |
+
// Update existing item
|
| 922 |
+
existingItem.querySelector('.item-cost').textContent = `$${cost.toFixed(2)}`;
|
| 923 |
+
} else {
|
| 924 |
+
// Create new item
|
| 925 |
+
const item = document.createElement('div');
|
| 926 |
+
item.className = 'summary-item pl-3 py-2';
|
| 927 |
+
item.innerHTML = `
|
| 928 |
+
<div class="flex justify-between items-center">
|
| 929 |
+
<span class="item-name text-gray-700">${name}</span>
|
| 930 |
+
<span class="item-cost font-medium">$${cost.toFixed(2)}</span>
|
| 931 |
+
</div>
|
| 932 |
+
`;
|
| 933 |
+
|
| 934 |
+
// Add to the top of the list
|
| 935 |
+
if (costItems.firstChild && costItems.firstChild.classList.contains('text-center')) {
|
| 936 |
+
costItems.replaceChild(item, costItems.firstChild);
|
| 937 |
+
} else {
|
| 938 |
+
costItems.prepend(item);
|
| 939 |
+
}
|
| 940 |
+
}
|
| 941 |
+
}
|
| 942 |
+
|
| 943 |
+
// Update summary with totals
|
| 944 |
+
function updateSummary() {
|
| 945 |
+
// Calculate total estimated cost
|
| 946 |
+
const totalCost = Object.values(calculatedItems).reduce((sum, cost) => sum + cost, 0);
|
| 947 |
+
|
| 948 |
+
// Get contract total and overhead
|
| 949 |
+
const contractTotal = parseFloat(document.getElementById('contractTotal').value) || 0;
|
| 950 |
+
const overheadPercent = parseFloat(document.getElementById('overheadPercent').value) || 0;
|
| 951 |
+
const overheadAmount = totalCost * (overheadPercent / 100);
|
| 952 |
+
|
| 953 |
+
// Calculate gross profit
|
| 954 |
+
const grossProfit = contractTotal - totalCost - overheadAmount;
|
| 955 |
+
const profitMargin = contractTotal > 0 ? (grossProfit / contractTotal) * 100 : 0;
|
| 956 |
+
|
| 957 |
+
// Update display
|
| 958 |
+
document.getElementById('summaryContractTotal').textContent = `$${contractTotal.toFixed(2)}`;
|
| 959 |
+
document.getElementById('summaryEstimatedCosts').textContent = `$${totalCost.toFixed(2)}`;
|
| 960 |
+
document.getElementById('summaryOverhead').textContent = `$${overheadAmount.toFixed(2)}`;
|
| 961 |
+
document.getElementById('overheadPercentDisplay').textContent = overheadPercent;
|
| 962 |
+
document.getElementById('summaryGrossProfit').textContent = `$${grossProfit.toFixed(2)}`;
|
| 963 |
+
document.getElementById('summaryProfitMargin').textContent = `${profitMargin.toFixed(1)}%`;
|
| 964 |
+
document.getElementById('totalEstimatedCost').textContent = `$${totalCost.toFixed(2)}`;
|
| 965 |
+
|
| 966 |
+
// Style profit based on value
|
| 967 |
+
const grossProfitElement = document.getElementById('summaryGrossProfit');
|
| 968 |
+
const profitMarginElement = document.getElementById('summaryProfitMargin');
|
| 969 |
+
|
| 970 |
+
if (grossProfit > 0) {
|
| 971 |
+
grossProfitElement.classList.add('profit-positive');
|
| 972 |
+
grossProfitElement.classList.remove('profit-negative', 'profit-neutral');
|
| 973 |
+
profitMarginElement.classList.add('profit-positive');
|
| 974 |
+
profitMarginElement.classList.remove('profit-negative', 'profit-neutral');
|
| 975 |
+
} else if (grossProfit < 0) {
|
| 976 |
+
grossProfitElement.classList.add('profit-negative');
|
| 977 |
+
grossProfitElement.classList.remove('profit-positive', 'profit-neutral');
|
| 978 |
+
profitMarginElement.classList.add('profit-negative');
|
| 979 |
+
profitMarginElement.classList.remove('profit-positive', 'profit-neutral');
|
| 980 |
+
} else {
|
| 981 |
+
grossProfitElement.classList.add('profit-neutral');
|
| 982 |
+
grossProfitElement.classList.remove('profit-positive', 'profit-negative');
|
| 983 |
+
profitMarginElement.classList.add('profit-neutral');
|
| 984 |
+
profitMarginElement.classList.remove('profit-positive', 'profit-negative');
|
| 985 |
+
}
|
| 986 |
+
}
|
| 987 |
+
|
| 988 |
+
// Reset all fields
|
| 989 |
+
document.getElementById('resetBtn').addEventListener('click', function() {
|
| 990 |
+
// Reset all input fields
|
| 991 |
+
document.querySelectorAll('input[type="text"], input[type="number"], input[type="date"], textarea').forEach(input => {
|
| 992 |
+
input.value = '';
|
| 993 |
+
});
|
| 994 |
+
|
| 995 |
+
// Reset checkboxes and radios
|
| 996 |
+
document.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(input => {
|
| 997 |
+
input.checked = false;
|
| 998 |
+
});
|
| 999 |
+
|
| 1000 |
+
// Reset selects
|
| 1001 |
+
document.querySelectorAll('select').forEach(select => {
|
| 1002 |
+
select.selectedIndex = 0;
|
| 1003 |
+
});
|
| 1004 |
+
|
| 1005 |
+
// Reset calculated items
|
| 1006 |
+
for (const key in calculatedItems) {
|
| 1007 |
+
calculatedItems[key] = 0;
|
| 1008 |
+
}
|
| 1009 |
+
|
| 1010 |
+
// Reset results displays
|
| 1011 |
+
document.querySelectorAll('[id$="Result"]').forEach(result => {
|
| 1012 |
+
result.classList.add('hidden');
|
| 1013 |
+
});
|
| 1014 |
+
|
| 1015 |
+
// Reset summary
|
| 1016 |
+
document.getElementById('costItems').innerHTML = `
|
| 1017 |
+
<div class="text-center text-gray-500 py-4">
|
| 1018 |
+
<i class="fas fa-calculator text-2xl mb-2"></i>
|
| 1019 |
+
<p>Start adding items to see your cost breakdown</p>
|
| 1020 |
+
</div>
|
| 1021 |
+
`;
|
| 1022 |
+
|
| 1023 |
+
updateSummary();
|
| 1024 |
+
});
|
| 1025 |
+
|
| 1026 |
+
// Print functionality
|
| 1027 |
+
document.getElementById('printBtn').addEventListener('click', function() {
|
| 1028 |
+
window.print();
|
| 1029 |
+
});
|
| 1030 |
+
|
| 1031 |
+
// Show/hide custom shower size field
|
| 1032 |
+
document.getElementById('shooterSize').addEventListener('change', function() {
|
| 1033 |
+
const customSizeField = document.getElementById('showerCustomSize');
|
| 1034 |
+
if (this.value === 'custom') {
|
| 1035 |
+
customSizeField.classList.remove('hidden');
|
| 1036 |
+
} else {
|
| 1037 |
+
customSizeField.classList.add('hidden');
|
| 1038 |
+
}
|
| 1039 |
+
});
|
| 1040 |
+
|
| 1041 |
+
// Show/hide bathroom location options
|
| 1042 |
+
document.getElementById('tileSmallBath').addEventListener('change', function() {
|
| 1043 |
+
const bathLocationField = document.getElementById('tileBathLocation');
|
| 1044 |
+
if (this.checked) {
|
| 1045 |
+
bathLocationField.classList.remove('hidden');
|
| 1046 |
+
} else {
|
| 1047 |
+
bathLocationField.classList.add('hidden');
|
| 1048 |
+
}
|
| 1049 |
+
});
|
| 1050 |
+
|
| 1051 |
+
// Initialize with today's date
|
| 1052 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 1053 |
+
const today = new Date().toISOString().split('T')[0];
|
| 1054 |
+
document.getElementById('projectDate').value = today;
|
| 1055 |
+
});
|
| 1056 |
+
</script>
|
| 1057 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=rdowns/pcc-tools" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 1058 |
</html>
|
prompts.txt
CHANGED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Add a field for "Contract Total", use that input to calculate the total cost compared to that total contract amount. Make sure there is a calculation to show the anticipated total gross profit after all fields are inputted in.
|