| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <!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}/main.css" rel="stylesheet" type="text/css" />
- <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>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript">
- $(function (){
- $("#printConf\\.topmargin").focus();
- });
- function subPrintForm(){
- if(checkForm()){
- $("#printBtn").attr({"disabled":"disabled"});
- $("#printForm").submit();
- }
- }
-
- function getMac(){
- try{
- var locator =new ActiveXObject ("WbemScripting.SWbemLocator");
- var service = locator.ConnectServer(".");
- var properties = service.ExecQuery("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled =True");
- var e = new Enumerator (properties);
- var p = e.item();
- //获取mac地址
- var myMac = p.MACAddress;
- $("#printConf\\.mac_address").val(myMac);
- }catch(e){
-
- }
-
- }
-
- //验证
- function checkForm() {
- var rs = $.validate({
- name : "printConf\\.type",
- model : [ {
- type : "require",
- msg : "打印类型不能为空!"
- }]
- });
- rs = $.validate({
- name : "printConf\\.portrait",
- model : [ {
- type : "require",
- msg : "打印指向不能为空!"
- }]
- }) && rs;
- rs = $.validate({
- name : "printConf.topmargin",
- model : [ {
- type : "require",
- msg : "打印上边距不能为空!"
- },{
- type : "isNumber",
- msg : "打印上边距必须为数字!"
- },{
- type : "size",
- min : 1,
- msg : "打印上边距必须大于0元!"
- }]
- }) && rs;
- rs = $.validate({
- name : "printConf.bottommargin",
- model : [ {
- type : "require",
- msg : "打印下边距不能为空!"
- },{
- type : "isNumber",
- msg : "打印下边距必须为数字!"
- },{
- type : "size",
- min : 1,
- msg : "打印下边距必须大于0元!"
- }]
- }) && rs;
- rs = $.validate({
- name : "printConf.leftmargin",
- model : [ {
- type : "require",
- msg : "打印左边距不能为空!"
- },{
- type : "isNumber",
- msg : "打印左边距必须为数字!"
- },{
- type : "size",
- min : 1,
- msg : "打印左边距必须大于0元!"
- }]
- }) && rs;
- rs = $.validate({
- name : "printConf.rightmargin",
- model : [ {
- type : "require",
- msg : "打印右边距不能为空!"
- },{
- type : "isNumber",
- msg : "打印右边距必须为数字!"
- },{
- type : "size",
- min : 1,
- msg : "打印右边距必须大于0元!"
- }]
- }) && rs;
- if (rs) {
- return true;
- }
- return false;
- }
- </script>
- </head>
- <body>
- <form id="printForm" action="erpPrintConfAction.do" method="post">
- <div id="title" class="form-button">
- <input id="printBtn" type="button" class="l-button" value="保存" onclick="subPrintForm()"/>
- <input onclick="closeWindow();" type="button" value="关闭" class="l-button">
- </div>
- <div class="container-layout">
- <div class="forum-container">
- <center>
- <table class="l-table-edit line">
- <tr>
- <th colspan="2">新增打印配置</th>
- </tr>
- <tr>
- <td class="l-table-edit-text">打印配置类型:</td>
- <td class="l-table-edit-td">
- <select id="printConf.type" name="printConf.type" style="width:150px;">
- <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>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">打印配置指向:</td>
- <td class="l-table-edit-td">
- <select id="printConf.portrait" name="printConf.portrait" style="width:150px;">
- <option value="0" <c:if test="${0 eq printConf.portrait }">selected="selected"</c:if>>横向</option>
- <option value="1" <c:if test="${1 eq printConf.portrait }">selected="selected"</c:if>>纵向</option>
- </select>
-
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">上边距<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <input id="printConf.topmargin" name="printConf.topmargin" type='text' value="${printConf.topmargin }" />
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">下边距<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <input id="printConf.bottommargin" name="printConf.bottommargin" type='text' value="${printConf.bottommargin }" />
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">左边距<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <input id="printConf.leftmargin" name="printConf.leftmargin" type='text' value="${printConf.leftmargin }" />
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">右边距<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <input id="printConf.rightmargin" name="printConf.rightmargin" type='text' value="${printConf.rightmargin }" />
- </td>
- </tr>
- </table>
- <input type="hidden" id="task" name="task" value="edit">
- <input type="hidden" id="printConf.universalid" name="printConf.universalid" value="${printConf.universalid}">
- <input type="hidden" id="printConf.mac_address" name="printConf.mac_address" value="${printConf.mac_address}">
- <input type="hidden" id="tabid" name="tabid" value="${param.tabid }">
- </center>
- </div>
- </div>
- </form>
- <%@ include file="/include/message.jsp"%>
- </body>
- </html>
|