1 |
- webpackJsonp([178],{B7nw:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});l("nI2B");var a=l("qWG/"),i=(l("9l1i"),l("+MQa")),s=(l("mMXg"),l("qYlo")),o=(l("OWWB"),l("1fWZ")),n=(l("i0mo"),l("Hkar")),r=(l("cZ0s"),l("fIxc")),c=(l("RIEG"),l("zjGD")),_=l("vLgD"),m=l("7+uW"),u=l("PJh5"),p=l.n(u);m.a.use(a.a).use(i.a).use(s.a).use(o.a).use(n.a).use(r.a).use(c.a);var d={data:function(){return{title:"录入PK积分",get_id:this.$route.query.pk_id,log_type:this.$route.query.log_type,page:1,pk_detail:[],rules_list:[],select_teams:!1,select_teams_item:{},select_rule:!1,select_rule_item:{},showCalendar:!1,time:p()().format("YYYY-MM-DD"),minDate:new Date(2020,0,1),maxDate:new Date(2055,0,1),currentDate:new Date,select_employee:!1,employee_result:[],employee_list:[],employee_btn:"",employee_result_id:[],point:"",remark:""}},mounted:function(){},components:{},methods:{sava:function(){var e=this,t={pk_id:e.get_id,log_type:e.$route.query.log_type,team_id:e.select_teams_item.id,event_time:e.time,point:e.point,rule_id:e.select_rule_item.id,team_member:e.employee_result_id};e.remark&&(t.remark=e.remark),e.showLoading(),Object(_.a)("post","/api/integral/pk/log",t).then(function(t){1==t.data.code?(e.$toast.clear(),e.$route_back()):(e.$toast.clear(),e.$toast(t.data.msg))}).catch(function(t){e.$toast.clear()})},employee_cancel:function(){this.select_employee=!1},employee_Confirm:function(){var e=[];this.employee_result_id=[],this.employee_btn="";for(var t=0;t<this.employee_result.length;t++)e.push(this.employee_result[t].name),this.employee_result_id.push(this.employee_result[t].id);this.employee_btn=e.join(","),this.select_employee=!1},calendarConfirm:function(e){this.time=p()(e).format("YYYY-MM-DD"),this.showCalendar=!1},onCancel:function(){this.select_teams=!1},ruleCancel:function(){this.select_rule=!1},ruleConfirm:function(e){this.select_rule_item=e,this.select_rule=!1},onConfirm:function(e){this.select_teams_item=e,this.employee_list=e.members,this.select_teams=!1},showLoading:function(){this.$toast.loading({loadingType:"spinner",message:"正在处理"})},get_pk_detail:function(){var e=this;e.showLoading(),Object(_.a)("get","/api/integral/pk/teams",{pk_id:e.get_id,page:e.page,page_size:"2000"}).then(function(t){"1"==t.data.code?e.pk_detail=t.data.data.list.list:e.$toast(t.data.msg)})},get_rules_list:function(){var e=this;e.showLoading(),Object(_.a)("get","/api/integral/pk/rules",{pk_id:e.get_id,page:e.page,page_size:1e3}).then(function(t){"1"==t.data.code?e.rules_list=t.data.data.list.list:e.$toast(t.data.msg)})}},created:function(){this.get_pk_detail(),this.get_rules_list()}},v={render:function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",[l("van-nav-bar",{attrs:{title:e.title,"left-text":"返回","left-arrow":""},on:{"click-left":e.$route_back}}),e._v(" "),l("div",{staticClass:"body_com has_header add_log_box"},[l("scroller",[l("van-cell-group",[l("van-cell",{attrs:{title:"选择团队",required:"","is-link":"",value:e.select_teams_item.name?e.select_teams_item.name:"请选择团队"},on:{click:function(t){e.select_teams=!0}}}),e._v(" "),"employee"==e.log_type?l("van-cell",{attrs:{title:"选择人员",required:"","is-link":"",value:e.employee_btn},on:{click:function(t){e.select_employee=!0}}}):e._e(),e._v(" "),l("van-cell",{attrs:{title:"选择规则",required:"","is-link":"",value:e.select_rule_item.name?e.select_rule_item.name:"请选择规则"},on:{click:function(t){e.select_rule=!0}}}),e._v(" "),l("van-cell",{attrs:{title:"发生时间",required:"","is-link":"",value:e.time},on:{click:function(t){e.showCalendar=!0}}}),e._v(" "),l("van-field",{attrs:{required:"",type:"digit",label:"积分",placeholder:"请输入积分"},model:{value:e.point,callback:function(t){e.point=t},expression:"point"}}),e._v(" "),l("van-field",{directives:[{name:"validate",rawName:"v-validate",value:"mix:3",expression:"'mix:3'"}],attrs:{rows:"3",autosize:"",label:"留言",type:"textarea",maxlength:"50",placeholder:"请输入留言","show-word-limit":""},model:{value:e.remark,callback:function(t){e.remark=t},expression:"remark"}})],1),e._v(" "),l("van-cell-group",[l("van-button",{attrs:{type:"info",block:""},on:{click:e.sava}},[e._v("提交")])],1)],1),e._v(" "),l("van-popup",{attrs:{position:"bottom"},model:{value:e.select_teams,callback:function(t){e.select_teams=t},expression:"select_teams"}},[l("van-picker",{attrs:{"show-toolbar":"",title:"选择团队",columns:e.pk_detail,"value-key":"name"},on:{cancel:e.onCancel,confirm:e.onConfirm}})],1),e._v(" "),l("van-popup",{attrs:{position:"bottom"},model:{value:e.select_rule,callback:function(t){e.select_rule=t},expression:"select_rule"}},[l("van-picker",{attrs:{"show-toolbar":"",title:"选择规则",columns:e.rules_list,"value-key":"name"},on:{cancel:e.ruleCancel,confirm:e.ruleConfirm}})],1),e._v(" "),l("van-calendar",{attrs:{color:"#238dfa"},on:{confirm:e.calendarConfirm},model:{value:e.showCalendar,callback:function(t){e.showCalendar=t},expression:"showCalendar"}}),e._v(" "),l("van-popup",{staticClass:"employee_popup",model:{value:e.select_employee,callback:function(t){e.select_employee=t},expression:"select_employee"}},[l("div",{staticStyle:{height:"20px","background-color":"#26A2FF"}}),e._v(" "),l("van-nav-bar",{attrs:{title:"选择员工","left-text":"取消","right-text":"完成"},on:{"click-left":e.employee_cancel,"click-right":e.employee_Confirm}}),e._v(" "),l("van-checkbox-group",{ref:"checkboxGroup",attrs:{max:10,"label-disabled":!1},model:{value:e.employee_result,callback:function(t){e.employee_result=t},expression:"employee_result"}},[l("van-cell-group",e._l(e.employee_list,function(t,a){return l("van-cell",{key:a,attrs:{clickable:"",title:t.name}},[l("van-checkbox",{ref:"checkboxes",refInFor:!0,attrs:{slot:"icon",name:t},slot:"icon"}),e._v(" "),l("template",{slot:"title"},[l("img",{staticClass:"employee_img",attrs:{src:"static/images/join_review.jpg",alt:""}}),e._v(" "),l("span",{staticClass:"employee_name"},[e._v(e._s(t.name))])])],2)}),1)],1)],1)],1)],1)},staticRenderFns:[]};var f=l("VU/8")(d,v,!1,function(e){l("bpy8")},"data-v-22ba17b0",null);t.default=f.exports},bpy8:function(e,t){}});
|