logistList.jsp 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  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/ligerGrid.js" type="text/javascript"></script>
  10. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  11. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  12. <script type="text/javascript" src="/shares/js/constant.js"></script>
  13. <script type="text/javascript" src="/shares/js/common.js"></script>
  14. <script type="text/javascript" src="/shares/js/yw/erp/erpflow.js"></script>
  15. <script type="text/javascript">
  16. var grid = null;
  17. var i = 0;
  18. var checkValue = new Array(); //定义一个数组
  19. $(document).ready(function(){
  20. if('${checkValue}' != "" && typeof ('${checkValue}') != "undefined"){
  21. checkValue = '${checkValue}'.split(",");
  22. }
  23. searchByKword();
  24. });
  25. function loadLogistList(params) {
  26. var checkbox = false;
  27. if ("${checkbox}" == 'false' || "${checkbox}" == '') {
  28. checkbox = false;
  29. } else {
  30. checkbox = true;
  31. }
  32. var columns = [
  33. {
  34. display : '物流指令编号',
  35. name : 'logist_num',
  36. width : 120,
  37. render : function(row) {
  38. var html = '<a href=\"#\" onclick=\"viewLogistEntry('
  39. + row.universalid
  40. + ')\"><font style="color:#0000FF">'+row.logist_num+'</font></a>&nbsp;';
  41. return html;
  42. }
  43. },
  44. {
  45. display : '车牌号',
  46. name : 'car_number',
  47. width : 100
  48. },
  49. {
  50. display : '调拨单号',
  51. name : 'tran_num',
  52. width : 120
  53. },
  54. {
  55. display : '到达目的地',
  56. name : 'destination',
  57. width : 180
  58. },
  59. {
  60. display : '司机姓名',
  61. name : 'driver_name',
  62. width : 80
  63. },
  64. {
  65. display : '当前环节',
  66. name : 'tache',
  67. width : 100,
  68. render : function(row) {
  69. if(row.tache=='0'){
  70. return "物流指令";
  71. }else if(row.tache=='1'){
  72. return "首次过磅";
  73. }else if(row.tache=='2'){
  74. return "装货";
  75. }else if(row.tache=='3'){
  76. return "二次过磅";
  77. }else if(row.tache=='4'){
  78. return "出门";
  79. }else if(row.tache=='5'){
  80. return "收货";
  81. }else if(row.tache=='9'){
  82. return "完成";
  83. }else if(row.tache=='9'){
  84. return "调拨单";
  85. }
  86. }
  87. },
  88. {
  89. display : '审核状态',
  90. name : 'au_state',
  91. width : 80,
  92. render : function(row) {
  93. if(row.au_state == 0){
  94. return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/erpFlowAction.do?task=toInfo&insId='
  95. + row.flow_id
  96. + '&tabid='
  97. + stripscript(getCurrentTabId())
  98. + '\', \'查看流程信息\');\">未审核</a>&nbsp;';
  99. }else if(row.au_state == 1){
  100. return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/erpFlowAction.do?task=toInfo&insId='
  101. + row.flow_id
  102. + '&tabid='
  103. + stripscript(getCurrentTabId())
  104. + '\', \'查看流程信息\');\"><font style="color:#0000FF">审核中</font></a>&nbsp;';
  105. }else if(row.au_state == 2){
  106. return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/erpFlowAction.do?task=toInfo&insId='
  107. + row.flow_id
  108. + '&tabid='
  109. + stripscript(getCurrentTabId())
  110. + '\', \'查看流程信息\');\"><font style="color:#0000FF">审核通过</font></a>&nbsp;';
  111. }else if(row.au_state == 3){
  112. return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/erpFlowAction.do?task=toInfo&insId='
  113. + row.flow_id
  114. + '&tabid='
  115. + stripscript(getCurrentTabId())
  116. + '\', \'查看流程信息\');\">驳回</a>&nbsp;';
  117. }
  118. }
  119. }];
  120. if ("${requestScope.lookup }" == ""){
  121. columns.push({
  122. display : '操作人',
  123. name : 'create_user_name',
  124. width : 80
  125. },
  126. {
  127. display : '操作时间',
  128. name : 'create_date',
  129. width : 100
  130. }
  131. ,{
  132. display : '操作',
  133. isAllowHide : false,
  134. width : 150,
  135. render : function(row) {
  136. var html = '<a href=\"#\" onclick=\"viewLogistEntry('
  137. + row.universalid
  138. + ')\">查看</a>&nbsp;';
  139. if('${loginId}'==row.create_user){
  140. if(row.au_state==0 || row.au_state==3){
  141. html += '<a href=\"#\" onclick=\"editLogistEntry('
  142. + row.universalid
  143. + ')\">编辑</a>&nbsp;';
  144. html += '<a href=\"#\" onclick=\"delLogistEntry('
  145. + row.universalid
  146. + ')\">删除</a>&nbsp;';
  147. }
  148. }
  149. return html;
  150. }
  151. });
  152. }
  153. grid = $("#logistGrid")
  154. .ligerGrid({
  155. columns : columns,
  156. pageSize : 20,
  157. url : 'erpLogistAction.do?task=query&lookup=${lookup}&au_state=${au_state}&loginId=${loginId}&tache=${tache}'+params
  158. + '&time='
  159. + new Date().getTime(),
  160. pageParmName : 'p', //页索引参数名,(提交给服务器)
  161. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  162. width : '99.9%',
  163. height : '99%',
  164. checkbox : checkbox,
  165. isChecked: f_isChecked,
  166. onCheckRow: function(checked, rowdata, rowindex) {
  167. for (var rowid in this.records){
  168. this.unselect(rowid);
  169. }
  170. if(checked){
  171. this.select(rowindex);
  172. }else{
  173. this.unselect(rowindex);
  174. }
  175. }
  176. });
  177. $("#pageloading").hide();
  178. if(checkbox){
  179. $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
  180. }
  181. }
  182. function searchByKword(){
  183. var params="";
  184. if(null != grid){
  185. grid.set("newPage","1");
  186. }
  187. var logist_num = $("#logist_num").val();//物流指令编号
  188. if (logist_num != "" && typeof (logist_num) != "undefined"){
  189. params += "&logist_num=" + encodeURI(encodeURI(logist_num));
  190. }
  191. var transfer_num = $("#transfer_num").val();//调拨单号
  192. if (transfer_num != "" && typeof (transfer_num) != "undefined"){
  193. params += "&tran_num=" + encodeURI(encodeURI(transfer_num));
  194. }
  195. var car_number = $("#car_number").val();//车牌号
  196. if (car_number != "" && typeof (car_number) != "undefined"){
  197. params += "&car_number=" + encodeURI(encodeURI(car_number));
  198. }
  199. loadLogistList(params);
  200. }
  201. //查看物流指令
  202. function viewLogistEntry(universalid){
  203. addTab('viewLogist' + getCurrentTabId(), '查看物流指令', '${pageContext.request.contextPath }/erpLogistAction.do?task=view&universalid='
  204. + universalid + '&tabid=' + getCurrentTabId(),true,true);
  205. }
  206. function viewLogistEntry2(universalid){
  207. openODialog( '${pageContext.request.contextPath }/erpLogistAction.do?task=view&universalid='
  208. + universalid + '&tabid=' + getCurrentTabId(),'查看物流指令');
  209. }
  210. //编辑物流指令
  211. function editLogistEntry(universalid){
  212. addTab('editLogist' + getCurrentTabId(), '编辑物流指令', '${pageContext.request.contextPath }/erpLogistAction.do?task=toEdit&universalid='
  213. + universalid + '&tabid=' + getCurrentTabId(),true,true);
  214. }
  215. //删除物流指令
  216. function delLogistEntry(universalid){
  217. if (window.confirm("确定要删除吗?")){
  218. addTab('delLogist' + getCurrentTabId(), '删除物流指令', '${pageContext.request.contextPath }/erpLogistAction.do?task=delete&universalid='
  219. + universalid + '&tabid=' + getCurrentTabId(),true,true);
  220. }
  221. }
  222. function f_select() {
  223. var rows = grid.getCheckedRows();
  224. return rows;
  225. }
  226. //默认选中
  227. function f_isChecked(rowdata){
  228. if(checkValue != "" && typeof (checkValue) != "undefined"){
  229. if(checkValue[i]==rowdata.universalid){
  230. i++;
  231. return true;
  232. }
  233. return false;
  234. }
  235. }
  236. </script>
  237. </HEAD>
  238. <BODY>
  239. <%@ include file="/include/button.jsp"%>
  240. <%@ include file="/include/message.jsp"%>
  241. <div class="container">
  242. <c:if test="${!empty requestScope.loginId && requestScope.lookup == null || requestScope.looup == ''}">
  243. <div id="title" class="form-button">
  244. <input style="width:100px;" type="button" class="l-button" value="发起物流指令" onclick="addTab('addLogist'+getCurrentTabId(), '新增物流指令', '${pageContext.request.contextPath }/erpLogistAction.do?task=toAdd&tabid=' + getCurrentTabId(),true,true);"/>
  245. </div>
  246. <div class="default_search" style="margin: 0; height:30px;"></div>
  247. </c:if>
  248. <div class="default_search" style="margin: 0; ">
  249. <ul class="list_search">
  250. <li class="title" style="width:100px;">物流指令编号:</li>
  251. <li class="text" >
  252. <input type="text" name="logist_num" id="logist_num" value=""/>
  253. </li>
  254. </ul>
  255. <ul class="list_search" style="float:left;width:250px;margin-left: 5px;">
  256. <li class="title" style="width: auto;">调拨单单号:</li>
  257. <li class="text">
  258. <input type="text" name="transfer_num" id="transfer_num" value=""/>
  259. </li>
  260. </ul>
  261. <ul class="list_search" style="float:left;width:250px;margin-left: 5px;">
  262. <li class="title" style="width: auto;">车牌号:</li>
  263. <li class="text" >
  264. <input type="text" name="car_number" id="car_number" value=""/>
  265. </li>
  266. </ul>
  267. <ul>
  268. <li class="search-button" style="width: auto;margin-left: -30px;"><input type="button" class='l-button'
  269. name="search" onclick="searchByKword()" value="查询" /></li>
  270. </ul>
  271. <!-- <ul class="list_search" style="width:300px;clear: both;padding-left: 30px;"> -->
  272. <!-- <li class="title">车牌号:</li> -->
  273. <!-- <li class="text" style="width:190px;"> -->
  274. <!-- <input type="text" name="car_number" id="car_number" value=""/> -->
  275. <!-- </li> -->
  276. <!-- </ul> -->
  277. </div>
  278. <div style="overflow: hidden; clear: both;">
  279. <div id="logistGrid" style="margin: 0; padding: 0"></div>
  280. </div>
  281. </div>
  282. </BODY>
  283. </HTML>