<!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="serviceTypeNumber" id="serviceTypeNumber" 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="serviceTypeName" id="serviceTypeName" 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="serviceTypeDescription" id="serviceTypeDescription" 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="fulfillmentParty" id="fulfillmentParty" 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="create_time" id="create_time" 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 serviceTypeNumber = $("input[name='serviceTypeNumber']").val();
           var serviceTypeName = $("input[name='serviceTypeName']").val();
           var serviceTypeDescription = $("input[name='serviceTypeDescription']").val();
           var fulfillmentParty = $("input[name='fulfillmentParty']").val();
           var create_time = $("input[name='create_time']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "fwgl/sfwglservicetypeinfo/sFwglServicetypeinfoAdd",
            data : {
                "serviceTypeNumber": serviceTypeNumber,
                "serviceTypeName": serviceTypeName,
                "serviceTypeDescription": serviceTypeDescription,
                "fulfillmentParty": fulfillmentParty,
                "create_time": create_time,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
