NonInventPurchasingSystem/CPRNIMS.WebApps/Views/ItemMgmt/ItemCart.cshtml

143 lines
8.1 KiB
Plaintext

<body>
<div class="container-fluid">
<input hidden id="requestTypeId" value="@ViewBag.TypeOfRequest" />
<div class="section-container shadow-lg p-3 mb-5 bg-white rounded">
<div class="header-container">
<h3 id="normalPR" style="display: flex; flex-direction: column; align-items: center;">P.R. Item Cart Request</h3>
<h3 id="internalRequest" style="display: flex; flex-direction: column; align-items: center;">Internal Cart Item Request</h3>
<h3 id="specialPR" style="display: flex; flex-direction: column; align-items: center;">Assisted Item Cart Request</h3>
</div>
<label for="totalSelected" style="font-size:medium;">Total Selected : </label>
<label id="totalSelected" style="margin-bottom:20px; width:50px; font-weight:bold; color:red;"></label>
<table id="ItemCartTable" class="row-border" cellspacing="0" width="100%">
<thead>
<tr>
<th style="text-align:left;width:4%;">
All
<input id="selectAllCheckboxItem" type="checkbox"
class="selectAllCheckboxItem" />
</th>
<th>ItemNo</th>
<th>ItemName</th>
<th>CategoryName</th>
<th>PRTypeId</th>
<th>Qty</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div style="margin-top:20px;" class="d-flex justify-content-end">
<a class="btn btn-outline-secondary px-4" asp-area="" asp-controller="ItemMgmt" asp-action="Index" style="margin-bottom:20px; margin-right:10px;">
<i class="bi bi-x-circle me-2"></i>Back
</a>
<button id="btnSubmitItem" type="button" class="btn btn-success" onclick="showModal();" style="margin-bottom:20px; margin-right:10px;">
<i class="bi bi-check-circle me-2"></i> Submit
</button>
</div>
</div>
<!-- Modal -->
<div class="modal fade custom-modal-backdrop" id="addDateNeeded"
tabindex="-1" aria-labelledby="addDateNeededLabel" aria-hidden="true" data-bs-backdrop="static">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-0 shadow-lg">
<div class="modal-header">
<h5 id="addDateNeededLabel" class="modal-title fw-semibold">
<i class="bi bi-clipboard-check me-2"></i>Purchase Request Details
</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body p-4">
<!-- Date Needed -->
<div class="mb-3">
<label id="labelDateNeeded" for="dateNeeded" class="form-label fw-light">
Date Needed <span class="text-danger">*</span>
</label>
<input type="date" class="form-control form-control"
id="dateNeeded" name="dateNeeded" required />
</div>
<!-- Project Code Autocomplete -->
<div class="mb-3">
<label for="projectCode" class="form-label fw-semibold">
Project Code <small class="text-muted">(Optional)</small>
</label>
<input type="search" id="projectCode" placeholder="Start typing here..."
class="form-control mb-2" name="projectCode" />
<input type="hidden" id="projectCodeId" class="form-control" name="projectCodeId" />
<!-- Options will be populated dynamically via JavaScript -->
<div class="form-text">
<i class="bi bi-info-circle me-1"></i>Search and select the appropriate project code
</div>
</div>
<!-- File Attachment -->
<div class="mb-3">
<label for="fileAttachment" class="form-label fw-semibold">
Attachment <small class="text-muted">(Optional)</small>
</label>
<input type="file" class="form-control"
id="fileAttachment" name="fileAttachment"
accept=".csv,.xlsx,.xls,.pdf" />
<div class="form-text">
<i class="bi bi-paperclip me-1"></i>Accepted formats: CSV, Excel (.xlsx, .xls), PDF (Max 5MB)
</div>
<!-- File preview area -->
<div id="filePreview" class="mt-2 d-none">
<div class="alert alert-success alert-dismissible fade show py-2" role="alert">
<i class="bi bi-file-earmark-check me-2"></i>
<span id="fileName"></span>
<small class="text-muted ms-2">(<span id="fileSize"></span>)</small>
<button type="button" class="btn-close py-2" onclick="clearFileAttachment()"></button>
</div>
</div>
</div>
<!-- Remarks -->
<div class="mb-3">
<label for="requestorRemarks" class="form-label fw-semibold">
Remarks <small class="text-muted">(Optional)</small>
</label>
<textarea id="requestorRemarks" class="form-control"
rows="4"
placeholder="Add any additional notes or comments here..."></textarea>
<div class="form-text">
<span id="charCount">0</span>/100 characters
</div>
</div>
<!-- Charge To -->
<div class="mb-3">
<label id="labelChargeTo" for="chargeTo" class="form-label fw-semibold">
Charge To <span class="text-danger">*</span>
</label>
<select id="chargeTo" class="form-select form-select-lg" name="chargeTo" required>
<option value="" selected disabled>-- Select Department --</option>
<!-- Options populated dynamically -->
</select>
<input type="hidden" id="departmentId" name="departmentId" />
</div>
</div>
<div class="modal-footer bg-light border-0 p-3">
<button type="button" class="btn btn-outline-secondary px-4" data-bs-dismiss="modal">
<i class="bi bi-x-circle me-2"></i>Cancel
</button>
<button type="button" id="btnConfirmUpdate" onclick="postPutPurchase()" class="btn btn-success px-4">
<i class="bi bi-check-circle me-2"></i>Submit Request
</button>
</div>
</div>
</div>
</div>
</div>
<link href="~/css/item/cartv2.css" rel="stylesheet" />
@await Html.PartialAsync("PagesView/Item/_Scripts")
<script src="~/JsFunctions/Items/ItemCartV4.js"></script>
</body>