(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["ib-change-ownership"],{"2dd1":function(t,e,n){},"498a":function(t,e,n){"use strict";var a=n("23e7"),r=n("58a8").trim,i=n("c8d2");a({target:"String",proto:!0,forced:i("trim")},{trim:function(){return r(this)}})},"525a":function(t,e,n){"use strict";n("5343")},5343:function(t,e,n){},"857e":function(t,e,n){"use strict";n("2dd1")},a5a4:function(t,e,n){"use strict";n.r(e);n("b0c0"),n("498a");var a=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],attrs:{id:"ib_ib-change-ownership","element-loading-background":"rgba(43, 48, 67, 0.05)","element-loading-spinner":"el-icon-loading"}},[e("div",{staticClass:"promotion-box pb-3 mt-1"},[e("div",{staticClass:"container"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"promotion-box-white mt-0"},[e("div",{attrs:{id:"tabs"}},[e("div",{},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{},[e("el-form",{ref:"form",attrs:{rules:t.rules,model:t.form,"label-position":"top"}},[e("el-form-item",{attrs:{label:t.$t("Drawer.Label.TradingAccount")}},[e("el-input",{staticClass:"crm-input",attrs:{disabled:"",placeholder:t.$t("placeholder.input")},model:{value:t.form.login,callback:function(e){t.$set(t.form,"login","string"===typeof e?e.trim():e)},expression:"form.login"}})],1),e("el-form-item",{attrs:{label:t.$t("Drawer.Label.OldAttribution")}},[e("el-input",{staticClass:"crm-input",attrs:{disabled:"",placeholder:t.$t("placeholder.input")},model:{value:t.form.ibNo,callback:function(e){t.$set(t.form,"ibNo","string"===typeof e?e.trim():e)},expression:"form.ibNo"}})],1),e("el-form-item",{attrs:{prop:"newAgentId",label:t.$t("Drawer.Label.NewAttribution")}},[e("el-select",{staticClass:"crm_search_down crm_select_icon crm-select",attrs:{filterable:"",placeholder:t.$t("placeholder.choose")},model:{value:t.form.newAgentId,callback:function(e){t.$set(t.form,"newAgentId",e)},expression:"form.newAgentId"}},t._l(t.agentsList,(function(t,n){return e("el-option",{key:n,attrs:{label:t.ibNo+"-"+t.name,value:t.id}})})),1)],1),e("el-form-item",{staticClass:"prompt",attrs:{label:t.$t("Drawer.Label.TemplatePrompt")}},[e("p",[e("span",[t._v("1.")]),e("span",{directives:[{name:"t",rawName:"v-t",value:"Drawer.Label.AttributionePrompt1",expression:"'Drawer.Label.AttributionePrompt1'"}]})]),e("p",[e("span",[t._v("2.")]),e("span",{directives:[{name:"t",rawName:"v-t",value:"Drawer.Label.TemplatePrompt3",expression:"'Drawer.Label.TemplatePrompt3'"}]})])])],1),e("div",{staticClass:"form-group text-center mt-5 mb-5"},[e("a",{directives:[{name:"t",rawName:"v-t",value:"Btn.Confirm",expression:"'Btn.Confirm'"}],staticClass:"btn-signing",attrs:{href:"javascript:;"},on:{click:t.confirm}})])],1)])])])])])])])])])])},r=[],i=n("c7eb"),o=n("1da1"),s=n("1c45"),c=n("f121"),l=n.n(c),u=l.a.Code,m={name:"ib_ib-change-ownership",components:{},data:function(){return{flag:!1,pictLoading:!1,form:{login:null,newAgentId:null},agentsList:[],rules:{newAgentId:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}]}}},computed:{lang:function(){return this.Session.Get("lang")}},methods:{selectChange:function(){this.$forceUpdate()},confirm:function(){var t=this;this.$refs["form"].validate((function(e){if(!e)return!1;t.toConfirm()}))},toConfirm:function(){this.flag||(this.flag=!0,this.customchangeOwnership())},customchangeOwnership:function(){var t=this;return Object(o["a"])(Object(i["a"])().mark((function e(){var n;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,s["a"].accountBelongChange({login:t.form.login,newAgentId:t.form.newAgentId});case 2:n=e.sent,n.code==u.StatusOK?(t.$pigeon.MessageOK(t.$i18n.t("Msg.Success")),t.flag=!1,t.$router.back(-1)):(t.$pigeon.MessageError(n.msg),t.flag=!1);case 4:case"end":return e.stop()}}),e)})))()},accountBelongIb:function(){var t=this;return Object(o["a"])(Object(i["a"])().mark((function e(){var n;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,s["a"].accountBelongChangeIb({});case 2:n=e.sent,n.code==u.StatusOK?t.agentsList=n.data:t.$pigeon.MessageError(n.msg);case 4:case"end":return e.stop()}}),e)})))()}},mounted:function(){this.form.login=this.$route.query.login,this.form.ibNo=this.$route.query.ibNo,this.accountBelongIb()}},d=m,p=(n("525a"),n("857e"),n("2877")),f=Object(p["a"])(d,a,r,!1,null,"711cd7fc",null);e["default"]=f.exports},c8d2:function(t,e,n){"use strict";var a=n("5e77").PROPER,r=n("d039"),i=n("5899"),o="​᠎";t.exports=function(t){return r((function(){return!!i[t]()||o[t]()!==o||a&&i[t].name!==t}))}}}]);