first commit

This commit is contained in:
2026-01-16 14:13:44 +08:00
commit 903ff8d495
34603 changed files with 8585054 additions and 0 deletions

View File

@ -0,0 +1,103 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title></title>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
function dosave() {
if ($(".form").form('validate')) {
$.post(ext.contextPath + "/document/saveBook.do", $(".form").serialize(), function(result) {
if (result.res == 1) {
top.$.messager.alert('提示', "保存成功", 'info', function() {
//刷新树
parent.reloadTree();
parent.$("#mainFrame").attr("src",ext.contextPath+"/document/showBookEdit.do?id="+result.id);
});
}else if(result.res == 0) {
top.$.messager.alert('提示', "保存失败", 'info');
} else{
top.$.messager.alert('提示', result.res, 'info');
}
},'json');
}
}
$(function() {
var ue = UE.getEditor('details');
$('#pname').combotree({
url : ext.contextPath + '/document/getDataJson.do?random=' + Math.random(),
parentField : 'pid',
method:'get',
required:true,
onClick : function(node) {
$("#pid").val(node.id);
}
});
//附件加载
new commfile('document.DocFileMapper','${id}').loadfile();
});
</script>
</head>
<body>
<div id="tt">
<a href="javascript:void(0)" class="icon-save" title="保存" onclick="dosave()"></a>
</div>
<div class="easyui-panel" title="新增指导书" style="padding:10px;"
data-options="fit:true,tools:'#tt'">
<form method="post" class="form">
<input type="hidden" name="id" value="${id}"/>
<table class="table">
<tr>
<th>名称</th>
<td>
<input name="docname" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" />
</td>
<th>上级</th>
<td>
<input id="pname" name="pname" class="easyui-combotree" value="${pname}" />
<input id="pid" name="pid" type="hidden" value="${param.pid}"/>
</td>
</tr>
<tr>
<th>编号</th>
<td>
<input name="number" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" />
</td>
<th>类型</th>
<td>
<input id="type" name="type" class="easyui-combotree" value="作业指导书" disabled />
<input id="doctype" name="doctype" type="hidden" value="C"/>
</td>
</tr>
<tr>
<th>地址</th>
<td colspan="3">
<input name="path" class="easyui-textbox" style="width:400px" value="" />
</td>
</tr>
<tr>
<th>启用</th>
<td colspan="3">
<select name="st" class="easyui-combobox" data-options="required:true,validType:'isBlank',editable:false,panelHeight:'auto'">
<option value="1" selected>启用</option>
<option value="0">禁用</option>
</select>
</td>
</tr>
<tr>
<th>
<a class="easyui-linkbutton" href="javascript:new commfile('document.DocFileMapper','${id}').showUpload();">附件上传</a>
</th>
<td colspan="3">
<div id="fileList"></div>
</td>
</tr>
<tr>
<th>内容</th>
<td colspan="3"><script id="details" name="details" type="text/plain" style="width:100%;height:500px;"></script></td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title></title>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
function dosave() {
if ($(".form").form('validate')) {
$.post(ext.contextPath + "/document/updateBook.do", $(".form").serialize(), function(result) {
if (result == 1) {
top.$.messager.alert('提示', "保存成功", 'info', function() {
//刷新树
parent.reloadTree();
});
}else if(result == 0) {
top.$.messager.alert('提示', "保存失败", 'info');
} else{
top.$.messager.alert('提示', result.res, 'info');
}
},'json');
}
}
function dodel() {
top.$.messager.confirm('提示', '确定删除此工作指令?', function(r) {
if (r) {
$.post(ext.contextPath + "/document/deleteBook.do", $(".form").serialize(), function(result) {
if (result == 1) {
top.$.messager.alert('提示', "删除成功", 'info', function() {
//刷新树
parent.reloadTree();
parent.$("#mainFrame").attr("src",ext.contextPath+"/document/showBookAdd.do?pid="+$("#pid").val());
});
} else {
top.$.messager.alert('提示', "删除失败", 'info');
}
});
}
});
}
$(function() {
var ue = UE.getEditor('details');
$('#pname').combotree({
url : ext.contextPath + '/document/getDataJson.do?random=' + Math.random(),
parentField : 'pid',
method:'get',
required:true,
onClick : function(node) {
$("#pid").val(node.id);
}
});
//附件加载
new commfile('document.DocFileMapper','${data.id}').loadfile();
});
</script>
</head>
<body>
<div id="tt">
<a href="javascript:void(0)" class="icon-save" title="保存" onclick="dosave()"></a>
<a href="javascript:void(0)" class="icon-remove" title="删除" onclick="dodel()"></a>
</div>
<div class="easyui-panel" title="编辑指导书" style="padding:10px;"
data-options="fit:true,tools:'#tt'">
<form method="post" class="form">
<input type="hidden" name="id" value="${data.id}"/>
<table class="table">
<tr>
<th>名称</th>
<td>
<input name="docname" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${data.docname}" />
</td>
<th>上级</th>
<td>
<input id="pname" name="pname" class="easyui-combotree" value="${pname}" />
<input id="pid" name="pid" type="hidden" value="${data.pid}"/>
</td>
</tr>
<tr>
<th>编号</th>
<td>
<input name="number" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${data.number}" />
</td>
<th>类型</th>
<td>
<input id="type" name="type" class="easyui-combotree" value="作业指导书" disabled />
<input id="doctype" name="doctype" type="hidden" value="C"/>
</td>
</tr>
<tr>
<th>地址</th>
<td colspan="3">
<input name="path" class="easyui-textbox" style="width:400px" value="${data.path}" />
</td>
</tr>
<tr>
<th>
<a class="easyui-linkbutton" href="javascript:new commfile('document.DocFileMapper','${data.id}').showUpload();">附件上传</a>
</th>
<td colspan="3">
<div id="fileList"></div>
</td>
</tr>
<tr>
<th>启用</th>
<td colspan="3">
<select name="st" class="easyui-combobox" data-options="required:true,validType:'isBlank',editable:false,panelHeight:'auto',value:'${data.st}'" >
<option value="1">启用</option>
<option value="0">禁用</option>
</select>
</tr>
<tr>
<th>内容</th>
<td colspan="3"><script id="details" name="details" type="text/plain" style="width:100%;height:500px;">${data.details}</script></td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,107 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.sipai.tools.SessionManager"%>
<%
SessionManager sessionManager = new SessionManager();
%>
<!DOCTYPE html>
<html>
<head>
<title></title>
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<script type="text/javascript">
var grid;
$(function() {
grid = $('#grid').datagrid({
title : '',
url : ext.contextPath + '/document/getDatasForSelect.do?doctype=C',
striped : true,
rownumbers : true,
singleSelect: false,
//ctrlSelect: true,
selectOnCheck: true,
checkOnSelect: true,
idField : 'id',
treeField: 'docname',
pagination : true,
pageSize : 20,
pageList : [20, 50, 100],
columns : [ [
{checkbox:true , field : 'ck'},
{width : '180', title : '名称', field : 'docname', sortable : true, align:'left',halign:'center'},
{width : '120', title : '编号', field : 'number', sortable : true, align:'center',halign:'center'},
{width : '100', title : '类型', field : 'doctype', sortable : true, align:'center',halign:'center', formatter : function(value, row, index) {
switch (value) {
case 'A':
return '工作指令';
case 'B':
return '图纸';
case 'C':
return '作业指导书';
}
}},
{width : '320', title : '地址', field : 'path', sortable : true, halign:'center'}
] ],
loadFilter: function (data){
resultData = data;
$.each(data.rows, function(i) {
var parentId = data.rows[i].pid;
if(parentId!='-1'){
data.rows[i]._parentId = parentId;
}else{
data.rows[i]._parentId =undefined;
}
});
return data;
},
toolbar : '#toolbar',
onLoadSuccess : function(data) {
$('.iconImg').attr('src', ext.pixel_0);
}
});
});
function selectOK() {
//以json格式返回数据
var jsonstr = "";
var row = $('#grid').treegrid('getSelected');
if (row){
jsonstr = '{"id":"'+row.id
+'","docname":"'+row.docname
+'","number":"'+row.number
+'","path":"'+row.path
+'"}';
}
var dataset = $.parseJSON(jsonstr);
return dataset;
}
</script>
</head>
<body class="easyui-layout" data-options="fit:true,border:false">
<div id="toolbar" style="display: none;">
<table>
<tr>
<td>
<form id="searchForm">
<table class="tooltable">
<tr>
<td>名称</td>
<td><input name="search_name" class="easyui-textbox" /></td>
<td>编号</td>
<td><input name="search_code" class="easyui-textbox" /></td>
<td>
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
<div data-options="region:'center',fit:true,border:false">
<table id="grid" data-options="fit:true,border:false"></table>
</div>
</body>
</html>

