<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('任务列表新增')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-role-add">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                            <label class="col-sm-3 control-label">业务归属:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="businessBelonging" id="businessBelonging" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">任务类型:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="taskType" id="taskType" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">患者姓名:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="patientName" id="patientName" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">创建时间:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="createTime" id="createTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">完成时间:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="completeTime" id="completeTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">跟进人:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="follower" id="follower" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">门店:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="store" id="store" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">连锁:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="chain" id="chain" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">状态:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="status" id="status" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                </div>
            </div>

        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">

    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }

    function add() {
           var businessBelonging = $("input[name='businessBelonging']").val();
           var taskType = $("input[name='taskType']").val();
           var patientName = $("input[name='patientName']").val();
           var createTime = $("input[name='createTime']").val();
           var completeTime = $("input[name='completeTime']").val();
           var follower = $("input[name='follower']").val();
           var store = $("input[name='store']").val();
           var chain = $("input[name='chain']").val();
           var status = $("input[name='status']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dtp/sdtprwglbusinesstask/sDtpRwglBusinesstaskAdd",
            data : {
                "businessBelonging": businessBelonging,
                "taskType": taskType,
                "patientName": patientName,
                "createTime": createTime,
                "completeTime": completeTime,
                "follower": follower,
                "store": store,
                "chain": chain,
                "status": status,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
