<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
    <th:block th:include="include :: header('设置收款状态')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-contract-edit" th:object="${tblContract}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-2 control-label is-required">合同名称：</label>
            <div class="col-sm-3">
                <input name="name" th:field="*{name}" class="form-control" type="text" disabled="disabled">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label is-required">收款状态：</label>
            <div class="col-sm-5">
                <div class="radio-box" th:each="dict : ${@dict.getType('cnt_pay_status')}">
                    <input type="radio" th:id="${dict.dictCode}" name="payStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{payStatus}">
                    <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "system/contract";
    $("#form-contract-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-contract-edit').serialize());
        }
    }
</script>
</body>
</html>