View File

@ -0,0 +1,68 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title></title>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
$(function() {
var ue = UE.getEditor('details');
$('#pname').combotree({
url : ext.contextPath + '/document/getDataJson.do?random=' + Math.random(),
parentField : 'pid',
method:'get',
required:true,
onClick : function(node) {
$("#pid").val(node.id);
}
});
//附件加载
new commfile('document.DocFileMapper','${data.id}').loadfile();
});
</script>
</head>
<body>
<div >
<form method="post" class="form">
<input type="hidden" name="id" value="${data.id}"/>
<table class="table">
<tr>
<th>名称</th>
<td>${data.docname}</td>
<th>上级</th>
<td>${pname}</td>
</tr>
<tr>
<th>编号</th>
<td>${data.number}</td>
<th>类型</th>
<td>作业指导书</td>
</tr>
<tr>
<th>地址</th>
<td colspan="3">${data.path}</td>
</tr>
<tr>
<th>
附件列表
</th>
<td colspan="3">
<div id="fileList"></div>
</td>
</tr>
<tr>
<th>状态</th>
<td colspan="3">
${data.st=="1"?"启用":"禁用"}
</td>
</tr>
<tr>
<th>内容</th>
<td colspan="3"><script id="details" name="details" style="width:100%;height:260px;">${data.details}</script></td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,93 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title></title>
<script type="text/javascript" charset="utf-8" src="ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="ueditor.all.min.js"> </script>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
function dosave() {
if ($(".form").form('validate')) {
$.post(ext.contextPath + "/user/saveWorkOrder.do", $(".form").serialize(), function(result) {
if (result.res == 1) {
top.$.messager.alert('提示', "保存成功", 'info', function() {
//刷新树
parent.reloadTree();
});
}else if(result.res == 0) {
top.$.messager.alert('提示', "保存失败", 'info');
} else{
top.$.messager.alert('提示', result.res, 'info');
}
},'json');
}
}
$(function() {
var ue = UE.getEditor('details');
$('#pname').combotree({
url : ext.contextPath + '/document/getDataJson.do?random=' + Math.random(),
parentField : 'pid',
method:'get',
required:true,
onClick : function(node) {
$("#pid").val(node.id);
}
});
});
</script>
</head>
<body>
<div id="tt">
<a href="javascript:void(0)" class="icon-save" title="保存" onclick="dosave()"></a>
</div>
<div class="easyui-panel" title="新增工作指令" style="padding:10px;"
data-options="fit:true,tools:'#tt'">
<form method="post" class="form">
<table class="table">
<tr>
<th>名称</th>
<td>
<input name="docname" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" />
</td>
<th>上级</th>
<td>
<input id="pname" name="pname" class="easyui-combotree" value="${pname}" />
<input id="pid" name="pid" type="hidden" value="${param.pid}"/>
</td>
</tr>
<tr>
<th>编号</th>
<td>
<input name="number" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" />
</td>
<th>类型</th>
<td>
<input id="type" name="type" class="easyui-combotree" value="工作指令" disabled />
<input id="doctype" name="doctype" type="hidden" value="A"/>
</td>
</tr>
<tr>
<th>地址</th>
<td colspan="3">
<input name="path" class="easyui-textbox" style="width:400px" value="" />
</td>
</tr>
<tr>
<th>启用</th>
<td>
<select name="st" class="easyui-combobox" data-options="required:true,validType:'isBlank',editable:false,panelHeight:'auto'">
<option value="1" selected>启用</option>
<option value="0">禁用</option>
</select>
</td>
</tr>
<tr>
<th>内容</th>
<td colspan="3"><script id="details" type="text/plain" style="width:100%;height:500px;"></script></td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,114 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title></title>
<script type="text/javascript" charset="utf-8" src="ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="ueditor.all.js"> </script>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
function dosave() {
if ($(".form").form('validate')) {
$.post(ext.contextPath + "/document/updateWorkOrder.do", $(".form").serialize(), function(result) {
if (result == 1) {
top.$.messager.alert('提示', "保存成功", 'info', function() {
//刷新树
parent.reloadTree();
});
}else if(result == 0) {
top.$.messager.alert('提示', "保存失败", 'info');
} else{
top.$.messager.alert('提示', result.res, 'info');
}
},'json');
}
}
function dodel() {
top.$.messager.confirm('提示', '确定删除此公司?', function(r) {
if (r) {
$.post(ext.contextPath + "/user/deleteCompany.do", $(".form").serialize(), function(result) {
if (result == 1) {
top.$.messager.alert('提示', "删除成功", 'info', function() {
//刷新树
parent.reloadTree();
parent.$("#mainFrame").attr("src",ext.contextPath+"/user/showCompanyAdd.do?pid="+$("#pid").val());
});
} else {
top.$.messager.alert('提示', "删除失败", 'info');
}
});
}
});
}
$(function() {
var ue = UE.getEditor('details');
$('#pname').combotree({
url : ext.contextPath + '/document/getDataJson.do?random=' + Math.random(),
parentField : 'pid',
method:'get',
required:true,
onClick : function(node) {
$("#pid").val(node.id);
}
});
});
</script>
</head>
<body>
<div id="tt">
<a href="javascript:void(0)" class="icon-save" title="保存" onclick="dosave()"></a>
<a href="javascript:void(0)" class="icon-remove" title="删除" onclick="dodel()"></a>
</div>
<div class="easyui-panel" title="编辑工作指令" style="padding:10px;"
data-options="fit:true,tools:'#tt'">
<form method="post" class="form">
<input type="hidden" name="id" value="${data.id}"/>
<table class="table">
<tr>
<th>名称</th>
<td>
<input name="docname" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${data.docname}" />
</td>
<th>上级</th>
<td>
<input id="pname" name="pname" class="easyui-combotree" value="${pname}" />
<input id="pid" name="pid" type="hidden" value="${data.pid}"/>
</td>
</tr>
<tr>
<th>编号</th>
<td>
<input name="number" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${data.number}" />
</td>
<th>类型</th>
<td>
<input id="type" name="type" class="easyui-combotree" value="工作指令" disabled />
<input id="doctype" name="doctype" type="hidden" value="A"/>
</td>
</tr>
<tr>
<th>地址</th>
<td colspan="3">
<input name="path" class="easyui-textbox" style="width:400px" value="${data.path}" />
</td>
</tr>
<tr>
<th>启用</th>
<td>
<select name="st" class="easyui-combobox" data-options="required:true,validType:'isBlank',editable:false,panelHeight:'auto',value:'${data.st}'" >
<option value="1">启用</option>
<option value="0">禁用</option>
</select>
</td>
</tr>
<tr>
<th>内容</th>
<td colspan="3"><script id="details" type="text/plain" style="width:918px;height:500px;">${data.details}</script></td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,70 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title></title>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
$(function() {
$('#dataTree').tree({
url : ext.contextPath + '/document/getDataJson.do?random=' + Math.random(),
parentField : 'pid',
onClick : function(node) {
if(node.pid != ''){
if(node.attributes.type=='A'){
$("#mainFrame").attr("src",ext.contextPath+"/document/showWorkOrderEdit.do?id="+node.id);
}else if(node.attributes.type=='B'){
$("#mainFrame").attr("src",ext.contextPath+"/document/showDrawingEdit.do?id="+node.id);
}else if(node.attributes.type=='C'){
$("#mainFrame").attr("src",ext.contextPath+"/document/showBookEdit.do?id="+node.id);
}
}
}
});
});
function reloadTree(){
$('#dataTree').tree('options').url = ext.contextPath+ '/document/getDataJson.do?random=' + Math.random();
$('#dataTree').tree('reload');
//$("#mainFrame").attr("src",ext.contextPath+"/document/showDataTree.do");
}
function getSelectedPid(){
var t = $('#dataTree').tree('getSelected');
var pid="";
if(t!=null){
pid=t.id;
}
return pid;
}
function addWorkOrder(){
$("#mainFrame").attr("src",ext.contextPath+"/document/showWorkOrderAdd.do?pid="+getSelectedPid());
}
function addDrawing(){
$("#mainFrame").attr("src",ext.contextPath+"/document/showDrawingAdd.do?pid="+getSelectedPid());
}
function addBook(){
$("#mainFrame").attr("src",ext.contextPath+"/document/showBookAdd.do?pid="+getSelectedPid());
}
</script>
</head>
<body>
<div class="easyui-layout" data-options="fit:true">
<div id="leftdiv" data-options="region:'west',split:true" style="width:250px;position:relative">
<div style="padding:2px;background-color:#eeeeee">
<a class="easyui-linkbutton" href="#" data-options="iconCls:'icon-add',plain:true" onclick="addWorkOrder()">工作指令</a>
<a class="easyui-linkbutton" href="#" data-options="iconCls:'icon-add',plain:true" onclick="addDrawing()">图纸</a>
<a class="easyui-linkbutton" href="#" data-options="iconCls:'icon-add',plain:true" onclick="addBook()">作业指导书</a>
</div>
<ul id="dataTree" class="easyui-tree" data-options="method:'get',animate:true"></ul>
</div>
<div id="rightdiv" data-options="region:'center'" style="overflow: hidden;">
<iframe id="mainFrame" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;" frameBorder="0" scrolling="auto"></iframe>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,103 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title></title>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
function dosave() {
if ($(".form").form('validate')) {
$.post(ext.contextPath + "/document/saveDrawing.do", $(".form").serialize(), function(result) {
if (result.res == 1) {
top.$.messager.alert('提示', "保存成功", 'info', function() {
//刷新树
parent.reloadTree();
parent.$("#mainFrame").attr("src",ext.contextPath+"/document/showDrawingEdit.do?id="+result.id);
});
}else if(result.res == 0) {
top.$.messager.alert('提示', "保存失败", 'info');
} else{
top.$.messager.alert('提示', result.res, 'info');
}
},'json');
}
}
$(function() {
var ue = UE.getEditor('details');
$('#pname').combotree({
url : ext.contextPath + '/document/getDataJson.do?random=' + Math.random(),
parentField : 'pid',
method:'get',
required:true,
onClick : function(node) {
$("#pid").val(node.id);
}
});
//附件加载
new commfile('document.DocFileMapper','${id}').loadfile();
});
</script>
</head>
<body>
<div id="tt">
<a href="javascript:void(0)" class="icon-save" title="保存" onclick="dosave()"></a>
</div>
<div class="easyui-panel" title="新增图纸" style="padding:10px;"
data-options="fit:true,tools:'#tt'">
<form method="post" class="form">
<input type="hidden" name="id" value="${id}"/>
<table class="table">
<tr>
<th>名称</th>
<td>
<input name="docname" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" />
</td>
<th>上级</th>
<td>
<input id="pname" name="pname" class="easyui-combotree" value="${pname}" />
<input id="pid" name="pid" type="hidden" value="${param.pid}"/>
</td>
</tr>
<tr>
<th>编号</th>
<td>
<input name="number" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" />
</td>
<th>类型</th>
<td>
<input id="type" name="type" class="easyui-combotree" value="图纸" disabled />
<input id="doctype" name="doctype" type="hidden" value="B"/>
</td>
</tr>
<tr>
<th>地址</th>
<td colspan="3">
<input name="path" class="easyui-textbox" style="width:400px" value="" />
</td>
</tr>
<tr>
<th>启用</th>
<td colspan="3">
<select name="st" class="easyui-combobox" data-options="required:true,validType:'isBlank',editable:false,panelHeight:'auto'">
<option value="1" selected>启用</option>
<option value="0">禁用</option>
</select>
</td>
</tr>
<tr>
<th>
<a class="easyui-linkbutton" href="javascript:new commfile('document.DocFileMapper','${id}').showUpload();">附件上传</a>
</th>
<td colspan="3">
<div id="fileList"></div>
</td>
</tr>
<tr>
<th>内容</th>
<td colspan="3"><script id="details" name="details" type="text/plain" style="width:100%;height:500px;"></script></td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title></title>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
function dosave() {
if ($(".form").form('validate')) {
$.post(ext.contextPath + "/document/updateDrawing.do", $(".form").serialize(), function(result) {
if (result == 1) {
top.$.messager.alert('提示', "保存成功", 'info', function() {
//刷新树
parent.reloadTree();
});
}else if(result == 0) {
top.$.messager.alert('提示', "保存失败", 'info');
} else{
top.$.messager.alert('提示', result.res, 'info');
}
},'json');
}
}
function dodel() {
top.$.messager.confirm('提示', '确定删除此工作指令?', function(r) {
if (r) {
$.post(ext.contextPath + "/document/deleteDrawing.do", $(".form").serialize(), function(result) {
if (result == 1) {
top.$.messager.alert('提示', "删除成功", 'info', function() {
//刷新树
parent.reloadTree();
parent.$("#mainFrame").attr("src",ext.contextPath+"/document/showDrawingAdd.do?pid="+$("#pid").val());
});
} else {
top.$.messager.alert('提示', "删除失败", 'info');
}
});
}
});
}
$(function() {
var ue = UE.getEditor('details');
$('#pname').combotree({
url : ext.contextPath + '/document/getDataJson.do?random=' + Math.random(),
parentField : 'pid',
method:'get',
required:true,
onClick : function(node) {
$("#pid").val(node.id);
}
});
//附件加载
new commfile('document.DocFileMapper','${data.id}').loadfile();
});
</script>
</head>
<body>
<div id="tt">
<a href="javascript:void(0)" class="icon-save" title="保存" onclick="dosave()"></a>
<a href="javascript:void(0)" class="icon-remove" title="删除" onclick="dodel()"></a>
</div>
<div class="easyui-panel" title="编辑图纸" style="padding:10px;"
data-options="fit:true,tools:'#tt'">
<form method="post" class="form">
<input type="hidden" name="id" value="${data.id}"/>
<table class="table">
<tr>
<th>名称</th>
<td>
<input name="docname" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${data.docname}" />
</td>
<th>上级</th>
<td>
<input id="pname" name="pname" class="easyui-combotree" value="${pname}" />
<input id="pid" name="pid" type="hidden" value="${data.pid}"/>
</td>
</tr>
<tr>
<th>编号</th>
<td>
<input name="number" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${data.number}" />
</td>
<th>类型</th>
<td>
<input id="type" name="type" class="easyui-combotree" value="图纸" disabled />
<input id="doctype" name="doctype" type="hidden" value="B"/>
</td>
</tr>
<tr>
<th>地址</th>
<td colspan="3">
<input name="path" class="easyui-textbox" style="width:400px" value="${data.path}" />
</td>
</tr>
<tr>
<th>
<a class="easyui-linkbutton" href="javascript:new commfile('document.DocFileMapper','${data.id}').showUpload();">附件上传</a>
</th>
<td colspan="3">
<div id="fileList"></div>
</td>
</tr>
<tr>
<th>启用</th>
<td colspan="3">
<select name="st" class="easyui-combobox" data-options="required:true,validType:'isBlank',editable:false,panelHeight:'auto',value:'${data.st}'" >
<option value="1">启用</option>
<option value="0">禁用</option>
</select>
</tr>
<tr>
<th>内容</th>
<td colspan="3"><script id="details" name="details" type="text/plain" style="width:100%;height:500px;">${data.details}</script></td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,107 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.sipai.tools.SessionManager"%>
<%
SessionManager sessionManager = new SessionManager();
%>
<!DOCTYPE html>
<html>
<head>
<title></title>
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<script type="text/javascript">
var grid;
$(function() {
grid = $('#grid').datagrid({
title : '',
url : ext.contextPath + '/document/getDatasForSelect.do?doctype=B',
striped : true,
rownumbers : true,
singleSelect: false,
//ctrlSelect: true,
selectOnCheck: true,
checkOnSelect: true,
idField : 'id',
treeField: 'docname',
pagination : true,
pageSize : 20,
pageList : [20, 50, 100],
columns : [ [
{checkbox:true , field : 'ck'},
{width : '180', title : '名称', field : 'docname', sortable : true, align:'left',halign:'center'},
{width : '120', title : '编号', field : 'number', sortable : true, align:'center',halign:'center'},
{width : '100', title : '类型', field : 'doctype', sortable : true, align:'center',halign:'center', formatter : function(value, row, index) {
switch (value) {
case 'A':
return '工作指令';
case 'B':
return '图纸';
case 'C':
return '作业指导书';
}
}},
{width : '320', title : '地址', field : 'path', sortable : true, halign:'center'}
] ],
loadFilter: function (data){
resultData = data;
$.each(data.rows, function(i) {
var parentId = data.rows[i].pid;
if(parentId!='-1'){
data.rows[i]._parentId = parentId;
}else{
data.rows[i]._parentId =undefined;
}
});
return data;
},
toolbar : '#toolbar',
onLoadSuccess : function(data) {
$('.iconImg').attr('src', ext.pixel_0);
}
});
});
function selectOK() {
//以json格式返回数据
var jsonstr = "";
var row = $('#grid').treegrid('getSelected');
if (row){
jsonstr = '{"id":"'+row.id
+'","docname":"'+row.docname
+'","number":"'+row.number
+'","path":"'+row.path
+'"}';
}
var dataset = $.parseJSON(jsonstr);
return dataset;
}
</script>
</head>
<body class="easyui-layout" data-options="fit:true,border:false">
<div id="toolbar" style="display: none;">
<table>
<tr>
<td>
<form id="searchForm">
<table class="tooltable">
<tr>
<td>名称</td>
<td><input name="search_name" class="easyui-textbox" /></td>
<td>编号</td>
<td><input name="search_code" class="easyui-textbox" /></td>
<td>
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
<div data-options="region:'center',fit:true,border:false">
<table id="grid" data-options="fit:true,border:false"></table>
</div>
</body>
</html>

