三层弹窗,如何获取checkbox 选择的值

85300371 7天前 79

2222.png

js代码

add: function () {
            // 初始化表格参数配置
            Table.api.init({
                extend: {
                    index_url: 'index/mclist/dev/id/' + Config.id,
                    add_url: '',
                    edit_url: '',
                    del_url: '',
                    multi_url: ''
                }
            });

            var table = $("#table");

            table.on('post-body.bs.table', function (e, settings, json, xhr) {
             
            });
            // 初始化表格
            table.bootstrapTable({
                url: $.fn.bootstrapTable.defaults.extend.index_url,
                sortName: 'm.code',
                columns: [
                    [
                        {field: 'state', checkbox: true},
                        {field: 'id', title: 'ID', operate: false, width: '60px'},
                        {field: 'code', title: __('编号'), operate: false},
                        {
                            field: 'name',
                            title: __('名称'),
                            operate: 'LIKE %...%',
                        },

                        {
                            field: 'address',
                            title: __('地址'),
                            operate: 'LIKE %...%',
                        },
                        {
                            field: 'mobile',
                            title: __('电话'),
                            operate: 'LIKE %...%',
                        },
                        {
                            field: 'operate', title: __('Operate'), table: table,
                            events: Table.api.events.operate,
                            formatter: Table.api.formatter.operate
                        }
                    ]
                ],
                pageSize: 15,
                showToggle: false,
                commonSearch: false,
                showExport:false,
            });
            // 为表格绑定事件
            //Table.api.bindevent(table);
            Form.api.bindevent($("form[role=form]"));

        },

add.html 代码

<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
<div class="panel panel-default panel-intro">
    {:build_heading()}
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover" width="100%">
                    </table>
                </div>
            </div>

        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-6 col-sm-3">
            <button type="submit" class="btn btn-danger btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</div>
</form>

第三个弹窗,选择的checkbox 值,点击确定按钮 获取选中值....

最后于 7天前 被85300371编辑
最新回复 (1)
  • 85300371 楼主 7天前
    感谢TA
    0 引用 2

    问题自己已解决!!!

  • 未登录
    3
返回