<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<style>
|
|
table tr{
|
height: 50px;
|
}
|
</style>
|
<title>一次成品率反馈</title>
|
<jsp:include page="../../../initlib/initAll.jsp"></jsp:include>
|
<script type="text/javascript">
|
|
$(function () {
|
var date=new Date;
|
var year=date.getFullYear();
|
var month=date.getMonth()+1;
|
month =(month<10 ? "0"+month:month);
|
var mydate = (year.toString()+"-"+month.toString());
|
console.info(mydate);
|
$("#date").my97('setValue',mydate);
|
getProd(mydate);
|
$("#btn").click(function(){
|
if($("#form").form("validate")) {
|
$.ajax( {
|
type:'POST',
|
url:'${pageContext.request.contextPath}/pms/test/sendFirstPassYield.do',// 跳转到 action
|
data:$("#form").form("getData"),
|
success:function(json) {
|
$.messager.alert('提示', "发送成功:"+json.msg, 'info');
|
$("#prod").combobox('clear');
|
$("#rate").numberbox('clear');
|
// alert("发送成功:"+json.msg);
|
// alert("发送成功!")
|
},error:function() {
|
alert("发送异常!");
|
}
|
});
|
|
}
|
/* var method = $("#method").combobox('getValue');
|
var xml = $("#xml").val();
|
$.ajax( {
|
type:'POST',
|
url:'${pageContext.request.contextPath}/pms/test/sendMsg.do',// 跳转到 action
|
data:{"method":method,"xml":xml},
|
success:function() {
|
alert("发送成功!")
|
},error:function() {
|
alert("发送异常!");
|
}
|
});*/
|
})
|
});
|
function changeDate(date){
|
getProd(date);
|
}
|
|
function getProd(date){
|
$("#prod").combobox({
|
url: '${pageContext.request.contextPath}/pms/mat/getProdByMonth.do?month='+date,
|
valueField:'id',
|
textField:'name',
|
panelHeight:200
|
})
|
}
|
|
</script>
|
</head>
|
<body class="easyui-layout" data-options="fit : true,border : false" style="align-items: center">
|
<div style="margin: 50px">
|
<form id="form" >
|
<table >
|
<tr>
|
<td align="right">日期:</td>
|
<td><input id="date" name="date" readOnly=true type="text"
|
class="easyui-my97" datefmt="yyyy-MM"
|
style="width:150px" data-options="onChange:changeDate,required:true,prompt:'请选择日期'"/></td>
|
</tr>
|
<tr>
|
<td align="right">牌号:</td>
|
<td><input id="prod" name = "prod" style="width: 150px" data-options="required:true,prompt:'请选择牌号'"></td>
|
</tr>
|
<tr>
|
<td align="right">一次成品率:</td>
|
<td><input id="rate" name = "rate" style="width: 150px" class="easyui-numberbox" data-options="required:true,prompt:'请输入一次成品率',precision:2"></td>
|
</tr>
|
<tr> <td colspan="2" align="center"><input type="button" id="btn" value = "发送" style="width: 80px"></td></tr>
|
|
</table>
|
</form>
|
|
|
|
|
|
</div>
|
</body>
|
</html>
|