| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- <%@ page contentType="text/html;charset=GBK"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <HEAD>
- <TITLE>物流指令列表</TITLE>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/erp/erpflow.js"></script>
- <script type="text/javascript">
- var grid = null;
- var i = 0;
- var checkValue = new Array(); //定义一个数组
- $(document).ready(function(){
- if('${checkValue}' != "" && typeof ('${checkValue}') != "undefined"){
- checkValue = '${checkValue}'.split(",");
- }
- searchByKword();
- });
-
- function loadLogistList(params) {
- var checkbox = false;
- if ("${checkbox}" == 'false' || "${checkbox}" == '') {
- checkbox = false;
- } else {
- checkbox = true;
- }
- var columns = [
- {
- display : '物流指令编号',
- name : 'logist_num',
- width : 120,
- render : function(row) {
- var html = '<a href=\"#\" onclick=\"viewLogistEntry('
- + row.universalid
- + ')\"><font style="color:#0000FF">'+row.logist_num+'</font></a> ';
- return html;
- }
- },
- {
- display : '车牌号',
- name : 'car_number',
- width : 100
- },
- {
- display : '调拨单号',
- name : 'tran_num',
- width : 120
- },
- {
- display : '到达目的地',
- name : 'destination',
- width : 180
- },
- {
- display : '司机姓名',
- name : 'driver_name',
- width : 80
- },
- {
- display : '当前环节',
- name : 'tache',
- width : 100,
- render : function(row) {
- if(row.tache=='0'){
- return "物流指令";
- }else if(row.tache=='1'){
- return "首次过磅";
- }else if(row.tache=='2'){
- return "装货";
- }else if(row.tache=='3'){
- return "二次过磅";
- }else if(row.tache=='4'){
- return "出门";
- }else if(row.tache=='5'){
- return "收货";
- }else if(row.tache=='9'){
- return "完成";
- }else if(row.tache=='9'){
- return "调拨单";
- }
- }
- },
- {
- display : '审核状态',
- name : 'au_state',
- width : 80,
- render : function(row) {
- if(row.au_state == 0){
- return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/erpFlowAction.do?task=toInfo&insId='
- + row.flow_id
- + '&tabid='
- + stripscript(getCurrentTabId())
- + '\', \'查看流程信息\');\">未审核</a> ';
- }else if(row.au_state == 1){
- return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/erpFlowAction.do?task=toInfo&insId='
- + row.flow_id
- + '&tabid='
- + stripscript(getCurrentTabId())
- + '\', \'查看流程信息\');\"><font style="color:#0000FF">审核中</font></a> ';
- }else if(row.au_state == 2){
- return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/erpFlowAction.do?task=toInfo&insId='
- + row.flow_id
- + '&tabid='
- + stripscript(getCurrentTabId())
- + '\', \'查看流程信息\');\"><font style="color:#0000FF">审核通过</font></a> ';
- }else if(row.au_state == 3){
- return '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/erpFlowAction.do?task=toInfo&insId='
- + row.flow_id
- + '&tabid='
- + stripscript(getCurrentTabId())
- + '\', \'查看流程信息\');\">驳回</a> ';
- }
- }
- }];
- if ("${requestScope.lookup }" == ""){
- columns.push({
- display : '操作人',
- name : 'create_user_name',
- width : 80
- },
- {
- display : '操作时间',
- name : 'create_date',
- width : 100
- }
- ,{
- display : '操作',
- isAllowHide : false,
- width : 150,
- render : function(row) {
- var html = '<a href=\"#\" onclick=\"viewLogistEntry('
- + row.universalid
- + ')\">查看</a> ';
- if('${loginId}'==row.create_user){
- if(row.au_state==0 || row.au_state==3){
- html += '<a href=\"#\" onclick=\"editLogistEntry('
- + row.universalid
- + ')\">编辑</a> ';
- html += '<a href=\"#\" onclick=\"delLogistEntry('
- + row.universalid
- + ')\">删除</a> ';
- }
- }
- return html;
- }
- });
- }
- grid = $("#logistGrid")
- .ligerGrid({
- columns : columns,
- pageSize : 20,
- url : 'erpLogistAction.do?task=query&lookup=${lookup}&au_state=${au_state}&loginId=${loginId}&tache=${tache}'+params
- + '&time='
- + new Date().getTime(),
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- width : '99.9%',
- height : '99%',
- checkbox : checkbox,
- isChecked: f_isChecked,
- onCheckRow: function(checked, rowdata, rowindex) {
- for (var rowid in this.records){
- this.unselect(rowid);
- }
- if(checked){
- this.select(rowindex);
- }else{
- this.unselect(rowindex);
- }
- }
- });
- $("#pageloading").hide();
- if(checkbox){
- $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
- }
- }
- function searchByKword(){
- var params="";
- if(null != grid){
- grid.set("newPage","1");
- }
- var logist_num = $("#logist_num").val();//物流指令编号
- if (logist_num != "" && typeof (logist_num) != "undefined"){
- params += "&logist_num=" + encodeURI(encodeURI(logist_num));
- }
- var transfer_num = $("#transfer_num").val();//调拨单号
- if (transfer_num != "" && typeof (transfer_num) != "undefined"){
- params += "&tran_num=" + encodeURI(encodeURI(transfer_num));
- }
- var car_number = $("#car_number").val();//车牌号
- if (car_number != "" && typeof (car_number) != "undefined"){
- params += "&car_number=" + encodeURI(encodeURI(car_number));
- }
- loadLogistList(params);
- }
- //查看物流指令
- function viewLogistEntry(universalid){
- addTab('viewLogist' + getCurrentTabId(), '查看物流指令', '${pageContext.request.contextPath }/erpLogistAction.do?task=view&universalid='
- + universalid + '&tabid=' + getCurrentTabId(),true,true);
- }
- function viewLogistEntry2(universalid){
- openODialog( '${pageContext.request.contextPath }/erpLogistAction.do?task=view&universalid='
- + universalid + '&tabid=' + getCurrentTabId(),'查看物流指令');
- }
- //编辑物流指令
- function editLogistEntry(universalid){
- addTab('editLogist' + getCurrentTabId(), '编辑物流指令', '${pageContext.request.contextPath }/erpLogistAction.do?task=toEdit&universalid='
- + universalid + '&tabid=' + getCurrentTabId(),true,true);
- }
- //删除物流指令
- function delLogistEntry(universalid){
- if (window.confirm("确定要删除吗?")){
- addTab('delLogist' + getCurrentTabId(), '删除物流指令', '${pageContext.request.contextPath }/erpLogistAction.do?task=delete&universalid='
- + universalid + '&tabid=' + getCurrentTabId(),true,true);
- }
- }
- function f_select() {
- var rows = grid.getCheckedRows();
- return rows;
- }
- //默认选中
- function f_isChecked(rowdata){
- if(checkValue != "" && typeof (checkValue) != "undefined"){
- if(checkValue[i]==rowdata.universalid){
- i++;
- return true;
- }
- return false;
- }
- }
- </script>
- </HEAD>
- <BODY>
- <%@ include file="/include/button.jsp"%>
- <%@ include file="/include/message.jsp"%>
- <div class="container">
- <c:if test="${!empty requestScope.loginId && requestScope.lookup == null || requestScope.looup == ''}">
- <div id="title" class="form-button">
- <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);"/>
- </div>
- <div class="default_search" style="margin: 0; height:30px;"></div>
- </c:if>
- <div class="default_search" style="margin: 0; ">
- <ul class="list_search">
- <li class="title" style="width:100px;">物流指令编号:</li>
- <li class="text" >
- <input type="text" name="logist_num" id="logist_num" value=""/>
- </li>
- </ul>
- <ul class="list_search" style="float:left;width:250px;margin-left: 5px;">
- <li class="title" style="width: auto;">调拨单单号:</li>
- <li class="text">
- <input type="text" name="transfer_num" id="transfer_num" value=""/>
- </li>
- </ul>
- <ul class="list_search" style="float:left;width:250px;margin-left: 5px;">
- <li class="title" style="width: auto;">车牌号:</li>
- <li class="text" >
- <input type="text" name="car_number" id="car_number" value=""/>
- </li>
- </ul>
- <ul>
- <li class="search-button" style="width: auto;margin-left: -30px;"><input type="button" class='l-button'
- name="search" onclick="searchByKword()" value="查询" /></li>
- </ul>
- <!-- <ul class="list_search" style="width:300px;clear: both;padding-left: 30px;"> -->
- <!-- <li class="title">车牌号:</li> -->
- <!-- <li class="text" style="width:190px;"> -->
- <!-- <input type="text" name="car_number" id="car_number" value=""/> -->
- <!-- </li> -->
- <!-- </ul> -->
- </div>
- <div style="overflow: hidden; clear: both;">
- <div id="logistGrid" style="margin: 0; padding: 0"></div>
- </div>
- </div>
- </BODY>
- </HTML>
|