You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

535 lines
26 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html lang="en" dir="">
  3. <html xmlns:th="http://www.thymeleaf.org">
  4. <head th:replace="~{fragments/modules/base/head :: head}"></head>
  5. <body>
  6. <!--[if lt IE 8]>
  7. <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
  8. <![endif]-->
  9. <div class="wrapper">
  10. <!-- header top menu Start -->
  11. <header th:replace="~{fragments/modules/base/header :: header}"></header>
  12. <!-- header top menu end -->
  13. <div class="page-wrap">
  14. <!--=============== Left Menu side Start ================-->
  15. <div th:replace="~{fragments/modules/base/menu :: menu}"></div>
  16. <!--=============== Left side End ================-->
  17. <div class="main-content">
  18. <div class="container-fluid">
  19. <div class="page-header">
  20. <div class="row align-items-end">
  21. <div class="col-lg-4">
  22. <div class="page-header-title">
  23. <i class='fa fa-paper-plane' style='font-size:24px; color: #1aafd4'></i>
  24. <div class="d-inline">
  25. <h5>License Issued Info</h5>
  26. <span>Pet Registration</span>
  27. </div>
  28. </div>
  29. </div>
  30. <!-- <div class="col-lg-4">
  31. <nav class="breadcrumb-container" aria-label="breadcrumb">
  32. <ol class="breadcrumb">
  33. <li class="breadcrumb-item">
  34. <a href="/index"><i class="ik ik-home"></i></a>
  35. </li>
  36. <li class="breadcrumb-item">Asset QR Feedback</li>
  37. <li class="breadcrumb-item">Master</li>
  38. <li class="breadcrumb-item active" aria-current="page">Category</li>
  39. </ol>
  40. </nav>
  41. </div> -->
  42. <div class="col-lg-5">
  43. <div class="content">
  44. <div class="block block-rounded">
  45. <div class="block-header block-header-default" style="display: block;">
  46. <form class="row" action="javascript:getbydate()">
  47. <div class="row">
  48. <div class="col-4">
  49. <input type="date" th:value="${fromDate}" class="form-control"
  50. name="FromDate" id="fromdate"
  51. data-date-format="yyyy-mm-dd" />
  52. </div>
  53. <div class="col-4">
  54. <input type="date" th:value="${toDate}" class="form-control"
  55. name="ToDate" id="todate" data-date-format="yyyy-mm-dd" />
  56. </div>
  57. <div class="col-2 p-0 text-center">
  58. <button type="submit" class="btn btn-sm btn-primary"
  59. name="submit" id="submit"
  60. onclick="getbydate()">Submit</button>
  61. <br>
  62. </div>
  63. <div class="col-2 p-0 text-center">
  64. <button class="btn btn-danger" onclick="resetDate()"
  65. name="reset" type="reset">Reset</button>
  66. </div>
  67. </div>
  68. </div>
  69. </form>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="col-lg-3">
  74. <nav class="breadcrumb-container" aria-label="breadcrumb">
  75. <ol class="breadcrumb">
  76. <li class="breadcrumb-item">
  77. <a href="/index"><i class="ik ik-home"></i></a>
  78. </li>
  79. <li class="breadcrumb-item">Pet Registration</li>
  80. <li class="breadcrumb-item">Lisense</li>
  81. </ol>
  82. </nav>
  83. </div>
  84. </div>
  85. </div>
  86. <hr>
  87. <div class="row">
  88. <div class="col-md-12">
  89. <div class="card">
  90. <div class="card-block">
  91. <div>
  92. <table id="assetDatatable"
  93. class="table table-striped table-bordered table-hover dataTable" role="grid"
  94. width="99.5%">
  95. <thead class="thead-dark">
  96. <tr role="row">
  97. <th>S.No</th>
  98. <th>Type</th>
  99. <th>Issued By</th>
  100. <th>UpDated Date</th>
  101. <th>Pet Photo</th>
  102. <th>Rabies certi</th>
  103. <th>License Info</th>
  104. <th class="text-center no-sort">Owner Info</th>
  105. </tr>
  106. </theadclass="thead-dark">
  107. <tbody>
  108. <tr th:each="list, i : ${petlist}" class="${petlist}">
  109. <td th:text="${i.count}">0</td>
  110. <td th:text="${list.species}"></td>
  111. <td th:text="${list.updatedby}"></td>
  112. <td th:text="${list.statusdate}"></td>
  113. <td class="text-center">
  114. <button type="button"
  115. th:onclick="petimg([[${list.mobilenum}]],[[${list.uniqueid}]])"
  116. class="btn btn-primary">
  117. view
  118. </button>
  119. </td>
  120. <td class="text-center">
  121. <button type="button"
  122. th:onclick="certificateimg([[${list.mobilenum}]],[[${list.uniqueid}]])"
  123. class="btn btn-primary">
  124. view
  125. </button>
  126. </td>
  127. <td>
  128. <p>
  129. <span class="badge bg-success"
  130. th:onclick="licenceInfo([[${list.mobilenum}]],[[${list.uniqueid}]])"
  131. style="cursor: pointer;">Info</span>
  132. </p>
  133. </td>
  134. <td class="text-center">
  135. <a th:onclick="viewOwner( [[${list.mobilenum}]] );"
  136. data-bs-toggle="tooltip" data-bs-animation="true"
  137. data-bs-placement="top" title="View PetOwner info"><i
  138. class="fa-regular fa-user"
  139. style="font-size: 18px;cursor: pointer;"></i></a>
  140. </td>
  141. </tr>
  142. </tbody>
  143. <tfoot class="thead-dark">
  144. <tr>
  145. <th>S.No</th>
  146. <th>Type</th>
  147. <th>Issued By</th>
  148. <th>UpDated Date</th>
  149. <th>Pet Photo</th>
  150. <th>Rabies certi</th>
  151. <th>License Info</th>
  152. <th>Owner Info</th>
  153. </tr>
  154. </tfoot>
  155. </table>
  156. </div>
  157. </div>
  158. <!-- Modal -->
  159. <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"
  160. aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
  161. <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
  162. <div class="modal-content">
  163. <div class="modal-header">
  164. <h5 class="modal-title" id="exampleModalCenterLabel">Photo</h5>
  165. <button type="button" class="close" data-dismiss="modal"
  166. aria-label="Close"><span aria-hidden="true">&times;</span></button>
  167. </div>
  168. <div class="modal-body">
  169. <img alt="" id="myImg" src="" style="width:100%">
  170. </div>
  171. <div class="modal-footer">
  172. <button type="button" class="btn btn-secondary"
  173. data-dismiss="modal">Close</button>
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. <footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
  184. </div>
  185. </div>
  186. <!--license info State -->
  187. <div class="modal fade" id="licForm" tabindex="-1" role="dialog" aria-labelledby="licFormCenterLabel"
  188. aria-hidden="true">
  189. <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
  190. <div class="modal-content">
  191. <div class="modal-header">
  192. <h5 class="modal-title" id="licFormCenterLabel">License information</h5>
  193. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
  194. aria-hidden="true">&times;</span></button>
  195. </div>
  196. <div class="modal-body">
  197. <div class="row">
  198. <input type="hidden" class="form-control text-center" name="uniqid" id="uniqid" disabled />
  199. <div class="col-xl-6 col-md-12"> <strong>pet Id:</strong>
  200. <p class="text-muted form-control showInputValue" id="uniqueid"></p>
  201. </div>
  202. <div class="col-xl-6 col-md-12"> <strong>License No:</strong>
  203. <p class="text-muted form-control showInputValue" id="licno"></p>
  204. </div>
  205. <div class="col-xl-6 col-md-12"> <strong>Phone No:</strong>
  206. <p class="text-muted form-control showInputValue" id="phonee"></p>
  207. </div>
  208. <div class="col-xl-6 col-md-12"> <strong>validity:</strong>
  209. <p class="text-muted form-control showInputValue" id="valid"></p>
  210. </div>
  211. <!-- <div class="block-content block-content-full text-end bg-body" id="mbutton3">
  212. <button type="button" class="btn btn-sm btn-alt-primary" onclick="viewfulllicense()">View</button>
  213. <button type="button" class="btn btn-sm btn-alt-secondary" data-bs-dismiss="modal">Close</button>
  214. </div> -->
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. <!-- owner Info -->
  222. <div class="modal fade" id="ownerForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel"
  223. aria-hidden="true">
  224. <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
  225. <div class="modal-content">
  226. <div class="modal-header">
  227. <h5 class="modal-title" id="exampleModalCenterLabel">Pet Owner information</h5>
  228. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
  229. aria-hidden="true">&times;</span></button>
  230. </div>
  231. <div class="modal-body">
  232. <div class="row">
  233. <input type="hidden" class="form-control text-center" name="uniqid" id="uniqid" disabled />
  234. <div class="col-xl-6 col-md-12"> <strong>Tittle</strong>
  235. <p class="text-muted form-control showInputValue" id="title"></p>
  236. </div>
  237. <div class="col-xl-6 col-md-12"> <strong>Pet Owner Name</strong>
  238. <p class="text-muted form-control showInputValue" id="fname"></p>
  239. </div>
  240. <div class="col-xl-6 col-md-12"> <strong>Door No</strong>
  241. <p class="text-muted form-control showInputValue" id="doornumber"></p>
  242. </div>
  243. <div class="col-xl-6 col-md-12"> <strong>Street</strong>
  244. <p class="text-muted form-control showInputValue" id="street"></p>
  245. </div>
  246. <div class="col-xl-6 col-md-12"> <strong>Area</strong>
  247. <p class="text-muted form-control showInputValue" id="area"></p>
  248. </div>
  249. <div class="col-xl-6 col-md-12"> <strong>City</strong>
  250. <p class="text-muted form-control showInputValue" id="city"></p>
  251. </div>
  252. <div class="col-xl-6 col-md-12"> <strong>Pincode</strong>
  253. <p class="text-muted form-control showInputValue" id="pincode"></p>
  254. </div>
  255. <div class="col-xl-6 col-md-12"> <strong>Zone</strong>
  256. <p class="text-muted form-control showInputValue" id="zone"></p>
  257. </div>
  258. <div class="col-xl-6 col-md-12"> <strong>Ward</strong>
  259. <p class="text-muted form-control showInputValue" id="ward"></p>
  260. </div>
  261. <div class="col-xl-6 col-md-12"> <strong>Contact No</strong>
  262. <p class="text-muted form-control showInputValue" id="phone"></p>
  263. </div>
  264. <div class="col-xl-6 col-md-12"> <strong>Email Id</strong>
  265. <p class="text-muted form-control showInputValue" id="email"></p>
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. <!-- End owner Info -->
  273. <!-- pet License -->
  274. <!-- <div class="modal fade backdrop" id="getpetlic" data-backdrop="static" tabindex="-1" role="dialog"
  275. aria-labelledby="staticBackdropLabel" aria-hidden="true">
  276. <div class="modal-dialog modal-xl" role="document">
  277. <div class="modal-content">
  278. <div class="block block-rounded block-themed block-transparent mb-0">
  279. <div class="block-header bg-primary-dark">
  280. <h3 class="block-title" id="lic">Download License</h3>
  281. <button onclick="printme()" class="btn btn-sm btn-primary">Print</button>
  282. <div class="block-options">
  283. <button onclick="closeme()" class="btn-block-option">
  284. <i class="fa fa-fw fa-times"></i>
  285. </button>
  286. </div>
  287. </div>
  288. <div id="htmldatatxt">
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. </div>
  294. -->
  295. <div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
  296. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  297. <script type="text/javascript">
  298. $(document).ready(function () {
  299. // DataTables buttons configuration
  300. var buttons = [
  301. {
  302. extend: 'pageLength',
  303. className: 'btn btn-warning'
  304. },
  305. {
  306. title: 'Data export',
  307. extend: 'copyHtml5',
  308. text: 'Copy',
  309. className: 'btn btn-secondary',
  310. id: 'copyBtn'
  311. },
  312. {
  313. extend: 'excelHtml5',
  314. text: 'Excel',
  315. className: 'btn btn-secondary',
  316. id: 'excelBtn'
  317. },
  318. {
  319. extend: 'csvHtml5',
  320. text: 'CSV',
  321. className: 'btn btn-secondary',
  322. id: 'csvBtn'
  323. },
  324. {
  325. extend: 'pdfHtml5',
  326. text: 'PDF',
  327. className: 'btn btn-secondary',
  328. id: 'pdfBtn'
  329. },
  330. ];
  331. $('#assetDatatable').DataTable({
  332. dom: 'Bftip',
  333. columnDefs: [
  334. { targets: 'no-sort', orderable: false }
  335. ],
  336. lengthMenu: [
  337. [50, 100, 200, 500, -1],
  338. ['50 rows', '100 rows', '200 rows', '500 rows', 'Show all']
  339. ],
  340. scrollY: '50vh',
  341. fixedColumns: {
  342. left: 1,
  343. right: 1
  344. },
  345. buttons: [buttons],
  346. responsive: true,
  347. searching: true,
  348. select: false,
  349. processing: false,
  350. });
  351. $('#searchInput').on('keyup', function () {
  352. dataTable.search(this.value).draw();
  353. });
  354. });
  355. function petimg(mobno, uniqueid) {
  356. $.ajax({
  357. type: "GET",
  358. url: '/api/pet/getpetimg',
  359. data: {
  360. 'mobno': mobno,
  361. 'uniqueid': uniqueid
  362. },
  363. success: function (x) {
  364. document.getElementById("myImg").src = "data:image/jpeg;base64," + x;
  365. }
  366. });
  367. $('#exampleModal').modal({
  368. backdrop: 'static',
  369. keyboard: false
  370. });
  371. $('#exampleModal').modal('show');
  372. }
  373. function certificateimg(mobno, uniqueid) {
  374. $.ajax({
  375. type: "GET",
  376. url: '/api/pet/getvacimg',
  377. data: {
  378. 'mobno': mobno,
  379. 'uniqueid': uniqueid
  380. },
  381. success: function (x) {
  382. document.getElementById("myImg").src = "data:image/jpeg;base64," + x;
  383. }
  384. });
  385. $('#exampleModal').modal({
  386. backdrop: 'static',
  387. keyboard: false
  388. });
  389. $('#exampleModal').modal('show');
  390. //document.getElementById("myImg").src ="data:image/jpeg;base64,"+x.rabiesvacCerti;
  391. }
  392. function viewOwner(mobilenum) {
  393. let own;
  394. $.ajax({
  395. type: "GET",
  396. url: '/api/pet/getpetOwner',
  397. data: { 'mobilenum': mobilenum },
  398. success: function (bodyMessage) {
  399. ownercall(bodyMessage);
  400. }
  401. });
  402. }
  403. function ownercall(list) {
  404. $('#ownerForm').modal({
  405. backdrop: 'static',
  406. keyboard: false
  407. });
  408. $('#ownerForm').modal('show');
  409. document.getElementById("title").innerHTML = list.title;
  410. document.getElementById("fname").innerHTML = list.fname;
  411. document.getElementById("doornumber").innerHTML = list.doornumber;
  412. document.getElementById("street").innerHTML = list.street;
  413. document.getElementById("area").innerHTML = list.area;
  414. document.getElementById("city").innerHTML = list.city;
  415. document.getElementById("pincode").innerHTML = list.pincode;
  416. document.getElementById("zone").innerHTML = list.zone;
  417. document.getElementById("ward").innerHTML = list.ward;
  418. document.getElementById("phone").innerHTML = list.phone;
  419. document.getElementById("email").innerHTML = list.email;
  420. document.getElementById("pancard").innerHTML = list.pancard;
  421. document.getElementById("aadhar").innerHTML = list.aadhar;
  422. document.getElementById("voterid").innerHTML = list.voterid;
  423. }
  424. // Function to call modal for New pet registration
  425. callAdd = function () {
  426. $('#addForm').modal({
  427. backdrop: 'static',
  428. keyboard: false
  429. })
  430. $('#addForm').modal('show');
  431. }
  432. function licenceInfo(mobno, uniqueid) {
  433. $.ajax({
  434. type: "GET",
  435. url: '/api/pet/getlicenseinfo',
  436. data: {
  437. 'mobilenum': mobno,
  438. 'uniqueid': uniqueid
  439. },
  440. success: function (list) {
  441. $('#licForm').modal({
  442. backdrop: 'static',
  443. keyboard: false
  444. });
  445. $('#licForm').modal('show');
  446. document.getElementById("uniqueid").innerHTML = list.uniqueid;
  447. document.getElementById("licno").innerHTML = list.licenseNo;
  448. document.getElementById("phonee").innerHTML = list.phone;
  449. document.getElementById("valid").innerHTML = list.validity;
  450. }
  451. });
  452. }
  453. function viewfulllicense() {
  454. var id = document.getElementById("uniqueid").value;;
  455. var phone = document.getElementById("phone").value;
  456. //window.open('/owners/getlicensebymobo/'+id+'/'+phone,'_blank');
  457. $.ajax({
  458. type: "GET",
  459. url: '/owners/ /' + id + '/' + phone,
  460. success: function (bodyMessage) {
  461. $("#htmldatatxt").html(bodyMessage);
  462. $('#getpetlic').modal({
  463. backdrop: 'static',
  464. keyboard: false
  465. });
  466. $('#getpetlic').modal('show');
  467. }
  468. })
  469. }
  470. function closeme() {
  471. window.location.reload();
  472. }
  473. function printme() {
  474. var printContent = document.getElementById('htmldatatxt').innerHTML;
  475. var originalContent = document.body.innerHTML;
  476. document.body.innerHTML = printContent;
  477. window.print();
  478. document.body.innerHTML = originalContent;
  479. }
  480. function getbydate() {
  481. var x = document.getElementById("fromdate").value;
  482. var y = document.getElementById("todate").value;
  483. var url = '/pet/licenseIssued?fromDate=' + x + '&toDate=' + y;
  484. window.location.href = url;
  485. }
  486. function resetDate() {
  487. var url = '/pet/licenseIssued';
  488. window.location.href = url;
  489. }
  490. </script>
  491. </body>
  492. </html>