View File

@ -0,0 +1,103 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<html>
<head>
<title></title>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
function dosave() {
if ($(".form").form('validate')) {
$.post(ext.contextPath + "/document/saveWorkOrder.do", $(".form").serialize(), function(result) {
if (result.res == 1) {
top.$.messager.alert('提示', "保存成功", 'info', function() {
//刷新树
parent.reloadTree();
parent.$("#mainFrame").attr("src",ext.contextPath+"/document/showWorkOrderEdit.do?id="+result.id);
});
}else if(result.res == 0) {
top.$.messager.alert('提示', "保存失败", 'info');
} else{
top.$.messager.alert('提示', result.res, 'info');
}
},'json');
}
}
$(function() {
var ue = UE.getEditor('details');
$('#pname').combotree({
url : ext.contextPath + '/document/getDataJson.do?random=' + Math.random(),
parentField : 'pid',
method:'get',
required:true,
onClick : function(node) {
$("#pid").val(node.id);
}
});
//附件加载
new commfile('document.DocFileMapper','${id}').loadfile();
});
</script>
</head>
<body>
<div id="tt">
<a href="javascript:void(0)" class="icon-save" title="保存" onclick="dosave()"></a>
</div>
<div class="easyui-panel" title="新增工作指令" style="padding:10px;"
data-options="fit:true,tools:'#tt'">
<form method="post" class="form">
<input type="hidden" name="id" value="${id}"/>
<table class="table">
<tr>
<th>名称</th>
<td>
<input name="docname" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" />
</td>
<th>上级</th>
<td>
<input id="pname" name="pname" class="easyui-combotree" value="${pname}" />
<input id="pid" name="pid" type="hidden" value="${param.pid}"/>
</td>
</tr>
<tr>
<th>编号</th>
<td>
<input name="number" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" />
</td>
<th>类型</th>
<td>
<input id="type" name="type" class="easyui-combotree" value="工作指令" disabled />
<input id="doctype" name="doctype" type="hidden" value="A"/>
</td>
</tr>
<tr>
<th>地址</th>
<td colspan="3">
<input name="path" class="easyui-textbox" style="width:400px" value="" />
</td>
</tr>
<tr>
<th>状态</th>
<td colspan="3">
<select name="st" class="easyui-combobox" data-options="required:true,validType:'isBlank',editable:false,panelHeight:'auto'"">
<option value="1" selected>启用</option>
<option value="0">禁用</option>
</select>
</td>
</tr>
<tr>
<th>
<a class="easyui-linkbutton" href="javascript:new commfile('document.DocFileMapper','${id}').showUpload();">附件上传</a>
</th>
<td colspan="3">
<div id="fileList"></div>
</td>
</tr>
<tr>
<th>内容</th>
<td colspan="3"><script id="details" name="details" type="text/plain" style="width:100%;height:500px;"></script></td>
</tr>
</table>
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title></title>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
function dosave() {
if ($(".form").form('validate')) {
$.post(ext.contextPath + "/document/updateWorkOrder.do", $(".form").serialize(), function(result) {
if (result == 1) {
top.$.messager.alert('提示', "保存成功", 'info', function() {
//刷新树
parent.reloadTree();
});
}else if(result == 0) {
top.$.messager.alert('提示', "保存失败", 'info');
} else{
top.$.messager.alert('提示', result.res, 'info');
}
},'json');
}
}
function dodel() {
top.$.messager.confirm('提示', '确定删除此工作指令?', function(r) {
if (r) {
$.post(ext.contextPath + "/document/deleteWorkOrder.do", $(".form").serialize(), function(result) {
if (result == 1) {
top.$.messager.alert('提示', "删除成功", 'info', function() {
//刷新树
parent.reloadTree();
parent.$("#mainFrame").attr("src",ext.contextPath+"/document/showWorkOrderAdd.do?pid="+$("#pid").val());
});
} else {
top.$.messager.alert('提示', "删除失败", 'info');
}
});
}
});
}
$(function() {
var ue = UE.getEditor('details');
$('#pname').combotree({
url : ext.contextPath + '/document/getDataJson.do?random=' + Math.random(),
parentField : 'pid',
method:'get',
required:true,
onClick : function(node) {
$("#pid").val(node.id);
}
});
//附件加载
new commfile('document.DocFileMapper','${data.id}').loadfile();
});
</script>
</head>
<body>
<div id="tt">
<a href="javascript:void(0)" class="icon-save" title="保存" onclick="dosave()"></a>
<a href="javascript:void(0)" class="icon-remove" title="删除" onclick="dodel()"></a>
</div>
<div class="easyui-panel" title="编辑工作指令" style="padding:10px;"
data-options="fit:true,tools:'#tt'">
<form method="post" class="form">
<input type="hidden" name="id" value="${data.id}"/>
<table class="table">
<tr>
<th>名称</th>
<td>
<input name="docname" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${data.docname}" />
</td>
<th>上级</th>
<td>
<input id="pname" name="pname" class="easyui-combotree" value="${pname}" />
<input id="pid" name="pid" type="hidden" value="${data.pid}"/>
</td>
</tr>
<tr>
<th>编号</th>
<td>
<input name="number" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${data.number}" />
</td>
<th>类型</th>
<td>
<input id="type" name="type" class="easyui-combotree" value="工作指令" disabled />
<input id="doctype" name="doctype" type="hidden" value="A"/>
</td>
</tr>
<tr>
<th>地址</th>
<td colspan="3">
<input name="path" class="easyui-textbox" style="width:400px" value="${data.path}" />
</td>
</tr>
<tr>
<th>
<a class="easyui-linkbutton" href="javascript:new commfile('document.DocFileMapper','${data.id}').showUpload();">附件上传</a>
</th>
<td colspan="3">
<div id="fileList"></div>
</td>
</tr>
<tr>
<th>启用</th>
<td colspan="3">
<select name="st" class="easyui-combobox" data-options="required:true,validType:'isBlank',editable:false,panelHeight:'auto',value:'${data.st}'" >
<option value="1">启用</option>
<option value="0">禁用</option>
</select>
</tr>
<tr>
<th>内容</th>
<td colspan="3"><script id="details" name="details" type="text/plain" style="width:100%;height:500px;">${data.details}</script></td>
</tr>
</table>
</form>
</div>
</body>
</html>