191 lines
7.0 KiB
Plaintext
191 lines
7.0 KiB
Plaintext
<%@ 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 returnVal = "";//用于传递是否需要刷新页面refresh
|
|
|
|
var autoDistrict = function() {
|
|
parent.$.messager.prompt('提示', '请填写计划生产的产品总量', function(r){
|
|
if (parseInt(r)==r){
|
|
$.post(ext.contextPath + '/plan/dailyplansummary/autoDistricWorkDetail.do', {amount:r,planId:'${planid}'} , function(data) {
|
|
if(data=='1'){
|
|
top.$.messager.alert('提示','自动配置完成','info',function(){
|
|
showProcedureDistrictStatus();
|
|
});
|
|
}else{
|
|
top.$.messager.alert('提示','自动配置失败','info');
|
|
}
|
|
},'json');
|
|
}
|
|
});
|
|
|
|
};
|
|
|
|
var grid;
|
|
$(function() {
|
|
grid = $('#grid').datagrid({
|
|
title : '',
|
|
url : ext.contextPath + '/activiti/workflow/getAllPDNode.do?processDefinitionId=${prid}&order=desc' ,
|
|
striped : true,
|
|
rownumbers : true,
|
|
pagination : true,
|
|
singleSelect: true,
|
|
selectOnCheck: true,
|
|
checkOnSelect: false,
|
|
idField : 'id',
|
|
pageSize : 50,
|
|
pageList : [ 20, 50, 100],
|
|
columns : [ [
|
|
{checkbox:true , field : 'ck'},
|
|
{width : '100', title : '工序名称', field : 'name', halign:'center'},
|
|
{width : '100', title : '工序Id', field : 'id', halign:'center'},
|
|
{width : '100', title : '工艺名称', field : 'pd_name', halign:'center'},
|
|
{width : '60', title : '计划良率', field : 'yield', align:'center'},
|
|
{width : '80', title : '计划产出数', field : 'status', align:'center'},
|
|
{width : '80', title : '计划需求数', field : 'status_in', align:'center'}
|
|
] ],
|
|
toolbar : '#toolbar',
|
|
onLoadSuccess : function(data) {
|
|
$('.iconImg').attr('src', ext.pixel_0);
|
|
|
|
|
|
if(data){
|
|
$.each(data.rows, function(index, item){
|
|
if(item._checked){
|
|
$('#grid').datagrid('checkRow', index);
|
|
}
|
|
});
|
|
}
|
|
if(grid.datagrid('getSelected')==null){
|
|
grid.datagrid('selectRow',0);
|
|
}
|
|
|
|
$("#name_search").combobox("select",data.lineid);
|
|
showProcedureDistrictStatus();
|
|
},
|
|
onSelect:function(index,row){
|
|
showdetailsFun('${planid}',row.id,row.pd_id);
|
|
}
|
|
});
|
|
|
|
/* $("#name_search").combobox({
|
|
url : ext.contextPath + '/process/real/getLineListByRealid.do?realid=${workorder.processrealid}&random=' + Math.random(),
|
|
valueField : 'id',
|
|
textField : 'name',
|
|
method:'get',
|
|
panelHeight:'auto'
|
|
}); */
|
|
});
|
|
var showProcedureDistrictStatus= function(){
|
|
//alert()
|
|
|
|
$.post(ext.contextPath + '/plan/dailyplansummary/getTaskDemands.do', {planid:'${planid}'} , function(data) {
|
|
//console.info(data)
|
|
//if(data.length>0){
|
|
//alert("222");
|
|
var griddata=$("#grid").datagrid("getData").rows;
|
|
|
|
for(var i=0;i<griddata.length;i++){
|
|
//console.info(griddata);
|
|
var taskcode=griddata[i].id;
|
|
//alert(taskcode)
|
|
$("#grid").datagrid("getRows")[i]['status']="";
|
|
$("#grid").datagrid("getRows")[i]['status_in']="";
|
|
$('#grid').datagrid('refreshRow', i);
|
|
for(var j=0;j<data.length;j++){
|
|
if(taskcode==data[j].taskcode){
|
|
var yield =$("#grid").datagrid("getRows")[i]['yield'];
|
|
if(yield!=null &&yield !=""){
|
|
var preamount=(data[j].preamount==""?0:data[j].preamount)
|
|
var input = preamount/yield;
|
|
$("#grid").datagrid("getRows")[i]['status_in']=Math.ceil(input);
|
|
}
|
|
$("#grid").datagrid("getRows")[i]['status']=data[j].preamount;
|
|
$('#grid').datagrid('refreshRow', i);
|
|
var rowIndex=$('#grid').datagrid('getRowIndex',$('#grid').datagrid('getSelected'));
|
|
$('#grid').datagrid("selectRow",rowIndex)
|
|
}
|
|
}
|
|
|
|
}
|
|
//}
|
|
},'json');
|
|
};
|
|
var showdetailsFun = function(planId,taskId,processId) {
|
|
$("#rightFrameMaterial").attr("src",ext.contextPath+"/plan/dailyplansummary/showDistricWorkDetail.do?processRealId="+processId+"&taskId="+taskId+"&planId="+planId);
|
|
$("#rightFrameEquipment").attr("src",ext.contextPath+"/work/workorder/showdistrictwork_equ.do?planId="+planId+"&processid="+processId+"&taskid="+taskId);
|
|
$("#rightFrameScheduling").attr("src",ext.contextPath+"/work/workorder/showdistrictwork_group.do?planId="+planId+"&processid="+processId+"&taskid="+taskId);
|
|
};
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="maindiv" class="easyui-layout" data-options="fit:true">
|
|
<div id="leftdiv" data-options="region:'west',split:true" title="分配 任务量" style="width:600px;padding:0;">
|
|
<table id="toolbar" style="width:100%">
|
|
<tr>
|
|
<td>
|
|
<form id="searchForm">
|
|
<table>
|
|
<tr>
|
|
<!-- <td>工序</td>
|
|
<td><input id="name_search" name="name_search" 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="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a> -->
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
|
onclick="autoDistrict();">自动分配</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'">
|
|
<!-- <table>
|
|
<tr>
|
|
<th>任务量情况</th>
|
|
<td>112</td>
|
|
</tr>
|
|
<tr>
|
|
<th>设备分配情况</th>
|
|
<td>112</td>
|
|
</tr>
|
|
<tr>
|
|
<th>人员分配情况</th>
|
|
<td>112</td>
|
|
</tr>
|
|
</table> -->
|
|
<div id="tt" class="easyui-tabs" data-options="fit:true">
|
|
<!-- <div title="排班管理">
|
|
<iframe id="rightFrameScheduling" 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 title="排班管理">
|
|
<iframe id="rightFrameScheduling" src="" allowTransparency="true" style="border: 0; width: 100%; height: 100%;"
|
|
frameBorder="0" scrolling="auto"></iframe>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |