first commit
This commit is contained in:
140
bin/WebRoot/jsp/plan/erpProdtaskForSelect.jsp
Normal file
140
bin/WebRoot/jsp/plan/erpProdtaskForSelect.jsp
Normal file
@ -0,0 +1,140 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ 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">
|
||||
function dosave(dialog,grid) {
|
||||
$.post(ext.contextPath + "/plan/taskorder/saveERPProdtask.do?id=${id}&griddata="+selectOK(),function(data1){
|
||||
if(JSON.parse(data1).res>-1 )
|
||||
{
|
||||
top.$.messager.alert('提示', "任务添加成功", 'info', function() {
|
||||
dialog.dialog('destroy');
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}
|
||||
else if(JSON.parse(data1).res == -1){
|
||||
top.$.messager.alert('提示', '任务'+JSON.parse(data1).tcres+'导入失败请重新导入', 'info');
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
else{
|
||||
top.$.messager.alert('提示', data1.res, 'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function selectOK(dialog, grid) {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
console.log("checkedItems",checkedItems);
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas += item.taskcode+',';
|
||||
});
|
||||
datas = datas.replace(/,$/gi,"");
|
||||
return datas;
|
||||
}
|
||||
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/plan/taskorder/getERPProdatsk.do?salesno=${salesno}&productno=${productno}',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '任务编号', field : 'taskcode', sortable : true, halign:'center'},
|
||||
{width : '60', title : '执行状态', field : 'runstatus', 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 : '70', title : '计划生产数', field : 'planamount', sortable : true, halign:'center'},
|
||||
{width : '90', title : '生产车间', field : 'workshopname', sortable : true, halign:'center'},
|
||||
{width : '85', title : '物料名称', field : 'materialname', sortable : true, halign:'center'},
|
||||
{width : '140', title : '物料代码', field : 'materialcode', sortable : true, halign:'center'},
|
||||
{width : '80', 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){
|
||||
}
|
||||
});
|
||||
});
|
||||
</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