function addRow(){//属性+
	// var html = '<div class="clearfix attribute" id="takeout_html"><div class="f-l hhh"> <input type="text" name="scale[]" class="form-control f-l"/><div class="f-l">公里之内  起送费</div><input type="text" name="start_price[]" class="form-control f-l" /><div class="f-l">元  配送费</div><input type="text" name="delivery_price[]" class="form-control f-l" /><div class="f-l">元 </div><a onclick="delRow(this)" href="javascript:void(0)">[-]</a> </div></div>';
	var html='<div class="clearfix attribute" id="takeout_html"><div class="f-l hhh"><input type="text" name="scale[]" class="form-control f-l"/><input type="hidden" name="start_price[]" value="0" /><div class="f_l">&nbsp;公里之内&nbsp;&nbsp;配送费&nbsp;</div><input type="text" name="delivery_price[]" class="form-control f-l" /><div class="f-l">元 </div><a onclick="delRow(this)" href="javascript:void(0)">[-]</a> </div></div>';
    $('#takeout_html').append(html);
}
function delRow(obj){//属性-
	$(obj).parent().parent().remove();
}
function ajax_close_open(obj){
    var id=$(obj).attr('o_id');
    var is_status=$(obj).attr('o_status');
    $.get(APP+"Shop/Takeout/ajax_goods_status.html", {id:id,is_status:is_status}, function(ret){
        if(ret.status==1){
            if(is_status == 0){$(obj).attr('o_status','1');$(obj).html('上架');}
            if(is_status == 1){$(obj).attr('o_status','0');$(obj).html('下架');}
        }
        else{return false;}
    });
}

//外卖分类的上下架
function cate_status(id, type) {
	var url = APP + "Shop/Takeout/cate_status.html"
	$.get(url, {
		id: id,
		type: type
	}, function(jsondata) {
		var return_data = eval("(" + jsondata + ")");
		$("#" + type + "_" + id + " img").attr('src', THEME_PATH + 'common/images/status_' + return_data + '.gif');
	});
}