(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c75cc1c"],{ac8e:function(t,e,a){},e1e1:function(t,e,a){"use strict";a("ac8e")},fb3e:function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("div",{staticClass:"coustomerTransfer"},[a("div",{staticClass:"leftTable"},[a("el-table",{attrs:{data:t.leftTableData,"row-key":"id","highlight-current-row":!0,border:"",height:"85%"},on:{"row-click":t.getCostomer}},[a("el-table-column",{attrs:{label:"销售名称",prop:"username",width:"120px"}}),a("el-table-column",{attrs:{label:"联系方式",prop:"mobile",width:"120px"}}),a("el-table-column",{attrs:{label:"邮箱",prop:"email"}})],1)],1),a("div",{staticClass:"rightTable"},[a("el-table",{attrs:{data:t.rightTableData,"row-key":"tid",border:"",height:"85%"}},[a("el-table-column",{attrs:{prop:"orgname",label:"客户名称",width:"120px"}}),a("el-table-column",{attrs:{prop:"contactor_phone",label:"联系方式"}}),a("el-table-column",{attrs:{prop:"address",label:"地址"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(a){return t.editSales(e.row)}}},[t._v("转移用户")])]}}])})],1)],1)])]),a("el-dialog",{staticClass:"dialog",attrs:{title:"请给"+t.customer+"更换销售人员",visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{staticClass:"dialogDiv"},[a("el-form",{attrs:{model:t.form}},[a("el-form-item",{attrs:{label:"销售人员:",prop:"resource"}},[a("el-radio-group",{staticClass:"radio",model:{value:t.form.id,callback:function(e){t.$set(t.form,"id",e)},expression:"form.id"}},t._l(t.leftTableData,(function(e,l){return a("el-radio",{key:l,attrs:{label:e.id}},[t._v(t._s(e.username))])})),1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.cancel}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.onsubmit}},[t._v("确 定")])],1)])],1)},s=[],i=(a("ac1f"),a("841c"),a("b775")),r=".dspy";function o(t){return Object(i["a"])({url:"/salemanid/getorgrolexiaoshou".concat(r),method:"get",params:t})}function n(t){return Object(i["a"])({url:"/salemanid/getruserxiaoshou".concat(r),method:"get",params:t})}function c(t){return Object(i["a"])({url:"/salemanid/upcustomersalemanid".concat(r),method:"get",params:t})}var u={data:function(){return{searchValue:null,select:"",dialogVisible:!1,leftTableData:[],rightTableData:[],userid:sessionStorage.getItem("userId"),tableTitle:"",customer:"",customerid:null,salemanid:null,form:{id:""}}},created:function(){this.getOrgSaleman()},methods:{search:function(){this.getOrgSaleman()},selectSearch:function(){this.search()},getOrgSaleman:function(){var t=this,e={userid:this.userid};o(e).then((function(e){1==e.status&&(t.leftTableData=e.data)}))},getCostomer:function(t){var e=this;this.tableTitle=t.username,this.salemanid=t.id,n({salemanid:this.salemanid}).then((function(t){1==t.status&&(e.rightTableData=t.data)}))},editSales:function(t){this.dialogVisible=!0,this.customer=t.orgname,this.customerid=t.id},onsubmit:function(){var t=this;c({salemanid:this.form.id,customerid:this.customerid}).then((function(e){1==e.status?(t.$message({message:"更换成功",type:"success"}),t.dialogVisible=!1,n({salemanid:t.salemanid}).then((function(e){1==e.status&&(t.rightTableData=e.data)}))):t.$message({message:e.msg,type:"error"})}))},cancel:function(){this.dialogVisible=!1}}},d=u,m=(a("e1e1"),a("2877")),b=Object(m["a"])(d,l,s,!1,null,"dcaf9df8",null);e["default"]=b.exports}}]);