115 lines
3.2 KiB
Plaintext
115 lines
3.2 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 + "/material/NotBOMPick/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 selectMaterialinfo(materialid,materialcode){
|
|
var dialog = parent.ext.modalDialog({
|
|
title : '选择物料',
|
|
width: 800,
|
|
height:550,
|
|
url : ext.contextPath + '/material/NotBOMPick/showMaterialofNotBOM.do?iframeId=notBOMAdd',
|
|
buttons : [{
|
|
text : '确定',
|
|
iconCls:'icon-ok',
|
|
handler : function() {
|
|
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
|
|
|
if(res!=null){
|
|
$("#materialcode").textbox('setValue',res.materialcode);//easyui textbox赋值jquery不一样
|
|
$("#materialid").val(res.id);
|
|
$("#materialname").html(res.materialname);
|
|
$("#unit").html(res.unit);
|
|
$("#materialmodel").html(res.materialmodel);
|
|
}
|
|
dialog.dialog('destroy');
|
|
|
|
}
|
|
},
|
|
{
|
|
text : '取消',
|
|
iconCls:'icon-cancel',
|
|
handler : function() {
|
|
dialog.dialog('destroy');
|
|
|
|
}
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
$(function() {
|
|
$("#materialcode").textbox('textbox').bind("click", function () {
|
|
selectMaterialinfo("materialid","materialcode");
|
|
});
|
|
});
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form method="post" class="form">
|
|
<input id="materialid" name="materialid" type="hidden" value="${notBOM.id}" />
|
|
<table class="table">
|
|
<tr>
|
|
<th>操作类型</th>
|
|
<td colspan='1'>
|
|
<select id="handletype" name="handletype" class="easyui-combobox" style="width:200px">
|
|
<option value='0' select>领料</option>
|
|
<option value='1'>退料</option>
|
|
</select></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th>物料代码</th>
|
|
<td>${notBOM.materialcode}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>物料名称</th>
|
|
<td>${notBOM.materialname}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>操作数量</th>
|
|
<td>
|
|
<input id="handlenum" name="handlenum" class="easyui-textbox"
|
|
data-options="required:true,validType:'isBlank'" value="" />
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th>单位</th>
|
|
<td>${notBOM.unit}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>领(退)料时间</th>
|
|
<td><input id="handledate" name="handledate" class="Wdate"
|
|
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"readonly/>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
</table>
|
|
</form>
|
|
</body>
|
|
</html>
|