85 lines
2.5 KiB
Plaintext
85 lines
2.5 KiB
Plaintext
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|
<html>
|
|
<head>
|
|
<title></title>
|
|
<jsp:include page="../inc.jsp"></jsp:include>
|
|
<script type="text/javascript">
|
|
function dosave(dialog,grid) {
|
|
if ($(".form").form('validate')) {
|
|
$.post(ext.contextPath + "/plan/taskorder/saveRelation.do", $(".form").serialize(), function(data) {
|
|
if (data.res == 1) {
|
|
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
|
grid.datagrid('reload');
|
|
dialog.dialog('destroy');
|
|
});
|
|
}else if(data.res == 0){
|
|
top.$.messager.alert('提示', "保存失败", 'info');
|
|
}else{
|
|
top.$.messager.alert('提示', data.res, 'info');
|
|
}
|
|
},'json');
|
|
}
|
|
}
|
|
|
|
function selectRelation(){
|
|
localStorage.setItem("prodtaskid",$("#prodtaskid").val().split(","));
|
|
var dialog = parent.ext.modalDialog({
|
|
title : '选择关联任务',
|
|
width: 800,
|
|
height:550,
|
|
url : ext.contextPath + '/plan/taskorder/selectRelation.do?',
|
|
buttons : [{
|
|
text : '确定',
|
|
iconCls:'icon-ok',
|
|
handler : function() {
|
|
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
|
if(res!=null){
|
|
$("#prodtask").textbox('setValue',res.taskcode);//easyui textbox赋值jquery不一样
|
|
$("#prodtaskid").val(res.id);
|
|
}
|
|
dialog.dialog('destroy');
|
|
}
|
|
},
|
|
{
|
|
text : '取消',
|
|
iconCls:'icon-cancel',
|
|
handler : function() {
|
|
dialog.dialog('destroy');
|
|
}
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
$(function() {
|
|
$("#prodtask").textbox('textbox').bind("click", function () {
|
|
selectRelation();
|
|
});
|
|
})
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form method="post" class="form">
|
|
<input id="taskorderid" name="taskorderid" type="hidden" value="${toid}"/>
|
|
<table class="table">
|
|
<tr>
|
|
<th>关联任务</th>
|
|
<td><input id="prodtask" name="prodtask" class="easyui-textbox"
|
|
class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly"/>
|
|
<input id="prodtaskid" name="prodtaskid" type="hidden" value=""/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>数量</th>
|
|
<td><input name="amount" class="easyui-textbox"
|
|
data-options="required:true,validType:'isBlank'" type="text" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</body>
|
|
</html>
|