receiveList.jsp 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <%@ page contentType="text/html;charset=GBK"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <HEAD>
  5. <TITLE>收货信息</TITLE>
  6. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  7. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  8. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  9. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
  10. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  11. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  12. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  13. <script type="text/javascript" src="/shares/js/constant.js"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script type="text/javascript">
  16. var grid = null;
  17. $(document).ready(function() {
  18. $("#search_date_start").ligerDateEditor({
  19. labelWidth : 128,
  20. labelAlign : 'right',
  21. showTime : false
  22. });
  23. $("#search_date_end").ligerDateEditor({
  24. labelWidth : 128,
  25. labelAlign : 'right',
  26. showTime : false
  27. });
  28. searchByKword();
  29. });
  30. function loadReceiveList(params) {
  31. var columns = [
  32. {
  33. display : '车牌号',
  34. name : 'car_number',
  35. width : 120
  36. },
  37. {
  38. display : '物流单号',
  39. name : 'logist_num',
  40. width : 120,
  41. render : function(row) {
  42. var html = '<a href=\"#\" onclick=\"viewLogistEntry('
  43. + row.logistice_id
  44. + ')\"><font style="color:#0000FF">'
  45. + row.logist_num + '</font></a>&nbsp;';
  46. return html;
  47. }
  48. }, {
  49. display : '调拨单号',
  50. name : 'tran_num',
  51. width : 120
  52. }, {
  53. display : '司机姓名',
  54. name : 'driver_name',
  55. width : 120
  56. }, {
  57. display : '收货时间',
  58. name : 'receive_date',
  59. width : 150
  60. }, {
  61. display : '操作人',
  62. name : 'create_user_name',
  63. width : 120
  64. }, {
  65. display : '操作时间',
  66. name : 'create_date',
  67. width : 150
  68. } ];
  69. if ("${requestScope.lookup }" == "") {
  70. columns.push({
  71. display : '操作',
  72. isAllowHide : false,
  73. width : 200,
  74. render : function(row) {
  75. var html = '<a href=\"#\" onclick=\"viewReceiveEntry('
  76. + row.universalid + ')\">查看</a>&nbsp;';
  77. if ("${requestScope.loginId }" != null
  78. && "${requestScope.loginId }" != '') {
  79. /*html += '<a href=\"#\" onclick=\"editReceiveEntry('
  80. + row.universalid + ',' + row.logistice_id
  81. + ')\">编辑</a>&nbsp;';*/
  82. html += '<a href=\"#\" onclick=\"delReceiveEntry('
  83. + row.universalid + ',' + row.logistice_id
  84. + ')\">删除</a>&nbsp;';
  85. }
  86. return html;
  87. }
  88. });
  89. }
  90. grid = $("#receiveGrid")
  91. .ligerGrid(
  92. {
  93. columns : columns,
  94. pageSize : 20,
  95. url : 'erpEndProdReceiveAction.do?task=receiveList&lookup=${lookup}&loginId=${loginId}'
  96. + params + '&time=' + new Date().getTime(),
  97. pageParmName : 'p', //页索引参数名,(提交给服务器)
  98. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  99. width : '99.9%',
  100. height : '99%'
  101. });
  102. $("#pageloading").hide();
  103. }
  104. function viewLogistEntry(universalid) {
  105. addTab('viewLogist' + getCurrentTabId(), '查看物流指令',
  106. '${pageContext.request.contextPath }/erpLogistAction.do?task=view&universalid='
  107. + universalid + '&tabid=' + getCurrentTabId(), true,
  108. true);
  109. }
  110. function viewReceiveEntry(id) {
  111. window.parent
  112. .f_addTab(
  113. new Date().getTime(),
  114. '查看收货信息',
  115. '${pageContext.request.contextPath }/erpEndProdReceiveAction.do?task=viewReceiveEntry&id='
  116. + id + '&tabid=' + getCurrentTabId());
  117. }
  118. function editReceiveEntry(id, logist_id) {
  119. window.parent
  120. .f_addTab(
  121. new Date().getTime(),
  122. '编辑收货信息',
  123. '${pageContext.request.contextPath }/erpEndProdReceiveAction.do?task=toEditReceiveEntry&id='
  124. + id
  125. + '&logist_id='
  126. + logist_id
  127. + '&tabid='
  128. + getCurrentTabId());
  129. }
  130. function delReceiveEntry(id, logistice_id) {
  131. if (window.confirm("确定要删除吗?")) {
  132. /*var param = {
  133. 'id' : id,
  134. 'logistice_id' : logistice_id
  135. };
  136. sendAjaxParam(param,
  137. "erpEndProdReceiveAction.do?task=delReceiveEntry", 'json',
  138. delProcess);*/
  139. $.ajax({
  140. type:"POST", //请求方式
  141. url:"erpLogistAction.do?task=deleteLogistTacheRec&universalid="+id+"&logist_universalid="+logistice_id+"&type=3&time="+new Date().getTime(), //请求路径
  142. cache: false,
  143. dataType: 'json', //返回值类型
  144. success:function(json){
  145. if(json == '0'){
  146. addInfo("删除成功!");
  147. }else if(json == '-1'){
  148. addError("删除失败!");
  149. }else if(json == '1'){
  150. addError("该物流指令已在装货中,无法删除!");
  151. }else if(json == '2'){
  152. addError("该物流指令不在装货环节,无法删除!");
  153. }else if(json == '3'){
  154. addError("该物流指令不在出门环节,无法删除!");
  155. }else if(json == '4'){
  156. addError("该物流指令不在收货环节,无法删除!");
  157. }else if(json == '5'){
  158. addError("该物流指令还未完成,无法删除!");
  159. }
  160. searchByKword();
  161. }
  162. });
  163. }
  164. }
  165. function delProcess(data) {
  166. if (data.error != null) {
  167. $.ligerDialog.error(data.error);
  168. }
  169. if (data.success != null) {
  170. $.ligerDialog.success(data.success);
  171. }
  172. searchByKword();
  173. }
  174. function searchByKword() {
  175. if (grid != null) {
  176. grid.set("newPage", "1");
  177. }
  178. var params = "";
  179. var search_car_num = $("#search_car_num").val();
  180. params = params + "&search_car_num="
  181. + encodeURI(encodeURI(search_car_num));
  182. var search_logist_num = $("#search_logist_num").val();
  183. params = params + "&search_logist_num="
  184. + encodeURI(encodeURI(search_logist_num));
  185. var search_date_start = $("#search_date_start").val();
  186. params = params + "&search_date_start="
  187. + encodeURI(encodeURI(search_date_start));
  188. var search_date_end = $("#search_date_end").val();
  189. params = params + "&search_date_end="
  190. + encodeURI(encodeURI(search_date_end));
  191. loadReceiveList(params);
  192. }
  193. </script>
  194. </HEAD>
  195. <BODY>
  196. <%@ include file="/include/button.jsp"%>
  197. <%@ include file="/include/message.jsp"%>
  198. <div class="container">
  199. <c:if test="${requestScope.loginId != null && requestScope.loginId != '' }">
  200. <div id="title" class="form-button">
  201. <input style="width: 80px;" type="button" class="l-button" value="收货登记"
  202. onclick="window.parent.f_addTab(new Date().getTime(), '收货登记', '${pageContext.request.contextPath }/erpEndProdReceiveAction.do?task=toCreate&tabid=' + getCurrentTabId());" />
  203. </div>
  204. <div class="default_search" style="margin: 0; height: 30px;"></div>
  205. </c:if>
  206. <div class="default_search" style="margin: 0;">
  207. <ul class="list_search">
  208. <li class="title">车牌号:</li>
  209. <li class="text"><input type="text" name="search_car_num" id="search_car_num" value="" /></li>
  210. </ul>
  211. <ul class="list_search">
  212. <li class="title">物流单号:</li>
  213. <li class="text"><input type="text" name="search_logist_num" id="search_logist_num" value="" /></li>
  214. </ul>
  215. <!-- </div> -->
  216. <!-- <div class="default_search" style="margin: 0;"> -->
  217. <ul class="list_search">
  218. <li class="title">收货时间:</li>
  219. <li class="text"><input type="text" name="search_date_start" id="search_date_start" style="width: 130px;" />
  220. 至</li>
  221. <li class="text"><input type="text" name="search_date_end" id="search_date_end" style="width: 130px;" /></li>
  222. </ul>
  223. <ul>
  224. <li class="search-button"><input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询" /></li>
  225. </ul>
  226. </div>
  227. <div style="overflow: hidden; clear: both;">
  228. <div id="receiveGrid" style="margin: 0; padding: 0"></div>
  229. </div>
  230. </div>
  231. </BODY>
  232. </HTML>