Blame view

src/main/resources/templates/task/agvTask/remove.html 1.69 KB
周鸿 authored
1
2
3
4
5
6
<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
周鸿 authored
7
    <form class="form-horizontal m" id="agvremove">
周鸿 authored
8
9
10
11
12
13
14
15
        <div class="form-group">
            <label class="col-sm-3 control-label">取消理由:</label>
            <div class="col-sm-8">
                <input id="result" name="price" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <div class="form-control-static col-sm-offset-9" style="margin-left: 30%">
周鸿 authored
16
                <button type="submit"  class="btn btn-primary">提交</button>
周鸿 authored
17
18
19
20
21
22
23
24
                <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "task/agvTask";
周鸿 authored
25
26
27
28
29
30
    $("#agvremove").validate({
        submitHandler: function(form) {
            removeSubmit();
        }
    })
周鸿 authored
31
32
    function removeSubmit() {
        let message=$("#result").val();
周鸿 authored
33
周鸿 authored
34
        $.ajax({
周鸿 authored
35
            url:prefix+'/taskCancel',
周鸿 authored
36
37
38
39
40
41
42
43
44
45
46
47
            type:'post',
            data:{
                message:message
            },
            success:function (res) {
                if (res.code === '200') {
                    $.modal.close();
                    $.modal.alertSuccess("取消成功");
                }
                else {
                    $.modal.alertWarning(res.msg);
                }
周鸿 authored
48
49
50
            },
            error: function(xhr, textStatus) {
            },
周鸿 authored
51
52
53
54
55
56
        })

    }
</script>
</body>
</html>