123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>新增应急打印</title>
- <link href="/css/base.css" rel="stylesheet">
- <link href="/css/ims/ims.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/jquery.datetimepicker.css"/>
- <link rel="stylesheet" type="text/css" href="/js/layui/css/layui.css"/>
- </head>
- <style>
- .file {
- position: relative;
- display: inline-block;
- background: #D0EEFF;
- border: 1px solid #99D3F5;
- border-radius: 4px;
- padding: 4px 12px;
- overflow: hidden;
- color: #1E88C7;
- text-decoration: none;
- text-indent: 0;
- line-height: 20px;
- }
- .file input {
- position: absolute;
- font-size: 100px;
- right: 0;
- top: 0;
- opacity: 0;
- }
- .file:hover {
- background: #AADFFD;
- border-color: #78C3F3;
- color: #004974;
- text-decoration: none;
- }
- </style>
- <body>
- <h3 class="sale-title" style="margin-top: 20px;margin-bottom: 20px;">新增应急打印</h3>
- <input type="hidden" name="oldOrderId" id="oldOrderId" value="0">
- <div class="sale-table">
- <form class="saveForm" name="taskInfo" method="post" enctype="multipart/form-data">
- <table width="100%">
- <tr>
- <th><em class="red">*</em>名称</th>
- <td><input type="text" placeholder="输入任务名称" name="taskName" value=""></td>
- </tr>
- <tr>
- <th><em class="red">*</em>年级</th>
- <td>
- <div class="diy_select">
- <input type="hidden" id="grade" name="grade" class="diy_select_input" value="0">
- <div class="diy_select_txt pm_name_txt">选择年级</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list pm_name" style="display: none;">
- <li val="0">选择年级</li>
- <?php
- if(Yii::app()->params['grade_config']){
- foreach (Yii::app()->params['grade_config'] as $val){
- echo '<li val="'.$val['id'].'" >'.$val['grade_name'].'</li>';
- }
- }
- ?>
- </ul>
- </div>
- </td>
- </tr>
- <tr>
- <th><em class="red">*</em>学科</th>
- <td>
- <div class="diy_select">
- <input type="hidden" id="subject" name="subject" class="diy_select_input" value="0">
- <div class="diy_select_txt pm_name_txt">选择学科</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list pm_name" style="display: none;">
- <li val="0">选择学科</li>
- <li val="3">数学</li>
- <li val="8">英语</li>
- <li val="9">语文</li>
- <li val="12">物理</li>
- <li val="13">化学</li>
- <li val="14">生物</li>
- <li val="15">政治</li>
- <li val="16">历史</li>
- <li val="17">地理</li>
- <li val="18">理综</li>
- <li val="19">文综</li>
- </ul>
- </div>
- </td>
- </tr>
- <tr>
- <th><em class="red">*</em>打印份数</th>
- <td>
- <input type="text" placeholder="输入数量" name="copies" value=""><span>份</span>
- </td>
- </tr>
- <tr>
- <th>单份页数</th>
- <td>
- <input type="text" placeholder="输入数量" name="eachCopies" value=""><span>页</span>
- </td>
- </tr>
- <tr>
- <th><em class="red">*</em>纸张类型</th>
- <td>
- <div class="diy_select">
- <input type="hidden" id="sheetType" name="sheetType" class="diy_select_input" value="-1">
- <div class="diy_select_txt pm_name_txt">选择类型</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list pm_name" style="display: none;">
- <li val="-1">选择类型</li>
- <li val="0">B5</li>
- <li val="1">A3</li>
- <li val="2">A4</li>
- <li val="3">8K</li>
- <li val="4">16K</li>
- </ul>
- </div>
- </td>
- </tr>
- <tr>
- <th><em class="red">*</em>上传文件</th>
- <td>
- <input type="file" name="file1">
- <p id="upload-tips" style="color: #BF2B2B">请上传不大于10M的文件,格式仅限rar或zip压缩文件</p>
- </td>
- </tr>
- </table>
- </form>
- </div>
- <div class="sale-submit" style="margin-top: 20px;">
- <button type="button" id="returnList" class="label-primary-s bth-s">取消</button>
- <button type="button" id="saveOrder" class="label-primary-s bth-s" onclick="saveOrder();">发送任务</button>
- </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>
- function saveOrder(){
- if($(this).attr("active")){
- return false;
- }
- var title = $.trim($("input[name='taskName']").val());
- if(title.length === 0){
- layer.msg('任务名称不能为空');
- return false;
- }
- if($("input[name='grade']").val() == 0){
- layer.msg('请选择年级');
- return false;
- }
- if($("input[name='subject']").val() == 0){
- layer.msg('请选择学科');
- return false;
- }
- if($.trim($("input[name='copies']").val()) == ''){
- layer.msg('打印份数不能为空');
- return false;
- }
- if($.trim($("input[name='eachCopies']").val()) == ''){
- layer.msg('单份页数不能为空');
- return false;
- }
- if($("input[name='sheetType']").val() == -1){
- layer.msg('请选择纸张类型');
- return false;
- }
- var file=$("input[name='file1']");
- if($.trim(file.val())==''){
- layer.msg('请选择上传文件');
- return false;
- }
- var form = document.forms.namedItem("taskInfo");
- var formData = new FormData(form);
- $.ajax({
- url: "<?php echo Yii::app()->createUrl('imsSale/saveContingencyPrint')?>",
- type: "post",
- data: formData,
- contentType: false, //必须
- processData: false, //必须
- dataType: "json",
- beforeSend:function(){
- layer.load(1, {
- shade: [0.1,'#fff'] //0.1透明度的白色背景
- });
- },
- success: function (data) {
- var index = layer.load();
- layer.close(index);
- if (data.status == 1) {
- layer.msg('操作成功');
- window.location.href = "<?php echo Yii::app()->createUrl('imsSale/cloudPrintTask')?>";//成功跳转
- } else if (data.status == 0) {
- layer.msg(data.message);
- }
- }
- });
- }
- $('#returnList').click(function () {
- window.location.href = "<?php echo Yii::app()->createUrl('imsSale/cloudPrintTask')?>";//成功跳转
- });
- </script>
- </body>
- </html>
|