| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["Agent"],{"0b49":function(e,t,r){"use strict";r("33013")},33013:function(e,t,r){},"4b06":function(e,t,r){},"779d":function(e,t,r){"use strict";r("9e2a")},9932:function(e,t,r){"use strict";r("96cf");var a=r("1da1"),n=r("d4ec"),o=r("bee2"),s=r("262e"),i=r("2caf"),c=r("ff2d"),l=r("bc3a"),u=r.n(l),p=r("f121"),d=r.n(p),m=function(e){Object(s["a"])(r,e);var t=Object(i["a"])(r);function r(){var e;return Object(n["a"])(this,r),e=t.call(this),u.a.defaults.baseURL=d.a.Host85,e}return Object(o["a"])(r,[{key:"Country",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/country/get",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeAgentList",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/agent/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeAgentSingle",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/agent/search/single",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeAgentAdd",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/agent/add",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeAgentUpdate",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/agent/update",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeAgentDelete",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/agent/delete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeAgentApprove",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/agent/approve",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeSubsetList",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/subset/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeSubsetSingle",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/subset/search/single",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeSubsetAdd",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/subset/add",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeSubsetUpdate",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/subset/update",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeSubsetDelete",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/subset/delete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeSubsetApprove",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/subset/approve",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeUsList",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/us/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeUsSingle",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/us/search/single",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeUsAdd",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/us/add",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeUsUpdate",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/us/update",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeUsDelete",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/us/delete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cooperativeUsApprove",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/cooperative/partner/us/approve",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),r}(c["a"]);t["a"]=new m},"9e2a":function(e,t,r){},a3be:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],staticClass:"view",attrs:{id:"cooperative_Agent","element-loading-background":"rgba(43, 48, 67, 0.65)","element-loading-spinner":"el-icon-loading"}},[r("div",{staticClass:"crm_search"},[r("el-form",{ref:"form",attrs:{"label-position":"",model:e.search,"label-width":""}},[r("el-row",[r("el-col",{attrs:{span:24,md:24,lg:24}},[r("el-form-item",{staticStyle:{"margin-right":"10px"},attrs:{prop:"status"}},[r("el-select",{staticClass:"crm_search_down_special crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},model:{value:e.search.status,callback:function(t){e.$set(e.search,"status",t)},expression:"search.status"}},[r("el-option",{attrs:{label:e.$t("State.All"),value:null},nativeOn:{click:function(t){return e.toSearch(t)}}}),r("el-option",{attrs:{label:e.$t("Cooperative.Agent.Unprocessed"),value:0},nativeOn:{click:function(t){return e.toSearch(t)}}}),r("el-option",{attrs:{label:e.$t("Cooperative.Agent.Processed"),value:1},nativeOn:{click:function(t){return e.toSearch(t)}}})],1)],1),r("el-form-item",[r("el-select",{staticClass:"crm_search_down crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},model:{value:e.search.tag,callback:function(t){e.$set(e.search,"tag",t)},expression:"search.tag"}},[r("el-option",{attrs:{label:e.$t("Cooperative.Agent.Email"),value:1}}),r("el-option",{attrs:{label:e.$t("Cooperative.Agent.Phone"),value:2}})],1)],1),r("el-form-item",{staticStyle:{"margin-right":"10px"}},[1==e.search.tag?r("el-input",{staticClass:"crm-border-left-no crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch(t)}},model:{value:e.search.email,callback:function(t){e.$set(e.search,"email","string"===typeof t?t.trim():t)},expression:"search.email"}}):e._e(),2==e.search.tag?r("el-input",{staticClass:"crm-border-left-no crm-border-radius-no",attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch(t)}},model:{value:e.search.phone,callback:function(t){e.$set(e.search,"phone","string"===typeof t?t.trim():t)},expression:"search.phone"}}):e._e()],1),r("el-form-item",[r("el-date-picker",{staticClass:"crm_date_pick crm-border-radius-no",attrs:{type:"daterange",align:"right","unlink-panels":"","value-format":"yyyy-MM-dd","range-separator":"-",size:"small","start-placeholder":e.$t("Placeholder.Start"),"end-placeholder":e.$t("Placeholder.End")},on:{input:e.getSearchDate},model:{value:e.search.date,callback:function(t){e.$set(e.search,"date",t)},expression:"search.date"}}),r("el-button",{staticClass:"crm-border-radius-no crm-border-left-no",attrs:{size:"small",icon:"el-icon-search"},on:{click:e.toSearch}})],1)],1)],1),r("el-form-item",[r("div",{staticClass:"search_action_btn"},[e.display["R-Cooperative-Agent-Add"].show?r("span",{staticClass:"crm-cursor",on:{click:e.addVarieties}},[r("i",{staticClass:"el-icon-plus"}),r("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Add",expression:"'Btn.Add'"}]})]):e._e(),e.multipleSelection.length&&e.display["R-Cooperative-Agent-Delete"].show?r("span",{staticClass:"crm-cursor delete active",on:{click:e.daleteAll}},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Delete",expression:"'Btn.Delete'"}]})]):e._e(),!e.multipleSelection.length&&e.display["R-Cooperative-Agent-Delete"].show?r("span",{staticClass:"crm-cursor delete"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Delete",expression:"'Btn.Delete'"}]})]):e._e()])])],1)],1),r("el-table",{staticStyle:{width:"100%"},attrs:{data:e.mock_tableData,stripe:""},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{align:"left",type:"selection",width:"55"}}),r("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Cooperative.Agent.Name")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.firstName+" "+t.row.lastName)+" ")]}}])}),r("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Label.countrys")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.country+"-"+("cn"==e.lang?t.row.countryName:t.row.countryNameEn))+" ")]}}])}),r("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Cooperative.Agent.Email")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.email||"--")+" ")]}}])}),r("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Cooperative.Agent.Phone")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.phone||"--")+" ")]}}])}),r("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Cooperative.Agent.Remarks")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.remarks||"--")+" ")]}}])}),r("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Cooperative.Agent.HandleRemarks")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.approveDesc||"--")+" ")]}}])}),r("el-table-column",{attrs:{prop:"",align:"left",label:e.$i18n.t("Cooperative.Agent.AddTime")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.addTime||"--")+" ")]}}])}),r("el-table-column",{attrs:{prop:"",align:"center",width:"120",label:e.$i18n.t("Label.State")},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.status?r("span",{directives:[{name:"t",rawName:"v-t",value:"Cooperative.Agent.Processed",expression:"'Cooperative.Agent.Processed'"}],staticClass:"state crm_state_blue"}):e._e(),0==t.row.status?r("span",{directives:[{name:"t",rawName:"v-t",value:"Cooperative.Agent.Unprocessed",expression:"'Cooperative.Agent.Unprocessed'"}],staticClass:"state crm_state_red"}):e._e()]}}])}),r("el-table-column",{attrs:{prop:"",align:"center",label:e.$i18n.t("Label.Action")},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[r("span",{staticClass:"el-dropdown-link crm-cursor"},[r("i",{staticClass:"iconfont iconcaidan",staticStyle:{"font-weight":"bold","font-size":"20px"}})]),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[0==t.row.status&&e.display["R-Cooperative-Agent-Approve"].show?r("el-dropdown-item",{attrs:{command:{type:"check",row:t.row}}},[r("i",{staticClass:"el-icon-s-operation"}),r("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.DealWith",expression:"'Btn.DealWith'"}]})]):e._e(),e.display["R-Cooperative-Agent-Update"].show?r("el-dropdown-item",{attrs:{command:{type:"editor",row:t.row}}},[r("i",{staticClass:"el-icon-s-operation"}),r("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Editor",expression:"'Btn.Editor'"}]})]):e._e(),e.display["R-Cooperative-Agent-Delete"].show?r("el-dropdown-item",{attrs:{command:{type:"delete",id:t.row.id}}},[r("i",{staticClass:"el-icon-delete"}),r("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Delete",expression:"'Btn.Delete'"}]})]):e._e()],1)],1)]}}])})],1),e.pagerInfo.rowTotal?r("div",{staticClass:"crm_pagination"},[r("div",{staticClass:"crm_page_total"},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item1",expression:"'Page.total.item1'"}]}),r("span",[e._v(e._s(e.pagerInfo.rowTotal))]),r("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item2",expression:"'Page.total.item2'"}]})]),r("el-pagination",{staticClass:"page",attrs:{background:"",layout:"sizes, prev, pager, next","page-sizes":[10,20,50,100],"page-size":e.pagerInfo.row,total:e.pagerInfo.rowTotal},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}})],1):e._e(),r("el-dialog",{attrs:{title:e.$t("Apply_info.ActivitiesApply.Title"),visible:e.dialogCheck,center:"","custom-class":"dialog_header_w"},on:{"update:visible":function(t){e.dialogCheck=t}}},[r("div",{staticClass:"dia-content"},[r("el-form",{ref:"dialogCheck_form",staticClass:"dialogCheck_form",attrs:{model:e.dialogCheck_form,rules:e.rules,"label-width":"135px"}},[r("el-form-item",{attrs:{prop:"",label:e.$t("Cooperative.Agent.Name")+":"}},[e._v(" "+e._s(e.dialogCheck_form.firstName+" "+e.dialogCheck_form.lastName)+" ")]),r("el-form-item",{attrs:{prop:"",label:e.$t("Cooperative.Agent.Email")+":"}},[e._v(" "+e._s(e.dialogCheck_form.email)+" ")]),r("el-form-item",{attrs:{prop:"",label:e.$t("Cooperative.Agent.Phone")+":"}},[e._v(" "+e._s(e.dialogCheck_form.phone)+" ")]),r("el-form-item",{attrs:{prop:"status",label:e.$t("Label.State")+":"}},[r("el-select",{staticClass:"crm_search_down",attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},model:{value:e.dialogCheck_form.status,callback:function(t){e.$set(e.dialogCheck_form,"status",t)},expression:"dialogCheck_form.status"}},[r("el-option",{attrs:{label:e.$t("Cooperative.Agent.Processed"),value:1}})],1)],1),r("el-form-item",{attrs:{prop:"approveDesc",label:e.$t("Cooperative.Agent.HandleRemarks")+":"}},[r("el-input",{staticClass:"crm_search_down",attrs:{type:"textarea",rows:2,size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:e.dialogCheck_form.approveDesc,callback:function(t){e.$set(e.dialogCheck_form,"approveDesc",t)},expression:"dialogCheck_form.approveDesc"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Confirm",expression:"'Btn.Confirm'"}],attrs:{type:"primary"},on:{click:function(t){return e.toVerified()}}}),r("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Cancel",expression:"'Btn.Cancel'"}],on:{click:e.cancel}})],1)],1)]),r("trading-info-add",{attrs:{dialogInfoTradingAdd:e.dialogInfoTradingAdd,editor:e.editor,myInfo:e.myInfo,formList:e.formList},on:{confirmToReload:e.confirmToReload,closeAdd:e.closeAdd}}),e.dialogInfoTradingAdd?r("div",{staticClass:"crm_verified_info_mask",on:{click:e.closeDiaAdd}}):e._e()],1)},n=[],o=(r("4160"),r("ac1f"),r("841c"),r("159b"),r("5530")),s=(r("96cf"),r("1da1")),i=r("9932"),c=r("f121"),l=r.n(c),u=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"InfoBox",class:{active:e.dialogInfoTradingAdd},attrs:{id:"TradingDetailedInfoAdd"}},[r("div",{staticClass:"header"},[r("div",[r("span",{directives:[{name:"t",rawName:"v-t",value:"R-Cooperative-Agent",expression:"'R-Cooperative-Agent'"}],staticClass:"title"})]),r("span",{staticClass:"close crm-cursor",on:{click:e.close}},[r("i",{staticClass:"el-icon-close"})])]),e.editor?e._e():r("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"120PX"}},[r("el-form-item",{attrs:{prop:"firstName",label:e.$t("Cooperative.Agent.FirstName")+":"}},[r("el-input",{attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:e.form.firstName,callback:function(t){e.$set(e.form,"firstName",t)},expression:"form.firstName"}})],1),r("el-form-item",{attrs:{prop:"lastName",label:e.$t("Cooperative.Agent.LastName")+":"}},[r("el-input",{attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:e.form.lastName,callback:function(t){e.$set(e.form,"lastName",t)},expression:"form.lastName"}})],1),r("el-form-item",{attrs:{prop:"country",label:e.$t("Label.countrys")+":"}},[r("el-select",{staticClass:"crm_search_down",attrs:{size:"small",clearable:"",filterable:"",placeholder:e.$t("Placeholder.Choose")},on:{change:e.selectChange},model:{value:e.form.country,callback:function(t){e.$set(e.form,"country",t)},expression:"form.country"}},e._l(e.countryData,(function(t,a){return r("el-option",{key:a,attrs:{label:"cn"==e.lang?t.name:t.enName,value:t.code},nativeOn:{click:function(r){return e.selectCountry(t)}}})})),1)],1),r("el-form-item",{attrs:{prop:"email",label:e.$t("Cooperative.Agent.Email")+":"}},[r("el-input",{attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}})],1),r("el-form-item",{attrs:{prop:"phone",label:e.$t("Cooperative.Agent.Phone")+":"}},[r("el-input",{attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}})],1),r("el-form-item",{attrs:{prop:"",label:e.$t("Cooperative.Agent.Remarks")+":"}},[r("el-input",{attrs:{size:"small",type:"textarea",rows:2,placeholder:e.$t("Placeholder.Input")},model:{value:e.form.remarks,callback:function(t){e.$set(e.form,"remarks",t)},expression:"form.remarks"}})],1)],1),e.editor?r("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"120PX"}},[r("el-form-item",{attrs:{prop:"firstName",label:e.$t("Cooperative.Agent.FirstName")+":"}},[r("el-input",{attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:e.form.firstName,callback:function(t){e.$set(e.form,"firstName",t)},expression:"form.firstName"}})],1),r("el-form-item",{attrs:{prop:"lastName",label:e.$t("Cooperative.Agent.LastName")+":"}},[r("el-input",{attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:e.form.lastName,callback:function(t){e.$set(e.form,"lastName",t)},expression:"form.lastName"}})],1),r("el-form-item",{attrs:{prop:"country",label:e.$t("Label.countrys")+":"}},[r("el-select",{staticClass:"crm_search_down",attrs:{size:"small",clearable:"",filterable:"",placeholder:e.$t("Placeholder.Choose")},on:{change:e.selectChange},model:{value:e.form.country,callback:function(t){e.$set(e.form,"country",t)},expression:"form.country"}},e._l(e.countryData,(function(t,a){return r("el-option",{key:a,attrs:{label:"cn"==e.lang?t.name:t.enName,value:t.code},nativeOn:{click:function(r){return e.selectCountry(t)}}})})),1)],1),r("el-form-item",{attrs:{prop:"email",label:e.$t("Cooperative.Agent.Email")+":"}},[r("el-input",{attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}})],1),r("el-form-item",{attrs:{prop:"phone",label:e.$t("Cooperative.Agent.Phone")+":"}},[r("el-input",{attrs:{size:"small",placeholder:e.$t("Placeholder.Input")},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}})],1),r("el-form-item",{attrs:{prop:"",label:e.$t("Cooperative.Agent.Remarks")+":"}},[r("el-input",{attrs:{size:"small",type:"textarea",rows:2,placeholder:e.$t("Placeholder.Input")},model:{value:e.form.remarks,callback:function(t){e.$set(e.form,"remarks",t)},expression:"form.remarks"}})],1)],1):e._e(),r("span",{staticClass:"btn crm-cursor",on:{click:e.confirm}},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Confirm",expression:"'Btn.Confirm'"}]})])],1)},p=[],d=(r("b0c0"),l.a.Code),m={name:"CooperativeAgent",props:{dialogInfoTradingAdd:{type:Boolean,default:!1},editor:{default:""},myInfo:{default:""},formList:{default:""}},data:function(){return{flag:!1,form:{firstName:"",lastName:"",email:"",phone:"",remarks:"",country:"",countryName:"",countryNameEn:""},countryData:[],rules:{firstName:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],lastName:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],email:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],phone:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],remarks:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],country:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}]}}},computed:{lang:function(){return this.Session.Get("lang")}},methods:{selectChange:function(){this.$forceUpdate()},close:function(){this.$emit("closeAdd",!1)},confirmToReload:function(){this.$emit("confirmToReload",!0)},selectCountry:function(e){this.form.countryName=e.name,this.form.countryNameEn=e.enName},confirm:function(){var e=this;this.$refs["form"].validate((function(t){if(!t)return!1;e.toConfirm()}))},toConfirm:function(){this.editor?this.editor&&this.cooperativeUpdate():this.cooperativeAdd()},cooperativeAdd:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i["a"].cooperativeAgentAdd(Object(o["a"])({},e.form));case 2:r=t.sent,r.code==d.StatusOK?(e.confirmToReload(),e.$refs["form"].resetFields(),e.$pigeon.MessageOK(e.$i18n.t("Msg.Success"))):e.$pigeon.MessageError(r.msg);case 4:case"end":return t.stop()}}),t)})))()},cooperativeUpdate:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i["a"].cooperativeAgentUpdate(Object(o["a"])({id:e.form.id},e.form));case 2:r=t.sent,r.code==d.StatusOK?(e.confirmToReload(),e.close(),e.$refs["form"].resetFields(),e.$pigeon.MessageOK(e.$i18n.t("Msg.Success"))):e.$pigeon.MessageError(r.msg);case 4:case"end":return t.stop()}}),t)})))()},getCountry:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i["a"].Country({});case 2:r=t.sent,r.code==d.StatusOK?e.countryData=r.data:e.$pigeon.MessageError(r.msg);case 4:case"end":return t.stop()}}),t)})))()}},mounted:function(){},watch:{dialogInfoTradingAdd:function(e){0==e&&this.$refs["form"]&&this.$refs["form"].resetFields(),1==e&&(this.getCountry(),this.editor||(this.form={firstName:"",lastName:"",email:"",phone:"",remarks:"",country:"",countryName:"",countryNameEn:""}))},formList:function(e){this.form=e}}},f=m,h=(r("779d"),r("2877")),g=Object(h["a"])(f,u,p,!1,null,"ec2d58bc",null),v=g.exports,b=l.a.Code,w={name:"Agent",components:{TradingInfoAdd:v},data:function(){return{flag:!1,imgUrl:l.a.Host85,pictLoading:!1,mock_tableData:[],search:{tag:1,email:"",phone:"",status:null,date:[],startDate:"",endDate:""},multipleSelection:[],dialogCheck:!1,dialogCheck_form:{approveDesc:"",status:null},dialogInfoTradingAdd:!1,editor:"",myInfo:{},formList:{},pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0},rules:{status:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"blur"}]}}},computed:{display:function(){return JSON.parse(this.Session.Get("display",!0))},lang:function(){return this.Session.Get("lang")}},methods:{handleCommand:function(e){"editor"==e.type?(this.editor=1,this.getSingle(e.row.id)):"delete"==e.type?this.delete(e.id):"check"==e.type&&(this.$refs["dialogCheck_form"]&&this.$refs["dialogCheck_form"].resetFields(),this.dialogCheck=!0,this.dialogCheck_form.firstName=e.row.firstName,this.dialogCheck_form.lastName=e.row.lastName,this.dialogCheck_form.id=e.row.id,this.dialogCheck_form.email=e.row.email,this.dialogCheck_form.phone=e.row.phone)},toVerified:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$refs["dialogCheck_form"].validate(function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(r){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=12;break}if(!t.flag){e.next=5;break}return e.abrupt("return");case 5:t.flag=!0;case 6:return e.next=8,i["a"].cooperativeSubsetApprove(Object(o["a"])({},t.dialogCheck_form));case 8:a=e.sent,a.code==b.StatusOK?(t.$pigeon.MessageOK(t.$i18n.t("Msg.Success")),t.cancel(),t.searchFunc(),t.flag=!1):(t.flag=!1,t.$pigeon.MessageError(a.msg)),e.next=13;break;case 12:return e.abrupt("return",!1);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),cancel:function(){this.dialogCheck=!1,this.$refs["dialogCheck_form"].resetFields()},closeDiaAdd:function(){this.dialogInfoTradingAdd=!1,this.editor=""},closeAdd:function(e){this.dialogInfoTradingAdd=e},addVarieties:function(){this.editor="",this.dialogInfoTradingAdd=!0},confirmToReload:function(){this.closeDiaAdd(),this.searchFunc()},handleSelectionChange:function(e){var t=this;this.multipleSelection=[],e.forEach((function(e){t.multipleSelection.push(e.id)}))},daleteAll:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r=e,e.$pigeon.MessageConfirm(e.$i18n.t("Msg.Delete"),e.$i18n.t("Msg.SystemPrompt"),e.$i18n.t("Btn.Confirm"),e.$i18n.t("Btn.Cancel"),Object(s["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,i["a"].cooperativeAgentDelete({ids:r.multipleSelection});case 2:t=e.sent,t.code==b.StatusOK?(r.$pigeon.MessageOK(r.$i18n.t("Msg.DeleteSuccess")),r.searchFunc()):r.$pigeon.MessageError(t.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){}));case 2:case"end":return t.stop()}}),t)})))()},delete:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(t){var r,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=[],r.push(t),a=this,this.$pigeon.MessageConfirm(this.$i18n.t("Msg.Delete"),this.$i18n.t("Msg.SystemPrompt"),this.$i18n.t("Btn.Confirm"),this.$i18n.t("Btn.Cancel"),Object(s["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,i["a"].cooperativeAgentDelete({ids:r});case 2:t=e.sent,t.code==b.StatusOK?(a.$pigeon.MessageOK(a.$i18n.t("Msg.DeleteSuccess")),a.searchFunc()):a.$pigeon.MessageError(t.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){}));case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),getSingle:function(e){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function r(){var a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,i["a"].cooperativeAgentSingle({id:e});case 2:a=r.sent,a.code==b.StatusOK?(t.formList=a.data,t.editor=1,t.dialogInfoTradingAdd=!0,t.$pigeon.MessageOK(t.$i18n.t("Msg.SearchSuccess"))):t.$pigeon.MessageError(a.msg);case 4:case"end":return r.stop()}}),r)})))()},searchFunc:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,e.display["R-Cooperative-Agent-Search"].show){t.next=5;break}return e.$pigeon.MessageWarning(e.$i18n.t("Msg.NotDisplay")),e.pictLoading=!1,t.abrupt("return");case 5:return null==e.search.date||0==e.search.date.length?(e.search.startDate="",e.search.endDate=""):(e.search.startDate=e.search.date[0],e.search.endDate=e.search.date[1]),t.next=8,i["a"].cooperativeAgentList(Object(o["a"])(Object(o["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 8:r=t.sent,r.code==b.StatusOK?(e.mock_tableData=r.data,null!=r.page?(e.pagerInfo.rowTotal=r.page.rowTotal,e.pagerInfo.pageTotal=r.page.pageTotal):e.pagerInfo.rowTotal=0,e.$pigeon.MessageOK(e.$i18n.t("Msg.SearchSuccess"))):e.$pigeon.MessageError(r.msg),e.pictLoading=!1;case 11:case"end":return t.stop()}}),t)})))()},getSearchDate:function(e){this.search.date=e},toSearch:function(){this.pagerInfo.current=1,this.searchFunc()},handleSizeChange:function(e){this.pagerInfo.row=e,this.searchFunc()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.searchFunc()}},mounted:function(){this.searchFunc()},watch:{"search.tag":function(){this.search.phone="",this.search.email=""}}},k=w,C=(r("ab9f"),r("0b49"),Object(h["a"])(k,a,n,!1,null,"2ea78f94",null));t["default"]=C.exports},ab9f:function(e,t,r){"use strict";r("4b06")}}]);
|