<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('编辑快递模版')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-post-add">
        <div class="form-group">
            <label class="col-sm-2 control-label is-required">快件产品名称：</label>
            <div class="col-sm-10">
                <input th:value="${KylinExpressModule.title}" class="form-control" type="text" name="title"
                       id="title" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label is-required">快件产品名称：</label>
            <div class="col-sm-10">
                <input th:value="${KylinExpressModule.productCode}" class="form-control" type="number" name="productCode"
                       id="productCode" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label is-required">时效类型：</label>
            <div class="col-sm-10">
                <input th:value="${KylinExpressModule.agingType}" class="form-control" type="text" name="agingType"
                       id="agingType" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label is-required">快递预估价格小：</label>
            <div class="col-sm-10">
                <input th:value="${KylinExpressModule.estimatePriceMin}" class="form-control" type="number" name="estimatePriceMin"
                       id="estimatePriceMin" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label is-required">快递预估价格大：</label>
            <div class="col-sm-10">
                <input th:value="${KylinExpressModule.estimatePriceMax}" class="form-control" type="number" name="estimatePriceMax"
                       id="estimatePriceMax" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">是否上线</label>
            <div class="col-sm-10">
                <div class="radio check-box">
                    <label>
                        <input type="radio" value="1" name="isOnline"
                               th:checked="${KylinExpressModule.isOnline==1 ? true : false}"> <i></i> 未上线
                    </label>
                </div>
                <div class="radio check-box">
                    <label>
                        <input type="radio" value="2" name="isOnline"
                               th:checked="${KylinExpressModule.isOnline==2 ? true : false}"> <i></i> 已上线
                    </label>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "kylin/expressModule";
    var moduleId = "[[${KylinExpressModule.moduleId}]]";

    function submitHandler() {
        if ($.validate.form()) {
            var data = $('#form-post-add').serializeArray();
            data.push({"name": "moduleId", "value": moduleId});
            $.operate.save(prefix + "/update", data);
        }
    }
</script>
</body>
</html>