1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a2c5b790"],{"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 o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function s(e,t,a){var s=o(),i=e-s,l=20,u=0;t="undefined"===typeof t?500:t;var c=function e(){u+=l;var o=Math.easeInOutQuad(u,s,i,t);n(o),u<t?r(e):a&&"function"===typeof a&&a()};c()}},2327:function(e,t,a){"use strict";a("3574")},3574:function(e,t,a){},da03: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("save-form",{attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[a("el-form-item",[a("el-input",{attrs:{placeholder:"标题或学生姓名",clearable:""},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-select",{attrs:{placeholder:"请选择分部",clearable:"",filterable:""},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:{value:e.id,label:e.name}})})),1)],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{placeholder:"请选择收费类型",clearable:""},model:{value:e.searchForm.chargeType,callback:function(t){e.$set(e.searchForm,"chargeType","string"===typeof t?t.trim():t)},expression:"searchForm.chargeType"}},e._l(e.orderType,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{placeholder:"收费状态",clearable:""},model:{value:e.searchForm.openFlag,callback:function(t){e.$set(e.searchForm,"openFlag","string"===typeof t?t.trim():t)},expression:"searchForm.openFlag"}},[a("el-option",{attrs:{label:"关闭",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"开启",value:"0"}})],1)],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{placeholder:"请选择订单类型",clearable:""},model:{value:e.searchForm.type,callback:function(t){e.$set(e.searchForm,"type","string"===typeof t?t.trim():t)},expression:"searchForm.type"}},[a("el-option",{attrs:{label:"个人",value:"personal"}}),e._v(" "),a("el-option",{attrs:{label:"公用",value:"common"}})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger","native-type":"submit"}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"primary"}},[e._v("重置")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"export/sporadicChargeInfo",expression:"'export/sporadicChargeInfo'"}],on:{click:e.exportSporad}},[e._v("导出")])],1)],1),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sporadicChargeInfo/add",expression:"'sporadicChargeInfo/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.newVisible}},[e._v("\n 新增公用收费\n ")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sporadicChargeInfo/add",expression:"'sporadicChargeInfo/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.newVisible1}},[e._v("\n 新增个人收费\n ")]),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",label:"分部",prop:"organName"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("copy-text",[e._v(e._s(t.row.organName))])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"收费类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("chargeTypeFilter")(t.row.chargeType))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"标题",prop:"title"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("copy-text",[e._v(e._s(t.row.title))])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"学生姓名",prop:"userName"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("copy-text",[e._v(e._s(t.row.userName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"收费状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(t.row.openFlag?"关闭":"开启")+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"金额",prop:"amount"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.amount))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("formatTimer")(t.row.createTime))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"订单类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.userId?"个人":"公用")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"创建人",prop:"operatorName"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[12==t.row.chargeType?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sporadicChargeInfo/update",expression:"'sporadicChargeInfo/update'"}],key:"update",attrs:{type:"text"},on:{click:function(a){return e.lookVisible(t.row)}}},[e._v("修改")]):a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sporadicChargeInfo/look",expression:"'sporadicChargeInfo/look'"}],key:"update",attrs:{type:"text"},on:{click:function(a){return e.lookVisible(t.row)}}},[e._v("查看")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sporadicChargeInfo/delete",expression:"'sporadicChargeInfo/delete'"}],attrs:{type:"text"},on:{click:function(a){return e.removeItem(t.row)}}},[e._v("删除")]),e._v(" "),t.row.openFlag?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sporadicChargeInfo/updateOpenFlag",expression:"'sporadicChargeInfo/updateOpenFlag'"}],attrs:{type:"text"},on:{click:function(a){return e.setSporadic(t.row)}}},[e._v("开启")]):a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sporadicChargeInfo/updateOpenFlag",expression:"'sporadicChargeInfo/updateOpenFlag'"}],attrs:{type:"text"},on:{click:function(a){return e.setSporadic(t.row)}}},[e._v("关闭")])],1)]}}])})],1),e._v(" "),a("pagination",{attrs:{sync:"",total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:total":function(t){return e.$set(e.pageInfo,"total",t)},"update:page":function(t){return e.$set(e.pageInfo,"page",t)},"update:limit":function(t){return e.$set(e.pageInfo,"limit",t)},pagination:e.getList}})],1)],1),e._v(" "),a("el-dialog",{attrs:{title:e.title,visible:e.zeroVisible,width:"650px"},on:{"update:visible":function(t){e.zeroVisible=t},close:function(t){return e.onFormClose("maskForm")}}},[a("el-form",{ref:"maskForm",attrs:{model:e.maskForm,rules:e.maskRules,"label-width":"110px","label-position":"right",inline:!0}},[a("el-form-item",{attrs:{label:"标题",prop:"title"}},[a("el-input",{attrs:{maxlength:"50",disabled:!e.isNew},model:{value:e.maskForm.title,callback:function(t){e.$set(e.maskForm,"title","string"===typeof t?t.trim():t)},expression:"maskForm.title"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"收费类型",prop:"type"}},[a("el-select",{staticStyle:{width:"180px !important"},attrs:{disabled:!e.isNew,clearable:"",filterable:""},model:{value:e.maskForm.type,callback:function(t){e.$set(e.maskForm,"type","string"===typeof t?t.trim():t)},expression:"maskForm.type"}},e._l(e.isNew?e.orderType1:e.orderType,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"金额",prop:"money"}},[a("el-input",{attrs:{type:"number",disabled:!e.isNew},nativeOn:{mousewheel:function(e){e.preventDefault()}},model:{value:e.maskForm.money,callback:function(t){e.$set(e.maskForm,"money","string"===typeof t?t.trim():t)},expression:"maskForm.money"}})],1),e._v(" "),12==e.maskForm.type?a("el-form-item",{attrs:{label:"是否开启限制",prop:"openMaxTerm",rules:[{required:!0,message:"请选择是否开启目标金额",trigger:"change"}]}},[a("el-select",{attrs:{clearable:""},model:{value:e.maskForm.openMaxTerm,callback:function(t){e.$set(e.maskForm,"openMaxTerm","string"===typeof t?t.trim():t)},expression:"maskForm.openMaxTerm"}},[a("el-option",{attrs:{value:1,label:"是"}}),e._v(" "),a("el-option",{attrs:{value:0,label:"否"}})],1)],1):e._e(),e._v(" "),12==e.maskForm.type?a("el-form-item",{attrs:{label:"目标金额",prop:"maxAmount",rules:[{required:!0,validator:e.validMaxNum,trigger:"blur"}]}},[a("el-input",{attrs:{type:"number"},nativeOn:{mousewheel:function(e){e.preventDefault()}},model:{value:e.maskForm.maxAmount,callback:function(t){e.$set(e.maskForm,"maxAmount","string"===typeof t?t.trim():t)},expression:"maskForm.maxAmount"}})],1):e._e(),e._v(" "),6==e.maskForm.type?a("el-form-item",{attrs:{label:"减免金额",prop:"money"}},[a("el-input",{attrs:{type:"number",disabled:!e.isNew},nativeOn:{mousewheel:function(e){e.preventDefault()}},model:{value:e.maskForm.subMoney,callback:function(t){e.$set(e.maskForm,"subMoney","string"===typeof t?t.trim():t)},expression:"maskForm.subMoney"}})],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"分部",prop:"organId"}},[a("el-select",{staticStyle:{width:"180px !important"},attrs:{disabled:!e.isNew,clearable:"",filterable:""},on:{change:e.onMusicGroupChange},model:{value:e.maskForm.organId,callback:function(t){e.$set(e.maskForm,"organId","string"===typeof t?t.trim():t)},expression:"maskForm.organId"}},e._l(e.selects.branchs,(function(e,t){return a("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1),e._v(" "),12!=e.maskForm.type?a("el-form-item",{attrs:{label:"所属乐团",prop:"musicGroupId"}},[a("el-select",{staticStyle:{width:"180px !important"},attrs:{disabled:!e.isNew||!e.maskForm.organId,clearable:"",filterable:""},model:{value:e.maskForm.musicGroupId,callback:function(t){e.$set(e.maskForm,"musicGroupId","string"===typeof t?t.trim():t)},expression:"maskForm.musicGroupId"}},e._l(e.maskMusicList,(function(e){return a("el-option",{key:e.musicGroupId,attrs:{value:e.musicGroupId,label:e.musicGroupName}})})),1)],1):e._e(),e._v(" "),e.isNew?e._e():a("el-form-item",{attrs:{label:"查看链接"}},[a("el-input",{staticStyle:{width:"400px !important"},attrs:{disabled:!e.isNew},model:{value:e.maskForm.code,callback:function(t){e.$set(e.maskForm,"code","string"===typeof t?t.trim():t)},expression:"maskForm.code"}}),e._v(" "),a("el-button",{attrs:{type:"danger"},on:{click:function(t){e.qrcodeStatus=!0}}},[e._v("二维码")])],1),e._v(" "),a("el-form-item",{attrs:{label:"收费详情",prop:"desc"}},[a("el-input",{staticStyle:{width:"490px"},attrs:{type:"textarea",disabled:!e.isNew,maxlength:"300",autosize:{minRows:5}},model:{value:e.maskForm.desc,callback:function(t){e.$set(e.maskForm,"desc","string"===typeof t?t.trim():t)},expression:"maskForm.desc"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.zeroVisible=!1}}},[e._v("取 消")]),e._v(" "),e.isNew?a("el-button",{attrs:{type:"primary"},on:{click:e.addZero}},[e._v("确 定")]):e._e(),e._v(" "),e.isNew?e._e():a("el-button",{attrs:{type:"primary"},on:{click:e.updateZero}},[e._v("确定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:e.title1,visible:e.zeroVisible1,width:"650px"},on:{"update:visible":function(t){e.zeroVisible1=t},close:function(t){return e.onFormClose("maskForm1")}}},[a("el-form",{ref:"maskForm1",attrs:{model:e.maskForm1,rules:e.maskRules1,"label-width":"100px","label-position":"right",inline:!0}},[a("el-form-item",{attrs:{label:"标题",prop:"title"}},[a("el-input",{attrs:{maxlength:"50",disabled:!e.isNew1},model:{value:e.maskForm1.title,callback:function(t){e.$set(e.maskForm1,"title","string"===typeof t?t.trim():t)},expression:"maskForm1.title"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"收费类型",prop:"type"}},[a("el-select",{staticStyle:{width:"180px !important"},attrs:{disabled:!e.isNew1,clearable:"",filterable:""},model:{value:e.maskForm1.type,callback:function(t){e.$set(e.maskForm1,"type","string"===typeof t?t.trim():t)},expression:"maskForm1.type"}},[e._l(e.isNew1?e.orderType1:e.orderType,(function(t){return[12!=t.value?a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}}):e._e()]}))],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"学员编号",prop:"studentId"}},[a("el-input",{attrs:{type:"number",maxlength:"10",disabled:!e.isNew1},on:{blur:e.onStudentChange},nativeOn:{mousewheel:function(e){e.preventDefault()}},model:{value:e.maskForm1.studentId,callback:function(t){e.$set(e.maskForm1,"studentId","string"===typeof t?t.trim():t)},expression:"maskForm1.studentId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"金额",prop:"money"}},[a("el-input",{attrs:{type:"number",disabled:!e.isNew1},nativeOn:{mousewheel:function(e){e.preventDefault()}},model:{value:e.maskForm1.money,callback:function(t){e.$set(e.maskForm1,"money","string"===typeof t?t.trim():t)},expression:"maskForm1.money"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"学员姓名",prop:"studentName"}},[a("el-input",{attrs:{disabled:!0},model:{value:e.maskForm1.studentName,callback:function(t){e.$set(e.maskForm1,"studentName","string"===typeof t?t.trim():t)},expression:"maskForm1.studentName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"所属乐团",prop:"musicGroupId"}},[a("el-select",{staticStyle:{width:"180px !important"},attrs:{disabled:!e.isNew1,clearable:"",filterable:""},model:{value:e.maskForm1.musicGroupId,callback:function(t){e.$set(e.maskForm1,"musicGroupId","string"===typeof t?t.trim():t)},expression:"maskForm1.musicGroupId"}},e._l(e.maskMusicList1,(function(e,t){return a("el-option",{key:t,attrs:{value:e.musicGroupId,label:e.musicGroupName}})})),1)],1),e._v(" "),e.isNew1?e._e():a("el-form-item",{attrs:{label:"查看链接"}},[a("el-input",{staticStyle:{width:"400px !important"},attrs:{disabled:!e.isNew1},model:{value:e.maskForm1.code,callback:function(t){e.$set(e.maskForm1,"code","string"===typeof t?t.trim():t)},expression:"maskForm1.code"}}),e._v(" "),a("el-button",{attrs:{type:"danger"},on:{click:function(t){e.qrcodeStatus=!0}}},[e._v("二维码")])],1),e._v(" "),a("el-form-item",{attrs:{label:"收费详情",prop:"desc"}},[a("el-input",{staticStyle:{width:"490px"},attrs:{type:"textarea",disabled:!e.isNew1,maxlength:"300",autosize:{minRows:5}},model:{value:e.maskForm1.desc,callback:function(t){e.$set(e.maskForm1,"desc","string"===typeof t?t.trim():t)},expression:"maskForm1.desc"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.zeroVisible1=!1}}},[e._v("取 消")]),e._v(" "),e.isNew1?a("el-button",{attrs:{type:"primary"},on:{click:e.addZero1}},[e._v("确 定")]):e._e(),e._v(" "),e.isNew1?e._e():a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.zeroVisible1=!1}}},[e._v("确定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{visible:e.qrcodeStatus,center:"",width:"300px",title:"缴费链接"},on:{"update:visible":function(t){e.qrcodeStatus=t}}},[a("div",{staticClass:"right-code"},[a("vue-qr",{staticStyle:{width:"100%"},attrs:{text:e.qrCodeUrl,margin:0}})],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 ")])}],o=(a("7f7f"),a("96cf"),a("1da1")),s=(a("386d"),a("1cc7")),i=a("333d"),l=a("61f7"),u=a("e3eb"),c=a.n(u),m=a("b775"),d=a("4328"),p=a.n(d),f="/api-web";function g(e){return Object(m["a"])({url:f+"/sporadicChargeInfo/add",method:"POST",data:p.a.stringify(e)})}function b(e){return Object(m["a"])({url:f+"/sporadicChargeInfo/update",method:"POST",data:p.a.stringify(e)})}function v(e){return Object(m["a"])({url:f+"/sporadicChargeInfo/queryPage",method:"GET",params:e})}function h(e){return Object(m["a"])({url:f+"/sporadicChargeInfo/delete",method:"POST",data:p.a.stringify(e)})}function y(e){return Object(m["a"])({url:"/api-auth/user/getBasic",method:"get",params:e})}function k(e){return Object(m["a"])({url:f+"/sporadicChargeInfo/updateOpenFlag",method:"POST",data:p.a.stringify(e)})}function F(e){return Object(m["a"])({url:f+"/musicGroup/queryOrganMusicInfos",method:"get",params:e})}function _(e){return Object(m["a"])({url:f+"/studentManage/queryUserMusicInfos",method:"get",params:e})}var w=a("bc3a"),x=a.n(w),I=a("5f87"),N=a("3908"),T=a("658f"),$=a.n(T),C=function(e,t,a){""==t&&"string"==typeof t||null==t?a(new Error("请输入缴费金额")):t<0?a(new Error("输入缴费金额必须大于0")):a()},S={name:"sporadicList",components:{pagination:i["a"],vueQr:$.a},data:function(){return{validMaxNum:C,zeroVisible:!1,qrCodeUrl:null,searchForm:{organId:null,chargeType:null,type:null,search:null,openFlag:null},tableList:[],organList:[],orderType:[{label:"考级",value:1},{label:"声部更改",value:2},{label:"乐器更换",value:3},{label:"配件销售",value:4},{label:"维修费",value:5},{label:"福袋活动",value:6},{label:"双十一活动",value:12},{label:"上门费",value:7},{label:"账户充值",value:9},{label:"其它",value:11}],orderType1:[{label:"考级",value:1},{label:"上门费",value:7},{label:"账户充值",value:9},{label:"其它",value:11}],maskForm:{organId:"",type:"",money:"",desc:"",title:"",code:"",musicGroupId:"",maxAmount:null,openMaxTerm:null,subMoney:""},maskMusicList:[],maskRules:{organId:[{required:!0,message:"请选择分部",trigger:"change"}],type:[{required:!0,message:"请选择收费类型",trigger:"change"}],money:[{required:!0,message:"请输入收费金额",trigger:"change"}],title:[{required:!0,message:"请输入标题名称",trigger:"change"}],desc:[{required:!0,message:"请输入收费详情"}]},pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},isNew:!1,title:"新增收费",qrcodeStatus:!1,qrcodes:!0,activeRow:null,title1:"新增收费",activeRow1:null,zeroVisible1:!1,maskForm1:{type:null,money:null,desc:null,title:null,code:null,musicGroupId:null,studentId:null,studentName:null},isNew1:!1,maskMusicList1:[],maskRules1:{organId:[{required:!0,message:"请选择分部",trigger:"change"}],type:[{required:!0,message:"请选择收费类型",trigger:"change"}],money:[{required:!0,message:"请输入收费金额",trigger:"change"}],title:[{required:!0,message:"请输入标题名称",trigger:"change"}],studentId:[{required:!0,message:"请输入学员编号",trigger:"blur"}],desc:[{required:!0,message:"请输入收费详情"}]}}},mounted:function(){this.$store.dispatch("setBranchs"),this.getList(),this.getAgreement()},methods:{search:function(){this.pageInfo.page=1,this.getList()},onReSet:function(){this.searchForm={organId:null,chargeType:null,type:null,search:null},this.search()},getList:function(){var e=this,t=this.searchForm,a={organId:t.organId?t.organId:null,chargeType:t.chargeType?t.chargeType:null,type:t.type?t.type:null,search:t.search?t.search:null,openFlag:t.openFlag?1*t.openFlag:null,page:this.pageInfo.page,rows:this.pageInfo.limit};v(a).then((function(t){200==t.code&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)}))},onFormClose:function(e){"maskForm"==e?this.maskForm={organId:null,musicGroupId:null,type:null,money:null,maxAmount:null,openMaxTerm:null,desc:null,title:null,code:null}:"maskForm1"==e&&(this.maskForm1={type:null,musicGroupId:null,money:null,desc:null,title:null,code:null,studentId:null,studentName:null}),this.$refs[e]&&this.$refs[e].resetFields()},newVisible:function(){this.isNew=!0,this.zeroVisible=!0,this.title="新增公用收费"},newVisible1:function(){this.isNew1=!0,this.zeroVisible1=!0,this.title1="新增个人收费"},getAgreement: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(s["R"])();case 3:t=e.sent,t.data||this.$bus.$emit("showguide",["agreement"]),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}(),lookVisible:function(e){var t=this,a=null;if(e.userId){a=this.maskForm1,this.isNew1=!1,this.zeroVisible1=!0,this.title1="查看个人收费";var r=Object(l["d"])()+"/#/sporadicPay?id=".concat(e.id,"&userId=").concat(e.userId);this.qrCodeUrl=r,a.code=r,a.studentId=e.userId,a.studentName=e.userName}else{a=this.maskForm,this.isNew=!1,this.zeroVisible=!0,this.title="查看公用收费";var n=Object(l["d"])()+"/#/sporadicLogin?id=".concat(e.id);this.qrCodeUrl=n,a.code=n}a.type=parseInt(e.chargeType),a.id=e.id,a.desc=e.detail,a.title=e.title,a.organId=e.organId,a.money=e.amount,a.subMoney=e.discountAmount,a.maxAmount=e.maxAmount,a.openMaxTerm=e.openMaxTerm,a.musicGroupId=e.musicGroupId?e.musicGroupId:null,e.userId?_({userId:e.userId}).then((function(e){200==e.code&&(t.maskMusicList1=e.data)})):this.onMusicGroupChange(!0)},onMusicGroupChange:function(e){var t=this,a=this.maskForm;a.organId&&(e||(a.musicGroupId=null),F({organId:a.organId}).then((function(e){200==e.code&&(t.maskMusicList=e.data)})))},updateZero:function(){var e=this,t=this.maskForm;12==t.type?this.$refs["maskForm"].validate((function(a){a&&b(c()({id:t.id,maxAmount:t.maxAmount,openMaxTerm:t.openMaxTerm})).then((function(t){200==t.code&&(e.$message.success("更新成功"),e.zeroVisible=!1,e.getList())}))})):this.zeroVisible=!1},addZero:function(){var e=this;this.$refs["maskForm"].validate((function(t){if(t){var a=e.maskForm,r={chargeType:a.type,detail:a.desc,title:a.title,organId:a.organId,amount:a.money,musicGroupId:a.musicGroupId,discountAmount:a.subMoney};12==a.type&&(r.maxAmount=a.maxAmount,r.openMaxTerm=a.openMaxTerm),g(r).then((function(t){200==t.code&&(e.$message.success("新增成功"),e.zeroVisible=!1,e.getList())}))}}))},addZero1:function(){var e=this;this.$refs["maskForm1"].validate((function(t){if(t){var a=e.maskForm1;if(!a.studentName)return void e.$message.error("学员信息不存在");var r={chargeType:a.type,detail:a.desc,title:a.title,musicGroupId:e.maskForm1.musicGroupId,userId:a.studentId,amount:a.money};g(r).then((function(t){200==t.code&&(e.$message.success("新增成功"),e.zeroVisible1=!1,e.getList())}))}}))},onStudentChange:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this.maskForm1.studentId,t){e.next=3;break}return e.abrupt("return");case 3:if(!(t.length>10)){e.next=6;break}return this.$message.error("学员编号不合法"),e.abrupt("return");case 6:return e.next=8,y({userId:t}).then((function(e){200==e.code&&(e.data?(a.maskForm1.studentName=e.data.name,_({userId:t}).then((function(e){200==e.code&&(a.maskMusicList1=e.data)}))):a.maskForm1.studentName=null)}));case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),removeItem:function(e){var t=this;this.$confirm("是否删除该收费","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){h({id:e.id}).then((function(e){200==e.code&&(t.$message.success("删除成功"),t.zeroVisible=!1,t.getList())}))})).catch((function(){}))},setSporadic:function(e){var t=this,a="",r="";e.openFlag?(r=0,a="开启"):(r=1,a="关闭"),this.$confirm("是否".concat(a,"该收费"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){k({sporadicId:e.id,openFlag:r}).then((function(e){200==e.code&&(t.$message.success("".concat(a,"成功")),t.getList())}))})).catch((function(){}))},exportSporad:function(){var e=this,t="/api-web/export/sporadicChargeInfo",a=this.searchForm,r={method:"get",headers:{Authorization:Object(I["b"])(),tenantId:Object(I["a"])()},params:a,url:t,responseType:"blob"};this.$confirm("您确定导出零星缴费列表","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){N["a"].startLoading(),x()(r).then((function(t){var a=new Blob([t.data],{type:"application/vnd.ms-excel;charset=utf-8"}),r=new Response(a).text();r.then((function(t){if(-1!=t.indexOf("code")){var r=JSON.parse(t);if(403==r.code)return e.$message.error("登录过期,请重新登录!"),void setTimeout((function(){e.$store.dispatch("user/resetToken").then((function(){location.reload()}))}),1e3);e.$message.error(r.msg)}else{var n=URL.createObjectURL(a),o=document.createElement("a"),s=new Date,i=s.getFullYear()+""+(s.getMonth()+1)+s.getDate(),l=i+"零星缴费.xls";o.href=n,o.setAttribute("download",l),document.body.appendChild(o),o.click()}})),N["a"].endLoading()})).catch((function(t){e.$message.error("导出数据失败,请联系管理员"),N["a"].endLoading()}))})).catch((function(){}))}},watch:{zeroVisible:function(e){e||(this.maskForm={organId:"",type:"",money:"",desc:"",title:"",maxAmount:null,openMaxTerm:null,code:""})}},filters:{chargeTypeFilter:function(e){var t={1:"考级",2:"声部更改",3:"乐器更换",4:"配件销售",5:"维修费",6:"福袋活动",7:"上门费",9:"账户充值",10:"乐保服务",11:"其它",12:"双十一活动",13:"网基课活动",15:"云教练购买"};return t[e]}}},M=S,O=(a("2327"),a("2877")),q=Object(O["a"])(M,r,n,!1,null,"1b4221c0",null);t["default"]=q.exports}}]);
|