planExamples.php 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>盘点示例</title>
  6. <link href="/css/ims/base.css" rel="stylesheet">
  7. <link href="/css/ims/ims.css" rel="stylesheet">
  8. <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css" />
  9. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css" />
  10. <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css" />
  11. <style>
  12. .top-bar{
  13. overflow: hidden;
  14. }
  15. .top-bar .msg{
  16. color: red;
  17. font-size: 14px;
  18. line-height: 29px;
  19. }
  20. .top-bar button{
  21. float: right;
  22. padding: 4px 8px;
  23. font-size: 14px;
  24. color: #00B261;
  25. border: 1px solid #00B261;
  26. border-radius: 5px;
  27. background-color: #fff;
  28. cursor: pointer;
  29. outline: none;
  30. }
  31. .img-example{
  32. border: 1px solid #333;
  33. margin-top: 20px;
  34. margin-bottom: 20px;
  35. padding: 0 20px 20px 20px;
  36. }
  37. .img-example h2{
  38. font-size: 18px;
  39. line-height: 1.5em;
  40. }
  41. .table-img-example {
  42. width: 100%;
  43. border-left: 1px solid #ccc;
  44. border-top: 1px solid #ccc;
  45. box-sizing: border-box;
  46. border-collapse: collapse;
  47. }
  48. .table-img-example td {
  49. width: 25%;
  50. padding: 4px;
  51. border-right: 1px solid #ccc;
  52. border-bottom: 1px solid #ccc;
  53. box-sizing: border-box;
  54. }
  55. .table-img-example .img-box{
  56. text-align: center;
  57. /*width: 24%;*/
  58. }
  59. .table-img-example .img-box img{
  60. max-width: 100%;
  61. }
  62. .table-img-example .text-box{
  63. text-indent:2em!important;
  64. text-align: left;
  65. }
  66. .dialog-img-big{
  67. display: none;
  68. padding: 20px;
  69. }
  70. .dialog-img-big img{
  71. width: 100%;
  72. }
  73. </style>
  74. </head>
  75. <body>
  76. <div class="top-bar">
  77. <span class="msg">上传的图片,用于新建盘点单时作图片参考</span>
  78. <!--<button type="button" onclick="window.location.href='<?php // echo Yii::app()->createUrl('imsStore/createPlanList')."?planId=".$planId; ?>'">返回</button>-->
  79. <button type="button" onclick="javascript :history.back(-1);">返回</button>
  80. </div>
  81. <?php if(isset($result) && $result):?>
  82. <div class="img-example">
  83. <h2>固定资产</h2>
  84. <?php if(isset($result['fixedList']) && $result['fixedList']):?>
  85. <table class="table-img-example">
  86. <?php foreach($result['fixedList'] as $k=>$v):?>
  87. <?php if($k%2 == 0):?>
  88. <tr>
  89. <td class="img-box">
  90. <img src="<?php echo isset($v["imgUrl"])?$v["imgUrl"]:"";?>" alt="">
  91. </td>
  92. <td class="text-box">
  93. <?php echo isset($v["description"])?$v["description"]:"";?>
  94. </td>
  95. <?php if(!isset($result['fixedList'][$k+1])):?>
  96. <td class="img-box"></td>
  97. <td class="text-box"></td>
  98. </tr>
  99. <?php endif;?>
  100. <?php else:?>
  101. <td class="img-box">
  102. <img src="<?php echo isset($v["imgUrl"])?$v["imgUrl"]:"";?>" alt="">
  103. </td>
  104. <td class="text-box">
  105. <?php echo isset($v["description"])?$v["description"]:"";?>
  106. </td>
  107. </tr>
  108. <?php endif;?>
  109. <?php endforeach;?>
  110. </table>
  111. <?php endif;?>
  112. </div>
  113. <div class="img-example">
  114. <h2>产成品</h2>
  115. <?php if(isset($result['finishList']) && $result['finishList']):?>
  116. <table class="table-img-example">
  117. <?php foreach($result['finishList'] as $k=>$v):?>
  118. <?php if($k%2 == 0):?>
  119. <tr>
  120. <td class="img-box">
  121. <img src="<?php echo isset($v["imgUrl"])?$v["imgUrl"]:"";?>" alt="">
  122. </td>
  123. <td class="text-box">
  124. <?php echo isset($v["description"])?$v["description"]:"";?>
  125. </td>
  126. <?php if(!isset($result['finishList'][$k+1])):?>
  127. <td class="img-box"></td>
  128. <td class="text-box"></td>
  129. </tr>
  130. <?php endif;?>
  131. <?php else:?>
  132. <td class="img-box">
  133. <img src="<?php echo isset($v["imgUrl"])?$v["imgUrl"]:"";?>" alt="">
  134. </td>
  135. <td class="text-box">
  136. <?php echo isset($v["description"])?$v["description"]:"";?>
  137. </td>
  138. </tr>
  139. <?php endif;?>
  140. <?php endforeach;?>
  141. </table>
  142. <?php endif;?>
  143. </div>
  144. <div class="img-example">
  145. <h2>低值易耗品</h2>
  146. <?php if(isset($result['lowList']) && $result['lowList']):?>
  147. <table class="table-img-example">
  148. <?php foreach($result['lowList'] as $k=>$v):?>
  149. <?php if($k%2 == 0):?>
  150. <tr>
  151. <td class="img-box">
  152. <img src="<?php echo isset($v["imgUrl"])?$v["imgUrl"]:"";?>" alt="">
  153. </td>
  154. <td class="text-box">
  155. <?php echo isset($v["description"])?$v["description"]:"";?>
  156. </td>
  157. <?php if(!isset($result['lowList'][$k+1])):?>
  158. <td class="img-box"></td>
  159. <td class="text-box"></td>
  160. </tr>
  161. <?php endif;?>
  162. <?php else:?>
  163. <td class="img-box">
  164. <img src="<?php echo isset($v["imgUrl"])?$v["imgUrl"]:"";?>" alt="">
  165. </td>
  166. <td class="text-box">
  167. <?php echo isset($v["description"])?$v["description"]:"";?>
  168. </td>
  169. </tr>
  170. <?php endif;?>
  171. <?php endforeach;?>
  172. </table>
  173. <?php endif;?>
  174. <!-- 图片放大弹窗 -->
  175. <div class="dialog-img-big">
  176. <img src="" alt="" id="imgBig">
  177. </div>
  178. </div>
  179. <?php endif;?>
  180. <script src="/js/jquery-2.2.2.min.js" ></script>
  181. <script src="/js/jquery.datetimepicker.js"></script>
  182. <script src="/js/layer/layer.js"></script>
  183. <script src="/js/xsgl.js"></script>
  184. <script>
  185. $(document).ready(function() {
  186. //放大图片
  187. $(".img-example").on("click",".img-box img", function(){
  188. let imgUrl = $(this).attr('src');
  189. $('#imgBig').attr('src',imgUrl);
  190. layer.open({
  191. title: false,
  192. closeBtn: 1,
  193. type: 1,
  194. area: ['800px', '600px'],
  195. offset: '100px',
  196. content: $(".dialog-img-big")
  197. });
  198. });
  199. });
  200. </script>
  201. </body>
  202. </html>