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
15 KiB
1 line
15 KiB
5 months ago
|
webpackJsonp([109],{MXN5:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("mvHQ"),s=a.n(r),i=a("Xxa5"),o=a.n(i),n=a("exGp"),l=a.n(n),c=a("Dd8w"),m=a.n(c),p=a("NYxO"),u=a("PJh5"),d=a.n(u),h={data:function(){var t=this;return{userInfo:{},loading:!1,addText:{0:{type:"info",text:"用户"},1:{type:"",text:"平台"}},statusText:{1:{type:"info",text:"审核中"},2:{type:"",text:"已通过"},3:{type:"danger",text:"已驳回"}},pickerOptions:{disabledDate:function(t){return t.getTime()>1e3*(d()(d()(Date.now()).format("YYYY-MM-DD")).unix()+86400-1)}},searchForm:{page:1,limit:10,check_status:0,type:2,start_time:"",end_time:"",name:""},tableData:[],total:0,count:{},showApply:!1,applyForm:{title:"",status:"",check_text:""},subForm:{id:0,status:0,check_text:""},subFormRules:{status:{required:!0,validator:function(e,a,r){t.subForm.check_status?r():r(new Error("请选择审核结果"))},trigger:"blur"}}}},created:function(){this.userInfo=JSON.parse(window.localStorage.getItem("massage_userInfo")),this.getTableDataList(1)},computed:m()({},Object(p.d)({routesItem:function(t){return t.routes}})),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()(o.a.mark(function a(){return o.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:e.searchForm.check_status=t,e.getTableDataList(1);case 2:case"end":return a.stop()}},a,e)}))()},getTableDataList:function(t){var e=this;return l()(o.a.mark(function a(){var r,i,n,l,c,m,p,u,d,h;return o.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t&&(e.searchForm.page=1),e.tableData=[],e.loading=!0,r=JSON.parse(s()(e.searchForm)),(i=r.start_time)&&i.length>0?(r.start_time=i[0]/1e3,r.end_time=i[1]/1e3):(r.start_time="",r.end_time=""),a.next=8,e.$api.service.serviceList(r);case 8:if(n=a.sent,l=n.code,c=n.data,e.loading=!1,200===l){a.next=14;break}return a.abrupt("return");case 14:m=c.all,p=c.nopass,u=c.ing,d=c.pass,h=c.total,e.tableData=c.data,e.total=h,e.count={all:m,nopass:p,ing:u,pass:d};case 18: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()(o.a.mark(function a(){var r,s,i;return o.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t.$api.service.serviceInfo({id:e});case 2:if(r=a.sent,s=r.code,i=r.data,200===s){a.next=7;break}return a.abrupt("return");case 7:["imgs"].map(function(t){i[t]=i[t].length>0?i[t].map(function(t){return{url:t}}):[]}),t.applyForm=i,t.subForm={id:e,check_status:2,check_text:""},t.showApply=!t.showApply;case 12: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(1,t,e)}).catch(function(){})},updateItem:function(t,e,a){var r=this;return l()(o.a.mark(function s(){var i;return o.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:i=1===t?{id:e,status:a}:{id:e,recommend:a},r.$api.service.serviceUpdate(i).then(function(t){if(200===t.code)r.$message.success(r.$t(-1===a?"tips.successDel":"tips.successOper")),-1===a&&(r.searchForm.page=r.searchForm.page<Math.ceil((r.total-1)/r.searchForm.limit)?r.searchForm.page:Math.ceil((r.total-1)/r.searchForm.limit)),r.getTableDataList();else{if(-1===a)return;r.getTableDataList()}});case 2:case"end":return s.stop()}},s,r)}))()},submitForm:function(){var t=this;this.$refs.subForm.validate(function(e){if(e){var a=JSON.parse(s()(t.subForm));t.$api.service.checkStoreGoods(a).then(function(e){200===e.code&&(t.$message.success(t.$t("tips.successSub")),t.showApply=!1,t.getTableDataList())})}})},confirmedit:function(t){var e=JSON.parse(s()(t));0===e.admin_id&&(e.admin_id=""),this.editInfo=e,this.franchiseeDialog=!0},
|