first commit
This commit is contained in:
129
bin/WebRoot/jsp/material/MaterialApplicationAdd.jsp
Normal file
129
bin/WebRoot/jsp/material/MaterialApplicationAdd.jsp
Normal file
@ -0,0 +1,129 @@
|
||||
<!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 + "/material/materialapplication/save.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 selectmaterialcode(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择物料',
|
||||
width: 800,
|
||||
height:550,
|
||||
url : ext.contextPath + '/material/materialinventory/select.do',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
chosematerial(res)
|
||||
//$("#div_product").panel('close');
|
||||
}
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
function chosematerial(res){
|
||||
//console.log("res",res);
|
||||
$("#materialcode").textbox('setValue',res.materialcode);//easyui textbox赋值jquery不一样
|
||||
$("#materialid").val(res.id);
|
||||
$("#materialname").html(res.materialname);
|
||||
$("#unit").html(res.unit);
|
||||
}
|
||||
$(function() {
|
||||
$('#taskorderid').combobox({
|
||||
url : ext.contextPath + '/plan/taskorder/getTaskorder1.do',
|
||||
valueField:'id',
|
||||
textField:'tasklistcode',
|
||||
method:'get',
|
||||
onSelect: function () {
|
||||
$('#workorderid').combobox({
|
||||
url : ext.contextPath + '/work/workorder/getlistbyplanid.do?taskorderid=' + $('#taskorderid').combobox('getValue'),
|
||||
valueField:'id',
|
||||
textField:'workorderno',
|
||||
method:'get',
|
||||
})},
|
||||
});
|
||||
$("#materialcode").textbox('textbox').bind("click", function () {
|
||||
selectmaterialcode();
|
||||
$("#processid").val('${processid}');
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>任务单编号</th>
|
||||
<td><input id="taskorderid" name="taskorderid" class="easyui-combobox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工单编号</th>
|
||||
<td><input id="workorderid" name="workorderid" class="easyui-combobox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料代码</th>
|
||||
<td><input id="materialcode" name="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="" readonly/>
|
||||
<input id="materialid" name="materialid" type="hidden" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td><span id="materialname"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>单位</th>
|
||||
<td><span id="unit"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当前库存</th>
|
||||
<td><input name="currentinventory" class="easyui-textbox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料需求</th>
|
||||
<td><input name="materialrequest" class="easyui-textbox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>补料需求</th>
|
||||
<td><input name="supplymaterial" class="easyui-textbox" value="" data-options="required:true,validType:'isBlank'"/></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user