Hotel/js/search.js

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


//操作符
var arr_op = [{ "txt": "等於", "val": "eq" },
                { "txt": "不等於", "val": "ne" },
                { "txt": "大於", "val": "gt" },
                { "txt": "大於等於", "val": "ge" },
                { "txt": "小於", "val": "lt" },
                { "txt": "小於等於", "val": "le" },
                { "txt": "包含%%", "val": "cn" },
                { "txt": "以%開始", "val": "bw" },
                { "txt": "以%結束", "val": "ew" }];

var rule = '<tr>\
                <td class="filter-first-td"></td>\
                <td class="columns"><select class="fields"></select></td>\
                <td class="operators"><select class="selectopts"></select></td>\
                <td class="data"><input type="text" style="width: 98%; "  class="input-data"/></td>\
                <td><input type="button" class="del-rule" value="-" title="刪除條件"/></td>\
            </tr>';

var group = '<tr><td class="filter-first-td"></td><td colspan="4"><table width="98%" class="group" style="border:0px none;"><tr><th colspan="5" align="left"><select class="opsel"><option value="AND" selected="selected">And</option><option value="OR">Or</option></select><input type="button" value="+ {}" title="Add subgroup" class="add-group"><input type="button" value="+" title="Add rule" class="add-rule ui-add"><input type="button" value="-" title="Delete group" class="del-group"></th></tr></table></td></tr>';

var gridid = '';

var search = {
    go: function (gridId) {
        gridid = gridId;
        var sDialog = top.$.hDialog({
            href: '../html/search.html?n=' + Math.random(),
            title: '多重查詢', iconCls: 'icon-folder_magnify', width: 500, height: 400,
            cache: false, closable: true,
            toolbar: [
                {
                    text: '查看條件', iconCls: 'icon-script_code', handler: function () {
                        top.$.hDialog({
                            content: '<div style="padding:10px; font-family:consolas; font-size:14px; line-height:20px;">' + search.toSqlWhere() + '</div>',
                            width: 400, height: 300, showbtn: false, cache: false, title: '條件 SQL 語句 ', modal: false
                        });
                    }
                },
                {
                    text: '條件重置', iconCls: 'icon-lightning', handler: function () {
                        sDialog.dialog('refresh');
                    }
                }
            ],
            onLoad: function () {

                top.$('.add-group').off().on('click', function () {
                    search.addGroup(this);
                });

                top.$('.del-group').off().on('click', function () {
                    search.delGroup(this);
                });

                top.$('.add-rule').off().on('click', function () {
                    search.addRule(this);
                }).click();

后面还有 184 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。