<!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-SSpglJfspProductinfo-add" class="customize-search-form">

            <div class="customize-form-group-container"> <div class="customize-form-group">
                <label>D值品编码:</label>
                <input name="d_value_code" placeholder="请输入D值品编码" id="d_value_code" class="styled-input" type="text">
            </div>

            <div class="customize-form-group">
                <label>D值品名称:</label>
                <input name="dValueName" placeholder="请输入D值品名称" id="dValueName" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>配置状态:</label>
                <select name="status" id="status" class="styled-input" th:with="type=${@dict.getType('sys_hzgl_qyty_status')}">
                    <option value="">请选择</option>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>
            </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-SSpglJfspProductinfo-add").serializeArray();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dzpz/dvalueConfig/savedvalueconfig",
            data : data,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
