first commit
This commit is contained in:
171
WebRoot/jsp/work/scadapic/prodManagement.jsp
Normal file
171
WebRoot/jsp/work/scadapic/prodManagement.jsp
Normal file
@ -0,0 +1,171 @@
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%@ 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 contentdiv=$("#contentDiv");
|
||||
var searchgrid = function() {
|
||||
grid.datagrid('load',ext.contextPath + '/work/workorder/getlist.do?'+$('#searchForm').serialize());
|
||||
};
|
||||
$(function() {
|
||||
$("#taskordercode").textbox('textbox').bind("click", function () {
|
||||
selectTaskOrder();
|
||||
});
|
||||
showButtons();
|
||||
});
|
||||
var showButtons = function() {
|
||||
$.post(ext.contextPath + "/work/scadaPic/getProdManagementViews4Combo.do", {}, function(data) {
|
||||
|
||||
if (data.length>0) {
|
||||
var widthtimes= 100/data.length-1;
|
||||
for(i=0 ;i<data.length;i++){
|
||||
var a = document.createElement("a");
|
||||
a.href='javascript:void(0);';
|
||||
a.id=data[i].id;
|
||||
var cd =document.getElementById('contentDiv');
|
||||
//console.info(son)
|
||||
cd.appendChild(a);
|
||||
|
||||
$('#'+data[i].id).linkbutton({
|
||||
iconCls: 'icon-add',
|
||||
text:data[i].name,
|
||||
plain:true
|
||||
});
|
||||
/* $('#'+data[i].id).css('margin-left','50px');
|
||||
$('#'+data[i].id).css('margin-right','50px'); */
|
||||
$('#'+data[i].id).css('float','left');
|
||||
$('#'+data[i].id).css('width',widthtimes+'%');
|
||||
|
||||
$('#'+data[i].id).bind('click', function(){
|
||||
showView(this.id);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
},'json');
|
||||
};
|
||||
var showView = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '可视化',
|
||||
width: 1000,
|
||||
height:550,
|
||||
url : ext.contextPath + '/work/scadaPic/showProdManagementItem_PIC.do?id='+id,
|
||||
buttons : [{
|
||||
text : '关闭',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
var showdetailsFun = function() {
|
||||
var taskOrderId =$("#taskorderid").val();
|
||||
var processId = $("#processId").combobox('getValue');
|
||||
$("#iframeStock").attr("src",ext.contextPath+"/work/scadaPic/showProdManagementItem.do?taskorderid="+taskOrderId+"&processid="+processId+"&type=xbk");
|
||||
$("#iframeSuspended").attr("src",ext.contextPath+"/work/scadaPic/showProdManagementItem.do?taskorderid="+taskOrderId+"&processid="+processId+"&type=kl");
|
||||
};
|
||||
function selectTaskOrder(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择任务单',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/plan/taskorder/select.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
|
||||
if(res!=null){
|
||||
$("#taskordercode").textbox('setValue',res.tasklistcode);//easyui textbox赋值jquery不一样
|
||||
$("#taskorderid").val(res.id);
|
||||
$("#processId").combobox({
|
||||
url : ext.contextPath + '/plan/dailyplan/getProcessIds4ComboByTaskOrderId.do?taskOrderId='+res.id,
|
||||
valueField : 'processid',
|
||||
textField : 'processid',
|
||||
method:'get',
|
||||
panelHeight:'auto',
|
||||
onLoadSuccess: function(record){
|
||||
if($("#processId").combobox('getData').length>0){
|
||||
$("#processId").combobox('select',$("#processId").combobox('getData')[0].processid);
|
||||
}
|
||||
},
|
||||
onSelect: function () {
|
||||
showdetailsFun();
|
||||
}
|
||||
});
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;heigh:500px;" data-options="region:'north'" >
|
||||
<table style="width:100%">
|
||||
<caption style="padding:10px 10px;font-size:20px;align:center;">制品管理</caption>
|
||||
</table>
|
||||
<table >
|
||||
<tr style="align:center;">
|
||||
<td style="width:60px;align:center;">任务单号</td>
|
||||
<td><input id="taskordercode" name="taskordercode" class="easyui-textbox" style="width: 250px;" data-options="validType:'isBlank',prompt:'单击选择'" value=""/>
|
||||
<input id="taskorderid" name="taskorderid" type="hidden" value="" /></td>
|
||||
|
||||
<th style="width:60px;">流程ID</th>
|
||||
<td >
|
||||
<input id="processId" name="processId" class="easyui-combobox" editable="false" style="width:250px" data-options="required:true,validType:'isBlank'"/>
|
||||
</td>
|
||||
<td >
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="showdetailsFun();">搜索</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div id="rightdiv" data-options="region:'center',border:false">
|
||||
<div id="tt" class="easyui-tabs" data-options="fit:true,border:false">
|
||||
|
||||
<div title="线边库存">
|
||||
<iframe id="iframeStock" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div title="品质扣料">
|
||||
<iframe id="iframeSuspended" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
||||
frameBorder="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="contentDiv" style="height:30px;" data-options="region:'south'">
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user