//转换时间格式
    function datetimeStrFormat(time) {

        var d = new Date(time);
        var times = d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate();

        return times;
    }

 

 

 function showHjxx() {
        var url = "http://syrk.hubei.gov.cn/api/sfz/PidCardController/listPidCardInfo";
        dg = $("#dg").datagrid({
            url: url,
            method: "post",
            queryParams: {
                "pid": $("#edpid").textbox('getValue'),
                "name": $("#edname").textbox('getValue'),
                "caseId": $("#caseId").textbox('getValue')
            },
            singleSelect: false,
            fitColumns: true,//自适应列宽度,隐藏水平滚动条
            nowrap: true,//不换行,数据一行显示
            pageNumber: 1,
            striped: true,//添加行奇偶条纹
            pagination: true,//显示底部页面导航
            pageList: [10, 20, 50, 100],
            pageSize: 10,
            scrollbarSize: 0,
            rownumbers: true,//显示行序号
            columns: [
                [
                    {field: "1", checkbox: true},
                    {field: "pid", title: "公民身份号码", width: 10, align: 'left', halign: 'center'},
                    {field: "name", title: "姓名", width: 7, align: 'left', halign: 'center'},
                    {field: "gender", title: "性别", width: 5, align: 'left', halign: 'center'},
                    {field: "dob", title: "出生日期", width: 10, align: 'left', halign: 'center',
                        formatter:function (value,rowData,rowIndex) {
                            return datetimeStrFormat(value);
                        }
                    },
                    {field: "acceptno", title: "受理号", width: 18, align: 'left', halign: 'center'},
                    {field: "accetporg", title: "受理单位", width: 15, align: 'left', halign: 'center'},
                    {field: "acceptdate", title: "受理时间", width: 10, align: 'left', halign: 'center',
                            formatter:function (value,rowData,rowIndex) {
                                return datetimeStrFormat(value);
                            }
                    },
                    {field: "tel", title: "联系电话", width: 10, align: 'left', halign: 'center'},
                    /* {field: 'operate',title: '操作列',  width: 10, align: 'center',
                         formatter: function (value, row, rowIndex) {
                             var str = '<a name="opera" class="abtn red" onclick="sh( );" ><font color="blue">审核签发</font></a>';
                             return str;
                         }
                     }*/
                ]
            ]
        });
    }

 

posted on 2019-06-27 15:34  千羽鹤  阅读(130)  评论(0编辑  收藏  举报