easyui 列表绑定跳转搜索

来源:互联网 发布:windows rs1 编辑:程序博客网 时间:2024/06/14 02:10


<body style="padding: 5px;">
    <div id="tab" class="easyui-tabs" style="padding-top: 5px;">

        <div title="档案信息" style="padding: 10px; width: 100%;">
            <table style="width: 100%;" title="档案编号">
                <tr>
                    <td style="float: right; margin: auto;">档案编号:</td>
                    <td>
                        <input id="DABH" class="easyui-textbox" style="width: 300px; height: 27px; float: left;" readonly="true" />
                    </td>
                    <td colspan="2"></td>
                </tr>
                <tr>
                    <td style="float: right; margin: auto;">档案类别:</td>
                    <td>
                        <select id="DAtype" class="easyui-combobox" name="state" style="width: 300px; height: 27px;">
                            <option value="ZG">1.国有建设用地使用权及建筑物、构筑物所有权登记类及 对应的更正、注销登记。</option>
                            <option value="ZJ">2.集体建设工地使用权及建筑物、构筑物所有权登记类及 对应的更正、注销登记。</option>
                            <option value="ZZ">3.农村宅基地使用权及建筑物、构筑物所有权登记类及相关更正、注销登记。</option>
                            <option value="ZD">4.抵押权登记类、抵押权预告登记、预购商品房抵押权预告登记及及相关的更正、注销登记。</option>
                            <option value="ZY">5.预购商品房预告登记、不动产转移预告登记及相关的更正、注销登记</option>
                            <option value="ZQ">6.异议登记、查封、解封、补换证及其他登记</option>
                        </select>
                    </td>
                    <td style="float: right; margin: auto;">业务编号:</td>
                    <td>
                        <input id="YWBH" class="easyui-textbox" style="width: 300px; height: 27px; float: left;" readonly="true" /></td>
                </tr>
                <tr>
                    <td style="float: right; margin: auto;">业务类别:</td>
                    <td>
                        <input id="DJDLCN" class="easyui-textbox" style="width: 300px; height: 27px; float: left;" readonly="true" /></td>
                    <td style="float: right; margin: auto;">业务细类:</td>
                    <td>
                        <input id="DJXLCN" class="easyui-textbox" style="width: 300px; height: 27px; float: left;" readonly="true" /></td>
                </tr>
                <tr>
                    <td style="float: right; margin: auto;">业务活动状态:</td>
                    <td>
                        <input id="AJZT" class="easyui-textbox" style="width: 300px; height: 27px; float: left;" readonly="true" /></td>
                    <td style="float: right; margin: auto;">申请时间:</td>
                    <td>
                        <input id="SLSJ" class="easyui-textbox" style="width: 300px; height: 27px; float: left;" readonly="true" /></td>
                </tr>
                <tr>
                    <td style="float: right; margin: auto;">办结时间:</td>
                    <td>
                        <input id="JSSJ" class="easyui-textbox" style="width: 300px; height: 27px; float: left;" readonly="true" /></td>
                    <td style="float: right; margin: auto;">权证号:</td>
                    <td>
                        <input id="HFZSH" class="easyui-textbox" style="width: 300px; height: 27px; float: left;" readonly="true" /></td>
                </tr>
            </table>
            <table id="sjzj" title="档案目录" style="width: 100%; height: 565px" data-options="toolbar:toolbar">
                <thead>
                    <tr>
                        <%--<th data-options="field:'XH',width:80">序号</th>--%>
                        <%-- <th data-options="field:'HDBH',width:130,editor:'text'">活动编号</th>
                        <th data-options="field:'ZMLXH',width:80,editor:'text'">宗目录序号</th>--%>
                        <th data-options="field:'YS',width:120,editor:'text'">页数</th>
                        <th data-options="field:'CLMC',width:150">目录名称</th>
                        <th data-options="field:'CLLXCN',width:120">证件类型</th>
                        <%--    <th data-options="field:'SMYS',width:100,editor:'text'">扫描页数</th>
                        <th data-options="field:'Edit',width:80">更改</th>--%>
                        <th data-options="field:'SY',width:80,formatter:formatterLink">上移</th>
                        <th data-options="field:'XY',width:80,formatter:formatterLink">下移</th>
                    </tr>
                </thead>
            </table>
        </div>
        <%--<div title="收缴证件" style="padding: 10px">
        </div>--%>
        <div title="宗目录" style="padding: 10px">
            <iframe id="ifram_zml" style="width: 100%; height: 500px;"></iframe>
        </div>
        <div title="宗封面" style="padding: 10px">
            <iframe id="ifram_zfm" style="width: 100%; height: 500px;"></iframe>
        </div>
        <input id="hiddYWH" hidden="hidden" runat="server" style="display: none;" />
        <input id="hiddBDCDYH" hidden="hidden" style="display: none;" />
        <input id="hiddDADZ" hidden="hidden" style="display: none;" />
    </div>
    <div id="w" class="easyui-window" title="上传文件" data-options="iconCls:'icon-save'" style="width: 500px; height: 280px; padding: 5px;">
        <div class="easyui-layout" data-options="fit:true">
            <div id="File" style="margin-bottom: 20px;">
                <br />
                文件名称:<input id="txt_clmc" class="easyui-textbox" style="width: 30%; height: 27px; float: left;" />
                文件数量:<input id="txt_wjsl" class="easyui-textbox" style="width: 30%; height: 27px; float: left;" />
                <br />
                <br />
                文件类型:<select id="txt_cllx" class="easyui-combobox" name="state" style="width: 30%; height: 27px;">
                    <option value="1">原件正本</option>
                    <option value="2">正本复印件</option>
                    <option value="3">原件副本</option>
                    <option value="4">副本复印件</option>
                    <option value="5">手稿</option>
                    <option value="99">其它</option>
                </select>
                 文件页数:<input id="txt_wjys" class="easyui-textbox" style="width: 30%; height: 27px; float: left;" />
                <br />
                <br />上传文件:<div id='uploadify' style="width:80px;"></div>
            </div>
            <div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
                <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="javascript:impInfo();" style="width: 80px">确定</a>
                <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="javascript:$('#w').window('close');" style="width: 80px">关闭</a>
            </div>
        </div>
    </div>
    <script type="text/javascript">

        function AddFile()
        {
            $("#uploadify").uploadify({
                swf: '../JavaScript/uploadify/uploadify.swf', //上传的Flash,不用管,路径对就行
                uploader: '../Common/CommonHandler.ashx?type=UploadFile', //Post文件到指定的处理文件
                auto: true,
                dataType: "text",
                buttonText: '浏览', //浏览按钮的Text
                cancelImage: 'JavaScript/uploadify/uploadify-cancel.png', //取消按钮的图片地址
                //fileTypeExts: '*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.jpg;*.gif;*.txt;*.mp4;*.mp3;*.avi;*.mov;*.wmv;*.rar;*.zip;*.ppt;*.pptx;*.png;*.tif', //需过滤文件类型的提示
                // height: 28,//浏览按钮高
                // width:52,//浏览按钮宽
                multi: true, //是否允许多文件上传
                // uploadLimit: 999, //同时上传多小个文件
                //queueSizeLimit: 999, //队列允许的文件总数
                removeCompleted: false, //当上传成功后是否将该Item删除
                onSelect: function (file) {
                    var fileName = file.name;
                    if (fileName.length > 100) {
                        alert("文件名称太长上传失败,请修改后重试!");
                        $('#uploadify').uploadifyCancel(file.id);
                    }
                    if (checkStr(fileName)) {
                        alert("文件名称中包含非法字符上传失败,请修改后重试!");
                        $('#uploadify').uploadifyCancel(file.id);
                    }
                }, //选择文件时触发事件
                onSelectError: function (file, errorCode, errorMsg) { }, //选择文件有误触发事件
                onUploadComplete: function (file) { }, //上传成功触发事件
                onUploadError: function (file, errorCode, errorMsg) { }, //上传失败触发事件
                onUploadProgress: function (file, fileBytesLoaded, fileTotalBytes) { }, //上传中触发事件
                onUploadStart: function (file) { }, //上传开始触发事件
                onUploadSuccess: function (event, response, status) {

                }, //当单个文件上传成功后激发的事件
                onSWFReady: function () { }
            });
        }
        var toolbar = [{
            text: '上传证件',
            iconCls: 'icon-add',
            handler: function () {
                $("#w").window("open");
            }
        }, {
            text: '删除',
            iconCls: 'icon-cut',
            handler: function () { alert('cut') }
        }, '-', {
            text: '归档案',
            iconCls: 'icon-save',
            handler: function () {
                GuiDang();
            }
        }];

        function impInfo() {
            var random = Math.random();
            $.getJSON("../Common/CommonHandler.ashx?random=" + random + "&type=FileS&wjys=" + $('#txt_wjys').filebox('getValue') + "&wjsl=" + $('#txt_wjsl').filebox('getValue')+"&ywh=" + $("#hiddYWH").val() + "&FileType=" + $('#txt_cllx').filebox('getValue') + "&FileName=" + encodeURI($('#txt_clmc').filebox('getValue')), "", function (data) {
                $('#sjzj').datagrid('reload');
                $('#w').window('close');
            });
        }
    </script>
    <script type="text/javascript">
        $(function () {
            $('#w').window('close');
            AddFile();//显示上传按钮
            var random = Math.random();
            $.getJSON("../Common/CommonHandler.ashx?random=" + random + "&type=Getdaxx&oid=" + $('#hiddYWH').val() + "", "", function (data) {
                $("#YWBH").textbox("setValue", data.YWH);
                $("#DJDLCN").textbox("setValue", data.DJDLCN);
                $("#DJXLCN").textbox("setValue", data.DJXLCN);
                $("#AJZT").textbox("setValue", data.AJZT);
                $("#SLSJ").textbox("setValue", data.SLSJ);
                $("#JSSJ").textbox("setValue", data.JSSJ);
                $("#HFZSH").textbox("setValue", data.HFZSH);
                $.getJSON("../Common/CommonHandler.ashx?random=" + random + "&type=DANumber&numberType=" + data.DADZ, "", function (data) {
                    if (data.DANUM != null) {
                        $('#DABH').textbox("setValue", data.DANUM);
                        $("#DAtype").combobox("setValue", data.DANUM.substr(0, 2));
                    }
                });
            });
            $.getJSON("../Common/CommonHandler.ashx?type=GetMList&random=" + random + "&ywh=" + $("#hiddYWH").val(), "", function (data) {
                $('#sjzj').datagrid('reload');
            });
            document.getElementById("ifram_zfm").src = "../Print/print.html?type=DangAnZongFengMian&ywh=" + $("#hiddYWH").val() + "&bdcdyh=" + $("#hiddBDCDYH").val();
            document.getElementById("ifram_zml").src = "../Print/print.html?type=DangAnZongMuLu&ywh=" + $("#hiddYWH").val();
            var dg = $('#sjzj').datagrid({
                method: "get",
                rownumbers: true, singleSelect: true,
                url: '../DataFactory/DataService.aspx?method=getSJZJ&id=' + $('#hiddYWH').val(),
                autoRowHeight: false,
                pagination: true,
                pageSize: 20,
                pageList: [5, 10, 20, 30, 40, 50],
                sortName: "IDX",
                sortOrder: "asc",
                height: "auto",
                nowrap: true,
                idField: "IDX",
                checkOnSelect: true,
                selectOnCheck: true,
                filterDelay: 500,
                enableFilter: true,
                remoteFilter: true,
                filterBtnIconCls: 'icon-filter',
                detailFormatter: function (index, row) {
                    return '<div class="ddv" style="padding:5px 0"></div>';
                }
            });
            dg.datagrid('hideColumn', "BSM");


        });
        $('#DAtype').combobox({
            editable: false,
            onSelect: function (record) {
                //$("#DAtype").combobox("setValue", '');
                var id = $('#DAtype').combobox('getValue');
                var random = Math.random();
                $.getJSON("../Common/CommonHandler.ashx?random=" + random + "&type=DANumber&numberType=" + id, "", function (data) {
                    if (data.DANUM != null) {
                        $('#DABH').textbox("setValue", data.DANUM);
                        $("#DAtype").combobox("setValue", data.DANUM.substr(0, 2));
                    }
                });
            }
        });
        function formatterLink(val, row) {
            if (val == "上移") {
                return '<a style="color:blue;" href="#" onclick="javascript:RemoveIdx(\'' + row.BSM + '\',\'up\')">上移</a>';
            }
            else {
                return '<a style="color:blue;" href="#" onclick="javascript:RemoveIdx(\'' + row.BSM + '\',\'down\')">下移</a>';
            }
        }
        function GuiDang() {
            $.messager.defaults = { ok: "是", cancel: "否" };
            $.messager.confirm("确认", "您确定要归档此档案,请确认档案编号和档案目录是否正确!", function (r) {
                if (r) {
                    $.getJSON("../Common/CommonHandler.ashx?type=GuiDang&DABH=" + $("#DABH").textbox("getValue") + "&ywh=" + $("#hiddYWH").val(), "", function (data) {
                        if (data == true) {
                            $.messager.alert('归档结果', '归档成功!', "info");
                        }
                        else {
                            $.messager.alert('该档案已经归档!', '此档案已经归档,归档失败!', "info");
                        }
                    });
                }
            });
        }
        function RemoveIdx(oid, type) {
            var random = Math.random();
            $.getJSON("../Common/CommonHandler.ashx?random=" + random + "&type=removeidx&RemoveType=" + type + "&oid=" + oid + "&ywh=" + $("#hiddYWH").val(), "", function (data) {
                if (!data) {
                    $.messager.show({
                        title: '提示',
                        msg: '移动失败!',
                        showType: 'fade',
                        style: {
                            right: '',
                            bottom: ''
                        }
                    });
                }
                $('#sjzj').datagrid('reload');
            });
        }
        $('#tab').tabs({
            onSelect: function (title) {
                switch (title) {
                    case "宗封面":
                        //top.addTab("打印宗封面", "../Print/print.html?type=DangAnZongFengMian&ywh=" + $("#hiddYWH").val() + "&bdcdyh=" + $("#hiddBDCDYH").val());
                        document.getElementById("ifram_zfm").src = "../Print/print.html?type=DangAnZongFengMian&ywh=" + $("#hiddYWH").val() + "&bdcdyh=" + $("#hiddBDCDYH").val();
                        break;
                    case "宗目录":
                        // top.addTab("宗目录", "../Print/print.html?type=DangAnZongMuLu&ywh=" + $("#hiddYWH").val());
                        document.getElementById("ifram_zml").src = "../Print/print.html?type=DangAnZongMuLu&ywh=" + $("#hiddYWH").val();
                        break;
                    case "收缴证件":
                        //复制目录数据到档案业务库
                        var random = Math.random();
                        $.getJSON("../Common/CommonHandler.ashx?type=GetMList&random=" + random + "&ywh=" + $("#hiddYWH").val(), "", function (data) {
                            $('#sjzj').datagrid('reload');
                        });
                        break;
                    default:
                        break;
                }
            }
        });
    </script>
</body>

0 0
原创粉丝点击