stockView.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  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/bootstrap.min.css" />
  9. <link rel="stylesheet" type="text/css" href="/css/ace.min.css" />
  10. <link rel="stylesheet" type="text/css" href="/css/ims/fonts/iconfont.css">
  11. <style>
  12. .ims-box {
  13. margin: 20px;
  14. }
  15. .screen {
  16. padding-left: 20px;
  17. height: 44px;
  18. line-height: 44px;
  19. background-color: #eff4fa;
  20. }
  21. .screen li {
  22. float: left;
  23. margin-right: 65px;
  24. }
  25. .bg-d9bf6e {
  26. margin-left: 5px;
  27. padding: 0 20px;
  28. color: #fff;
  29. background-color: #d9bf6e;
  30. }
  31. .list {
  32. padding:0 40px;
  33. /*margin-top: 40px;*/
  34. overflow: hidden;
  35. }
  36. .list h2 {
  37. line-height: 30px;
  38. font-size: 14px;
  39. }
  40. .list .student-list_box {
  41. width: 300px;
  42. }
  43. .list .student-list_box>ul{
  44. height: 260px;
  45. overflow: auto;
  46. padding: 20px;
  47. background-color: #eef3ff;
  48. }
  49. .list .student-list_box li {
  50. line-height: 30px;
  51. cursor: pointer;
  52. }
  53. .list .student-selected_box {
  54. margin-left: 60px;
  55. }
  56. .list .student-list {
  57. display: none;
  58. margin-left: 20px;
  59. }
  60. .list .student-list li.active .btn-select_all {
  61. display: inline-block;
  62. }
  63. .list .student-list span {
  64. cursor: pointer;
  65. }
  66. .list .btn-select_all {
  67. margin-left: 84px;
  68. color: #008000;
  69. }
  70. .student-name_box li {
  71. position: relative;
  72. margin-left: 28px;
  73. line-height: 30px;
  74. }
  75. .student-name_box input {
  76. position: absolute;
  77. left: 155px;
  78. top: 8px;
  79. }
  80. .btn-select_all,
  81. .student-name_box {
  82. display: none;
  83. }
  84. .student-selected {
  85. width: 320px;
  86. height: 300px;
  87. overflow: auto;
  88. }
  89. .student-selected li {
  90. float: left;
  91. margin-right: 24px;
  92. margin-bottom: 12px;
  93. width: 280px;
  94. height: 26px;
  95. line-height: 26px;
  96. text-indent: 20px;
  97. background-color: #f2f2f2;
  98. }
  99. .student-selected .btn-delete {
  100. float: right;
  101. margin-right: 20px;
  102. color: red;
  103. cursor: pointer;
  104. }
  105. .btn-confirm_purchase {
  106. display: block;
  107. margin: 0 auto;
  108. margin-top: 100px;
  109. margin-bottom: 50px;
  110. width: 430px;
  111. line-height: 54px;
  112. color: #fff;
  113. font-family: PingFangSC-Regular, "PingFang SC";
  114. font-weight: 400;
  115. font-style: normal;
  116. font-size: 20px;
  117. text-align: center;
  118. background-color: rgba(0, 153, 102, 1);
  119. cursor: pointer;
  120. }
  121. .icon-error{color: #FF0000;}
  122. .icon-prompt{color: #FFFF00;}
  123. .icon-jiantou2{color: orange}
  124. .icon-prompt{color: #0B61A4}
  125. #imgPreview img{
  126. max-width: 100px;max-height: 100px;margin-right: 5px;cursor: pointer;
  127. }
  128. .more-show{
  129. width: 70%;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;cursor: pointer;
  130. }
  131. </style>
  132. </head>
  133. <body>
  134. <div class="leader-tabs">
  135. <ul class="layui-tab-title clearfix">
  136. <?php foreach ($process as $pro):?>
  137. <!-- 0.通过;1,不通过;2,当前;3.终止;4.未进行-->
  138. <?php if ($pro['status']==1):?>
  139. <li class="fl leader-this" activityType="<?php echo $pro['activityType'];?>" taskId="<?php echo $pro['taskId']?$pro['taskId']:0?>">
  140. <i class="iconfont icon-error"></i>
  141. <?php echo $pro['name']?>
  142. </li>
  143. <?php elseif ($pro['status']==2):?>
  144. <li class="fl disabled" activityType="<?php echo $pro['activityType'];?>" taskId="<?php echo $pro['taskId']?$pro['taskId']:0?>">
  145. <i class="iconfont icon-jiantou2"></i>
  146. <?php echo $pro['name']?>
  147. </li>
  148. <?php elseif ($pro['status']==3):?>
  149. <li class="fl disabled" activityType="<?php echo $pro['activityType'];?>" taskId="<?php echo $pro['taskId']?$pro['taskId']:0?>">
  150. <i class="iconfont icon-prompt"></i>
  151. <?php echo $pro['name']?>
  152. </li>
  153. <?php elseif ($pro['status']==4):?>
  154. <li class="fl disabled" activityType="<?php echo $pro['activityType'];?>" taskId="<?php echo $pro['taskId']?$pro['taskId']:0?>">
  155. <i class="iconfont icon-weixuanzhong"></i>
  156. <?php echo $pro['name']?>
  157. </li>
  158. <?php else:?>
  159. <li class="fl" activityType="<?php echo $pro['activityType'];?>" taskId="<?php echo $pro['taskId']?$pro['taskId']:0?>">
  160. <i class="iconfont icon-xuanzhong"></i>
  161. <?php echo $pro['name']?>
  162. </li>
  163. <?php endif;?>
  164. <?php endforeach;?>
  165. </ul>
  166. <div class="layui-tab-content" style="min-height: 60px;">
  167. <div class="layui-tab-item layui-show detial-show">
  168. <div class="clearfix">
  169. <span class="fl">申请人:<?php echo $startUserName;?></span>
  170. <span class="fl">开始时间:<?php echo $createTime;?></span>
  171. </div>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="sale-table">
  176. <table width="100%">
  177. <tr>
  178. <th>标题</th>
  179. <td colspan="3"><?php echo $detail['stockTitle'];?></td>
  180. </tr>
  181. <tr>
  182. <th>品目类型</th>
  183. <td colspan="3"><?php echo $itemTypeName;?></td>
  184. </tr>
  185. <tr>
  186. <th>品目名称</th>
  187. <td colspan="3"><?php echo $detail['itemName'];?>
  188. <span class="fr">规格:<?php echo $detail['itemSpec'];?>
  189. 单位:<?php echo isset($detail['unitName'])?$detail['unitName']:'';?>
  190. 理论数量:<?php echo $detail['theoreticalNo'];?></span>
  191. </td>
  192. </tr>
  193. <?php if ($detail['itemType']==0):?>
  194. <tr>
  195. <th>固定资产编号</th>
  196. <td colspan="3" title="<?php echo implode(',',$detail['fixedCodes']);?>" class="more-show">
  197. <?php echo implode(',',$detail['fixedCodes']);?>
  198. </td>
  199. </tr>
  200. <?php endif;?>
  201. <tr>
  202. <th>盘点日期</th>
  203. <td colspan="3"><?php echo date('Y-m-d',strtotime($detail['stocktakingDate']));?></td>
  204. </tr>
  205. <tr>
  206. <th>盘点数量</th>
  207. <td colspan="3"><?php echo $detail['stockNo'];?></td>
  208. </tr>
  209. <tr>
  210. <!-- more less same-->
  211. <td colspan="4" class="sale-num get-status">
  212. <?php if ($detail['lossType']==2):?>
  213. <em class="same">平</em>
  214. <?php elseif ($detail['lossType']==1):?>
  215. <em class="more">盈</em>
  216. <?php else:?>
  217. <em class="less">亏</em>
  218. <?php endif;?>
  219. 盈亏数:<span class="red"><?php echo $detail['lossNo']?></span>
  220. </td>
  221. </tr>
  222. <tr>
  223. <th>盘点凭证</th>
  224. <td colspan="3">
  225. <div id="imgPreview">
  226. <?php foreach ($detail['images'] as $image):?>
  227. <img src="<?php echo $image;?>" title="点击放大">
  228. <?php endforeach;?>
  229. </div>
  230. </td>
  231. </tr>
  232. <tr>
  233. <!-- more less same-->
  234. <td colspan="4" class="sale-num get-status">
  235. </td>
  236. </tr>
  237. <tr>
  238. <th>备注</th>
  239. <td colspan="3">
  240. <?php echo $detail['remark'];?>
  241. </td>
  242. </tr>
  243. </table>
  244. </div>
  245. <script src="/js/jquery-2.2.2.min.js" ></script>
  246. <script src="/js/layer/layer.js"></script>
  247. <script src="/js/ims/xsgl.js"></script>
  248. <script>
  249. $(document).ready(function() {
  250. //查看所有内容
  251. $('body').on('click','.more-show', function () {
  252. layer.open({
  253. type: 1,
  254. title: '查看全部固定资产编号',
  255. btn: ['关闭'],
  256. area: ['400px', '200px'], //宽高
  257. btnAlign: 'c',
  258. content: $(this).attr('title'),
  259. yes: function (index, layero) {
  260. layer.closeAll();
  261. }
  262. });
  263. })
  264. //查看图片
  265. $('body').on('click', '#imgPreview img', function () {
  266. var src = $(this).attr('src');
  267. layer.open({
  268. type: 1,
  269. title: '查看图片',
  270. btn: ['关闭'],
  271. area: ['800px', '500px'], //宽高
  272. btnAlign: 'c',
  273. content: '<img src="'+src+'" alt="" style="margin-top:5px;width: 100%;height: 100%">',
  274. yes: function (index, layero) {
  275. layer.closeAll();
  276. }
  277. });
  278. })
  279. $(".leader-tabs li").click(function(){
  280. if($(this).hasClass('disabled')){
  281. }else{
  282. var activityType = $(this).attr('activityType');
  283. var taskId = $(this).attr('taskId');
  284. var startUserName = "<?php echo $startUserName;?>";
  285. var createTime = "<?php echo $createTime;?>";
  286. var endTime = "<?php echo $endTime;?>";
  287. if(activityType=='startEvent'){
  288. var html = '';
  289. html+='<div class="clearfix">';
  290. html+='<span class="fl">申请人:'+startUserName+'</span>';
  291. html+='<span class="fl">开始时间:'+createTime+'</span>';
  292. html+='</div>';
  293. }
  294. if(activityType=='userTask'){
  295. $.ajax({
  296. type: 'post',
  297. url: "<?php echo Yii::app()->createUrl('imsStore/getTask') ;?>",
  298. data: {'taskId': taskId},
  299. dataType:'json',
  300. success:function (res) {
  301. if(res.status){
  302. var status = res.data.form[0]['value'];
  303. if(status==0){
  304. var statusName = "通过";
  305. }
  306. if(status==1){
  307. var statusName = "不通过";
  308. }
  309. if(status==3){
  310. var statusName = "终止";
  311. }
  312. if(status==4){
  313. var statusName = "未进行";
  314. }
  315. if(status==2){
  316. var statusName = "当前";
  317. }
  318. var comment = res.dara.form[1]['value'];
  319. var html = '';
  320. html+='<div class="clearfix">';
  321. html+='<span class="fl">审批人:'+res.data.assignee+'</span>';
  322. html+='<span class="fl">审批时间:'+res.data.endDate+'</span>';
  323. html+='<span class="fl">审批结果:'+statusName+'</span>';
  324. html+='</div>';
  325. html+='<div>审批意见:'+comment+'</div>'
  326. }
  327. },
  328. error:function () {
  329. }
  330. });
  331. }
  332. if(activityType=='endEvent'){
  333. var html = '';
  334. html+='<div class="clearfix">';
  335. html+='<span class="fl">此流程已结束</span>';
  336. html+='<span class="fl">结束时间:'+endTime+'</span>';
  337. html+='</div>';
  338. }
  339. $('.detial-show').html(html);
  340. }
  341. })
  342. });
  343. </script>
  344. </body>
  345. </html>