repairRecord.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <?php
  2. $repairType_arr = array(0=>'远程维修',1=>'上门维修');
  3. $allocationType_arr = array(0=>'内部派单',1=>'外部派单');
  4. $repairResult_arr = array(0=>'确认已修好',1=>'未修好',2=>'申请已修好');
  5. ?>
  6. <!DOCTYPE html>
  7. <html>
  8. <head>
  9. <meta charset="utf-8">
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  11. <title>维修记录</title>
  12. <meta name="description" content="">
  13. <meta name="keywords" content="">
  14. <link href="/css/ims/base.css" rel="stylesheet">
  15. <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css"/>
  16. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
  17. <style>
  18. .ims-box {
  19. margin: 20px;
  20. }
  21. .screen > div {
  22. margin: 0 5px;
  23. line-height: 30px;
  24. }
  25. .yellow {
  26. color: #FF9900;
  27. }
  28. .screen > input {
  29. height: 30px;
  30. border-radius: 4px;
  31. border: 1px solid #ccc;
  32. box-shadow: none;
  33. text-indent: 10px;
  34. }
  35. .screen button {
  36. padding: 4px 12px;
  37. }
  38. .table-box {
  39. margin-top: 30px;
  40. }
  41. .btn-date_show{
  42. display: inline-block;width: 170px;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
  43. }
  44. </style>
  45. </head>
  46. <body>
  47. <div class="ims-box">
  48. <form action="<?php echo Yii::app()->createUrl('imsDevice/repairRecord'); ?>" method="get">
  49. <div class="screen">
  50. <span class="fl">派单类型:</span>
  51. <div class="diy_select">
  52. <input type="hidden" id="allocationType" name="allocationType" class="diy_select_input" value="<?php echo isset($_GET['allocationType'])?$_GET['allocationType']:-1;?>">
  53. <div class="diy_select_txt pm_status_txt"><?php echo isset($_GET['repairType'])? (isset($allocationType_arr[$_GET['allocationType']])?$allocationType_arr[$_GET['allocationType']]:'请选择') :'请选择';?></div>
  54. <div class="diy_select_btn"></div>
  55. <ul class="diy_select_list pm_status" style="display: none;">
  56. <li val="-1">请选择</li>
  57. <li val="0">内部派单</li>
  58. <li val="1">外部派单</li>
  59. </ul>
  60. </div>
  61. <span class="fl">维修方式:</span>
  62. <div class="diy_select">
  63. <input type="hidden" id="repairType" name="repairType" class="diy_select_input" value="<?php echo isset($_GET['repairType'])?$_GET['repairType']:-1;?>">
  64. <div class="diy_select_txt pm_status_txt"><?php echo isset($_GET['repairType'])? (isset($repairType_arr[$_GET['repairType']])?$repairType_arr[$_GET['repairType']]:'请选择') :'请选择';?></div>
  65. <div class="diy_select_btn"></div>
  66. <ul class="diy_select_list pm_status" style="display: none;">
  67. <li val="-1">请选择</li>
  68. <li val="0">远程维修</li>
  69. <li val="1">上门维修</li>
  70. </ul>
  71. </div>
  72. <span class="fl">维修结果:</span>
  73. <div class="diy_select">
  74. <input type="hidden" id="repairResult" name="repairResult" class="diy_select_input" value="<?php echo isset($_GET['repairResult'])?$_GET['repairResult']:-1;?>">
  75. <div class="diy_select_txt pm_status_txt"><?php echo isset($_GET['repairResult'])? (isset($repairResult_arr[$_GET['repairResult']])?$repairResult_arr[$_GET['repairResult']]:'请选择') :'请选择';?></div>
  76. <div class="diy_select_btn"></div>
  77. <ul class="diy_select_list pm_status" style="display: none;">
  78. <li val="-1">请选择</li>
  79. <li val="0">确认已修好</li>
  80. <li val="1">未修好</li>
  81. <li val="2">申请已修好</li>
  82. </ul>
  83. </div>
  84. <button type="submit" class="label-primary-s bth-s">查询</button>
  85. </div>
  86. </form>
  87. <div class="table-box">
  88. <table id="intention-table"
  89. class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
  90. style="font-size:12px">
  91. <thead>
  92. <tr>
  93. <th>维修记录号</th>
  94. <th>关联工单号</th>
  95. <th>派单类型</th>
  96. <th>维修日期</th>
  97. <th>维修地点</th>
  98. <th>维修方式</th>
  99. <th>维修结果</th>
  100. <th>维修人</th>
  101. <th>创建时间</th>
  102. <th>操作</th>
  103. </tr>
  104. </thead>
  105. <tbody>
  106. <?php if ($list): ?>
  107. <?php foreach ($list as $item): ?>
  108. <tr>
  109. <td><?php echo $item['code'];?></td>
  110. <td><?php echo $item['rCode'];?></td>
  111. <td><?php echo isset($allocationType_arr[$item['allocationType']])?$allocationType_arr[$item['allocationType']]:'';?></td>
  112. <td><?php echo $item['createTime'];?></td>
  113. <td><?php echo $item['address'];?></td>
  114. <td><?php echo isset($repairType_arr[$item['repairType']])?$repairType_arr[$item['repairType']]:'';?></td>
  115. <td><?php echo isset($repairResult_arr[$item['repairResult']])?$repairResult_arr[$item['repairResult']]:'';?></td>
  116. <td><?php echo $item['createBy'];?></td>
  117. <td><?php echo $item['createTime'];?></td>
  118. <td><a href="<?php echo $this->createUrl('imsDevice/viewRecord',array('id'=>$item['id']));?>" class="btn-review">查看</a></td>
  119. </tr>
  120. <?php endforeach; ?>
  121. <?php endif; ?>
  122. </tbody>
  123. </table>
  124. <?php if ($page): ?>
  125. <div class="col-sm-12">
  126. <ul class="pagination">
  127. <?php
  128. $params = array();
  129. if (isset($_GET['page'])) {
  130. $params['page'] = $_GET['page'];
  131. }else{
  132. $params['page'] = 1;
  133. }
  134. echo formatPage($page, 'imsDevice/repairRecord', $params)
  135. ?>
  136. </ul>
  137. </div>
  138. <?php endif; ?>
  139. </div>
  140. </div>
  141. <script src="/js/productset/jquery.min.js"></script>
  142. <script src="/js/ims/xsgl.js"></script>
  143. <script src="/js/layer/layer.js"></script>
  144. <script>
  145. $(document).ready(function () {
  146. function useType() {
  147. $(".use-type").each(function (index) {
  148. if ($(this).attr('status') == 1) {
  149. $(this).addClass("yellow");
  150. } else if ($(this).attr('status') == 2) {
  151. $(this).addClass("red");
  152. }else {
  153. $(this).addClass("green");
  154. }
  155. })
  156. }
  157. useType();
  158. });
  159. </script>
  160. </body>
  161. </html>