dsad
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1000px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
background: white;
|
||||
padding: 20px;
|
||||
@@ -27,18 +27,69 @@
|
||||
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.form-header {
|
||||
text-align: center;
|
||||
.wizard-steps {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30px;
|
||||
padding: 20px;
|
||||
background: #f8f9fa;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.step {
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.step.active {
|
||||
color: #2196F3;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.step:not(:last-child):after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: #ddd;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.step-number {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: #fff;
|
||||
border: 2px solid #ddd;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto 10px;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.step.active .step-number {
|
||||
background: #2196F3;
|
||||
border-color: #2196F3;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
display: none;
|
||||
margin-bottom: 30px;
|
||||
padding: 20px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.form-section.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
@@ -61,22 +112,48 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.template-selection {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
gap: 15px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.template-card {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
padding: 15px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.template-card:hover {
|
||||
border-color: #2196F3;
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
.template-card.selected {
|
||||
border-color: #2196F3;
|
||||
background: #e3f2fd;
|
||||
}
|
||||
|
||||
.parameter-list {
|
||||
margin-top: 20px;
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.parameter-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 4px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.parameter-item label {
|
||||
margin: 0;
|
||||
margin-left: 10px;
|
||||
.parameter-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.price-summary {
|
||||
@@ -86,41 +163,76 @@
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.navigation-buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
padding: 20px;
|
||||
background: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background-color: #45a049;
|
||||
.btn-primary {
|
||||
background: #2196F3;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: #6c757d;
|
||||
background: #6c757d;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
.btn:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.alert {
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
background: #e3f2fd;
|
||||
border: 1px solid #2196F3;
|
||||
color: #0d47a1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="form-header">
|
||||
<h1>Form Permintaan Layanan Analisis</h1>
|
||||
<p>Silakan lengkapi informasi di bawah ini</p>
|
||||
<div class="wizard-steps">
|
||||
<div class="step active">
|
||||
<div class="step-number">1</div>
|
||||
<div class="step-title">Informasi Dasar</div>
|
||||
</div>
|
||||
<div class="step">
|
||||
<div class="step-number">2</div>
|
||||
<div class="step-title">Pilih Template</div>
|
||||
</div>
|
||||
<div class="step">
|
||||
<div class="step-number">3</div>
|
||||
<div class="step-title">Parameter</div>
|
||||
</div>
|
||||
<div class="step">
|
||||
<div class="step-number">4</div>
|
||||
<div class="step-title">Konfirmasi</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="serviceRequestForm">
|
||||
<div class="form-section">
|
||||
<h3>Informasi Umum</h3>
|
||||
<!-- Step 1: Informasi Dasar -->
|
||||
<div class="form-section active" id="step1">
|
||||
<h3>Informasi Permintaan</h3>
|
||||
<div class="form-group">
|
||||
<label for="requestType">Jenis Layanan</label>
|
||||
<select id="requestType" name="requestType" required>
|
||||
@@ -139,44 +251,126 @@
|
||||
<label for="samplingLocation">Lokasi Sampling</label>
|
||||
<textarea id="samplingLocation" name="samplingLocation" rows="3"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="gpsCoordinates">Koordinat GPS</label>
|
||||
<input type="text" id="gpsCoordinates" name="gpsCoordinates" placeholder="Contoh: -6.123456, 106.789012">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<h3>Parameter Analisis</h3>
|
||||
<!-- Step 2: Pilih Template -->
|
||||
<div class="form-section" id="step2">
|
||||
<h3>Pilih Template Analisis</h3>
|
||||
<div class="template-selection">
|
||||
<div class="template-card" data-template-id="1">
|
||||
<h4>Air Limbah Industri</h4>
|
||||
<p>Template standar untuk analisis air limbah industri</p>
|
||||
<small>15 Parameter</small>
|
||||
</div>
|
||||
<div class="template-card" data-template-id="2">
|
||||
<h4>Air Minum</h4>
|
||||
<p>Template untuk analisis kualitas air minum</p>
|
||||
<small>12 Parameter</small>
|
||||
</div>
|
||||
<div class="template-card" data-template-id="3">
|
||||
<h4>Udara Ambien</h4>
|
||||
<p>Template untuk analisis kualitas udara</p>
|
||||
<small>8 Parameter</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 3: Parameter -->
|
||||
<div class="form-section" id="step3">
|
||||
<h3>Pilih Parameter Analisis</h3>
|
||||
<div class="parameter-list">
|
||||
<div class="parameter-item">
|
||||
<input type="checkbox" id="param1" name="parameters[]" value="1">
|
||||
<label for="param1">BOD (Biochemical Oxygen Demand) - Rp 250.000</label>
|
||||
</div>
|
||||
<div class="parameter-item">
|
||||
<input type="checkbox" id="param2" name="parameters[]" value="2">
|
||||
<label for="param2">COD (Chemical Oxygen Demand) - Rp 200.000</label>
|
||||
</div>
|
||||
<div class="parameter-item">
|
||||
<input type="checkbox" id="param3" name="parameters[]" value="3">
|
||||
<label for="param3">TSS (Total Suspended Solid) - Rp 150.000</label>
|
||||
</div>
|
||||
<div class="parameter-item">
|
||||
<input type="checkbox" id="param4" name="parameters[]" value="4">
|
||||
<label for="param4">pH - Rp 100.000</label>
|
||||
</div>
|
||||
<!-- Parameters will be loaded dynamically based on selected template -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<h3>Ringkasan Biaya</h3>
|
||||
<!-- Step 4: Konfirmasi -->
|
||||
<div class="form-section" id="step4">
|
||||
<h3>Konfirmasi Permintaan</h3>
|
||||
<div class="price-summary">
|
||||
<p>Subtotal: Rp 0</p>
|
||||
<p>PPN (11%): Rp 0</p>
|
||||
<p><strong>Total: Rp 0</strong></p>
|
||||
<h4>Ringkasan Biaya</h4>
|
||||
<p>Jumlah Parameter: <span id="parameterCount">0</span></p>
|
||||
<p>Subtotal: <span id="subtotal">Rp 0</span></p>
|
||||
<p>PPN (11%): <span id="tax">Rp 0</span></p>
|
||||
<p><strong>Total: <span id="total">Rp 0</span></strong></p>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info">
|
||||
<p>Setelah permintaan disubmit, tim kami akan memproses dan mengirimkan quotation dalam 1x24 jam kerja.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<button type="button" class="btn btn-secondary">Simpan Draft</button>
|
||||
<button type="submit" class="btn">Kirim Permintaan</button>
|
||||
<div class="navigation-buttons">
|
||||
<button type="button" class="btn btn-secondary" id="prevBtn">Sebelumnya</button>
|
||||
<button type="button" class="btn btn-primary" id="nextBtn">Selanjutnya</button>
|
||||
<button type="submit" class="btn btn-primary" id="submitBtn" style="display: none;">Kirim Permintaan</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Basic JavaScript for form navigation
|
||||
let currentStep = 1;
|
||||
const totalSteps = 4;
|
||||
|
||||
function showStep(step) {
|
||||
document.querySelectorAll('.form-section').forEach(section => {
|
||||
section.classList.remove('active');
|
||||
});
|
||||
document.querySelectorAll('.step').forEach((s, index) => {
|
||||
if (index + 1 <= step) {
|
||||
s.classList.add('active');
|
||||
} else {
|
||||
s.classList.remove('active');
|
||||
}
|
||||
});
|
||||
document.getElementById(`step${step}`).classList.add('active');
|
||||
|
||||
// Show/hide buttons
|
||||
if (step === 1) {
|
||||
document.getElementById('prevBtn').style.display = 'none';
|
||||
} else {
|
||||
document.getElementById('prevBtn').style.display = 'block';
|
||||
}
|
||||
|
||||
if (step === totalSteps) {
|
||||
document.getElementById('nextBtn').style.display = 'none';
|
||||
document.getElementById('submitBtn').style.display = 'block';
|
||||
} else {
|
||||
document.getElementById('nextBtn').style.display = 'block';
|
||||
document.getElementById('submitBtn').style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('nextBtn').addEventListener('click', () => {
|
||||
if (currentStep < totalSteps) {
|
||||
currentStep++;
|
||||
showStep(currentStep);
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('prevBtn').addEventListener('click', () => {
|
||||
if (currentStep > 1) {
|
||||
currentStep--;
|
||||
showStep(currentStep);
|
||||
}
|
||||
});
|
||||
|
||||
// Template selection
|
||||
document.querySelectorAll('.template-card').forEach(card => {
|
||||
card.addEventListener('click', () => {
|
||||
document.querySelectorAll('.template-card').forEach(c => c.classList.remove('selected'));
|
||||
card.classList.add('selected');
|
||||
// Here you would typically load the parameters for the selected template
|
||||
});
|
||||
});
|
||||
|
||||
// Initialize form
|
||||
showStep(1);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,6 +3,17 @@ CREATE TABLE sampling_templates (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
template_name VARCHAR(100),
|
||||
description TEXT,
|
||||
is_active BOOLEAN DEFAULT true,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Tabel Template Analisis
|
||||
CREATE TABLE analysis_templates (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
template_name VARCHAR(100),
|
||||
description TEXT,
|
||||
is_lab_analysis BOOLEAN DEFAULT true,
|
||||
is_active BOOLEAN DEFAULT true,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
@@ -11,35 +22,61 @@ CREATE TABLE analysis_parameters (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
parameter_code VARCHAR(20),
|
||||
parameter_name VARCHAR(100),
|
||||
testing_method VARCHAR(100),
|
||||
unit VARCHAR(20),
|
||||
standard_method_number VARCHAR(50),
|
||||
price DECIMAL(10,2),
|
||||
method VARCHAR(100),
|
||||
is_active BOOLEAN DEFAULT true,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Tabel Template Parameter
|
||||
CREATE TABLE template_parameters (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
template_id INT,
|
||||
parameter_id INT,
|
||||
is_required BOOLEAN DEFAULT false,
|
||||
FOREIGN KEY (template_id) REFERENCES analysis_templates(id),
|
||||
FOREIGN KEY (parameter_id) REFERENCES analysis_parameters(id)
|
||||
);
|
||||
|
||||
-- Tabel Permintaan Layanan
|
||||
CREATE TABLE service_requests (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
request_code VARCHAR(20) UNIQUE,
|
||||
customer_id INT,
|
||||
request_type ENUM('sampling_analysis', 'analysis_only'),
|
||||
template_id INT,
|
||||
sampling_date DATE,
|
||||
sampling_location TEXT,
|
||||
gps_coordinates VARCHAR(50),
|
||||
status ENUM('draft', 'submitted', 'approved', 'rejected', 'in_progress', 'completed'),
|
||||
sampling_officer_id INT,
|
||||
testing_officer_id INT,
|
||||
total_amount DECIMAL(10,2),
|
||||
dp_amount DECIMAL(10,2),
|
||||
dp_status ENUM('unpaid', 'paid') DEFAULT 'unpaid',
|
||||
notes TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (customer_id) REFERENCES customers(id)
|
||||
updated_at DATETIME ON UPDATE CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (customer_id) REFERENCES customers(id),
|
||||
FOREIGN KEY (template_id) REFERENCES analysis_templates(id),
|
||||
FOREIGN KEY (sampling_officer_id) REFERENCES users(id),
|
||||
FOREIGN KEY (testing_officer_id) REFERENCES users(id)
|
||||
);
|
||||
|
||||
-- Tabel Detail Parameter yang Diminta
|
||||
-- Tabel Detail Parameter Permintaan
|
||||
CREATE TABLE request_parameters (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
request_id INT,
|
||||
parameter_id INT,
|
||||
price DECIMAL(10,2),
|
||||
status ENUM('pending', 'in_progress', 'completed', 'rejected'),
|
||||
result_value VARCHAR(50),
|
||||
result_unit VARCHAR(20),
|
||||
is_compliant BOOLEAN,
|
||||
notes TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (request_id) REFERENCES service_requests(id),
|
||||
FOREIGN KEY (parameter_id) REFERENCES analysis_parameters(id)
|
||||
);
|
||||
@@ -52,12 +89,41 @@ CREATE TABLE quotations (
|
||||
issue_date DATE,
|
||||
valid_until DATE,
|
||||
status ENUM('draft', 'sent', 'approved', 'rejected'),
|
||||
subtotal DECIMAL(10,2),
|
||||
tax_percentage DECIMAL(5,2),
|
||||
tax_amount DECIMAL(10,2),
|
||||
total_amount DECIMAL(10,2),
|
||||
terms_and_conditions TEXT,
|
||||
notes TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME ON UPDATE CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (request_id) REFERENCES service_requests(id)
|
||||
);
|
||||
|
||||
-- Tabel Peralatan Sampling
|
||||
CREATE TABLE sampling_equipment (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
equipment_name VARCHAR(100),
|
||||
equipment_code VARCHAR(50),
|
||||
is_available BOOLEAN DEFAULT true,
|
||||
last_calibration_date DATE,
|
||||
next_calibration_date DATE,
|
||||
notes TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Tabel Peralatan yang Digunakan dalam Sampling
|
||||
CREATE TABLE request_equipment (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
request_id INT,
|
||||
equipment_id INT,
|
||||
usage_date DATE,
|
||||
return_date DATE,
|
||||
notes TEXT,
|
||||
FOREIGN KEY (request_id) REFERENCES service_requests(id),
|
||||
FOREIGN KEY (equipment_id) REFERENCES sampling_equipment(id)
|
||||
);
|
||||
|
||||
-- Contoh data template sampling
|
||||
INSERT INTO sampling_templates (template_name, description) VALUES
|
||||
('Air Limbah Industri', 'Template untuk sampling air limbah industri'),
|
||||
|
||||
Reference in New Issue
Block a user