1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2aafd8da"],{"0084":function(e,t,r){"use strict";r("f894")},"4a38":function(e,t,r){"use strict";r("ae4f")},"4cab":function(e,t,r){"use strict";r.d(t,"e",(function(){return n})),r.d(t,"a",(function(){return i})),r.d(t,"f",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return c}));var a=r("829b"),n=function(e){return Object(a["a"])({url:"/api-web/platformServe/queryPage",method:"get",params:e})},i=function(e){return Object(a["a"])({url:"/api-web/platformServe/add",method:"post",data:e})},o=function(e){return Object(a["a"])({url:"/api-web/platformServe/update",method:"post",data:e})},s=function(e){return Object(a["a"])({url:"/api-web/platformServe/delete/"+e.id,method:"get"})},l=function(e){return Object(a["a"])({url:"/api-web/platformServe/queryInfo/"+e.id,method:"get"})},c=function(e){return Object(a["a"])({url:"/api-web/platformServe/queryModeDetail/"+e.id,method:"get"})}},7777:function(e,t,r){},"8a4d":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",{staticClass:"m-container",attrs:{id:"header"}},[r("h2",{staticClass:"tenant-header"},[r("el-page-header",{attrs:{content:e.title},on:{back:e.onCancel}})],1),e._v(" "),r("div",{staticClass:"m-core",staticStyle:{overflow:"hidden"}},["look"!=e.payType?r("div",{staticStyle:{display:"block",overflow:"hidden","margin-bottom":"15px"}},[r("el-col",{attrs:{span:12,lg:14,md:20,sm:20,xs:24}},[r("el-steps",{attrs:{active:e.active,"finish-status":"success",simple:"","align-center":""}},[r("el-step",{attrs:{title:"机构信息"}}),e._v(" "),r("el-step",{attrs:{title:"产品定价"}}),e._v(" "),r("el-step",{attrs:{title:"确认设置"}})],1)],1)],1):e._e(),e._v(" "),e.status?r("div",[r("organInfo",{directives:[{name:"show",rawName:"v-show",value:[0,2].includes(e.active),expression:"[0, 2].includes(active)"}],ref:"organInfo",attrs:{data:e.info,type:e.getType}}),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:[1,2].includes(e.active),expression:"[1, 2].includes(active)"}]},[r("openService",{ref:"openService",attrs:{data:e.productInfo,type:e.getType}}),e._v(" "),r("memberSetting",{ref:"memberSetting",attrs:{data:e.config,type:e.getType}}),e._v(" "),r("roomRules",{ref:"roomRules",attrs:{data:e.config,type:e.getType}}),e._v(" "),r("rateSetting",{ref:"rateSetting",attrs:{data:e.config,type:e.getType}})],1),e._v(" "),"look"!=e.payType?r("div",{staticStyle:{"padding-left":"0",display:"flex",width:"100%","justify-content":"center"}},[e.active>0?r("el-button",{attrs:{type:"primary"},on:{click:e.onPrev}},[e._v("上一步")]):e._e(),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.onNext}},[e._v(e._s(e.active>=2?"提交":"下一步"))])],1):e._e()],1):e._e()])])},n=[],i=r("c80c"),o=r("db72"),s=r("a8db"),l=(r("96cf"),r("3b8d")),c=r("6ef4"),u=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{title:"开通服务",type:"info",closable:!1}}),e._v(" "),r("el-form",{ref:"form",attrs:{"label-position":"top",model:e.form,"label-width":"140px",inline:!0}},[r("el-form-item",{attrs:{label:"服务名称",prop:"serveId",rules:[{required:!0,message:"请选择服务名称",trigger:"change"}]}},[r("el-select",{attrs:{disabled:e.isDisabled,placeholder:"请选择服务名称"},on:{change:e.onProductChange},model:{value:e.form.serveId,callback:function(t){e.$set(e.form,"serveId",t)},expression:"form.serveId"}},e._l(e.productList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.serveName,value:e.id}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"付费模式",prop:"serveMode",rules:[{required:!0,message:"请选择付费模式",trigger:"change"}]}},[r("el-select",{attrs:{disabled:e.isDisabled,placeholder:"请选择付费模式"},on:{change:e.onModeChange},model:{value:e.form.serveMode,callback:function(t){e.$set(e.form,"serveMode",t)},expression:"form.serveMode"}},e._l(e.modeList,(function(t,a){return r("el-option",{key:a,attrs:{label:e.paymentMode[t.mode],value:t.mode}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"学员上限",prop:"serveDetailId",rules:[{required:!0,message:"请选择学员上限",trigger:"blur, change"}]}},[r("el-select",{attrs:{placeholder:"请选择学员上限",disabled:e.isDisabled},on:{change:e.onStudentUpLimitChange},model:{value:e.form.serveDetailId,callback:function(t){e.$set(e.form,"serveDetailId",t)},expression:"form.serveDetailId"}},e._l(e.studentUpList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.studentUpLimit,value:e.id}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"合同价(续费价格)",prop:"contractPrice",rules:[{required:!0,message:"请输入合同价",trigger:"blur"}]}},[r("el-input",{attrs:{disabled:e.isDisabled,placeholder:"请输入合同价",type:"text"},nativeOn:{keyup:function(t){return e.keyupEvent(t)}},model:{value:e.form.contractPrice,callback:function(t){e.$set(e.form,"contractPrice",t)},expression:"form.contractPrice"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("元/"+e._s(e.unitSuffix))])])],1),e._v(" "),r("el-form-item",{attrs:{label:"原价",prop:"originalPrice",rules:[{required:!0,message:"请输入原价",trigger:"blur"}]}},[r("el-input",{attrs:{placeholder:"请输入原价",disabled:""},nativeOn:{keyup:function(t){return e.keyupEvent(t)}},model:{value:e.form.originalPrice,callback:function(t){e.$set(e.form,"originalPrice",t)},expression:"form.originalPrice"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("元/"+e._s(e.unitSuffix))])])],1),e._v(" "),r("el-form-item",{attrs:{label:"有效期",prop:"expiryCount",rules:[{required:!0,message:"请输入有效期",trigger:"blur"}]}},[r("el-input",{attrs:{disabled:e.isDisabled,type:"number",placeholder:"请输入有效期"},on:{input:function(t){e.form.expiryCount=t.replace(/[^\d]/g,"")}},model:{value:e.form.expiryCount,callback:function(t){e.$set(e.form,"expiryCount",t)},expression:"form.expiryCount"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v(e._s(e.unitSuffix))])])],1),e._v(" "),r("el-form-item",{attrs:{label:"首次开通价格",prop:"payAmount",rules:[{required:!0,message:"请输入首次开通价格",trigger:"blur"}]}},[r("el-input",{attrs:{placeholder:"请输入首次开通价格",type:"number",disabled:e.isDisabled},nativeOn:{keyup:function(t){return e.keyupEvent(t)}},model:{value:e.form.payAmount,callback:function(t){e.$set(e.form,"payAmount",t)},expression:"form.payAmount"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("元")])])],1)],1)],1)},d=[],p=r("2d63"),f=r("4cab"),m=r("267e"),h={props:["type","data"],data:function(){return{paymentMode:m["paymentMode"],form:{serveId:null,serveMode:null,serveDetailId:null,studentUpLimit:null,expiryUnit:null,contractPrice:null,originalPrice:null,expiryCount:null,payAmount:null},payState:null,productList:[],modeList:[],studentUpList:[]}},mounted:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(){var t;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.__init();case 2:if(!this.data){e.next=19;break}if(t=this.data,this.payState=t.payState,!t.serveId){e.next=10;break}return e.next=8,this.onProductChange(t.serveId);case 8:e.next=11;break;case 10:case 11:if(this.form=t,this.form.serveMode=t.expiryUnit,!t.serveDetailId){e.next=18;break}return e.next=16,this.onModeChange(t.expiryUnit,"none");case 16:e.next=19;break;case 18:case 19:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),computed:{isDisabled:function(){return"setting"==this.type||1==this.payState},unitSuffix:function(){return this.paymentMode[this.form.expiryUnit]||"年"}},methods:{__init:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(){var t,r;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(f["e"])({page:1,rows:999});case 3:r=e.sent,this.productList=(null===(t=r.data)||void 0===t?void 0:t.rows)||[],e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](0);case 9:case"end":return e.stop()}}),e,this,[[0,7]])})));function t(){return e.apply(this,arguments)}return t}(),onProductChange:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(t){var r;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.form,e.prev=1,e.next=4,Object(f["d"])({id:t});case 4:r=e.sent,this.modeList=r.data||[],this.form.serveMode=null,this.form.serveDetailId=null,this.form.studentUpLimit=null,this.form.expiryUnit=null,this.form.contractPrice=null,this.form.originalPrice=null,e.next=16;break;case 14:e.prev=14,e.t0=e["catch"](1);case 16:case"end":return e.stop()}}),e,this,[[1,14]])})));function t(t){return e.apply(this,arguments)}return t}(),onSubmit:function(){var e=!1;return this.$refs.form.validate((function(t){e=t})),e},getValues:function(){return this.form},onModeChange:function(e,t){var r,a=this.form,n=Object(p["a"])(this.modeList||[]);try{for(n.s();!(r=n.n()).done;){var i=r.value;e==i.mode&&(this.studentUpList=i.list||[],a.expiryUnit=i.mode,"none"!=t&&(a.serveDetailId=null,a.originalPrice=null))}}catch(o){n.e(o)}finally{n.f()}},onStudentUpLimitChange:function(e){var t,r=this.form,a=Object(p["a"])(this.studentUpList||[]);try{for(a.s();!(t=a.n()).done;){var n=t.value;e==n.id&&(r.serveDetailId=n.id,r.originalPrice=n.originalPrice)}}catch(i){a.e(i)}finally{a.f()}}}},v=h,b=(r("93f6"),r("2877")),g=Object(b["a"])(v,u,d,!1,null,"579de55d",null),y=g.exports,_=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{title:"会员设置",type:"info",closable:!1}}),e._v(" "),r("el-form",{ref:"form",attrs:{"label-position":"top",model:e.form,"label-width":"140px",inline:!0}},[r("el-form-item",{attrs:{label:"按天会员激活金额",prop:"day_divide",rules:[{required:!0,message:"请输入会员激活金额",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"238px"},attrs:{disabled:e.isDisabled,placeholder:"请输入会员激活金额"},nativeOn:{keyup:function(t){return e.keyupEvent(t)}},model:{value:e.form.day_divide,callback:function(t){e.$set(e.form,"day_divide",t)},expression:"form.day_divide"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("元/天/人")])])],1),e._v(" "),r("el-form-item",{attrs:{label:"月度会员激活价",prop:"month_divide",rules:[{required:!0,message:"请输入会员激活价",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"238px"},attrs:{disabled:e.isDisabled,placeholder:"请输入会员激活价"},nativeOn:{keyup:function(t){return e.keyupEvent(t)}},model:{value:e.form.month_divide,callback:function(t){e.$set(e.form,"month_divide",t)},expression:"form.month_divide"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("元/月/人")])])],1),e._v(" "),r("el-form-item",{attrs:{label:"季度会员激活价",prop:"quarter_divide",rules:[{required:!0,message:"请输入会员激活价",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"238px"},attrs:{disabled:e.isDisabled,placeholder:"请输入会员激活价"},nativeOn:{keyup:function(t){return e.keyupEvent(t)}},model:{value:e.form.quarter_divide,callback:function(t){e.$set(e.form,"quarter_divide",t)},expression:"form.quarter_divide"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("元/季/人")])])],1),e._v(" "),r("el-form-item",{attrs:{label:"半年会员激活价",prop:"half_year_divide",rules:[{required:!0,message:"请输入会员激活价",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"238px"},attrs:{disabled:e.isDisabled,placeholder:"请输入会员激活价"},nativeOn:{keyup:function(t){return e.keyupEvent(t)}},model:{value:e.form.half_year_divide,callback:function(t){e.$set(e.form,"half_year_divide",t)},expression:"form.half_year_divide"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("元/半年/人")])])],1),e._v(" "),r("el-form-item",{attrs:{label:"年度会员激活价",prop:"year_divide",rules:[{required:!0,message:"请输入会员激活价",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"238px"},attrs:{disabled:e.isDisabled,placeholder:"请输入会员激活价"},nativeOn:{keyup:function(t){return e.keyupEvent(t)}},model:{value:e.form.year_divide,callback:function(t){e.$set(e.form,"year_divide",t)},expression:"form.year_divide"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("元/年/人")])])],1),e._v(" "),r("el-form-item",{attrs:{label:"可用教材",prop:"teachingMaterialId"}},[r("el-cascader",{directives:[{name:"show",rawName:"v-show",value:!e.isDisabled,expression:"!isDisabled"}],ref:"cascader",staticStyle:{width:"300px !important"},attrs:{disabled:e.isDisabled,options:e.teachList,props:{multiple:!0},"show-all-levels":!1,"collapse-tags":"",clearable:""},on:{change:e.onChange},model:{value:e.form.teachingMaterialId,callback:function(t){e.$set(e.form,"teachingMaterialId","string"===typeof t?t.trim():t)},expression:"form.teachingMaterialId"}}),e._v(" "),e._l(e.dynamicTags,(function(t){return r("el-tag",{directives:[{name:"show",rawName:"v-show",value:e.isDisabled,expression:"isDisabled"}],key:t.id,attrs:{"disable-transitions":!1},on:{close:function(r){return e.handleClose(t)}}},[e._v("\n "+e._s(t.name)+"\n ")])}))],2)],1)],1)},x=[],k=(r("6762"),r("2fdb"),r("75fc")),w=(r("7f7f"),r("ac6a"),r("c5f6"),r("28a5"),r("f716")),O=r("2ef0"),S=r.n(O),j=["teachingMaterialId"],C={props:["type","data"],data:function(){return{form:{day_divide:null,month_divide:null,quarter_divide:null,half_year_divide:null,year_divide:null,teachingMaterialId:[]},teachList:[],dynamicTags:[]}},mounted:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(){var t,r,a,n,s,l,c=this;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.__init();case 2:this.data&&(t=this.data,r=t.config,a=t.teachingMaterialId,n=r?JSON.parse(r):{},s=[],a&&(l=a.split(",").map((function(e){return Number(e)})),l.forEach((function(e){s.push(c.formatParentId(e,c.teachList))}))),this.form=Object(o["a"])(Object(o["a"])({},n.member_config),{},{teachingMaterialId:s}),this.$nextTick((function(){c.onChange()})));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),computed:{isDisabled:function(){return"setting"==this.type}},methods:{__init:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(){var t,r,a,n=this;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t=-1,e.next=4,Object(w["h"])({enable:1,tenantId:t});case 4:r=e.sent,a=r.data||[],a.forEach((function(e){var t=[];e.label=e.name,e.value=e.id;var r=e.sysMusicScoreCategoriesList?e.sysMusicScoreCategoriesList:[];r.length>0&&r.forEach((function(e){e.label=e.name,e.value=e.id,e.sysMusicScoreCategoriesList=[],t.push(e)})),e.children=t.length>0?t:null,n.teachList.push(e)})),e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](0),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));function t(){return e.apply(this,arguments)}return t}(),onChange:function(){var e=this,t=this.$refs.cascader.getCheckedNodes(!0);this.dynamicTags=[],t.forEach((function(t){e.dynamicTags.push({name:t.label,id:t.value})}))},formatParentId:function(e,t){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=Object(p["a"])(t);try{for(n.s();!(r=n.n()).done;){var i=r.value;if(i.sysMusicScoreCategoriesList){var o=this.formatParentId(e,i.sysMusicScoreCategoriesList,[].concat(Object(k["a"])(a),[i.id]));if(o.includes(e))return o}if(i.id===e)return[].concat(Object(k["a"])(a),[e])}}catch(s){n.e(s)}finally{n.f()}return a},handleClose:function(e){},onSubmit:function(){var e=!1;return this.$refs.form.validate((function(t){e=t})),e},getValues:function(){var e=this.form,t=e.teachingMaterialId,r=Object(s["a"])(e,j),a=[];return t.forEach((function(e){a.push(S.a.last(e))})),{member_config:Object(o["a"])({},r),teachingMaterialId:a}}}},$=C,I=(r("4a38"),Object(b["a"])($,_,x,!1,null,"29ca713f",null)),M=I.exports,q=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-bottom":"18px",overflow:"hidden"}},[r("el-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{title:"云教室规则",type:"info",closable:!1}}),e._v(" "),r("el-form",{ref:"form",attrs:{"label-position":"top",model:e.form,"label-width":"200px",inline:!0}},[r("el-form-item",{attrs:{label:"云教室人数上限(含老师)",prop:"cloud_room_up_limit",rules:[{required:!0,message:"请输入云教室人数上限",trigger:"blur"}]}},[r("el-input",{attrs:{placeholder:"请输入云教室人数上限",disabled:e.isDisabled,type:"number"},on:{input:function(t){e.form.cloud_room_up_limit=t.replace(/[^\d]/g,"")},blur:e.onUpLimitChange},model:{value:e.form.cloud_room_up_limit,callback:function(t){e.$set(e.form,"cloud_room_up_limit",t)},expression:"form.cloud_room_up_limit"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("人")])])],1)],1),e._v(" "),r("el-col",{attrs:{lg:12,md:18,sm:18,xs:24}},[r("el-table",{staticStyle:{width:"100% !important"},attrs:{data:e.form.roomConfig,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[r("el-table-column",{attrs:{prop:"num",label:"人数"}}),e._v(" "),r("el-table-column",{attrs:{prop:"price",label:"每分钟扣费标准"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{staticStyle:{width:"220px !important"},attrs:{disabled:e.isDisabled,placeholder:"请输入合同价"},nativeOn:{keyup:function(t){return e.keyupEvent(t)}},model:{value:t.row.price,callback:function(r){e.$set(t.row,"price",r)},expression:"scope.row.price"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("元/分钟")])])]}}])})],1)],1)],1)},D=[],T=r("7618"),L={props:["type","data"],data:function(){return{form:{cloud_room_up_limit:null,roomConfig:[]}}},mounted:function(){this.setValues()},computed:{isDisabled:function(){return"setting"==this.type}},methods:{onUpLimitChange:function(){var e=this.form;if(e.cloud_room_up_limit>0){var t=e.cloud_room_up_limit||0,r=e.roomConfig.length||0;if(t-r>0)for(var a=t-r,n=1;n<a;n++)e.roomConfig.push({num:r+1+n,price:void 0});else{var i=r-t+1;console.log(r,i,"diff"),e.roomConfig.splice(r-i,i),this.$forceUpdate()}}else e.roomConfig=[];e.roomConfig.forEach((function(e){console.log(Object(T["a"])(e.price))}))},onSubmit:function(){var e=!1;return this.$refs.form.validate((function(t){e=t})),e},setValues:function(){if(this.data){var e=this.data.config,t=e?JSON.parse(e):{},r=t.cloud_room_rule;console.log(r),this.form.cloud_room_up_limit=r.cloud_room_up_limit;var a=r.cloud_room_config;if(!a)return;var n=[];for(var i in a)n.push({num:i,price:a[i]});this.form.roomConfig=n}},getValues:function(){var e=this.form,t=e.roomConfig,r=e.cloud_room_up_limit,a={};return t.forEach((function(e){a[e.num]=e.price})),{cloud_room_rule:{cloud_room_up_limit:r,cloud_room_config:a}}}}},E=L,P=(r("0084"),Object(b["a"])(E,q,D,!1,null,"8187e6e0",null)),U=P.exports,V=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{title:"手续费设置",type:"info",closable:!1}}),e._v(" "),r("el-form",{ref:"form",attrs:{"label-position":"top",model:e.form,"label-width":"120px",inline:!0}},[r("el-form-item",{attrs:{label:"手续费费率",prop:"chargeRate",rules:[{required:!0,message:"请输入手续费费率",trigger:"blur"}]}},[r("template",{slot:"label"},[e._v("\n 手续费费率\n "),r("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v("\n 每笔交易支付通道收取的手续费比例\n ")]),e._v(" "),r("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#f56c6c",position:"relative",top:"2px"}})])],1),e._v(" "),r("el-input",{staticStyle:{width:"238px"},attrs:{disabled:e.isDisabled,placeholder:"请输入手续费费率",type:"text"},nativeOn:{keyup:function(t){return e.keyupEvent(t)}},model:{value:e.form.chargeRate,callback:function(t){e.$set(e.form,"chargeRate",t)},expression:"form.chargeRate"}},[r("div",{attrs:{slot:"append"},slot:"append"},[e._v("‰")])])],2)],1)],1)},N=[],R={props:["type","data"],data:function(){return{form:{id:null,chargeRate:null}}},computed:{isDisabled:function(){return"setting"==this.type}},mounted:function(){this.data&&(this.form.id=this.data.id,this.form.chargeRate=this.data.chargeRate)},methods:{onSubmit:function(){var e=!1;return this.$refs.form.validate((function(t){e=t})),e},getValues:function(){return this.form}}},A=R,F=(r("fae8"),Object(b["a"])(A,V,N,!1,null,"97dd5394",null)),J=F.exports,B=r("a21b"),z=["config","productInfo"],G=["theme","themeColor","corporateChops","corporateFinanceChops"],H=["theme","themeColor","corporateChops","corporateFinanceChops"],K={name:"serviceManger",components:{organInfo:c["a"],openService:y,memberSetting:M,roomRules:U,rateSetting:J},data:function(){var e=this.$route.query;return{payType:e.type,id:e.id,active:0,config:null,productInfo:null,info:null,status:!1,title:"新增机构",payState:null}},mounted:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(){var t,r,a,n,l,c,u,d,p,f;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("create"===this.payType){e.next=19;break}return e.prev=1,"look"==this.payType?(this.active=2,this.title="查看机构"):this.title="修改机构",e.next=5,Object(B["g"])({id:this.id});case 5:t=e.sent,r=t.data,a=r.config,n=r.productInfo,l=Object(s["a"])(r,z),c=a.theme,u=a.themeColor,d=a.corporateChops,p=a.corporateFinanceChops,f=Object(s["a"])(a,G),this.config=Object(o["a"])({},f),this.productInfo=n,this.info=Object(o["a"])(Object(o["a"])({},l),{},{theme:c,themeColor:u,corporateChops:d,corporateFinanceChops:p}),this.info.recommender&&0!=this.info.recommender||(this.info.recommender=null),this.productInfo.payState=this.info.payState,e.next=17;break;case 15:e.prev=15,e.t0=e["catch"](1);case 17:e.next=20;break;case 19:this.$route.query&&(this.info=Object(o["a"])({},this.$route.query),this.info.recommender&&0!=this.info.recommender||(this.info.recommender=null));case 20:this.status=!0;case 21:case"end":return e.stop()}}),e,this,[[1,15]])})));function t(){return e.apply(this,arguments)}return t}(),computed:{getType:function(){return 2==this.active?"setting":null}},methods:{onNext:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(){var t,r,a,n,c,u,d,p,f,m,h,v,b,g,y,_,x,k,w,O=this;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(0!=this.active){e.next=7;break}return e.next=3,this.$refs.organInfo.onSubmit();case 3:t=e.sent,t&&(this.goTo(),this.active+=1),e.next=62;break;case 7:if(1!=this.active){e.next=23;break}return e.next=10,this.$refs.openService.onSubmit();case 10:return r=e.sent,e.next=13,this.$refs.memberSetting.onSubmit();case 13:return a=e.sent,e.next=16,this.$refs.roomRules.onSubmit();case 16:return n=e.sent,e.next=19,this.$refs.rateSetting.onSubmit();case 19:c=e.sent,r&&a&&n&&c&&this.$confirm("请确认以上信息填写正确?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(l["a"])(Object(i["a"])().mark((function e(){return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:O.goTo(),O.active+=1;case 2:case"end":return e.stop()}}),e)})))),e.next=62;break;case 23:if(2!=this.active){e.next=62;break}return e.next=26,this.$refs.organInfo.getValues();case 26:return u=e.sent,e.next=29,this.$refs.openService.getValues();case 29:return d=e.sent,e.next=32,this.$refs.memberSetting.getValues();case 32:return p=e.sent,e.next=35,this.$refs.roomRules.getValues();case 35:return f=e.sent,e.next=38,this.$refs.rateSetting.getValues();case 38:if(m=e.sent,h=p.member_config,v=p.teachingMaterialId,b=u.theme,g=u.themeColor,y=u.corporateChops,_=u.corporateFinanceChops,x=Object(s["a"])(u,H),k=Object(o["a"])({member_config:h},f),w=Object(o["a"])(Object(o["a"])({},x),{},{productInfo:d,config:Object(o["a"])({theme:b,themeColor:g,corporateChops:y,corporateFinanceChops:_,config:JSON.stringify(k),teachingMaterialId:v.join(",")},m)}),e.prev=43,"create"!=this.payType){e.next=52;break}return e.next=47,Object(B["f"])(w);case 47:e.sent,this.$message.success("新增机构成功"),this.onCancel(),e.next=58;break;case 52:if("update"!=this.payType){e.next=58;break}return e.next=55,Object(B["j"])(w);case 55:e.sent,this.$message.success("修改机构成功"),this.onCancel();case 58:e.next=62;break;case 60:e.prev=60,e.t0=e["catch"](43);case 62:case"end":return e.stop()}}),e,this,[[43,60]])})));function t(){return e.apply(this,arguments)}return t}(),onPrev:function(){this.active-=1,this.goTo()},goTo:function(){var e=document.getElementsByClassName("tenant-header");e[0].scrollIntoView({block:"center",behavior:"smooth"})},onCancel:function(){this.$store.dispatch("delVisitedViews",this.$route),this.$route.query.email?this.$router.push({path:"/tenantApply?tabrouter=2"}):this.$router.push({path:"/organManager/organList"})}}},Q=K,W=Object(b["a"])(Q,a,n,!1,null,"a245c562",null);t["default"]=W.exports},"93f6":function(e,t,r){"use strict";r("7777")},ae4f:function(e,t,r){},caa6:function(e,t,r){},f716:function(e,t,r){"use strict";r.d(t,"c",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"a",(function(){return s})),r.d(t,"f",(function(){return l})),r.d(t,"d",(function(){return c})),r.d(t,"g",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"h",(function(){return p}));var a=r("829b"),n=r("b775"),i=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/queryPage",data:{},params:e,requestType:"form"})},o=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/transcod",data:{},params:{sysMusicScoreId:e.id},requestType:"json",method:"post"})},s=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/add",method:"post",data:e,params:{}})},l=function(e){return Object(n["a"])({url:"/api-web/sysMusicScore/update",method:"post",data:e,params:{}})},c=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/show",method:"post",data:e,requestType:"form"})},u=function(e){return Object(a["a"])({url:"/api-web/sysMusicScoreAccompaniment/queryPage",method:"get",params:e})},d=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/del",method:"post",data:{},params:{id:e},requestType:"form"})},p=function(e){return Object(a["a"])({url:"/api-web/sysMusicScoreCategories/queryTree",method:"get",data:{},params:e,requestType:"form"})}},f894:function(e,t,r){},fae8:function(e,t,r){"use strict";r("caa6")}}]);
|