first commit
This commit is contained in:
146
bin/WebRoot/jsp/plan/prodtaskForSelect.jsp
Normal file
146
bin/WebRoot/jsp/plan/prodtaskForSelect.jsp
Normal file
@ -0,0 +1,146 @@
|
||||
<%@ 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"%>
|
||||
<%request.setAttribute("Flag_ERPConfirm",com.sipai.entity.plan.Prodtask.Flag_ERPConfirm);%>
|
||||
<%request.setAttribute("Flag_Issued",com.sipai.entity.plan.Prodtask.Flag_Issued);%>
|
||||
<%request.setAttribute("Flag_Working",com.sipai.entity.plan.Prodtask.Flag_Working);%>
|
||||
<%request.setAttribute("Flag_Finish",com.sipai.entity.plan.Prodtask.Flag_Finish);%>
|
||||
<%request.setAttribute("Flag_Closed",com.sipai.entity.plan.Prodtask.Flag_Closed);%>
|
||||
<%request.setAttribute("Flag_Cancel",com.sipai.entity.plan.Prodtask.Flag_Cancel);%>
|
||||
<%request.setAttribute("Flag_NoPlan",com.sipai.entity.plan.Prodtask.Flag_NoPlan);%>
|
||||
<%request.setAttribute("Flag_ERPIssued",com.sipai.entity.plan.Prodtask.Flag_ERPIssued);%>
|
||||
<%
|
||||
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 + '/plan/taskorder/getProdtaskRelation.do?flag=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
rowStyler: function(index,row){
|
||||
var rowstyler='';
|
||||
if(row.status=='1'){
|
||||
rowstyler+= ' background-color:#C0C0C0;color:#fff;';
|
||||
}
|
||||
return rowstyler;
|
||||
},
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '任务编号', field : 'taskcode', sortable : true, halign:'center'},
|
||||
{width : '50', title : '执行状态', field : 'runstatus', sortable : true, halign:'center',formatter:function(value,row){
|
||||
switch (value) {
|
||||
case '${Flag_ERPConfirm}':
|
||||
return '确认';
|
||||
case '${Flag_Issued}':
|
||||
return '下发';
|
||||
case '${Flag_Working}':
|
||||
return '开工';
|
||||
case '${Flag_Finish}':
|
||||
return '完成';
|
||||
case '${Flag_Closed}':
|
||||
return '结案';
|
||||
case '${Flag_Cancel}':
|
||||
return '作废';
|
||||
case '${Flag_NoPlan}':
|
||||
return '未排计划';
|
||||
case '${Flag_ERPIssued}':
|
||||
return 'ERP下达';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
||||
}},
|
||||
{width : '170', title : '任务单编号', field : 'tasklistcode', sortable : true, halign:'center'},
|
||||
{width : '130', title : '产品编号', field : 'productno', sortable : true, halign:'center'},
|
||||
{width : '70', title : '计划生产数', field : 'planamount', sortable : true, halign:'center'},
|
||||
{width : '90', title : '生产车间', field : 'workshop', sortable : true, halign:'center'},
|
||||
{width : '85', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '140', title : '物料代码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '120', title : '销售单号', field : 'salesno', sortable : true, align:'center', halign:'center'},
|
||||
{width : '120', title : '开始日期', field : 'pstdate', sortable : true, align:'center', halign:'center',formatter:function(value,row){
|
||||
var str = value.substring(0,10);
|
||||
return str;
|
||||
}},
|
||||
{width : '120', title : '结束日期', field : 'pendate', sortable : true, align:'center', halign:'center',formatter:function(value,row){
|
||||
var str = value.substring(0,10);
|
||||
return str;
|
||||
}}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess:function(data){
|
||||
var wids = localStorage.getItem("prodtaskid").split(",");
|
||||
localStorage.clear();
|
||||
$.each(wids, function(index, item){
|
||||
if(item != ""){
|
||||
$('#grid').datagrid("checkRow",$('#grid').datagrid("getRowIndex",item));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
var jsonstr = "";
|
||||
var row = $('#grid').datagrid('getSelected');
|
||||
if (row){
|
||||
//以json格式返回数据
|
||||
jsonstr = '{"id":"'+row.id
|
||||
+'","taskcode":"'+row.taskcode
|
||||
+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
localStorage.clear();
|
||||
}
|
||||
</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_tasklistcode" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td>
|
||||
<td>产品编码</td>
|
||||
<td><input name="search_productno" 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>
|
||||
|
||||
Reference in New Issue
Block a user