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 line
14 KiB
1 line
14 KiB
2 months ago
|
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-ap
|