webpackJsonp([98],{"0zzn":function(t,e){},odfG:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("P9l9"),n=a("Ch4/"),l={name:"MemberShowSet",data:function(){return{tableData:[]}},created:function(){this.getTableData()},methods:{formatStoreType:function(t,e,a){var o=[];if("string"==typeof a){var n=a.split(",");o=[{label:"自营",value:"0"},{label:"联营",value:"1"},{label:"代理",value:"2"},{label:"代销",value:"3"},{label:"托管",value:"4"}].filter(function(t){return n.includes(t.value)}).map(function(t){return t.label})}return o.join("/")},formatSetting:function(t){var e=[];return 1==t.mainStoreFlag&&e.push("展示服务门店客户"),1==t.minorStoreFlag&&e.push("展示协管门店客户"),1==t.openCardStoreFlag&&e.push("展示开卡门店客户"),1==t.showFreezeFlag&&e.push("展示冻结会员"),1==t.isSeeAuthMember&&e.push("展示已开卡会员"),1==t.clerkSeeOtherFlag&&e.push("允许导购查看其他导购客户"),e.join("；")},getTableData:function(){var t=this;Object(o.b)("/haoban-app-customer-web/customer/find-member-manage-setting-list",{}).then(function(e){var a=e.data||{},o=a.code,l=a.result;0==o?(t.tableData=Array.isArray(l)?l:[],t.$nextTick(function(){t.tableData.map(function(e,a){var o=t.$refs["setContent"+a];t.$set(e,"isOverflow",o.scrollHeight>o.clientHeight)})})):n.a.errorMsg(e.data)})},onDel:function(t){var e=this;this.$set(t,"loading",!0),Object(o.b)("/haoban-app-customer-web/customer/del-member-setting",{memberManageSettingId:t.memberManageSettingId}).then(function(a){if(0!=(a.data||{}).code)return n.a.errorMsg(a.data),void e.$set(t,"loading",!1);e.$message.success("删除成功"),e.getTableData()}).catch(function(){return e.$set(t,"loading",!1)})}}},r={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"show-set"},[a("div",{staticClass:"show-set-header"},[a("el-alert",{staticClass:"show-set-tips",attrs:{type:"info","show-icon":"",closable:!1}},[a("div",{attrs:{slot:"title"},slot:"title"},[a("div",{staticClass:"tips-text"},[t._v("1. 同一商户下，各子管理员新增的特殊策略的门店类型不能重复；")]),t._v(" "),a("div",{staticClass:"tips-text"},[t._v("2. 子管理员设置的门店类型和默认重复时，按子管理员设置的逻辑生效；")])])]),t._v(" "),t.$getButtonLimit(t.$buttonCode.addShowRules)?a("el-button",{attrs:{"limit-code":t.$buttonCode.addShowRules,type:"primary"},on:{click:function(e){return t.$router.push("/addMemberShowRules")}}},[t._v("新增特殊策略")]):t._e()],1),t._v(" "),a("el-table",{attrs:{data:t.tableData}},[a("el-table-column",{attrs:{label:"策略名称",prop:"strategyName","min-width":"185px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.row;return[0==e.$index?a("span",{staticClass:"default-store"},[t._v("默认")]):t._e(),t._v("\n        "+t._s(o.strategyName)+"\n      ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"策略类型",prop:"storeType",formatter:function(t,e,a){return"-999"==a?"通用策略":"特殊策略"},"min-width":"110px"}}),t._v(" "),a("el-table-column",{attrs:{label:"门店类型",prop:"storeType",formatter:t.formatStoreType,"min-width":"110px"}}),t._v(" "),a("el-table-column",{attrs:{label:"设置内容","min-width":"310px"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.row,n=e.$index;return[o.isOverflow?a("el-tooltip",{attrs:{placement:"top"}},[a("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.formatSetting(o)))]),t._v(" "),a("div",{staticClass:"text-overflow"},[t._v(t._s(t.formatSetting(o)))])]):a("div",{ref:"setContent"+n,staticClass:"text-overflow"},[t._v(t._s(t.formatSetting(o)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"创建人",prop:"creatorName","min-width":"120px","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"编辑人",prop:"modifierName","min-width":"120px","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"最近编辑时间",prop:"updateTime","min-width":"110px"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.row;return a("div",{staticStyle:{"line-height":"normal"}},[a("p",[t._v(t._s(t._f("timeStampToYmd")(o.updateTime)))]),t._v(" "),a("p",[t._v(t._s(t._f("timeStampToHms")(o.updateTime)))])])}}])}),t._v(" "),t.$getButtonLimit(t.$buttonCode.editShowRules)||t.$getButtonLimit(t.$buttonCode.delShowRules)?a("el-table-column",{attrs:{label:"操作","min-width":"120px"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.row,n=e.$index;return[t.$getButtonLimit(t.$buttonCode.editShowRules)?a("el-button",{attrs:{"limit-code":t.$buttonCode.editShowRules,type:"text"},on:{click:function(e){return t.$router.push("/editMemberShowRules?id="+o.memberManageSettingId)}}},[t._v("编辑")]):t._e(),t._v(" "),n>0&&t.$getButtonLimit(t.$buttonCode.delShowRules)?a("dm-delete",{attrs:{tips:"是否删除?"},on:{confirm:function(e){return t.onDel(o)}}},[a("el-button",{attrs:{loading:o.loading,"limit-code":t.$buttonCode.delShowRules,type:"text"}},[t._v("删除")])],1):t._e()]}}])}):t._e()],1)],1)},staticRenderFns:[]};var i=a("VU/8")(l,r,!1,function(t){a("0zzn")},"data-v-46fb63d1",null);e.default=i.exports}});