53c403b.js 7.3 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[122],{572:function(t,e,r){},716:function(t,e,r){"use strict";r(572)},841:function(t,e,r){"use strict";r.r(e);r(191);var n=r(6),o=(r(30),{data:function(){return{page:1,total:0,tableData:[],counter:{all:0,restore:0,reject:0},selectedStatus:"0",statusOptions:[],remarkModel:!1,remarkData:{id:"0",content:""},loading:!1}},computed:{},mounted:function(){this.getStatus(),this.getList()},methods:{getStatus:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$post("/api/admin/UserWeight/getOptions");case 2:(r=e.sent)&&1===r.status&&(t.statusOptions=r.data.status_options,t.counter.all=r.data.counter[0],t.counter.restore=r.data.counter[3],t.counter.reject=r.data.counter[4]);case 4:case"end":return e.stop()}}),e)})))()},getList:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var data,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return data={page:t.page,status:t.selectedStatus},e.next=3,t.$post("/api/admin/UserWeight/getApplyList",data);case 3:(r=e.sent)&&1===r.status&&(t.tableData=r.data.list,t.total=r.data.total);case 5:case"end":return e.stop()}}),e)})))()},pass:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e.$confirm("确认通过恢复权重?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info"}).then(function(){var r=Object(n.a)(regeneratorRuntime.mark((function r(n){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.$post("/api/admin/UserWeight/pass",{id:t.id});case 2:(o=r.sent)&&1===o.status&&(e.$message.success("设置成功"),e.getList());case 4:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}());case 1:case"end":return r.stop()}}),r)})))()},reject:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e.$prompt("拒绝恢复后付费金额将退回用户余额","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPlaceholder:"请输入拒绝原因"}).then(function(){var r=Object(n.a)(regeneratorRuntime.mark((function r(n){var o,c;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=n.value,r.next=3,e.$post("/api/admin/UserWeight/reject",{id:t.id,reject_msg:o});case 3:(c=r.sent)&&1===c.status&&(e.$message.success("设置成功"),e.getList());case 5:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}());case 1:case"end":return r.stop()}}),r)})))()},changePagination:function(t){this.page=t,this.getList()},onRemark:function(t){this.remarkData.id=t.id,this.remarkModel=!0},onToList:function(t){var data={obj_id:t.id,type:7};this.$router.push({path:"/main/remark_list",query:data})},onRemarkSave:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var data,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.loading=!0,""!==t.remarkData.content&&"0"!==t.remarkData.id){e.next=5;break}return t.$message.error("请输入内容"),t.loading=!1,e.abrupt("return",!1);case 5:return data={content:t.remarkData.content,id:t.remarkData.id},e.next=8,t.$post("/api/admin/UserWeight/saveRemark",data);case 8:(r=e.sent)&&1===r.status&&(t.$message.success("备注成功"),t.remarkModel=!1,t.getList()),t.loading=!1;case 11:case"end":return e.stop()}}),e)})))()}}}),c=o,l=(r(716),r(4)),component=Object(l.a)(c,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"mainContainer"},[e("div",{staticClass:"mainTableTools"},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:3}},[e("el-select",{attrs:{placeholder:"状态"},on:{change:function(e){return t.getList()}},model:{value:t.selectedStatus,callback:function(e){t.selectedStatus=e},expression:"selectedStatus"}},t._l(t.statusOptions,(function(t,r){return e("el-option",{key:r,attrs:{label:t,value:r}})})),1)],1),t._v(" "),e("el-col",{attrs:{span:9}},[e("div",{staticClass:"mainTableTagbox"},[e("el-tag",{attrs:{type:"success"}},[t._v("申请总数:"),e("b",[t._v(t._s(t.counter.all))])]),t._v(" "),e("el-tag",[t._v("已恢复:"),e("b",[t._v(t._s(t.counter.restore))])]),t._v(" "),e("el-tag",{attrs:{type:"danger"}},[t._v("拒绝恢复:"),e("b",[t._v(t._s(t.counter.reject))])])],1)])],1)],1),t._v(" "),e("el-table",{attrs:{data:t.tableData,border:""}},[e("el-table-column",{attrs:{prop:"obj_id",label:"申请人"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("span",{staticClass:"lblue point"},[e("a",{attrs:{target:"_blank",href:r.row.host+"/rooter/user/"+r.row.uid}},[t._v(t._s(r.row.nickname))])])]}}])}),t._v(" "),e("el-table-column",{attrs:{prop:"before_weight",label:"申请时权重"}}),t._v(" "),e("el-table-column",{attrs:{prop:"money",label:"付费金额"}}),t._v(" "),e("el-table-column",{attrs:{prop:"update_time",label:"付费时间"}}),t._v(" "),e("el-table-column",{attrs:{prop:"status",label:"当前状态"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("span",{class:"status-"+r.row.status},[t._v(t._s(r.row.status_name))])]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"备注"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("div",[t._v(t._s(r.row.remark_text))]),t._v(" "),e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.onToList(r.row)}}},[t._v("查看备注("+t._s(r.row.remark_num)+")")])]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.onRemark(r.row)}}},[t._v("添加备注")])]}}])}),t._v(" "),e("el-table-column",{attrs:{prop:"obj_id",label:"处理人"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("span",{staticClass:"lblue point"},[e("a",{attrs:{target:"_blank",href:r.row.host+"/rooter/user/"+r.row.action_uid}},[t._v(t._s(r.row.action_nickname))])])]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(r){return[2==r.row.status?[e("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){return t.pass(r.row)}}},[t._v("允许恢复")]),t._v(" "),e("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(e){return t.reject(r.row)}}},[t._v("拒绝恢复")])]:t._e()]}}])})],1),t._v(" "),e("div",{staticClass:"mainPageBox"},[e("el-pagination",{attrs:{"page-size":20,total:Number(t.total),layout:"total, prev, pager, next",background:""},on:{"current-change":t.changePagination}})],1),t._v(" "),e("el-dialog",{attrs:{title:"添加备注",visible:t.remarkModel},on:{"update:visible":function(e){t.remarkModel=e}}},[e("div",[e("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入内容"},model:{value:t.remarkData.content,callback:function(e){t.$set(t.remarkData,"content",e)},expression:"remarkData.content"}})],1),t._v(" "),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.remarkModel=!1}}},[t._v("取 消")]),t._v(" "),e("el-button",{attrs:{type:"primary",loading:t.loading},on:{click:t.onRemarkSave}},[t._v("确 定")])],1)])],1)}),[],!1,null,"29acebc8",null);e.default=component.exports}}]);