G.app.order.address={
		_DEF:{MOBILE:"如13612345678",PHONE:"如021-61831107"},
		_tpl:{desc:'<ul class="list_info"><li><span class="tit">收&nbsp;&nbsp;货&nbsp;&nbsp;人：</span>{name}</li><li><span class="tit">收货地址：</span>{district_chn} {address}</li><li><span class="tit">邮　　编：</span>{zipcode_chn}</li><li><span class="tit">电　　话：</span>{phone_chn}</li></ul>',list:'<table class="table_nobor"><colgroup><col class="col1"><col class="col2"><col class="col3"></colgroup><tbody><@list@><tr aid="{aid}"{toNone} t="{moreAddr}"><td><input type="radio" name="sel_addr" value="{aid}"></td><td>{workplace}</td><td>[[item_desc]]</td></tr><@_list@>{showMore}<tr aid="-1"><td><input type="radio" name="sel_addr" value="-1"></td><td>使用新地址</td><td></td></tr></tbody><tfoot><tr><td colspan="3"><div class="wrap_btn"><a class="btn_strong" href="#" onclick="return false" t="asave">确认收货信息</a></div></td></tr></tfoot></table>',item_desc:'<div class="wrap_change"><div class="change_info"><p>{district_chn} {address}，邮编：{zipCode}</p><p>收货人：{name}，电话：{phone_chn}</p></div><div class="modify"><a href="#" t="edit" onclick="return false">修改</a> | <a href="#" onclick="return false" t="del">删除</a></div></div>',create:'<table class="table_nobor"><tfoot><tr><td colspan="3"><div class="wrap_btn"><a class="btn_strong" href="#" onclick="return false" t="asave">确认收货信息</a></div></td></tr></tfoot></table>',edit:'<ul class="list_info">{ali_address_tip}{workplace_input}<li><span class="tit" t="loc_sel"><span class="hot">*</span>选择地区：</span></li><li><span class="tit"><span class="hot">*</span>详细地址：</span><input class="input_long" type="text" name="address" value="{address}" /></li><li><span class="tit"><span class="hot">&nbsp;&nbsp;</span>邮政编码：</span><input type="text" class="input_short" name="zipCode" value="{zipcode_chn}"/></li><li><span class="tit"><span class="hot">*</span>收&nbsp;&nbsp;货&nbsp;&nbsp;人：</span><input type="text" class="input_short" name="name" value="{name}"/></li><li><span class="tit"><span class="hot">*</span>手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机：</span><input type="text" class="input_short" name="mobile" value="{mobile}"/> 或固定电话 <input type="text" class="input_short" name="phone" value="{phone}"/><span>两者至少填写一项</span></li></ul>'},
		_mod:{
			get:function(d,c){
				var b=G.app.order.address,a=b._dao;
				a.get(function(){c(a._list[d])},function(e){ COL.dialog.mini({type:'error',content:"获取收货地址失败，请刷新尝试"}); })},
			getAll:function(c){
				var b=G.app.order.address,a=b._dao;
				a.get(function(){
					c(a._list)},function(d){ COL.dialog.mini({type:'error',content:"获取收货地址失败，请刷新尝试"}); })
			},
			add:function(d,c){var b=G.app.order.address,a=b._dao;a.add(d,function(e){c(e,a._list)},function(f){var e={1:"地址标注不能为空",2:"地址标注太长，请重新填写",3:"收货人不能为空",4:"收货人名称太长，请重新填写",5:"手机号码和电话号码至少必须填一项",6:"手机号码填写错误",7:"电话号码填写错误",8:"请选择地区",9:"详细地址不能为空",10:"详细地址内容太长，请重新填写",11:"邮政编码填写有误，请重新填写"};return COL.dialog.mini({type:'error',content:"添加收货地址失败，请稍候重试"}); })},
			del:function(d,c){var b=G.app.order.address,a=b._dao;a.del(d,function(){c(a._list)},function(e){ COL.dialog.mini({type:'error',content:"删除收货地址失败，请稍候重试"}); })},
			update:function(e,d,c){var b=G.app.order.address,a=b._dao;a.update(e,d,function(){c(a._list)},function(f){ COL.dialog.mini({type:'error',content:"修改收货地址失败，请稍候重试"}); })}
		},
		_dao:{
			_list:false,
			_status:{get:""},
			_fnQueue:{
				get:{suc:G.createFnQueue(),fail:G.createFnQueue()}
			},
			checkLogin:function(a){
				if(G.logic.login.ifLogin(this,arguments)===false){return false}return G.logic.login.getLoginUid()
			},
			get:function(c,d){
				var a=G.app.order.address._dao,b=a.checkLogin();if(!b){return}
				a._fnQueue.get.suc.add($.isFunction(c)?c:$.noop);
				a._fnQueue.get.fail.add($.isFunction(d)?d:$.noop);
				if(a._status.get=="busy"){return}a._status.get="busy";
				if(a._list!==false){a._fnQueue.get.suc.exec();a._fnQueue.get.fail.clear();a._status.get="";return};
				G.util.post("/user/address/act/data/"+b,{},function(e){
					if(e&&e.errno==0){
						a._list={};
						$.each(e.data,function(g,f){a._list[f.aid]=f;if(g==0){G.app.order.status.setSavedId("address",f.aid);}});
						a._fnQueue.get.suc.exec();
						a._fnQueue.get.fail.clear()
					}else{
							a._fnQueue.get.fail.exec(e);a._fnQueue.get.suc.clear()
					}
					a._status.get=""
				})
			},
			update:function(f,e,c,d){
				var a=G.app.order.address._dao,b=a.checkLogin();
				if(!b){return}
				e.id=f;
				e.aid=f;
				e.act="edit";//alert(e.zipCode);
				G.util.post("/user/address",e,function(g){if(g&&g.errno==0){$.extend(a._list[f],e);$.isFunction(c)&&c()}else{$.isFunction(d)&&d(g)}})
			},
			del:function(e,c,d){
				var a=G.app.order.address._dao,b=a.checkLogin();
				if(!b){return}G.util.post("http://"+G.DOMAIN.BASE_ICSON_COM+"/json.php?mod=address&act=del&uid="+b,{aid:e},function(g){if(g&&g.errno==0){var f=G.app.order.status.get("address");if(f&&f.aid==e){G.app.order.status.set("address",null)}delete a._list[e];$.isFunction(c)&&c()}else{$.isFunction(d)&&d(g)}})
			},
			add:function(e,c,d){
				var a=G.app.order.address._dao,b=a.checkLogin();
				if(!b){return}
				e.act="add";
				G.util.post("/user/address",e,function(f){if(f&&f.errno==0){e.aid=f.data.aid;a._list[f.data.aid]=e;$.isFunction(c)&&c(f.data.aid)}else{$.isFunction(d)&&d(f)}})
			}
		},
		_view:{
			_curId:0,_dom:false,
			getDom:function(){
				var b=G.app.order.address,
				a=b._view;
				if(!a._dom){a._dom=$("#addr_box")}return a._dom
			},
			select:function(c,d){
					var e=G.app.order.address,a=e._view;
					var b=$(".bd tr[aid]",a.getDom()).removeClass("status_on").filter("[aid="+c+"]").addClass("status_on").find("input[name=sel_addr]");
					if(b.length>0){b[0].checked=true}
					$(".bd tr[aid]",a.getDom()).filter("[aid!="+c+"]").each(function(){if($(this).data("editing")){a._descItem($(this))}});
					a._curId=c;if(d===false){return}
					if(c==-1){a.edit(c)}else{e._mod.get(c,function(f){if(a._checkValid(f)!==true){a.edit(c)}})}
			},
			_setEditData:function(b,a){
				if(!$("input[name=mobile]",b).data("binded")){G.ui.tips.swapInput({target:$("input[name=mobile]",b),focusClass:"",blurClass:"exsample_short",defaultValue:G.app.order.address._DEF.MOBILE}).data("binded",true)}
				if(!$("input[name=phone]",b).data("binded")){G.app.form_ctrl.phone().attach($("input[name=phone]",b));$("input[name=phone]",b).data("binded",true)}a=a||{};$.each(["workplace","district","address","zipCode","name","mobile","phone"],function(c,d){if(d=="district"){$(b).data("loc").setLocation(a[d]||0)}else{if(d=="phone"){$("input[name="+d+"]",b).data("phone").val(a[d]||"")}else{$("input[name="+d+"]",b).val(a[d]||"")}}});$("input[name=mobile]",b).focus().blur()
			},_getEditData:function(d){
				var b=G.app.order.address._view;
				var c={};
				$.each(["workplace","district","address","zipCode","name","mobile","phone"],function(e,g){
					if(g=="district"){c[g]=$(d).data("loc").getLocId()}else{if($("input[name="+g+"]",d).length>0){if(g=="phone"){c[g]=$("input[name="+g+"]",d).data("phone").val()}else{c[g]=$("input[name="+g+"]",d).val()}}}
					c[g]=$.trim(c[g])
				});
				var a=b._checkValid(c);if(a!==true){COL.dialog.mini({type:'error',content:a});return false}return c
			},
			_descItem:function(a){
				var b=a.attr("aid"),c=G.app.order.address;a.data("editing",false);
				if(b==-1){$("td:eq(2)",a).empty()}else{c._mod.get(b,function(d){d=c._encode(d);$("td:eq(0) input[type=radio]",a).val(b);$("td:eq(1)",a).empty().html(d.workplace);$("td:eq(2)",a).empty().html(G.ui.template.fillWithTPL(false,d,false,c._tpl.item_desc));G.app.order.address._view._setItemListener.apply(a,[b])})}
			},
			_setEditAndDelListener:function(a){
				if(!$("a[t=edit]",this).data("binded")){$("a[t=edit]",this).click({aid:a},function(b){G.app.order.address._view.edit(b.data.aid)}).data("binded",true)}if(!$("a[t=del]",this).data("binded")){$("a[t=del]",this).click({aid:a},function(b){G.app.order.address._view.del(b.data.aid)}).data("binded",true)}
			},
			_setSelectListener:function(a){
				if(!$("input[type=radio]",this).data("binded")){$("input[type=radio]",this).click({aid:a},function(b){G.app.order.address._view.select(b.data.aid)}).data("binded",true)}
			},
			_setItemListener:function(a){G.app.order.address._view._setEditAndDelListener.apply(this,[a]);G.app.order.address._view._setSelectListener.apply(this,[a])},
			_addListListener:function(a){
				$("tr[aid]",a).each(function(){G.app.order.address._view._setItemListener.apply(this,[$(this).attr("aid")])});$("tr[t=showMore] a",a).click(function(){if($(this).parent().hasClass("status_open")){$(this).parent().removeClass("status_open");$(this).html("显示全部"+$(this).attr("count")+'条收货信息<span class="arrow"></span>');$("tr[t=moreAddr]",a).css("display","none")}else{$(this).parent().addClass("status_open");$(this).html('收起收货信息<span class="arrow"></span>');$("tr[t=moreAddr]",a).css("display","")}});$("a[t=asave]",a).click(G.app.order.address._view.save)
			},
			_addCreateListener:function(b){
					var c=G.app.order.address,a=c._view;$("a[t=save]",b).click(function(){var d=a._getEditData(b);if(d===false){return}c._mod.add(d,function(e,f){a._curId=e;a.list()})});$("a[t=asave]",b).click(function(){var d=a._getEditData(b);if(d===false){return}c._mod.add(d,function(e,f){a._curId=e;a.save()})})
			},
			getCBAddress:function(c,a){
					var b=$("div[t=qqcb_addr]",a);b.empty().html(G.app.order._getYTipHtml("正在获取QQ彩贝收货地址..."));
					G.util.post("/json.php?mod=user&act=getqqcbaddress",{},function(f){if(f&&f.errno==0){var e=["<dl><dt>您是QQ用户，以下是您在QQ彩贝中保存的收货地址：</dt>"],d=0;$.each(f.data,function(h,g){if(d==10){e.push('</dl><dl t="showall" style="display:none">')}if(d>25){return}e.push('<dd><input class="sel_address" name="qqcbaddress" type="radio" value="'+h+'"/><b>收货人：</b><span>'+(g.name||"")+"</span>&nbsp;&nbsp;&nbsp;&nbsp;<b>地址：</b><span>"+((g.province)+(g.city||"")+(g.dist||"")+(g.address||""))+"</span>&nbsp;&nbsp;&nbsp;&nbsp;<b>手机：</b><span>"+(g.mobile||"")+"</span>&nbsp;&nbsp;&nbsp;&nbsp;<b>电话：</b><span>"+(g.phone||"")+"</span></dd>");d++});e.push("</dl></div>");if(d>0){b.empty().html('<table class="table_nobor"><colgroup><col class="col1"><col class="col2"><col class="col3"></colgroup><tbody><tr><td colspan="3" class="mod_cb_wrap_td"><div class="mod_cb_wrap"><div class="mod_cb_addr"><div class="mod_cb_hd">'+(d>10?'<a class="showall" href="#" onclick="return false">显示全部收货地址</a>':"")+"</div>"+e.join("")+"</div></div></td></tr></tbody><table>");$("input[name=qqcbaddress]",b).click(function(){setTimeout(function(){var h=$("input[name=qqcbaddress]:checked",b).val();if(f.data[h]){var g=G.app.order.address._view.__filterCBAliAddress(f.data[h]);G.app.order.address._view._setEditData(a,g)}},1)});$("input[name=qqcbaddress]:eq(0)",b).click();$("a.showall",b).click(function(){$("dl[t=showall]",b).show();$(this).remove()})}else{b.empty().html(G.app.order._getYTipHtml("您是QQ用户，但是在QQ彩贝未填写过地址。"))}}else{b.empty().html(G.app.order._getYTipHtml("抱歉，获取QQ彩贝收货地址失败。"))}})
			},
			__filterCBAliAddress:function(b){
				var a={phone:b.phone||"",mobile:b.mobile_phone||b.mobile||"",name:b.fullname||b.name||"",zipCode:b.post||b.post_code||"",address:b.address||""};b.prov=b.prov||b.province||"";b.area=b.area||b.dist||"";$.each(G.util.area,function(c,d){if(d.n.indexOf(b.prov)>=0||(b.prov+"").indexOf(d.n)>=0){$.each(d.l,function(f,e){if(e.n.indexOf(b.city)>=0||(b.city+"").indexOf(e.n)>=0){$.each(e.l,function(g,h){if(h.indexOf(b.area)>=0||(b.area+"").indexOf(h)>=0){a.district=g}})}})}});return a
			},
			list:function(){
				var d=G.app.order.address,a=d._view,c=d._mod,b=d._tpl;
				c.getAll(function(g){
					var h=$(".bd",a.getDom());
					if(!g||$.isEmptyObject(g)){
						G.logic.login.getLoginUser(function(m){
							var n=b.edit+b.create,l={workplace_input:'<li><span class="tit">地址标注：</span><input type="text" class="input_mini" name="workplace" value=""/><span class="nor">例如家里、公司，最多四个字。</span></li>'},j=G.app.form_ctrl.location.locSelection();
							if(m&&m.data&&m.data.icsonid.toString().toLowerCase().indexOf("login_alipay_")==0&&G.app.order._opt.ali_address==undefined){n=G.app.order._getYTipHtml('您现在可以直接调用支付宝账户的收货地址<a class="btn_alipay" href="http://buy.51buy.com/index.php?mod=order&act=aliaddress&uid='+m.data.uid+'">使用支付宝地址</a>')+n}else{if(m&&m.data&&m.data.icsonid.toString().toLowerCase().indexOf("login_qq__")==0&&G.util.cookie.get("qqcb_openkey")){n='<div t="qqcb_addr"></div>'+n}}
							h.data("loc",j);
							j.insertAfter(h.empty().html(G.ui.template.fillWithTPL(false,l,false,n)).find("span[t=loc_sel]"));
							var k={};
							if(G.app.order._opt.ali_address){k=a.__filterCBAliAddress(G.app.order._opt.ali_address);G.app.order._opt.ali_address=undefined}
							if($("div[t=qqcb_addr]",h).length>0){a.getCBAddress(m.data.icsonid,h)}a._setEditData(h,k);a._addCreateListener(h)
						},false,false)
					}else{
							var i={list:[]};
							
							$.each(g,function(j,k){
								k = d._encode(k);
								i.list.push(k)
							});
							i.list.sort(function(k,j){
								if(k.sortfactor!=j.sortfactor){return j.sortfactor>k.sortfactor?1:-1}
								if(k.last_use_time!=j.last_use_time){return j.last_use_time>k.last_use_time?1:-1}
								if(k.updatetime!=j.updatetime){return j.updatetime>k.updatetime?1:-1}
								return k.createtime>j.createtime?1:-1
							});
							if(i.list.length>4){
								var f=false;
								$.each(i.list,function(j,l){if(l.aid==a._curId){f=j}i.list[j].toNone=' style="display:none"';i.list[j].moreAddr="moreAddr"});
								var e=[0,1,2,3];
								if(f){if(f>3){e[3]=f}}
								$.each(e,function(l,j){i.list[j].toNone="";i.list[j].moreAddr=""})
							}
							i.showMore='<tr t="showMore"'+(i.list.length<=4?' style="display:none"':"")+'><td></td><td></td><td><div class="wrap_more"><a href="#" count="'+i.list.length+'" onclick="return false">显示全部'+i.list.length+'个收货信息<span class="arrow"></span></a></div></td></tr>';
							h.empty().html(G.ui.template.fillWithTPL(false,i,false,b.list.replace(/\[\[item_desc\]\]/g,b.item_desc)));//return;
							a._addListListener(h);
							//if(G.app.order._opt.ali_address){a._curId=-1;a.select(-1)}else{if(a._curId>0){a.select(a._curId)}else{a.select($("tr[aid]:first",h).attr("aid"))}}
							a.select($("tr[aid]:first",h).attr("aid"));
					}
					a.switchBtnStatus(2)
				})
			},
			del:function(b){var c=G.app.order.address,a=c._view;if(b==-1){return}c._mod.del(b,function(){c._mod.getAll(function(e){var d=0;$.each(e,function(){d++});if(d==0){a.list()}else{setTimeout(function(){var f=$(".bd tr[aid="+b+"]",a.getDom());f.remove();if(a._curId==b){$(".bd tr[aid] input[name=sel_addr]",a.getDom()).first().click()}if(d<=4){$(".bd tr[t=showMore]",a.getDom()).css("display","none")}},0)}})})},
			edit:function(b){
						var c=G.app.order.address,a=c._view;
						c._mod.get(b,function(d){
							G.logic.login.getLoginUser(function(e){a._edit(b,d,e&&e.data&&e.data.icsonid.toString().toLowerCase().indexOf("login_alipay_")==0&&G.app.order._opt.ali_address==undefined?e.data.uid:false,e&&e.data&&e.data.icsonid.toString().toLowerCase().indexOf("login_qq__")==0?e.data.icsonid:false)},false,false)
						})
			},
			_edit:function(a,g,d,i){
					var b=G.app.order.address,j=b._view,e=$(".bd tr[aid="+a+"]",j.getDom());e.data("editing",true);j.select(a,false);
					var h=G.app.form_ctrl.location.locSelection(),f=a==-1?{workplace_input:'<li><span class="tit">地址标注：</span><input type="text" class="input_mini" name="workplace" value=""/><span class="nor">例如家里、公司，最多四个字。</span></li>'}:{};
					if(a==-1){if(d){f.ali_address_tip=G.app.order._getYTipHtml('您现在可以直接调用支付宝账户的收货地址<a class="btn_alipay" href="http://buy.51buy.com/index.php?mod=order&act=aliaddress&uid='+d+'">使用支付宝地址</a>')}else{if(i&&G.util.cookie.get("qqcb_openkey")){f.ali_address_tip='<div t="qqcb_addr"></div>'}}}
					if(a!=-1){$("td:eq(1)",e).empty().html('<input type="text" class="input_mini" name="workplace" value=""/>')}

					h.insertAfter($("td:eq(2)",e).empty().html(G.ui.template.fillWithTPL(false,f,false,b._tpl.edit)).find("span[t=loc_sel]"));
					e.data("loc",h);
					var c=null;
					//if(G.app.order._opt.ali_address){c=j.__filterCBAliAddress(G.app.order._opt.ali_address);G.app.order._opt.ali_address=undefined}
					//if($("div[t=qqcb_addr]",e).length>0){j.getCBAddress(i,e)}
					j._setEditData(e,c||g);
					$("td:eq(2) a[t=save]",e).click({aid:a},function(k){j._saveItem(k.data.aid)})
			},
			_saveItem:function(e,h){
					var g=G.app.order.address,a=g._view,c=g._mod,b=g._tpl,f=$(".bd tr[aid="+e+"]",a.getDom());if(f.length<=0){return}var d=a._getEditData(f);if(d===false){return}if(e==-1){g._mod.add(d,function(j,k){var i=$(".bd tr[t=showMore]",a.getDom());a._descItem(f);f.find("input[name=sel_addr]").removeAttr("checked");f=f.clone().insertBefore(i.length>0?i:f);f.attr("aid",j);a._descItem(f);a.select(j,false);$.isFunction(h)&&h()})}else{g._mod.update(e,d,function(i){a._descItem(f);$.isFunction(h)&&h()})}
			},
			desc:function(){
				var f=G.app.order.address,b=f._view,d=f._mod,c=f._tpl,a=G.app.order.status.get("address");
				if(a!=null){var e=$(".bd",b.getDom()).empty().html(G.ui.template.fillWithTPL(false,f._encode(a),false,c.desc))}
				else{
					var e=$(".bd",b.getDom()).empty().html('<div class="cont"><p><span class="nor">未选择</span></p><p><a href="#" onclick="return false" name="add">【选择收货信息】</a></p></div>');
					$("a[name=add]",e).click(b.list)
				}
				b.switchBtnStatus(1)
			},
			save:function(){
					var d=G.app.order.address,a=d._view,c=d._mod,e=a._curId,b=$(".bd tr[aid="+e+"]",a.getDom());if(b&&b.data("editing")){a._saveItem(e,function(){e=a._curId,b=$(".bd tr[aid="+e+"]",a.getDom());a._save(e)})}else{a._save(e)}
			},
			_save:function(d,e){
				var c=G.app.order.address,a=c._view,b=c._mod;b.get(d,function(g){if(!g){return}var f=a._checkValid(g);if(f!==true){COL.dialog.mini({type:'error',content:a});return}G.app.order.status.set("address",g);a.desc();G.app.order.status.saveIds();$.isFunction(e)&&e()})
			},
			_checkValid:function(a){
					$.each(a,function(c,b){a[c]=$.trim(b)});
					if(!a.workplace){a.workplace=a.name.substr(0,4)}else{if($.strlen(a.workplace)>8){return"地址标注不能超过4个汉字或者8个字母，请重新填写"}}
					if(0==a.district||G.app.form_ctrl.location.getLocInfo(a.district)===false){return"请选择地区"}
					if(!a.address){return"详细地址不能为空，请填写"}if($.strlen(a.address)>100){return"详细地址不能超过50个汉字或者100个字母，请重新填写"}if(!a.name){return"收货人不能为空，请填写"}if($.strlen(a.name)>20){return"收货人不能超过10个汉字或者20个字母，请重新填写"}if(a.zipCode&&(!G.logic.validate.checkChars(a.zipCode,4)||$.strlen(a.zipCode!=6))){return"邮政编码填写有误，格式：200000，请重新填写"}if(a.mobile==G.app.order.address._DEF.MOBILE){a.mobile=""}if(a.phone==G.app.order.address._DEF.PHONE){a.phone=""}if(!a.mobile&&!a.phone){return"“手机”或“固定电话”至少填写一项"}if(a.mobile&&!G.logic.validate.checkMobilePhone(a.mobile)){return"手机号码填写有误，格式：13612345678，请重新填写"}if(a.phone&&!G.logic.validate.checkTelephone(a.phone)){return"固定电话填写有误，格式：021-61831107，请重新填写"}return true
			},
			init:function(){
					var c=G.app.order.address,a=c._view,b=c._mod;
					b.getAll(function(e){
						if(!e||$.isEmptyObject(e)){
							a.list()
						}else{
							var f=G.app.order.status.getSavedId("address")||0,d=0;
							if(f!=0){
								G.app.order.status.delSavedId("address")
							}else{
								$.each(e,function(h,g){if(g.last_use_time>0&&g.last_use_time>=d){f=g.aid;d=g.last_use_time}})
							}
							if(G.app.order._opt.ali_address==undefined&&f>0&&e[f]&&a._checkValid(e[f])===true){a._curId=f;a.save()}else{a.list()}
							//a.list()
						}
						//G.app.order.invoice.init()
					})
			},switchBtnStatus:function(b){
					var e=G.app.order.address,c=e._view,d=e._mod,a=$("#address_btn");
					if(b==1){
						a.show().html("更改").unbind().click(c.list);
						if(G.app.order.status.get("address")){G.app.order.status.get("address").uediting=false;G.app.order.shippingtype.init()}
					}else{
						if(!G.app.order.status.get("address")){
							a.hide()
						}else{
							G.app.order.status.get("address").uediting=true;
							a.show().html("取消").unbind().click(c.desc);
							G.app.order.shippingtype.hide()
						}
					}
			}
		},
		_encode:function(b){
			//for(var i in b){alert(i)}
			var a=[];
			//b=G.app.order._encode(b);
			b.mobile&&a.push(b.mobile);
			b.phone&&a.push(b.phone);
			b.phone_chn=a.join("、");
			b.zipcode_chn=b.zipCode||"&nbsp;";
			b.district_chn=G.app.form_ctrl.location.getLocName(b.district);
			return b
		},
		init:function(){this._view.init()},
		getDom:function(){return this._view.getDom()},
		hide:function(){
				$(".bd",this.getDom()).empty().html('<div class="cont"><p><span class="nor">未选择</span></p><p>&nbsp;</p></div>');
				G.app.order.shippingtype.hide()
		}
};
