newstock.php 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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 href="/css/ims/ims.css" rel="stylesheet">
  11. <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css"/>
  12. <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css"/>
  13. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
  14. <style>
  15. .green {
  16. color: green;
  17. }
  18. .red {
  19. color: red;
  20. }
  21. .ims-box {
  22. margin: 20px;
  23. }
  24. .screen > div {
  25. float: left;
  26. margin-right: 5px;
  27. }
  28. .screen > span {
  29. line-height: 30px;
  30. margin-right: 5px;
  31. }
  32. .screen .date > input {
  33. height: 30px;
  34. border-radius: 4px;
  35. border: 1px solid #ccc;
  36. box-shadow: none;
  37. text-indent: 10px;
  38. }
  39. .screen button {
  40. padding: 4px 12px;
  41. }
  42. .table-box {
  43. margin-top: 30px;
  44. }
  45. .btn-formal-order {
  46. cursor: pointer;
  47. }
  48. .application-number-box {
  49. margin-top: 50px;
  50. text-align: center;
  51. }
  52. .application-number-box span {
  53. margin-right: 20px;
  54. }
  55. .layui-layer-btn .layui-layer-btn0 {
  56. border-color: #2977ff !important;
  57. background-color: #2977ff !important;
  58. color: #fff;
  59. }
  60. .stop-layer-box, .resubmit-layer-box, .delete-layer-box {
  61. line-height: 140px;
  62. text-align: center;
  63. }
  64. .blue-color{
  65. color:blue;
  66. cursor: pointer;
  67. }
  68. #record-table,th{
  69. text-align: center;
  70. }
  71. .plan-require{
  72. cursor: pointer;
  73. color:#00BBFF;
  74. }
  75. .layer-relate{
  76. width: 481px;
  77. height: 217px;
  78. }
  79. </style>
  80. </head>
  81. <body>
  82. <div class="ims-box">
  83. <form action="<?php echo Yii::app()->createUrl('imsStore/newStock'); ?>" method="get">
  84. <div class="screen clearfix">
  85. <div class="date">
  86. 计划名称:<input type="text" name="planName" class="plan_name" value=""/>
  87. </div>
  88. <div class="date fl">
  89. <span>创建计划日期:</span>
  90. <input type="text" readonly name="startStockDate" class="some_class" value="" id="some_class_1"/> --
  91. <input type="text" readonly name="endStockDate" class="some_class" value="" id="some_class_2"/>
  92. </div>
  93. <button type="submit" class="label-primary-s bth-s">搜索</button>
  94. </div>
  95. </form>
  96. <div class="table-box">
  97. <table id="record-table"
  98. class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
  99. style="font-size:12px">
  100. <thead>
  101. <tr>
  102. <th>计划序号</th>
  103. <th>盘点计划名称</th>
  104. <th>创建人</th>
  105. <th>起止时间</th>
  106. <th>已提交仓库数</th>
  107. <th>盘点要求</th>
  108. <th>提交状态</th>
  109. <th>操作</th>
  110. </tr>
  111. </thead>
  112. <tbody>
  113. <?php if (isset($list) && $list): ?>
  114. <?php $no = 1;?>
  115. <?php foreach ($list as $value): ?>
  116. <tr>
  117. <td><?php echo $no;?></td>
  118. <td><?php echo $value['title'] ?></td>
  119. <td><?php echo $value['createName'] ?></td>
  120. <td><?php echo date('Y-m-d', strtotime($value['beginTime']));?> 至 <?php echo date('Y-m-d', strtotime($value['endTime']));?></td>
  121. <td><?php echo $value['commitedCount']; ?></td>
  122. <td class="plan-require" planId="<?php echo $value['pId'];?>">盘点要求</td>
  123. <div style="display: none" class="plan-require-<?php echo $value['pId'];?>"><?php echo isset($value["remark"])?$value["remark"]:'';?></div>
  124. <?php if(isset($value['status'])):?>
  125. <?php if($value['status'] == 0):?>
  126. <td>审批中</td>
  127. <td class="blue-color plan-view" planId="<?php echo $value['pId'];?>" statusId="<?php echo $value['status'];?>">盘点单</td>
  128. <?php elseif($value['status'] == 1):?>
  129. <td>审批通过</td>
  130. <td class="blue-color plan-view" planId="<?php echo $value['pId'];?>" statusId="<?php echo $value['status'];?>">盘点单</td>
  131. <?php elseif($value['status'] == 2):?>
  132. <td>不通过</td>
  133. <td class="blue-color plan-view" planId="<?php echo $value['pId'];?>" statusId="<?php echo $value['status'];?>">盘点单</td>
  134. <?php elseif($value['status'] == 3):?>
  135. <td>已终止</td>
  136. <td class="blue-color plan-view" planId="<?php echo $value['pId'];?>" statusId="<?php echo $value['status'];?>">盘点单</td>
  137. <?php endif;?>
  138. <?php else:?>
  139. <td>待提交</td>
  140. <td class="blue-color add-new-list" planId="<?php echo $value['pId'];?>">新建</td>
  141. <?php endif;?>
  142. </tr>
  143. <?php $no++;?>
  144. <?php endforeach; ?>
  145. <?php endif; ?>
  146. </tbody>
  147. </table>
  148. <?php if (isset($page) && $page): ?>
  149. <div class="col-sm-12">
  150. <ul class="pagination">
  151. <?php
  152. $params = array();
  153. if (isset($_GET['startStockDate']) && $_GET['startStockDate']) {
  154. $params['startStockDate'] = $_GET['startStockDate'];
  155. }
  156. if (isset($_GET['endStockDate']) && $_GET['endStockDate']) {
  157. $params['endStockDate'] = $_GET['endStockDate'];
  158. }
  159. if (isset($_GET['page'])) {
  160. $params['page'] = $_GET['page'];
  161. } else {
  162. $params['page'] = 1;
  163. }
  164. echo formatPage($page, 'imsStore/newStock', $params)
  165. ?>
  166. </ul>
  167. </div>
  168. <?php endif; ?>
  169. </div>
  170. </div>
  171. <!-- 关联正式订单弹层 -->
  172. <div class="layer-relate" style="display: none">
  173. <div class="layer-filter"></div>
  174. </div>
  175. <script src="/js/jquery-2.2.2.min.js"></script>
  176. <script src="/js/jquery.datetimepicker.js"></script>
  177. <script src="/js/layer/layer.js"></script>
  178. <script src="/js/xsgl.js"></script>
  179. <script>
  180. $(document).ready(function () {
  181. $('.some_class').datetimepicker({
  182. format: "Y-m-d", //格式化日期
  183. timepicker: false //关闭时间选项
  184. });
  185. <?php if (isset($_GET['startStockDate'])):?>
  186. $("#some_class_1").attr("value", "<?php echo $_GET['startStockDate']?>");
  187. <?php endif;?>
  188. <?php if (isset($_GET['endStockDate'])):?>
  189. $("#some_class_2").attr("value", "<?php echo $_GET['endStockDate']?>");
  190. <?php endif;?>
  191. <?php if (isset($_GET['planName'])):?>
  192. $(".plan_name").val("<?php echo $_GET['planName']?>");
  193. <?php endif;?>
  194. $('.some_class').datetimepicker({
  195. format: "Y-m-d", //格式化日期
  196. timepicker: false //关闭时间选项
  197. });
  198. //新建盘点单
  199. $("body").delegate(".add-new-list", "click", function() {
  200. var planId = $(this).attr("planId");
  201. if(planId){
  202. window.location.href = "<?php echo Yii::app()->createUrl('imsStore/createPlanList');?>"+"?planId="+planId;
  203. }else{
  204. layer.msg("请指定盘点计划");
  205. }
  206. });
  207. //查看盘点单
  208. $("body").delegate(".plan-view", "click", function() {
  209. var planId = $(this).attr("planId");
  210. var statusId = $(this).attr("statusId");
  211. if(planId){
  212. window.location.href = "<?php echo Yii::app()->createUrl('imsStore/viewPlanList');?>"+"?planId="+planId+"&statusId="+statusId;
  213. }else{
  214. layer.msg("请指定盘点计划");
  215. }
  216. });
  217. //查看盘点要求
  218. $("body").delegate(".plan-require", "click", function() {
  219. var planId = $(this).attr("planId");
  220. if(planId){
  221. $('.layer-relate .layer-filter').html($(".plan-require-"+planId).html());
  222. layer.open({
  223. type: 1,
  224. title: '盘点要求',
  225. btn: ['关闭'],
  226. area: ['510px', '320px'], //宽高
  227. btnAlign: 'c',
  228. content: $('.layer-relate'),
  229. yes: function (index, layero) {
  230. layer.closeAll();
  231. }
  232. });
  233. }
  234. });
  235. });
  236. </script>
  237. </body>
  238. </html>