<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="decorator" content="base"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/static/css/reset.css" />
</head>
<body>
<div class="layui-card mb-0">
    <div class="layui-card-body over">
        <div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin">
            <div class="layui-form-item">
                <div class="contentBody">
                    <div class="layui-col-xs9 mb-10">
                        <label class="layui-form-label"><i class="mark">*</i>加急时间：</label>
                        <div class="layui-input-block">
                            <input type="text" value="${data.columns.complete_limit_length}" name="time" lay-verify="required|hour" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-col-xs1 mb-10">
                        <div class="f-l layui-word-aux lh-30" style="width: 30px;">小时</div>
                    </div>
                    <div class="layui-col-xs9 mb-10">
                        <label class="layui-form-label"><i class="mark">*</i>加急费用：</label>
                        <div class="layui-input-block">
                            <input value="<fmt:formatNumber type="number" value="${data.columns.complete_extend_cost}" maxFractionDigits="2"/>" type="text" name="money" lay-verify="required|price" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <input type="hidden" name="id"  value="${data.columns.id}"/>
                <input type="button" lay-submit lay-filter="sureSubmit" id="sureSubmit" value="确认">
            </div>
        </div>
    </div>
</div>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script>
    var $, form, layer;
    layui.use(['form','jquery','layedit'], function () {
        $ = layui.$,
        form = layui.form,
        layer = layui.layer;

        form.verify({
            hour: [
                /^[1-9]\d{0,2}$/
                ,'时间只能为不超过3位的整数'
            ]
            ,price:function (value){
                var te = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
                if(!te.test(value)){
                    return "加急费用格式不正确";
                }else if(parseInt(value)==0){
                    return "加急费用不能为0";
                }
            }
        });

    });


</script>
</body>
</html>