zhuguifei
2026-03-10 58402bd5e762361363a0f7d7907153c77dbb819f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<%@ 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>