<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>
        <!-- 省市区样式 -->
        <link rel="stylesheet" th:href="@{'/layui/lay/mymodules/region.css'}">

        <style>
            .flowCardClass {
                width: 100px;
            }
            #flowCardEdit .layui-form-item .layui-input-inline {
                width: 310px;
            }
        </style>
    </head>
    <body>

        <div class="layui-fluid" id="flowCardEdit">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form">
                                <div class="layui-form-item">
                                    <label class="layui-form-label flowCardClass"><span class="must">*</span><span>流量卡号:</span></label>
                                    <div class="layui-input-inline">
                                        <input name="cardNum" type="number" lay-verify="required|number" placeholder="请输入流量卡号"
                                               autocomplete="off" class="layui-input" th:value="${flowCard.cardNum}" readonly/>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label flowCardClass"><span class="must">*</span><span>运营商:</span></label>
                                    <div class="layui-input-inline">
                                        <div id="operator"></div>
                                        <input type="hidden" id="operatorValue" th:value="${flowCard.operator}">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label flowCardClass"><span class="must">*</span><span>卡有效期:</span></label>
                                    <div class="layui-input-inline">
                                        <input type="text" disabled  class="layui-input date-icon layui-disabled" id="card_date"  placeholder="请选择卡号有效期"
                                               th:value="${#dates.format(flowCard.beginDate,'yyyy-MM-dd HH:mm:ss')} + ' - '
                                                + ${#dates.format(flowCard.endDate,'yyyy-MM-dd HH:mm:ss')}" autocomplete="off" lay-verify="required">
                                        <input type="hidden" lay-verify="required"  name="beginDate" id="begin_date" th:value="${#dates.format(flowCard.beginDate,'yyyy-MM-dd HH:mm:ss')}" />
                                        <input type="hidden" lay-verify="required"  name="endDate" id="end_date" th:value="${#dates.format(flowCard.endDate,'yyyy-MM-dd HH:mm:ss')}"/>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label flowCardClass"><span class="must">*</span><span>所属机构:</span></label>
                                    <div class="layui-input-inline">
                                        <input type="hidden" id="org_id" th:value="${flowCard.orgId}"/>
                                        <input type="text" lay-verify="required" th:value="${flowCard.orgName}" class="layui-input layui-disabled" disabled>
<!--                                        <select id="select_org" disabled lay-search="" name="orgId" lay-verify="required" lay-filter="org_pid_event" ></select>-->
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label flowCardClass"><span>流量套餐名称:</span></label>
                                    <div class="layui-input-inline">
                                        <input name="packName" type="text" placeholder="" autocomplete="off" class="layui-input" th:value="${flowCard.packName}" />
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label flowCardClass"><span>套餐总流量（MB）:</span></label>
                                    <div class="layui-input-inline">
                                        <input name="packFlow" type="number" placeholder="" autocomplete="off" class="layui-input" th:value="${flowCard.packFlow}" />
                                    </div>
                                </div>
                                    <!-- 按钮 -->
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" id="extension_button" lay-filter="extension_button" lay-submit>延期</button>
                                        <button class="layui-btn" lay-submit lay-filter="entity_submit_event">保存</button>
                                        <button type="reset" class="layui-btn layui-btn-primary">取消</button>
                                    </div>
                                </div>
                                <input type="hidden" lay-verify="required" name="id" th:value="${id}" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </body>
    <!-- javascript -->
    <!--去掉input type="number"后面的箭头-->
    <style type="text/css">
        input::-webkit-outer-spin-button,
        input::-webkit-inner-spin-button {
            -webkit-appearance: none;
        }
        input[type="number"] {
            -moz-appearance: textfield;
        }
    </style>

    <script type="text/javascript" th:src="@{'/layui/layui.js'}" charset="utf-8"></script>
    <script type="text/javascript">
        layui.config({
            base: '/' //静态资源所在路径
        });
    </script>
    <script type="text/javascript" th:src="@{'/js/device/device-flowcard-edit.js'}" charset="utf-8"></script>
</html>