goodsOrder.js 657 Bytes
/**
 * 兑换记录
 */
var goodsOrder = function() {

	return {

		search : function() {
			$('#data-grid').datagrid({
				url : '/user/goods/searchGoodesRecoed',
				queryParams : App.dataGridQueryParams('search-form')
			});
		},
		
		
			formatStatus : function(value, row, index) {
				var status;
				switch (value) {
				case '0':
					status = '兑换失败';
					break;
				case '1':
					status = '兑换成功';
					break;
				case '2':
					status = '已作废';
					break;
				}
				return status;
		},
		
		exportGoodsOrder : function() {
			window.open('/user/goods/exportGoodsRecord?' + $('#search-form').serialize());
		}
		
		
		
}
}();