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
13 KiB
1 line
13 KiB
2 months ago
|
webpackJsonp([31],{"3mzJ":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("mvHQ"),r=a.n(s),n=a("Xxa5"),i=a.n(n),o=a("exGp"),l=a.n(o),c=a("PJh5"),u=a.n(c),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()>1e3*(u()(u()(Date.now()).format("YYYY-MM-DD")).unix()+86400-1)}},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()(i.a.mark(function a(){return i.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()(i.a.mark(function a(){var s,n,o,l,c,u,m,p,h,v;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t&&(e.searchForm.page=1),e.tableData=[],e.loading=!0,s=JSON.parse(r()(e.searchForm)),(n=s.start_time)&&n.length>0?(s.start_time=n[0]/1e3,s.end_time=n[1]/1e3):(s.start_time="",s.end_time=""),a.next=8,e.$api.channel.channelList(s);case 8:if(o=a.sent,l=o.code,c=o.data,e.loading=!1,200===l){a.next=14;break}return a.abrupt("return");case 14:c.data.map(function(t){var e=t.text||"该用户没有填写备注";t.text=e.replace(/\n/g,"<br>")}),u=c.all,m=c.nopass,p=c.ing,h=c.pass,v=c.total,e.tableData=c.data,e.total=v,e.count={all:u,nopass:m,ing:p,pass:h};case 19: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()(i.a.mark(function a(){var s,r,n,o;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t.$api.channel.channelInfo({id:e});case 2:if(s=a.sent,r=s.code,n=s.data,200===r){a.next=7;break}return a.abrupt("return");case 7:o=n.text||"该用户没有填写备注",n.text=o.replace(/\n/g,"<br>"),t.applyForm=n,t.subForm={id:e,status:2,sh_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(t,e)}).catch(function(){})},updateItem:function(t,e){var a=this;return l()(i.a.mark(function s(){return i.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:a.$api.channel.channelUpdate({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<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 s.stop()}},s,a)}))()},submitFormInfo:function(){var t=this;this.$refs.subForm.validate(function(e){if(e){var a=t.subForm;t.$api.channel.channelUpdate(a).then(function(e){200===e.code&&(t.$message.success(t.$t("tips.successSub")),t.showApply=!1,t.getTableDataList())})}})}},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")}}},p={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"lb-goods-list"},[a("top-nav"),t._v(" "),a("div",{staticClass:"page-main"},[a("el-row",{stati
|