1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d1b51b1c"],{"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),Math.easeInOutQuad=function(t,e,a,r){return t/=r/2,t<1?a/2*t*t+e:(t--,-a/2*(t*(t-2)-1)+e)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function n(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function s(t,e,a){var s=o(),i=t-s,u=20,c=0;e="undefined"===typeof e?500:e;var l=function t(){c+=u;var o=Math.easeInOutQuad(c,s,i,e);n(o),c<e?r(t):a&&"function"===typeof a&&a()};l()}},"140f":function(t,e,a){"use strict";a("4b15b")},2543:function(t,e,a){"use strict";a.d(e,"k",(function(){return i})),a.d(e,"l",(function(){return u})),a.d(e,"o",(function(){return c})),a.d(e,"i",(function(){return l})),a.d(e,"m",(function(){return d})),a.d(e,"j",(function(){return m})),a.d(e,"a",(function(){return f})),a.d(e,"b",(function(){return p})),a.d(e,"c",(function(){return g})),a.d(e,"h",(function(){return b})),a.d(e,"n",(function(){return h})),a.d(e,"f",(function(){return v})),a.d(e,"d",(function(){return y})),a.d(e,"e",(function(){return _})),a.d(e,"g",(function(){return w}));var r=a("b775"),n=a("4328"),o=a.n(n),s="/api-web";function i(t){return Object(r["a"])({url:s+"/goods/queryPage",method:"get",params:t})}function u(t){return Object(r["a"])({url:s+"/goods/get/".concat(t),method:"get"})}function c(t){return Object(r["a"])({url:s+"/goods/updateGoodsStatus",method:"post",data:o.a.stringify(t)})}function l(t){return Object(r["a"])({url:s+"/goods/add",method:"post",data:o.a.stringify(t)})}function d(t){return Object(r["a"])({url:s+"/goods/update",method:"post",data:o.a.stringify(t)})}function m(t){return Object(r["a"])({url:s+"/goods/del/".concat(t),method:"post"})}function f(t){return Object(r["a"])({url:s+"/category/queryPage",method:"get",params:t})}function p(t){return Object(r["a"])({url:s+"/category/upset",method:"post",data:t})}function g(t){return Object(r["a"])({url:s+"/category/del",method:"post",data:o.a.stringify(t)})}function b(t){return Object(r["a"])({url:s+"/subjectChange/queryPage",method:"get",params:t})}function h(t){return Object(r["a"])({url:s+"/subjectChange/updateCostMargin",method:"post",data:o.a.stringify(t)})}function v(t){return Object(r["a"])({url:s+"/goodsProcurement/queryGoodsProcurements",method:"get",params:t})}function y(t){return Object(r["a"])({url:s+"/goods/addGoodsProcurement",method:"post",params:t})}function _(t){return Object(r["a"])({url:s+"/swTempJc/queryPageForCourseSchedule",method:"get",params:t})}function w(t){return Object(r["a"])({url:s+"/swTempJc/queryPageForExtensionOrder",method:"get",params:t})}},"28e2":function(t,e,a){"use strict";a("2a64")},"2a64":function(t,e,a){},"4b15b":function(t,e,a){},"4baf":function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"form",attrs:{model:t.musicForm,"label-width":"110px"}},[this.chioseStudent?a("el-form-item",{attrs:{label:"选择学员",prop:"studentId",rules:[{required:!0,message:"请选择学员",trigger:"blur"}]}},[a("el-select",{staticStyle:{width:"400px !important"},attrs:{clearable:"",placeholder:"请选择",remote:"",filterable:"","remote-method":t.remoteMethod,loading:t.remoteLoading},model:{value:t.musicForm.studentId,callback:function(e){t.$set(t.musicForm,"studentId","string"===typeof e?e.trim():e)},expression:"musicForm.studentId"}},t._l(t.studentList,(function(e){return a("el-option",{key:e.userId,attrs:{label:e.username,value:e.userId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.username))]),t._v(" "),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.userId))])])})),1)],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"乐器分类",prop:"goodsCategoryId",rules:[{required:!0,message:"请选择乐器分类",trigger:"blur"}]}},[a("el-form-item",[a("el-select",{staticStyle:{width:"400px !important"},attrs:{filterable:"",clearable:"",placeholder:"乐器分类"},on:{change:t.changeCategory},model:{value:t.musicForm.goodsCategoryId,callback:function(e){t.$set(t.musicForm,"goodsCategoryId","string"===typeof e?e.trim():e)},expression:"musicForm.goodsCategoryId"}},t._l(t.typeList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.label,value:t.value}})})),1)],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"乐器名称",prop:"goodsId",rules:[{required:!0,message:"请选择乐器名称",trigger:"blur"}]}},[a("el-select",{staticStyle:{width:"400px !important"},attrs:{disabled:!t.musicForm.goodsCategoryId,filterable:"",clearable:"",placeholder:"乐器名称"},model:{value:t.musicForm.goodsId,callback:function(e){t.$set(t.musicForm,"goodsId","string"===typeof e?e.trim():e)},expression:"musicForm.goodsId"}},t._l(t.musicList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"是否乐保",prop:"status",rules:[{required:!0,message:"请选择是否乐保",trigger:"blur"}]}},[a("el-select",{staticStyle:{width:"400px !important"},attrs:{clearable:"",placeholder:"是否乐保"},model:{value:t.musicForm.status,callback:function(e){t.$set(t.musicForm,"status","string"===typeof e?e.trim():e)},expression:"musicForm.status"}},[a("el-option",{attrs:{value:"0",label:"否"}}),t._v(" "),a("el-option",{attrs:{value:"1",label:"是"}})],1)],1),t._v(" "),1==t.musicForm.status?a("el-form-item",{attrs:{label:"乐保结束日期",rules:[{required:!0,message:"请选择乐保结束日期",trigger:"blur"}],prop:"date"}},[a("el-date-picker",{staticStyle:{width:"400px"},attrs:{clearable:"",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss","default-time":"23:59:59","picker-options":t.pickerOptions,placeholder:"乐保结束日期"},model:{value:t.musicForm.date,callback:function(e){t.$set(t.musicForm,"date",e)},expression:"musicForm.date"}})],1):t._e()],1)],1)},n=[],o=(a("ac6a"),a("db72")),s=a("a8db"),i=a("c80c"),u=(a("96cf"),a("3b8d")),c=a("2543"),l=a("1cc7"),d=a("5f87"),m=(a("ed08"),a("bc3a")),f=a.n(m),p=a("5a0c"),g=a.n(p),b=["date","status"],h={props:["categoryList","operationData","operationStatus","chioseStudent"],data:function(){return{musicForm:{studentId:this.$route.query.userId,goodsId:"",goodsCategoryId:"",status:"",date:null},pickerOptions:{firstDayOfWeek:1,disabledDate:function(t){var e=g()(g()().format("YYYY-MM-DD")).valueOf();return e>t.getTime()}},typeList:this.categoryList,musicList:[],remoteLoading:!1,studentList:[]}},mounted:function(){var t=Object(u["a"])(Object(i["a"])().mark((function t(){var e,a;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(this.operationData),e=this.operationData,!e){t.next=15;break}if(a=this.musicForm,a.goodsCategoryId=e.goodsCategoryId,!e.goodsCategoryId){t.next=8;break}return t.next=8,this.changeCategory(e.goodsCategoryId);case 8:a.studentId=e.studentId,a.goodsId=e.goodsId,a.goodsName=e.goodsName,a.status=e.status+"",a.date=e.endTime||null,a.id=e.id,this.remoteMethod(a.studentId);case 15:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{changeCategory:function(t){var e=this;this.musicForm.goodsName="",this.musicForm.goodsId=null,t&&Object(c["k"])({goodsCategoryId:t,rows:99999,type:"INSTRUMENT"}).then((function(t){200==t.code&&t.data&&(e.musicList=t.data.rows)}))},addMusicSubmit:function(){var t=this;this.$refs.form.validate(function(){var e=Object(u["a"])(Object(i["a"])().mark((function e(a){var r,n,u,c,d;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!a){e.next=24;break}if(e.prev=1,r=t.musicForm,n=r.date,u=r.status,c=Object(s["a"])(r,b),d=Object(o["a"])(Object(o["a"])({},c),{},{status:u}),1==u?(t.operationData&&t.operationData.startTime?d.startTime=t.operationData.startTime:d.startTime=g()().format("YYYY-MM-DD HH:mm")+":00",d.endTime=n):(d.startTime="",d.endTime=""),"create"!=t.operationStatus){e.next=12;break}return e.next=8,Object(l["e"])(d);case 8:e.sent,t.$message.success("添加成功"),e.next=17;break;case 12:if("update"!=t.operationStatus){e.next=17;break}return e.next=15,Object(l["Yc"])(d);case 15:e.sent,t.$message.success("修改成功");case 17:t.$emit("close"),t.$emit("getList"),e.next=24;break;case 21:e.prev=21,e.t0=e["catch"](1),console.log(e.t0);case 24:case"end":return e.stop()}}),e,null,[[1,21]])})));return function(t){return e.apply(this,arguments)}}())},remoteMethod:function(t){var e=this;if(""!==t){this.remoteLoading=!0;var a="/api-web/studentManage/queryStudentList",r={method:"post",headers:{Authorization:Object(d["b"])(),tenantId:Object(d["a"])()},data:{rows:999999,search:t},url:a};this.remoteLoading=!0,f()(r).then((function(t){e.remoteLoading=!1;var a=t.data;200==a.code&&a.data.rows&&a.data.rows.length>0&&(a.data.rows.forEach((function(t){e.studentList.unshift(t)})),e.studentList=e.deweight(e.studentList,"userId"))}))}},deweight:function(t,e){var a=[];return t.forEach((function(t){var r=[];a.forEach((function(t){r.push(t[e])})),-1===r.indexOf(t[e])&&a.push(t)})),a}}},v=h,y=(a("28e2"),a("2877")),_=Object(y["a"])(v,r,n,!1,null,"4c052e80",null);e["a"]=_.exports},"8a05":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"m-container"},[t._m(0),t._v(" "),a("div",{staticClass:"m-core"},[a("save-form",{ref:"searchForm",staticClass:"searchForm",attrs:{inline:!0,model:t.searchForm},on:{submit:t.onSearch,reset:t.onReSet}},[a("el-form-item",{attrs:{prop:"search"}},[a("el-input",{attrs:{placeholder:"学员编号/姓名",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:function(e){e.target.blur(),t.$refs.searchForm.save(),t.onSearch()}(e)}},model:{value:t.searchForm.search,callback:function(e){t.$set(t.searchForm,"search","string"===typeof e?e.trim():e)},expression:"searchForm.search"}})],1),t._v(" "),a("el-form-item",{attrs:{prop:"specification"}},[a("el-input",{attrs:{placeholder:"具体型号",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:function(e){e.target.blur(),t.$refs.searchForm.save(),t.onSearch()}(e)}},model:{value:t.searchForm.specification,callback:function(e){t.$set(t.searchForm,"specification","string"===typeof e?e.trim():e)},expression:"searchForm.specification"}})],1),t._v(" "),a("el-form-item",{attrs:{prop:"goodsCategoryId"}},[a("el-select",{attrs:{clearable:"",placeholder:"乐器分类"},model:{value:t.searchForm.goodsCategoryId,callback:function(e){t.$set(t.searchForm,"goodsCategoryId","string"===typeof e?e.trim():e)},expression:"searchForm.goodsCategoryId"}},t._l(t.categoryList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{prop:"status"}},[a("el-select",{attrs:{filterable:"",clearable:"",placeholder:"是否乐保"},model:{value:t.searchForm.status,callback:function(e){t.$set(t.searchForm,"status","string"===typeof e?e.trim():e)},expression:"searchForm.status"}},[a("el-option",{attrs:{value:"0",label:"否"}}),t._v(" "),a("el-option",{attrs:{value:"1",label:"是"}})],1)],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[t._v("搜索")])],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary","native-type":"reset"}},[t._v("重置")])],1)],1),t._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"studentInstrument/add",expression:"'studentInstrument/add'"}],attrs:{type:"primary"},on:{click:function(e){return t.operationStudent("create")}}},[t._v("新增乐器")]),t._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:t.tableList}},[a("el-table-column",{attrs:{label:"学员信息",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{on:{click:function(a){return t.gotoStudent(e.row.studentId)}}},[a("p",[a("el-button",{attrs:{type:"text"}},[t._v(t._s(e.row.studentName)),a("br"),t._v("\n ("+t._s(e.row.studentId)+")")])],1)])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"学员声部",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("p",[t._v("\n "+t._s(e.row.subjectName)+"\n ")])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"乐器名称",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("copy-text",[t._v(t._s(e.row.goodsName))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"具体型号",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("copy-text",[t._v(t._s(e.row.specification))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"乐器分类",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("copy-text",[t._v(t._s(e.row.goodsCategoryName))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"是否乐保",align:"center",prop:"teacherName"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.status?"是":"否")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"乐保有效期",align:"center",width:"350px",prop:"studentNum"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.startTime&&e.row.endTime?a("div",[t._v("\n "+t._s(e.row.startTime)+"~"+t._s(e.row.endTime)+"\n ")]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("auth",{attrs:{auths:["studentInstrument/update"]}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.operationStudent("update",e.row)}}},[t._v("修改")])],1),t._v(" "),a("auth",{attrs:{auths:["studentInstrument/del"]}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.removeMusic(e.row)}}},[t._v("删除")])],1)]}}])})],1),t._v(" "),a("pagination",{attrs:{sync:"",total:t.pageInfo.total,page:t.pageInfo.page,limit:t.pageInfo.limit,"page-sizes":t.pageInfo.page_size},on:{"update:total":function(e){return t.$set(t.pageInfo,"total",e)},"update:page":function(e){return t.$set(t.pageInfo,"page",e)},"update:limit":function(e){return t.$set(t.pageInfo,"limit",e)},pagination:t.getList}})],1),t._v(" "),t.addMusicVisible?a("el-dialog",{attrs:{title:"create"==t.operationStatus?"新增乐器":"修改乐器",width:"600px",visible:t.addMusicVisible},on:{"update:visible":function(e){t.addMusicVisible=e}}},[a("addMusic",{ref:"addMusic",attrs:{categoryList:t.categoryList,operationData:t.operationData,operationStatus:t.operationStatus,chioseStudent:!0},on:{getList:t.getList,close:function(e){t.addMusicVisible=!1}}}),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.addMusicVisible=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.addMusicSubmit}},[t._v("确 定")])],1)],1):t._e()],1)])},n=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("h2",[a("div",{staticClass:"squrt"}),t._v("\n 学员乐保\n ")])}],o=(a("7f7f"),a("ac6a"),a("c80c")),s=a("db72"),i=(a("96cf"),a("3b8d")),u=a("333d"),c=a("4baf"),l=a("1cc7"),d=a("2543"),m={components:{pagination:u["a"],addMusic:c["a"]},data:function(){return{soundLists:[],tableList:[],searchForm:{specification:"",goodsCategoryId:"",studentId:""},pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},operationStatus:"create",operationData:null,addMusicVisible:!1,categoryList:[]}},mounted:function(){this.getCategory(),this.getList()},methods:{onSearch:function(){this.pageInfo.page=1,this.getList()},onReSet:function(){this.$refs["searchForm"].resetFields(),this.getList()},getList:function(){var t=Object(i["a"])(Object(o["a"])().mark((function t(){var e;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(l["mb"])(Object(s["a"])(Object(s["a"])({},this.searchForm),{},{rows:this.pageInfo.limit,page:this.pageInfo.page}));case 3:e=t.sent,this.tableList=e.data.rows,this.pageInfo.total=e.data.total,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.log(t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})));function e(){return t.apply(this,arguments)}return e}(),addMusicSubmit:function(){this.$refs.addMusic.addMusicSubmit()},operationStudent:function(t,e){"update"==t?this.operationData=e:"create"==t&&(this.operationData=null),this.operationStatus=t,this.addMusicVisible=!0},removeMusic:function(t){var e=this;this.$confirm("您确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(i["a"])(Object(o["a"])().mark((function a(){return Object(o["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Object(l["Lc"])({id:t.id,studentId:t.studentId});case 3:a.sent,e.$message.success("删除成功"),e.getList(),a.next=10;break;case 8:a.prev=8,a.t0=a["catch"](0);case 10:case"end":return a.stop()}}),a,null,[[0,8]])}))))},getCategory:function(){var t=this,e={delFlag:0,rows:9999};Object(d["a"])(e).then((function(e){var a=e.data;if(200==e.code){var r=[];a.rows.forEach((function(t){r.push({label:t.name,value:t.id})})),t.categoryList=r}}))},gotoStudent:function(t){this.$router.push({name:"studentList",params:{search:t}})}}},f=m,p=(a("140f"),a("2877")),g=Object(p["a"])(f,r,n,!1,null,"5b832c9c",null);e["default"]=g.exports},ed08:function(t,e,a){"use strict";a.d(e,"c",(function(){return s})),a.d(e,"b",(function(){return i})),a.d(e,"a",(function(){return u}));var r=a("bd86"),n=(a("c5f6"),a("28a5"),a("a481"),a("6b54"),a("7618"),a("5a0c")),o=a.n(n);var s=function(t){var e=[];for(var a in t)if(t.hasOwnProperty(a)){var r=t[a],n=a.toLocaleUpperCase();e.push({label:r,value:"TRUE"===n||"FALSE"===n?"TRUE"===n:a})}return e},i=function(t){var e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";return t&&t.length?(e={},Object(r["a"])(e,a[0]||"start",o()(t[0]).isValid()?o()(t[0]).format(n):""),Object(r["a"])(e,a[1]||"end",o()(t[1]).isValid()?o()(t[1]).format(n):""),e):{}},u=function(t){var e,a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";return t&&t.length?"YYYY-MM-DD"===s?(e={},Object(r["a"])(e,n[0]||"start",o()(t[0]).isValid()?o()(t[0]).format(s)+" 00:00:00":""),Object(r["a"])(e,n[1]||"end",o()(t[1]).isValid()?o()(t[1]).format(s)+" 23:59:59":""),e):(a={},Object(r["a"])(a,n[0]||"start",o()(t[0]).isValid()?o()(t[0]).format(s):""),Object(r["a"])(a,n[1]||"end",o()(t[1]).isValid()?o()(t[1]).format(s):""),a):{}}}}]);
|