<!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="deptId"/>
                        </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="dept:config:add">
                <i class="fa fa-plus"></i> 添加
            </a>
            <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="dept:config:edit">
                <i class="fa fa-edit"></i> 修改
            </a>
            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="dept:config:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="dept:config: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('worker:config:edit')}]];
    var removeFlag = [[${@permission.hasPermi('worker:config:remove')}]];
    var prefix = ctx + "system/dept/config";

    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "分公司配置",
            columns: [{
                checkbox: true
            },
                {
                    field: 'sysDeptConfigId',
                    title: '主键id',
                    visible: false
                },
                {
                    field: 'deptId',
                    title: '分公司id',
                    visible: false
                },
                {
                    field: 'bannerUrl',
                    title: 'banner图'
                },
                {
                    field: 'singleMoney',
                    title: '社区保证金额'
                },
                {
                    field: 'singleOrderPay',
                    title: '社区接单数'
                },
                {
                    field: 'singleOrderNoPay',
                    title: '社区未缴纳接单数'
                },
                {
                    field: 'areaMoney',
                    title: '区域保证金额'
                },
                {
                    field: 'areaOrderPay',
                    title: '区域接单数'
                },
                {
                    field: 'areaOrderNoPay',
                    title: '区域未缴纳接单数'
                },
                {
                    field: 'cityMoney',
                    title: '城市保证金额'
                },
                {
                    field: 'cityOrderPay',
                    title: '城市接单数'
                },
                {
                    field: 'cityOrderNoPay',
                    title: '城市未缴纳接单数'
                },
                {
                    field: 'workerRate',
                    title: '业务员提成比例'
                },
                {
                    field: 'phone',
                    title: '手机号'
                },
                {
                    field: 'plainOutTime',
                    title: '排班超时罚金'
                },
                {
                    field: 'goOutTime',
                    title: '上门超时罚金'
                },
                {
                    field: 'goingOutTime',
                    title: '进行超时罚金'
                },
                {
                    field: 'goldenServer',
                    title: '金牌服务倍数'
                },
                {
                    field: 'monthRent',
                    title: '月租费用'
                },
                {
                    field: 'adapayAppId',
                    title: '第三方支付appid',
                    visible: false
                },
                {
                    field: 'adapayApiKey',
                    title: '第三方支付key',
                    visible: false
                },
                {
                    field: 'adapayMockKey',
                    title: '第三方支付测试key',
                    visible: false
                },
                {
                    field: 'adapayRsaPrivateKey',
                    title: '第三方支付私钥',
                    visible: false
                },
                {
                    field: 'adapayMaxRetryTimes',
                    title: '第三方支付重试次数',
                    visible: false
                },
                {
                    field: 'wxAppId',
                    title: '消费者appid',
                    visible: false
                },
                {
                    field: 'wxSecret',
                    title: '消费者密钥',
                    visible: false
                },
                {
                    field: 'servWxAppId',
                    title: '师傅端appid',
                    visible: false
                },
                {
                    field: 'servWxSecret',
                    title: '师傅端密钥',
                    visible: false
                },
                {
                    field: 'takeRate',
                    title: '平台扣点',
                    visible: false
                },
                {
                    field: 'remark',
                    title: '备注',
                    visible: false
                },
                {
                    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.sysDeptConfigId + '\')"><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.sysDeptConfigId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>