You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
14 KiB
1 lines
14 KiB
webpackJsonp([50],{RTBx:function(t,e){},bzf8:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("mvHQ"),i=a.n(n),l=a("Xxa5"),r=a.n(l),s=a("exGp"),o=a.n(s),c=a("PJh5"),u=a.n(c),m={components:{},data:function(){return{loading:!1,storeList:[],searchForm:{page:1,limit:10},tableData:[],total:0,cycleList:[{id:0,title:"不限"},{id:1,title:"每周"},{id:5,title:"每半月"},{id:2,title:"每月"},{id:3,title:"每季度"},{id:4,title:"每年"}],showDialog:{sub:!1,setting:!1},subForm:{id:"",title:"",time_long:"",online_time:"",balance:"",price:"",add_balance:"",integral:""},subFormRules:{title:{required:!0,validator:this.$reg.isNotNull,text:this.$t("action.attendantName")+"等级",reg_type:2,trigger:"blur"},time_long:{required:!0,validator:this.$reg.isNum,text:"服务时长",reg_type:2,trigger:"blur"},online_time:{required:!0,validator:this.$reg.isNum,text:"在线时长",reg_type:2,trigger:"blur"},balance:{required:!0,validator:this.$reg.isPercent,trigger:"blur"},add_balance:{required:!0,validator:this.$reg.isPercent,trigger:"blur"},price:{required:!0,validator:this.$reg.isMoney,text:"最低业绩",reg_type:2,trigger:"blur"},integral:{required:!0,validator:this.$reg.isNum,text:"积分",trigger:"blur"}},settingForm:{level_cycle:0}}},created:function(){var t=this;return o()(r.a.mark(function e(){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.getTableDataList();case 1:case"end":return e.stop()}},e,t)}))()},methods:{handleSizeChange:function(t){this.searchForm.limit=t,this.handleCurrentChange(1)},handleCurrentChange:function(t){this.searchForm.page=t,this.getTableDataList()},getTableDataList:function(t){var e=this;t&&(this.searchForm.page=1),this.loading=!0,this.$api.technician.levelList(this.searchForm).then(function(t){e.loading=!1,200===t.code&&(e.tableData=t.data.data,e.total=t.data.total)})},confirmDel:function(t){var e=this;this.$confirm(this.$t("tips.confirmDelete"),this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){e.updateItem(t,-1)})},updateItem:function(t,e){var a=this;return o()(r.a.mark(function n(){return r.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:a.$api.technician.levelUpdate({id:t,status:e}).then(function(t){if(200===t.code){if(a.$message.success(a.$t(-1===e?"tips.successDel":"tips.successOper")),-1!==e)return;a.searchForm.page=a.searchForm.page<Math.ceil((a.total-1)/a.searchForm.limit)?a.searchForm.page:Math.ceil((a.total-1)/a.searchForm.limit),a.getTableDataList()}else{if(-1===e)return;a.getTableDataList()}});case 1:case"end":return n.stop()}},n,a)}))()},toShowDialog:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o()(r.a.mark(function n(){var i,l,s;return r.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if("setting"!==t){n.next=6;break}return n.next=3,e.$api.system.configInfo();case 3:i=n.sent,l=i.data,a.level_cycle=l.level_cycle;case 6:for(s in e[t+"Form"])e[t+"Form"][s]=a[s];e.showDialog[t]=!e.showDialog[t];case 8:case"end":return n.stop()}},n,e)}))()},submitFormInfo:function(t){var e=this;return o()(r.a.mark(function a(){var n,l,s,o,c;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(n=!0,e.$refs[t+"Form"].validate(function(t){t||(n=!1)}),!n){a.next=17;break}return l=JSON.parse(i()(e[t+"Form"])),s="setting"===t?"system":"technician",o="setting"===t?"configUpdate":l.id?"levelUpdate":"levelAdd",a.next=8,e.$api[s][o](l);case 8:if(c=a.sent,200===c.code){a.next=12;break}return a.abrupt("return");case 12:if(e.$message.success(e.$t("setting"!==t&&l.id?"tips.successRev":"tips.successSub")),e.showDialog[t]=!1,"setting"!==t){a.next=16;break}return a.abrupt("return");case 16:e.getTableDataList();case 17:case"end":return a.stop()}},a,e)}))()}},filters:{handleTime:function(t,e){return 1===e?u()(1e3*t).format("YYYY-MM-DD"):2===e?u()(1e3*t).format("HH:mm:ss"):u()(1e3*t).format("YYYY-MM-DD HH:mm:ss")}}},d={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"lb-appclass-classroom-list"},[a("top-nav"),t._v(" "),a("div",{staticClass:"page-main"},[a("lb-tips",[t._v("服务累计时长:输入分钟数后,系统会自动计算区间;例如:\n "),a("div",{staticClass:"mt-md"},[t._v("\n 第一次新增的"+t._s(t.$t("action.attendantName"))+"等级输入的分钟数为100,则显示的服务累计时长为:0至100分钟\n ")]),t._v(" "),a("div",{staticClass:"mt-sm"},[t._v("\n 第二次新增的"+t._s(t.$t("action.attendantName"))+"等级输入的分钟数为200,则显示的服务累计时长为:100至200分钟\n ")]),t._v(" "),a("div",{staticClass:"mt-lg"},[t._v("\n "+t._s(t.$t("action.attendantName"))+"在本周期(T周期)折算之后,等级提成将会在T+1个周期生效,即"+t._s(t.$t("action.attendantName"))+"这个月的维度考核达标后,可升等级,第二个周期按照新升级的等级计算\n ")])]),t._v(" "),a("el-row",{staticClass:"page-top-operate"},[a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:t.$route.name+"-add",expression:"`${$route.name}-add`"}],attrs:{size:"medium",type:"primary",icon:"el-icon-plus"},on:{click:function(e){return t.toShowDialog("sub")}}},[t._v(t._s(t.$t("menu.TechnicianLevelAdd")))]),t._v(" "),a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:t.$route.name+"-setCycle",expression:"`${$route.name}-setCycle`"}],attrs:{size:"medium",type:"danger",icon:"el-icon-setting"},on:{click:function(e){return t.toShowDialog("setting")}}},[t._v(t._s(t.$t("action.setCycle")))])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,"header-cell-style":{background:"#f5f7fa",color:"#606266"},"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"top",label:"等级排序",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s("V"+e.row.top)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"title",label:t.$t("action.attendantName")+"等级","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"time_long",label:"服务时长","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("p",[t._v(t._s(e.row.lower+"至"+e.row.time_long)+"分钟")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"online_time",label:"在线时长"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("p",[t._v(t._s(""+e.row.online_time)+"小时")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"最低业绩"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("p",[t._v("¥"+t._s(e.row.price))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"time_long",label:"加钟率"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("p",[t._v(t._s(e.row.add_balance)+"%")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"integral",label:"积分"}}),t._v(" "),a("el-table-column",{attrs:{prop:"balance",label:"提成比例"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("p",[t._v(t._s(e.row.balance)+"%")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("p",[t._v(t._s(t._f("handleTime")(e.row.create_time,1)))]),t._v(" "),a("p",[t._v(t._s(t._f("handleTime")(e.row.create_time,2)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"table-operate"},[a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:t.$route.name+"-edit",expression:"`${$route.name}-edit`"}],attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(a){return t.toShowDialog("sub",e.row)}}},[t._v(t._s(t.$t("action.edit")))]),t._v(" "),a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:t.$route.name+"-delete",expression:"`${$route.name}-delete`"}],attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){return t.confirmDel(e.row.id)}}},[t._v(t._s(t.$t("action.delete")))])],1)]}}])})],1),t._v(" "),a("lb-page",{attrs:{batch:!1,page:t.searchForm.page,pageSize:t.searchForm.limit,total:t.total},on:{handleSizeChange:t.handleSizeChange,handleCurrentChange:t.handleCurrentChange}}),t._v(" "),a("el-dialog",{attrs:{title:t.$t(t.subForm.id?"menu.TechnicianLevelEdit":"menu.TechnicianLevelAdd"),visible:t.showDialog.sub,width:"600px",center:""},on:{"update:visible":function(e){return t.$set(t.showDialog,"sub",e)}}},[a("el-form",{ref:"subForm",staticClass:"dialog-form",attrs:{model:t.subForm,rules:t.subFormRules,"label-width":"140px"}},[a("el-form-item",{attrs:{label:t.$t("action.attendantName")+"等级",prop:"title"}},[a("el-input",{attrs:{maxlength:"5","show-word-limit":"",placeholder:"请输入"+t.$t("action.attendantName")+"等级名称"},model:{value:t.subForm.title,callback:function(e){t.$set(t.subForm,"title",e)},expression:"subForm.title"}}),t._v(" "),a("lb-tool-tips",[t._v(t._s(t.$t("action.attendantName"))+"等级名称唯一性,不可重复")])],1),t._v(" "),a("el-form-item",{attrs:{label:"服务时长",prop:"time_long"}},[a("el-input",{attrs:{placeholder:"输入分钟"},model:{value:t.subForm.time_long,callback:function(e){t.$set(t.subForm,"time_long",e)},expression:"subForm.time_long"}},[a("template",{slot:"append"},[t._v("分钟")])],2),t._v(" "),a("lb-tool-tips",[t._v(t._s(t.$t("action.attendantName"))+"在提成折算周期内的服务时长,输入0则表示不设置该维度的考核")])],1),t._v(" "),a("el-form-item",{attrs:{label:"在线时长",prop:"online_time"}},[a("el-input",{attrs:{placeholder:"输入小时"},model:{value:t.subForm.online_time,callback:function(e){t.$set(t.subForm,"online_time",e)},expression:"subForm.online_time"}},[a("template",{slot:"append"},[t._v("小时")])],2),t._v(" "),a("lb-tool-tips",[t._v(t._s(t.$t("action.attendantName"))+"在提成折算周期内的"+t._s(t.$t("action.attendantName"))+"的在线工作时间,输入0则表示不设置该维度的考核")])],1),t._v(" "),a("el-form-item",{attrs:{label:"最低业绩",prop:"price"}},[a("el-input",{attrs:{placeholder:"输入最低业绩"},model:{value:t.subForm.price,callback:function(e){t.$set(t.subForm,"price",e)},expression:"subForm.price"}},[a("template",{slot:"append"},[t._v("元")])],2),t._v(" "),a("lb-tool-tips",[t._v(t._s(t.$t("action.attendantName"))+"在提成折算周期内的订单实际支付金额总和")])],1),t._v(" "),a("el-form-item",{attrs:{label:"加钟率",prop:"add_balance"}},[a("el-input",{attrs:{placeholder:"输入百分比"},model:{value:t.subForm.add_balance,callback:function(e){t.$set(t.subForm,"add_balance",e)},expression:"subForm.add_balance"}},[a("template",{slot:"append"},[t._v("%")])],2),t._v(" "),a("lb-tool-tips",[t._v(t._s(t.$t("action.attendantName"))+"在提成折算周期内的加钟费用计算\n "),a("div",{staticClass:"mt-sm"},[t._v("\n 加钟金额=最低业绩*加钟率,加钟订单金额大于等于加钟金额即可满足条件\n ")])])],1),t._v(" "),a("el-form-item",{attrs:{label:"积分",prop:"integral"}},[a("el-input",{attrs:{placeholder:"输入积分"},model:{value:t.subForm.integral,callback:function(e){t.$set(t.subForm,"integral",e)},expression:"subForm.integral"}}),t._v(" "),a("lb-tool-tips",[t._v("\n 若储值返佣设置勾选了返积分,则"+t._s(t.$t("action.attendantName"))+"邀请用户充值将获得积分,积分和金额按照1:1比例换算\n "),a("div",{staticClass:"mt-sm"},[t._v("\n 例如:充值1000元,获得积分1000,输入0则表示无要求\n ")])])],1),t._v(" "),a("el-form-item",{attrs:{label:"提成比例",prop:"balance"}},[a("el-input",{attrs:{placeholder:"输入百分比"},model:{value:t.subForm.balance,callback:function(e){t.$set(t.subForm,"balance",e)},expression:"subForm.balance"}},[a("template",{slot:"append"},[t._v("%")])],2),t._v(" "),a("lb-tool-tips",[a("p",{staticClass:"mb-sm"},[t._v("提成比例取值0%到100%")]),t._v("\n 设置比例之后,"+t._s(t.$t("action.attendantName"))+"提成金额=实际金额*设置的百分比")])],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.showDialog.sub=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:function(e){return t.submitFormInfo("sub")}}},[t._v("确 定")])],1)],1),t._v(" "),a("el-dialog",{attrs:{title:"设置折算周期",visible:t.showDialog.setting,width:"600px",center:""},on:{"update:visible":function(e){return t.$set(t.showDialog,"setting",e)}}},[a("lb-tips",[t._v("每周默认是从周一到周日计算来循环\n "),a("div",{staticClass:"mt-sm"},[t._v("\n 每半月是指以每月1号到15号、16号到月末最后一天为周期来循环\n ")]),t._v(" "),a("div",{staticClass:"mt-sm"},[t._v("每月默认是从每月1号到月末的最后一天来循环")]),t._v(" "),a("div",{staticClass:"mt-sm mb-sm"},[t._v("\n 每个季度折算周期是默认1、2、3为一个季度,4、5、6为一个季度,7、8、9为一个季度,10、11、12为一个季度\n ")]),t._v("\n 每年默认一年365天为一个折算周期")]),t._v(" "),a("el-form",{ref:"settingForm",staticClass:"dialog-form",attrs:{model:t.settingForm,rules:t.settingFormRules,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"折算周期",prop:"level_cycle"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.settingForm.level_cycle,callback:function(e){t.$set(t.settingForm,"level_cycle",e)},expression:"settingForm.level_cycle"}},t._l(t.cycleList,function(t){return a("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})}),1)],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.showDialog.setting=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:function(e){return t.submitFormInfo("setting")}}},[t._v("确 定")])],1)],1)],1)],1)},staticRenderFns:[]};var p=a("VU/8")(m,d,!1,function(t){a("RTBx")},"data-v-7114369a",null);e.default=p.exports}}); |