123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- {% extends "../theme.html" %}
- {% block content %}
- {%include 'inc/menu.html'%}
- <div class="pannel">
- <form action="/device/out" method="get" style="height: 500px;">
- <input type="hidden" name="type" id="type" value="{{data['input']['type']}}" />
- <input type="hidden" name="id" id="id" value="{{data['input']['id']}}" />
- <input type="hidden" name="method" id="method" value="mx" />
- <select multiple="multiple" name="device" id="device" style="height: 500px;">
- {% for v in data['device'] %}
- <option value="{{v['id']}}" {% if 'device' in data['search'] and data['search']['device'] == v['id'] %}selected{% end %}>{{v['name']}}</option>
- {% end %}
- </select>
- <input type="text" name="start" id="start" readonly class="form_datetime" value="{% if 'start' in data['search'] %}{{data['search']['start']}}{% end %}" style="width:150px;">
- ~
- <input type="text" name="end" id="end" readonly class="form_datetime" value="{% if 'end' in data['search'] %}{{data['search']['end']}}{% end %}" style="width:150px;">
- <input type="submit" value="导出报表">
- </form>
- </div>
- {% end %}
- {% block script %}
- <script type="text/javascript" src="{{static_url('pc/lib/laydate/laydate.js')}}"></script>
- <script type="text/javascript">
- dateTheme = '#247ed0'
- laydate.render({
- elem: '#start'
- ,theme: dateTheme
- ,max: 0
- ,type: 'datetime'
- /*
- ,mark: {
- '0-9-14': '浇水'
- ,'0-9-26': '施肥' //每年的日期
- }
- */
- ,done: function(value, date){
- /*
- if(date.year === 2017 && date.month === 9 && date.date === 14){
- alert('我都干了什么啊');
- }
- */
- var start = value
- var end = $("#end").val()
- if (start || end) {
- $("#group").hide();
- } else {
- $("#group").show();
- }
- }
- });
- laydate.render({
- elem: '#end'
- ,theme: dateTheme
- //,min: $('#start').val()
- ,max: 0
- ,type: 'datetime'
- ,done: function(value, date){
- var start = $("#start").val()
- var end = value
- if (start || end) {
- $("#group").hide();
- } else {
- $("#group").show();
- }
- }
- });
- </script>
- {% end %}
|