<!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="white-bg">
<div class="form-horizontal m wrapper wrapper-content animated fadeInRight ibox-content">
    <div class="col-sm-12 search-collapse">
        <form id="formId">
            <div class="select-list">
                <ul>
                    <li>
                        <label>订单号：</label>
                        <input type="text" name="orderCode"/>
                    </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>重置</a>
                    </li>
                </ul>
            </div>
        </form>
    </div>
    <div class="form-group">
        <table id="bootstrap-table"></table>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var certificateType = [[${@dict.getType('zhengzai_certificate_type')}]];
    var options = {
        url: [[${url_info}]],
        modalName: "入场人信息",
        orderSc: "desc",
        orderItem: "created_at",
        updateUrl: [[${url_single}]] + "/{id}",
        columns: [
            {
                field: 'expressContacts',
                title: '收货人'
            }, {
                field: 'expressAddress',
                title: '收货地址'
            }, {
                field: 'expressPhone',
                title: '收货人联系方式'
            },
            {
                title: '操作',
                align: 'center',
                formatter: function (value, rows, index) {
                    console.log(rows);
                    var actions = [];
                    actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + rows.orderCode + '\')"><i class="fa fa-edit"></i>修改</a> ');
                    return actions.join('');
                }
            }]
    };
    $.table.init(options);
    // }
</script>
</body>
</html>
