chunk-4296fd92.0b5cc785.js 31 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4296fd92"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),Math.easeInOutQuad=function(e,t,a,r){return e/=r/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function n(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function s(e,t,a){var s=i(),l=e-s,o=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=o;var i=Math.easeInOutQuad(c,s,l,t);n(i),c<t?r(e):a&&"function"===typeof a&&a()};u()}},3516:function(e,t,a){"use strict";a("ca11")},"4cdf":function(e,t,a){"use strict";a("f7ff")},"624a":function(e,t,a){"use strict";a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"b",(function(){return o}));var r=a("829b"),n=(a("4328"),"/api-web");function i(e){return Object(r["a"])({url:n+"/memberPrivilegesItem/findAll",method:"get",params:e})}function s(e){return Object(r["a"])({url:n+"/memberPrivilegesItem/add",method:"post",data:e})}function l(e){return Object(r["a"])({url:n+"/memberPrivilegesItem/update",method:"post",data:e})}function o(e){return Object(r["a"])({url:n+"/memberPrivilegesItem/del",method:"post",params:e})}},"720a":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:"m-container"},[e._m(0),e._v(" "),a("div",{staticClass:"m-core"},[a("tab-router",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.activeIndex,callback:function(t){e.activeIndex="string"===typeof t?t.trim():t},expression:"activeIndex"}},[e.permissionList.memberSet?a("el-tab-pane",{attrs:{label:"会员设置",lazy:"",name:"1"}},[1==e.activeIndex?a("member-set"):e._e()],1):e._e(),e._v(" "),e.permissionList.memberFeeSet?a("el-tab-pane",{attrs:{label:"会员收费标准",lazy:"",name:"2"}},[2==e.activeIndex?a("member-fee-set"):e._e()],1):e._e()],1)],1)])},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("h2",[a("div",{staticClass:"squrt"}),e._v("\n 会员收费设置\n ")])}],i=(a("7f7f"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("save-form",{ref:"searchForm",staticClass:"searchForm",attrs:{inline:!0,"save-key":"memberFeeSet",model:e.searchForm},on:{submit:e.search,reset:e.onReSet,"update:model":function(t){e.searchForm=t}}},[a("el-form-item",{attrs:{prop:"search"}},[a("el-input",{attrs:{clearable:"",placeholder:"会员名称"},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"organId"}},[a("el-select",{staticClass:"multiple",staticStyle:{width:"180px !important"},attrs:{filterable:"",clearable:"",placeholder:"请选择分部"},model:{value:e.searchForm.organId,callback:function(t){e.$set(e.searchForm,"organId","string"===typeof t?t.trim():t)},expression:"searchForm.organId"}},e._l(e.selects.branchs,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"primary"}},[e._v("重置")])],1)],1),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"memberRankOrganizationFeeMapper/add",expression:"'memberRankOrganizationFeeMapper/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.addFee}},[e._v("新增收费标准")]),e._v(" "),a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",prop:"organName",label:"分部"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"rankName",label:"会员名称"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"type",label:"月收费现价(元)"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.memberFeeSetting.currentMonthFee))+"元\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"type",label:"月收费原价(元)"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.memberFeeSetting.originalMonthFee))+"元\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"type",label:"半年收费现价(元)"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.memberFeeSetting.currentHalfYearFee))+"元\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"type",label:"半年收费原价(元)"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.memberFeeSetting.originalHalfYearFee))+"元\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"type",label:"年收费现价(元)"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.memberFeeSetting.currentYearFee))+"元\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"type",label:"年收费原价(元)"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.memberFeeSetting.originalYearFee))+"元\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",width:"100px",prop:"updateTime",label:"修改时间"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"operatorName",label:"修改人"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("auth",{attrs:{auths:"memberRankOrganizationFeeMapper/get"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.resetFee(t.row)}}},[e._v("详情")])],1),e._v(" "),a("auth",{attrs:{auths:"memberRankOrganizationFeeMapper/update"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.resetFee(t.row,"update")}}},[e._v("修改")])],1)],1)]}}])})],1),e._v(" "),a("pagination",{attrs:{"save-key":"memberFeeSet",total:e.rules.total,sync:"",page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}}),e._v(" "),e.branchStatus?a("el-dialog",{attrs:{title:e.title,"close-on-click-modal":!1,visible:e.branchStatus,"default-expand-all":"",width:"720px"},on:{"update:visible":function(t){e.branchStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[a("el-form",{ref:"ruleForm",attrs:{model:e.form,inline:!0}},[a("el-form-item",{attrs:{label:"所属分部",prop:"organId",rules:[{required:!0,message:"请选择分部"}],"label-width":e.formLabelWidth}},[a("el-select",{staticClass:"multiple",staticStyle:{width:"550px !important"},attrs:{disabled:e.addDisabled,filterable:"",clearable:"",placeholder:"请选择分部"},model:{value:e.form.organId,callback:function(t){e.$set(e.form,"organId","string"===typeof t?t.trim():t)},expression:"form.organId"}},e._l(e.selects.branchs,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"会员名称",prop:"memberRankSettingId",rules:[{required:!0,message:"请选择会员"}],"label-width":e.formLabelWidth}},[a("el-select",{staticClass:"multiple",staticStyle:{width:"550px !important"},attrs:{disabled:e.addDisabled,filterable:"",clearable:"",placeholder:"请选择会员"},model:{value:e.form.memberRankSettingId,callback:function(t){e.$set(e.form,"memberRankSettingId","string"===typeof t?t.trim():t)},expression:"form.memberRankSettingId"}},e._l(e.remberList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"currentMonthFee",label:"月收费现价",rules:[{required:!0,message:"请输入月收费现价"},{pattern:/^\d+$/,message:"请输入≥0的正整数"}],"label-width":e.formLabelWidth}},[a("el-input",{staticClass:"feeInput",attrs:{disabled:e.addDisabled},model:{value:e.form.currentMonthFee,callback:function(t){e.$set(e.form,"currentMonthFee",t)},expression:"form.currentMonthFee"}},[a("template",{slot:"append"},[e._v("元/月")])],2)],1),e._v(" "),a("el-form-item",{attrs:{prop:"originalMonthFee",label:"月收费原价",rules:[{required:!0,message:"请输入月收费原价"},{pattern:/^\d+$/,message:"请输入≥0的正整数"}],"label-width":e.formLabelWidth}},[a("el-input",{staticClass:"feeInput",attrs:{disabled:e.addDisabled},model:{value:e.form.originalMonthFee,callback:function(t){e.$set(e.form,"originalMonthFee",t)},expression:"form.originalMonthFee"}},[a("template",{slot:"append"},[e._v("元/月")])],2)],1),e._v(" "),a("el-form-item",{attrs:{prop:"currentHalfYearFee",label:"半年收费现价",rules:[{required:!0,message:"请输入半年收费现价"},{pattern:/^\d+$/,message:"请输入≥0的正整数"}],"label-width":e.formLabelWidth}},[a("el-input",{staticClass:"feeInput",attrs:{disabled:e.addDisabled},model:{value:e.form.currentHalfYearFee,callback:function(t){e.$set(e.form,"currentHalfYearFee",t)},expression:"form.currentHalfYearFee"}},[a("template",{slot:"append"},[e._v("元/半年")])],2)],1),e._v(" "),a("el-form-item",{attrs:{prop:"originalHalfYearFee",label:"半年收费原价",rules:[{required:!0,message:"请输入半年收费原价"},{pattern:/^\d+$/,message:"请输入≥0的正整数"}],"label-width":e.formLabelWidth}},[a("el-input",{staticClass:"feeInput",attrs:{disabled:e.addDisabled},model:{value:e.form.originalHalfYearFee,callback:function(t){e.$set(e.form,"originalHalfYearFee",t)},expression:"form.originalHalfYearFee"}},[a("template",{slot:"append"},[e._v("元/半年")])],2)],1),e._v(" "),a("el-form-item",{attrs:{prop:"currentYearFee",label:"年收费现价",rules:[{required:!0,message:"请输入年收费现价"},{pattern:/^\d+$/,message:"请输入≥0的正整数"}],"label-width":e.formLabelWidth}},[a("el-input",{staticClass:"feeInput",attrs:{disabled:e.addDisabled},model:{value:e.form.currentYearFee,callback:function(t){e.$set(e.form,"currentYearFee",t)},expression:"form.currentYearFee"}},[a("template",{slot:"append"},[e._v("元/年")])],2)],1),e._v(" "),a("el-form-item",{attrs:{prop:"originalYearFee",label:"年收费原价",rules:[{required:!0,message:"请输入年收费原价"},{pattern:/^\d+$/,message:"请输入≥0的正整数"}],"label-width":e.formLabelWidth}},[a("el-input",{staticClass:"feeInput",attrs:{disabled:e.addDisabled},model:{value:e.form.originalYearFee,callback:function(t){e.$set(e.form,"originalYearFee",t)},expression:"form.originalYearFee"}},[a("template",{slot:"append"},[e._v("元/年")])],2)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e.addDisabled?e._e():a("el-button",{on:{click:function(t){e.branchStatus=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("确 定")])],1)],1):e._e()],1)}),s=[],l=a("5530"),o=(a("386d"),a("96cf"),a("1da1")),c=(a("6612"),a("829b")),u=(a("4328"),"/api-web");function m(e){return Object(c["a"])({url:u+"/memberRankSetting/findAll",method:"get",params:e})}function d(e){return Object(c["a"])({url:u+"/memberRankSetting/add",method:"post",data:e})}function p(e){return Object(c["a"])({url:u+"/memberRankSetting/queryPage",method:"get",params:e})}function h(e){return Object(c["a"])({url:u+"/memberRankSetting/get",method:"get",params:e})}function f(e){return Object(c["a"])({url:u+"/memberRankSetting/update",method:"post",data:e})}function b(e){return Object(c["a"])({url:u+"/memberRankOrganizationFeeMapper/add",method:"post",data:e})}function g(e){return Object(c["a"])({url:u+"/memberRankOrganizationFeeMapper/queryPage",method:"get",params:e})}function v(e){return Object(c["a"])({url:u+"/memberRankOrganizationFeeMapper/update",method:"post",data:e,requestType:"json"})}var k=a("333d"),y={components:{pagination:k["a"]},name:"memberFeeSet",data:function(){return{searchForm:{search:null,organId:null},rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},tableList:[],addDisabled:!1,title:"新增收费标准",formLabelWidth:"120px",form:{currentDayFee:"",currentHalfYearFee:"",currentMonthFee:"",currentYearFee:"",originalDayFee:"",originalHalfYearFee:"",originalMonthFee:"",originalYearFee:"",organId:"",memberRankSettingId:""},branchStatus:!1,remberList:[]}},mounted:function(){var e=Object(o["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,this.$store.dispatch("setBranchs");case 2:return e.prev=2,e.next=5,m();case 5:t=e.sent,this.remberList=t.data,e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](2);case 11:this.getList();case 12:case"end":return e.stop()}}),e,this,[[2,9]])})));function t(){return e.apply(this,arguments)}return t}(),methods:{search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.$refs.searchForm.resetFields(),this.search()},getList:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g(Object(l["a"])(Object(l["a"])({},this.searchForm),{},{rows:this.rules.limit,page:this.rules.page}));case 3:t=e.sent,this.tableList=t.data.rows,this.rules.total=t.data.total,e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),onFormClose:function(e){this.form={currentDayFee:"",currentHalfYearFee:"",currentMonthFee:"",currentYearFee:"",originalDayFee:"",originalHalfYearFee:"",originalMonthFee:"",originalYearFee:"",organId:"",memberRankSettingId:""},this.$refs[e].resetFields()},addFee:function(){this.title="新增收费标准",this.addDisabled=!1,this.pageType="create",this.branchStatus=!0},resetFee:function(e,t){t?(this.title="修改收费标准",this.pageType="update",this.addDisabled=!1):(this.addDisabled=!0,this.title="查看收费标准",this.pageType=""),this.form=Object(l["a"])(Object(l["a"])({},e.memberFeeSetting),{},{organId:e.organId,memberRankSettingId:e.memberRankSettingId,outId:e.id}),this.branchStatus=!0},onSubmit:function(){var e=this;this.$refs.ruleForm.validate(function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=31;break}if("update"!=e.pageType){t.next=16;break}return t.prev=2,t.next=5,v({memberFeeSetting:Object(l["a"])({},e.form),organId:e.form.organId,memberRankSettingId:e.form.memberRankSettingId,id:e.form.outId});case 5:t.sent,e.$message.success("修改成功"),e.branchStatus=!1,e.getList(),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](2),console.log(t.t0);case 14:t.next=31;break;case 16:if("create"!=e.pageType){t.next=30;break}return t.prev=17,t.next=20,b({memberFeeSetting:Object(l["a"])({},e.form),organId:e.form.organId,memberRankSettingId:e.form.memberRankSettingId});case 20:t.sent,e.$message.success("新建会员成功"),e.branchStatus=!1,e.getList(),t.next=28;break;case 26:t.prev=26,t.t1=t["catch"](17);case 28:t.next=31;break;case 30:e.branchStatus=!1;case 31:case"end":return t.stop()}}),t,null,[[2,11],[17,26]])})));return function(e){return t.apply(this,arguments)}}())}}},_=y,F=(a("a3bb"),a("2877")),w=Object(F["a"])(_,i,s,!1,null,"32ed13de",null),x=w.exports,S=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("save-form",{staticClass:"searchForm",attrs:{inline:!0,"save-key":"memberSet",model:e.searchForm},on:{submit:e.search,reset:e.onReSet,"update:model":function(t){e.searchForm=t}}},[a("el-form-item",[a("el-input",{attrs:{clearable:"",placeholder:"会员名称"},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")])],1)],1),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"memberRankSetting/add",expression:"'memberRankSetting/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.addLeave}},[e._v("新增会员等级")]),e._v(" "),a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",prop:"name",label:"会员名称"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"type",label:"会员标识"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("el-image",{staticStyle:{width:"100px",height:"100px"},attrs:{src:e.row.icon,"preview-src-list":[e.row.icon]}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"updateTime",width:"100px",label:"修改时间"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"operatorName",label:"修改人"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("auth",{attrs:{auths:"memberRankSetting/get"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.resetMember(t.row)}}},[e._v("详情")])],1),e._v(" "),a("auth",{attrs:{auths:["memberRankSetting/get","memberRankSetting/update"],mulit:""}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.resetMember(t.row,"update")}}},[e._v("修改")])],1)],1)]}}])})],1),e._v(" "),e.branchStatus?a("el-dialog",{attrs:{title:e.title,"close-on-click-modal":!1,visible:e.branchStatus,"default-expand-all":"",width:"800px"},on:{"update:visible":function(t){e.branchStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[a("el-form",{ref:"ruleForm",attrs:{model:e.form,inline:!0}},[a("el-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{title:"会员信息",type:"info",closable:!1}}),e._v(" "),a("el-form-item",{attrs:{label:"会员名称",prop:"name","label-width":e.formLabelWidth,rules:[{required:!0,message:"请输入会员名称"}]}},[a("el-input",{staticStyle:{width:"620px"},attrs:{disabled:e.addDisabled,autocomplete:"off",maxlength:"10","show-word-limit":""},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name","string"===typeof t?t.trim():t)},expression:"form.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"会员介绍",prop:"intro","label-width":e.formLabelWidth,rules:[{required:!0,message:"请输入会员介绍"}]}},[a("el-input",{staticStyle:{width:"620px"},attrs:{maxlength:"50","show-word-limit":"",disabled:e.addDisabled,autocomplete:"off",type:"textarea",rows:3},model:{value:e.form.intro,callback:function(t){e.$set(e.form,"intro","string"===typeof t?t.trim():t)},expression:"form.intro"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"会员标识",prop:"icon","label-width":e.formLabelWidth,rules:[{required:!0,message:"请上传会员标识"}]}},[e.addDisabled?a("img",{attrs:{src:e.form.icon,alt:"",width:"120px",height:"120px"}}):a("upload",{attrs:{imageWidthM:200,disabled:e.addDisabled,imageHeightM:200},model:{value:e.form.icon,callback:function(t){e.$set(e.form,"icon",t)},expression:"form.icon"}}),e._v(" "),e.addDisabled?e._e():a("p",{staticStyle:{color:"red"}},[e._v("\n 请上传200*200像素,大小2M以内,格式为jpg、png、gif图片\n ")])],1),e._v(" "),a("el-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{title:"会员权益",type:"info",closable:!1}}),e._v(" "),a("el-form-item",{attrs:{label:e.searchName,"label-width":e.formLabelWidth}},[a("el-input",{staticStyle:{width:"210px"},model:{value:e.seachRoleValue,callback:function(t){e.seachRoleValue="string"===typeof t?t.trim():t},expression:"seachRoleValue"}}),e._v(" "),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"danger"},on:{click:e.seachRoles}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onReSetRole}},[e._v("重置")])],1),e._v(" "),a("br"),e._v(" "),a("el-form-item",{attrs:{label:"会员功能","label-width":e.formLabelWidth}},[a("el-checkbox",{attrs:{disabled:e.addDisabled,indeterminate:e.isIndeterminate},on:{change:e.onCheckAll},model:{value:e.checkAll,callback:function(t){e.checkAll="string"===typeof t?t.trim():t},expression:"checkAll"}},[e._v("全选")]),e._v(" "),a("div",[a("el-tree",{ref:"trees",staticClass:"tree",attrs:{data:e.treeData,"show-checkbox":"","node-key":"id","filter-node-method":e.filterNode,"highlight-current":"","default-checked-keys":e.checkList,props:e.defaultProps},on:{check:e.onTreeCheck},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.node;t.data;return a("div",{},[e._v("\n "+e._s(r.label)+"\n ")])}}],null,!1,769793285)})],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e.addDisabled?e._e():a("el-button",{on:{click:function(t){e.branchStatus=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("确 定")])],1)],1):e._e(),e._v(" "),a("pagination",{attrs:{"save-key":"memberSet",total:e.rules.total,sync:"",page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],1)},I=[],R=(a("ac6a"),a("6762"),a("2fdb"),a("2909")),L=a("c7f0"),O=a("624a"),$={components:{pagination:k["a"],Upload:L["a"]},name:"memberSet",data:function(){return{formLabelWidth:"120px",searchForm:{search:null},rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},tableList:[],title:"新增会员等级",branchStatus:!1,form:{name:"",icon:"",into:""},addDisabled:!1,checkAll:!1,isIndeterminate:!1,treeData:[],defaultProps:{children:"children",label:"label",disabled:this.addDisabled},result:{roleName:null,roleDesc:null},seachRoleValue:"",silderList:[],slideCount:0,pageType:"",allChildIds:[],checkList:[],searchName:"搜索       "}},mounted:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.getList();case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{onFormClose:function(e){this.form={name:"",icon:"",into:""},this.$refs.trees.setCheckedNodes([]),this.onTreeCheck(),this.$refs[e].resetFields()},search:function(){this.rules.page=1,this.getList()},onReSet:function(){},getList:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p({search:this.searchForm.search,rows:this.rules.limit,page:this.rules.page});case 3:t=e.sent,this.tableList=t.data.rows,this.rules.total=t.data.total,e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),addLeave:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.checkList=[],this.title="新增会员等级",this.addDisabled=!1,this.pageType="create",e.next=6,this.getNewTree();case 6:return this.slideCount=0,e.next=9,this.setTableData(this.silderList,this.addDisabled);case 9:this.treeData=e.sent,this.branchStatus=!0;case 11:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),onSubmit:function(){var e=this;this.$refs.ruleForm.validate(function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(a){var r,n,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=33;break}if(r=e.$refs.trees.getCheckedKeys(),n=e.$refs.trees.getHalfCheckedKeys(),i=[].concat(Object(R["a"])(r),Object(R["a"])(n)),"update"!=e.pageType){t.next=18;break}return t.prev=5,t.next=8,f(Object(l["a"])(Object(l["a"])({},e.form),{},{memberPrivilegesItemIdList:i}));case 8:t.sent,e.$message.success("修改成功"),e.branchStatus=!1,e.getList(),t.next=16;break;case 14:t.prev=14,t.t0=t["catch"](5);case 16:t.next=33;break;case 18:if("create"!=e.pageType){t.next=32;break}return t.prev=19,t.next=22,d(Object(l["a"])(Object(l["a"])({},e.form),{},{memberPrivilegesItemIdList:i}));case 22:t.sent,e.$message.success("新建会员成功"),e.branchStatus=!1,e.getList(),t.next=30;break;case 28:t.prev=28,t.t1=t["catch"](19);case 30:t.next=33;break;case 32:e.branchStatus=!1;case 33:case"end":return t.stop()}}),t,null,[[5,14],[19,28]])})));return function(e){return t.apply(this,arguments)}}())},onCheckAll:function(e){e?(this.isIndeterminate=!1,this.$refs.trees.setCheckedNodes(this.treeData)):this.$refs.trees.setCheckedNodes([])},onTreeCheck:function(){var e=this.$refs.trees.getCheckedKeys();this.checkAll=e.length>=this.slideCount,this.isIndeterminate=e.length>0&&e.length<this.slideCount},filterNode:function(e,t){return!e||-1!==t.label.indexOf(e)},seachRoles:function(){this.$refs.trees.filter(this.seachRoleValue)},onReSetRole:function(){this.seachRoleValue="",this.$refs.trees.filter(this.seachRoleValue)},setTableData:function(e,t){var a=this,r=[];return r=e.map((function(e){var r={};return r={id:e.id,name:e.name,label:e.name,disabled:t||!1},a.slideCount++,e.memberPrivilegesItems&&e.memberPrivilegesItems.length>0&&(r.children=a.setTableData(e.memberPrivilegesItems,t)),r})),r},resetMember:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t,a){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.branchStatus=!0,e.next=3,this.resetTree(t);case 3:if(!a){e.next=13;break}return this.title="修改会员等级",this.pageType="update",this.addDisabled=!1,this.slideCount=0,e.next=10,this.setTableData(this.silderList,this.addDisabled);case 10:this.treeData=e.sent,e.next=20;break;case 13:return this.addDisabled=!0,this.title="查看会员等级",this.pageType="",this.slideCount=0,e.next=19,this.setTableData(this.silderList,this.addDisabled);case 19:this.treeData=e.sent;case 20:case"end":return e.stop()}}),e,this)})));function t(t,a){return e.apply(this,arguments)}return t}(),getParent:function(e,t){var a=JSON.parse(JSON.stringify(e));this.getAllChildIds(t);for(var r=this.allChildIds,n=e.length;n>0;n--)r.includes(e[n-1])||a.splice(n-1,1);return a},getAllChildIds:function(e){var t=this,a=this.allChildIds;e.forEach((function(e,r){e.children&&e.children.length>0?t.getAllChildIds(e.children):a.push(e.id)}))},resetTree:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){var a,r,n,i,s,o=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getNewTree();case 3:return this.treeData=e.sent,e.next=6,h({memberRankSettingId:t.id});case 6:i=e.sent,this.form=Object(l["a"])({},i.data),this.checkAll=(null===(a=i.data.memberPrivilegesItemIdList)||void 0===a?void 0:a.length)>=this.slideCount||!1,this.isIndeterminate=(null===(r=i.data.memberPrivilegesItemIdList)||void 0===r?void 0:r.length)>0&&(null===(n=i.data.memberPrivilegesItemIdList)||void 0===n?void 0:n.length)<this.slideCount,this.checkList=i.data.memberPrivilegesItemIdList,s=this.getParent(i.data.memberPrivilegesItemIdList||[],this.treeData),this.checkList=s,this.$nextTick((function(){o.$refs.trees.setCheckedKeys(o.checkList)})),e.next=19;break;case 16:e.prev=16,e.t0=e["catch"](0),console.log(e.t0);case 19:case"end":return e.stop()}}),e,this,[[0,16]])})));function t(t){return e.apply(this,arguments)}return t}(),getNewTree:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(O["c"])();case 3:return t=e.sent,this.silderList=t.data,this.slideCount=0,e.abrupt("return",this.setTableData(t.data));case 9:e.prev=9,e.t0=e["catch"](0);case 11:case"end":return e.stop()}}),e,this,[[0,9]])})));function t(){return e.apply(this,arguments)}return t}()}},C=$,j=(a("4cdf"),Object(F["a"])(C,S,I,!1,null,"61a73e5c",null)),D=j.exports,T=a("ec8a"),M={components:{"member-fee-set":x,"member-set":D},data:function(){return{activeIndex:"1",permissionList:{memberSet:Object(T["a"])("/memberSet"),memberFeeSet:Object(T["a"])("/memberFeeSet")}}},mounted:function(){},methods:{handleClick:function(e){this.activeIndex=e.name}}},Y=M,N=Object(F["a"])(Y,r,n,!1,null,null,null);t["default"]=N.exports},a3bb:function(e,t,a){"use strict";a("e8d9")},c7f0:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"upload"},[a("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:e.uploadImgLoading,expression:"uploadImgLoading"}],staticClass:"avatar-uploader",staticStyle:{"line-height":"0",display:"inline-block"},attrs:{action:"/api-web/uploadFile",headers:e.headers,"show-file-list":!1,accept:e.accept,"on-success":e.handleImgSuccess,"on-error":e.handleUploadImgError,"before-upload":e.beforeImgUpload}},[e.imgUrl?a("img",{staticClass:"avatar",attrs:{src:e.imgUrl}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1)},n=[],i=(a("c5f6"),a("3908"),a("5f87")),s={data:function(){return{headers:{Authorization:Object(i["a"])()},uploadImgLoading:!1,imgUrl:null}},props:{value:{type:String},accept:{type:String,default:function(){return".jpg, .jpeg, .png, .gif"}},imageSizeM:{type:Number,default:function(){return 2}},imageWidthM:{type:Number,default:function(){return null}},imageHeightM:{type:Number,default:function(){return null}},imageType:{type:Object,default:function(){return{"image/png":!0,"image/jpeg":!0,"image/jpg":!0,"image/gif":!0}}}},mounted:function(){this.imgUrl=this.value},methods:{beforeImgUpload:function(e){var t=this,a=this.imageType[e.type],r=e.size/1024/1024<this.imageSizeM,n=this.imageWidthM,i=this.imageHeightM,s=window.URL||window.webkitURL,l=new Promise((function(t,a){var r=new Image;r.onload=function(){n&&i?this.width===n&&this.height===i?t():a("请上传".concat(n,"x").concat(i,"尺寸图片")):n&&!i?this.width===n?t():a("请上传宽为".concat(n,"的图片")):!n&&i?this.height===i?t():a("请上传高为".concat(i,"的图片")):t()},r.src=s.createObjectURL(e)})).then((function(){return e}),(function(e){return t.$message.error(e),t.uploadImgLoading=!1,Promise.reject()}));return a||this.$message.error("只能上传图片格式!"),r||this.$message.error("上传图片大小不能超过 ".concat(this.imageSizeM,"MB!")),a&&r&&l&&(this.uploadImgLoading=!0),a&&r&&l},handleUploadImgError:function(e){this.uploadImgLoading=!1,this.$message.error("上传失败")},handleImgSuccess:function(e,t){this.uploadImgLoading=!1,this.imgUrl=e.data.url,this.$emit("input",e.data.url)}},watch:{value:function(e){this.imgUrl=e}},beforeDestroy:function(){}},l=s,o=(a("3516"),a("2877")),c=Object(o["a"])(l,r,n,!1,null,null,null);t["a"]=c.exports},ca11:function(e,t,a){},e8d9:function(e,t,a){},f7ff:function(e,t,a){}}]);