printUploadList.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <title>打印量列表</title>
  7. <meta name="description" content="">
  8. <meta name="keywords" content="">
  9. <link href="/css/ims/base.css" rel="stylesheet">
  10. <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css"/>
  11. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
  12. <style>
  13. .ims-box {
  14. margin: 20px;
  15. }
  16. .screen > div {
  17. margin: 0 5px;
  18. line-height: 30px;
  19. }
  20. .yellow {
  21. color: #FF9900;
  22. }
  23. .screen > input {
  24. height: 30px;
  25. border-radius: 4px;
  26. border: 1px solid #ccc;
  27. box-shadow: none;
  28. text-indent: 10px;
  29. }
  30. .screen button {
  31. padding: 4px 12px;
  32. }
  33. .table-box {
  34. margin-top: 30px;
  35. }
  36. .btn-date_show{
  37. display: inline-block;width: 170px;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <div class="ims-box">
  43. <form action="<?php echo Yii::app()->createUrl('imsDevice/printUploadList'); ?>" method="get">
  44. <div class="screen">
  45. <span >品目:</span>
  46. <input type="text" id="itemName" name="itemName" value="<?php if(isset($itemName)) echo $itemName ;?>">
  47. <span >开始时间:</span>
  48. <input type="text" readonly name="startDate" class="some_class" value="<?php if(isset($startDate)) echo $startDate ;?>" id="some_class_1"/>
  49. <span >结束时间:</span>
  50. <input type="text" readonly name="endDate" class="some_class" value="<?php if(isset($endDate)) echo $endDate ;?>" id="some_class_2"/>
  51. <button type="submit" class="label-primary-s bth-s">查询</button>
  52. <button type="button" class="label-primary-s bth-s create-allocation">+新增印量上传</button>
  53. </div>
  54. </form>
  55. <div class="table-box">
  56. <table id="intention-table"
  57. class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
  58. style="font-size:12px">
  59. <thead>
  60. <tr>
  61. <th>品目名称</th>
  62. <th>规格</th>
  63. <th>品目编号</th>
  64. <th>序列ID</th>
  65. <th>打印量(页码)</th>
  66. <th>复印量(页码)</th>
  67. <th>印量总计(页码)</th>
  68. <th>上传类型(页码)</th>
  69. <th>上传时间</th>
  70. <th>上传人</th>
  71. <th>状态</th>
  72. <th>操作</th>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. <?php if ($list): ?>
  77. <?php foreach ($list as $item): ?>
  78. <tr>
  79. <td><?php echo $item['itemName'];?></td>
  80. <td><?php echo $item['itemSpec'];?></td>
  81. <td><?php echo $item['fixedCode'];?></td>
  82. <td><?php echo $item['machineCode'];?></td>
  83. <td><?php echo $item['printNum'];?></td>
  84. <td><?php echo $item['copyNum'];?></td>
  85. <td><?php echo $item['print'];?></td>
  86. <td><?php echo $item['typeName'];?></td>
  87. <td><?php if(isset($item['uploadTime'])){echo $item['uploadTime'];}?></td>
  88. <td><?php if(isset($item['uploadName'])){echo $item['uploadName'];}?></td>
  89. <td><?php echo $item['statusName'];?></td>
  90. <td>
  91. <?php
  92. if($item['status']==0 && $item['type']==0){
  93. ?>
  94. <a itemId="<?php echo $item['id'];?>" href="<?php echo $this->createUrl('imsDevice/editPrint',array('id'=>$item['id']));?>" class="btn-review">编辑</a>
  95. <a itemId="<?php echo $item['id'];?>" class="btn-review del-print">删除</a>
  96. <a itemId="<?php echo $item['id'];?>" class="btn-review update_print">上传</a>
  97. <?php
  98. }else{
  99. ?>
  100. <a href="<?php echo $this->createUrl('imsDevice/viewPrint',array('id'=>$item['id']));?>" class="btn-review">查看</a>
  101. <?php
  102. }
  103. ?>
  104. </td>
  105. </tr>
  106. <?php endforeach; ?>
  107. <?php endif; ?>
  108. </tbody>
  109. </table>
  110. <?php if ($page): ?>
  111. <div class="col-sm-12">
  112. <ul class="pagination">
  113. <?php
  114. $params = array();
  115. if (isset($_GET['page'])) {
  116. $params['page'] = $_GET['page'];
  117. }else{
  118. $params['page'] = 1;
  119. }
  120. echo formatPage($page, 'imsDevice/printUploadList', $params)
  121. ?>
  122. </ul>
  123. </div>
  124. <?php endif; ?>
  125. </div>
  126. </div>
  127. <script src="/js/productset/jquery.min.js"></script>
  128. <script src="/js/ims/xsgl.js"></script>
  129. <script src="/js/layer/layer.js"></script>
  130. <script src="/js/ims/jquery.datetimepicker.js"></script>
  131. <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css"/>
  132. <script>
  133. $(document).ready(function () {
  134. $('.some_class').datetimepicker({
  135. format: "Y-m-d", //格式化日期
  136. timepicker: false //关闭时间选项
  137. });
  138. $('.create-allocation').click(function(){
  139. window.location.href='<?php echo $this->createUrl('imsDevice/addPrint')?>';
  140. });
  141. $('.del-print').click(function(){
  142. var itemId=$(this).attr('itemId');
  143. layer.msg('您确定删除嘛?', {
  144. time: 0,
  145. btn: ['确定', '取消'],
  146. yes: function(index){
  147. layer.close(index);
  148. if (!itemId) {
  149. layer.msg('记录id有误!');return false;
  150. }
  151. jQuery.post(
  152. '<?php echo $this->createUrl('imsDevice/delPrint');?>',
  153. {"id":itemId},
  154. function(data){
  155. var obj = JSON.parse(data);
  156. if (obj.status === 1) {
  157. layer.alert("操作成功", {icon: 1,closeBtn:0}, function () {
  158. window.location.href = "<?php echo $this->createUrl('imsDevice/printUploadList');?>";
  159. })
  160. }else {
  161. layer.msg(obj.msg);
  162. }
  163. }
  164. );
  165. }
  166. });
  167. });
  168. $('.update_print').click(function(){
  169. var itemId=$(this).attr('itemId');
  170. layer.msg('您确定上传嘛?', {
  171. time: 0,
  172. btn: ['确定', '取消'],
  173. yes: function(index){
  174. layer.close(index);
  175. if (!itemId) {
  176. layer.msg('记录id有误!');return false;
  177. }
  178. jQuery.post(
  179. '<?php echo $this->createUrl('imsDevice/updatePrint');?>',
  180. {"id":itemId},
  181. function(data){
  182. var obj = JSON.parse(data);
  183. if (obj.status === 1) {
  184. layer.alert("操作成功", {icon: 1,closeBtn:0}, function () {
  185. window.location.href = "<?php echo $this->createUrl('imsDevice/printUploadList');?>";
  186. })
  187. }else {
  188. layer.msg(obj.msg);
  189. }
  190. }
  191. );
  192. }
  193. });
  194. });
  195. });
  196. </script>
  197. </body>
  198. </html>