-
-
Save donhuvy/2de640fbe640c1bce7414fb54e97fe58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> | |
<th:block th:include="fragments/header"></th:block> | |
<br/> | |
<br/> | |
<a th:href="@{/inventory_item_categories}" class="k-button k-primary" title="Danh sách Nhóm vật tư, hàng hóa, dịch vụ"><span class="k-icon k-i-list-bulleted" style="color: gold;"></span> Danh sách Nhóm KH, NCC</a> | |
<br/> | |
<br/> | |
<h3>SỬA NHÓM VẬT TƯ, HÀNG HÓA, DỊCH VỤ</h3> | |
<br/> | |
<br/> | |
<form method="post" th:action="@{'/edit_inventory_item_category'}" th:object="${inventoryItemCategoryForm}"> | |
<table style="width: 1366px;"> | |
<tr> | |
<td style="width: 25%;"><h3>Thông tin chung</h3></td> | |
<td style="width: 25%;"></td> | |
<td style="width: 25%;"> | |
<span th:if="${#fields.hasErrors('id')}" th:errors="*{id}" class="k-error-colored">Error</span> | |
</td> | |
<td style="width: 25%;"> | |
<input type="number" th:field="*{id}" hidden> | |
</td> | |
</tr> | |
<tr> | |
<td><label th:for="inventoryCategoryCode">Mã<span class="b-require">*</span></label></td> | |
<td> | |
<input type="text" th:field="*{inventoryCategoryCode}" class="k-textbox" style="width: 100%;"> | |
<span th:if="${#fields.hasErrors('inventoryCategoryCode')}" th:errors="*{inventoryCategoryCode}" class="k-error-colored">inventoryCategoryCode Error</span> | |
</td> | |
<td><label th:for="inventoryCategoryName" class="required">Tên<span class="b-require">*</span></label></td> | |
<td> | |
<input type="text" th:field="*{inventoryCategoryName}" class="k-textbox" style="width: 100%;" required validationMessage="Tên Nhóm vật tư, hàng hóa, dịch vụ không được để trống"> | |
<span th:if="${#fields.hasErrors('inventoryCategoryName')}" th:errors="*{inventoryCategoryName}" class="k-error-colored"></span> | |
</td> | |
</tr> | |
<tr> | |
<td><label th:for="parentId">Thuộc</label></td> | |
<td><input type="number" th:field="*{parentId}" style="width: 100%;"> | |
<script> | |
$(document).ready(function () { | |
var data = new kendo.data.DataSource({ | |
transport: { | |
read: { | |
url: "/active_inventory_item_categories_json", | |
dataType: "json" | |
} | |
}, | |
pageSize: 30 | |
}); | |
$("#parentId").kendoMultiColumnComboBox({ | |
dataTextField: "inventoryCategoryCode", | |
dataValueField: "id", | |
height: 500, | |
columns: [ | |
{field: "inventoryCategoryCode", title: "Mã Nhóm VT, HH, DV", width: 200}, | |
{ field: "inventoryCategoryName", title: "Tên Nhóm VT, HH, DV", width: 400 } | |
// ,{ field: "address", title: "Địa chỉ", width: 400 }, | |
//{ field: "companyTaxCode", title: "Mã số thuế", width: 150 }, | |
//{ field: "tel", template: "#= (tel == null) ? '' : tel #", title: "Điện thoại", width: 120 } | |
], | |
footerTemplate: 'Tìm thấy #: instance.dataSource.total() # Mã nhóm VT, HH, DV', | |
filter: "contains", | |
filterFields: ["inventoryCategoryCode", "inventoryCategoryName"], | |
dataSource: data, | |
change: onChangeParentId | |
}); | |
}); | |
function onChangeParentId(e) { } | |
</script> | |
</td> | |
<td> | |
<p th:if="${#fields.hasErrors('activeStatus')}" th:errors="*{activeStatus}" class="k-error-colored">Error</p> | |
</td> | |
<td><input type="checkbox" th:checked="${inventoryItemCategoryForm.activeStatus}" name="activeStatus" id="activeStatus" class="k-checkbox"><label for="activeStatus" class="k-checkbox-label">Trạng thái theo dõi</label></td> | |
</tr> | |
<tr> | |
<td colspan="4" style="text-align: center; padding-top: 15px;"> | |
<button type="submit" class="k-button k-primary"><span class="k-icon k-i-edit" style="color: gold;"></span> Cập nhật</button> | |
</td> | |
</tr> | |
</table> | |
</form> | |
<script> | |
$(document).ready(function () { | |
var validator = $("#inventoryItemCategoryForm").kendoValidator().data("kendoValidator"), status = $(".status"); | |
}); | |
</script> | |
<br/> | |
<br/> | |
Lưu ý: <span class="b-require">*</span> là các trường bắt buộc phải nhập | |
<th:block th:include="fragments/footer"></th:block> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment