123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>打印量列表</title>
- <meta name="description" content="">
- <meta name="keywords" content="">
- <link href="/css/ims/base.css" rel="stylesheet">
- <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css"/>
- <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
- <style>
- .ims-box {
- margin: 20px;
- }
- .screen > div {
- margin: 0 5px;
- line-height: 30px;
- }
- .yellow {
- color: #FF9900;
- }
- .screen > input {
- height: 30px;
- border-radius: 4px;
- border: 1px solid #ccc;
- box-shadow: none;
- text-indent: 10px;
- }
- .screen button {
- padding: 4px 12px;
- }
- .table-box {
- margin-top: 30px;
- }
- .btn-date_show{
- display: inline-block;width: 170px;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
- }
- </style>
- </head>
- <body>
- <div class="ims-box">
- <form action="<?php echo Yii::app()->createUrl('imsDevice/printUploadList'); ?>" method="get">
- <div class="screen">
- <span >品目:</span>
- <input type="text" id="itemName" name="itemName" value="<?php if(isset($itemName)) echo $itemName ;?>">
- <span >开始时间:</span>
- <input type="text" readonly name="startDate" class="some_class" value="<?php if(isset($startDate)) echo $startDate ;?>" id="some_class_1"/>
- <span >结束时间:</span>
- <input type="text" readonly name="endDate" class="some_class" value="<?php if(isset($endDate)) echo $endDate ;?>" id="some_class_2"/>
- <button type="submit" class="label-primary-s bth-s">查询</button>
- <button type="button" class="label-primary-s bth-s create-allocation">+新增印量上传</button>
- </div>
- </form>
- <div class="table-box">
- <table id="intention-table"
- class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
- style="font-size:12px">
- <thead>
- <tr>
- <th>品目名称</th>
- <th>规格</th>
- <th>品目编号</th>
- <th>序列ID</th>
- <th>打印量(页码)</th>
- <th>复印量(页码)</th>
- <th>印量总计(页码)</th>
- <th>上传类型(页码)</th>
- <th>上传时间</th>
- <th>上传人</th>
- <th>状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if ($list): ?>
- <?php foreach ($list as $item): ?>
- <tr>
- <td><?php echo $item['itemName'];?></td>
- <td><?php echo $item['itemSpec'];?></td>
- <td><?php echo $item['fixedCode'];?></td>
- <td><?php echo $item['machineCode'];?></td>
- <td><?php echo $item['printNum'];?></td>
- <td><?php echo $item['copyNum'];?></td>
- <td><?php echo $item['print'];?></td>
- <td><?php echo $item['typeName'];?></td>
- <td><?php if(isset($item['uploadTime'])){echo $item['uploadTime'];}?></td>
- <td><?php if(isset($item['uploadName'])){echo $item['uploadName'];}?></td>
- <td><?php echo $item['statusName'];?></td>
- <td>
- <?php
- if($item['status']==0 && $item['type']==0){
- ?>
- <a itemId="<?php echo $item['id'];?>" href="<?php echo $this->createUrl('imsDevice/editPrint',array('id'=>$item['id']));?>" class="btn-review">编辑</a>
- <a itemId="<?php echo $item['id'];?>" class="btn-review del-print">删除</a>
- <a itemId="<?php echo $item['id'];?>" class="btn-review update_print">上传</a>
- <?php
- }else{
- ?>
- <a href="<?php echo $this->createUrl('imsDevice/viewPrint',array('id'=>$item['id']));?>" class="btn-review">查看</a>
- <?php
- }
- ?>
- </td>
- </tr>
- <?php endforeach; ?>
- <?php endif; ?>
- </tbody>
- </table>
- <?php if ($page): ?>
- <div class="col-sm-12">
- <ul class="pagination">
- <?php
- $params = array();
- if (isset($_GET['page'])) {
- $params['page'] = $_GET['page'];
- }else{
- $params['page'] = 1;
- }
- echo formatPage($page, 'imsDevice/printUploadList', $params)
- ?>
- </ul>
- </div>
- <?php endif; ?>
- </div>
- </div>
- <script src="/js/productset/jquery.min.js"></script>
- <script src="/js/ims/xsgl.js"></script>
- <script src="/js/layer/layer.js"></script>
- <script src="/js/ims/jquery.datetimepicker.js"></script>
- <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css"/>
- <script>
- $(document).ready(function () {
- $('.some_class').datetimepicker({
- format: "Y-m-d", //格式化日期
- timepicker: false //关闭时间选项
- });
- $('.create-allocation').click(function(){
- window.location.href='<?php echo $this->createUrl('imsDevice/addPrint')?>';
- });
- $('.del-print').click(function(){
- var itemId=$(this).attr('itemId');
- layer.msg('您确定删除嘛?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- if (!itemId) {
- layer.msg('记录id有误!');return false;
- }
- jQuery.post(
- '<?php echo $this->createUrl('imsDevice/delPrint');?>',
- {"id":itemId},
- function(data){
- var obj = JSON.parse(data);
- if (obj.status === 1) {
- layer.alert("操作成功", {icon: 1,closeBtn:0}, function () {
- window.location.href = "<?php echo $this->createUrl('imsDevice/printUploadList');?>";
- })
- }else {
- layer.msg(obj.msg);
- }
- }
- );
- }
- });
- });
- $('.update_print').click(function(){
- var itemId=$(this).attr('itemId');
- layer.msg('您确定上传嘛?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- if (!itemId) {
- layer.msg('记录id有误!');return false;
- }
- jQuery.post(
- '<?php echo $this->createUrl('imsDevice/updatePrint');?>',
- {"id":itemId},
- function(data){
- var obj = JSON.parse(data);
- if (obj.status === 1) {
- layer.alert("操作成功", {icon: 1,closeBtn:0}, function () {
- window.location.href = "<?php echo $this->createUrl('imsDevice/printUploadList');?>";
- })
- }else {
- layer.msg(obj.msg);
- }
- }
- );
- }
- });
- });
- });
- </script>
- </body>
- </html>
|