| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- <%@ page language="java" contentType="text/html;charset=GBK"
- pageEncoding="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">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <Title>ERP添加数据字典</Title>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <link href="/shares/xheditor/xheditor-1.1.14/demos/common.css" rel="stylesheet" type="text/css" media="screen" />
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/Gray/css/form.css" rel="stylesheet" type="text/css" />
- <link href="/shares/css/yw/erp2/erpCommon.css" rel="stylesheet" type="text/css" />
- <link href="${pageContext.request.contextPath }/main.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>
-
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
- <script src="/shares/js/common.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/xheditor/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js"></script>
- <script type="text/javascript" src="/shares/js/yw/erp2/system/erpDataDictionary.js"></script>
- <style type="text/css">
- .l-table-edit-text {
- width: 100px;
- font-weight: bold;
- color: #cc000
- }
- .default-select {
- width: 250px;
- height: 22px;
- line-height: 22px;
- }
- .short-select {
- width: 250px;
- height: 22px;
- line-height: 22px;
- }
- .default-text {
- width: 250px;
- height: 22px;
- line-height: 22px
- }
- .short-text {
- width: 150px;
- line-height: 22px;
- height: 22px;
- }
- .l-text{
- width: 150px;
- line-height: 22px;
- height: 22px;
- }
- .text {
- height: 22px;
- line-height: 22px;
- margin-right: 10px;
- display: inline-block;
- margin-left: 1px
- }
- .title {
- font-size: 20px;
- font-weight: bold;
- padding-bottom: 20px;
- padding-left: 5px;
- border-bottom: 1px solid #ededed;
- vertical-align: middle;
- }
- </style>
- <script type="text/javascript">
-
- $(function() {
- searchList();
- // showSuccessMsg('${i }');
- });
-
- </script>
- </head>
- <body>
- <form method='post' name="theForm" id="theForm"
- action="TmsDataDictionaryAction.do?task=doAddTmsDataDictionary" onsubmit="return checkForm();">
- <div id="title" class="form-button">
- <input type="submit" class="l-button" value="保存" />
- <input type="button" value="关闭" class="l-button" onclick="closeWindow();"/>
- </div>
- <div style="height: 400px; margin-top: 23px" >
- <div class="forum-container-2" >
- <table border="0" cellspacing="1" cellpadding="0"
- style="border: 1px solid #ededed; width:100%; margin-top: 0px";margin-right: 0px; margin-left: 0px;">
- <thead>
- <tr>
- <th colspan="5">
- <div class="l-table-edit line">请填写以下标准基本信息</div>
- </th>
- </tr>
- </thead>
- <tr>
- <td class="l-table-edit-text" style="width:89px;">标准名称<FONT COLOR="red">*</FONT>:
- </td>
- <td class="l-table-edit-td">
- <input type="hidden" name="universalid" id="universalid" value="${map.universalid }">
- <input type="text" class="default-text" name="dname" id="dname" value="${map.dname }">
- <label id="dnameMsg"></label>
- </td>
- <td></td>
- <td class="l-table-edit-text" style="width:89px;">摘要:
- </td>
- <td class="l-table-edit-td">
- <input type="text" class="default-text" name="remark" id="remark" value="${map.remark }" />
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" style="width:89px;">编码<FONT COLOR="red">*</FONT>:
- </td>
- <td class="l-table-edit-td">
- <input type="text" class="default-text" name="dvalue" id="dvalue" value="${map.dvalue }" />
- <label id="dvalueMsg"></label>
- </td>
- <td></td>
- <td class="l-table-edit-text" style="width:89px;">排序号:
- </td>
- <td class="l-table-edit-td">
- <input type="text" class="default-text" name="dorder" id="dorder" value="${map.dorder }" />
- <label id="dorderMsg"></label>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" style="width:89px;">是否有效:
- </td>
- <td class="l-table-edit-td" colspan="4">
- <select name="isValid" id="isValid" class="default-select">
- <c:if test="${map.isValid eq '1' }">
- <option value="0" selected="selected">是</option>
- <option value="1">否</option>
- </c:if>
- <c:if test="${map.isValid eq '0' }">
- <option value="0" >是</option>
- <option value="1" selected="selected">否</option>
- </c:if>
- </select>
- </td>
- </tr>
- </table>
- </div>
- <div>
- <div id="title" style="background-color: #E5ECF9;padding-top: 3px;padding-bottom: 3px;">
- 标准项配置 <input type="button" class="l-button" disabled="disabled" value="新增标准项" />
- </div>
- <div id="maingrid1" style=" margin:0;padding: 0"></div>
- </div>
- </div>
- <%@ include file="/include/message.jsp"%>
- </form>
-
- </body>
- <script type="text/javascript">
- function showSuccessMsg(i){
- if(i > 0){
- var succMsg = '<a href="#">${map.dname }</a> 新建成功!'
- +' <br/><br/>是否继续编辑标准?<br/><br/>是否继续?';
- $.ligerDialog({content:succMsg, title:"操作成功",type:"success",width:350,height:150,allowClose : false,
- buttons:[ { text:"是",onclick:function(){window.location.href="TmsDataDictionaryAction.do?task=toEditTmsDataDictionary&universalid="+i;} } ,
- {text:"否",onclick:function(){closeWindow();}}
- ]
- });
- }else{
- if( i == -98){
- $.ligerDialog.warn("操作失败,当前的标准名称或编码已存在!");
- }else if( i == -2){
- $.ligerDialog.warn("标准名不能为空!");
- }else if(i == -1){
- $.ligerDialog.warn("编码不能为空!");
- }else if(i == -99){
- $.ligerDialog.warn("数据异常,请刷新后重试!");
- }
- }
- }
- var manager;
- function searchList() {
- var parentId = document.getElementById("universalid");//父节点名称
- var jsonObject = {"parentId":""};
- if (parentId.value != "" && typeof (parentId.value) != "undefined") {
- jsonObject.parentId=parentId.value;
- }else{
- jsonObject.parentId=-1;
- }
- if(manager == undefined){
- $(function() {
- manager = $("#maingrid1").ligerGrid({
- columns : [
- {
- display : '字典项',
- name : 'dname',
- align : 'center',
- width : 220,
- render : function(rowdata, rowindex, value) {
- var h = "";
- h += "<a href='javascript:toDetails(\""
- + rowdata.universalid + "\")'>"
- + value + "</a> ";
- return h;
- }
- },
- {
- display : '编码',
- name : 'dvalue',
- width : 180,
- align : 'center'
- },
- {
- display : '排序号',
- name : 'dorder',
- width : 100,
- align : 'center'
- },{
- display : '是否默认',
- name : 'lose_false',
- width : 80,
- align : 'center',
- render : function(rowdata, rowindex, value) {
- var h = "";
- if(value == 1){
- h += "是 ";
- }else{
- h += "否";
- }
- return h;
- }
- },
- {
- display : '是否有效',
- name : 'lose_false',
- width : 80,
- align : 'center',
- render : function(rowdata, rowindex, value) {
- var h = "";
- if(value == 1){
- h += "<font style='color:#ff0000'>否</font> ";
- }else{
- h += "是";
- }
- return h;
- }
- }, {
- display : '操作',
- name : 'projtypename',
- width : 120,
- align : 'center',
- isSort: false,
- render : function(rowdata, rowindex, value) {
- var h = "";
- h += "<a href='javascript:seeUser("+ rowdata.pm + ")'>查看</a> ";
- h += "<a href='javascript:seeUser("+ rowdata.pm + ")'>修改</a> ";
- h += "<a href='javascript:seeUser("+ rowdata.pm + ")'>删除</a> ";
- return h;
- }
- }],
- pageSize : 20,
-
- width : "99.9%",
- height : "99%",
- parms :jsonObject,
- //where : f_getWhere(),
- //data: $.extend(true,{},CustomersData),
- //onSuccess: ,
- pageParmName : 'curPage', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pageSize' //页记录数参数名,(提交给服务器)
- });
- });
- }else{
- manager._setParms(jsonObject);
- manager.loadData();
- }
- }
- </script>
- </html>
|