first commit
This commit is contained in:
95
bin/WebRoot/jsp/process/realDetailsMaterialEdit.jsp
Normal file
95
bin/WebRoot/jsp/process/realDetailsMaterialEdit.jsp
Normal file
@ -0,0 +1,95 @@
|
||||
<!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 + "/process/realDetailsMaterial/update.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 selectMaterial(){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择材料',
|
||||
width : 800,
|
||||
height : 400,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/material/materialinfo/selectBomMaterial.do?productcode=${productcode}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#materialid").val((res.materialid== 'undefined')?'':res.materialid);
|
||||
$("#materialcode").textbox('setValue',(res.materialcode == 'undefined')?'':res.materialcode);
|
||||
|
||||
$("#materialname").text((res.materialname == 'undefined')?'':res.materialname);
|
||||
$("#materialspec").text((res.spec == 'undefined')?'':res.spec);
|
||||
$("#unit").text((res.unit == 'undefined')?'':res.unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#materialcode").textbox("textbox").bind("click",function(){
|
||||
selectMaterial();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${realDetailsMaterial.id}"/>
|
||||
<input type="hidden" name="productcode" value="${productcode}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
<td>
|
||||
<input id="materialid" name="materialid" type="hidden" value="${realDetailsMaterial.materialid }"/>
|
||||
<input id="materialcode" class="easyui-textbox" data-options="required:true,validType:'isBlank',editable:false" value="${realDetailsMaterial.material.materialcode }" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<td>
|
||||
<label id="materialname">${realDetailsMaterial.material.materialname }</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料规格</th>
|
||||
<td>
|
||||
<label id="materialname">${realDetailsMaterial.material.spec }</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>物料数量</th>
|
||||
<td>
|
||||
<input id="amount" name="amount" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="${realDetailsMaterial.amount}" />
|
||||
<label id="unit">${realDetailsMaterial.material.unit}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user