chunk-49305f3a.d44bff4a.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-49305f3a"],{"1c99":function(e,t,r){},"99b4":function(e,t,r){"use strict";r.d(t,"a",function(){return i}),r.d(t,"c",function(){return s}),r.d(t,"b",function(){return d}),r.d(t,"x",function(){return c}),r.d(t,"v",function(){return l}),r.d(t,"C",function(){return m}),r.d(t,"B",function(){return f}),r.d(t,"D",function(){return p}),r.d(t,"w",function(){return h}),r.d(t,"h",function(){return g}),r.d(t,"j",function(){return b}),r.d(t,"m",function(){return y}),r.d(t,"i",function(){return O}),r.d(t,"z",function(){return v}),r.d(t,"k",function(){return j}),r.d(t,"A",function(){return w}),r.d(t,"y",function(){return x}),r.d(t,"d",function(){return T}),r.d(t,"f",function(){return _}),r.d(t,"e",function(){return I}),r.d(t,"g",function(){return k}),r.d(t,"n",function(){return q}),r.d(t,"o",function(){return S}),r.d(t,"q",function(){return L}),r.d(t,"p",function(){return C}),r.d(t,"l",function(){return $}),r.d(t,"t",function(){return P}),r.d(t,"r",function(){return M}),r.d(t,"u",function(){return R}),r.d(t,"s",function(){return D});var n=r("b775"),a=r("4328"),u=r.n(a),o="/api-web";function i(e){return Object(n["a"])({url:o+"/cooperationOrgan/add",method:"post",data:u.a.stringify(e)})}function s(e){return Object(n["a"])({url:o+"/cooperationOrgan/update",method:"put",data:u.a.stringify(e)})}function d(e){return Object(n["a"])({url:o+"/cooperationOrgan/del/".concat(e),method:"post"})}function c(e){return Object(n["a"])({url:o+"/cooperationOrgan/queryPage",method:"get",params:e})}function l(e){return Object(n["a"])({url:o+"/cooperationOrgan/queryByOrganId",method:"get",params:e})}function m(e){return Object(n["a"])({url:o+"/school/queryPage",method:"get",params:e})}function f(e){return Object(n["a"])({url:o+"/school/add",method:"post",data:u.a.stringify(e)})}function p(e){return Object(n["a"])({url:o+"/school/update",method:"post",data:u.a.stringify(e)})}function h(e){return Object(n["a"])({url:o+"/employee/queryEmployByOrganId",method:"get",params:e})}function g(e){return Object(n["a"])({url:o+"/employee/add",method:"post",data:e})}function b(e){return Object(n["a"])({url:o+"/employee/update",method:"post",data:e})}function y(e){return Object(n["a"])({url:"/api-auth/role/queryPage",method:"get",params:e})}function O(e){return Object(n["a"])({url:o+"/employee/employeeOperate",method:"post",data:u.a.stringify(e)})}function v(e){return Object(n["a"])({url:"/api-auth/role/queryPage",method:"get",params:e})}function j(e){return Object(n["a"])({url:"/api-auth/role/".concat(e.id),method:"get"})}function w(e){return Object(n["a"])({url:"/api-auth/role/update",method:"post",data:e})}function x(e){return Object(n["a"])({url:"/api-auth/role/add",method:"post",data:e})}function T(e){return Object(n["a"])({url:o+"/courseScheduleRewards/queryPage",method:"get",params:e})}function _(e){return Object(n["a"])({url:o+"/courseScheduleRewards/query",method:"get",params:e})}function I(e){return Object(n["a"])({url:o+"/courseScheduleRewards/add",method:"post",data:u.a.stringify(e)})}function k(e){return Object(n["a"])({url:o+"/courseScheduleRewards/update",method:"post",data:u.a.stringify(e)})}function q(e){return Object(n["a"])({url:o+"/hotWordLabelManage/queryPage",method:"get",params:e})}function S(e){return Object(n["a"])({url:o+"/hotWordLabelManage/add",method:"post",data:u.a.stringify(e)})}function L(e){return Object(n["a"])({url:o+"/hotWordLabelManage/update",method:"post",data:u.a.stringify(e)})}function C(e){return Object(n["a"])({url:o+"/hotWordLabelManage/del/".concat(e),method:"post"})}function $(e){return Object(n["a"])({url:o+"/school/queryByOrganId",method:"get",params:e})}function P(e){return Object(n["a"])({url:o+"/paymentConfig/queryPage",method:"get",params:e})}function M(e){return Object(n["a"])({url:o+"/paymentConfig/add",method:"post",data:u.a.stringify(e)})}function R(e){return Object(n["a"])({url:o+"/paymentConfig/update",method:"post",data:u.a.stringify(e)})}function D(e){return Object(n["a"])({url:o+"/paymentConfig/del/"+e.id,method:"post"})}},b830:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[r("h2",[r("el-page-header",{attrs:{content:("create"==e.pageType?"添加":"修改")+"分部活动"},on:{back:e.onCancel}})],1),e._v(" "),r("div",{staticClass:"m-core"},[r("el-form",{ref:"form",attrs:{model:e.result,rules:e.rules,"label-width":"120px"}},[r("el-form-item",{staticStyle:{width:"500px"},attrs:{label:"活动名称",prop:"name"}},[r("el-input",{model:{value:e.result.name,callback:function(t){e.$set(e.result,"name",t)},expression:"result.name"}})],1),e._v(" "),r("el-form-item",{staticStyle:{width:"500px"},attrs:{prop:"rewardMode",label:"活动类型"}},[r("el-radio-group",{model:{value:e.result.rewardMode,callback:function(t){e.$set(e.result,"rewardMode",t)},expression:"result.rewardMode"}},[r("el-radio",{attrs:{label:"STAIR"}},[e._v("阶梯奖励")]),e._v(" "),r("el-radio",{attrs:{label:"PER"}},[e._v("累计奖励")])],1)],1),e._v(" "),r("el-form-item",{staticClass:"moreRule",staticStyle:{"margin-bottom":"0"}},[r("span",{staticClass:"min"},[e._v("最小值")]),e._v(" "),r("span",{staticClass:"min"},[e._v("最大值")]),e._v(" "),r("span",{staticClass:"max"},[e._v("奖励金额")])]),e._v(" "),r("div",{staticClass:"moreRule"},[e._l(e.result.domains,function(t,n){return r("div",{key:t.key,staticClass:"moreRuleIn"},[r("el-form-item",{attrs:{label:"梯度"+(n+1)}},[r("el-input",{attrs:{type:"number",disabled:t.disabled},model:{value:t.min,callback:function(r){e.$set(t,"min",r)},expression:"domain.min"}})],1),e._v(" "),r("el-form-item",[r("el-input",{attrs:{type:"number",disabled:t.disabled},model:{value:t.max,callback:function(r){e.$set(t,"max",r)},expression:"domain.max"}})],1),e._v(" "),r("el-form-item",[r("el-input",{staticStyle:{width:"auto"},attrs:{type:"number",disabled:t.disabled},model:{value:t.money,callback:function(r){e.$set(t,"money",r)},expression:"domain.money"}}),e._v(" "),0==n||t.disabled?e._e():r("el-button",{on:{click:function(r){return r.preventDefault(),e.removeDomain(e.result,t)}}},[e._v("删除")])],1)],1)}),e._v(" "),e.result.errorText?r("div",{staticClass:"el-form-item__error"},[e._v(e._s(e.result.errorText))]):e._e()],2),e._v(" "),r("el-form-item",{staticClass:"add"},[r("el-button",{attrs:{icon:"el-icon-plus"},on:{click:function(t){return e.addDomain(e.result)}}},[e._v("新增梯度")])],1),e._v(" "),r("el-form-item",{staticStyle:{width:"500px"},attrs:{prop:"organIdList",label:"适用分部"}},[r("el-select",{staticStyle:{width:"100% !important"},attrs:{multiple:"",placeholder:"请选择"},model:{value:e.result.organIdList,callback:function(t){e.$set(e.result,"organIdList",t)},expression:"result.organIdList"}},e._l(e.branchList,function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value,disabled:e.disabled}})}),1)],1),e._v(" "),r("el-form-item",[r("el-button",{on:{click:e.resetForm}},[e._v("重置")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onSubmit("form")}}},[e._v("立即"+e._s("create"==e.pageType?"创建":"修改"))])],1)],1)],1)])},a=[],u=(r("28a5"),r("7f7f"),r("ac6a"),r("96cf"),r("3b8d")),o=(r("4360"),r("d349")),i=r("99b4"),s={data:function(){return{organId:null,pageType:this.$route.query.type,id:this.$route.query.id,pageInfo:this.$route.query.pageInfo,branchList:[],useBranchId:[],result:{name:null,rewardMode:null,organIdList:null,courseScheduleType:"VIP",domains:[{min:null,max:null,money:null,disabled:!1,key:Date.now()}],errorText:null},rules:{name:[{required:!0,message:"请输入活动名称",trigger:"blur"}],rewardMode:[{required:!0,message:"请选择活动类型",trigger:"change"}],organIdList:[{type:"array",required:!0,message:"请选择适用分部",trigger:"change"}]}}},mounted:function(){this.__init()},methods:{__init:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t,r,n,a,u,s=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.$refs.form.resetFields(),e.next=3,Object(o["q"])();case 3:return t=e.sent,e.next=6,Object(o["c"])({delFlag:0,rows:9999});case 6:if(r=e.sent,200==t.code&&(this.useBranchId=t.data),200==r.code&&r.data.rows.forEach(function(e){var t={};t=-1!=s.useBranchId.indexOf(e.id)?{label:e.name,value:e.id,disabled:!0}:{label:e.name,value:e.id},s.branchList.push(t)}),"update"!=this.pageType){e.next=14;break}return e.next=12,Object(i["f"])({id:this.id});case 12:n=e.sent,200==n.code&&(a=n.data,u=[],a.organIdList&&a.organIdList.split(",").forEach(function(e){u.push(parseInt(e))}),this.result={id:a.id,name:a.name,rewardMode:a.rewardMode,organIdList:u,courseScheduleType:a.courseScheduleType,domains:a.rewardsRulesJson?JSON.parse(a.rewardsRulesJson):[{min:null,max:null,money:null,disabled:!1,key:Date.now()}],errorText:null},this.branchList.forEach(function(e){-1!=u.indexOf(e.value)&&(e.disabled=!1)}));case 14:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),onSubmit:function(e){var t=this;this.$refs[e].validate(function(e){var r=t.result;if(t.addDomain(r,!0),!e||r.errorText)return!1;var n={organIdList:r.organIdList.join(","),courseScheduleType:r.courseScheduleType,rewardMode:r.rewardMode,rewardsRulesJson:JSON.stringify(r.domains),name:r.name};"update"==t.pageType?(n.id=r.id,Object(i["g"])(n).then(function(e){t.messageTips("修改",e)})):"create"==t.pageType&&Object(i["e"])(n).then(function(e){t.messageTips("添加",e)})})},messageTips:function(e,t){200==t.code?(this.$message.success("修改成功"),this.$router.push({path:"/vipClassSet/branchActive",query:{rules:this.pageInfo}})):this.$message.error(t.msg)},onCancel:function(){this.$router.push({path:"/vipClassSet/branchActive",query:{rules:this.pageInfo}})},resetForm:function(){this.result={name:null,rewardMode:null,organIdList:[],courseScheduleType:"VIP",domains:[{min:null,max:null,money:null,disabled:!1,key:Date.now()}],errorText:null},this.$refs.form.resetFields()},removeDomain:function(e,t){var r=e.domains.indexOf(t);-1!==r&&(e.domains.splice(r,1),e.domains[e.domains.length-1].disabled=!1,e.errorText=null)},addDomain:function(e,t){var r=e.domains,n=r.length,a=r[n-1];a.min?n<=1&&parseInt(a.min)<0?e.errorText="最小值不能小于0":n>1&&parseInt(a.min)<=parseInt(r[n-2].max)?e.errorText="最小值不能小于或等于上一个梯度的最大值":parseInt(a.max)?parseInt(a.max)<=parseInt(a.min)?e.errorText="最大值应大于该梯度的最小值":(e.errorText=null,t||(a.disabled=!0,r.push({min:null,max:null,disabled:!1,key:Date.now()}))):e.errorText="最大值不能为空":e.errorText="最小值不能为空"}}},d=s,c=(r("e7a6"),r("2877")),l=Object(c["a"])(d,n,a,!1,null,"61fcc3d1",null);t["default"]=l.exports},d349:function(e,t,r){"use strict";r.d(t,"c",function(){return i}),r.d(t,"b",function(){return s}),r.d(t,"d",function(){return d}),r.d(t,"a",function(){return c}),r.d(t,"m",function(){return l}),r.d(t,"r",function(){return m}),r.d(t,"s",function(){return f}),r.d(t,"f",function(){return p}),r.d(t,"k",function(){return h}),r.d(t,"e",function(){return g}),r.d(t,"l",function(){return b}),r.d(t,"p",function(){return y}),r.d(t,"n",function(){return O}),r.d(t,"o",function(){return v}),r.d(t,"q",function(){return j}),r.d(t,"h",function(){return w}),r.d(t,"i",function(){return x}),r.d(t,"j",function(){return T}),r.d(t,"g",function(){return _});var n=r("b775"),a=r("4328"),u=r.n(a),o="/api-web";function i(e){return Object(n["a"])({url:o+"/organization/queryPage",method:"get",params:e})}function s(e){return Object(n["a"])({url:o+"/organization/add",method:"post",data:u.a.stringify(e)})}function d(e){return Object(n["a"])({url:o+"/organization/update",method:"post",data:u.a.stringify(e)})}function c(e){return Object(n["a"])({url:o+"/area/queryChild",method:"get",params:e})}function l(e){return Object(n["a"])({url:o+"/area/getParentArea/".concat(e.id),method:"get"})}function m(e){return Object(n["a"])({url:o+"/subject/queryPageTree",method:"get",params:e})}function f(e){return Object(n["a"])({url:o+"/subject/upset",method:"post",data:e})}function p(e){return Object(n["a"])({url:o+"/chargeType/queryPage",method:"get",params:e})}function h(e){return Object(n["a"])({url:o+"/chargeType/upSet",method:"post",data:e})}function g(e){return Object(n["a"])({url:o+"/chargeType/del/".concat(e),method:"post"})}function b(e){return Object(n["a"])({url:o+"/courseHomeworkTemplate/queryPage",method:"post",data:e})}function y(e){return Object(n["a"])({url:o+"/courseHomeworkTemplate/update",method:"post",data:u.a.stringify(e)})}function O(e){return Object(n["a"])({url:o+"/courseHomeworkTemplate/add",method:"post",data:u.a.stringify(e)})}function v(e){return Object(n["a"])({url:o+"/courseHomeworkTemplate/del/".concat(e),method:"post"})}function j(e){return Object(n["a"])({url:o+"/courseScheduleRewards/queryOrganIdList",method:"get",params:e})}function w(e){return Object(n["a"])({url:o+"/chargeTypeOrganizationFee/add",method:"post",data:u.a.stringify(e)})}function x(e){return Object(n["a"])({url:o+"/chargeTypeOrganizationFee/delete",method:"post",data:u.a.stringify(e)})}function T(e){return Object(n["a"])({url:o+"/chargeTypeOrganizationFee/update",method:"post",data:u.a.stringify(e)})}function _(e){return Object(n["a"])({url:o+"/chargeTypeOrganizationFee/queryPage",method:"get",params:e})}},e7a6:function(e,t,r){"use strict";var n=r("1c99"),a=r.n(n);a.a}}]);