1 |
- webpackJsonp([29,70],{"1VMp":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("mvHQ"),l=i.n(a),s={model:{prop:"arr",event:"updateArr"},props:{arr:{type:Array,default:function(){return[]}},title:{type:String,default:""}},name:"integralTypes",data:function(){return{list:[]}},watch:{arr:function(t){this.list=JSON.parse(l()(t))}},methods:{go:function(){this.$emit("updateArr",this.list)}},created:function(){this.list=JSON.parse(l()(this.arr))}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.list.length>0?i("van-cell-group",[t.title?i("div",{staticClass:"tip",attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.title))]):t._e(),t._v(" "),t._l(t.list,function(e,a){return i("van-field",{key:a,attrs:{required:"",label:e.name,type:"digit",placeholder:"请输入"+e.name},on:{input:t.go},model:{value:e.point,callback:function(i){t.$set(e,"point",i)},expression:"item.point"}})})],2):t._e()],1)},staticRenderFns:[]};var n=i("VU/8")(s,o,!1,function(t){i("tO+a")},"data-v-5f8bd604",null);e.default=n.exports},AoV0:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("vLgD"),l=i("EUN7"),s=i("1VMp"),o=i("EdRh"),n={data:function(){return{role_id:0,show_point_limit_popup:!1,bar_height:0,setting1_show:!1,setting2_show:!1,title:"管理者权限",setting_title:"积分权限",showHelp:!1,limit_list:{deduct_task_monthly:[],point_limit:[],reward_task_monthly:[],employee_id:this.$route.query.id,reward_ratio:"",exec_count:"",exec_count_point:"",reward_ratio_point:"",entry_limit:""},user_info:null,getPerson:[],getscope:[],roles:[],mangerId:[],point_types:this.$store.getters.point_types,listid:[],first_load:!0,value:1,limit_list_copy:null,employee_not_select:[],employee_map:JSON.parse(localStorage.getItem("SET_EMPLOYEE_MAP"))}},watch:{getscope:function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].id);this.listid=e,this.first_load||this.ScopeGet(),this.first_load=!1}},components:{EmployeeSelectorCell:l.a,integralTypes:s.default,userImage:o.a},methods:{del:function(){var t=this;this.$dialog.confirm({title:"删除管理者",message:"确定要删除当前管理者吗?"}).then(function(){t.$toast.loading({mask:!0,message:"处理中..."}),a.a.delete("/api/role/user",{data:{role_id:t.role_id,employee_id:t.$route.query.id}}).then(function(e){t.$toast.clear(),1==e.data.code?(t.$toast.success("删除成功"),setTimeout(function(){t.$route_back()},300)):t.$toast(e.data.msg)})}).catch(function(){})},showLoading:function(){this.$toast.loading({loadingType:"spinner",message:"正在处理"})},get_power_list:function(){var t=this;t.showLoading(),a.a.get("/api/integral/employee/limit",{params:{employee_id:t.$route.query.id}}).then(function(e){if("1"==e.data.code){if(0==e.data.data.point_limit.length){for(var i in t.point_types)"BF"!=t.point_types[i].code&&"AF"!=t.point_types[i].code||e.data.data.point_limit.push({name:t.point_types[i].name+"权限",pt_id:t.point_types[i].id,point:0});t.limit_list.point_limit=e.data.data.point_limit}else{var a=e.data.data.point_limit;for(var l in a)2!==a[l].pt_id&&3!==a[l].pt_id||t.limit_list.point_limit.push(a[l])}if(0==e.data.data.deduct_task_monthly.length){for(var s in t.point_types)"BF"==t.point_types[s].code&&e.data.data.deduct_task_monthly.push({name:"月扣分任务",pt_id:t.point_types[s].id,point:0});t.limit_list.deduct_task_monthly=e.data.data.deduct_task_monthly}else for(var o in e.data.data.deduct_task_monthly)3===e.data.data.deduct_task_monthly[o].pt_id&&t.limit_list.deduct_task_monthly.push({name:"月扣分任务",pt_id:e.data.data.deduct_task_monthly[o].pt_id,point:e.data.data.deduct_task_monthly[o].point});if(0==e.data.data.reward_task_monthly.length){for(var n in t.point_types)"BF"==t.point_types[n].code&&e.data.data.reward_task_monthly.push({name:"月奖分任务",pt_id:t.point_types[n].id,point:0});t.limit_list.reward_task_monthly=e.data.data.reward_task_monthly}else for(var r in e.data.data.reward_task_monthly)3===e.data.data.reward_task_monthly[r].pt_id&&t.limit_list.reward_task_monthly.push({name:"月奖分任务",pt_id:e.data.data.reward_task_monthly[r].pt_id,point:e.data.data.reward_task_monthly[r].point});t.limit_list.reward_ratio=e.data.data.reward_ratio,t.limit_list.exec_count=e.data.data.exec_count,t.limit_list.exec_count_point=e.data.data.exec_count_point,t.limit_list.reward_ratio_point=e.data.data.reward_ratio_point,t.limit_list.entry_limit=e.data.data.entry_limit}else t.$toast(e.data.msg)}).catch(function(e){t.$toast(e)})},ScopeGet:function(){var t=this;t.showLoading();var e={employee_id:t.$route.query.id,id:t.listid};Object(a.a)({url:"/api/employee/scope",method:"post",data:e}).then(function(e){t.$toast.clear(),1==e.data.code?t.$toast("保存成功"):t.$toast(e.data.msg)}).catch(function(e){t.$toast.clear(),t.$toast(e.data.msg)})},save_data:function(){var t=this;t.$validator.validate().then(function(e){if(e){if(""===t.limit_list.deduct_task_monthly[0].point)return t.$notify({type:"danger",message:"月扣分任务不能为空"}),!1;if(""===t.limit_list.point_limit[0].point)return t.$notify({type:"danger",message:"A分不能为空"}),!1;if(""===t.limit_list.point_limit[1].point)return t.$notify({type:"danger",message:"B分不能为空"}),!1;if(""===t.limit_list.reward_task_monthly[0].point)return t.$notify({type:"danger",message:"月奖分任务不能为空"}),!1;if(0!==parseInt(t.limit_list.entry_limit)&&(t.setting2_show||t.setting1_show))for(var i=0;i<t.limit_list.point_limit.length;i++)if(t.limit_list.point_limit[i].point>t.limit_list.entry_limit)return t.$notify({type:"danger",message:"月奖分上限不能低于AB分"}),!1;t.showLoading(),t.limit_list.employee_id=t.$route.query.id,Object(a.a)({url:"/api/integral/employee/limit",method:"post",data:t.limit_list}).then(function(e){t.$toast.clear(),1==e.data.code?(t.$toast.success("保存成功"),t.show_point_limit_popup=!1):t.$toast(e.data.msg)}).catch(function(e){t.$toast.clear(),t.$toast(e)})}else t.$notify({type:"danger",message:t.$validator.errors.items[0].msg})})},get_employee_info:function(t){var e=this;e.showLoading();var i=function(t){e.employee_map[t].role_list.forEach(function(i){"creator"==i.name&&e.employee_not_select.push(e.employee_map[t].id)})};for(var l in e.employee_map)i(l);a.a.get("/api/employee/info",{params:{id:t}}).then(function(t){1==t.data.code&&(e.getscope=t.data.data.employee_detail.manage_scope,e.roles=t.data.data.employee_detail.role_list,e.getPerson=[{name:t.data.data.name,id:t.data.data.id,img_url:t.data.data.img_url}],e.user_info=t.data.data,e.employee_not_select.push(t.data.data.id)),e.$toast.clear()}).catch(function(t){})},open_ponit_power:function(t){1==t?(this.setting1_show=!0,this.setting2_show=!1,this.setting_title="奖扣目标"):2==t&&(this.setting_title="积分权限",this.setting1_show=!1,this.setting2_show=!0),this.limit_list_copy=this.limit_list,this.show_point_limit_popup=!0},set_ponit_power_close:function(){this.show_point_limit_popup=!1}},mounted:function(){this.get_power_list(),this.get_employee_info(this.$route.query.id),this.role_id=this.$route.query.role_id,window.plus&&(this.bar_height=window.plus.navigator.getStatusbarHeight())}},r={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"edit_user_power_box"},[i("van-nav-bar",{attrs:{title:t.title,"left-text":"返回","left-arrow":""},on:{"click-left":t.$route_back}}),t._v(" "),i("div",{staticClass:"body_com has_header"},[i("scroller",[null!=t.user_info?i("div",{staticClass:"head-box"},[i("userImage",{attrs:{id:t.user_info.id,img_url:t.user_info.img_url,user_name:t.user_info.name,width:"1.5rem",height:"1.5rem"}}),t._v(" "),i("div",{staticClass:"employee-name"},[t._v(t._s(t.user_info.name))]),t._v(" "),i("div",{staticClass:"role-list"},t._l(t.roles,function(e,a){return e.id==t.role_id?i("van-tag",{key:a,attrs:{size:"medium",plain:"",type:"warning"}},[t._v(t._s(e.remark))]):t._e()}),1)],1):t._e(),t._v(" "),i("van-cell-group",{staticClass:"manager_box"},[i("div",{attrs:{title:"什么是管理范围,请提供文案"}}),t._v(" "),i("EmployeeSelectorCell",{attrs:{title:"管理范围",employee_not_select:t.employee_not_select,can_select_employee:!0},model:{value:t.getscope,callback:function(e){t.getscope=e},expression:"getscope"}})],1),t._v(" "),i("van-cell-group",{staticClass:"manager_box"},[i("div",{attrs:{title:"什么是积分权限,请提供文案"}}),t._v(" "),i("van-cell",{attrs:{title:"积分权限","is-link":""},on:{click:function(e){return t.open_ponit_power(2)}}})],1),t._v(" "),i("van-cell-group",{staticClass:"manager_box"},[i("div",{attrs:{title:"什么是奖扣目标,请提供文案"}}),t._v(" "),i("van-cell",{attrs:{title:"奖扣目标","is-link":""},on:{click:function(e){return t.open_ponit_power(1)}}})],1),t._v(" "),i("div",{staticStyle:{padding:"0.32rem"}},[i("van-button",{attrs:{size:"large",type:"danger"},on:{click:t.del}},[t._v("删除")])],1),t._v(" "),i("div",{staticStyle:{height:"1rem"}})],1)],1),t._v(" "),i("van-popup",{staticClass:"popup-help__container",attrs:{position:"right"},model:{value:t.showHelp,callback:function(e){t.showHelp=e},expression:"showHelp"}},[i("div",{style:"padding-top:"+t.bar_height+"px;background-color: #26A2FF;"}),t._v(" "),i("van-nav-bar",{attrs:{title:"帮助","left-text":"返回","left-arrow":""},on:{"click-left":function(e){t.showHelp=!1}}}),t._v(" "),i("van-cell-group",{attrs:{border:!1}},[i("div",{staticClass:"help-desc__content"},[i("span",[t._v("奖扣任务的说明")])]),t._v(" "),i("div",{staticClass:"help-sub__content"},[i("span",[t._v("奖扣分权限为了让管理者更好地行使好管理的职权,我们通常会给予他们奖扣分的权利。针对不同的管理岗位,可赋予每个管理者不同的奖扣分权限奖扣分权限不足的将自动递交给其上级审核。")])]),t._v(" "),i("div",{staticClass:"help-desc__content"},[i("span",[t._v("B分月奖扣任务")])]),t._v(" "),i("div",{staticClass:"help-sub__content"},[i("span",[t._v("积分是否能落地,奖扣分的执行最为关键。赋予一定的人员奖扣分任务,比如经理,主管,积分专员,行政人事等,更利于整个积分制管理的落地和实施。月奖扣任务要求相关人员需按照以下1~3种标准执行")])]),t._v(" "),i("div",{staticClass:"help-item__content"},[i("span",[t._v("1、对奖分和扣分的分值作要求。未达分值任务的按差额扣分举例说明:奖分任务1000,扣分任务100实际奖分980(差20分),实际扣分90(差10分)奖分、扣分任务均属未达成。差额=20+10=30分")])]),t._v(" "),i("div",{staticClass:"help-item__content"},[i("span",[t._v("2、对奖分和扣分的次数作要求。未达次数要求的按标准扣分")])]),t._v(" "),i("div",{staticClass:"help-item__content"},[i("span",[t._v("3、对奖分和扣分的比例作要求。未达奖扣比例要求的按标准扣分")])])])],1),t._v(" "),i("van-popup",{staticStyle:{height:"100%",width:"100%","background-color":"rgb(245, 245, 245)"},attrs:{position:"right"},model:{value:t.show_point_limit_popup,callback:function(e){t.show_point_limit_popup=e},expression:"show_point_limit_popup"}},[i("div",{style:"padding-top:"+t.bar_height+"px;background-color: #26A2FF;"}),t._v(" "),i("van-nav-bar",{attrs:{title:t.setting_title,"left-text":"返回","left-arrow":"","right-text":"保存"},on:{"click-left":t.set_ponit_power_close,"click-right":t.save_data}}),t._v(" "),i("div",{staticClass:"body_com"},[i("scroller",[t.setting1_show?i("integralTypes",{attrs:{title:"积分是否能落地,奖扣分的执行最为关键。"},model:{value:t.limit_list.reward_task_monthly,callback:function(e){t.$set(t.limit_list,"reward_task_monthly",e)},expression:"limit_list.reward_task_monthly"}}):t._e(),t._v(" "),t.setting1_show?i("integralTypes",{staticClass:"reward_point",model:{value:t.limit_list.deduct_task_monthly,callback:function(e){t.$set(t.limit_list,"deduct_task_monthly",e)},expression:"limit_list.deduct_task_monthly"}}):t._e(),t._v(" "),t.setting1_show?i("van-cell-group",[i("div",{attrs:{slot:"title"},slot:"title"},[t._v("对奖分和扣分的执行次数作任务要求")]),t._v(" "),i("van-field",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],attrs:{label:"月奖扣次数",name:"月奖扣次数",type:"Number",required:"",placeholder:"输入数值"},model:{value:t.limit_list.exec_count,callback:function(e){t.$set(t.limit_list,"exec_count",e)},expression:"limit_list.exec_count"}}),t._v(" "),i("van-field",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],attrs:{label:"每少一次扣",name:"每少一次扣分",type:"Number",required:"",placeholder:"输入数值"},model:{value:t.limit_list.exec_count_point,callback:function(e){t.$set(t.limit_list,"exec_count_point",e)},expression:"limit_list.exec_count_point"}})],1):t._e(),t._v(" "),t.setting1_show?i("van-cell-group",[i("div",{attrs:{slot:"title"},slot:"title"},[t._v("对奖分和扣分的比例作任务要求")]),t._v(" "),i("van-field",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],attrs:{label:"月奖扣比例",name:"月奖扣比例",type:"Number",required:"","input-align":"center",placeholder:"奖分比例"},model:{value:t.limit_list.reward_ratio,callback:function(e){t.$set(t.limit_list,"reward_ratio",e)},expression:"limit_list.reward_ratio"}},[i("template",{slot:"button"},[i("van-field",{staticClass:"deduction_input",attrs:{"input-align":"center",disabled:"",placeholder:"扣分比例"},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1),t._v(" "),i("template",{slot:"right-icon"},[i("span",{staticStyle:{padding:"0 0.3rem"}},[t._v(":")])])],2)],1):t._e(),t._v(" "),t.setting1_show?i("div",{staticClass:"cell_title"},[t._v("奖扣次数每少一次自动扣管理者积分")]):t._e(),t._v(" "),t.setting1_show?i("van-cell-group",[i("div",{attrs:{slot:"title"},slot:"title"},[t._v("以上数据将作为每月奖扣目标,若不达标,将自动扣管理者积分")]),t._v(" "),i("van-field",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],attrs:{label:"不达标扣",name:"不达标扣分",required:"",type:"Number",placeholder:"输入数值"},model:{value:t.limit_list.reward_ratio_point,callback:function(e){t.$set(t.limit_list,"reward_ratio_point",e)},expression:"limit_list.reward_ratio_point"}})],1):t._e(),t._v(" "),t.setting2_show?i("integralTypes",{attrs:{title:"针对不同的管理岗位,可赋予每个管理者不同的奖扣积分权限"},model:{value:t.limit_list.point_limit,callback:function(e){t.$set(t.limit_list,"point_limit",e)},expression:"limit_list.point_limit"}}):t._e(),t._v(" "),t.setting2_show?i("van-cell-group",[i("div",{attrs:{slot:"title"},slot:"title"},[t._v("限制奖励出去的B分不超过设置的上限,当达到上限时,将不能继续奖扣B分(不限制审批操作)")]),t._v(" "),i("van-field",{attrs:{label:"月奖分上限",type:"digit",placeholder:"输入数值"},model:{value:t.limit_list.entry_limit,callback:function(e){t.$set(t.limit_list,"entry_limit",e)},expression:"limit_list.entry_limit"}})],1):t._e(),t._v(" "),i("div",{staticStyle:{height:"1rem"}})],1)],1)],1)],1)},staticRenderFns:[]};var _=i("VU/8")(n,r,!1,function(t){i("ND++")},"data-v-1281495d",null);e.default=_.exports},"ND++":function(t,e){},"tO+a":function(t,e){}});
|