148 lines
4.6 KiB
Plaintext
148 lines
4.6 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/materialinventory/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() {
|
|
$("#materialcode").textbox('textbox').bind("click", function () {
|
|
selectmaterialcode();
|
|
$("#processid").val('${processid}');
|
|
|
|
});
|
|
$('#processid').combobox({
|
|
url : ext.contextPath + '/process/taskprocedure/getprovedurenamelist.do',
|
|
valueField:'id',
|
|
textField:'procedurename',
|
|
method:'get',
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form method="post" class="form">
|
|
<table class="table">
|
|
<tr>
|
|
<th>工序名称</th>
|
|
<td><input id="processid" name="processid" class="easyui-combobox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value=""
|
|
onclick="processFun();"/></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="" />
|
|
<input id="processid" name="processid" 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>
|
|
|
|
</table>
|
|
<br />
|
|
<!-- <table class="table">
|
|
<tr>
|
|
<th>产前线边库存盘点</th>
|
|
<td><input id="inventoryfrontline" name="inventoryfrontline" class="easyui-textbox" data-options="required:true,validType:'isBlank' " value="" />
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>当日领料</th>
|
|
<td><input id="pickingday" name="pickingday" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
|
</tr>
|
|
<tr>
|
|
<th>当日计划消耗量</th>
|
|
<td><input id="plannedconsumption" name="plannedconsumption" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
|
</tr>
|
|
<tr>
|
|
<th>当日产后线边库存盘点</th>
|
|
<td><input id="inventorycountpostpartum" name="inventorycountpostpartum" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
|
</tr>
|
|
<tr>
|
|
<th>当日实际消耗量</th>
|
|
<td><input id="actualconsumptionday" name="actualconsumptionday" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
|
</tr>
|
|
<tr>
|
|
<th>差额</th>
|
|
<td><input id="thedifferent" name="thedifferent" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
|
</tr>
|
|
<tr>
|
|
<th>差额超出预计百分比</th>
|
|
<td><input id="exceedsplannedpercentage" name="exceedsplannedpercentage" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value=""/></td>
|
|
</tr>
|
|
</table> -->
|
|
</form>
|
|
|
|
</body>
|
|
</html>
|