| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <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/ligerui.all.js" type="text/javascript"></script>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <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 checkValue = new Array(); //定义一个数组
- var i = 0;
- $(function() {
- if('${checkValue}' != "" && typeof ('${checkValue}') != "undefined"){
- checkValue = '${checkValue}'.split(",");
- }
- initPrintConfGrid();
- });
- function initPrintConfGrid(params){
- var checkbox = false;
- if ("${checkbox}" == 'false' || "${checkbox}" == '') {
- checkbox = false;
- } else {
- checkbox = true;
- }
- var columns =[
- {
- display : '打印类型',
- name : 'type',
- width : 100,
- render : function(row){
- if(null !=row.type){
- var type = "";
- $.ajax({
- url:'erpSaleInvoiceAciton.do?task=toDict',
- async: false,
- type: 'post',
- data: {"dvalue":row.type,"type":"erp_print_conf|type"},
- cache: false,
- error: function(obj){
- },
- success: function(obj){
- if(obj!=""){
- type = obj;
- }
- }
- });
- return type;
- }
- }
- },
- {
- display : '指向',
- name : 'portrait',
- width : 80,
- render : function(row){
- if(row.portrait=='0'){
- return "横向";
- }else if(row.portrait=='1'){
- return "纵向";
- }
- }
- },
- {
- display : '左边距',
- name : 'leftmargin',
- width : 80
- },
- {
- display : '右边距',
- name : 'rightmargin',
- width : 80
- },
- {
- display : '上边距',
- name : 'topmargin',
- width : 80
- },
- {
- display : '下边距',
- name : 'bottommargin',
- width : 80
- },
- {
- display : '创建人',
- name : 'create_user_name',
- width : 100
- },
- {
- display : '创建时间',
- name : 'create_date',
- width : 120
- }];
- if ("${requestScope.lookup }" == "") {
- columns
- .push({
- display : '操作',
- isAllowHide : false,
- width : 150,
- render : function(row) {
- var html = '<a href=\"#\" onclick=\"viewPrintConfEntry('
- + row.universalid
- + ')\">查看</a> ';
- if('${loginId}'==row.create_user_id){
- html += '<a href=\"#\" onclick=\"editPrintConfEntry('
- + row.universalid
- + ')\">编辑</a> ';
- html += '<a href=\"#\" onclick=\"delPrintConfEntry('
- + row.universalid
- + ')\">删除</a> ';
- }
- return html;
- }
- });
- }
- grid = $("#maingrid4")
- .ligerGrid(
- {
- columns : columns,
- pageSize : 20,
- url : 'erpPrintConfAction.do?task=list&lookup=${lookup}&confType=${confType}&time='
- + new Date().getTime() + params,
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- width : '99.6%',
- 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);
- }
- },
- onError : function() {
- alert("数据加载失败,请刷新页面!");
- }
- });
- $("#pageloading").hide();
- $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
- }
-
-
- //查看打印配置
- function viewPrintConfEntry(universalid){
- addTab('viewPrintConf' + getCurrentTabId(), '查看打印配置', '${pageContext.request.contextPath }/erpPrintConfAction.do?task=view&universalid='
- + universalid + '&tabid=' + getCurrentTabId(),true,true);
- }
- //编辑打印配置
- function editPrintConfEntry(universalid){
- addTab('editPrintConf' + getCurrentTabId(), '编辑打印配置', '${pageContext.request.contextPath }/erpPrintConfAction.do?task=toEdit&universalid='
- + universalid + '&tabid=' + getCurrentTabId(),true,true);
- }
- //删除打印配置
- function delPrintConfEntry(universalid){
- if (window.confirm("确定要删除吗?")){
- addTab('delPrintConf' + getCurrentTabId(), '删除打印配置', '${pageContext.request.contextPath }/erpPrintConfAction.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.request_id){
- i++;
- return true;
- }
- return false;
- }
- }
-
- //查询
- function searchByKword() {
- var params="";
- if(null != grid){
- grid.set("newPage","1");
- }
- var type = $("#printConf\\.type").val();//类型
- if (type != "" && typeof (type) != "undefined"){
- params += "&type=" + encodeURI(encodeURI(type));
- }
- initPrintConfGrid(params);
- }
- </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('addPrintConf'+getCurrentTabId(), '新增打印配置', '${pageContext.request.contextPath }/erpPrintConfAction.do?task=toAdd&tabid=' + getCurrentTabId(),true,true);"/>
- </div>
- <div class="default_search" style="margin: 0; height:30px;"></div>
-
- <div class="default_search" style="margin: 0; padding: 0; width: 99.7%;">
- <ul class="list_search">
- <li class="title" style="width: 90px;">配置类型:</li>
- <li class="text" style="width: 100px;">
- <select id="printConf.type" name="printConf.type" style="width:80px;">
- <option value="" selected="selected">--请选择--</option>
- <c:forEach items="${requestScope.type}" var="type">
- <option value="${type.dvalue }"
- <c:if test="${type.dvalue eq printConf.type }">selected="selected"</c:if>
- >${type.dname }</option>
- </c:forEach>
- </select>
- </li>
- </ul>
- <ul>
- <li class="search-button">
- <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询" />
- </li>
- </ul>
- </div>
- </c:if>
- <div style="clear: both;">
- <div id="maingrid4" style="margin: 0; padding: 0"></div>
- </div>
- <div style="display: none;"></div>
- </div>
- </body>
- </html>
|