<?php include_once(mvc::$cfg['PATH_TPL'].'public/headBase.php');?>
<link rel="stylesheet" type="text/css" href="<?php echo mvc::$cfg['ADMIN_URL'];?>static/css/jquery.autocomplete.css">
<div style="height:814px;">
    <form action="<?php echo mvc::$cfg['ADMIN_URI'];?>shop/logLists" method="get" target="shopListFrame" id="BasicS">
        <table class="table table-bordered" id="SearchTable">
            <tr>
                <th class="TdR" width="100px">操作类型：</th>
                <td>
                    <select name="logStatus" class="form-control artleft-search-select pointer-input">
                        <option value="all" <?php if($_SESSION['_search_logStatus']=='all'){ echo "selected"; }?>>--全部--</option>
                        <?php foreach($logStatus as $key=>$value){ ?>
                            <option value="<?php echo $key;?>"><?php echo $value;?></option>
                        <?php } ?>
                    </select>
                </td>
            </tr>
            <tr>
                <th class="TdR">类型ID:</th>
                <td>
                    <input type="text" class="form-control search-input" value="" size="23" name='statusId'/>
                </td>
            </tr>
            <tr>
                <th class="TdR">店铺ID:</th>
                <td>
                    <input type="text" class="form-control search-input" value="" size="23" name='shopId'/>
                </td>
            </tr>
            <tr>
                <th class="TdR">店铺名称:</th>
                <td>
                    <input type="text" class="form-control search-input" value="" size="23" name='shopName' id='shop'/>
                    <input type="hidden" name="shopId" id="shopId">
                </td>
            </tr>
            <tr>
                <th class="TdR">账号ID:</th>
                <td>
                    <input type="text" class="form-control search-input" value="" size="23" name='userId'/>
                </td>
            </tr>
            <tr>
                <th class="TdR">账号名称:</th>
                <td>
                    <input type="text" class="form-control search-input" value="" size="23" name='userName'/>
                </td>
            </tr>
            <tr>
                <th class="TdR">操作时间:</th>
                <td>
                    <span class="datetimepicker-wraper search-input">
                        <input type="text" id="startTime" name="startTime" readonly class="date-input-style form-control pointer-input"/>
                        至
                        <input type="text" id="endTime" name="endTime" readonly class="form-control pointer-input date-input-style"/>
                        <div class="date-icon-box">
                            <span class="glyphicon glyphicon-th date-icon-style"></span>
                        </div>
                    </span>
                </td>
            </tr>
            <tr>
                <th class="TdR">排序:</th>
                <td>
                    <select name="logSeq" class="form-control artleft-search-select pointer-input ">
                        <option value="0" >日志ID升序</option>
                        <option value="1" >日志ID降序</option>
                        <option value="2" >店铺ID升序</option>
                        <option value="3" >店铺ID降序</option>
                        <option value="4" >账号ID升序</option>
                        <option value="5" >账号ID降序</option>
                        <option value="6" >类型ID升序</option>
                        <option value="7" >类型ID降序</option>
                        <option value="8" >操作时间升序</option>
                        <option value="9" >操作时间降序</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="reset" class="btn btn-default" value="重置" onclick="ResetAll();" />
                    <input type="submit" class="btn btn-primary" value="搜 索" class="BigBtn" />
                </td>
            </tr>
        </table>
    </form>      
    <div class="selected-art">
        <form action="<?php echo mvc::$cfg['ADMIN_URI'];?>shop/logLists" method="post" target="shopListFrame" id="logCheckTable">
            <table class="table">
                <thead>
                    <tr>
                        <th>已选配件</th>
                        <th width="40px">移除</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </form>           
        <div class="mar10">
			<button type="button" class="btn btn-default" onclick="logSelect();">所选</button>
			<button type="button" class="btn btn-warning" onclick="logClearAll();return false;" >清空</button>
			<button type="button" class="btn btn-danger" onclick="MESSAGE.confirm('确定要删除吗?','delLog(this,0)')">删除</button>
		</div>
    </div>
</div>
<script type="text/javascript" src="<?php echo mvc::$cfg['ADMIN_URL'];?>static/js/jquery.autocomplete.js"></script>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footBase.php');?>
<script type="text/javascript">
var AutoShopArr=<?php echo json_encode($shopArr);?>;
$(document).ready(function(){
    ajaxLogCheck('','');
    $("#shop").autocomplete(AutoShopArr, {
        minChars: 0,
        max: 500,
        matchContains : true,
        formatItem: function(row) {
            return row.shop_name;
        },
        formatMatch: function(row) {
            return row.shop_name;
        },
        formatResult: function(row) {
            return row.shop_name;
        },
    }).result(function(event, data, formatted){
        $('#shopId').val(data.shop_id);
    });
    $('#shop').blur(function(){
        if($(this).val()==''){
            $('#shopId').val('');
        }
    })
});
//初始化 开始时间  datetimepicker时间控件
laydate.render({
      elem: '#startTime', //指定元素
      type: 'datetime'
    });
//初始化 结束时间  datetimepicker时间控件
laydate.render({
      elem: '#endTime', //指定元素
      type: 'datetime'
    });
</script>
