<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('项目列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>地区id：</label>
                                <input type="text" name="areaId"/>
                            </li>
                            <li>
                                <label>地区名：</label>
                                <input type="text" name="areaName"/>
                            </li>
                            <li>
                                <label>公告标题：</label>
                                <input type="text" name="noticeName"/>
                            </li>
                            <li>
                                <label>发布时间：</label>
                                <input type="text" name="ctime"/>
                            </li>
                            <li>
                                <label>项目名称：</label>
                                <input type="text" name="name"/>
                            </li>
                            <li>
                                <label>项目编号：</label>
                                <input type="text" name="number"/>
                            </li>
                            <li>
                                <label>预算：</label>
                                <input type="text" name="budget"/>
                            </li>
                            <li>
                                <label>招标单位：</label>
                                <input type="text" name="bidUnit"/>
                            </li>
                            <li>
                                <label>招标联系人：</label>
                                <input type="text" name="bidName"/>
                            </li>
                            <li>
                                <label>招标联系电话：</label>
                                <input type="text" name="bidPhone"/>
                            </li>
                            <li>
                                <label>代理单位：</label>
                                <input type="text" name="agentUnit"/>
                            </li>
                            <li>
                                <label>代理联系人：</label>
                                <input type="text" name="agentName"/>
                            </li>
                            <li>
                                <label>代理联系电话：</label>
                                <input type="text" name="agentPhone"/>
                            </li>
                            <li>
                                <label>原文链接：</label>
                                <input type="text" name="sourceUrl"/>
                            </li>
                            <li>
                                <label>数据来源：</label>
                                <input type="text" name="fromData"/>
                            </li>
                            <li>
                                <label>${comment}：</label>
                                <input type="text" name="inaword"/>
                            </li>
                            <li>
                                <label>${comment}：</label>
                                <input type="text" name="descs"/>
                            </li>
                            <li>
                                <label>招标状态0招标，1中标：</label>
                                <input type="text" name="bidState"/>
                            </li>
                            <li>
                                <label>中标金额：</label>
                                <input type="text" name="amount"/>
                            </li>
                            <li>
                                <label>中标单位：</label>
                                <input type="text" name="winUnit"/>
                            </li>
                            <li>
                                <label>中标联系人：</label>
                                <input type="text" name="winName"/>
                            </li>
                            <li>
                                <label>中标联系电话：</label>
                                <input type="text" name="winPhone"/>
                            </li>
                            <li>
                                <label>开标日期：</label>
                                <input type="text" name="openTime"/>
                            </li>
                            <li>
                                <label>收藏次数：</label>
                                <input type="text" name="storeNumber"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="business:bid:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="business:bid:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:bid:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="business:bid:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('business:bid:edit')}]];
        var removeFlag = [[${@permission.hasPermi('business:bid:remove')}]];
        var prefix = ctx + "business/bid";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "项目",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'bidId',
                    title: '${comment}',
                    visible: false
                },
                {
                    field: 'areaId',
                    title: '地区id'
                },
                {
                    field: 'areaName',
                    title: '地区名'
                },
                {
                    field: 'noticeName',
                    title: '公告标题'
                },
                {
                    field: 'noticeType',
                    title: '公告类别'
                },
                {
                    field: 'ctime',
                    title: '发布时间'
                },
                {
                    field: 'name',
                    title: '项目名称'
                },
                {
                    field: 'number',
                    title: '项目编号'
                },
                {
                    field: 'budget',
                    title: '预算'
                },
                {
                    field: 'bidUnit',
                    title: '招标单位'
                },
                {
                    field: 'bidName',
                    title: '招标联系人'
                },
                {
                    field: 'bidPhone',
                    title: '招标联系电话'
                },
                {
                    field: 'agentUnit',
                    title: '代理单位'
                },
                {
                    field: 'agentName',
                    title: '代理联系人'
                },
                {
                    field: 'agentPhone',
                    title: '代理联系电话'
                },
                {
                    field: 'sourceUrl',
                    title: '原文链接'
                },
                {
                    field: 'fromData',
                    title: '数据来源'
                },
                {
                    field: 'inaword',
                    title: '${comment}'
                },
                {
                    field: 'descs',
                    title: '${comment}'
                },
                {
                    field: 'bidState',
                    title: '招标状态0招标，1中标'
                },
                {
                    field: 'amount',
                    title: '中标金额'
                },
                {
                    field: 'winUnit',
                    title: '中标单位'
                },
                {
                    field: 'winName',
                    title: '中标联系人'
                },
                {
                    field: 'winPhone',
                    title: '中标联系电话'
                },
                {
                    field: 'openTime',
                    title: '开标日期'
                },
                {
                    field: 'storeNumber',
                    title: '收藏次数'
                },
                {
                    field: 'companyStatus',
                    title: '工商数据清洗  0 未清洗 1 清洗'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.bidId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.bidId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>