first commit
This commit is contained in:
201
bin/WebRoot/jsp/plan/districtworkdetail.jsp
Normal file
201
bin/WebRoot/jsp/plan/districtworkdetail.jsp
Normal file
@ -0,0 +1,201 @@
|
||||
<%@ 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">
|
||||
function dosave() {
|
||||
var preamount =$('#preamount').textbox('getValue');
|
||||
if(preamount==""){
|
||||
parent.$.messager.alert("提示","日计划产量不能为空","info",function(){
|
||||
$("#preamount").focus();
|
||||
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/plan/dailyplansummary/districWorkDetail.do", $("#baseForm").serialize(), function(data) {
|
||||
if (data == '1') {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
var sd=$("#taskgrid").combogrid('getValue');
|
||||
$("#taskgrid").combogrid('grid').datagrid('selectRecord',sd);
|
||||
parent.showProcedureDistrictStatus();
|
||||
});
|
||||
}else if(data == '0'){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
var clearFun = function(id) {
|
||||
//alert(id)
|
||||
parent.$.messager.confirm('提示', '您确定要清除此配置?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/plan/dailyplansummary/clearWorkDetail.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','清除成功','info', function() {
|
||||
parent.showProcedureDistrictStatus();
|
||||
});
|
||||
}else{
|
||||
top.$.messager.alert('提示','清除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
$(function(){
|
||||
$('#taskgrid').combogrid({
|
||||
panelWidth: 400,
|
||||
idField: 'id',
|
||||
textField: 'taskcode',
|
||||
url: ext.contextPath +'/plan/taskorder/getSchedulingTask.do?pid=${taskorderid}',
|
||||
columns: [[
|
||||
{field:'taskcode',title:'任务编号',width:50},
|
||||
{field:'workshop',title:'生产车间',width:50},
|
||||
{field:'planamount',title:'计划产量',width:50},
|
||||
{field:'materialname',title:'物料名称',width:60},
|
||||
{field:'pendate',title:'截止日期',width:60, formatter : function(value, row) {
|
||||
return row.pendate.substring(0,10);
|
||||
}}
|
||||
]],
|
||||
fitColumns: true,
|
||||
onLoadSuccess:function(){
|
||||
$("#taskgrid").combogrid('grid').datagrid('selectRecord','${dailyPlanTaskDemand.prodtaskid}');
|
||||
} ,
|
||||
onSelect: function (rowIndex, rowData){
|
||||
var selectdatestr=rowData.pendate;
|
||||
var nowdate = new Date(); //结束时间
|
||||
var datesum = new Date(selectdatestr).getTime()-nowdate.getTime(); //时间差的毫秒数
|
||||
//计算出相差天数
|
||||
var days=Math.floor(datesum/(24*3600*1000)) ;
|
||||
$("#days").html(days);
|
||||
$("#preSumAmount").html(rowData.planamount);
|
||||
$.post(ext.contextPath + "/plan/dailyplansummary/searchAmountByProdTaskId.do",{prodTaskId:rowData.id,taskcode:'${dailyPlanTaskDemand.taskcode}',planid:'${dailyPlanTaskDemand.planid}'}, function(data) {
|
||||
//console.info(data)
|
||||
$("#remainamount").html(data.remainamount);
|
||||
if(data.remainamount<0){
|
||||
$("#remainamount").css("color",'red');
|
||||
}else{
|
||||
$("#remainamount").css("color",'black');
|
||||
}
|
||||
$("#actProcedureSumAmount").html(data.actProcedureSumAmount);
|
||||
/* var preyield =$("#preyield").textbox('getValue');
|
||||
if(preyield==""){
|
||||
$("#preyield").textbox('setValue',data.preyield);
|
||||
} */
|
||||
|
||||
$("#actSumYeild").html(data.actSumYeild);
|
||||
},'json');
|
||||
$("#workshop").html(rowData.workshop);
|
||||
$("#prodtaskid").val(rowData.id);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="maindiv" class="easyui-layout" data-options="fit:true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="baseForm">
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true"
|
||||
onclick="dosave();">保存</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="clearFun('${dailyPlanTaskDemand.id}');">清除</a>
|
||||
<input id ="id" name="id" type="hidden" value="${dailyPlanTaskDemand.id}"/>
|
||||
<input id ="planid" name="planid" type="hidden" value="${dailyPlanTaskDemand.planid}"/>
|
||||
<input id ="processid" name="processid" type="hidden" value="${dailyPlanTaskDemand.processid}"/>
|
||||
<input id ="taskcode" name="taskcode" type="hidden" value="${dailyPlanTaskDemand.taskcode}"/>
|
||||
<input id ="prodtaskid" name="prodtaskid" type="hidden" value="${dailyPlanTaskDemand.prodtaskid}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>任务编号</th>
|
||||
<td>
|
||||
<select id="taskgrid" name="taskgrid" class="easyui-combogrid" data-options="fit:true">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>生产车间</th>
|
||||
<td>
|
||||
<span id="workshop" ></span>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>剩余天数</th>
|
||||
<td>
|
||||
<span id="days" ></span>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>计划总数量</th>
|
||||
<td>
|
||||
<span id="preSumAmount" ></span>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>未排产数量</th>
|
||||
<td>
|
||||
<span id="remainamount" ></span>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当前工序实际产量</th>
|
||||
<td>
|
||||
<span id="actProcedureSumAmount" ></span>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当前工序良率</th>
|
||||
<td>
|
||||
<span id="actSumYeild" ></span>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>日计划产量</th>
|
||||
<td>
|
||||
<input id ="preamount" name="preamount" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank',fit:true" value="${dailyPlanTaskDemand.preamount}"/>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<%-- <tr>
|
||||
<th>计划良率</th>
|
||||
<td>
|
||||
<input id="preyield" name="preyield" class="easyui-textbox"
|
||||
value="${dailyPlanTaskDemand.preyield}" data-options="fit:true"/>
|
||||
</td>
|
||||
</tr> --%>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user