productSign.php 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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. .green {
  14. color: green;
  15. }
  16. .red {
  17. color: red;
  18. }
  19. .ims-box {
  20. margin: 20px;
  21. }
  22. .screen > div {
  23. float: left;
  24. margin-right: 8px;
  25. }
  26. .screen .date > input {
  27. height: 30px;
  28. border-radius: 4px;
  29. border: 1px solid #ccc;
  30. box-shadow: none;
  31. text-indent: 10px;
  32. }
  33. .screen .purposeOrderNo > input {
  34. height: 30px;
  35. border-radius: 4px;
  36. border: 1px solid #ccc;
  37. box-shadow: none;
  38. text-indent: 10px;
  39. }
  40. .screen button {
  41. padding: 4px 12px;
  42. }
  43. .table-box {
  44. margin-top: 30px;
  45. }
  46. .btn-formal-order {
  47. cursor: pointer;
  48. }
  49. .application-number-box {
  50. margin-top: 50px;
  51. text-align: center;
  52. }
  53. .application-number-box span {
  54. margin-right: 20px;
  55. }
  56. .layui-layer-btn .layui-layer-btn0 {
  57. border-color: #15ae68 !important;
  58. background-color: #15ae68 !important;
  59. color: #fff;
  60. }
  61. .btn-date_show{
  62. display: inline-block;width: 170px;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
  63. }
  64. #imsCode{
  65. width:100%;
  66. padding:15px;
  67. }
  68. .code-list{
  69. float: left;
  70. width:50%;
  71. }
  72. .code-list span{
  73. width: 100%;
  74. text-align: center;
  75. display: inline-block;
  76. }
  77. .code-list span img{
  78. margin:0 auto;
  79. }
  80. </style>
  81. </head>
  82. <body>
  83. <div class="ims-box">
  84. <form action="<?php echo Yii::app()->createUrl('imsSale/productSign'); ?>" method="get">
  85. <div class="screen">
  86. <div class="diy_select select-goods">
  87. <input type="hidden" id="type" name="type" class="diy_select_input" value="0">
  88. <div class="diy_select_txt">请选择类型</div>
  89. <div class="diy_select_btn"></div>
  90. <ul class="diy_select_list" style="display: none;">
  91. <li val="0">请选择商品</li>
  92. <li val="2">考试类型</li>
  93. <li val="1">非考试类型</li>
  94. </ul>
  95. </div>
  96. <div class="date">
  97. <span>签名时间:</span>
  98. <input type="text" name="begin" readonly class="some_class" value="" id="some_class_1"/> --
  99. <input type="text" name="end" readonly class="some_class" value="" id="some_class_2"/>
  100. </div>
  101. <div class="purposeOrderNo">
  102. <span>名称:</span>
  103. <input type="text" id="name" name="name" value="<?php if(isset($_GET['name'])){echo $_GET['name'];}?>"/>
  104. </div>
  105. <button type="submit" class="label-primary-s bth-s">查询</button>
  106. <button type="button" class="label-primary-s show-code">签收App下载</button>
  107. <a href="<?php echo $this->createUrl("imsSale/unSign")?>" class="label-primary-s ">未签收查询</a>
  108. </div>
  109. </form>
  110. <div>
  111. <table id="record-table"
  112. class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
  113. style="font-size:12px">
  114. <thead>
  115. <tr>
  116. <th>签字时间</th>
  117. <th>年级</th>
  118. <th>名称</th>
  119. <th>类型</th>
  120. <th>操作</th>
  121. </tr>
  122. </thead>
  123. <tbody>
  124. <?php if ($list):
  125. $gradeArr=array(
  126. 1=>'高一',
  127. 2=>'高二',
  128. 3=>'高三'
  129. );
  130. ?>
  131. <?php foreach ($list as $item): ?>
  132. <tr>
  133. <td><?php echo $item['signature']; ?></td>
  134. <td><?php echo isset($gradeArr[$item['grade']])?$gradeArr[$item['grade']]:''; ?></td>
  135. <td><?php echo $item['name']; ?></td>
  136. <td><?php if($item['type']==2){echo '考试类型';}else{echo '非考试类型';} ?></td>
  137. <td >
  138. <a href="<?php echo $this->createUrl('imsSale/viewProductSign',array('id'=>$item['id']))?>" class="showLog">详细</a>
  139. </td>
  140. </tr>
  141. <?php endforeach; ?>
  142. <?php endif; ?>
  143. </tbody>
  144. </table>
  145. <?php if ($page): ?>
  146. <div class="col-sm-12">
  147. <ul class="pagination">
  148. <?php
  149. $params = array();
  150. if (isset($_GET['type']) && $_GET['type']) {
  151. $params['type'] = $_GET['type'];
  152. }
  153. if (isset($_GET['begin']) && $_GET['begin']) {
  154. $params['begin'] = $_GET['begin'];
  155. }
  156. if (isset($_GET['end']) && $_GET['end']) {
  157. $params['end'] = $_GET['end'];
  158. }
  159. if (isset($_GET['name']) && $_GET['name']) {
  160. $params['name'] = $_GET['name'];
  161. }
  162. if (isset($_GET['page'])) {
  163. $params['page'] = $_GET['page'];
  164. }else{
  165. $params['page'] = 1;
  166. }
  167. echo formatPage($page, 'imsSale/productSign', $params);
  168. ?>
  169. </ul>
  170. </div>
  171. <?php endif; ?>
  172. </div>
  173. </div>
  174. <!--二维码-->
  175. <div class="qrcode-fram" style="display: none">
  176. <div id="qrcode" style="width:100px; height:100px;margin: 10px auto">
  177. <div class="code-list">
  178. <span id="android"></span>
  179. Android
  180. </div>
  181. <div class="code-list">
  182. <span id="iphone"></span>
  183. Iphone
  184. </div>
  185. </div>
  186. </div>
  187. <script src="/js/productset/jquery.min.js"></script>
  188. <script src="/js/layer/layer.js"></script>
  189. <script src="/js/ims/xsgl.js"></script>
  190. <script src="/js/ims/jquery.datetimepicker.js"></script>
  191. <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css"/>
  192. <script type="text/javascript" src="/js/ims/qrcode.min.js"></script>
  193. <script>
  194. $(document).ready(function () {
  195. <?php if (isset($_GET['begin'])):?>
  196. $("#some_class_1").attr("value", "<?php echo $_GET['begin']?>");
  197. $("#some_class_2").attr("value", "<?php echo $_GET['end']?>");
  198. <?php endif;?>
  199. //筛选条件赋值
  200. <?php if(isset($_GET['type']) && $_GET['type']>0):?>
  201. var typeId = "<?php echo $_GET['type'];?>";
  202. $('#type').val(typeId);
  203. var txt = $('.select-goods li[val=' + typeId + ']').html();
  204. $('.select-goods .diy_select_txt').html(txt);
  205. <?php endif;?>
  206. $('.some_class').datetimepicker({
  207. format: "Y-m-d", //格式化日期
  208. timepicker: false //关闭时间选项
  209. });
  210. $('.bth-s').click(function(){
  211. var begin=$('input[name=begin]').val();
  212. var end=$('input[name=end]').val();
  213. if(end!='' && begin!='' && end<begin){
  214. layer.msg('开始时间要早于结束时间');
  215. return false;
  216. }
  217. });
  218. $(".show-code").click(function () {
  219. var urlAndroid = '<?php echo $softwareUrlAndroid?>',
  220. urlIos = '<?php echo $softwareUrlIos?>';
  221. $("#android").html('');
  222. $("#iphone").html('');
  223. if(!urlAndroid){
  224. layer.msg("没有地址");
  225. return false;
  226. }
  227. var qrcodeAndroid = new QRCode(document.getElementById("android"), {
  228. width : 100,
  229. height : 100
  230. });
  231. qrcodeAndroid.makeCode(urlAndroid);
  232. var qrcodeIos = new QRCode(document.getElementById("iphone"), {
  233. width : 100,
  234. height : 100
  235. });
  236. qrcodeIos.makeCode(urlIos);
  237. $("#iphone img").on('load',function(){
  238. layer.open({
  239. type: 1,
  240. title: '签收App下载',
  241. btn: ['关闭'],
  242. area: ['440px', '260px'], //宽高
  243. btnAlign: 'c',
  244. content: '<div style="text-align:center;"><div id="imsCode">'+$("#qrcode").html()+'</div><p>Android系统请使用浏览器扫描二维码下载</p></div>',
  245. yes: function(index){
  246. //location.reload();
  247. layer.closeAll()
  248. },
  249. btn2: function (index, layero) {
  250. //取消按钮
  251. // console.log(111)
  252. //return false 开启该代码可禁止点击该按钮关闭
  253. }
  254. });
  255. });
  256. return false;
  257. });
  258. });
  259. </script>
  260. </body>
  261. </html>