list.html 5.29 KB
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Yoho!Buy运营平台</title>
    <script src="/ufoPlatform/js/include.js?version=6.9.3"></script>
</head>
<body class="easyui-layout">
<div region="north" style="height:230px;">
    <script>
        document.write(addHead('营业执照认证', '商户入驻资质审核'));
    </script>
    <div style="margin-left: 10px;margin-top: 30px">
          <div style="border:1px solid #ddd;border-radius:5px 5px 5px 5px;">
            <div style="margin-left: 10px;margin-top: 20px;margin-bottom: 20px">
            <input id="uid" name="uid" />
            <input id="businessName" name="businessName" />
            <input id="validStatus" name="validStatus" />            
            <a id="searchBtn" class="btn-info">筛选</a>
			<a id="allBtn" class="btn-success">全部</a>
		</div>	
          </div>
	</div>
</div>

<div id="businessList" region="center">
	<table id="businessListTable"></table>
</div>
<script>
$(function() {
	$("#uid").textbox({
        prompt: "用户UID",
        width: 200
    });
	
	$("#businessName").textbox({
        prompt: "商家名称",
        width: 200
    });
	
	$("#validStatus").combobox({
        prompt: "入驻状态",
        width: 150,
        editable : false,
        data: [
			{"text" : "已入驻", "value" : 1},
			{"text" : "已退驻", "value" : 9}
		]
    });
	
	$("#searchBtn").linkbutton({
        iconCls : "icon-search",
        onClick : function() {
            $("#businessListTable").datagrid("load", {
            	uid : $("#uid").val(),
            	businessName : $("#businessName").val(),
                validStatus : $("#validStatus").myCombobox("getValue")
            });
        }
    });
	
	//全部按钮
    $("#allBtn").linkbutton({
        iconCls: "icon-import",
        onClick: function () {
        	$("#uid").textbox('setValue','');
        	$("#businessName").textbox('setValue','');
        	$("#validStatus").combobox('setValue','');
        	$("#businessListTable").datagrid("load", {
            });
        }
    });
	
    getBusinessList();
});

function getBusinessList(){
	$("#businessListTable").myDatagrid({
        fit: true,
        fitColumns: true,
        striped: true,
        url: contextPath + "/businessLicense/queryList",
        method: 'POST',
        loadFilter: function (data) {
        	var temp = defaultLoadFilter(data);
            temp=null==temp?[]:temp;
            temp.rows = temp.list;
            return temp;
        },

        columns: [[{
            title: "UID",
            field: "uid",
            width: 20,
            align: "center"
        },  {
            title: "商户类型",
            field: "businessTypeStr",
            width: 20,
            align: "center"
        }, {
            title: "姓名",
            field: "certName",
            width: 20,
            align: "center",
            formatter: function (value, rowData, rowIndex) {
                return replacexss(value);
            }
        }, {
            title: "身份证号",
            field: "certNo",
            width: 30,
            align: "center",
            formatter: function (value, rowData, rowIndex) {
                return replacexss(value);
            }
        }, {
            title: "提交时间",
            field: "commitTime",
            width: 30,
            align: "center"
        }, {
            title: "审核状态",
            field: "auditStatusStr",
            width: 20,
            align: "center"
        }, {
            title: "审核时间",
            field: "auditTime",
            width: 30,
            align: "center"
        }, {
            title: "原因",
            field: "rejectReason",
            width: 30,
            align: "center",
            formatter: function (value, rowData, rowIndex) {
                return replacexss(value);
            }
        }, {
            title: "操作",
            field: "asdf",
            width: 30,
            align: "center",
            formatter: function (value, rowData, rowIndex) {
               var str = "";
               if(rowData.auditStatus==0){
            	   str = "<a role='audit' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #5cb85c !important;'>审核</a>" + str;
               }else{
            	   str = "<a role='detail' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #428bca !important;'>查看</a>";
               }
               return str;
            }
        }]],
        cache: false,
        pagination: true,
        pageSize: 10,
        idField: "id",
        singleSelect: true,
        onLoadSuccess: function (data) {
           $(this).datagrid("getPanel").find("a[role='detail']").linkbutton({
                onClick: function () {
                	var id = $(this).attr("dataId");
                    window.open(contextPath + "/html/businessLicense/view.html?id=" + id + "&ver=" + new Date().getTime())
                }
            });
           
           $(this).datagrid("getPanel").find("a[role='audit']").linkbutton({
               onClick: function () {
               	var id = $(this).attr("dataId");
               	window.open(contextPath + "/html/businessLicense/audit.html?id=" + id + "&ver=" + new Date().getTime());               }
           });
           
        }
    });
}

</script>
</body>
</html>