Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

view_wo.blade.php 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. @extends('contractor.layout.master')
  2. @section('ptitle','Contractor')
  3. @section('page_title', 'Work Order')
  4. @section('subpage', 'Graph & Summary Report')
  5. @section('img_profile', asset($user->StaffDetail->user_pic))
  6. @section('login_name', $user->StaffDetail->name )
  7. @section('last_login', $user->last_login_at )
  8. @section('content')
  9. <style>
  10. .ui-tabs .ui-tabs-nav li.ui-tabs-active a { color: #EA5730 !important; }
  11. .ui-widget-content .bRed { color: #fff !important; }
  12. .ui-tabs .ui-tabs-nav li a { color: #636363 !important; }
  13. .ui-tabs .ui-tabs-nav li a:hover { color: #212121 !important; }
  14. .ui-tabs .ui-tabs-nav li.ui-tabs-active a { color: #2E6B9B !important; }
  15. .ui-widget-content a { color: #fff; }
  16. .dt-buttons { background: -webkit-linear-gradient(top, #F8F8F8 0%, #EFEFEF 100%); }
  17. .icos-download { padding-top: 0px; }
  18. .buttons-excel {
  19. padding: 7px 12px;
  20. display: block;
  21. color: #808080;
  22. font-size: 11px;
  23. }
  24. </style>
  25. <!-- Table work order -->
  26. <div class="widget">
  27. <div class="whead"><h6>Important Note</h6></div>
  28. <div class="formRow cussPayment">
  29. <div class="grid-12">
  30. <label style="font-size: 14px;">
  31. After discussion with SHTECH, the flow for <b>Non Prelaid</b> already been update. Here is the flow:- <br>
  32. 1) Customer Service (SHTECH) will assign <b>W/O</b> without the <b>Appoiment Date &amp; Time</b> to the <b>contractor</b> <br>
  33. 2) After the <b>non prelaid</b> install successfully, the <b>contractor</b> must have to <b>manual update</b> the <b>W/O</b> in tab <b>Pending Non Prelaid</b> <br>
  34. 3) To update the <b>W/O</b>, please click the <b>red button</b> with <b>pencil icon</b>, it will show the drop list button, click the <b>update status W/O</b> <br>
  35. 4) The <b>W/O</b> will be assign back to <b>Customer Service (SHTECH)</b> <br>
  36. 5) Customer Service (SHTECH) will assign the <b>Appoiment Date &amp; Time</b> including the <b>contractor</b> with the <b>same W/O</b> to do the <b>Activation (Prelaid)</b>. <br>
  37. ** <b>There will be no involvement of CBB apps for Non Prelaid</b> **
  38. </label>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="widget leftTabs tableTabs">
  43. <div class="whead"><h6>Work Order's Data Table</h6></div>
  44. <div class="cuss shownpars responsive">
  45. <div class="tabs">
  46. <ul>
  47. <li><a href="#nwo">Pending Contractor <small style="color:#B35D7E">({{ $pc }})</small></a></li>
  48. <li><a href="#pps">Pending Non Prelaid <small style="color:#B35D7E">({{ $pp }})</small></a></li>
  49. <li><a href="#pending">Pending Installer <small style="color:#B35D7E">({{ $pi }})</small></a></li>
  50. <li><a href="#completed">Completed <small style="color:#B35D7E">({{ $cm }})</small></a></li>
  51. </ul>
  52. <div id="nwo">
  53. <table id="cont" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  54. <thead>
  55. <tr>
  56. <th>#</th>
  57. <th width="40">Service</th>
  58. <th width="40">W/O</th>
  59. <th width="60">Cust.Name</th>
  60. <th width="100">Contact No.</th>
  61. <th width="60">Unit No.</th>
  62. <th>Building</th>
  63. <th>City</th>
  64. <th>Package</th>
  65. <th>Contractor</th>
  66. <th>Installer</th>
  67. <th>Date</th>
  68. <th width="60">Time</th>
  69. <th>Status</th>
  70. <th width="120">Actions</th>
  71. </tr>
  72. </thead>
  73. </table>
  74. </div>
  75. <div id="pps">
  76. <table id="pnon" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  77. <thead>
  78. <tr>
  79. <th>#</th>
  80. <th width="40">Service</th>
  81. <th width="40">W/O</th>
  82. <th width="60">Cust.Name</th>
  83. <th width="100">Contact No.</th>
  84. <th>Unit No.</th>
  85. <th>Building</th>
  86. <th>City</th>
  87. <th>Package</th>
  88. <th>Contractor</th>
  89. <th>Installer</th>
  90. <th>Date</th>
  91. <th width="60">Time</th>
  92. <th>Status</th>
  93. <th width="100">Actions</th>
  94. </tr>
  95. </thead>
  96. </table>
  97. </div>
  98. <div id="pending">
  99. <table id="pinst" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  100. <thead>
  101. <tr>
  102. <th>#</th>
  103. <th width="40">Service</th>
  104. <th width="40">W/O</th>
  105. <th width="60">Cust.Name</th>
  106. <th width="100">Contact No.</th>
  107. <th width="60">Unit No.</th>
  108. <th>Building</th>
  109. <th>City</th>
  110. <th>Package</th>
  111. <th>Contractor</th>
  112. <th>Installer</th>
  113. <th>Date</th>
  114. <th width="60">Time</th>
  115. <th>Status</th>
  116. <th width="120">Actions</th>
  117. </tr>
  118. </thead>
  119. </table>
  120. </div>
  121. <div id="completed">
  122. <table id="comp" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  123. <thead>
  124. <tr>
  125. <th>#</th>
  126. <th width="40">Service</th>
  127. <th width="40">W/O</th>
  128. <th width="60">Cust.Name</th>
  129. <th width="100">Contact No.</th>
  130. <th width="60">Unit No.</th>
  131. <th>Building</th>
  132. <th>City</th>
  133. <th>Package</th>
  134. <th>Contractor</th>
  135. <th>Installer</th>
  136. <th>Date</th>
  137. <th width="60">Time</th>
  138. <th>Status</th>
  139. <th>Docket</th>
  140. <th width="40">Actions</th>
  141. </tr>
  142. </thead>
  143. </table>
  144. </div>
  145. </div>
  146. </div>
  147. <div class="dialog-delete" title="Delete Work Order">
  148. <p id="inner-delete"></p>
  149. </div>
  150. </div>
  151. @endsection
  152. @section('external_js')
  153. <script>
  154. function deleteA(cid,wo) {
  155. var cid = cid;
  156. var wo = wo;
  157. $('.dialog-delete').attr('data-id' , cid);
  158. document.getElementById("inner-delete").innerHTML = "<p>Are you sure want to delete this W/O ( " + wo + " )?</p>";
  159. $('.dialog-delete').dialog('open');
  160. return false;
  161. };
  162. //===== Modal =====//
  163. $('.dialog-delete').dialog({
  164. autoOpen: false,
  165. width: 400,
  166. modal: true,
  167. buttons: {
  168. "Yes!": function () {
  169. var id = $(this).data('id');
  170. // window.alert(email);
  171. $.ajax({
  172. type: "POST",
  173. url: "{{ url('/contractor/delete-work-order') }}",
  174. // "_token": "{{ csrf_token() }}",
  175. data: { "_token": "{{ csrf_token() }}", id: id },
  176. success:function(data)
  177. {
  178. if(data == "true"){
  179. window.location.reload();
  180. }else if(data == "false"){
  181. alert("ERROR!! Cant Delete W/O !");
  182. }
  183. }
  184. });
  185. },
  186. "Cancel": function () {
  187. $(this).dialog("close");
  188. $('.dialog-delete').removeAttr('data-id');
  189. }
  190. }
  191. });
  192. $(document).ready(function(){
  193. var origin = window.location.origin;
  194. //===== Dynamic table toolbars =====//
  195. $('#dyn1 .tOptions').click(function () {
  196. $('#dyn .tablePars').slideToggle(200);
  197. });
  198. $('.tOptions').click(function () {
  199. $(this).toggleClass("act");
  200. });
  201. //======= Filter data table ========//
  202. var table1 = $('#cont').DataTable({
  203. "bJQueryUI": false,
  204. "bAutoWidth": true,
  205. "bSort": false,
  206. "sPaginationType": "full_numbers",
  207. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  208. "oLanguage": {
  209. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  210. },
  211. "ordering": false,
  212. "serverSide": true,
  213. "processing": true,
  214. "ajax": "{{ url('/contractor/get-all-pending-contractor/null/null/null') }}",
  215. "columns": [
  216. { "data": "formT","name": "formT"},
  217. { "data": "service","name": "service"},
  218. { "data": "wo","name": "wo"},
  219. { "data": "name","name": "name"},
  220. { "data": "phone","name": "phone"},
  221. { "data": "unit","name": "unit"},
  222. { "data": "building","name": "building"},
  223. { "data": "city","name": "city"},
  224. { "data": "package", "name": "package"},
  225. { "data": "contractor","name": "contractor"},
  226. { "data": "installer","name": "installer"},
  227. { "data": "date","name": "date"},
  228. { "data": "time","name": "time"},
  229. { "data": "status","name": "status"},
  230. { "data": "action","name": "action"},
  231. ],
  232. "columnDefs": [
  233. {
  234. "render": function ( data, type, row ) {
  235. if (data.indexOf("New/") >= 0) {
  236. var split = data.split('/');
  237. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  238. }else {
  239. return data;
  240. }
  241. },
  242. "targets": 0
  243. },
  244. {
  245. "width":"60px",
  246. "targets": 2
  247. },
  248. {
  249. "render": function ( data, type, row ) {
  250. var link1 = "{{ url('/contractor/work-order/edit') }}"+"/"+data;
  251. var link2 = "{{ url('/contractor/work-order/reschedule') }}"+"/"+data;
  252. var link3 = "{{ url('/contractor/work-order/generate-pdf') }}"+"/"+data;
  253. return '<a href="'+link1+'" class="tablectrl_medium bGreen tipS" original-title="Edit Detail W/O"><span class="iconb" data-icon=""></span></a> <a href="'+link2+'" class="tablectrl_medium bBlue tipS" original-title="Reassign/Change Datetime W/O"><span class="iconb" data-icon=""></span></a> <a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  254. },
  255. "targets": 14
  256. }
  257. ],
  258. });
  259. var table2 = $('#pnon').DataTable({
  260. "bJQueryUI": false,
  261. "bAutoWidth": true,
  262. "bSort": false,
  263. "sPaginationType": "full_numbers",
  264. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  265. "oLanguage": {
  266. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  267. },
  268. "ordering": false,
  269. "serverSide": true,
  270. "processing": true,
  271. "ajax": "{{ url('/contractor/get-all-pending-non/null/null/null') }}",
  272. "columns": [
  273. { "data": "formT","name": "formT"},
  274. { "data": "service","name": "service"},
  275. { "data": "wo","name": "wo"},
  276. { "data": "name","name": "name"},
  277. { "data": "phone","name": "phone"},
  278. { "data": "unit","name": "unit"},
  279. { "data": "building","name": "building"},
  280. { "data": "city","name": "city"},
  281. { "data": "package", "name": "package"},
  282. { "data": "contractor","name": "contractor"},
  283. { "data": "installer","name": "installer"},
  284. { "data": "date","name": "date"},
  285. { "data": "time","name": "time"},
  286. { "data": "status","name": "status"},
  287. { "data": "action","name": "action"},
  288. ],
  289. "columnDefs": [
  290. {
  291. "render": function ( data, type, row ) {
  292. if (data.indexOf("New/") >= 0) {
  293. var split = data.split('/');
  294. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  295. }else {
  296. return data;
  297. }
  298. },
  299. "targets": 0
  300. },
  301. {
  302. "render": function ( data, type, row ) {
  303. var link1 = "{{ url('/contractor/update-status-work-order') }}"+"/"+row.wo;
  304. var link2 = "{{ url('/contractor/work-order/generate-pdf') }}"+"/"+data;
  305. return '<div class="btn-group"><a href="" class="tablectrl_medium bRed tipS" data-toggle="dropdown" original-title="Update Status W/O"><span class="iconb" data-icon=""></span></a><ul class="dropdown-menu pull-right"><li><a href="'+link1+'">Update Status W/O</a></li></ul></div> <a target="_blank" href="'+link2+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  306. },
  307. "targets": 14
  308. }
  309. ],
  310. });
  311. var table4 = $('#pinst').DataTable({
  312. "bJQueryUI": false,
  313. "bAutoWidth": true,
  314. "bSort": false,
  315. "sPaginationType": "full_numbers",
  316. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  317. "oLanguage": {
  318. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  319. },
  320. "ordering": false,
  321. "serverSide": true,
  322. "processing": true,
  323. "ajax": "{{ url('/contractor/get-all-pending-installer/null/null/null') }}",
  324. "columns": [
  325. { "data": "formT","name": "formT"},
  326. { "data": "service","name": "service"},
  327. { "data": "wo","name": "wo"},
  328. { "data": "name","name": "name"},
  329. { "data": "phone","name": "phone"},
  330. { "data": "unit","name": "unit"},
  331. { "data": "building","name": "building"},
  332. { "data": "city","name": "city"},
  333. { "data": "package", "name": "package"},
  334. { "data": "contractor","name": "contractor"},
  335. { "data": "installer","name": "installer"},
  336. { "data": "date","name": "date"},
  337. { "data": "time","name": "time"},
  338. { "data": "status","name": "status"},
  339. { "data": "action","name": "action"},
  340. ],
  341. "columnDefs": [
  342. {
  343. "render": function ( data, type, row ) {
  344. if (data.indexOf("New/") >= 0) {
  345. var split = data.split('/');
  346. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  347. }else {
  348. return data;
  349. }
  350. },
  351. "targets": 0
  352. },
  353. {
  354. "render": function ( data, type, row ) {
  355. var link1 = "{{ url('/contractor/work-order/edit') }}"+"/"+data;
  356. var link2 = "{{ url('/contractor/work-order/reschedule') }}"+"/"+data;
  357. var link3 = "{{ url('/contractor/work-order/generate-pdf') }}"+"/"+data;
  358. return '<a href="'+link1+'" class="tablectrl_medium bGreen tipS" original-title="Edit Detail W/O"><span class="iconb" data-icon=""></span></a> <a href="'+link2+'" class="tablectrl_medium bBlue tipS" original-title="Reassign/Change Datetime W/O"><span class="iconb" data-icon=""></span></a> <a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  359. },
  360. "targets": 14
  361. }
  362. ],
  363. });
  364. var table7 = $('#comp').DataTable({
  365. "bJQueryUI": false,
  366. "bAutoWidth": true,
  367. "bSort": false,
  368. "sPaginationType": "full_numbers",
  369. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  370. "oLanguage": {
  371. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  372. },
  373. "ordering": false,
  374. "serverSide": true,
  375. "processing": true,
  376. "ajax": "{{ url('/contractor/get-all-completed/null/null/null') }}",
  377. "columns": [
  378. { "data": "formT","name": "formT"},
  379. { "data": "service","name": "service"},
  380. { "data": "wo","name": "wo"},
  381. { "data": "name","name": "name"},
  382. { "data": "phone","name": "phone"},
  383. { "data": "unit","name": "unit"},
  384. { "data": "building","name": "building"},
  385. { "data": "city","name": "city"},
  386. { "data": "package", "name": "package"},
  387. { "data": "contractor","name": "contractor"},
  388. { "data": "installer","name": "installer"},
  389. { "data": "date","name": "date"},
  390. { "data": "time","name": "time"},
  391. { "data": "status","name": "status"},
  392. { "data": "docket","name": "docket"},
  393. { "data": "action","name": "action"},
  394. ],
  395. "columnDefs": [
  396. {
  397. "render": function ( data, type, row ) {
  398. if (data.indexOf("New/") >= 0) {
  399. var split = data.split('/');
  400. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  401. }else {
  402. return data;
  403. }
  404. },
  405. "targets": 0
  406. },
  407. {
  408. "render": function ( data, type, row ) {
  409. var link = "{{ url('/contractor/work-order/generate-pdf') }}"+"/"+data;
  410. return '<a target="_blank" href="'+link+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  411. },
  412. "targets": 15
  413. }
  414. ],
  415. });
  416. //===== Modal =====//
  417. // $('#fbyear,#fbmonth').change(function() {
  418. // var link1 = "{{ url('/contractor/get-all-pending-contractor') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  419. // table1.ajax.url( link1 ).load();
  420. // var link2 = "{{ url('/contractor/get-all-pending-non') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  421. // table2.ajax.url( link2 ).load();
  422. // var link4 = "{{ url('/contractor/get-all-pending-installer') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  423. // table4.ajax.url( link4 ).load();
  424. // var link7 = "{{ url('/contractor/get-all-completed') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  425. // table7.ajax.url( link7 ).load();
  426. // });
  427. });
  428. </script>
  429. @endsection