| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- {extend name="layout:home" /}
- {block name="container"}
- <div class="layui-tab layui-tab-card">
- <div class="layui-tab-content page-tab-content">
- <!-- 搜索框开始 -->
- <div class="search-form">
- <div class="layui-form-item">
- <div class="layui-inline">
- <input type="text" class="layui-input" name="timeRang" id="timeRang" placeholder="选择时间段"
- style="width: 170px;">
- </div>
- <div class="layui-inline">
- <label>产品是否到期</label>
- <select name="type" id="type" lay-verify="" class="layui-select layui-unselect layui-form-select">
- <option value="">请选择</option>
- <option value="-1">到期</option>
- <option value="1">未到期</option>
- </select>
- </div>
- <div class="layui-inline">
- <button type="submit" class="layui-btn search-subBtn" onclick="showCurrent()">搜索</button>
- </div>
- </div>
- </div>
- <table class="layui-table lay-even">
- <colgroup>
- <col width="150">
- <col width="200">
- <col>
- </colgroup>
- <thead>
- <tr>
- <th>订单编号</th>
- <th>产品名称</th>
- <th>购买时间</th>
- <th>购买天数</th>
- <th>到期时间</th>
- </tr>
- </thead>
- <tbody>
- {if count($usermessage)}
- {volist name="usermessage" id="message"}
- <tr>
- <td>{$message.userproduct_identity}</td>
- <td>{$message.product_name}</td>
- <td>{$message.userProduct_buyTime}</td>
- <td>{$message.userProduct_dayNumber}</td>
- <td>{$message.userProduct_maturityTime}</td>
- </tr>
- {/volist}
- {else}
- <td colspan="7" style="text-align: center">无数据</td>
- {/if}
- </tbody>
- </table>
- {$show_page}
- </div>
- </div>
- <script>
- const myHost = "http://" + window.location.host;
- function showCurrent() {
- let timeRang = $("#timeRang").val();
- let type = $("#type").val();
- console.log(type);
- window.location.href = myHost + "/User/message/index.html?timeRang=" + timeRang + "&type=" + type;
- //window.location.href = myHost + "/User/message/index.html?timeRang=" + timeRang;
- }
- layui.use('laydate', function(){
- var laydate = layui.laydate;
- //执行一个laydate实例
- laydate.render({
- elem: '#creatTime' //指定元素
- });
- laydate.render({
- elem:'#timeRang',
- range:true,
- format: 'yyyy/MM/dd',
- done: function(value, date){
- /* 时间选择完成后的回调 */
- }
- })
- });
- </script>
- {/block}
|