clientUnder.js 1011 Bytes
/**
 * 
 */
var underClient = function() {
	
	return {
		search : function() {
			$.ajaxSettings.async = false;
			$("#data-grid").datagrid({
				url : "/report/client/searchUnder",
				queryParams : App.dataGridQueryParams('search-form')
			});
		},
	
		searchFunc : function(clientId){
			$("#clientId").textbox("setText",clientId);
			$("#clientId").textbox("setValue",clientId);
			underClient.search();
		},
		
		
		underLevel : function(value, row, index) {
			var status;
			switch (value) {
			case '0':
				status = '普通会员';
				break;
			case '1':
				status = '铜牌会员';
				break;
			case '2':
				status = '银牌会员';
				break;
			case '3':
				status = '金牌会员';
				break;
			case '4':
				status = '钻石会员';
				break;
			}
			return status;
		},
		
		underRef : function(value, row, index) {
			var status;
			switch (value) {
			case '1':
				status = '预指定';
				break;
			case '2':
				status = '已指定';
				break;
			}
			return status;
		}
	}
	
}();