webpackJsonp([102],{"4lsv":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("mvHQ"),r=a.n(s),i=a("Xxa5"),n=a.n(i),o=a("exGp"),l=a.n(o),m={data:function(){var t=this;return{loading:!1,statusText:{1:{type:"info",text:"申请中"},2:{type:"",text:"已授权"},3:{type:"danger",text:"取消授权"},4:{type:"danger",text:"已驳回"}},pickerOptions:{disabledDate:function(t){return t.getTime()>Date.now()}},searchForm:{page:1,limit:10,status:0,start_time:"",end_time:"",name:""},tableData:[],total:0,count:{},showApply:!1,applyForm:{title:"",status:"",sh_text:""},subForm:{id:0,status:0,sh_text:""},subFormRules:{status:{required:!0,validator:function(e,a,s){t.subForm.status?s():s(new Error("请选择审核结果"))},trigger:"blur"}}}},created:function(){this.getTableDataList(1)},methods:{resetForm:function(t){this.$refs[t].resetFields(),this.getTableDataList(1)},handleSizeChange:function(t){this.searchForm.limit=t,this.handleCurrentChange(1)},handleCurrentChange:function(t){this.searchForm.page=t,this.getTableDataList()},toChange:function(t){var e=this;return l()(n.a.mark(function a(){return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:e.searchForm.status=t,e.getTableDataList(1);case 2:case"end":return a.stop()}},a,e)}))()},getTableDataList:function(t){var e=this;return l()(n.a.mark(function a(){var s,i,o,l,m,u,c,p,h,v;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t&&(e.searchForm.page=1),e.loading=!0,s=JSON.parse(r()(e.searchForm)),(i=s.start_time)&&i.length>0?(s.start_time=parseInt(i[0]/1e3),s.end_time=parseInt(i[1]/1e3)+86400-1):(s.start_time="",s.end_time=""),a.next=7,e.$api.distribution.resellerList(s);case 7:if(o=a.sent,l=o.code,m=o.data,e.loading=!1,200===l){a.next=13;break}return a.abrupt("return");case 13:u=m.all,c=m.nopass,p=m.ing,h=m.pass,v=m.total,e.tableData=m.data,e.total=v,e.count={all:u,nopass:c,ing:p,pass:h};case 17:case"end":return a.stop()}},a,e)}))()},toShowApply:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return l()(n.a.mark(function a(){var s,r,i;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t.$api.distribution.resellerInfo({id:e});case 2:if(s=a.sent,r=s.code,i=s.data,200===r){a.next=7;break}return a.abrupt("return");case 7:t.applyForm=i,t.subForm={id:e,status:2,sh_text:""},t.showApply=!t.showApply;case 10:case"end":return a.stop()}},a,t)}))()},confirmDel:function(t,e){var a=this;this.$confirm(this.$t(3===e?"tips.confirmNoPass":"tips.confirmDelete"),this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){a.updateItem(t,e)}).catch(function(){})},updateItem:function(t,e){var a=this;return l()(n.a.mark(function s(){return n.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:a.$api.distribution.resellerUpdate({id:t,status:e}).then(function(t){if(200===t.code)a.$message.success(a.$t(-1===e?"tips.successDel":"tips.successOper")),-1===e&&(a.searchForm.page=a.searchForm.page