chunk-5ec46df2.8f99e3f5.js 15 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5ec46df2"],{"09f4":function(e,t,n){"use strict";n.d(t,"a",function(){return u}),Math.easeInOutQuad=function(e,t,n,a){return e/=a/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function r(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function s(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function u(e,t,n){var u=s(),o=e-u,i=20,l=0;t="undefined"===typeof t?500:t;var d=function e(){l+=i;var s=Math.easeInOutQuad(l,u,o,t);r(s),l<t?a(e):n&&"function"===typeof n&&n()};d()}},"333d":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[n("el-pagination",e._b({attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},r=[],s=(n("c5f6"),n("09f4")),u={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:10},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total,sizes,prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&Object(s["a"])(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&Object(s["a"])(0,800)}}},o=u,i=(n("c0b9"),n("2877")),l=Object(i["a"])(o,a,r,!1,null,"31cb099a",null);t["a"]=l.exports},5137:function(e,t,n){"use strict";n.d(t,"o",function(){return o}),n.d(t,"g",function(){return i}),n.d(t,"d",function(){return l}),n.d(t,"f",function(){return d}),n.d(t,"e",function(){return c}),n.d(t,"h",function(){return m}),n.d(t,"c",function(){return p}),n.d(t,"u",function(){return f}),n.d(t,"p",function(){return g}),n.d(t,"t",function(){return h}),n.d(t,"n",function(){return b}),n.d(t,"s",function(){return v}),n.d(t,"k",function(){return y}),n.d(t,"m",function(){return F}),n.d(t,"a",function(){return S}),n.d(t,"i",function(){return _}),n.d(t,"b",function(){return O}),n.d(t,"r",function(){return I}),n.d(t,"j",function(){return k}),n.d(t,"v",function(){return w}),n.d(t,"l",function(){return N}),n.d(t,"q",function(){return j}),n.d(t,"w",function(){return x});var a=n("b775"),r=n("4328"),s=n.n(r),u="/api-web";function o(e){return Object(a["a"])({url:u+"/studentManage/queryStudentList",method:"get",params:e})}function i(e){return Object(a["a"])({url:u+"/studentManage/findStudentVipGroupClass",method:"get",params:e})}function l(e){return Object(a["a"])({url:u+"/studentManage/findStudentBaseInfo",method:"get",params:e})}function d(e){return Object(a["a"])({url:u+"/studentManage/findStudentMusicGroups",method:"get",params:e})}function c(e){return Object(a["a"])({url:u+"/studentManage/findStudentCourses",method:"get",params:e})}function m(e){return Object(a["a"])({url:u+"/studentManage/findStudentVipGroups",method:"get",params:e})}function p(e){return Object(a["a"])({url:u+"/studentManage/findStudentAttendances",method:"get",params:e})}function f(e){return Object(a["a"])({url:u+"/studentWithdraw/queryPage",method:"get",params:e})}function g(e){return Object(a["a"])({url:u+"/studentManage/queryStudentPayment",method:"get",params:e})}function h(e){return Object(a["a"])({url:u+"/order/queryPage",method:"get",params:e})}function b(e){return Object(a["a"])({url:u+"/studentManage/getUserCashAccountBaseInfo",method:"get",params:e})}function v(e){return Object(a["a"])({url:u+"/studentRegistration/batchUpdateSubject",method:"post",data:s.a.stringify(e)})}function y(e){return Object(a["a"])({url:u+"/studentRegistration/queryFeeDetail",method:"get",params:e})}function F(e){return Object(a["a"])({url:u+"/studentManage/queryMusicGroupStudentsSign",method:"get",params:e})}function S(e){return Object(a["a"])({url:u+"/studentRegistration/insertStudent",method:"POST",data:e})}function _(e){return Object(a["a"])({url:u+"/classGroupStudent/findAllStudent",method:"POST",data:s.a.stringify(e)})}function O(e){return Object(a["a"])({url:u+"/classGroupStudent/addStudents",method:"POST",data:s.a.stringify(e)})}function I(e){return Object(a["a"])({url:u+"/classGroupStudent/del",method:"POST",data:s.a.stringify(e)})}function k(e){return Object(a["a"])({url:u+"/studentManage/queryStudentClassGroup",method:"get",params:e})}function w(e){return Object(a["a"])({url:u+"/userCashAccount/updateCourseBalance",method:"post",data:s.a.stringify(e)})}function N(e){return Object(a["a"])({url:u+"/studentManage/queryUserByPhone",method:"get",params:e})}function j(e){return Object(a["a"])({url:u+"/studentManage/register",method:"post",data:s.a.stringify(e)})}function x(e){return Object(a["a"])({url:u+"/studentManage/studentUpdate",method:"post",data:s.a.stringify(e)})}},6807:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"m-container"},[e._m(0),e._v(" "),n("div",{staticClass:"m-core"},[n("div",{directives:[{name:"permission",rawName:"v-permission",value:"studentManage/register",expression:"'studentManage/register'"}],staticClass:"newBand",on:{click:e.addStudent}},[e._v("新增学员")]),e._v(" "),n("el-form",{staticClass:"searchForm",attrs:{inline:!0},model:{value:e.searchForm,callback:function(t){e.searchForm=t},expression:"searchForm"}},[n("el-form-item",[n("el-input",{attrs:{placeholder:"学生姓名或电话"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.onSearch(t)}},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search",t)},expression:"searchForm.search"}})],1),e._v(" "),n("el-form-item",{attrs:{prop:"organId"}},[n("el-select",{staticClass:"multiple",attrs:{clearable:"",placeholder:"请选择分部"},model:{value:e.searchForm.organId,callback:function(t){e.$set(e.searchForm,"organId",t)},expression:"searchForm.organId"}},e._l(e.organList,function(e,t){return n("el-option",{key:t,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),n("el-button",{attrs:{type:"danger"},on:{click:e.onSearch}},[e._v("搜索")]),e._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:e.onReSet}},[e._v("重置")])],1),e._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",prop:"userId",label:"学员编号"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"username",label:"学员姓名"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"性别"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.gender?"男":"女")+"\n ")]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"realName",label:"家长姓名"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"parentsPhone",label:"家长联系电话"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"courseBalance",label:"课程余额(元)"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("router-link",{directives:[{name:"permission",rawName:"v-permission",value:"/studentDetail",expression:"'/studentDetail'"}],staticStyle:{color:"#409EFF"},attrs:{to:{path:"/business/studentDetail?userId="+t.row.userId,query:{search:JSON.stringify(e.searchForm),rules:JSON.stringify(e.pageInfo)}}}},[e._v("查看")]),e._v(" "),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"studentManage/studentUpdate",expression:"'studentManage/studentUpdate'"}],attrs:{type:"text"},on:{click:function(n){return e.resetStudent(t.row)}}},[e._v("修改")])]}}])})],1),e._v(" "),n("pagination",{attrs:{total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"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(" "),n("el-dialog",{attrs:{title:e.maskName,width:"700px","label-width":"100px","label-position":"right",visible:e.studentVisible},on:{"update:visible":function(t){e.studentVisible=t}}},[n("el-divider",[e._v("基本信息")]),e._v(" "),n("el-form",{ref:"studentForm",attrs:{model:e.studentForm,inline:!0,"label-width":"80px","label-position":"right",rules:e.studentRules}},[n("el-form-item",{attrs:{label:"联系电话",rules:[{required:!0,message:"请输入手机号"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}]}},[n("el-input",{model:{value:e.studentForm.phone,callback:function(t){e.$set(e.studentForm,"phone",t)},expression:"studentForm.phone"}})],1),e._v(" "),e.isNew?n("el-form-item",{attrs:{label:"所属分部",prop:"organId"}},[n("el-select",{staticClass:"multiple",attrs:{clearable:"",placeholder:"请选择分部"},model:{value:e.studentForm.organId,callback:function(t){e.$set(e.studentForm,"organId",t)},expression:"studentForm.organId"}},e._l(e.organList,function(e,t){return n("el-option",{key:t,attrs:{label:e.name,value:e.id}})}),1)],1):e._e(),e._v(" "),n("el-form-item",{attrs:{label:"学生姓名",prop:"name"}},[n("el-input",{model:{value:e.studentForm.name,callback:function(t){e.$set(e.studentForm,"name",t)},expression:"studentForm.name"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"学生性别",prop:"sex"}},[n("el-select",{staticClass:"multiple",attrs:{clearable:"",placeholder:"请选择分部"},model:{value:e.studentForm.sex,callback:function(t){e.$set(e.studentForm,"sex",t)},expression:"studentForm.sex"}},[n("el-option",{attrs:{value:0,label:"女"}}),e._v(" "),n("el-option",{attrs:{value:1,label:"男"}})],1)],1),e._v(" "),n("el-form-item",{attrs:{label:"家长姓名"}},[n("el-input",{model:{value:e.studentForm.parseName,callback:function(t){e.$set(e.studentForm,"parseName",t)},expression:"studentForm.parseName"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"出生日期"}},[n("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期"},model:{value:e.studentForm.date,callback:function(t){e.$set(e.studentForm,"date",t)},expression:"studentForm.date"}})],1)],1),e._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){e.studentVisible=!1}}},[e._v("取 消")]),e._v(" "),e.isNew?n("el-button",{attrs:{type:"primary"},on:{click:e.submitAddStudent}},[e._v("确 定")]):e._e(),e._v(" "),e.isNew?e._e():n("el-button",{attrs:{type:"primary"},on:{click:e.resetStudentSubmie}},[e._v("确 定")])],1)],1)],1)},r=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("h2",[n("div",{staticClass:"squrt"}),e._v("学员列表\n ")])}],s=(n("7f7f"),n("3b2b"),n("386d"),n("333d")),u=n("5137"),o=n("1cc7"),i=(n("4360"),{name:"studentList",components:{pagination:s["a"]},data:function(){return{studentVisible:!1,searchForm:{organId:null,search:null,studentName:null},searchList:[],tableList:[],organList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},studentForm:{phone:"",organId:"",name:"",sex:"",parseName:"",date:"",nation:""},studentRules:{name:[{required:!0,message:"请输入学生姓名"}],sex:[{required:!0,message:"请选择学生姓名"}],date:[{required:!0,message:"请选择出生日期"}],organId:[{required:!0,message:"请选择分部"}],nation:[{required:!0,message:"请输入名族"}]},isNew:!1,active:null,maskName:"新增学员"}},mounted:function(){var e=this;this.$route.query.search&&(this.$route.query.search instanceof Object?this.searchForm=this.$route.query.search:this.searchForm=JSON.parse(this.$route.query.search)),this.$route.query.rules&&(this.$route.query.rules instanceof Object?this.pageInfo=this.$route.query.rules:this.pageInfo=JSON.parse(this.$route.query.rules)),Object(o["A"])().then(function(t){200==t.code&&(e.organList=t.data)}),this.getList()},methods:{onSearch:function(){this.pageInfo.page=1,this.getList()},getList:function(){var e=this,t=this.searchForm;t.rows=this.pageInfo.limit,t.page=this.pageInfo.page,t.organId?t.organId:t.organId=null,Object(u["o"])(t).then(function(t){200==t.code&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)})},onReSet:function(){this.searchForm={organId:null,search:null,studentName:null}},checkPhone:function(e){var t=this,n=/^1[3456789]\d{9}$/,a=new RegExp(n);a.test(e)&&Object(u["l"])({mobile:this.studentForm.phone}).then(function(n){200==n.code&&n.data&&(t.studentForm={name:n.data.name,sex:n.data.gender,parseName:n.data.parentsName,phone:e,date:n.data.birthdate})})},submitAddStudent:function(){var e=this;this.$refs["studentForm"].validate(function(t){if(t){var n={phone:e.studentForm.phone,username:e.studentForm.name,gender:e.studentForm.sex,realName:e.studentForm.parseName,birthdate:e.studentForm.date,organId:e.studentForm.organId,nation:e.studentForm.nation};Object(u["q"])(n).then(function(t){200==t.code&&(e.$message.success("添加成功"),e.studentVisible=!1,e.getList())})}})},resetStudentSubmie:function(){var e=this;this.$refs["studentForm"].validate(function(t){if(t){var n={phone:e.studentForm.phone,username:e.studentForm.name,gender:e.studentForm.sex,realName:e.studentForm.parseName,birthdate:e.studentForm.date,organId:e.studentForm.organId,id:e.active.userId,nation:e.studentForm.nation};Object(u["w"])(n).then(function(t){200==t.code&&(e.$message.success("修改成功"),e.studentVisible=!1,e.getList())})}})},addStudent:function(){this.isNew=!0,this.studentVisible=!0,this.maskName="新增学员"},resetStudent:function(e){this.isNew=!1,this.active=e,this.studentVisible=!0,this.maskName="修改学员",this.studentForm={phone:e.parentsPhone,name:e.username,sex:e.gender,parseName:e.realName,date:e.birthdate,nation:e.nation}}},watch:{studentVisible:function(e){e||(this.studentForm={phone:"",organId:"",name:"",sex:"",parseName:"",date:"",nation:""})}}}),l=i,d=n("2877"),c=Object(d["a"])(l,a,r,!1,null,null,null);t["default"]=c.exports},c0b9:function(e,t,n){"use strict";var a=n("de4e"),r=n.n(a);r.a},de4e:function(e,t,n){}}]);