remove.html 1.58 KB
<!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">
        <form class="form-horizontal m">
            <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" autofocus>
                </div>
            </div>
            <div class="form-group">
                <div class="form-control-static col-sm-offset-9">
                    <input  type="button" onclick="removeSubmit()" class="btn btn-primary" value="提交">
                    <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 + "receipt/AgvReceiving";
    function removeSubmit() {
        let message=$("#result").val();
        $.ajax({
            url:prefix+'/TaskCancel',
            type:'post',
            data:{
                message:message
            },
            success:function (res) {
                if (res.code === '200') {
                    $.modal.close();
                    $.modal.alertSuccess("取消成功");
                }
                else {
                    $.modal.alertWarning(res.msg);
                }
            }
        })

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