1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d1b51b1c"],{"09f4":function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),Math.easeInOutQuad=function(t,e,r,a){return t/=a/2,t<1?r/2*t*t+e:(t--,-r/2*(t*(t-2)-1)+e)};var a=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,r){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?a(t):r&&"function"===typeof r&&r()};l()}},"140f":function(t,e,r){"use strict";r("4b15b")},2543:function(t,e,r){"use strict";r.d(e,"k",(function(){return i})),r.d(e,"l",(function(){return u})),r.d(e,"o",(function(){return c})),r.d(e,"i",(function(){return l})),r.d(e,"m",(function(){return d})),r.d(e,"j",(function(){return m})),r.d(e,"a",(function(){return p})),r.d(e,"b",(function(){return f})),r.d(e,"c",(function(){return g})),r.d(e,"h",(function(){return h})),r.d(e,"n",(function(){return b})),r.d(e,"f",(function(){return v})),r.d(e,"d",(function(){return y})),r.d(e,"e",(function(){return _})),r.d(e,"g",(function(){return w}));var a=r("b775"),n=r("4328"),o=r.n(n),s="/api-web";function i(t){return Object(a["a"])({url:s+"/goods/queryPage",method:"get",params:t})}function u(t){return Object(a["a"])({url:s+"/goods/get/".concat(t),method:"get"})}function c(t){return Object(a["a"])({url:s+"/goods/updateGoodsStatus",method:"post",data:o.a.stringify(t)})}function l(t){return Object(a["a"])({url:s+"/goods/add",method:"post",data:o.a.stringify(t)})}function d(t){return Object(a["a"])({url:s+"/goods/update",method:"post",data:o.a.stringify(t)})}function m(t){return Object(a["a"])({url:s+"/goods/del/".concat(t),method:"post"})}function p(t){return Object(a["a"])({url:s+"/category/queryPage",method:"get",params:t})}function f(t){return Object(a["a"])({url:s+"/category/upset",method:"post",data:t})}function g(t){return Object(a["a"])({url:s+"/category/del",method:"post",data:o.a.stringify(t)})}function h(t){return Object(a["a"])({url:s+"/subjectChange/queryPage",method:"get",params:t})}function b(t){return Object(a["a"])({url:s+"/subjectChange/updateCostMargin",method:"post",data:o.a.stringify(t)})}function v(t){return Object(a["a"])({url:s+"/goodsProcurement/queryGoodsProcurements",method:"get",params:t})}function y(t){return Object(a["a"])({url:s+"/goods/addGoodsProcurement",method:"post",params:t})}function _(t){return Object(a["a"])({url:s+"/swTempJc/queryPageForCourseSchedule",method:"get",params:t})}function w(t){return Object(a["a"])({url:s+"/swTempJc/queryPageForExtensionOrder",method:"get",params:t})}},"28e2":function(t,e,r){"use strict";r("2a64")},"2a64":function(t,e,r){},"4b15b":function(t,e,r){},"4baf":function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("el-form",{ref:"form",attrs:{model:t.musicForm,"label-width":"110px"}},[this.chioseStudent?r("el-form-item",{attrs:{label:"选择学员",prop:"studentId",rules:[{required:!0,message:"请选择学员",trigger:"blur"}]}},[r("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 r("el-option",{key:e.userId,attrs:{label:e.username,value:e.userId}},[r("span",{staticStyle:{float:"left"}},[t._v(t._s(e.username))]),t._v(" "),r("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.userId))])])})),1)],1):t._e(),t._v(" "),r("el-form-item",{attrs:{label:"乐器分类",prop:"goodsCategoryId",rules:[{required:!0,message:"请选择乐器分类",trigger:"blur"}]}},[r("el-form-item",[r("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 r("el-option",{key:e,attrs:{label:t.label,value:t.value}})})),1)],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"乐器名称",prop:"goodsId",rules:[{required:!0,message:"请选择乐器名称",trigger:"blur"}]}},[r("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 r("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),r("el-form-item",{attrs:{label:"是否乐保",prop:"status",rules:[{required:!0,message:"请选择是否乐保",trigger:"blur"}]}},[r("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"}},[r("el-option",{attrs:{value:"0",label:"否"}}),t._v(" "),r("el-option",{attrs:{value:"1",label:"是"}})],1)],1),t._v(" "),1==t.musicForm.status?r("el-form-item",{attrs:{label:"乐保结束日期",rules:[{required:!0,message:"请选择乐保结束日期",trigger:"blur"}],prop:"date"}},[r("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=(r("ac6a"),r("5530")),s=r("15fd"),i=(r("96cf"),r("1da1")),u=r("2543"),c=r("1cc7"),l=r("5f87"),d=(r("ed08"),r("bc3a")),m=r.n(d),p=r("5a0c"),f=r.n(p),g={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=f()(f()().format("YYYY-MM-DD")).valueOf();return e>t.getTime()}},typeList:this.categoryList,musicList:[],remoteLoading:!1,studentList:[]}},mounted:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.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(r=this.musicForm,r.goodsCategoryId=e.goodsCategoryId,!e.goodsCategoryId){t.next=8;break}return t.next=8,this.changeCategory(e.goodsCategoryId);case 8:r.studentId=e.studentId,r.goodsId=e.goodsId,r.goodsName=e.goodsName,r.status=e.status+"",r.date=e.endTime||null,r.id=e.id,this.remoteMethod(r.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(u["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(i["a"])(regeneratorRuntime.mark((function e(r){var a,n,i,u,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=24;break}if(e.prev=1,a=t.musicForm,n=a.date,i=a.status,u=Object(s["a"])(a,["date","status"]),l=Object(o["a"])(Object(o["a"])({},u),{},{status:i}),1==i?(t.operationData&&t.operationData.startTime?l.startTime=t.operationData.startTime:l.startTime=f()().format("YYYY-MM-DD HH:mm")+":00",l.endTime=n):(l.startTime="",l.endTime=""),"create"!=t.operationStatus){e.next=12;break}return e.next=8,Object(c["e"])(l);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(c["Yc"])(l);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 r="/api-web/studentManage/queryStudentList",a={method:"post",headers:{Authorization:Object(l["b"])(),tenantId:Object(l["a"])()},data:{rows:999999,search:t},url:r};this.remoteLoading=!0,m()(a).then((function(t){e.remoteLoading=!1;var r=t.data;200==r.code&&r.data.rows&&r.data.rows.length>0&&(r.data.rows.forEach((function(t){e.studentList.unshift(t)})),e.studentList=e.deweight(e.studentList,"userId"))}))}},deweight:function(t,e){var r=[];return t.forEach((function(t){var a=[];r.forEach((function(t){a.push(t[e])})),-1===a.indexOf(t[e])&&r.push(t)})),r}}},h=g,b=(r("28e2"),r("2877")),v=Object(b["a"])(h,a,n,!1,null,"4c052e80",null);e["a"]=v.exports},"8a05":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"m-container"},[t._m(0),t._v(" "),r("div",{staticClass:"m-core"},[r("save-form",{ref:"searchForm",staticClass:"searchForm",attrs:{inline:!0,model:t.searchForm},on:{submit:t.onSearch,reset:t.onReSet}},[r("el-form-item",{attrs:{prop:"search"}},[r("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(" "),r("el-form-item",{attrs:{prop:"specification"}},[r("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(" "),r("el-form-item",{attrs:{prop:"goodsCategoryId"}},[r("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 r("el-option",{key:e,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),r("el-form-item",{attrs:{prop:"status"}},[r("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"}},[r("el-option",{attrs:{value:"0",label:"否"}}),t._v(" "),r("el-option",{attrs:{value:"1",label:"是"}})],1)],1),t._v(" "),r("el-form-item",[r("el-button",{attrs:{"native-type":"submit",type:"danger"}},[t._v("搜索")])],1),t._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary","native-type":"reset"}},[t._v("重置")])],1)],1),t._v(" "),r("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(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:t.tableList}},[r("el-table-column",{attrs:{label:"学员信息",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("div",{on:{click:function(r){return t.gotoStudent(e.row.studentId)}}},[r("p",[r("el-button",{attrs:{type:"text"}},[t._v(t._s(e.row.studentName)),r("br"),t._v("\n ("+t._s(e.row.studentId)+")")])],1)])]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"学员声部",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("div",[r("p",[t._v("\n "+t._s(e.row.subjectName)+"\n ")])])]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"乐器名称",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("copy-text",[t._v(t._s(e.row.goodsName))])]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"具体型号",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("copy-text",[t._v(t._s(e.row.specification))])]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"乐器分类",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("copy-text",[t._v(t._s(e.row.goodsCategoryName))])]}}])}),t._v(" "),r("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(" "),r("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?r("div",[t._v("\n "+t._s(e.row.startTime)+"~"+t._s(e.row.endTime)+"\n ")]):t._e()]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("auth",{attrs:{auths:["studentInstrument/update"]}},[r("el-button",{attrs:{type:"text"},on:{click:function(r){return t.operationStudent("update",e.row)}}},[t._v("修改")])],1),t._v(" "),r("auth",{attrs:{auths:["studentInstrument/del"]}},[r("el-button",{attrs:{type:"text"},on:{click:function(r){return t.removeMusic(e.row)}}},[t._v("删除")])],1)]}}])})],1),t._v(" "),r("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?r("el-dialog",{attrs:{title:"create"==t.operationStatus?"新增乐器":"修改乐器",width:"600px",visible:t.addMusicVisible},on:{"update:visible":function(e){t.addMusicVisible=e}}},[r("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(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(e){t.addMusicVisible=!1}}},[t._v("取 消")]),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:t.addMusicSubmit}},[t._v("确 定")])],1)],1):t._e()],1)])},n=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("h2",[r("div",{staticClass:"squrt"}),t._v("\n 学员乐保\n ")])}],o=(r("7f7f"),r("ac6a"),r("5530")),s=(r("96cf"),r("1da1")),i=r("333d"),u=r("4baf"),c=r("1cc7"),l=r("2543"),d={components:{pagination:i["a"],addMusic:u["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(s["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(c["mb"])(Object(o["a"])(Object(o["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(s["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Object(c["Lc"])({id:t.id,studentId:t.studentId});case 3:r.sent,e.$message.success("删除成功"),e.getList(),r.next=10;break;case 8:r.prev=8,r.t0=r["catch"](0);case 10:case"end":return r.stop()}}),r,null,[[0,8]])}))))},getCategory:function(){var t=this,e={delFlag:0,rows:9999};Object(l["a"])(e).then((function(e){var r=e.data;if(200==e.code){var a=[];r.rows.forEach((function(t){a.push({label:t.name,value:t.id})})),t.categoryList=a}}))},gotoStudent:function(t){this.$router.push({name:"studentList",params:{search:t}})}}},m=d,p=(r("140f"),r("2877")),f=Object(p["a"])(m,a,n,!1,null,"5b832c9c",null);e["default"]=f.exports},ed08:function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"a",(function(){return i}));var a=r("ade3"),n=(r("c5f6"),r("28a5"),r("a481"),r("6b54"),r("53ca"),r("5a0c")),o=r.n(n);var s=function(t){var e=[];for(var r in t)if(t.hasOwnProperty(r)){var a=t[r],n=r.toLocaleUpperCase();e.push({label:a,value:"TRUE"===n||"FALSE"===n?"TRUE"===n:r})}return e},i=function(t){var e,r=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(a["a"])(e,r[0]||"start",o()(t[0]).isValid()?o()(t[0]).format(n):""),Object(a["a"])(e,r[1]||"end",o()(t[1]).isValid()?o()(t[1]).format(n):""),e):{}}}}]);
|