$(function(){

	updateFastOrder = function(status){
		layer.confirm('确认提交', function() {
			var ordId = $("#ordId").val();
			var version =$("#version").val();
			var params = {
					ordId:ordId,
					ordStatus:status,
					version:version,
			};
			$.ajax({
				url: HttpRest+"/fastord/update.shtml", 
				type: "post", 
				dataType: "json",
				data:$.toJSON(params),   
				contentType:"application/json",
				success: function(data) { 
					if(data.code=='01'){
						layer.msg('修改成功',{icon: 5});
					}else{
						layer.msg(data.msg,{icon: 5});
					}
				}
			});
		});
	};

	$("#authSuccBtn").click(function(){
		updateFastOrder('HasConfirm');
	});

	$("#sendBtn").click(function(){
		updateFastOrder('Shipped');
	});

	$("#finishedBtn").click(function(){
		updateFastOrder('Finished');
	});

	$("#cancleBtn").click(function(){
		updateFastOrder('Cancle');
	});

});