mui.init({})
var openid = helper.cookies.get("openid");
var turn = helper.request.queryString("turn");
if (turn) {
	$(".mui-nav").show();
	$(".cont-margin").css("margin-top","45px");
}else{
	$(".cont-margin").css("margin-top","0px");
}
Ajax();
function Ajax() {
	//$(".order").remove();
	$.ajax({
		url: huayi.config.callcenter_url + 'WxLogin/GetBillList',
		data: {
			openid: openid, //微信openid,
		},
		async: true,
		dataType: 'json',
		type: 'get', //HTTP请求类型
		success: function(data) {
			if(data.rows && data.rows.length > 0) {
				$(data.rows).each(function(i, n) {
					console.log(n.Customer);
					$('<li class="mui-table-view-cell order" data-index="' + n.F_ID + '">' +
						'<div class="mui-table">' +
						'<div class="mui-table-cell mui-col-xs-10">' +
						'<h4 class="mui-ellipsis">' + n.F_ProName +
						'</h4><h5>' + n.F_BillingTime +
						'</h5></div></div></li>').appendTo('#OA_task');
				});
				//工单跳转
				$('.order').on('tap', function() {
					var index = $(this).attr('data-index');
					window.location.href = "invoiceDetail.html?id=" + index;
				});
			} else {
				$(".noinfor").text("暂无信息");
			}
		},
		error: function(xhr, type, errorThrown) {
			//异常处理；
		}
	})

}