<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('门店积分商品列表修改')" />
</head>
<body>
<div class="ui-layout-center">
    <form id="form-SSpglJfspProductinfo-edit" class="customize-search-form">

        <div class="customize-form-group-container">
            <input type="hidden" id="id" name="id" th:value="${id}">
            <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"  th:value="${d_value_code}" class="styled-input" disabled type="text">
            </div>

                <div class="customize-form-group">
                    <label>D值品名称:</label>
                    <input name="dValueName" placeholder="请输入D值品名称" id="dValueName" th:value="${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')}" th:value="${status}">
                        <option value="">请选择</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${dict.dictValue}==${status}"></option>
                    </select>
                </div>

            </div>
        </div>

    </form>
</div>
<div class="main-content">
    <div class="col-sm-offset-5 col-sm-10">
    </div>
</div>
<th:block th:include="include :: footer" />
</body>
</html>
<script>
    function edit() {
        var data = $("#form-SSpglJfspProductinfo-edit").serializeArray();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dzpz/dvalueConfig/dvalueconfigEdit",
            data : data,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }

    function submitHandler() {
        if ($.validate.form()) {
            edit();
        }
    }
</script>
