view={api:new ec.api("inquiry"),init:function(){this.btn=$("#btn_submit");if(ke.parm("productNum"))this.url=document.referrer;else this.url=L.route+"/category";if(window.Country)ec.country()},getInfo:function(){var info=ke.createObject();info.Details=[];var details={};details.ProName=info.ProName;details.ProTermName=info.ProTermName;details.Weight=info.Weight;info.Details.push(details);if(window.FirstName)info.Contact=info.FirstName+" "+info.LastName;return info},confirm:function(){var items=ke.ui.findControls("#inquiry","input");var msg=ec.validate(items);if(!msg){ec.showImageVcode(function(code){var info=this.getInfo();ec.btnLoading(this.btn,L.G("正在提交..."),true);view.api.put("insert/"+code,info,function(r){window.location.href=L.route+"/inquiry/success?from="+escape(view.url)})})}},cancel:function(){var callbck=function(){if(ke.parm("productNum"))history.back(-1);else window.location.href=L.route+"/category"};ec.confirm(L.G("您确定放弃询价吗?"),L.G("表单信息将不保存"),callbck)}};L.push(["正在提交...","Submitting...","您确定放弃询价吗?","Are you sure you want to give up the inquiry?","表单信息将不保存","Form information will not be saved"]);