| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <%@ 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">
- var grid = null;
- var i = 0;
- var checkValue = new Array(); //定义一个数组
- $(document).ready(function(){
- if('${checkValue}' != "" && typeof ('${checkValue}') != "undefined"){
- checkValue = '${checkValue}'.split(",");
- }
- searchByKword();
- });
- function loadCounterList(params) {
- var checkbox = false;
- if ("${checkbox}" == 'false' || "${checkbox}" == '') {
- checkbox = false;
- } else {
- checkbox = true;
- }
- var columns = [
- {
- display : '点包机编号',
- name : 'counter_no',
- width : 150
- },
- {
- display : '点包机名称',
- name : 'counter_name',
- width : 320
- },
- {
- display : '发料仓库',
- name : 'sdepot_name',
- width : 320
- }];
-
- if ("${requestScope.lookup }" == "") {
- columns.push({
- display : '操作',
- isAllowHide : false,
- width : 200,
- render : function(row) {
- var html = '<a href=\"#\" onclick=\"viewCounterEntry('
- + row.universalid
- + ')\">查看</a> ';
- html += '<a href=\"#\" onclick=\"editCounterEntry('
- + row.universalid
- + ')\">编辑</a> ';
- html += '<a href=\"#\" onclick=\"delCounterEntry('
- + row.universalid
- + ')\">删除</a> ';
- return html;
- }
- });
- }
- grid = $("#counterGrid")
- .ligerGrid(
- {
- columns : columns,
- pageSize : 20,
- url : 'erpEndProdCounterAction.do?task=counterList&lookup=${lookup}'+params
- + '&time='
- + new Date().getTime(),
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- width : '99.9%',
- height : '99%',
- isChecked: f_isChecked,
- checkbox : checkbox,
- onCheckRow : function(checked, rowdata, rowindex) {
- for ( var rowid in this.records)
- this.unselect(rowid);
- this.select(rowindex);
- }
- });
- $("#pageloading").hide();
- if(checkbox){
- $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
- }
- }
- function viewCounterEntry(id){
- window.parent.f_addTab(new Date().getTime(), '查看点包机信息', '${pageContext.request.contextPath }/erpEndProdCounterAction.do?task=viewCounterEntry&id='+id+'&tabid=' + getCurrentTabId());
- }
- function editCounterEntry(id){
- window.parent.f_addTab(new Date().getTime(), '编辑点包机信息', '${pageContext.request.contextPath }/erpEndProdCounterAction.do?task=toEditCounterEntry&id='+id+'&tabid=' + getCurrentTabId());
- }
- function delCounterEntry(id){
- if (window.confirm("确定要删除吗?")){
- var param={'id':id};
- sendAjaxParam(param,"erpEndProdCounterAction.do?task=delCounterEntry",'json',delProcess);
- }
- }
- function delProcess(data){
- if(data.error!=null){
- $.ligerDialog.error(data.error);
- }
- if(data.success!=null){
- $.ligerDialog.success(data.success);
- }
- searchByKword();
- }
- function searchByKword(){
- if(grid!=null){
- grid.set("newPage","1");
- }
- var params="";
- var counter_search_num=$("#counter_search_num").val();
- params=params+"&counter_search_num="+encodeURI(encodeURI(counter_search_num));
- var counter_search_name=$("#counter_search_name").val();
- params=params+"&counter_search_name="+encodeURI(encodeURI(counter_search_name));
- loadCounterList(params);
- }
- 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="${requestScope.lookup == null or requestScope.looup == '' }">
- <div id="title" class="form-button">
- <input style="width:80px;" type="button" class="l-button" value="添加点包机" onclick="window.parent.f_addTab(new Date().getTime(), '添加点包机', '${pageContext.request.contextPath }/erpEndProdCounterAction.do?task=toCreate&tabid=' + getCurrentTabId());"/>
- </div>
- <div class="default_search" style="margin: 0; height:30px;"></div>
- </c:if>
- <div class="default_search" style="margin: 0;">
- <ul class="list_search" style="width:300px;">
- <li class="title" style="width:100px;">点包机编号:</li>
- <li class="text" >
- <input type="text" name="counter_search_num" id="counter_search_num" value=""/>
- </li>
- </ul>
- <ul class="list_search" style="float:left;width:300px">
- <li class="title" style="width:100px;">点包机名称:</li>
- <li class="text" style="width:150px;">
- <input type="text" name="counter_search_name" id="counter_search_name" value=""/>
- </li>
- </ul>
- <ul>
- <li class="search-button"><input type="button" class='l-button'
- name="search" onclick="searchByKword()" value="查询" /></li>
- </ul>
- </div>
- <div style="overflow: hidden; clear: both;">
- <div id="counterGrid" style="margin: 0; padding: 0"></div>
- </div>
- </div>
- </BODY>
- </HTML>
|