chunk-3c27ecb4.aad72698.js 20 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3c27ecb4"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,r,a){return e/=a/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function o(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function n(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,r){var i=n(),c=e-i,s=20,u=0;t="undefined"===typeof t?500:t;var l=function e(){u+=s;var n=Math.easeInOutQuad(u,i,c,t);o(n),u<t?a(e):r&&"function"===typeof r&&r()};l()}},"22e5":function(e,t,r){},"78ff":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"},[e._m(0),e._v(" "),r("div",{staticClass:"m-core"},[r("save-form",{ref:"searchForm",staticClass:"searchForm",attrs:{inline:!0,saveKey:"contentFlashPage",model:e.searchForm},on:{submit:e.search}},[r("el-form-item",{attrs:{prop:"search"}},[r("el-input",{attrs:{clearable:"",placeholder:"分部名称/编号/地址"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){t.target.blur(),e.$refs.searchForm.save(),e.search()}(t)}},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(" "),r("el-form-item",[r("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.onReSet}},[e._v("重置")])],1)],1),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"organization/add",expression:"'organization/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(t){return e.onBranchOperation("create")}}},[e._v("\n 新建\n ")]),e._v(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[r("el-table-column",{attrs:{align:"center",prop:"id",label:"分部编号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"name",label:"分部名称"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"areaName",label:"城市"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"address",label:"分部地址"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"学年制"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("gradeTypeFormat")(t.row.gradeType))+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"maxMusicalInstrumentsProfits",label:"乐器分润上限"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"成立时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimer")(t.row.registerDate))+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"organization/update",expression:"'organization/update'"}],attrs:{type:"text"},on:{click:function(r){return e.onBranchOperation("update",t.row)}}},[e._v("修改")]),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"organization/update",expression:"'organization/update'"}],attrs:{type:"text"},on:{click:function(r){return e.showCode(t.row)}}},[e._v("注册二维码")])]}}])})],1),e._v(" "),r("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(" "),r("el-dialog",{attrs:{title:e.formTitle[e.formActionTitle],visible:e.branchStatus,width:"600px"},on:{"update:visible":function(t){e.branchStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[r("el-form",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules}},[r("el-form-item",{attrs:{label:"分部名称",prop:"name","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入分部名称",autocomplete:"off"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name","string"===typeof t?t.trim():t)},expression:"form.name"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"城市",required:"","label-width":e.formLabelWidth}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{prop:"province"}},[r("el-select",{attrs:{filterable:"",placeholder:"请选择省",clearable:""},on:{change:e.onChangeProvince},model:{value:e.form.province,callback:function(t){e.$set(e.form,"province","string"===typeof t?t.trim():t)},expression:"form.province"}},e._l(e.provinceList,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{prop:"city"}},[r("el-select",{attrs:{filterable:"",placeholder:"请选择市",clearable:""},model:{value:e.form.city,callback:function(t){e.$set(e.form,"city","string"===typeof t?t.trim():t)},expression:"form.city"}},e._l(e.cityList,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"学年制",prop:"gradeType","label-width":e.formLabelWidth}},[r("el-select",{attrs:{filterable:"",placeholder:"请选择学年制",clearable:""},model:{value:e.form.gradeType,callback:function(t){e.$set(e.form,"gradeType","string"===typeof t?t.trim():t)},expression:"form.gradeType"}},[r("el-option",{attrs:{label:"6+3",value:"SIX_PLUS"}}),e._v(" "),r("el-option",{attrs:{label:"5+4",value:"FIVE_PLUS"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"分部地址",prop:"address","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入分部地址",autocomplete:"off"},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address","string"===typeof t?t.trim():t)},expression:"form.address"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"成立时间",prop:"registerDate","label-width":e.formLabelWidth}},[r("el-date-picker",{attrs:{type:"date","value-format":"yyyy-MM-dd","picker-options":{firstDayOfWeek:1},placeholder:"选择成立时间"},model:{value:e.form.registerDate,callback:function(t){e.$set(e.form,"registerDate","string"===typeof t?t.trim():t)},expression:"form.registerDate"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"乐器分润上限",prop:"maxMusicalInstrumentsProfits","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入乐器分润上限",autocomplete:"off"},model:{value:e.form.maxMusicalInstrumentsProfits,callback:function(t){e.$set(e.form,"maxMusicalInstrumentsProfits","string"===typeof t?t.trim():t)},expression:"form.maxMusicalInstrumentsProfits"}},[r("template",{slot:"append"},[e._v("元")])],2)],1),e._v(" "),r("el-form-item",{attrs:{label:"公司名称",prop:"corporateName","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入公司名称",autocomplete:"off"},model:{value:e.form.corporateName,callback:function(t){e.$set(e.form,"corporateName","string"===typeof t?t.trim():t)},expression:"form.corporateName"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"营业执照编号",prop:"corporateCode","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入营业执照编号",autocomplete:"off"},model:{value:e.form.corporateCode,callback:function(t){e.$set(e.form,"corporateCode","string"===typeof t?t.trim():t)},expression:"form.corporateCode"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"企业公章",prop:"corporateSeal","label-width":e.formLabelWidth}},[r("div",{staticClass:"ant-upload-preview",staticStyle:{width:"300px !important"}},[r("image-cropper",{attrs:{options:{autoCrop:!0,autoCropWidth:300,autoCropHeight:300,fixedBox:!0,previewsCircle:!1,title:"上传企业公章"},isDelete:"",imgSize:5,accept:".png",acceptArray:["image/png"],imageUrl:e.form.corporateSeal},on:{"update:imageUrl":function(t){return e.$set(e.form,"corporateSeal",t)},"update:image-url":function(t){return e.$set(e.form,"corporateSeal",t)},"crop-upload-success":e.cropSuccess1}}),e._v(" "),r("div",{staticClass:"tips",staticStyle:{"line-height":"1.3",color:"red"}},[e._v("\n 请上传透明背景PNG格式公章图片;"),r("br"),e._v("\n 仅支持图片格式:png,大小:5MB;\n ")])],1)]),e._v(" "),r("el-form-item",{attrs:{label:"企业财务公章",prop:"corporateFinancialSeal","label-width":e.formLabelWidth}},[r("div",{staticClass:"ant-upload-preview",staticStyle:{width:"300px !important"}},[r("image-cropper",{attrs:{options:{autoCrop:!0,autoCropWidth:300,autoCropHeight:300,fixedBox:!0,previewsCircle:!1,title:"上传企业财务公章"},isDelete:"",imgSize:5,accept:".png",acceptArray:["image/png"],imageUrl:e.form.corporateFinancialSeal},on:{"update:imageUrl":function(t){return e.$set(e.form,"corporateFinancialSeal",t)},"update:image-url":function(t){return e.$set(e.form,"corporateFinancialSeal",t)},"crop-upload-success":e.cropSuccess2}}),e._v(" "),r("div",{staticClass:"tips",staticStyle:{"line-height":"1.3",color:"red"}},[e._v("\n 请上传透明背景PNG格式公章图片;"),r("br"),e._v("\n 仅支持图片格式:png,大小:5MB;\n ")])],1)])],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.branchStatus=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onBranchSubmit("ruleForm")}}},[e._v("确 定")])],1)],1),e._v(" "),r("qr-code",{attrs:{title:e.codeTitle,codeUrl:e.qrCodeUrl},model:{value:e.codeStatus,callback:function(t){e.codeStatus=t},expression:"codeStatus"}})],1)},o=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("h2",[r("div",{staticClass:"squrt"}),e._v("\n 分部管理\n ")])}],n=r("c80c"),i=(r("28a5"),r("96cf"),r("3b8d")),c=(r("7f7f"),r("ac6a"),r("db72")),s=(r("386d"),r("5f87")),u=r("333d"),l=r("641c"),d=r("d349"),p=r("61f7"),m=r("99b4"),f=r("896b"),g={name:"branchSetting",components:{pagination:u["a"],qrCode:l["a"],ImageCropper:f["a"]},data:function(){return{headers:{Authorization:Object(s["b"])()},tableList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},organId:null,formActionTitle:"create",formTitle:{create:"添加分部",update:"修改分部"},formLabelWidth:"120px",branchStatus:!1,provinceList:[],cityList:[],employeeList:[],form:{name:null,province:null,city:null,address:null,registerDate:null,gradeType:"SIX_PLUS",organManager:[],educationId:[],repairId:[],joinTeacherId:[],corporateName:null,corporateCode:null,corporateSeal:null,corporateFinancialSeal:null,maxMusicalInstrumentsProfits:null},rules:{name:[{required:!0,message:"请输入分部名称",trigger:"blur"}],province:[{required:!0,message:"请选择省",trigger:"change"}],city:[{required:!0,message:"请选择市",trigger:"change"}],address:[{required:!0,message:"请输入分部地址",trigger:"blur"}],registerDate:[{required:!0,message:"请选择成立时间",trigger:"change"}],gradeType:[{required:!0,message:"请选择学年制",trigger:"change"}],maxMusicalInstrumentsProfits:[{required:!0,message:"请输入乐器分润上线",trigger:"change"},{pattern:/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,message:"请输入正确的金额"}]},codeStatus:!1,qrCodeUrl:null,codeTitle:"注册二维码",searchForm:{search:""}}},mounted:function(){this.getList(),this.getAreaList()},methods:{cropSuccess1:function(e){this.form.corporateSeal=e.data.url},cropSuccess2:function(e){this.form.corporateFinancialSeal=e.data.url},onReSet:function(){this.searchForm.search="",this.search()},search:function(){this.rules.page=1,this.getList()},beforeAvatarUpload:function(e){var t={"image/png":!0},r=t[e.type],a=e.size/1024/1024<5;return r?a?r&&a:(this.$message.error("上传头像图片大小不能超过 5MB!"),!1):(this.$message.error("只能上传图片格式!"),!1)},handleAvatarSuccess:function(e){this.form.corporateSeal=e.data.url},handleAvatarSuccess2:function(e){this.form.corporateFinancialSeal=e.data.url},onBranchSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(e){t.form.areaId=t.form.city;var r=Object(c["a"])(Object(c["a"])({},t.form),{},{organManager:t.form.organManager.join(","),educationId:t.form.educationId.join(","),repairId:t.form.repairId.join(","),joinTeacherId:t.form.joinTeacherId.join(",")});"create"==t.formActionTitle?(r.id&&delete r.id,Object(d["d"])(r).then((function(e){t.messageTips("添加",e)}))):"update"==t.formActionTitle&&Object(d["f"])(r).then((function(e){t.messageTips("修改",e)}))}}))},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.branchStatus=!1,this.getList()):this.$message.error(t.msg)},getList:function(){var e=this;Object(d["e"])(Object(c["a"])({rows:this.pageInfo.limit,page:this.pageInfo.page},this.searchForm)).then((function(t){200==t.code&&t.data&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)}))},onFormClose:function(e){this.$refs[e].resetFields(),this.form.gradeType="SIX_PLUS"},getAreaList:function(e,t){var r=this;e=e||0,Object(d["c"])({parentId:e}).then((function(a){if(200==a.code&&a.data){var o=[];a.data.forEach((function(e){o.push({label:e.name,value:e.id})})),e?r.cityList=o:r.provinceList=o,t&&"function"==typeof t&&t()}}))},onChangeProvince:function(e){this.form.city=null,this.getAreaList(e)},onBranchOperation:function(){var e=Object(i["a"])(Object(n["a"])().mark((function e(t,r){var a,o=this;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=11;break}return e.prev=1,e.next=4,Object(m["F"])({organId:r.id,rows:9999,demissionflag:!1,lockFlag:!1});case 4:a=e.sent,this.$set(this,"employeeList",a.data.rows),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](1),console.log(e.t0);case 11:this.formActionTitle=t,"update"==t?Object(d["o"])({id:r.areaId}).then((function(e){200==e.code&&e.data&&(o.getAreaList(e.data.id,(function(){o.form={id:r.id,name:r.name,province:e.data.id,city:r.areaId,address:r.address,registerDate:r.registerDate,gradeType:1==r.gradeType?"FIVE_PLUS":"SIX_PLUS",organManager:r.organManager?r.organManager.split(","):[],repairId:r.repairId?r.repairId.split(","):[],joinTeacherId:r.joinTeacherId?r.joinTeacherId.split(","):[],educationId:r.educationId?r.educationId.split(","):[],corporateName:r.corporateName,corporateCode:r.corporateCode,corporateSeal:r.corporateSeal,corporateFinancialSeal:r.corporateFinancialSeal,maxMusicalInstrumentsProfits:r.maxMusicalInstrumentsProfits}})),o.branchStatus=!0)})):this.branchStatus=!0;case 13:case"end":return e.stop()}}),e,this,[[1,8]])})));function t(t,r){return e.apply(this,arguments)}return t}(),showCode:function(e){this.qrCodeUrl=Object(p["d"])()+"/project/register/index.html?organId="+e.id,this.codeStatus=!0}}},h=g,b=(r("ef6b"),r("2877")),v=Object(b["a"])(h,a,o,!1,null,"c4c7f328",null);t["default"]=v.exports},"9d64":function(e,t,r){e.exports=r.p+"static/img/logo.ae7b11a3.png"},d349:function(e,t,r){"use strict";r.d(t,"e",(function(){return l})),r.d(t,"d",(function(){return d})),r.d(t,"f",(function(){return p})),r.d(t,"c",(function(){return m})),r.d(t,"o",(function(){return f})),r.d(t,"D",(function(){return g})),r.d(t,"E",(function(){return h})),r.d(t,"F",(function(){return b})),r.d(t,"i",(function(){return v})),r.d(t,"g",(function(){return y})),r.d(t,"j",(function(){return S})),r.d(t,"r",(function(){return _})),r.d(t,"p",(function(){return j})),r.d(t,"q",(function(){return O})),r.d(t,"h",(function(){return T})),r.d(t,"s",(function(){return I})),r.d(t,"G",(function(){return w})),r.d(t,"k",(function(){return C})),r.d(t,"t",(function(){return k})),r.d(t,"w",(function(){return x})),r.d(t,"u",(function(){return F})),r.d(t,"v",(function(){return L})),r.d(t,"n",(function(){return q})),r.d(t,"b",(function(){return P})),r.d(t,"C",(function(){return z})),r.d(t,"m",(function(){return $})),r.d(t,"B",(function(){return M})),r.d(t,"a",(function(){return A})),r.d(t,"l",(function(){return U})),r.d(t,"y",(function(){return D})),r.d(t,"x",(function(){return N})),r.d(t,"z",(function(){return W})),r.d(t,"A",(function(){return B}));var a=r("a8db"),o=r("b775"),n=r("829b"),i=r("4328"),c=r.n(i),s=["id"],u="/api-web";function l(e){return Object(o["a"])({url:u+"/organization/queryPage",method:"get",params:e})}function d(e){return Object(o["a"])({url:u+"/organization/add",method:"post",data:c.a.stringify(e)})}function p(e){return Object(o["a"])({url:u+"/organization/update",method:"post",data:c.a.stringify(e)})}function m(e){return Object(n["a"])({url:u+"/area/queryChild",method:"get",hideLoading:!0,params:e})}function f(e){return Object(o["a"])({url:u+"/area/getParentArea/".concat(e.id),method:"get"})}function g(e){return Object(o["a"])({url:u+"/subject/queryPageByIdOrName",method:"post",data:c.a.stringify(e)})}function h(e){return Object(o["a"])({url:u+"/subject/queryPageTree",method:"get",params:e})}function b(e){return Object(o["a"])({url:u+"/subject/upset",method:"post",data:e})}function v(e){return Object(o["a"])({url:u+"/chargeType/upSet",method:"post",data:e})}function y(e){return Object(o["a"])({url:u+"/chargeType/del/".concat(e),method:"post"})}function S(e){return Object(o["a"])({url:u+"/courseHomeworkTemplate/queryPage",method:"post",data:e})}function _(e){return Object(o["a"])({url:u+"/courseHomeworkTemplate/update",method:"post",data:c.a.stringify(e)})}function j(e){return Object(o["a"])({url:u+"/courseHomeworkTemplate/add",method:"post",data:c.a.stringify(e)})}function O(e){return Object(o["a"])({url:u+"/courseHomeworkTemplate/del/".concat(e),method:"post"})}function T(e){return Object(n["a"])({url:u+"/chargeTypeSubjectMapper/queryPage",method:"get",data:{},params:e,requestType:"form"})}function I(e){return Object(n["a"])({url:u+"/chargeTypeSubjectMapper/insert",method:"post",data:e})}function w(e){return Object(n["a"])({url:u+"/chargeTypeSubjectMapper/update",method:"post",data:e})}function C(e){var t=e.id,r=Object(a["a"])(e,s);return Object(n["a"])({url:u+"/chargeTypeSubjectMapper/del/"+t,method:"post",params:r})}function k(e){return Object(n["a"])({url:u+"/musicGroupOrganizationCourseSettings/add",method:"post",data:e})}function x(e){return Object(n["a"])({url:u+"/musicGroupOrganizationCourseSettings/update",method:"post",data:e})}function F(e){return Object(n["a"])({url:u+"/musicGroupOrganizationCourseSettings/delSetting",method:"post",data:{},params:e,requestType:"form"})}function L(e){return Object(n["a"])({url:u+"/musicGroupOrganizationCourseSettings/queryPage",method:"get",data:{},params:e,requestType:"form"})}function q(e){return Object(n["a"])({url:u+"/organizationCourseUnitPriceSettings/queryPage",method:"get",params:e,data:{},requestType:"form"})}function P(e){return Object(n["a"])({url:u+"/organizationCourseUnitPriceSettings/save",method:"post",data:e})}function z(e){return Object(n["a"])({url:u+"/organizationCourseUnitPriceSettings/update",method:"post",data:e})}function $(e){return Object(n["a"])({url:u+"/organizationCourseDurationSettings/queryPage",method:"get",data:{},params:e})}function M(e){return Object(n["a"])({url:u+"/organizationCourseDurationSettings/update",method:"post",params:e})}function A(e){return Object(n["a"])({url:u+"/organizationCourseDurationSettings/insert",method:"post",params:e})}function U(e){return Object(n["a"])({url:u+"/organizationCourseDurationSettings/del",method:"post",data:e})}function D(e){return Object(n["a"])({url:u+"/organizationCloudTeacherFee/queryPage",method:"get",params:e})}function N(e){return Object(n["a"])({url:u+"/organizationCloudTeacherFee/add",method:"post",requestType:"form",data:e})}function W(e){return Object(n["a"])({url:u+"/organizationCloudTeacherFee/update",method:"post",requestType:"form",data:e})}function B(e,t){return Object(n["a"])({url:u+"/organizationCourseUnitPriceSettings/querySingle/".concat(e,"/").concat(t),method:"get"})}},ef6b:function(e,t,r){"use strict";r("22e5")}}]);