<!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 id="form-SDaasChannelManagement-add" class="customize-search-form">
        <div class="customize-form-group-container">
            <div class="customize-form-group">
                <label>渠道名称:</label>
                <select name="channelName"  class="styled-input" required>
                    <option value="药急送">药急送</option>
                    <option value="美团外卖">美团外卖</option>
                    <option value="京东到家">京东到家</option>
                    <option value="天猫商城">天猫商城</option>
                    <option value="饿了么">饿了么</option>
                </select>
            </div>
<!--            <div class="customize-form-group">-->
<!--                <label>渠道代码:</label>-->
<!--                <input name="channelCode" placeholder="渠道代码"  id="channelCode" class="styled-input" type="text">-->
<!--            </div>-->
            <div class="customize-form-group">
                <label>渠道类型:</label>

                <select name="channelType"  class="styled-input"  th:with="type=${@dict.getType('sys_select_qdgl_qdlx')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
                    ></option>
                </select>
            </div>
            <div class="customize-form-group">
                <label>联系人:</label>
                <input name="contactPerson" placeholder="联系人"  id="contactPerson" class="styled-input" type="text" required>
            </div>
            <div class="customize-form-group">
                <label>联系电话:</label>
                <input name="contactPhone" placeholder="联系电话"  id="contactPhone" class="styled-input" type="number" maxlength="11" required>
            </div>
            <div class="customize-form-group">
                <label>电子邮件:</label>
                <input name="email" placeholder="电子邮件"  id="email" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>地址:</label>
                <input name="address" placeholder="地址"  id="address" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>渠道状态</label>
                <select name="status"  class="styled-input"  th:with="type=${@dict.getType('sys_select_qdgl_qdzt')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
                            ></option>
                </select>
            </div>
<!--            <div class="customize-form-group">-->
<!--                <label>创建时间:</label>-->
<!--                <input name="createdAt" placeholder="创建时间"  id="createdAt" class="styled-input" type="text">-->
<!--            </div>-->
<!--            <div class="customize-form-group">-->
<!--                <label>创建人:</label>-->
<!--                <input name="createdBy" placeholder="创建人"  id="createdBy" class="styled-input" type="text">-->
<!--            </div>-->
<!--            <div class="customize-form-group">-->
<!--                <label>更新时间:</label>-->
<!--                <input name="updatedAt" placeholder="更新时间"  id="updatedAt" class="styled-input" type="text">-->
<!--            </div>-->
<!--            <div class="customize-form-group">-->
<!--                <label>更新人:</label>-->
<!--                <input name="updatedBy" placeholder="更新人"  id="updatedBy" class="styled-input" type="text">-->
<!--            </div>-->
            <div class="customize-form-group">
                <label>备注:</label>
                <input name="remarks" placeholder="备注"  id="remarks" class="styled-input" type="text">
            </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 data = $("#form-SDaasChannelManagement-add").serializeArray();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "daas/sdaaschannelmanagement/sDaasChannelManagementAdd",
            data : data,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
