(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e632df32"],{"55f3":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"common-app-right"},[a("div",[a("div",{staticClass:"data-dimension-tip"},[a("common-alert-tip",{attrs:{width:"100%","tip-content":e.tipContent}})],1),a("div",{staticClass:"data-dimension-table flex"},[a("div",{staticClass:"data-dimension-table_left flex-1"},[a("div",{staticClass:"m-b-18"},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",placement:"right"}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v("\n              排序越靠上的权重越高，当一家门店拥有多个会员卡时，优先展示排序最靠上的会员卡\n            ")]),a("span",{staticClass:"common-bottom-border table-title"},[e._v("会员卡权重")])])],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loadingMember,expression:"loadingMember"}],ref:"memberCardData",staticStyle:{width:"100%"},attrs:{data:e.memberCardData,"row-key":"id"}},[a("el-table-column",{attrs:{prop:"",label:"",width:"56","class-name":"move-row-cell show-icon"}},[[a("span",{staticClass:"font-22 iconfont icontuozhuaiopen color-c0c4cc",staticStyle:{cursor:"move"}})]],2),a("el-table-column",{attrs:{prop:"",label:"会员卡名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.name||"--"))]}}])})],1)],1),a("div",{staticClass:"data-dimension-table_right flex-1"},[a("div",{staticClass:"m-b-18"},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",placement:"right"}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v("\n              排序越靠上的权重越高，当一家门店拥有多个服务号时，优先展示排序最靠上的服务号\n            ")]),a("span",{staticClass:"common-bottom-border table-title"},[e._v("服务号权重")])])],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loadingService,expression:"loadingService"}],ref:"serviceNumData",staticStyle:{width:"100%"},attrs:{data:e.serviceNumData,"row-key":"id"}},[a("el-table-column",{attrs:{prop:"",label:"",width:"56","class-name":"move-row-cell show-icon"}},[[a("span",{staticClass:"font-22 iconfont icontuozhuaiopen color-c0c4cc",staticStyle:{cursor:"move"}})]],2),a("el-table-column",{attrs:{prop:"",label:"服务号名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.name||"--"))]}}])})],1)],1)])])])},n=[],o=(a("55dd"),a("3081")),s=a("aa47"),i=a("d11a"),l=a("5b4e6"),c=i["a"].getMemberData,d=i["a"].saveSortMember,m={name:"DataDimensionPage",components:{commonAlertTip:o["a"]},props:{brandId:{type:String,default:""}},data:function(){return{wxEnterpriseId:localStorage.getItem("haoBanUser")?JSON.parse(localStorage.getItem("haoBanUser")).wxEnterpriseId:"",tipContent:"当商户有多个会员卡和服务号时，会造成单家门店适用于多个会员卡或服务号，即单个顾客会有多个域的身份信息，这容易造成门店成员的困扰。请为以下会员卡和服务号域做权重排序，当顾客有多个域的身份信息时，门店成员将只能看到权重最高域的一个身份信息。",memberCardData:[],serviceNumData:[],loadingMember:!1,loadingService:!1}},mounted:function(){var e=this;e.$emit("showTab","/data-dimension"),e.rowDrop("memberCardData"),e.rowsDrop("serviceNumData"),e.brandId&&e.getMemberCrad()},methods:{rowDrop:function(e){var t=this.$refs[e].$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0],a=this;s["a"].create(t,{handle:".icontuozhuaiopen",onEnd:function(t){var r=t.newIndex,n=t.oldIndex;if(r==n)return!1;var o=JSON.parse(JSON.stringify(a[e])),s=o.splice(n,1)[0];o.splice(r,0,s),a.setSort(o,e)}})},rowsDrop:function(e){var t=this.$refs[e].$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0],a=this;s["a"].create(t,{handle:".icontuozhuaiopen",onEnd:function(t){var r=t.newIndex,n=t.oldIndex;if(r==n)return!1;var o=JSON.parse(JSON.stringify(a[e])),s=o.splice(n,1)[0];o.splice(r,0,s),a.setSort(o,e)}})},setSort:function(e,t){var a=this,r={wxEnterpriseId:a.wxEnterpriseId,enterpriseId:a.brandId,sorts:e.map((function(e){return e.id})).join(","),type:"memberCardData"==t?"0":"1"};d(r,{headers:{sign:a.brandId}}).then((function(e){a.getMemberCrad(),"0000"==e.code?l["a"].showmsg("操作成功","success"):l["a"].showmsg(e.message||"接口异常","warning")})).catch((function(e){}))},getMemberCrad:function(){var e=this;e.loadingMember=!0,e.loadingService=!0,e.memberCardData=[],e.serviceNumData=[];var t={wxEnterpriseId:e.wxEnterpriseId,enterpriseId:e.brandId};c(t,{headers:{sign:e.brandId}}).then((function(t){e.loadingMember=!1,e.loadingService=!1,t.result.cards&&t.result.cards.length?e.memberCardData=e.sortTable(t.result.cards):e.memberCardData=[],t.result.services&&t.result.services.length?e.serviceNumData=e.sortTable(t.result.services):e.serviceNumData=[]})).catch((function(t){e.loadingMember=!1,e.loadingService=!1}))},sortTable:function(e){return e.sort((function(e,t){return e.sort-t.sort})),e}},watch:{brandId:function(e){var t=this;e&&(t.memberCardData=[],t.serviceNumData=[],t.getMemberCrad())}}},u=m,p=(a("abf9"),a("2877")),b=Object(p["a"])(u,r,n,!1,null,"35393196",null);t["default"]=b.exports},"7cf9":function(e,t,a){},abf9:function(e,t,a){"use strict";var r=a("7cf9"),n=a.n(r);n.a}}]);