first commit
This commit is contained in:
86
bin/WebRoot/jsp/process/Copy of realDetailsBookAdd.jsp
Normal file
86
bin/WebRoot/jsp/process/Copy of realDetailsBookAdd.jsp
Normal file
@ -0,0 +1,86 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsBook/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectBook(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择作业指导书',
|
||||
width : 800,
|
||||
height : 480,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/document/selectBook.do?productcode=${productcode}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#bookid").val((res.id== 'undefined')?'':res.id);
|
||||
$("#bookname").textbox('setValue',(res.docname == 'undefined')?'':res.docname);
|
||||
$("#booknum").text((res.number == 'undefined')?'':res.number);
|
||||
$("#bookpath").text((res.path == 'undefined')?'':res.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#bookname").textbox("textbox").bind("click",function(){
|
||||
selectBook();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="pid" value="${param.pid}"/>
|
||||
<input type="hidden" name="productcode" value="${productcode}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>作业指导书</th>
|
||||
<td>
|
||||
<input id="bookid" name="bookid" type="hidden" />
|
||||
<input id="bookname" class="easyui-textbox" data-options="required:true,validType:'isBlank',editable:false" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>编号</th>
|
||||
<td>
|
||||
<label id="booknum"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>地址</th>
|
||||
<td>
|
||||
<label id="bookpath"></label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
93
bin/WebRoot/jsp/process/Copy of realDetailsEquipmentAdd.jsp
Normal file
93
bin/WebRoot/jsp/process/Copy of realDetailsEquipmentAdd.jsp
Normal 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 language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsEquipment/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectEquipment(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择设备',
|
||||
width : 800,
|
||||
height : 480,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/equipment/showEquipmentCardForSelect.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#equipmentid").val((res.id== 'undefined')?'':res.id);
|
||||
$("#equipmentcardid").textbox('setValue',(res.equipmentcardid == 'undefined')?'':res.equipmentcardid);
|
||||
|
||||
$("#equipmentname").text((res.equipmentname == 'undefined')?'':res.equipmentname);
|
||||
$("#equipmentmodel").text((res.equipmentmodel == 'undefined')?'':res.equipmentmodel);
|
||||
$("#equipmentclass").text((res.equipmentclass == 'undefined')?'':res.equipmentclass);
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#equipmentcardid").textbox("textbox").bind("click",function(){
|
||||
selectEquipment();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="pid" value="${param.pid}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>设备编号</th>
|
||||
<td>
|
||||
<input id="equipmentid" name="equipmentid" type="hidden" />
|
||||
<input id="equipmentcardid" class="easyui-textbox" data-options="required:true,validType:'isBlank',editable:false" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<td>
|
||||
<label id="equipmentname"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备型号</th>
|
||||
<td>
|
||||
<label id="equipmentmodel"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备类型</th>
|
||||
<td>
|
||||
<label id="equipmentclass"></label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
97
bin/WebRoot/jsp/process/Copy of realDetailsMaterialAdd.jsp
Normal file
97
bin/WebRoot/jsp/process/Copy of realDetailsMaterialAdd.jsp
Normal file
@ -0,0 +1,97 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsMaterial/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectMaterial(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择材料',
|
||||
width : 800,
|
||||
height : 480,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/selectBomMaterial.do?productcode=${productcode}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#materialid").val((res.materialid== 'undefined')?'':res.materialid);
|
||||
$("#materialcode").textbox('setValue',(res.materialcode == 'undefined')?'':res.materialcode);
|
||||
|
||||
$("#materialname").text((res.materialname == 'undefined')?'':res.materialname);
|
||||
$("#materialspec").text((res.spec == 'undefined')?'':res.spec);
|
||||
$("#unit").text((res.unit == 'undefined')?'':res.unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#materialcode").textbox("textbox").bind("click",function(){
|
||||
selectMaterial();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="pid" value="${param.pid}"/>
|
||||
<input type="hidden" name="productcode" value="${productcode}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
<td>
|
||||
<input id="materialid" name="materialid" type="hidden" />
|
||||
<input id="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank',editable:false" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td>
|
||||
<label id="materialname"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料规格</th>
|
||||
<td>
|
||||
<label id="materialspec"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料数量</th>
|
||||
<td>
|
||||
<input id="amount" name="amount" class="easyui-textbox"
|
||||
min="1" max="10000" precision="0" required="true" missingMessage="请填写数字"
|
||||
data-options="required:true,validType:'isBlank'" value="" autofocus/>
|
||||
<label id="unit"></label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
93
bin/WebRoot/jsp/process/chiefForSelect.jsp
Normal file
93
bin/WebRoot/jsp/process/chiefForSelect.jsp
Normal file
@ -0,0 +1,93 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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 + '/process/taskprocedure/getChiefJson.do?flag=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
nowrap:false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '用户名称', field : 'username', sortable : true, halign:'center'},
|
||||
{width : '250', title : '班组名称', field : 'groupname', sortable : true, halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
//以json格式返回数据
|
||||
jsonstr = '{"userid":"'+row.userid
|
||||
+'","username":"'+row.username
|
||||
+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
</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>
|
||||
<tr >
|
||||
|
||||
<td>人员名称</td>
|
||||
<td><input name="search_user" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td>
|
||||
<td>班组名称</td>
|
||||
<td><input name="search_group" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></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>
|
||||
<td><div class="datagrid-btn-separator"></div></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>
|
||||
|
||||
37
bin/WebRoot/jsp/process/configSnakerTask.jsp
Normal file
37
bin/WebRoot/jsp/process/configSnakerTask.jsp
Normal file
@ -0,0 +1,37 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var showdetailsFun = function() {
|
||||
$("#rightFrameWorkstation").attr("src",ext.contextPath+"/process/taskworkstation/showList.do?pid=${pid}&taskname=${taskname}");
|
||||
$("#rightFrameMaterial").attr("src",ext.contextPath+"/process/taskmaterial/showList.do?pid=${pid}&taskname=${taskname}");
|
||||
$("#rightFrameEquipment").attr("src",ext.contextPath+"/process/taskequipment/showList.do?pid=${pid}&taskname=${taskname}");
|
||||
};
|
||||
|
||||
$(function(){
|
||||
showdetailsFun();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="tt" class="easyui-tabs" style="height:540px;">
|
||||
<div title="相关工位">
|
||||
<iframe id="rightFrameWorkstation" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="相关物料">
|
||||
<iframe id="rightFrameMaterial" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="相关设备">
|
||||
<iframe id="rightFrameEquipment" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
369
bin/WebRoot/jsp/process/deployUserSkill.jsp
Normal file
369
bin/WebRoot/jsp/process/deployUserSkill.jsp
Normal file
@ -0,0 +1,369 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function saveforinsertFun(dialog) {
|
||||
var userid="";
|
||||
var skillid="";
|
||||
for(var i=0;i<$("#a_selectUsers option").length;i++){
|
||||
userid+=$("#a_selectUsers").get(0).options[i].value+",";
|
||||
}
|
||||
for(var i=0;i<$("#a_selectSkill option").length;i++){
|
||||
skillid+=$("#a_selectSkill").get(0).options[i].value+",";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/taskprocedure/saveForInsert.do",{userid:userid,skillid:skillid},function(data){
|
||||
if (data.res > 0) {
|
||||
parent.$.messager.alert('提示','保存成功,','info');
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
$("#gotskill").empty();
|
||||
}
|
||||
|
||||
function saveforcoverFun(dialog,grid) {
|
||||
var userid="";
|
||||
var skillid="";
|
||||
for(var i=0;i<$("#a_selectUsers option").length;i++){
|
||||
if(i==0)
|
||||
{
|
||||
userid=$("#a_selectUsers").get(0).options[i].value;
|
||||
}
|
||||
else
|
||||
{
|
||||
userid+=","+$("#a_selectUsers").get(0).options[i].value;
|
||||
}
|
||||
}
|
||||
for(var i=0;i<$("#a_selectSkill option").length;i++){
|
||||
skillid+=$("#a_selectSkill").get(0).options[i].value+",";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/taskprocedure/saveForCover.do",{userid:userid,skillid:skillid},function(data){
|
||||
if (data.res > 0) {
|
||||
parent.$.messager.alert('提示','保存成功','info');
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
$("#gotskill").empty();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function doSearch(userid,type){
|
||||
document.getElementById("prompt").style.visibility="hidden";
|
||||
$.getJSON(ext.contextPath +"/process/taskprocedure/getMember.do?userid="+userid+"&type="+type+"",callback);
|
||||
}
|
||||
|
||||
function doDisplaySkill(){
|
||||
$.getJSON(ext.contextPath +"/process/taskprocedure/getSkillJson.do",callbackSkill);
|
||||
}
|
||||
|
||||
function doSearchGotSkill(userid){
|
||||
$.getJSON(ext.contextPath +"/process/taskprocedure/getGotSkillJson.do?userid="+userid+"",callbackGotSkill);
|
||||
}
|
||||
|
||||
function callback(data){
|
||||
$("#a_Users").empty();
|
||||
if(data.rows.length > 0)
|
||||
{
|
||||
for(var i = 0;i<data.rows.length;i++){
|
||||
var userid = data.rows[i].userid;
|
||||
var username = data.rows[i].username;
|
||||
|
||||
$("#a_Users").append("<option value='"+userid+"'>"+username+"</option>");
|
||||
}
|
||||
}else{
|
||||
document.getElementById("prompt").style.visibility="visible";//显示
|
||||
}
|
||||
}
|
||||
|
||||
function callbackSkill(data){
|
||||
$("#a_Skill").empty();
|
||||
if(data.rows.length > 0)
|
||||
{
|
||||
for(var i = 0;i<data.rows.length;i++){
|
||||
var skillid = data.rows[i].id;
|
||||
var skillname = data.rows[i].name;
|
||||
|
||||
$("#a_Skill").append("<option value='"+skillid+"'>"+skillname+"</option>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function callbackGotSkill(data){
|
||||
$("#gotskill").empty();
|
||||
if(data.rows.length > 0)
|
||||
{
|
||||
for(var i = 0;i<data.rows.length;i++){
|
||||
var skillid = data.rows[i].skillid;
|
||||
var skillname = data.rows[i].skillname;
|
||||
|
||||
$("#gotskill").append("<option value='"+skillid+"'>"+skillname+"</option>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function searchGotSkill(){
|
||||
var selectid=$("#a_Users option:selected").val();
|
||||
doSearchGotSkill(selectid);
|
||||
}
|
||||
|
||||
function addToSelect(){
|
||||
var selectid=$("#a_Users option:selected").val();
|
||||
var selecttext=$("#a_Users option:selected").text()
|
||||
for (var i = 0; i < $("#a_selectUsers option").length; i++) {
|
||||
if($("#a_selectUsers").get(0).options[i].value==selectid){
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(selectid=='undefined' ||selectid==null ||selectid==""){
|
||||
return;
|
||||
}
|
||||
$("#a_selectUsers").append("<option value='"+selectid+"'>"+selecttext+"</option>");
|
||||
doSearchGotSkill(selectid);
|
||||
}
|
||||
|
||||
function addToSelectSkill(){
|
||||
var selectid=$("#a_Skill option:selected").val();
|
||||
var selecttext=$("#a_Skill option:selected").text()
|
||||
for (var i = 0; i < $("#a_selectSkill option").length; i++) {
|
||||
if($("#a_selectSkill").get(0).options[i].value==selectid){
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(selectid=='undefined' ||selectid==null ||selectid==""){
|
||||
return;
|
||||
}
|
||||
$("#a_selectSkill").append("<option value='"+selectid+"'>"+selecttext+"</option>");
|
||||
}
|
||||
|
||||
function removeFromSelect(){
|
||||
var selOpt = $("#a_selectUsers option:selected");
|
||||
selOpt.remove();
|
||||
$("#gotskill").empty();
|
||||
}
|
||||
function removeFromSelectSkill(){
|
||||
var selOpt = $("#a_selectSkill option:selected");
|
||||
selOpt.remove();
|
||||
|
||||
}
|
||||
|
||||
function removeFromSelectAll(){
|
||||
top.$.messager.confirm("提示","是否清除全部?",function(res){
|
||||
if(res){
|
||||
$("#a_selectUsers").empty();
|
||||
$("#a_selectSkill").empty();
|
||||
$("#gotskill").empty();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addToSelectAll(){
|
||||
for(var i=0;i<$("#a_Users option").length;i++){
|
||||
var flag=0;
|
||||
var selectid=$("#a_Users").get(0).options[i].value;
|
||||
var selecttext=$("#a_Users").get(0).options[i].text;
|
||||
for (var j = 0; j < $("#a_selectUsers option").length; j++) {
|
||||
if($("#a_selectUsers").get(0).options[j].value==selectid){
|
||||
flag=1;
|
||||
}
|
||||
}
|
||||
if(flag==0) {
|
||||
$("#a_selectUsers").append("<option value='"+selectid+"'>"+selecttext+"</option>");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function addToSelectAllSkill(){
|
||||
for(var i=0;i<$("#a_Skill option").length;i++){
|
||||
var flag=0;
|
||||
var selectid=$("#a_Skill").get(0).options[i].value;
|
||||
var selecttext=$("#a_Skill").get(0).options[i].text;
|
||||
for (var j = 0; j < $("#a_selectSkill option").length; j++) {
|
||||
if($("#a_selectSkill").get(0).options[j].value==selectid){
|
||||
flag=1;
|
||||
}
|
||||
}
|
||||
if(flag==0) {
|
||||
$("#a_selectSkill").append("<option value='"+selectid+"'>"+selecttext+"</option>");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function addToSelectMulti(){
|
||||
for(var i=0;i<$("#a_Users option").length;i++){
|
||||
if($("#a_Users").get(0).options[i].selected){
|
||||
var flag=0;
|
||||
var selectid=$("#a_Users").get(0).options[i].value;
|
||||
var selecttext=$("#a_Users").get(0).options[i].text;
|
||||
for (var j = 0; j < $("#a_selectUsers option").length; j++) {
|
||||
if($("#a_selectUsers").get(0).options[j].value==selectid){
|
||||
flag=1;
|
||||
}
|
||||
}
|
||||
if(flag==0) {
|
||||
$("#a_selectUsers").append("<option value='"+selectid+"'>"+selecttext+"</option>");
|
||||
}
|
||||
doSearchGotSkill(selectid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function addToSelectMultiSkill(){
|
||||
for(var i=0;i<$("#a_Skill option").length;i++){
|
||||
if($("#a_Skill").get(0).options[i].selected){
|
||||
var flag=0;
|
||||
var selectid=$("#a_Skill").get(0).options[i].value;
|
||||
var selecttext=$("#a_Skill").get(0).options[i].text;
|
||||
for (var j = 0; j < $("#a_selectSkill option").length; j++) {
|
||||
if($("#a_selectSkill").get(0).options[j].value==selectid){
|
||||
flag=1;
|
||||
}
|
||||
}
|
||||
if(flag==0) {
|
||||
$("#a_selectSkill").append("<option value='"+selectid+"'>"+selecttext+"</option>");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getUser(){
|
||||
document.getElementById("prompt").style.visibility="hidden";
|
||||
var username = $('#queryusername').val();
|
||||
$.getJSON(ext.contextPath +"/user/queryUsers.do?queryusername="+encodeURI(encodeURI(username)), callback );
|
||||
}
|
||||
|
||||
function selectOK() {
|
||||
var useridname="";
|
||||
for(var i=0;i<$("#a_selectUsers option").length;i++){
|
||||
useridname+=$("#a_selectUsers").get(0).options[i].value+","+$("#a_selectUsers").get(0).options[i].text+";";
|
||||
|
||||
}
|
||||
var retn=useridname;
|
||||
return retn;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#unitTree').tree({
|
||||
url : ext.contextPath + '/process/taskprocedure/getUnitJson.do?random=' + Math.random()+'&chiefid=${chiefid}',
|
||||
parentField : 'pid',
|
||||
onClick : function(node) {
|
||||
if(node.pid != ''){
|
||||
doSearch(node.id,node.attributes.type);
|
||||
doDisplaySkill();
|
||||
}
|
||||
}
|
||||
});
|
||||
var recvid=parent.$('#'+'${param.iframeId}')[0].contentWindow.$("#"+'${param.recvid}').val();
|
||||
$.getJSON(ext.contextPath +"/user/getRecvusersJson.do?recvid="+recvid, function(data){
|
||||
$("#a_selectUsers").empty();
|
||||
for(var i = 0;i<data.rows.length;i++){
|
||||
var userid = data.rows[i].id;
|
||||
var username = data.rows[i].caption;
|
||||
$("#a_selectUsers").append("<option value='"+userid+"'>"+username+"</option>");
|
||||
}
|
||||
});
|
||||
|
||||
$.getJSON(ext.contextPath +"/process/taskprocedure/getSkillJson.do", function(datas){
|
||||
$("#a_Skill").empty();
|
||||
for(var i = 0;i<datas.rows.length;i++){
|
||||
var skillid = datas.rows[i].id;
|
||||
var skillname = datas.rows[i].procedurename;
|
||||
$("#a_Skill").append("<option value='"+skillid+"'>"+skillname+"</option>");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0px">
|
||||
<input id="recvid" name="recvid" type="hidden" />
|
||||
<div style="background-color:#f4f4f4;padding-top:2px;padding-bottom:2px;border-bottom:1px solid #e4e4e4;font-size:12px;">
|
||||
<!-- <span style="padding:2px 5px 2px 5px">姓名</span>
|
||||
<input id="queryusername" name="queryusername" class="easyui-searchbox" style="width: 180px;"
|
||||
data-options="prompt:'请输入关键字',searcher:getUser" />-->
|
||||
<span id="prompt" name="prompt" style="color:red;visibility:hidden;padding:2px 5px 2px 5px">无用户或者无权限</span>
|
||||
</div>
|
||||
<div style="float:left">
|
||||
<table cellspacing="2" cellpadding="0" style="font-size:12px;">
|
||||
<tr>
|
||||
<td valign="top" style="border:1px solid #e4e4e4">
|
||||
<div style="width: 150px;height: 370px;overflow:auto">
|
||||
<ul id="unitTree" class="easyui-tree" data-options="method:'get',animate:true"></ul>
|
||||
</div>
|
||||
</td>
|
||||
<td valign="top" style="border:1px solid #e4e4e4">
|
||||
<div style="background-color:#f4f4f4;padding:2px 5px 2px 5px;border-bottom:1px solid #e4e4e4">
|
||||
组员 (双击选择)
|
||||
</div>
|
||||
<select name="a_Users" id="a_Users" ondblclick="addToSelect()" onclick="searchGotSkill();"
|
||||
style="width:160px; height:350px;border:0px;padding:2px;" multiple="multiple"></select>
|
||||
</td>
|
||||
<td valign="top" style="border:1px solid #e4e4e4">
|
||||
<div style="background-color:#f4f4f4;padding:2px 5px 2px 5px;border-bottom:1px solid #e4e4e4">
|
||||
已选 (双击移除)
|
||||
</div>
|
||||
<select name="a_selectUsers" id="a_selectUsers" ondblclick="removeFromSelect();"
|
||||
style="width:160px; height:350px;border:0px;padding:2px;" multiple="multiple"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td></td>
|
||||
<td><a id="btnCU" href="#" class="easyui-linkbutton" data-options="iconCls:'ext-icon-add',plain:true" onclick="addToSelectMulti();">选中</a>
|
||||
<a id="btnCUA" href="#" class="easyui-linkbutton" data-options="iconCls:'ext-icon-world_add',plain:true" onclick="addToSelectAll();">全选</a></td>
|
||||
</tr>
|
||||
</table >
|
||||
</div>
|
||||
<div style="float:right">
|
||||
<table cellspacing="2" cellpadding="0" style="font-size:12px;">
|
||||
<tr>
|
||||
<td><select name="gotskill" id="gotskill" style="border:none;width:120px; height:350px;" multiple="multiple" disabled=true></select></td>
|
||||
<td valign="top" style="border:1px solid #e4e4e4">
|
||||
<div style="background-color:#f4f4f4;padding:2px 5px 2px 5px;border-bottom:1px solid #e4e4e4">
|
||||
已选 (双击移除)
|
||||
</div>
|
||||
<select name="a_selectSkill" id="a_selectSkill" ondblclick="removeFromSelectSkill();"
|
||||
style="width:160px; height:350px;border:0px;padding:2px;" multiple="multiple"></select>
|
||||
</td>
|
||||
<td valign="top" style="border:1px solid #e4e4e4">
|
||||
<div style="background-color:#f4f4f4;padding:2px 5px 2px 5px;border-bottom:1px solid #e4e4e4">
|
||||
技能 (双击选择)
|
||||
</div>
|
||||
<select name="a_Skill" id="a_Skill" ondblclick="addToSelectSkill()"
|
||||
style="width:160px; height:350px;border:0px;padding:2px;" multiple="multiple"></select>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td></td>
|
||||
<td><a id="btnCS" href="#" class="easyui-linkbutton" data-options="iconCls:'ext-icon-add',plain:true" onclick="addToSelectMultiSkill();">选中</a>
|
||||
<a id="btnCSA" href="#" class="easyui-linkbutton" data-options="iconCls:'ext-icon-world_add',plain:true" onclick="addToSelectAllSkill();">全选</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<div style="width:200; float:right">
|
||||
<table>
|
||||
<tr>
|
||||
<td><a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'ext-icon-cd_add',plain:true" onclick="saveforinsertFun()">增量认定</a></td>
|
||||
<td><a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'ext-icon-css_add',plain:true" onclick="saveforcoverFun()">覆盖认定</a></td>
|
||||
<td><a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'ext-icon-cancel',plain:true" onclick="removeFromSelectAll()">初始化</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
97
bin/WebRoot/jsp/process/equipmentCardListForSelects.jsp
Normal file
97
bin/WebRoot/jsp/process/equipmentCardListForSelects.jsp
Normal file
@ -0,0 +1,97 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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">
|
||||
function selectFun() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
if(datas !=""){
|
||||
datas+=",";
|
||||
}
|
||||
datas += '{"id":"'+item.id +'","equipmentcardid":"'+item.equipmentcardid +'",'+
|
||||
'"equipmentname":"'+item.equipmentname +'","equipmentmodel":"'+item.equipmentmodel +'",'+
|
||||
'"equipmentclass":"'+item.equipmentclass.name +'","geographyarea":"'+item.geographyarea.name +'"}';
|
||||
|
||||
});
|
||||
datas="["+datas+"]";
|
||||
|
||||
return datas;//$.parseJSON(datas);
|
||||
|
||||
}
|
||||
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/equipment/getEquipmentCard.do?querytype=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '80', title : '设备编号', field : 'equipmentcardid', sortable : true, halign:'center'},
|
||||
{width : '100', title : '设备名称', field : 'equipmentname', sortable : true, halign:'center'},
|
||||
{width : '100', title : '设备型号', field: 'equipmentmodel', sortable : true, halign:'center'},
|
||||
{width : '100', title : '设备类型', field: 'equipmentclass', sortable : true, halign:'center',formatter:function(value){
|
||||
return value.name;
|
||||
} },
|
||||
{width : '100', title : '存放位置', field: 'geographyarea', sortable : true, halign:'center',formatter:function(value){
|
||||
return value.name;
|
||||
}},
|
||||
|
||||
|
||||
{width : '50', title : '管理状态', field: 'currentmanageflag', sortable : true, halign:'center'},
|
||||
{width : '80', title : '备注', field : 'remark', sortable : true, halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</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>
|
||||
<tr>
|
||||
<td>名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" style="width: 180px;" /></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>
|
||||
93
bin/WebRoot/jsp/process/leaderForSelect.jsp
Normal file
93
bin/WebRoot/jsp/process/leaderForSelect.jsp
Normal file
@ -0,0 +1,93 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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 + '/process/taskprocedure/getLeaderJson.do?flag=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
nowrap:false,
|
||||
singleSelect: true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '用户名称', field : 'username', sortable : true, halign:'center'},
|
||||
{width : '250', title : '班组名称', field : 'groupname', sortable : true, halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
//以json格式返回数据
|
||||
jsonstr = '{"userid":"'+row.userid
|
||||
+'","username":"'+row.username
|
||||
+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
</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>
|
||||
<tr >
|
||||
|
||||
<td>人员名称</td>
|
||||
<td><input name="search_user" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td>
|
||||
<td>班组名称</td>
|
||||
<td><input name="search_group" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></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>
|
||||
<td><div class="datagrid-btn-separator"></div></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>
|
||||
|
||||
187
bin/WebRoot/jsp/process/processConfigEdit.jsp
Normal file
187
bin/WebRoot/jsp/process/processConfigEdit.jsp
Normal file
@ -0,0 +1,187 @@
|
||||
<!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"%>
|
||||
<%@page import="com.sipai.entity.process.TaskProcedure"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%request.setAttribute("Type_Inspect",TaskProcedure.Type_Inspect);%>
|
||||
<%request.setAttribute("Type_Produce",TaskProcedure.Type_Produce);%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/taskprocedure/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$.post(ext.contextPath + "/process/taskprocedure/saveWorkstation.do",{procedureid:data.id,wids:getWids()},function(data1){
|
||||
if(JSON.parse(data1).res>0)
|
||||
{
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}
|
||||
else if(JSON.parse(data1).res == 0){
|
||||
top.$.messager.alert('提示', "工序已保存,工位未添加", 'info');
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data1.res, 'info');
|
||||
}
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
//获取已选的工位id
|
||||
function getWids(){
|
||||
var rows= $('#grid').datagrid("getRows");
|
||||
var wids="";
|
||||
$.each(rows, function(index, item){
|
||||
wids+=item.id+",";
|
||||
});
|
||||
wids=wids.replace(/,$/gi,"");
|
||||
return wids;
|
||||
}
|
||||
|
||||
function doadd_W(){
|
||||
$("#wids").val(getWids());
|
||||
localStorage.setItem("wids",$("#wids").val().split(","));
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加工位',
|
||||
height:500,
|
||||
url : ext.contextPath + '/process/taskprocedure/showlistForSelects.do',
|
||||
buttons : [ {
|
||||
iconCls:'icon-ok',
|
||||
text : '确认',
|
||||
handler : function() {
|
||||
var data = dialog.find('iframe').get(0).contentWindow.selectFun(dialog, grid);
|
||||
if(data.res.length>0){
|
||||
for(var i=0;i<data.res.length;i++){
|
||||
grid.datagrid('appendRow',{
|
||||
id:data.res[i].id,
|
||||
serial:data.res[i].serial,
|
||||
name:data.res[i].name,
|
||||
typename:data.res[i].typename,
|
||||
deptname:data.res[i].deptname
|
||||
});
|
||||
}
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
}
|
||||
|
||||
function dodelete_W(){
|
||||
var rows = $('#grid').datagrid('getChecked');
|
||||
if(rows.length==0){
|
||||
top.$.messager.alert("提示","请选择需要删除的数据","info");
|
||||
}else{
|
||||
top.$.messager.confirm("提示", "确定删除这些数据?", function(r) {
|
||||
if (r) {
|
||||
//复制rows,否则deleteRow的index会出错
|
||||
var copyRows = [];
|
||||
for ( var j= 0; j < rows.length; j++) {
|
||||
copyRows.push(rows[j]);
|
||||
}
|
||||
|
||||
$.each(copyRows, function(index, item){
|
||||
$('#grid').datagrid('deleteRow',$('#grid').datagrid('getRowIndex',copyRows[index]));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#p').panel({
|
||||
width:"100%",
|
||||
height:"170",
|
||||
title: '相关工位',
|
||||
tools: [{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){doadd_W();}
|
||||
},{
|
||||
iconCls:'icon-remove',
|
||||
handler:function(){dodelete_W();}
|
||||
}]
|
||||
});
|
||||
|
||||
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
idField : 'id',
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '140', title : '工位编号', field : 'serial', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '180', title : '工位名称', field : 'name', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '100', title : '工位类型', field : 'typename', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '180', title : '所属车间', field : 'deptname', sortable : true, editor:'textbox',halign:'center'}
|
||||
] ],
|
||||
data:${workstationList}
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="wids" name="wids" type="hidden" value="" />
|
||||
<input type="hidden" name="id" value="${taskprocedure.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>工序名称</th>
|
||||
<td><input id="procedurename" name="procedurename" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${taskprocedure.procedurename}" /></td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<th>工序编码(必须以字母开头)</th>
|
||||
<td><input id="procedurecode" name="procedurecode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${taskprocedure.procedurecode}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>关键字(用“;”隔开)</th>
|
||||
<td>
|
||||
<input name="keywords" class="easyui-textbox" style="height:100px;width:300px" value="${taskprocedure.keywords}"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>type</th>
|
||||
<td>
|
||||
<select name="type" class="easyui-combobox" data-options="panelHeight:'auto',editable:false,value:'${taskprocedure.type}'">
|
||||
<option value="${Type_Produce}">生产</option>
|
||||
<option value="${Type_Inspect}">检测</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>半成品生成工序</th>
|
||||
<td>
|
||||
<select name="semiflag" class="easyui-combobox" data-options="panelHeight:'auto',editable:false,value:'${taskprocedure.semiflag}'">
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div id="p">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
174
bin/WebRoot/jsp/process/processConfigList.jsp
Normal file
174
bin/WebRoot/jsp/process/processConfigList.jsp
Normal file
@ -0,0 +1,174 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.process.TaskProcedure"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%request.setAttribute("Type_Inspect",TaskProcedure.Type_Inspect);%>
|
||||
<%request.setAttribute("Type_Produce",TaskProcedure.Type_Produce);%>
|
||||
<%request.setAttribute("Flag_Semi",TaskProcedure.Flag_Semi);%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var updateFun = function() {
|
||||
parent.$.messager.confirm('提示', '您确定要与PLM同步工序配置信息?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/process/updateProcessConfigs.do', "" , function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','更新成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','更新失败','info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑工序信息',
|
||||
width: 800,
|
||||
height: 460,
|
||||
url : ext.contextPath + '/process/taskprocedure/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskprocedure/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskprocedure/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/process/getConfigList.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '250', title : '流程id', field : 'processid', sortable : true, halign:'center'},
|
||||
{width : '180', title : '工序编号', field : 'procedureno', sortable : true, halign:'center'},
|
||||
{width : '150', title : '物料编号', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/process/editConfig.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/add.do")) {%>
|
||||
<!-- <td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="updateFun();">同步</a>
|
||||
</td> -->
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<input name="idStr" type="hidden" />
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>流程ID</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>
|
||||
133
bin/WebRoot/jsp/process/realAdd.jsp
Normal file
133
bin/WebRoot/jsp/process/realAdd.jsp
Normal file
@ -0,0 +1,133 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/real/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectMaterial(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择产品',
|
||||
width : 800,
|
||||
height : 400,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/selectMaterial.do?typename='+encodeURI(encodeURI("成品")),
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#productid").val((res.materialid== 'undefined')?'':res.materialid);
|
||||
$("#productcode").textbox('setValue',(res.materialcode == 'undefined')?'':res.materialcode);
|
||||
$("#productname").text((res.materialname == 'undefined')?'':res.materialname);
|
||||
$("#productspec").text((res.spec == 'undefined')?'':res.spec);
|
||||
setName();
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
function setName(){
|
||||
$("#name").textbox("setValue",$("#productname").text()+" "+$("#processid").combobox("getText"));
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#productcode").textbox("textbox").bind("click",function(){
|
||||
selectMaterial();
|
||||
});
|
||||
|
||||
$("#processid").combobox({
|
||||
url:ext.contextPath + '/snaker/process/getListForSelect.do',
|
||||
valueField:'id',
|
||||
textField:'displayName',
|
||||
onSelect:function(record){
|
||||
setName();
|
||||
}
|
||||
});
|
||||
|
||||
/* $("#lineid").combobox({
|
||||
url : ext.contextPath + '/work/line/getSelectList.do?random=' + Math.random(),
|
||||
valueField : 'id',
|
||||
textField : 'name',
|
||||
method:'get',
|
||||
width:250,
|
||||
panelHeight:'auto',
|
||||
editable:false
|
||||
}); */
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>产品编码</th>
|
||||
<td>
|
||||
<input id="productid" name="productid" type="hidden" />
|
||||
<input id="productcode" name="productcode" class="easyui-textbox" data-options="required:true,validType:'isBlank',editable:false" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品名称</th>
|
||||
<td>
|
||||
<label id="productname"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品规格</th>
|
||||
<td>
|
||||
<label id="productspec"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工艺路线</th>
|
||||
<td>
|
||||
<input id="processid" name="processid" class="easyui-combobox" data-options="required:true,validType:'isBlank',editable:false" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品工艺名称</th>
|
||||
<td>
|
||||
<input id="name" name="name" class="easyui-textbox" data-options="required:true,validType:'isBlank',width:400" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<th>所属产线</th>
|
||||
<td><input id="lineid" name="lineid" class="easyui-combotree"
|
||||
data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<th>描述</th>
|
||||
<td>
|
||||
<input name="description" class="easyui-textbox" style="height:100px;width:300px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
60
bin/WebRoot/jsp/process/realDetailsAdd.jsp
Normal file
60
bin/WebRoot/jsp/process/realDetailsAdd.jsp
Normal file
@ -0,0 +1,60 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetails/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="pid" value="${param.pid}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>顺序</th>
|
||||
<td>
|
||||
<input name="number" class="easyui-numberspinner" data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工序名称</th>
|
||||
<td>
|
||||
<input name="name" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>标准工时</th>
|
||||
<td>
|
||||
<input name="worktime" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>描述</th>
|
||||
<td>
|
||||
<input name="description" class="easyui-textbox" style="width:300%;height:100px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
128
bin/WebRoot/jsp/process/realDetailsBookAdd.jsp
Normal file
128
bin/WebRoot/jsp/process/realDetailsBookAdd.jsp
Normal file
@ -0,0 +1,128 @@
|
||||
<%@ 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,
|
||||
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) {
|
||||
if(data){
|
||||
$.post(ext.contextPath + '/process/realDetailsBook/getchecklist.do?pid=${param.pid}',
|
||||
function(result){
|
||||
$.each(result.rows,function(i,obj){
|
||||
$.each(data.rows, function(index, item){
|
||||
if(item.id==obj.bookid){
|
||||
$('#grid').datagrid('checkRow', index);
|
||||
}
|
||||
});
|
||||
});
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function dosave(dialog, grid) {
|
||||
var bidstr = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
bidstr += rows[i].id+",";
|
||||
}
|
||||
if(bidstr.length>0){
|
||||
bidstr = bidstr.substring(0,bidstr.length-1);
|
||||
}
|
||||
$.post(ext.contextPath + "/process/realDetailsBook/save.do", {bids:bidstr,pid:'${param.pid}'}, function(data, textStatus) {
|
||||
if(data != ""){
|
||||
top.$.messager.alert("提示", data, "info", function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert("提示", "保存失败", "info", function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</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>
|
||||
86
bin/WebRoot/jsp/process/realDetailsBookEdit.jsp
Normal file
86
bin/WebRoot/jsp/process/realDetailsBookEdit.jsp
Normal file
@ -0,0 +1,86 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsBook/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectBook(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择作业指导书',
|
||||
width : 800,
|
||||
height : 400,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/document/selectBook.do?productcode=${productcode}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#bookid").val((res.id== 'undefined')?'':res.id);
|
||||
$("#bookname").textbox('setValue',(res.docname == 'undefined')?'':res.docname);
|
||||
$("#booknum").text((res.number == 'undefined')?'':res.number);
|
||||
$("#bookpath").text((res.path == 'undefined')?'':res.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#bookname").textbox("textbox").bind("click",function(){
|
||||
selectBook();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${realDetailsBook.id}"/>
|
||||
<input type="hidden" name="productcode" value="${productcode}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>作业指导书</th>
|
||||
<td>
|
||||
<input id="bookid" name="bookid" type="hidden" value="${realDetailsBook.book.id }"/>
|
||||
<input id="bookname" class="easyui-textbox" data-options="required:true,validType:'isBlank',editable:false" value="${realDetailsBook.book.docname }" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>编号</th>
|
||||
<td>
|
||||
<label id="booknum">${realDetailsBook.book.number }</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>地址</th>
|
||||
<td>
|
||||
<label id="bookpath">${realDetailsBook.book.path}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
182
bin/WebRoot/jsp/process/realDetailsBookList.jsp
Normal file
182
bin/WebRoot/jsp/process/realDetailsBookList.jsp
Normal file
@ -0,0 +1,182 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '添加作业指导书',
|
||||
url : ext.contextPath + '/process/realDetailsBook/add.do?pid=${param.pid}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '编辑作业指导书',
|
||||
url : ext.contextPath + '/process/realDetailsBook/edit.do?id=' + id+'&?pid=${param.pid}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '浏览作业指导书',
|
||||
url : ext.contextPath + '/document/showBookView.do?id=' + id+'&?pid=${param.pid}'
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsBook/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsBook/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/realDetailsBook/getlist.do?pid=${param.pid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '180', title : '作业指导书', field : 'docname', sortable : false, halign:'center',formatter:function(value,row){
|
||||
if(row.book!=null){
|
||||
return row.book.docname;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '120', title : '编号', field : 'number', sortable : false, halign:'center',formatter:function(value,row){
|
||||
if(row.book!=null){
|
||||
return row.book.number;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '100', title : '类型', field : 'doctype', sortable : false, halign:'center',formatter:function(value,row){
|
||||
if(row.book!=null&&row.book.doctype!=null){
|
||||
switch (row.book.doctype) {
|
||||
case 'A':
|
||||
return '工作指令';
|
||||
case 'B':
|
||||
return '图纸';
|
||||
case 'C':
|
||||
return '作业指导书';
|
||||
}
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '320', title : '地址', field : 'path', sortable : false, halign:'center',formatter:function(value,row){
|
||||
if(row.book!=null){
|
||||
return row.book.path;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.book.id+'\');"/>';
|
||||
// <%if (sessionManager.havePermission(session,"process/real/edit.do")) {%>
|
||||
// str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
// <%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/real/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</body>
|
||||
</html>
|
||||
105
bin/WebRoot/jsp/process/realDetailsEdit.jsp
Normal file
105
bin/WebRoot/jsp/process/realDetailsEdit.jsp
Normal file
@ -0,0 +1,105 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave() {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetails/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info');
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
var showdetailsFun = function() {
|
||||
$("#rightFrameStep").attr("src",ext.contextPath+"/process/realDetailsStep/showList.do?pid=${realDetails.id}");
|
||||
$("#rightFrameWorkstation").attr("src",ext.contextPath+"/process/realDetailsWorkstation/showList.do?pid=${realDetails.id}");
|
||||
$("#rightFrameJob").attr("src",ext.contextPath+"/process/realDetailsJob/showList.do?pid=${realDetails.id}");
|
||||
$("#rightFrameMaterial").attr("src",ext.contextPath+"/process/realDetailsMaterial/showList.do?pid=${realDetails.id}");
|
||||
$("#rightFrameEquipment").attr("src",ext.contextPath+"/process/realDetailsEquipment/showList.do?pid=${realDetails.id}");
|
||||
$("#rightFrameBook").attr("src",ext.contextPath+"/process/realDetailsBook/showList.do?pid=${realDetails.id}");
|
||||
};
|
||||
|
||||
$(function(){
|
||||
showdetailsFun();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout">
|
||||
<div data-options="region:'north'" style="overflow: hidden;padding:5px;height:234px">
|
||||
<div id="tt">
|
||||
<a href="javascript:void(0)" class="icon-save" title="保存" onclick="dosave()"></a>
|
||||
</div>
|
||||
<div class="easyui-panel" title="产品工序" data-options="tools:'#tt'" style="padding:5px;">
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${realDetails.id}"/>
|
||||
<input type="hidden" name="pid" value="${realDetails.pid}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>产品工艺名称</th>
|
||||
<td>
|
||||
${realDetails.pname}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工序名称</th>
|
||||
<td>
|
||||
${realDetails.name}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>标准工时</th>
|
||||
<td>
|
||||
<input name="worktime" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${realDetails.worktime}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>描述</th>
|
||||
<td>
|
||||
<textarea name="description" class="easyui-textbox" data-options="multiline:true" style="height:100px;width:300px">${realDetails.description}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div data-options="region:'center'" style="overflow: hidden;padding:5px;">
|
||||
<div class="easyui-tabs" style="height:320px">
|
||||
<div title="相关工位">
|
||||
<iframe id="rightFrameWorkstation" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;margin-bottom:-4px"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="相关工种">
|
||||
<iframe id="rightFrameJob" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;margin-bottom:-4px"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="相关物料">
|
||||
<iframe id="rightFrameMaterial" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;margin-bottom:-4px"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="相关设备">
|
||||
<iframe id="rightFrameEquipment" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;margin-bottom:-4px"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="作业指导书">
|
||||
<iframe id="rightFrameBook" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;margin-bottom:-4px"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="工序步骤">
|
||||
<iframe id="rightFrameStep" src="" allowTransparency="true" style="border: 0; width: 100%;height: 100%;margin-bottom:-4px"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
112
bin/WebRoot/jsp/process/realDetailsEquipmentAdd.jsp
Normal file
112
bin/WebRoot/jsp/process/realDetailsEquipmentAdd.jsp
Normal file
@ -0,0 +1,112 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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 + '/process/realDetailsEquipment/getTaskEquipment.do?pid=${param.pid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '设备编号', field : 'equipmentcardid', sortable : true, halign:'center'},
|
||||
{width : '120', title : '设备名称', field : 'equipmentname', sortable : true, halign:'center'},
|
||||
{width : '120', title : '设备型号', field: 'equipmentmodel', sortable : true, halign:'center'},
|
||||
{width : '100', title : '设备类型', field: 'equipmentclass', sortable : true, halign:'center'},
|
||||
{width : '100', title : '存放位置', field: 'geographyarea', sortable : true, halign:'center'},
|
||||
{width : '80', title : '管理状态', field: 'currentmanageflag', sortable : true, align:'center'},
|
||||
{width : '100', title : '备注', field : 'remark', sortable : true, halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
if(data){
|
||||
$.post(ext.contextPath + '/process/realDetailsEquipment/getchecklist.do?pid=${param.pid}',
|
||||
function(result){
|
||||
$.each(result.rows,function(i,obj){
|
||||
$.each(data.rows, function(index, item){
|
||||
if(item.equipmentid==obj.equipmentid){
|
||||
$('#grid').datagrid('checkRow', index);
|
||||
}
|
||||
});
|
||||
});
|
||||
},'json');
|
||||
}
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function dosave(dialog, grid) {
|
||||
var eidstr = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
eidstr += rows[i].equipmentid+",";
|
||||
}
|
||||
if(eidstr.length>0){
|
||||
eidstr = eidstr.substring(0,eidstr.length-1);
|
||||
}
|
||||
$.post(ext.contextPath + "/process/realDetailsEquipment/save.do", {eids:eidstr,pid:'${param.pid}'}, function(data, textStatus) {
|
||||
if(data != ""){
|
||||
top.$.messager.alert("提示", data, "info", function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert("提示", "保存失败", "info", function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</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>
|
||||
<tr>
|
||||
<td>设备名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" style="width: 180px;" /></td>
|
||||
<td>设备编号</td>
|
||||
<td><input name="search_code" class="easyui-textbox" style="width: 180px;" /></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>
|
||||
94
bin/WebRoot/jsp/process/realDetailsEquipmentEdit.jsp
Normal file
94
bin/WebRoot/jsp/process/realDetailsEquipmentEdit.jsp
Normal file
@ -0,0 +1,94 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsEquipment/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectEquipment(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择材料',
|
||||
width : 800,
|
||||
height : 480,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/equipment/showEquipmentCardForSelect.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#equipmentid").val((res.id== 'undefined')?'':res.id);
|
||||
$("#equipmentcardid").textbox('setValue',(res.equipmentcardid == 'undefined')?'':res.equipmentcardid);
|
||||
|
||||
$("#equipmentname").text((res.equipmentname == 'undefined')?'':res.equipmentname);
|
||||
$("#equipmentmodel").text((res.equipmentmodel == 'undefined')?'':res.equipmentmodel);
|
||||
$("#equipmentclass").text((res.equipmentclass == 'undefined')?'':res.equipmentclass);
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#equipmentcardid").textbox("textbox").bind("click",function(){
|
||||
selectEquipment();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${realDetailsEquipment.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>设备编号</th>
|
||||
<td>
|
||||
<input id="equipmentid" name="equipmentid" type="hidden" value="${realDetailsEquipment.equipmentid}"/>
|
||||
<input id="equipmentcardid" class="easyui-textbox" data-options="required:true,validType:'isBlank',editable:false"
|
||||
value="${realDetailsEquipment.equipment.equipmentcardid}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<td>
|
||||
<label id="equipmentname">${realDetailsEquipment.equipment.equipmentname}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备型号</th>
|
||||
<td>
|
||||
<label id="equipmentmodel">${realDetailsEquipment.equipment.equipmentmodel}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备类型</th>
|
||||
<td>
|
||||
<label id="equipmentclass">${realDetailsEquipment.equipment.equipmentclassname}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
152
bin/WebRoot/jsp/process/realDetailsEquipmentList.jsp
Normal file
152
bin/WebRoot/jsp/process/realDetailsEquipmentList.jsp
Normal file
@ -0,0 +1,152 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '添加设备',
|
||||
url : ext.contextPath + '/process/realDetailsEquipment/add.do?pid=${param.pid}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '编辑设备',
|
||||
url : ext.contextPath + '/process/realDetailsEquipment/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsEquipment/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsEquipment/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/realDetailsEquipment/getlist.do?pid=${param.pid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '设备编码', field : 'equipment', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return value.equipmentcardid;
|
||||
}},
|
||||
{width : '150', title : '设备名称', field : 'equipmentname', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.equipment.equipmentname;
|
||||
}},
|
||||
{width : '150', title : '设备型号', field : 'equipmentmodel', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.equipment.equipmentmodel;
|
||||
}},
|
||||
{width : '100', title : '设备类型', field : 'equipmentclass', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.equipment.equipmentclassname;
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '70', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%-- <%if (sessionManager.havePermission(session,"process/real/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%> --%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/real/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</body>
|
||||
</html>
|
||||
68
bin/WebRoot/jsp/process/realDetailsJobAdd.jsp
Normal file
68
bin/WebRoot/jsp/process/realDetailsJobAdd.jsp
Normal 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 language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsJob/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('#unitid').combotree({
|
||||
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
required:true,
|
||||
method:'get',
|
||||
onClick: function(node) {
|
||||
$('#jobid').combobox({
|
||||
url:ext.contextPath + '/user/getJsonJobByUnit.do?unitid='+node.id,
|
||||
valueField:'id',
|
||||
textField:'name'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#jobid').combobox({
|
||||
required:true,
|
||||
editable:false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="pid" value="${param.pid}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>车间</th>
|
||||
<td>
|
||||
<input id="unitid" name="unitid" class="easyui-combotree" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工种</th>
|
||||
<td>
|
||||
<input id="jobid" name="jobid" class="easyui-combotree" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
80
bin/WebRoot/jsp/process/realDetailsJobEdit.jsp
Normal file
80
bin/WebRoot/jsp/process/realDetailsJobEdit.jsp
Normal file
@ -0,0 +1,80 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsJob/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('#unitid').combotree({
|
||||
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
required:true,
|
||||
method:'get',
|
||||
onClick: function(node) {
|
||||
$('#jobid').combobox({
|
||||
url:ext.contextPath + '/user/getJsonJobByUnit.do?unitid='+node.id,
|
||||
valueField:'id',
|
||||
textField:'name'
|
||||
});
|
||||
},
|
||||
onLoadSuccess:function(){
|
||||
$('#unitid').combotree("setValue","${realDetailsJob.unitid}");
|
||||
|
||||
$('#jobid').combobox({
|
||||
url:ext.contextPath + "/user/getJsonJobByUnit.do?unitid=${realDetailsJob.unitid}",
|
||||
valueField:'id',
|
||||
textField:'name',
|
||||
onLoadSuccess:function(){
|
||||
$('#jobid').combobox("setValue","${realDetailsJob.jobid}");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#jobid').combobox({
|
||||
required:true,
|
||||
editable:false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${realDetailsJob.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>车间</th>
|
||||
<td>
|
||||
<input id="unitid" name="unitid" class="easyui-combotree" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工种</th>
|
||||
<td>
|
||||
<input id="jobid" name="jobid" class="easyui-combotree" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
142
bin/WebRoot/jsp/process/realDetailsJobList.jsp
Normal file
142
bin/WebRoot/jsp/process/realDetailsJobList.jsp
Normal file
@ -0,0 +1,142 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '添加工种',
|
||||
url : ext.contextPath + '/process/realDetailsJob/add.do?pid=${param.pid}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '编辑工种',
|
||||
url : ext.contextPath + '/process/realDetailsJob/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsJob/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsJob/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/realDetailsJob/getlist.do?pid=${param.pid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '200', title : '车间', field : 'unitname', sortable : true, halign:'center'},
|
||||
{width : '100', title : '工种', field : 'jobname', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '70', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/real/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/real/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</body>
|
||||
</html>
|
||||
219
bin/WebRoot/jsp/process/realDetailsList.jsp
Normal file
219
bin/WebRoot/jsp/process/realDetailsList.jsp
Normal file
@ -0,0 +1,219 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加工序',
|
||||
url : ext.contextPath + '/process/realDetails/add.do?pid=${param.pid}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑工序',
|
||||
url : ext.contextPath + '/process/realDetails/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetails/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
|
||||
selectFirst();//刷新tabs
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetails/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
|
||||
selectFirst();//刷新tabs
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/realDetails/getlist.do?pid=${param.pid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '30', title : '序号', field : 'number', sortable : true, halign:'center'},
|
||||
{width : '100', title : '名称', field : 'name', sortable : true, halign:'center'},
|
||||
{width : '60', title : '标准工时', field : 'worktime', sortable : true, halign:'center'},
|
||||
{width : '100', title : '描述', field : 'description', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '70', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/real/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
|
||||
selectFirst();
|
||||
},
|
||||
onSelect:function(index,row){
|
||||
showdetailsFun(row.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function selectFirst(){
|
||||
if(grid.datagrid('getData').total>0){
|
||||
grid.datagrid('unselectAll');
|
||||
grid.datagrid('selectRow',0);
|
||||
}else{
|
||||
showdetailsFun("-1");
|
||||
}
|
||||
}
|
||||
|
||||
var oldId = "";//用于避免重复提交同一行数据,导致页面卡顿
|
||||
var showdetailsFun = function(id) {
|
||||
if(id != oldId){
|
||||
$("#rightFrameStep").attr("src",ext.contextPath+"/process/realDetailsStep/showList.do?pid="+id);
|
||||
$("#rightFrameWorkstation").attr("src",ext.contextPath+"/process/realDetailsWorkstation/showList.do?pid="+id);
|
||||
$("#rightFrameJob").attr("src",ext.contextPath+"/process/realDetailsJob/showList.do?pid="+id);
|
||||
$("#rightFrameMaterial").attr("src",ext.contextPath+"/process/realDetailsMaterial/showList.do?pid="+id);
|
||||
$("#rightFrameEquipment").attr("src",ext.contextPath+"/process/realDetailsEquipment/showList.do?pid="+id);
|
||||
}
|
||||
oldId = id;
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="easyui-layout" data-options="fit:true">
|
||||
<div id="leftdiv" data-options="region:'west',split:true" title="工序" style="width:440px;padding:0;">
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/real/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
<td>名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" style="width: 180px;" /></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>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
<div id="rightdiv" data-options="region:'center'">
|
||||
<div id="tt" class="easyui-tabs" data-options="fit:true">
|
||||
<div title="工序步骤">
|
||||
<iframe id="rightFrameStep" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="相关工位">
|
||||
<iframe id="rightFrameWorkstation" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="相关工种">
|
||||
<iframe id="rightFrameJob" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="相关物料">
|
||||
<iframe id="rightFrameMaterial" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="相关设备">
|
||||
<iframe id="rightFrameEquipment" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
108
bin/WebRoot/jsp/process/realDetailsMaterialAdd.jsp
Normal file
108
bin/WebRoot/jsp/process/realDetailsMaterialAdd.jsp
Normal file
@ -0,0 +1,108 @@
|
||||
<%@ 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 + '/process/realDetailsMaterial/getTaskMaterial.do?pid=${param.pid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '物料编码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '250', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '150', title : '规格参数', field : 'spec', sortable : true, halign:'center'},
|
||||
{width : '80', title : '类型', field : 'typename', sortable : true, halign:'center',align:'center'},
|
||||
{width : '80', title : '单位', field : 'unit', sortable : true, halign:'center',align:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
if(data){
|
||||
$.post(ext.contextPath + '/process/realDetailsMaterial/getchecklist.do?pid=${param.pid}',
|
||||
function(result){
|
||||
$.each(result.rows,function(i,obj){
|
||||
$.each(data.rows, function(index, item){
|
||||
if(item.materialid==obj.materialid){
|
||||
$('#grid').datagrid('checkRow', index);
|
||||
}
|
||||
});
|
||||
});
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function dosave(dialog, grid) {
|
||||
var midstr = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
midstr += rows[i].materialid+",";
|
||||
}
|
||||
if(midstr.length>0){
|
||||
midstr = midstr.substring(0,midstr.length-1);
|
||||
}
|
||||
$.post(ext.contextPath + "/process/realDetailsMaterial/save.do", {mids:midstr,pid:'${param.pid}'}, function(data, textStatus) {
|
||||
if(data != ""){
|
||||
top.$.messager.alert("提示", data, "info", function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert("提示", "保存失败", "info", function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<input type="hidden" name="productcode" value="${productcode}"/>
|
||||
<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>
|
||||
95
bin/WebRoot/jsp/process/realDetailsMaterialEdit.jsp
Normal file
95
bin/WebRoot/jsp/process/realDetailsMaterialEdit.jsp
Normal file
@ -0,0 +1,95 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsMaterial/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectMaterial(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择材料',
|
||||
width : 800,
|
||||
height : 400,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/selectBomMaterial.do?productcode=${productcode}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#materialid").val((res.materialid== 'undefined')?'':res.materialid);
|
||||
$("#materialcode").textbox('setValue',(res.materialcode == 'undefined')?'':res.materialcode);
|
||||
|
||||
$("#materialname").text((res.materialname == 'undefined')?'':res.materialname);
|
||||
$("#materialspec").text((res.spec == 'undefined')?'':res.spec);
|
||||
$("#unit").text((res.unit == 'undefined')?'':res.unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#materialcode").textbox("textbox").bind("click",function(){
|
||||
selectMaterial();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${realDetailsMaterial.id}"/>
|
||||
<input type="hidden" name="productcode" value="${productcode}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
<td>
|
||||
<input id="materialid" name="materialid" type="hidden" value="${realDetailsMaterial.materialid }"/>
|
||||
<input id="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank',editable:false" value="${realDetailsMaterial.material.materialcode }" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td>
|
||||
<label id="materialname">${realDetailsMaterial.material.materialname }</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料规格</th>
|
||||
<td>
|
||||
<label id="materialname">${realDetailsMaterial.material.spec }</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料数量</th>
|
||||
<td>
|
||||
<input id="amount" name="amount" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${realDetailsMaterial.amount}" />
|
||||
<label id="unit">${realDetailsMaterial.material.unit}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
254
bin/WebRoot/jsp/process/realDetailsMaterialList.jsp
Normal file
254
bin/WebRoot/jsp/process/realDetailsMaterialList.jsp
Normal file
@ -0,0 +1,254 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '添加物料',
|
||||
url : ext.contextPath + '/process/realDetailsMaterial/add.do?pid=${param.pid}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '编辑物料',
|
||||
url : ext.contextPath + '/process/realDetailsMaterial/edit.do?id=' + id+'&?pid=${param.pid}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsMaterial/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsMaterial/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/realDetailsMaterial/getlist.do?pid=${param.pid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '180', title : '物料编码', field : 'material', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return value.materialcode;
|
||||
}},
|
||||
{width : '220', title : '物料名称', field : 'materialname', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.material.materialname;
|
||||
}},
|
||||
{width : '150', title : '物料规格', field : 'materialspec', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.material.spec;
|
||||
}},
|
||||
{width : '100', title : '物料数量', field : 'amount', sortable : false, halign:'center',
|
||||
editor:{type:'numberbox',options:{precision:1 }}
|
||||
},
|
||||
{width : '100', title : '单位', field : 'unit', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.material.unit;
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '70', halign:'center', align:'center', formatter : function(value, row,rowIndex) {
|
||||
var str = '';
|
||||
// <%if (sessionManager.havePermission(session,"process/real/edit.do")) {%>
|
||||
// str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
str += '<img class="iconImg ext-icon-table_save" title="保存" onclick="saveFun(\''+row.id+'\',\''+rowIndex+'\');"/>';
|
||||
// <%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
onClickCell: function (rowIndex, field, value) {
|
||||
beginEditing(rowIndex, field, value);
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
},
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
var editIndex = undefined;
|
||||
var beginEditing = function (rowIndex, field, value) {
|
||||
if (field != "amount" )
|
||||
{
|
||||
if(editIndex!=undefined)
|
||||
{
|
||||
$('#grid').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (rowIndex != editIndex) {
|
||||
if (endEditing()) {
|
||||
$('#grid').datagrid('beginEdit', rowIndex);
|
||||
editIndex = rowIndex;
|
||||
|
||||
var ed = $('#grid').datagrid('getEditor', { index: rowIndex, field: 'amount' });
|
||||
$(ed.target).focus().bind('blur', function () {
|
||||
endEditing();
|
||||
});
|
||||
} else {
|
||||
$('#grid').datagrid('selectRow', editIndex);
|
||||
}
|
||||
}
|
||||
};
|
||||
var endEditing = function () {
|
||||
if (editIndex == undefined)
|
||||
{ return true; }
|
||||
if ($('#grid').datagrid('validateRow', editIndex)) {
|
||||
var ed = $('#grid').datagrid('getEditor', { index: editIndex, field: 'amount' });
|
||||
var number = $(ed.target).numberbox('getValue');
|
||||
$('#grid').datagrid('getRows')[editIndex]['amount'] = number;
|
||||
$('#grid').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var updateFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getRows');
|
||||
var datas="";
|
||||
var amounts="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
if(item.amount==null || item.amount==""){
|
||||
amounts+="0,";
|
||||
}else{
|
||||
var editor = $('#grid').datagrid('getEditor', {index:index,field:"amount"});
|
||||
if(editor!=null&&editor!=undefined){
|
||||
var editAmount = editor.target.val();
|
||||
amounts+=editAmount+",";
|
||||
}else{
|
||||
amounts+=item.amount+",";
|
||||
}
|
||||
}
|
||||
});
|
||||
$.post(ext.contextPath + '/process/realDetailsMaterial/updateamount.do', {ids:datas,amounts:amounts} , function(data) {
|
||||
if(data != ""){
|
||||
top.$.messager.alert("提示", data, "info", function() {
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert("提示", "保存失败", "info", function() {
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var saveFun = function(id,index) {
|
||||
var editor = $('#grid').datagrid('getEditor', {index:index,field:"amount"});
|
||||
if(editor!=null&&editor!=undefined){
|
||||
var amount = editor.target.val();
|
||||
$.post(ext.contextPath + '/process/realDetailsMaterial/saveamount.do', {id:id,amount:amount} , function(data) {
|
||||
if(data != ""){
|
||||
top.$.messager.alert("提示", data, "info", function() {
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert("提示", "保存失败", "info", function() {
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert("提示", "请输入要修改的数量", "info");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/real/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/edit.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true"
|
||||
onclick="updateFun();">保存</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</body>
|
||||
</html>
|
||||
41
bin/WebRoot/jsp/process/realDetailsSnakerList.jsp
Normal file
41
bin/WebRoot/jsp/process/realDetailsSnakerList.jsp
Normal file
@ -0,0 +1,41 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title>流程定义</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
|
||||
<script src="<%=contextPath%>/JS/raphael-min.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/extends/snaker.designer.select.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.model.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var json="${process }";
|
||||
var model;
|
||||
if(json) {
|
||||
model=eval("(" + json + ")");
|
||||
} else {
|
||||
model="";
|
||||
}
|
||||
$('#snakerflow').snakerflow({
|
||||
basePath : ext.contextPath+"/JS/snaker/",
|
||||
restore : model,
|
||||
title:"",
|
||||
modalDialogWidth:"1000",
|
||||
modalDialogHeight:"600",
|
||||
url:ext.contextPath + "/process/realDetails/edit.do?pid=${param.id}"
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="snakerflow"></div>
|
||||
</body>
|
||||
</html>
|
||||
49
bin/WebRoot/jsp/process/realDetailsStepAdd.jsp
Normal file
49
bin/WebRoot/jsp/process/realDetailsStepAdd.jsp
Normal file
@ -0,0 +1,49 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsStep/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="pid" value="${param.pid}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<td>
|
||||
<input name="ord" class="easyui-numberspinner" data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>步骤内容</th>
|
||||
<td>
|
||||
<input name="content" class="easyui-textbox" style="width:300%;height:100px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
47
bin/WebRoot/jsp/process/realDetailsStepEdit.jsp
Normal file
47
bin/WebRoot/jsp/process/realDetailsStepEdit.jsp
Normal file
@ -0,0 +1,47 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsStep/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${realDetailsStep.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<td>
|
||||
<input name="ord" class="easyui-numberspinner" data-options="required:true,validType:'isBlank'" value="${realDetailsStep.ord}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>步骤内容</th>
|
||||
<td>
|
||||
<textarea name="content" class="easyui-textbox" data-options="multiline:true" style="height:100px;width:300px">${realDetailsStep.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
142
bin/WebRoot/jsp/process/realDetailsStepList.jsp
Normal file
142
bin/WebRoot/jsp/process/realDetailsStepList.jsp
Normal file
@ -0,0 +1,142 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '添加工序步骤',
|
||||
url : ext.contextPath + '/process/realDetailsStep/add.do?pid=${param.pid}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '编辑工序步骤',
|
||||
url : ext.contextPath + '/process/realDetailsStep/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsStep/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsStep/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/realDetailsStep/getlist.do?pid=${param.pid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '30', title : '序号', field : 'ord', sortable : true, halign:'center'},
|
||||
{width : '400', title : '步骤内容', field : 'content', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '70', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/real/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/real/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</body>
|
||||
</html>
|
||||
103
bin/WebRoot/jsp/process/realDetailsWorkstationAdd.jsp
Normal file
103
bin/WebRoot/jsp/process/realDetailsWorkstationAdd.jsp
Normal file
@ -0,0 +1,103 @@
|
||||
<%@ 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 + '/process/realDetailsWorkstation/getTaskWorkstation.do?pid=${param.pid}',
|
||||
striped : true,
|
||||
pagination : true,
|
||||
rownumbers : true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '180', title : '工位编号', field : 'serial', sortable : true, halign:'center'},
|
||||
{width : '180', title : '工位名称', field : 'name', sortable : true, halign:'center'},
|
||||
{width : '80', title : '工位类型', field : 'typename', sortable : true, halign:'center'},
|
||||
{width : '120', title : '所属车间', field : 'deptname', sortable : true, halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
if(data){
|
||||
$.post(ext.contextPath + '/process/realDetailsWorkstation/getlist1.do?pid=${param.pid}',
|
||||
function(result){
|
||||
$.each(result.rows,function(i,obj){
|
||||
$.each(data.rows, function(index, item){
|
||||
if(item.workstationid==obj.workstationid){
|
||||
$('#grid').datagrid('checkRow', index);
|
||||
}
|
||||
});
|
||||
});
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function dosave(dialog, grid) {
|
||||
var widstr = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
widstr += rows[i].workstationid+",";
|
||||
}
|
||||
if(widstr.length>0){
|
||||
widstr = widstr.substring(0,widstr.length-1);
|
||||
}
|
||||
$.post(ext.contextPath + "/process/realDetailsWorkstation/save.do", {wids:widstr,pid:'${param.pid}'}, function(data, textStatus) {
|
||||
if(data != ""){
|
||||
top.$.messager.alert("提示", data, "info", function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert("提示", "保存失败", "info", function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</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 id="search_name" 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="$('#search_name').textbox('setValue','');$('#search_line').combobox('setValue','');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="grid" data-options="fit:true,border:false"></div>
|
||||
</body>
|
||||
</html>
|
||||
101
bin/WebRoot/jsp/process/realDetailsWorkstationEdit.jsp
Normal file
101
bin/WebRoot/jsp/process/realDetailsWorkstationEdit.jsp
Normal file
@ -0,0 +1,101 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/realDetailsWorkstation/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectWorkStation(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择材料',
|
||||
width : 800,
|
||||
height : 480,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/work/workstation/showlistForSelect.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#workstationid").val((res.id== 'undefined')?'':res.id);
|
||||
|
||||
$("#workstationserial").textbox('setValue',(res.serial == 'undefined')?'':res.serial);
|
||||
|
||||
$("#workstationname").text((res.name == 'undefined')?'':res.name);
|
||||
$("#typename").text((res.typename == 'undefined')?'':res.typename);
|
||||
$("#deptname").text((res.deptname == 'undefined')?'':res.deptname);
|
||||
$("#linename").text((res.linename == 'undefined')?'':res.linename);
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#workstationserial").textbox("textbox").bind("click",function(){
|
||||
selectWorkStation();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${realDetailsWorkstation.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>工位编号</th>
|
||||
<td>
|
||||
<input id="workstationid" name="workstationid" type="hidden" value="${realDetailsWorkstation.id}" />
|
||||
<input id="workstationserial" name="workstationserial" class="easyui-textbox" data-options="required:true,validType:'isBlank',editable:false" value="${realDetailsWorkstation.workstation.serial}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工位名称</th>
|
||||
<td>
|
||||
<label id="workstationname">${realDetailsWorkstation.workstation.name}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工位类型</th>
|
||||
<td>
|
||||
<label id="typename">${realDetailsWorkstation.workstation.typename}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>所属车间</th>
|
||||
<td>
|
||||
<label id="deptname">${realDetailsWorkstation.workstation.deptname}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>所属产线</th>
|
||||
<td>
|
||||
<label id="linename">${realDetailsWorkstation.workstation.linename}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
158
bin/WebRoot/jsp/process/realDetailsWorkstationList.jsp
Normal file
158
bin/WebRoot/jsp/process/realDetailsWorkstationList.jsp
Normal file
@ -0,0 +1,158 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '选择工位',
|
||||
width : 800,
|
||||
height : 480,
|
||||
resizable:true,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/process/realDetailsWorkstation/add.do?pid=${param.pid}',
|
||||
buttons : [ {
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '编辑工位',
|
||||
url : ext.contextPath + '/process/realDetailsWorkstation/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsWorkstation/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/realDetailsWorkstation/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/realDetailsWorkstation/getlist.do?pid=${param.pid}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '工位编号', field : 'workstation', sortable : false, halign:'center',formatter : function(value, row) {
|
||||
return value.serial;
|
||||
}},
|
||||
{width : '100', title : '工位名称', field : 'name', sortable : false, halign:'center',formatter : function(value, row) {
|
||||
return row.workstation.name;
|
||||
}},
|
||||
{width : '100', title : '工位类型', field : 'typename', sortable : false, halign:'center',formatter : function(value, row) {
|
||||
return row.workstation.typename;
|
||||
}},
|
||||
{width : '120', title : '所属车间', field : 'deptname', sortable : false, halign:'center',formatter : function(value, row) {
|
||||
return row.workstation.deptname;
|
||||
}},
|
||||
|
||||
{title : '操作', field : 'action', width : '70', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/real/edit.do")) {%>
|
||||
//str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/real/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</body>
|
||||
</html>
|
||||
125
bin/WebRoot/jsp/process/realEdit.jsp
Normal file
125
bin/WebRoot/jsp/process/realEdit.jsp
Normal file
@ -0,0 +1,125 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/real/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectMaterial(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择产品',
|
||||
width : 800,
|
||||
height : 400,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/selectMaterial.do?typename='+encodeURI(encodeURI("成品")),
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#productid").val((res.materialid== 'undefined')?'':res.materialid);
|
||||
$("#productcode").textbox('setValue',(res.materialcode == 'undefined')?'':res.materialcode);
|
||||
$("#productname").text((res.materialname == 'undefined')?'':res.materialname);
|
||||
$("#productspec").text((res.spec == 'undefined')?'':res.spec);
|
||||
setName();
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
function setName(){
|
||||
$("#name").textbox("setValue",$("#productname").text()+$("#processname").text());
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#productcode").textbox("textbox").bind("click",function(){
|
||||
selectMaterial();
|
||||
});
|
||||
|
||||
/* $("#lineid").combobox({
|
||||
url : ext.contextPath + '/work/line/getSelectList.do?random=' + Math.random(),
|
||||
valueField : 'id',
|
||||
textField : 'name',
|
||||
method:'get',
|
||||
width:250,
|
||||
panelHeight:'auto',
|
||||
editable:false
|
||||
}); */
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input name="id" type="hidden" value="${real.id}" />
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>产品编码</th>
|
||||
<td>
|
||||
<input id="productid" name="productid" type="hidden" value="${real.productid}"/>
|
||||
<input id="productcode" name="productcode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank',editable:false" value="${real.product.materialcode}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品名称</th>
|
||||
<td>
|
||||
<label id="productname">${real.product.materialname}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品规格</th>
|
||||
<td>
|
||||
<label id="productspec">${real.product.spec}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工艺路线</th>
|
||||
<td>
|
||||
<label id="processname">${real.process.display_Name} [V${real.process.version}]</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品工艺名称</th>
|
||||
<td>
|
||||
<input id="name" name="name" class="easyui-textbox" data-options="required:true,validType:'isBlank',width:400" value="${real.name}" />
|
||||
</td>
|
||||
</tr>
|
||||
<%-- <tr>
|
||||
<th>所属产线</th>
|
||||
<td><input id="lineid" name="lineid" class="easyui-combotree"
|
||||
data-options="required:true,validType:'isBlank'" value="${real.lineid}" />
|
||||
</td>
|
||||
</tr> --%>
|
||||
<tr>
|
||||
<th>描述</th>
|
||||
<td>
|
||||
<textarea name="description" class="easyui-textbox"
|
||||
data-options="multiline:true" style="height:100px;width:300px" validtype="length[0,250]" invalidMessage="有效长度0-250" >${real.description}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
194
bin/WebRoot/jsp/process/realList.jsp
Normal file
194
bin/WebRoot/jsp/process/realList.jsp
Normal file
@ -0,0 +1,194 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加产品工艺',
|
||||
url : ext.contextPath + '/process/real/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑产品工艺',
|
||||
url : ext.contextPath + '/process/real/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/real/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/real/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/real/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '300', title : '名称', field : 'name', sortable : true, halign:'center'},
|
||||
{width : '150', title : '工艺路线', field : 'process', sortable : false, halign:'center',formatter:function(value, row){
|
||||
if(value !=null){
|
||||
return value.display_Name+" [V"+value.version+"]";
|
||||
}
|
||||
}},
|
||||
/* {width : '200', title : '所属产线', field : 'line', sortable : false, halign:'center',formatter:function(value, row){
|
||||
if(value !=null){
|
||||
return "["+value.serial+"] "+value.name;
|
||||
}
|
||||
}}, */
|
||||
{width : '150', title : '产品编码', field : 'product', sortable : false, halign:'center',formatter:function(value, row){
|
||||
if(value !=null){
|
||||
return value.materialcode;
|
||||
}
|
||||
}},
|
||||
{width : '200', title : '产品名称', field : 'productname', sortable : false, halign:'center',formatter:function(value, row){
|
||||
if(row.product !=null){
|
||||
return row.product.materialname;
|
||||
}
|
||||
}},
|
||||
{width : '150', title : '产品规格', field : 'productspec', sortable : false, halign:'center',formatter:function(value, row){
|
||||
if(row.product !=null){
|
||||
return row.product.spec;
|
||||
}
|
||||
}},
|
||||
{width : '200', title : '描述', field : 'description', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '70', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/real/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
str += '<img class="iconImg ext-icon-chart_organisation" title="工序" onclick="showdetailFun(\''+row.id+'\',\''+row.name+'\');"/>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var showdetailFun = function(id,name) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : name,
|
||||
url : ext.contextPath + '/process/realDetails/showsnakerlist.do?id=' + id,
|
||||
width:1300,
|
||||
height:700
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/real/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
<td>名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" style="width: 180px;" /></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>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</body>
|
||||
</html>
|
||||
41
bin/WebRoot/jsp/process/snakerTaskList.jsp
Normal file
41
bin/WebRoot/jsp/process/snakerTaskList.jsp
Normal file
@ -0,0 +1,41 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title>流程定义</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
|
||||
<script src="<%=contextPath%>/JS/raphael-min.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/extends/snaker.designer.select.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.model.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var json="${process }";
|
||||
var model;
|
||||
if(json) {
|
||||
model=eval("(" + json + ")");
|
||||
} else {
|
||||
model="";
|
||||
}
|
||||
$('#snakerflow').snakerflow({
|
||||
basePath : ext.contextPath+"/JS/snaker/",
|
||||
restore : model,
|
||||
title:"工序",
|
||||
modalDialogWidth:"1000",
|
||||
modalDialogHeight:"600",
|
||||
url:ext.contextPath + "/process/worktask/configSnakerTask.do?pid=${param.id}"
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="snakerflow"></div>
|
||||
</body>
|
||||
</html>
|
||||
172
bin/WebRoot/jsp/process/staffDeployList.jsp
Normal file
172
bin/WebRoot/jsp/process/staffDeployList.jsp
Normal file
@ -0,0 +1,172 @@
|
||||
<%@ 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>
|
||||
<style>
|
||||
.bottomDiv{
|
||||
position:fixed;
|
||||
bottom:0;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function saveforeditFun(dialog) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/taskprocedure/saveProcedureStaff.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function deployFun(chiefid,iframeId){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '成员资质配置',
|
||||
width: 1000,
|
||||
height: 500,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/process/taskprocedure/deployUserSkill.do?iframeId='+iframeId+'&chiefid='+chiefid,
|
||||
});
|
||||
}
|
||||
|
||||
function selectChief(chief,chiefid){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择科长',
|
||||
width: 600,
|
||||
height:550,
|
||||
url : ext.contextPath + '/process/taskprocedure/selectChief.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
$("#"+chief).textbox('setValue',res.username);//easyui textbox赋值jquery不一样
|
||||
$("#"+chiefid).val(res.userid);
|
||||
//$("#div_product").panel('close');
|
||||
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
function selectLeader(leader,leaderid){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择班长',
|
||||
width:600,
|
||||
height:550,
|
||||
url : ext.contextPath + '/process/taskprocedure/selectLeader.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
$("#"+leader).textbox('setValue',res.username);//easyui textbox赋值jquery不一样
|
||||
$("#"+leaderid).val(res.userid);
|
||||
//$("#div_product").panel('close');
|
||||
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#leader").textbox('textbox').bind("click", function () {
|
||||
selectLeader("leader","leaderid");
|
||||
});
|
||||
|
||||
$("#chief").textbox('textbox').bind("click", function () {
|
||||
selectChief("chief","chiefid");
|
||||
});
|
||||
|
||||
$('#deployBtn').bind("click",function(){
|
||||
deployFun($("#chiefid").val(),"${param.iframeId}");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="pool" class="easyui-panel" title="班组长配置"
|
||||
style="width:350px;height:170px;padding:10px;background:#fafafa;">
|
||||
<form method="post" class="form">
|
||||
<table>
|
||||
<tr>
|
||||
<td>工 序: </td>
|
||||
<td><input name="procedurename" class="easyui-textbox" disabled="disabled" value="${taskprocedure.procedurename} " />
|
||||
<input id="procedureid" name="procedureid" type="hidden" value="${taskprocedure.id} " /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>班 长: </td>
|
||||
<td><input id="leader" name="leader" class="easyui-textbox" data-options="prompt:'单击选择'" readonly value="${taskprocedurestaff.leader}"/>
|
||||
<input id="leaderid" name="leaderid" type="hidden" value="${taskprocedurestaff.leaderid}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>科 长:</td>
|
||||
<td><input id="chief" name="chief" class="easyui-textbox" data-options="prompt:'单击选择'" readonly value="${taskprocedurestaff.chief}"/>
|
||||
<input id="chiefid" name="chiefid" type="hidden" value="${taskprocedurestaff.chiefid}"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input id="id" name="id" type="hidden" value="${taskprocedurestaff.id} " />
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<div id="pool" class="easyui-panel"
|
||||
style="width:350px;height:57px;padding:10px;background:#fafafa;">
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="javascript:void(0);" id ="deployBtn" class="easyui-linkbutton" data-options="iconCls:'ext-icon-user_suit',plain:true" >成员资质配置</a></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-layout_edit',plain:true"
|
||||
onclick="saveforeditFun();">修改</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="bottomDiv">
|
||||
<div style="width:160px;float:left">
|
||||
<span style="font-size:12px">操作员:${name}</span>
|
||||
</div>
|
||||
<div style="width:160px; float:left">
|
||||
<span style="font-size:12px">工位:</span>
|
||||
</div>
|
||||
<div style="width:160px;float:right">
|
||||
<span style="font-size:12px">系统时间:${systime}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
105
bin/WebRoot/jsp/process/staffPoolList.jsp
Normal file
105
bin/WebRoot/jsp/process/staffPoolList.jsp
Normal file
@ -0,0 +1,105 @@
|
||||
<%@ 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;
|
||||
|
||||
var procedureEditFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑单元池',
|
||||
width: '70%',
|
||||
height: '70%',
|
||||
url : ext.contextPath + '/process/taskprocedure/editProcedure.do',
|
||||
});
|
||||
};
|
||||
|
||||
var staffDeployFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '人员配置',
|
||||
width: '40%',
|
||||
height: '55%',
|
||||
url : ext.contextPath + '/process/taskprocedure/staffDeploy.do?id=' + id,
|
||||
});
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/taskprocedure/getStaffPool.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '工序名称', field : 'procedurename', sortable : true, halign:'center'},
|
||||
{width : '150', title : '工序编号', field : 'procedurecode', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/staffDeploy.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_key" title="人员配置" onclick="staffDeployFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<input name="idStr" type="hidden" />
|
||||
<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>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/procedureEdit.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'iconImg ext-icon-table_edit',plain:true"
|
||||
onclick="procedureEditFun();">单元池编辑</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>
|
||||
51
bin/WebRoot/jsp/process/staffSkillAdd.jsp
Normal file
51
bin/WebRoot/jsp/process/staffSkillAdd.jsp
Normal file
@ -0,0 +1,51 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/staffskill/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>资质名称</th>
|
||||
<td><input id="name" name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>属性名称</th>
|
||||
<td>
|
||||
<input id="property" name="property" class="easyui-textbox" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
47
bin/WebRoot/jsp/process/staffSkillEdit.jsp
Normal file
47
bin/WebRoot/jsp/process/staffSkillEdit.jsp
Normal file
@ -0,0 +1,47 @@
|
||||
<!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"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/staffskill/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${staffskill.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>资质名称</th>
|
||||
<td><input id="name" name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${staffskill.name}" /></td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<th>属性名称</th>
|
||||
<td><input id="property" name="property" class="easyui-textbox"
|
||||
value="${staffskill.property}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
170
bin/WebRoot/jsp/process/staffSkillList.jsp
Normal file
170
bin/WebRoot/jsp/process/staffSkillList.jsp
Normal file
@ -0,0 +1,170 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加资质信息',
|
||||
width: 600,
|
||||
height: 400,
|
||||
url : ext.contextPath + '/process/staffskill/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑资质信息',
|
||||
width: 600,
|
||||
height: 400,
|
||||
url : ext.contextPath + '/process/staffskill/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/staffskill/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/staffskill/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/staffskill/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '资质名称', field : 'name', sortable : true, halign:'center'},
|
||||
{width : '150', title : '属性名称', field : 'property', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<input name="idStr" type="hidden" />
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>资质名称</td>
|
||||
<td><input name="search_name" 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>
|
||||
65
bin/WebRoot/jsp/process/staffSkillView.jsp
Normal file
65
bin/WebRoot/jsp/process/staffSkillView.jsp
Normal file
@ -0,0 +1,65 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.process.TaskProcedure"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%request.setAttribute("Type_Inspect",TaskProcedure.Type_Inspect);%>
|
||||
<%request.setAttribute("Type_Produce",TaskProcedure.Type_Produce);%>
|
||||
<%request.setAttribute("Flag_Semi",TaskProcedure.Flag_Semi);%>
|
||||
<%
|
||||
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() {
|
||||
console.log("gid","${groupId}");
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/staffskill/getStaffSkillList.do?groupId=${groupId}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '资质名称', field : 'name', sortable : true,align:'center', halign:'center'},
|
||||
{width : '100', title : '资质人数(该班组)',field : 'usernum',align:'center', halign:'center'},
|
||||
{width : '370', title : '资质人员(该班组)', field : 'taskprocedureSkill', sortable : true, align:'center',halign:'center',formatter : function(value, row) {
|
||||
var user = '';
|
||||
if(row.taskprocedureSkill != "")
|
||||
{
|
||||
for(var i=0, len=row.taskprocedureSkill.length; i<len; i++)
|
||||
if(i==0)
|
||||
{
|
||||
user = row.taskprocedureSkill[i].username;
|
||||
}else{
|
||||
user = user+" , "+row.taskprocedureSkill[i].username;
|
||||
}
|
||||
}
|
||||
return user;
|
||||
}},
|
||||
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
116
bin/WebRoot/jsp/process/taskEquipmentAdd.jsp
Normal file
116
bin/WebRoot/jsp/process/taskEquipmentAdd.jsp
Normal file
@ -0,0 +1,116 @@
|
||||
<%@ 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() {
|
||||
var checkeditems = [];
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url: ext.contextPath + '/process/taskequipment/getchecklist.do?pid='+'${pid}'+'&taskname='+'${taskname}'+'&random='+Math.random(),
|
||||
data: '',
|
||||
success: function (result) {
|
||||
if(result.length>0){
|
||||
checkeditems=result.split(",");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/equipment/getEquipmentCard.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '80', title : '设备编号', field : 'equipmentcardid', sortable : true, halign:'center'},
|
||||
{width : '150', title : '设备名称', field : 'equipmentname', sortable : true, halign:'center'},
|
||||
{width : '100', title : '设备型号', field: 'equipmentmodel', sortable : true, halign:'center'},
|
||||
{width : '100', title : '设备类型', field: 'equipmentclass', sortable : true, halign:'center',formatter:function(value){
|
||||
return value.name;
|
||||
} },
|
||||
{width : '100', title : '存放位置', field: 'geographyarea', sortable : true, halign:'center',formatter:function(value){
|
||||
return value.name;
|
||||
}},
|
||||
{width : '80', title : '管理状态', field: 'currentmanageflag', sortable : true, halign:'center'},
|
||||
{width : '100', title : '备注', field : 'remark', sortable : true, halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
if(data){
|
||||
$.each(data.rows, function(index, item){
|
||||
if(checkeditems.indexOf(item.id)>-1){
|
||||
$('#grid').datagrid('checkRow', index);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
function dosave(dialog, grid) {
|
||||
|
||||
var eidstr = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
eidstr += rows[i].id+",";
|
||||
}
|
||||
if(eidstr.length>0){
|
||||
eidstr = eidstr.substring(0,eidstr.length-1);
|
||||
}
|
||||
$.post(ext.contextPath + "/process/taskequipment/save.do", {eids:eidstr,pid:'${pid}',taskname:'${taskname}'}, function(data) {
|
||||
if (data.res != "") {
|
||||
top.$.messager.alert('提示', data.res, 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示', "操作无效", 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
</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>
|
||||
140
bin/WebRoot/jsp/process/taskEquipmentList.jsp
Normal file
140
bin/WebRoot/jsp/process/taskEquipmentList.jsp
Normal file
@ -0,0 +1,140 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '添加设备',
|
||||
url : ext.contextPath + '/process/taskequipment/add.do?pid=${param.pid}&taskname=${taskname}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskequipment/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskequipment/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/taskequipment/getlist.do?pid=${param.pid}&taskname=${taskname}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '200', title : '设备编号', field : 'equipmentcardid', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.equipmentCard.equipmentcardid;
|
||||
}},
|
||||
{width : '320', title : '设备名称', field : 'equipmentname', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.equipmentCard.equipmentname;
|
||||
}},
|
||||
{width : '180', title : '设备型号', field : 'equipmentmodel', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.equipmentCard.equipmentmodel;
|
||||
}},
|
||||
{width : '80', title : '管理状态', field: 'currentmanageflag', sortable : true, halign:'center',formatter:function(value,row){
|
||||
return row.equipmentCard.currentmanageflag;
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '100', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/taskmaterial/add.do")) {%>
|
||||
<%}%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
|
||||
<%if (sessionManager.havePermission(session,"process/taskmaterial/delete.do")) {%>
|
||||
<%}%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</body>
|
||||
</html>
|
||||
130
bin/WebRoot/jsp/process/taskMaterialAdd.jsp
Normal file
130
bin/WebRoot/jsp/process/taskMaterialAdd.jsp
Normal file
@ -0,0 +1,130 @@
|
||||
<%@ 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() {
|
||||
var checkeditems = [];
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url: ext.contextPath + '/process/taskmaterial/getchecklist.do?pid='+'${pid}'+'&taskname='+'${taskname}'+'&random='+Math.random(),
|
||||
data: '',
|
||||
success: function (result) {
|
||||
if(result.length>0){
|
||||
checkeditems=result.split(",");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/material/materialinfo/getMaterialInfos.do?typename=1',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '物料编码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '180', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '100', title : '图号', field : 'D.number', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(row.figure!=null){
|
||||
return row.figure.number;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '80', title : '图名', field : 'D.docname', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(row.figure!=null){
|
||||
return row.figure.docname;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '100', title : '规格参数', field : 'spec', sortable : true, halign:'center'},
|
||||
{width : '80', title : '类型', field : 'materialtype', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value!=null){
|
||||
return value.typename;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}},
|
||||
{width : '60', title : '单位', field : 'unit', sortable : true, halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
if(data){
|
||||
$.each(data.rows, function(index, item){
|
||||
if(checkeditems.indexOf(item.id)>-1){
|
||||
$('#grid').datagrid('checkRow', index);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
function dosave(dialog, grid) {
|
||||
|
||||
var midstr = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
midstr += rows[i].id+",";
|
||||
}
|
||||
if(midstr.length>0){
|
||||
midstr = midstr.substring(0,midstr.length-1);
|
||||
}
|
||||
$.post(ext.contextPath + "/process/taskmaterial/save.do", {mids:midstr,pid:'${pid}',taskname:'${taskname}'}, function(data) {
|
||||
if (data.res != "") {
|
||||
top.$.messager.alert('提示', data.res, 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示', "操作无效", 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
</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>
|
||||
137
bin/WebRoot/jsp/process/taskMaterialList.jsp
Normal file
137
bin/WebRoot/jsp/process/taskMaterialList.jsp
Normal file
@ -0,0 +1,137 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '添加物料',
|
||||
url : ext.contextPath + '/process/taskmaterial/add.do?pid=${param.pid}&taskname=${taskname}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskmaterial/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskmaterial/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/taskmaterial/getlist.do?pid=${param.pid}&taskname=${taskname}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '200', title : '物料编码', field : 'materialcode', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.materialInfo.materialcode;
|
||||
}},
|
||||
{width : '400', title : '物料名称', field : 'materialname', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.materialInfo.materialname;
|
||||
}},
|
||||
{width : '180', title : '物料规格', field : 'materialspec', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.materialInfo.spec;
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '100', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/taskmaterial/add.do")) {%>
|
||||
<%}%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
|
||||
<%if (sessionManager.havePermission(session,"process/taskmaterial/delete.do")) {%>
|
||||
<%}%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</body>
|
||||
</html>
|
||||
184
bin/WebRoot/jsp/process/taskProcedureAdd.jsp
Normal file
184
bin/WebRoot/jsp/process/taskProcedureAdd.jsp
Normal file
@ -0,0 +1,184 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@page import="com.sipai.entity.process.TaskProcedure"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%request.setAttribute("Type_Inspect",TaskProcedure.Type_Inspect);%>
|
||||
<%request.setAttribute("Type_Produce",TaskProcedure.Type_Produce);%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/taskprocedure/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
console.log("getWids()",getWids());
|
||||
$.post(ext.contextPath + "/process/taskprocedure/saveWorkstation.do",{procedureid:data.id,wids:getWids()},function(data1){
|
||||
if(JSON.parse(data1).res>0)
|
||||
{
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}
|
||||
else if(JSON.parse(data1).res == 0){
|
||||
top.$.messager.alert('提示', "工序已保存,工位未添加", 'info');
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data1.res, 'info');
|
||||
}
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function getWids(){
|
||||
var wrows= $('#grid').datagrid("getRows");
|
||||
var wids="";
|
||||
$.each(wrows, function(index, item){
|
||||
wids+=item.id+",";
|
||||
});
|
||||
wids=wids.replace(/,$/gi,"");
|
||||
return wids;
|
||||
}
|
||||
function doadd_W(){
|
||||
|
||||
$("#wids").val(getWids());
|
||||
localStorage.setItem("wids",$("#wids").val().split(","));
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加工位',
|
||||
height:500,
|
||||
url : ext.contextPath + '/process/taskprocedure/showlistForSelects.do',
|
||||
buttons : [ {
|
||||
iconCls:'icon-ok',
|
||||
text : '确认',
|
||||
handler : function() {
|
||||
var data = dialog.find('iframe').get(0).contentWindow.selectFun(dialog, grid);
|
||||
if(data.res.length>0){
|
||||
for(var i=0;i<data.res.length;i++){
|
||||
grid.datagrid('appendRow',{
|
||||
id:data.res[i].id,
|
||||
serial:data.res[i].serial,
|
||||
name:data.res[i].name,
|
||||
typename:data.res[i].typename,
|
||||
deptname:data.res[i].deptname
|
||||
});
|
||||
}
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
}
|
||||
function dodelete_W(){
|
||||
var rows = $('#grid').datagrid('getChecked');
|
||||
if(rows.length==0){
|
||||
top.$.messager.alert("提示","请选择需要删除的数据","info");
|
||||
}else{
|
||||
top.$.messager.confirm("提示", "确定删除这些数据?", function(r) {
|
||||
if (r) {
|
||||
//复制rows,否则deleteRow的index会出错
|
||||
var copyRows = [];
|
||||
for ( var j= 0; j < rows.length; j++) {
|
||||
copyRows.push(rows[j]);
|
||||
}
|
||||
|
||||
$.each(copyRows, function(index, item){
|
||||
$('#grid').datagrid('deleteRow',$('#grid').datagrid('getRowIndex',copyRows[index]));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#p').panel({
|
||||
width:"100%",
|
||||
height:"170",
|
||||
title: '相关工位',
|
||||
tools: [{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){doadd_W();}
|
||||
},{
|
||||
iconCls:'icon-remove',
|
||||
handler:function(){dodelete_W();}
|
||||
}]
|
||||
|
||||
});
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
idField : 'id',
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '140', title : '工位编号', field : 'serial', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '180', title : '工位名称', field : 'name', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '100', title : '工位类型', field : 'typename', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '180', title : '所属车间', field : 'deptname', sortable : true, editor:'textbox',halign:'center'}
|
||||
] ]
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input id="wids" name="wids" type="hidden" value="" />
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>工序名称</th>
|
||||
<td><input id="procedurename" name="procedurename" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" /></td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<th>工序编码(必须以字母开头)</th>
|
||||
<td>
|
||||
<input id="procedurecode" name="procedurecode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>关键字(用“;”隔开)</th>
|
||||
<td>
|
||||
<input name="keywords" class="easyui-textbox" style="height:100px;width:300px"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>type</th>
|
||||
<td>
|
||||
<select name="type" class="easyui-combobox" data-options="panelHeight:'auto',editable:false,value:'${Type_Produce}'">
|
||||
<option value="${Type_Produce}">生产</option>
|
||||
<option value="${Type_Inspect}">检测</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>半成品生成工序</th>
|
||||
<td>
|
||||
<select name="semiflag" class="easyui-combobox" data-options="panelHeight:'auto',editable:false,value:'0'">
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div id="p">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
189
bin/WebRoot/jsp/process/taskProcedureEdit.jsp
Normal file
189
bin/WebRoot/jsp/process/taskProcedureEdit.jsp
Normal file
@ -0,0 +1,189 @@
|
||||
<!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"%>
|
||||
<%@page import="com.sipai.entity.process.TaskProcedure"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%request.setAttribute("Type_Inspect",TaskProcedure.Type_Inspect);%>
|
||||
<%request.setAttribute("Type_Produce",TaskProcedure.Type_Produce);%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/process/taskprocedure/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$.post(ext.contextPath + "/process/taskprocedure/saveWorkstation.do",{procedureid:data.id,wids:getWids()},function(data1){
|
||||
if(JSON.parse(data1).res>0)
|
||||
{
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}
|
||||
else if(JSON.parse(data1).res == 0){
|
||||
top.$.messager.alert('提示', "工序已保存,工位未添加", 'info');
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data1.res, 'info');
|
||||
}
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
//获取已选的工位id
|
||||
function getWids(){
|
||||
var rows= $('#grid').datagrid("getRows");
|
||||
var wids="";
|
||||
$.each(rows, function(index, item){
|
||||
wids+=item.id+",";
|
||||
});
|
||||
wids=wids.replace(/,$/gi,"");
|
||||
return wids;
|
||||
}
|
||||
|
||||
function doadd_W(){
|
||||
$("#wids").val(getWids());
|
||||
localStorage.setItem("wids",$("#wids").val().split(","));
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加工位',
|
||||
height:500,
|
||||
url : ext.contextPath + '/process/taskprocedure/showlistForSelects.do?iframeId=taskProcedureEdit',
|
||||
buttons : [ {
|
||||
iconCls:'icon-ok',
|
||||
text : '确认',
|
||||
handler : function() {
|
||||
var data = dialog.find('iframe').get(0).contentWindow.selectFun(dialog, grid);
|
||||
console.log(data)
|
||||
var datas=data.res;//$.parseJSON(data);
|
||||
if(datas.length>0){
|
||||
for(var i=0;i<datas.length;i++){
|
||||
grid.datagrid('appendRow',{
|
||||
id:datas[i].id,
|
||||
serial:datas[i].serial,
|
||||
name:datas[i].name,
|
||||
typename:datas[i].typename,
|
||||
deptname:datas[i].deptname
|
||||
});
|
||||
}
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
}
|
||||
|
||||
function dodelete_W(){
|
||||
var rows = $('#grid').datagrid('getChecked');
|
||||
if(rows.length==0){
|
||||
top.$.messager.alert("提示","请选择需要删除的数据","info");
|
||||
}else{
|
||||
top.$.messager.confirm("提示", "确定删除这些数据?", function(r) {
|
||||
if (r) {
|
||||
//复制rows,否则deleteRow的index会出错
|
||||
var copyRows = [];
|
||||
for ( var j= 0; j < rows.length; j++) {
|
||||
copyRows.push(rows[j]);
|
||||
}
|
||||
|
||||
$.each(copyRows, function(index, item){
|
||||
$('#grid').datagrid('deleteRow',$('#grid').datagrid('getRowIndex',copyRows[index]));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#p').panel({
|
||||
width:"100%",
|
||||
height:"170",
|
||||
title: '相关工位',
|
||||
tools: [{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){doadd_W();}
|
||||
},{
|
||||
iconCls:'icon-remove',
|
||||
handler:function(){dodelete_W();}
|
||||
}]
|
||||
});
|
||||
|
||||
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
idField : 'id',
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '140', title : '工位编号', field : 'serial', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '180', title : '工位名称', field : 'name', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '100', title : '工位类型', field : 'typename', sortable : true, editor:'textbox',halign:'center'},
|
||||
{width : '180', title : '所属车间', field : 'deptname', sortable : true, editor:'textbox',halign:'center'}
|
||||
] ],
|
||||
data:${workstationList}
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input id="wids" name="wids" type="hidden" value="" />
|
||||
<input type="hidden" name="id" value="${taskprocedure.id }"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>工序名称</th>
|
||||
<td><input id="procedurename" name="procedurename" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${taskprocedure.procedurename}" /></td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<th>工序编码(必须以字母开头)</th>
|
||||
<td><input id="procedurecode" name="procedurecode" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${taskprocedure.procedurecode}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>关键字(用“;”隔开)</th>
|
||||
<td>
|
||||
<input name="keywords" class="easyui-textbox" style="height:100px;width:300px" value="${taskprocedure.keywords}"
|
||||
value=""data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>type</th>
|
||||
<td>
|
||||
<select name="type" class="easyui-combobox" data-options="panelHeight:'auto',editable:false,value:'${taskprocedure.type}'">
|
||||
<option value="${Type_Produce}">生产</option>
|
||||
<option value="${Type_Inspect}">检测</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>半成品生成工序</th>
|
||||
<td>
|
||||
<select name="semiflag" class="easyui-combobox" data-options="panelHeight:'auto',editable:false,value:'${taskprocedure.semiflag}'">
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div id="p">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
254
bin/WebRoot/jsp/process/taskProcedureList.jsp
Normal file
254
bin/WebRoot/jsp/process/taskProcedureList.jsp
Normal file
@ -0,0 +1,254 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.process.TaskProcedure"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%request.setAttribute("Type_Inspect",TaskProcedure.Type_Inspect);%>
|
||||
<%request.setAttribute("Type_Produce",TaskProcedure.Type_Produce);%>
|
||||
<%request.setAttribute("Flag_Semi",TaskProcedure.Flag_Semi);%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加工序信息',
|
||||
width: 800,
|
||||
height: 460,
|
||||
url : ext.contextPath + '/process/taskprocedure/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
var orderFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '工序排序',
|
||||
width: 850,
|
||||
height: 500,
|
||||
url : ext.contextPath + '/process/taskprocedure/orderTaskprocedure.do',
|
||||
});
|
||||
};
|
||||
|
||||
var materialFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加盘点物料信息',
|
||||
width: 800,
|
||||
height: 460,
|
||||
url : ext.contextPath + '/material/materialinventory/add.do?id='+id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var materialInventory = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看该工序的盘点物料',
|
||||
width: 800,
|
||||
height: 460,
|
||||
url : ext.contextPath + '/material/materialinventory/showlistmp.do?id='+id,
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑工序信息',
|
||||
width: 800,
|
||||
height: 460,
|
||||
url : ext.contextPath + '/process/taskprocedure/edit.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
/* var editFun = function(id) {
|
||||
url : ext.contextPath + '/process/taskprocedure/edit.do?id=' + id
|
||||
}; */
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskprocedure/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskprocedure/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
//同步PLM工序信息
|
||||
var synchroFun = function() {
|
||||
parent.$.messager.confirm('提示', '您确定要与PLM系统同步当前设备类型?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskprocedure/synchro.do', "" , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','同步成功','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','同步失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/taskprocedure/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '工序名称', field : 'procedurename', sortable : true, halign:'center'},
|
||||
{width : '150', title : '工序编号', field : 'procedurecode', sortable : true, halign:'center'},
|
||||
{width : '150', title : '关键字', field : 'keywords', sortable : true, halign:'center'},
|
||||
{width : '150', title : '类型', field : 'type', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
if(row.type=='${Type_Inspect}'){
|
||||
return '检测工序';
|
||||
}else{
|
||||
return '生产工序';
|
||||
}
|
||||
}},
|
||||
{width : '150', title : '半成品工序', field : 'semiflag', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
if(row.semiflag=='${Flag_Semi}'){
|
||||
return '是';
|
||||
}else{
|
||||
return '否';
|
||||
}
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
/* str += '<img class="iconImg ext-icon-table_add" title="新增盘点物料" onclick="materialFun(\''+row.id+'\');"/>';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看该工序的盘点物料" onclick="materialInventory(\''+row.id+'\');"/>'; */
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/taskprocedure/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="synchroFun();">同步</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-text_linespacing',plain:true"
|
||||
onclick="orderFun();">排序</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<input name="idStr" type="hidden" />
|
||||
<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>
|
||||
115
bin/WebRoot/jsp/process/taskProcedureListForSelects.jsp
Normal file
115
bin/WebRoot/jsp/process/taskProcedureListForSelects.jsp
Normal file
@ -0,0 +1,115 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%@page import="com.sipai.entity.process.TaskProcedure"%>
|
||||
<%request.setAttribute("Type_Inspect",TaskProcedure.Type_Inspect);%>
|
||||
<%request.setAttribute("Type_Produce",TaskProcedure.Type_Produce);%>
|
||||
<%request.setAttribute("Flag_Semi",TaskProcedure.Flag_Semi);%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function selectFun(dialog, grid) {
|
||||
//清除旧数据
|
||||
var procedrows= grid.datagrid("getRows");
|
||||
//复制rows,否则deleteRow的index会出错
|
||||
var copyRows = [];
|
||||
for ( var j= 0; j < procedrows.length; j++) {
|
||||
copyRows.push(procedrows[j]);
|
||||
}
|
||||
$.each(copyRows, function(index, item){
|
||||
grid.datagrid('deleteRow', grid.datagrid('getRowIndex',copyRows[index]));
|
||||
});
|
||||
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas += '{"id":"'+item.id +'","procedurecode":"'+item.procedurecode +'",'+
|
||||
'"procedurename":"'+item.procedurename +'","keywords":"'+item.keywords +'",'+
|
||||
'"type":"'+item.type +'","semiflag":"'+item.semiflag +'"},';
|
||||
});
|
||||
datas = '{"res":['+datas.replace(/,$/gi,"")+']}';
|
||||
return $.parseJSON(datas);
|
||||
}
|
||||
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/taskprocedure/getlist4selects.do?querytype=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
//pagination : true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '工序名称', field : 'procedurename', sortable : true, halign:'center'},
|
||||
{width : '150', title : '工序编号', field : 'procedurecode', sortable : true, halign:'center'},
|
||||
{width : '150', title : '关键字', field : 'keywords', sortable : true, halign:'center'},
|
||||
{width : '150', title : '类型', field : 'type', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
if(row.type=='${Type_Inspect}'){
|
||||
return '检测工序';
|
||||
}else{
|
||||
return '生产工序';
|
||||
}
|
||||
}},
|
||||
{width : '150', title : '半成品工序', field : 'semiflag', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
if(row.semiflag=='${Flag_Semi}'){
|
||||
return '是';
|
||||
}else{
|
||||
return '否';
|
||||
}
|
||||
}},
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess:function(data){
|
||||
var procedids = localStorage.getItem("procedids").split(",");
|
||||
localStorage.removeItem("procedids");
|
||||
$.each(procedids, function(index, item){
|
||||
if(item != ""){
|
||||
$('#grid').datagrid("checkRow",$('#grid').datagrid("getRowIndex",item));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</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 id="search_name" name="search_name" class="easyui-textbox" /></td>
|
||||
<td>工序编码</td>
|
||||
<td><input id="search_code" 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="$('#search_name').textbox('setValue','');$('#search_line').combobox('setValue','');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>
|
||||
197
bin/WebRoot/jsp/process/taskProcedureOrderList.jsp
Normal file
197
bin/WebRoot/jsp/process/taskProcedureOrderList.jsp
Normal file
@ -0,0 +1,197 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.process.TaskProcedure"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%request.setAttribute("Type_Inspect",TaskProcedure.Type_Inspect);%>
|
||||
<%request.setAttribute("Type_Produce",TaskProcedure.Type_Produce);%>
|
||||
<%request.setAttribute("Flag_Semi",TaskProcedure.Flag_Semi);%>
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
|
||||
<%
|
||||
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 dosave(dialog,grid) {
|
||||
$.post(ext.contextPath + "/process/taskprocedure/saveERPGridData.do",{griddata:getGriddata()},function(data1){
|
||||
if(JSON.parse(data1).res == 1)
|
||||
{
|
||||
top.$.messager.alert('提示', "顺序保存成功", 'info', function() {
|
||||
});
|
||||
}else if(JSON.parse(data1).res == -1)
|
||||
{
|
||||
top.$.messager.alert('提示', '顺序保存失败', 'info');
|
||||
}else
|
||||
{
|
||||
top.$.messager.alert('提示', data1.delres, 'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getGriddata(){
|
||||
var gridrows= $('#grid').datagrid('getRows');
|
||||
//console.log("gridrows",gridrows);
|
||||
var griddata= '[';
|
||||
$.each(gridrows, function(index, item){
|
||||
//console.log("item",item);
|
||||
if(index == 0){
|
||||
griddata+='{"id":"'+item.id +
|
||||
'","priorityorder":"'+index+'","sorttype":"'+$('#sorttype').combobox('getValue') +'"}';
|
||||
}
|
||||
else{
|
||||
griddata+=',{"id":"'+item.id +
|
||||
'","priorityorder":"'+index+'","sorttype":"'+$('#sorttype').combobox('getValue') +'"}';
|
||||
}
|
||||
});
|
||||
griddata+= ']';
|
||||
return griddata;
|
||||
}
|
||||
|
||||
|
||||
function getProcedids(){
|
||||
var procedrows= $('#grid').datagrid("getRows");
|
||||
var procedids="";
|
||||
$.each(procedrows, function(index, item){
|
||||
procedids+=item.id+",";
|
||||
});
|
||||
procedids=procedids.replace(/,$/gi,"");
|
||||
return procedids;
|
||||
}
|
||||
|
||||
function doadd_Proced(){
|
||||
$("#procedids").val(getProcedids());
|
||||
localStorage.setItem("procedids",$("#procedids").val());
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加工序',
|
||||
height:500,
|
||||
url : ext.contextPath + '/process/taskprocedure/showTaskProcedureForSelects.do',
|
||||
|
||||
buttons : [ {
|
||||
iconCls:'icon-ok',
|
||||
text : '确认',
|
||||
handler : function() {
|
||||
var data = dialog.find('iframe').get(0).contentWindow.selectFun(dialog, grid);
|
||||
if(data.res.length>0){
|
||||
for(var i=0;i<data.res.length;i++){
|
||||
grid.datagrid('appendRow',{
|
||||
id:data.res[i].id,
|
||||
procedurecode:data.res[i].procedurecode,
|
||||
procedurename:data.res[i].procedurename,
|
||||
keywords:data.res[i].keywords,
|
||||
type:data.res[i].type,
|
||||
semiflag:data.res[i].semiflag
|
||||
});
|
||||
}
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
$('#grid').datagrid('enableDnd');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
}
|
||||
|
||||
function dodel_Proced(){
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
console.log("checked",checkedItems);
|
||||
$.each(checkedItems, function(index, item){
|
||||
grid.datagrid('deleteRow', index);
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#sorttype").combobox({
|
||||
url : ext.contextPath + '/process/taskprocedure/getTaskProcedureOrderType4Combo.do',
|
||||
valueField : 'id',
|
||||
textField : 'name',
|
||||
method:'get',
|
||||
panelHeight:'auto',
|
||||
onSelect:function(){
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/taskprocedure/getTaskProcedureOrderList.do?sorttype='+$('#sorttype').combobox('getValue'),
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
//pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect: true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '150', title : '工序名称', field : 'procedurename', sortable : true, halign:'center'},
|
||||
{width : '150', title : '工序编号', field : 'procedurecode', sortable : true, halign:'center'},
|
||||
{width : '150', title : '关键字', field : 'keywords', sortable : true, halign:'center'},
|
||||
{width : '150', title : '类型', field : 'type', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
if(row.type=='${Type_Inspect}'){
|
||||
return '检测工序';
|
||||
}else{
|
||||
return '生产工序';
|
||||
}
|
||||
}},
|
||||
{width : '150', title : '半成品工序', field : 'semiflag', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
if(row.semiflag=='${Flag_Semi}'){
|
||||
return '是';
|
||||
}else{
|
||||
return '否';
|
||||
}
|
||||
}},
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
$('#grid').datagrid('enableDnd');
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoadSuccess: function () {
|
||||
var data = $('#sorttype').combobox('getData');
|
||||
$("#sorttype").combobox('select',data[0].id);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="doadd_Proced();">编辑</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-disk',plain:true"
|
||||
onclick="dosave();">保存顺序</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="maindiv" class="easyui-layout" data-options="fit:true">
|
||||
<input id="procedids" name="procedids" type="hidden" value="" />
|
||||
<div data-options="region:'north',split:true" style="width:45%;height:60px;padding:10px;background:#fafafa;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>排序类型:</td>
|
||||
<td>
|
||||
<select id="sorttype" class="easyui-combobox" data-options="panelHeight:'auto'" style="width:200px;">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<div id="downdiv" data-options="region:'west'" title="" style="width:100%;padding:0;">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
121
bin/WebRoot/jsp/process/taskWorkstationAdd.jsp
Normal file
121
bin/WebRoot/jsp/process/taskWorkstationAdd.jsp
Normal file
@ -0,0 +1,121 @@
|
||||
<%@ 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() {
|
||||
var checkeditems = [];
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url: ext.contextPath + '/process/taskworkstation/getchecklist.do?pid='+'${pid}'+'&taskname='+'${taskname}'+'&random='+Math.random(),
|
||||
data: '',
|
||||
success: function (result) {
|
||||
if(result.length>0){
|
||||
checkeditems=result.split(",");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/work/workstation/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '工位编号', field : 'serial', sortable : true, halign:'center'},
|
||||
{width : '180', title : '工位名称', field : 'name', sortable : true, halign:'center'},
|
||||
{width : '80', title : '工位类型', field : 'typename', sortable : true, halign:'center'},
|
||||
{width : '80', title : '所属车间', field : 'deptname', sortable : true, halign:'center'},
|
||||
{width : '180', title : '工位概述', field : 'intro', halign:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
if(data){
|
||||
$.each(data.rows, function(index, item){
|
||||
if(checkeditems.indexOf(item.id)>-1){
|
||||
$('#grid').datagrid('checkRow', index);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#search_dept').combotree({
|
||||
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#deptid").tree("unselect");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
function dosave(dialog, grid) {
|
||||
var widstr = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
widstr += rows[i].id+",";
|
||||
}
|
||||
if(widstr.length>0){
|
||||
widstr = widstr.substring(0,widstr.length-1);
|
||||
}
|
||||
$.post(ext.contextPath + "/process/taskworkstation/save.do", {wids:widstr,pid:'${pid}',taskname:'${taskname}'}, function(data) {
|
||||
if (data.res != "") {
|
||||
top.$.messager.alert('提示', data.res, 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示', "操作无效", 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
</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 id="search_name" name="search_name" class="easyui-textbox" /></td>
|
||||
<td>所属车间</td>
|
||||
<td><input id="search_dept" name="search_dept" class="easyui-combobox"/></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="$('#search_name').textbox('setValue','');$('#search_line').combobox('setValue','');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>
|
||||
140
bin/WebRoot/jsp/process/taskWorkstationList.jsp
Normal file
140
bin/WebRoot/jsp/process/taskWorkstationList.jsp
Normal file
@ -0,0 +1,140 @@
|
||||
<%@ 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;
|
||||
var addFun = function() {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '添加工位',
|
||||
url : ext.contextPath + '/process/taskworkstation/add.do?pid=${param.pid}&taskname=${taskname}',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskworkstation/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/taskworkstation/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/process/taskworkstation/getlist.do?pid=${param.pid}&taskname=${taskname}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '180', title : '工位编号', field : 'serial', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.workStation.serial;
|
||||
}},
|
||||
{width : '180', title : '工位名称', field : 'name', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.workStation.name;
|
||||
}},
|
||||
{width : '180', title : '工位类型', field : 'materialspec', sortable : false, halign:'center',formatter:function(value,row){
|
||||
return row.workStation.typename;
|
||||
}},
|
||||
{width : '120', title : '所属车间', field : 'deptname', sortable : false, halign:'center',formatter : function(value, row) {
|
||||
return row.workStation.deptname;
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '100', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"process/real/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="toolbar" style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"process/taskmaterial/add.do")) {%>
|
||||
<%}%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
|
||||
<%if (sessionManager.havePermission(session,"process/taskmaterial/delete.do")) {%>
|
||||
<%}%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user