123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485 |
- <!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"/>
- <link rel="stylesheet" type="text/css" href="/css/ims/cloudPrintTask.css"/>
- <style>
- input {
- height: 30px;
- border-radius: 4px;
- border: 1px solid #ccc;
- box-shadow: none;
- text-indent: 10px;
- margin-right: 5px;
- float:left;
- }
- .red {
- color: red;
- }
- .yellow {
- color: #FF9900;
- }
- .ims-box {
- margin: 20px;
- }
- .screen > div {
- margin-right: 5px;
- }
- .screen button {
- padding: 4px 12px;
- }
- .table-box {
- margin-top: 30px;
- }
- .table-box table,
- .table-box table th {
- text-align: center;
- }
- .table-box button {
- margin-right: 5px;
- }
- .stop-layer-box, .resubmit-layer-box, .delete-layer-box {
- line-height: 140px;
- text-align: center;
- }
- .resubmit-layer-box input {
- line-height: 20px;
- }
- .urge-layer-box {
- margin-top: 30px;
- margin-left: 30px;
- }
- .urge-layer-box textarea {
- margin-left: 15px;
- vertical-align: top;
- }
- .alert-msg {
- text-align: center;
- vertical-align: top;
- }
- </style>
- </head>
- <body>
- <div class="ims-box">
- <form action="<?php echo Yii::app()->createUrl('imsSale/cloudPrintTask'); ?>" method="get">
- <?php require dirname(dirname(dirname(__FILE__))).'/components/CloudPrintTask.php';
- ?>
- <div class="screen">
- <div class="diy_select select-goods">
- <input type="hidden" id="centerId" name="centerId" class="diy_select_input" value="<?php echo $centerId; ?>">
- <div class="diy_select_txt"><?php echo isset($centerId) && $centerId > 0 ? $print_centers[$centerId] : '--选择印刷点--';?></div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- <li val="0">请选择印刷点</li>
- <?php if ($print_centers): ?>
- <?php foreach ($print_centers as $center_id => $center_name): ?>
- <li val="<?php echo $center_id ?>"><?php echo $center_name ?></li>
- <?php endforeach; ?>
- <?php else: ?>
- <li val="0">暂无印刷点</li>
- <?php endif; ?>
- </ul>
- </div>
- <div class="diy_select select-package">
- <input type="hidden" id="status" name="status" class="diy_select_input" value="<?php echo $status; ?>">
- <div class="diy_select_txt"><?php echo $status > -1 ? CloudPrintTask::$STATUS[$status] : '--选择状态--';?></div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- <li val="-1">请选择状态</li>
- <?php foreach(CloudPrintTask::$STATUS as $status => $status_name){
- ?>
- <li val="<?php echo $status ?>"><?php echo $status_name ?></li>
- <?php
- } ?>
- </ul>
- </div>
- <div class="diy_select select-good">
- <input type="hidden" id="goodsTypeId" name="goodsTypeId" class="diy_select_input" value="<?php echo $goodsTypeId; ?>">
- <div class="diy_select_txt"><?php echo (isset($goodsTypeId) && $goodsTypeId > 0) ? isset($productList[$goodsTypeId]) ? $productList[$goodsTypeId] : '--选择产品--' : '--选择产品--';?></div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- <li val="0">请选择产品</li>
- <?php
- if($productList){
- foreach($productList as $pid=>$pname){
- ?>
- <li val="<?php echo $pid; ?>"><?php echo $pname;?></li>
- <?php }
- }?>
- </ul>
- </div>
- <div class="diy_select select-subject">
- <input type="hidden" id="subjectId" name="subjectId" class="diy_select_input" value="<?php echo $subjectId; ?>">
- <div class="diy_select_txt"><?php echo isset($subjectId) && $subjectId > 0 ? CloudPrintTask::$SUBJECT[$subjectId] : '--选择学科--';?></div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- <li val="0">请选择学科</li>
- <?php foreach(CloudPrintTask::$SUBJECT as $subject_id => $subject_name){
- ?>
- <li val="<?php echo $subject_id; ?>"><?php echo $subject_name; ?></li>
- <?php
- }?>
- </ul>
- </div>
- <div class="purposeOrderNo">
- <input type="text" id="clazzName" name="clazzName" placeholder="输入班级" value="<?php echo isset($_GET['clazzName'])?$_GET['clazzName']:'' ;?>"/>
- </div>
- <div class="purposeOrderNo">
- <input type="text" id="examName" name="taskName" placeholder="输入任务名称" value="<?php echo isset($_GET['taskName'])?$_GET['taskName']:'' ;?>"/>
- </div>
- <div class="purposeOrderNo">
- <input type="text" id="taskNo" name="taskNo" placeholder="输入任务单号" value="<?php echo isset($_GET['taskNo'])?$_GET['taskNo']:'' ;?>"/>
- </div>
- <button type="submit" class="label-primary-s bth-s">查询</button>
- <button type="button" class="label-primary-s bth-s" onclick="p_receive();">批量确认收货</button>
- <button type="button" class="label-primary-s bth-s" onclick="p_print();">+应急打印</button>
- </div>
- </form>
-
- <div class="hgc_tableWrap">
- <div class="fixedLeft">
- <ul>
- <li class="title">
- <span><input type="checkbox" id="check_all" /> </span>
- <span>任务单号</span>
- <span>任务名称</span>
- </li>
- <?php
- if (!empty($list)){
- foreach ($list as $item){
- ?>
- <li>
- <span><input type="checkbox" name="task_id[]" value="<?php echo $item['taskId']; ?>" /></span>
- <span><a target="_blank" href="<?php echo Yii::app()->createUrl('imsSale/taskDetail' , array('task_id' => $item['taskId'])) ?>"> <?php echo $item['taskNo']; ?></a></span>
- <span title="<?php echo $item['taskName']; ?>"><?php echo $item['taskName']; ?></span>
- </li>
- <?php }
- }
- ?>
- </ul>
- </div>
- <div class="content" id="hgc_content">
- <ul>
- <li class="title">
- <span>年级</span>
- <span>班级</span>
- <span>产品名称</span>
- <span>学科</span>
- <span>打印量(页)</span>
- <span>打印量(张)</span>
- <span>打印人数</span>
- <span>单份页数</span>
- <span>打印份数</span>
- <span>纸张类型</span>
- <span>发送时间</span>
- <span>下载时间</span>
- <span>发货时间</span>
- <span>收货时间</span>
- <span>印刷点</span>
- </li>
- <?php
- if (!empty($list)){
- foreach ($list as $item){
- ?>
- <li>
- <span><?php echo $item['grade']; ?></span>
- <span><?php echo $item['clazzName']; ?></span>
- <span title="<?php echo $item['productName']; ?>"><?php echo $item['productName']; ?></span>
- <span><?php echo $item['subjectName']; ?></span>
- <span><?php echo $item['printPages']; ?></span>
- <span><?php echo $item['printSheets']; ?></span>
- <span><?php echo $item['printPeopleNum']; ?></span>
- <span><?php echo isset($item['singlePiecePages'])?$item['singlePiecePages']:''; ?></span>
- <span><?php echo isset($item['printPieces'])?$item['printPieces']:''; ?></span>
- <span><?php echo isset($item['sheetTypeText'])?$item['sheetTypeText']:''; ?></span>
- <span><?php echo isset($item['sendTime']) ? $item['sendTime'] : ''; ?></span>
- <span><?php echo isset($item['downloadTime']) ? $item['downloadTime'] : ''; ?></span>
- <span><?php echo isset($item['deliveryTime']) ? $item['deliveryTime'] : ''; ?></span>
- <span><?php echo isset($item['receiveTime']) ? $item['receiveTime'] : ''; ?></span>
- <span><?php echo $item['centerName']; ?></span>
- </li>
- <?php }
- }
- ?>
- </ul>
- <div class="scrollBar" id="scrollBar">
- <div class="barTip" id="barTip"></div>
- </div>
- </div>
- <div class="fixedRight">
- <ul>
- <li class="title">
- <span>状态</span>
- <span>操作</span>
- </li>
- <?php
- if (!empty($list)){
- foreach ($list as $item){
- ?>
- <li>
- <span><?php echo $item['statusName']; ?></span>
- <span><?php
- $back = '<a href="javascript:void(0);" style="text-decoration:underline;color:blue;" onclick="task_cancel(\''.$item['taskId'].'\')">退回</a>';
- $receive = '<a href="javascript:void(0);" style="text-decoration:underline;color:blue;" onclick="task_receive(\''.$item['taskId'].'\')">确认收货</a>';
- $delete = '<a href="javascript:void(0);" style="text-decoration:underline;color:blue;" onclick="task_delete(\''.$item['taskId'].'\')">删除</a>';
- if($item['status'] == CloudPrintTask::STATUS_UNDOWNLOAD)
- echo $back;
- elseif($item['status'] == CloudPrintTask::STATUS_SEND)
- echo $receive;
- elseif($item['status'] == CloudPrintTask::STATUS_BACK)
- echo $delete;
- ?>
- </span>
- </li>
- <?php }
- }
- ?>
- </ul>
- </div>
- </div>
- <?php if ($page): ?>
- <div class="col-sm-12">
- <ul class="pagination">
- <?php
- $params = array();
- if (isset($_GET['centerId']) && $_GET['centerId']) {
- $params['centerId'] = $_GET['centerId'];
- }
- if (isset($_GET['status']) && $_GET['status'] > -1) {
- $params['status'] = $_GET['status'];
- }
- if (isset($_GET['goodsTypeId']) && $_GET['goodsTypeId']) {
- $params['goodsTypeId'] = $_GET['goodsTypeId'];
- }
- if (isset($_GET['subjectId']) && $_GET['subjectId']) {
- $params['subjectId'] = $_GET['subjectId'];
- }
- if (isset($_GET['clazzName']) && $_GET['clazzName']) {
- $params['clazzName'] = $_GET['clazzName'];
- }
- if (isset($_GET['taskName']) && $_GET['taskName']) {
- $params['taskName'] = $_GET['taskName'];
- }
- if (isset($_GET['taskNo']) && $_GET['taskNo']) {
- $params['taskNo'] = $_GET['taskNo'];
- }
- if (isset($_GET['page'])) {
- $params['page'] = $_GET['page'];
- }else{
- $params['page'] = 1;
- }
- echo formatPage($pages, 'imsSale/cloudPrintTask', $params)
- ?>
- </ul>
- </div>
- <?php endif; ?>
- </div>
- <script src="/js/productset/jquery.min.js"></script>
- <script src="/js/ims/layer/layer.js"></script>
- <script src="/js/ims/xsgl.js"></script>
- <script src="/js/ims/cloudPrintTask.js"></script>
- <script>
- /**
- *任务退回
- * @param task_id
- * @returns {boolean}
- */
- function task_cancel(task_id){
- if(task_id <= 0)
- {
- layer.msg('非法的task_id');
- return false;
- }
- layer.confirm('确认退回吗?', {
- btn: ['确定', '取消'] //按钮
- }, function () {
- $.ajax({
- type: 'post',
- url: "<?php echo Yii::app()->createUrl('imsSale/taskCancel');?>",
- data: {'task_id': task_id},
- dataType: 'json',
- success: function (data) {
- layer.closeAll();
- if (data.status) {
- layer.alert(data.msg, {icon:1,closeBtn:0},function () {
- location.reload();
- })
- } else {
- layer.alert(data.msg, {icon: 7});
- }
- },
- error: function () {
- layer.msg("网络异常");
- }
- });
- });
- }
- /**
- * 确认收货
- * @param task_id
- * @returns {boolean}
- */
- function task_receive(task_id){
- if(task_id <= 0)
- {
- layer.msg('非法的task_id');
- return false;
- }
- layer.confirm('确认收货吗?', {
- btn: ['确定', '取消'] //按钮
- }, function () {
- $.ajax({
- type: 'post',
- url: "<?php echo Yii::app()->createUrl('imsSale/taskReceive');?>",
- data: {'task_id': task_id},
- dataType: 'json',
- success: function (data) {
- layer.closeAll();
- if (data.status) {
- layer.alert(data.msg, {icon:1,closeBtn:0},function () {
- location.reload();
- })
- } else {
- layer.alert(data.msg, {icon: 7});
- }
- },
- error: function () {
- layer.msg("网络异常");
- }
- });
- });
- }
- /**
- * 删除任务
- * @param task_id
- * @returns {boolean}
- */
- function task_delete(task_id){
- if(task_id <= 0)
- {
- layer.msg('非法的task_id');
- return false;
- }
- layer.confirm('确认删除吗?', {
- btn: ['确定', '取消'] //按钮
- }, function () {
- $.ajax({
- type: 'post',
- url: "<?php echo Yii::app()->createUrl('imsSale/taskDelete');?>",
- data: {'task_id': task_id},
- dataType: 'json',
- success: function (data) {
- layer.closeAll();
- if (data.status) {
- layer.alert(data.msg, {icon:1,closeBtn:0},function () {
- location.reload();
- })
- } else {
- layer.alert(data.msg, {icon: 7});
- }
- },
- error: function () {
- layer.msg("网络异常");
- }
- });
- });
- }
- function p_receive()
- {
- var obj = $("input[name='task_id[]']:checked");
- if(obj.length == 0)
- {
- layer.msg('请至少选择一条记录!');
- return false;
- }
- var check_val = [];
- for(k=0;k<obj.length;k++){
- check_val.push(obj[k].value);
- }
- layer.confirm('确认批量收货吗?', {
- btn: ['确定', '取消'] //按钮
- }, function () {
- $.ajax({
- type: 'post',
- url: "<?php echo Yii::app()->createUrl('imsSale/taskPReceive');?>",
- data: {'task_ids': check_val},
- dataType: 'json',
- success: function (data) {
- layer.closeAll();
- if (data.status) {
- layer.alert(data.msg, {icon:1,closeBtn:0},function () {
- location.reload();
- })
- } else {
- layer.alert(data.msg, {icon: 7});
- }
- },
- error: function () {
- layer.msg("网络异常");
- }
- });
- });
- }
- $(document).ready(function () {
- //全选/反选
- $('#check_all').click(function () {
- if($(this).is(':checked')){
- $(".fixedLeft :checkbox").prop("checked", true);
- }else{
- $(".fixedLeft :checkbox").prop("checked", false);
- }
- });
- $('body').on('focus', 'textarea', function () {
- $('.alert-msg').css("display", 'none');
- });
- $('body').on('focus', 'input', function () {
- $('.alert-msg').css("display", 'none');
- });
- });
- function p_print() {
- window.location.href = "<?php echo Yii::app()->createUrl('imsSale/contingencyPrint')?>";//成功跳转
- }
- </script>
- </body>
- </html>
|