first commit
This commit is contained in:
633
bin/WebRoot/jsp/plan/prodtaskList.jsp
Normal file
633
bin/WebRoot/jsp/plan/prodtaskList.jsp
Normal file
@ -0,0 +1,633 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new 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);%>
|
||||
|
||||
<%request.setAttribute("Relation_Related",com.sipai.entity.plan.Prodtask.Relation_Related);%>
|
||||
<%request.setAttribute("Relation_Link",com.sipai.entity.plan.Prodtask.Relation_Link);%>
|
||||
|
||||
<%request.setAttribute("TO_Flag_ERPConfirm",com.sipai.entity.plan.Taskorder.TO_Flag_ERPConfirm);%>
|
||||
<%request.setAttribute("TO_Flag_Issued",com.sipai.entity.plan.Taskorder.TO_Flag_Issued);%>
|
||||
<%request.setAttribute("TO_Flag_Working",com.sipai.entity.plan.Taskorder.TO_Flag_Working);%>
|
||||
<%request.setAttribute("TO_Flag_Closed",com.sipai.entity.plan.Taskorder.TO_Flag_Closed);%>
|
||||
<%request.setAttribute("TO_Flag_Cancel",com.sipai.entity.plan.Taskorder.TO_Flag_Cancel);%>
|
||||
<%request.setAttribute("TO_Flag_NoPlan",com.sipai.entity.plan.Taskorder.TO_Flag_NoPlan);%>
|
||||
<%request.setAttribute("TO_Flag_ERPIssued",com.sipai.entity.plan.Taskorder.TO_Flag_ERPIssued);%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<style>
|
||||
.ui-progressbar{
|
||||
background : green;
|
||||
padding:1px;
|
||||
}
|
||||
</style>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addProdtaskFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加任务信息',
|
||||
url : ext.contextPath + '/plan/taskorder/addProdtask.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
var addERPProdtaskFun = function(productno,id,salesno) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加任务信息',
|
||||
url : ext.contextPath + '/plan/taskorder/addERPProdtask.do?id=' + id+'&productno=' + productno +'&salesno=' + salesno,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
function changeNewStatusFun(rowid) {
|
||||
$.post(ext.contextPath + "/plan/taskorder/changeNewStatus.do",{id:rowid},function(data1){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var addTaskorderFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '添加任务单信息',
|
||||
url : ext.contextPath + '/plan/taskorder/addTaskorder.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
var viewTaskOrderDayPlanAmountFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '生产任务单一览(单击日期查看生产任务单详细)',
|
||||
width:1300,
|
||||
height:600,
|
||||
url : ext.contextPath + '/plan/taskorder/viewTaskOrderDayPlanAmount.do?displaymodel=' + "TO"
|
||||
});
|
||||
};
|
||||
|
||||
var viewProdtaskFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看任务信息',
|
||||
url : ext.contextPath + '/plan/taskorder/viewProdtask.do?id=' + id
|
||||
});
|
||||
};
|
||||
|
||||
var editTaskOrderFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '配置任务单信息',
|
||||
url : ext.contextPath + '/plan/taskorder/editTaskorder.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
} ],
|
||||
onClose : function(){
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var editProdtaskFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '配置任务信息',
|
||||
url : ext.contextPath + '/plan/taskorder/editProdtask.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
} ],
|
||||
onClose : function(){
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var viewAmountFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '配置任务信息',
|
||||
width:1300,
|
||||
height:600,
|
||||
url : ext.contextPath + '/plan/taskorder/viewAmount.do?id=' + id,
|
||||
onClose : function(){
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var editTORePDFun = function(prodtaskrelationid) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '修改关联任务信息',
|
||||
width: 600,
|
||||
height:250,
|
||||
url : ext.contextPath + '/plan/taskorder/editTORePD.do?prodtaskrelationid=' + prodtaskrelationid,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
} ],
|
||||
onClose : function(){
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/plan/taskorder/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var deleteTORePDFun = function(prodtaskrelationid,prodtaskid) {
|
||||
//console.log("prodtaskid",prodtaskid);
|
||||
//console.log("prodtaskrelationid",prodtaskrelationid);
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/plan/taskorder/deleteTORePD.do', {prodtaskrelationid : prodtaskrelationid,prodtaskid : prodtaskid}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var deleteTOFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/plan/taskorder/deleteTaskOrder.do', {id : id}, function(data) {
|
||||
if(JSON.parse(data).res> 0){
|
||||
parent.$.messager.alert('提示','成功删除'+JSON.parse(data).dno+'条任务记录'+',删除'+JSON.parse(data).res+'条任务单记录','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var deleteATOFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/plan/taskorder/deleteAllTaskOrder.do', {ids:datas} , function(data) {
|
||||
if(JSON.parse(data).res>0){
|
||||
parent.$.messager.alert('提示','成功删除'+JSON.parse(data).dno+'条任务记录'+',删除'+JSON.parse(data).res+'条任务单记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var importFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择文件',
|
||||
width: 600,
|
||||
height:300,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/plan/taskorder/doimport.do',
|
||||
buttons : [ {
|
||||
text : '导入数据',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doimport(dialog, grid);
|
||||
|
||||
}
|
||||
} ]
|
||||
});
|
||||
grid.datagrid('reload');
|
||||
};
|
||||
|
||||
|
||||
var importERPFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择任务',
|
||||
width: 1100,
|
||||
height:600,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/plan/taskorder/doimporterp.do',
|
||||
buttons : [ {
|
||||
text : '导入数据',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
|
||||
}
|
||||
} ]
|
||||
});
|
||||
grid.datagrid('reload');
|
||||
};
|
||||
|
||||
var selectRelationFun = function(toid) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择关联任务',
|
||||
width: 600,
|
||||
height:250,
|
||||
url : ext.contextPath + '/plan/taskorder/selectProdtaskRelation.do?toid=' + toid,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
} ],
|
||||
onClose : function(){
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var districtDailyPlan = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '快速排日计划',
|
||||
width: 1100,
|
||||
height:500,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/plan/taskorder/districtDailyPlan.do?taskOrderId='+id,
|
||||
buttons : [ {
|
||||
text : '关闭',
|
||||
handler : function() {
|
||||
dialog.dialog("destroy");
|
||||
|
||||
}
|
||||
} ]
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
var flag=0;
|
||||
$(function() {
|
||||
$('#displayAllbtn').switchbutton({
|
||||
onChange: function(checked){
|
||||
if(checked==true){
|
||||
$('#notdisplayinvalid').val("1");
|
||||
}else{
|
||||
$('#notdisplayinvalid').val("0");
|
||||
}
|
||||
//alert($('#mm').switchbutton('options').checked);
|
||||
grid.datagrid('load',ext.serializeObject($('#searchForm')));//搜索
|
||||
}
|
||||
});
|
||||
|
||||
grid = $('#grid').datagrid({
|
||||
view: detailview,
|
||||
detailFormatter:function(index,row){
|
||||
return '<div style="padding:2px"><table class="ddv"></table></div>';
|
||||
},
|
||||
title : '',
|
||||
url : ext.contextPath + '/plan/taskorder/getTaskorder.do?flag=listpage',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
frozenColumns:[[
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '185', title : '任务单编号', field : 'tasklistcode', sortable : true, halign:'center',formatter:function(value,row){
|
||||
var str = "";
|
||||
if(row.checknewstatus != 1)
|
||||
{
|
||||
str += '<img class="iconImg ext-icon-new"/> ';
|
||||
}
|
||||
str += value;
|
||||
return str;
|
||||
}},
|
||||
{width : '80', title : '任务单状态', field : 'billstatus', sortable : true, align:'center',halign:'center',formatter:function(value,row){
|
||||
switch (value) {
|
||||
case '${TO_Flag_ERPConfirm}':
|
||||
return '确认';
|
||||
case '${TO_Flag_Issued}':
|
||||
return '下发';
|
||||
case '${TO_Flag_Working}':
|
||||
return '开工';
|
||||
case '${TO_Flag_Closed}':
|
||||
return '结案';
|
||||
case '${TO_Flag_Cancel}':
|
||||
return '作废';
|
||||
case '${TO_Flag_NoPlan}':
|
||||
return '未排计划';
|
||||
case '${TO_Flag_ERPIssued}':
|
||||
return 'ERP下达';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}},
|
||||
]],
|
||||
columns : [ [
|
||||
{width : '150', title : '产品编码', field : 'productno', sortable : true, align:'center',halign:'center'},
|
||||
{width : '100', title : '产品数量', field : 'prodamount', sortable : true,align:'center', halign:'center'},
|
||||
{width : '90', title : '销售单号', field : 'salesno', sortable : true, align:'center', halign:'center'},
|
||||
{width : '140', title : '开始日期', field : 'pstdate', sortable : true, align:'center', halign:'center',formatter:function(value,row){
|
||||
var str = value.substring(0,10);
|
||||
return str;
|
||||
}},
|
||||
{width : '140', title : '结束日期', field : 'pendate', sortable : true, align:'center', halign:'center',formatter:function(value,row){
|
||||
var str = value.substring(0,10);
|
||||
return str;
|
||||
}},
|
||||
{width : '140', title : '任务单下达时间', field : 'billruntime', sortable : true, halign:'center'},
|
||||
{ width: 110, title: '进度', field: 'progress', align: 'center',
|
||||
formatter: function (value, row) {
|
||||
//value = parseInt(Math.random()*100+1);
|
||||
var color;
|
||||
if(value<=30){
|
||||
color="#DF4134";
|
||||
}else if (value<=70){
|
||||
color="#EABA0A";
|
||||
}else if (value>70){
|
||||
color="#53CA22";
|
||||
}
|
||||
var htmlstr = '<div class="easyui-progressbar progressbar" style="width: 100px; height: 17px;" value="'+value +'" text="'+60+'%">'+
|
||||
'<div class="progressbar-text" style="width: 100px; height: 20px; line-height: 17px;">'+value+'%</div>'+
|
||||
'<div class="progressbar-value" style="width: '+value+'%; height: 20px; line-height: 17px;">'+
|
||||
'<div class="progressbar-text" style="width: 100px; height: 20px; line-height: 17px;background :'+color+'; ">'+value+'%</div>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
return htmlstr;
|
||||
}
|
||||
},
|
||||
{title : '操作', field : 'action', width : '140', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/districtDailyPlan.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_multiple" title="排日计划" onclick="districtDailyPlan(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/editTaskorder.do")) {%>
|
||||
//str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editTaskOrderFun(\''+row.id+'\');"/> ';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/selectProdtaskRelation.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_go" title="关联任务" onclick="selectRelationFun(\''+row.id+'\');"/> ';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/deleteTaskOrder.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteTOFun(\''+row.id+'\');"/> ';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/addProdtask.do")) {%>
|
||||
/*str += '<img class="iconImg ext-icon-table_add" title="添加任务" onclick="addProdtaskFun(\''+row.id+'\');"/> ';*/
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/addProdtask.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_add" title="添加任务" onclick="addERPProdtaskFun(\''+row.productno+'\',\''+row.id+'\',\''+row.salesno+'\');"/> ';
|
||||
<%}%>
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onClickRow: function(index, row){
|
||||
if($('#grid').datagrid('getRows')[index].checknewstatus != '1')
|
||||
{
|
||||
changeNewStatusFun($('#grid').datagrid('getRows')[index].id);
|
||||
//console.log("row[index].changenewstatus",$('#grid').datagrid('getRows')[index].checknewstatus);
|
||||
}
|
||||
},
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
if(flag==0){
|
||||
flag=1;
|
||||
grid.datagrid('load',ext.serializeObject($('#searchForm')));//搜索
|
||||
}
|
||||
else{
|
||||
if($('#notdisplayinvalid').val() == "1"){
|
||||
//展开所有的行
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#grid').datagrid('expandRow',i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
onExpandRow: function(index,prow){
|
||||
ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
|
||||
ddv.datagrid({
|
||||
url:ext.contextPath + '/plan/taskorder/getTask.do?pid='+prow.id,
|
||||
fitColumns:true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
striped: true,
|
||||
idField : 'id',
|
||||
rownumbers:true,
|
||||
//loadMsg:'',
|
||||
height:'auto',
|
||||
rowStyler: function(index,row){
|
||||
var rowstyler='';
|
||||
if (row.relation!=null){
|
||||
if(row.relation=='${Relation_Link}'){
|
||||
rowstyler = 'background-color:yellow;';
|
||||
}
|
||||
else if(row.relation=='${Relation_Related}'){
|
||||
rowstyler = 'background-color:blue;color:white';
|
||||
}
|
||||
}
|
||||
return rowstyler;
|
||||
},
|
||||
onDblClickRow: function(index, row){
|
||||
viewAmountFun(row.id);
|
||||
},
|
||||
columns : [ [
|
||||
|
||||
{width : '140', title : '任务编号', field : 'taskcode', sortable : true, halign:'center'},
|
||||
{width : '65', 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_Closed}':
|
||||
return '结案';
|
||||
case '${Flag_Cancel}':
|
||||
return '作废';
|
||||
case '${Flag_NoPlan}':
|
||||
return '未排计划';
|
||||
case '${Flag_ERPIssued}':
|
||||
return 'ERP下达';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
||||
}},
|
||||
{width : '125', title : '已完成/已安排/计划生产数', field : 'planamount',halign:'center',align:'center',formatter:function(value,row){
|
||||
var str = row.alactamount + " / " + row.alpreamount + " / " + value;
|
||||
return str;
|
||||
}},
|
||||
{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;
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '140', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
if(row.relation == '${Relation_Link}')
|
||||
{
|
||||
str += '<img class="iconImg ext-icon-plugin" title="查看" onclick="viewProdtaskFun(\''+row.id+'\');"/> ';
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/editProdtask.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-plugin_link" title="编辑" onclick="editTORePDFun(\''+row.prodtaskrelationid+'\');"/> ';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-plugin_delete" title="删除" onclick="deleteTORePDFun(\''+row.prodtaskrelationid+'\',\''+row.id+'\');"/> ';
|
||||
<%}%>
|
||||
}else
|
||||
{
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewProdtaskFun(\''+row.id+'\');"/> ';
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/editProdtask.do")) {%>
|
||||
//str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editProdtaskFun(\''+row.id+'\');"/> ';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/> ';
|
||||
<%}%>
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
|
||||
] ],
|
||||
onResize:function(){
|
||||
$('#grid').datagrid('fixDetailRowHeight',index);
|
||||
},
|
||||
onLoadSuccess:function(){
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
setTimeout(function(){
|
||||
$('#grid').datagrid('fixDetailRowHeight',index);
|
||||
},0);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<!-- <%if (sessionManager.havePermission(session,"plan/taskorder/addTaskorder.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addTaskorderFun();">添加</a>
|
||||
</td>
|
||||
<%}%> -->
|
||||
<%if (sessionManager.havePermission(session,"plan/taskorder/deleteTaskOrder.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deleteATOFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
<!--<%if (sessionManager.havePermission(session,"plan/taskorder/doimport.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'iconImg ext-icon-table_save',plain:true"
|
||||
onclick="importFun();">导入</a>
|
||||
<%}%>
|
||||
</td> -->
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'iconImg ext-icon-table_save',plain:true"
|
||||
onclick="importERPFun();">ERP导入</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'iconImg ext-icon-table',plain:true"
|
||||
onclick="viewTaskOrderDayPlanAmountFun();">任务单一览查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<input name="idStr" type="hidden" />
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>任务单编号</td>
|
||||
<td><input name="search_tocode" class="easyui-textbox" /></td>
|
||||
<td>销售单编号</td>
|
||||
<td><input name="search_salesno" class="easyui-textbox" /></td>
|
||||
<td>产品编码</td>
|
||||
<td><input name="search_matercode" class="easyui-textbox" /></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>
|
||||
<td>展开所有任务</td>
|
||||
<td><input id="displayAllbtn" class="easyui-switchbutton" style="height:22px;width:50px;"
|
||||
data-options="onText:'是',offText:'否'" unchecked></td>
|
||||
<td><input id="notdisplayinvalid" name="notdisplayinvalid" type="hidden" value="" /></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