<?php include_once(mvc::$cfg['PATH_TPL'] . 'public/headBase.php'); ?>
<style>
    .layui-form-label{
        padding: 0px;
        height: 28px;
        line-height: 28px;
        vertical-align: middle;
    }
    .layui-input-block .layui-form-radio{
        line-height: 28px;
        margin: 0px;
        vertical-align: middle;
    }
</style>
<div class="left-searchs" style="width: 100%;margin-top:10px;margin-left:10px; ">

    <div class="left-searchs">
        <form class="layui-form" action="<?php echo mvc::$cfg['SELF_URI']; ?>index/correctiveFeedback" method="get"
              id="SearchForm" style="margin-bottom:5px;">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-block " >
                        <input type="radio" name="jc_status" value="" title="全部" <?php if(empty($params['jc_status'])){ echo 'checked';} ?>>
                        <input type="radio" name="jc_status" value="0" title="待处理" <?php if(is_numeric($params['jc_status']) && $params['jc_status'] == 0){ echo 'checked';} ?>>
                        <input type="radio" name="jc_status" value="1" title="已处理" <?php if($params['jc_status'] == 1){ echo 'checked';} ?>>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">纠错类型</label>
                    <div class="layui-input-block ">
                       <select name="jc_type">
                          <option value="">全部</option>
                          <?php foreach ($jcType as $k => $value) { ?>
                               <option value="<?php echo $k; ?>" <?php if($k == $params['jc_type']){echo 'selected';} ?>><?php echo $value; ?>
                               </option>
                          <?php } ?>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <button class="layui-btn layuiadmin-btn-list" lay-submit="" lay-filter="LAY-app-contlist-search">
                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                    </button>
                </div>
            </div>
        </form>
    </div>

</div>
</div>
<div class="right-searchs" style="margin-left: 10px;width: 1800px">
    <table class="layui-table">
        <thead>
        <tr>
            <th style="width: 100px;">操作</th>
            <th style="width: 65px">纠错类型</th>
            <th style="width: 30px">状态</th>
            <th>反馈内容</th>
            <th>反馈图片</th>
            <th>审核意见</th>
            <th style=" width: 130px;">反馈时间</th>
            <th style=" width: 130px;">审核时间</th>
        </tr>
        </thead>
        <tbody class="clicktr">
        <?php if (!empty($proArr)) { ?>
            <?php foreach ($proArr as $v) { ?>
                <tr>
                    <td>
                        <a onclick="clickTitle(<?php echo $v['jc_id'] ?>)" href="javascript:;" class="layui-btn layui-btn layui-btn-xs" href="javascript:;" class="a_blue">编辑</a>
                        <a class="layui-btn layui-btn-danger layui-btn-xs" href="javascript:;" onclick="deletes(this, '<?php echo $v['jc_id']; ?>')" class="a_blue">删除</a>
                    </td>
                    <td>
                        <a href="javascript:;"  onclick="clickTitle(<?php echo $v['jc_id'] ?>)">
                            <?php echo $jcType[$v['jc_type']] ?: '未知'; ?>
                        </a>
                    </td>
                    <td><?php if ($v['jc_status'] == 1) {
                            echo '<div class="layui-table-cell laytable-cell-1-0-6">  <span class="green">已处理</span>  </div>';
                        } elseif ($v['jc_status'] == 0) {
                            echo '<div class="layui-table-cell laytable-cell-1-0-6">  <span class="gray">待处理</span>  </div>';
                        } ?></td>
                    <td><?php echo $v['jc_txt'] ? LibFc::msubstr($v['jc_txt'],0,50,"utf-8",true) : '' ?></td>
                    <td>
                        <?php if(is_array($v['jc_imgs']) && !empty($v['jc_imgs'])){  ?>
                            <?php foreach ($v['jc_imgs'] as $img){  ?>
                                <a href="<?php echo mvc::$cfg['FILE_CENTER']['b2c']['url_get'].'&c=advise&f='.str_replace("100/",'',$img) ?: ''; ?>&i=f1" target="_blank"><img style="max-width: 100px;max-height: 50px; " src="<?php echo mvc::$cfg['FILE_CENTER']['b2c']['url_get'].'&c=advise&f='.$img ?: ''; ?>&i=f1"></a>
                            <?php } ?>
                        <?php } ?>
                    </td>
                    <td><?php echo $v['jc_check_remark'] ? LibFc::msubstr($v['jc_check_remark'],0,50,"utf-8",true) : '' ?></td>
                    <td><?php echo date('Y-m-d h:i:s', $v['jc_atime']); ?></td>
                    <td><?php echo $v['jc_check_time'] ? date('Y-m-d h:i:s', $v['jc_check_time']) : ''; ?></td>
                </tr>
            <?php } ?>
        <?php } ?>
        </tbody>
    </table>
    <?php echo $pageMsg; ?>
</div>
<?php include_once(mvc::$cfg['PATH_TPL'] . 'public/footBase.php'); ?>