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 lines
13 KiB
1 lines
13 KiB
webpackJsonp([44],{"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),u=a("PJh5"),c=a.n(u),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*(c()(c()(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()(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,u,c,m,p,h,d;return n.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)),(i=s.start_time)&&i.length>0?(s.start_time=i[0]/1e3,s.end_time=i[1]/1e3):(s.start_time="",s.end_time=""),a.next=8,e.$api.distribution.resellerList(s);case 8:if(o=a.sent,l=o.code,u=o.data,e.loading=!1,200===l){a.next=14;break}return a.abrupt("return");case 14:u.data.map(function(t){var e=t.text||"该用户没有填写备注";t.text=e.replace(/\n/g,"<br>")}),c=u.all,m=u.nopass,p=u.ing,h=u.pass,d=u.total,e.tableData=u.data,e.total=d,e.count={all:c,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()(n.a.mark(function a(){var s,r,i,o;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:o=i.text||"该用户没有填写备注",i.text=o.replace(/\n/g,"<br>"),t.applyForm=i,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()(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<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.distribution.resellerUpdate(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?c()(1e3*t).format("YYYY-MM-DD"):2===e?c()(1e3*t).format("HH:mm:ss"):c()(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",{staticClass:"page-top-operate"},[a("el-button",{attrs:{type:0===t.searchForm.status?"primary":"",plain:"",size:"medium"},on:{click:function(e){return t.toChange(0)}}},[t._v("全部("+t._s(t.count.all||0)+")")]),t._v(" "),a("el-button",{attrs:{type:3===t.searchForm.status?"primary":"",plain:"",size:"medium"},on:{click:function(e){return t.toChange(4)}}},[t._v("未授权("+t._s(t.count.nopass||0)+")")]),t._v(" "),a("el-button",{attrs:{type:1===t.searchForm.status?"primary":"",plain:"",size:"medium"},on:{click:function(e){return t.toChange(1)}}},[t._v("申请中("+t._s(t.count.ing||0)+")")]),t._v(" "),a("el-button",{attrs:{type:2===t.searchForm.status?"primary":"",plain:"",size:"medium"},on:{click:function(e){return t.toChange(2)}}},[t._v("已授权("+t._s(t.count.pass||0)+")")])],1),t._v(" "),a("el-row",{staticClass:"page-search-form"},[a("el-form",{ref:"searchForm",attrs:{inline:!0,model:t.searchForm},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"输入查询",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入姓名/手机号"},model:{value:t.searchForm.name,callback:function(e){t.$set(t.searchForm,"name",e)},expression:"searchForm.name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"申请时间",prop:"start_time"}},[a("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"timestamp","picker-options":t.pickerOptions,"default-time":["00:00:00","23:59:59"]},on:{change:function(e){return t.getTableDataList(1)}},model:{value:t.searchForm.start_time,callback:function(e){t.$set(t.searchForm,"start_time",e)},expression:"searchForm.start_time"}})],1),t._v(" "),a("el-form-item",[a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.getTableDataList(1)}}},[t._v(t._s(t.$t("action.search")))]),t._v(" "),a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",icon:"el-icon-refresh-left"},on:{click:function(e){return t.resetForm("searchForm")}}},[t._v(t._s(t.$t("action.reset")))])],1)],1)],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,"header-cell-style":{background:"#f5f7fa",color:"#606266"}}},[a("el-table-column",{attrs:{prop:"id",label:"ID",fixed:""}}),t._v(" "),a("el-table-column",{attrs:{prop:"user_id",label:"用户ID"}}),t._v(" "),a("el-table-column",{attrs:{prop:"avatarUrl",label:"头像"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("lb-image",{attrs:{src:t.row.avatarUrl}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"nickName",label:"昵称","min-width":120}}),t._v(" "),a("el-table-column",{attrs:{prop:"user_name",label:"姓名","min-width":120}}),t._v(" "),a("el-table-column",{attrs:{prop:"mobile",label:"手机号","min-width":120}}),t._v(" "),a("el-table-column",{attrs:{prop:"text",label:"备注信息","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"ellipsis-2",staticStyle:{"max-height":"40px","line-height":"20px"},domProps:{innerHTML:t._s(e.row.text)}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"申请时间","min-width":120},scopedSlots:t._u([{key:"default",fn:function(e){return[a("p",[t._v(t._s(t._f("handleTime")(e.row.create_time,1)))]),t._v(" "),a("p",[t._v(t._s(t._f("handleTime")(e.row.create_time,2)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusText[e.row.status].type}},[t._v(t._s(t.statusText[e.row.status].text))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"table-operate"},[a("lb-button",{directives:[{name:"show",rawName:"v-show",value:1!==e.row.status&&3!==e.row.status,expression:"scope.row.status !== 1 && scope.row.status !== 3"},{name:"hasPermi",rawName:"v-hasPermi",value:t.$route.name+"-view",expression:"`${$route.name}-view`"}],attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(a){return t.toShowApply(e.row.id)}}},[t._v(t._s(t.$t("action.view")))]),t._v(" "),a("lb-button",{directives:[{name:"show",rawName:"v-show",value:1!==e.row.status,expression:"scope.row.status !== 1"},{name:"hasPermi",rawName:"v-hasPermi",value:t.$route.name+"-delete",expression:"`${$route.name}-delete`"}],attrs:{size:"mini",plain:"",type:"success"},on:{click:function(a){return t.confirmDel(e.row.id,-1)}}},[t._v(t._s(t.$t("action.delete")))]),t._v(" "),a("lb-button",{directives:[{name:"show",rawName:"v-show",value:1===e.row.status||3===e.row.status,expression:"scope.row.status === 1 || scope.row.status === 3"},{name:"hasPermi",rawName:"v-hasPermi",value:1===e.row.status?t.$route.name+"-authDistribution":t.$route.name+"-resetAuth",expression:"\n scope.row.status === 1\n ? `${$route.name}-authDistribution`\n : `${$route.name}-resetAuth`\n "}],attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(a){return t.toShowApply(e.row.id)}}},[t._v(t._s(t.$t(1===e.row.status?"action.authDistribution":"action.resetAuth")))]),t._v(" "),a("lb-button",{directives:[{name:"show",rawName:"v-show",value:2===e.row.status,expression:"scope.row.status === 2"},{name:"hasPermi",rawName:"v-hasPermi",value:t.$route.name+"-cancelAuth",expression:"`${$route.name}-cancelAuth`"}],attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){return t.confirmDel(e.row.id,3)}}},[t._v(t._s(t.$t("action.cancelAuth")))])],1)]}}])})],1),t._v(" "),a("lb-page",{attrs:{batch:!1,page:t.searchForm.page,pageSize:t.searchForm.limit,total:t.total},on:{handleSizeChange:t.handleSizeChange,handleCurrentChange:t.handleCurrentChange}}),t._v(" "),a("el-dialog",{attrs:{title:"申请详情",visible:t.showApply,width:"800px",center:""},on:{"update:visible":function(e){t.showApply=e}}},[t.showApply?a("div",{staticStyle:{height:"60vh",overflow:"auto"}},[a("el-form",{attrs:{model:t.applyForm,"label-width":"130px",size:"mini"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"用户ID:"}},[a("div",[t._v(t._s(t.applyForm.user_id))])]),t._v(" "),a("el-form-item",{attrs:{label:"昵称:"}},[a("div",[t._v(t._s(t.applyForm.nickName))])]),t._v(" "),a("el-form-item",{attrs:{label:"姓名:"}},[a("div",[t._v(t._s(t.applyForm.user_name))])]),t._v(" "),a("el-form-item",{attrs:{label:"手机号:"}},[a("div",[t._v(t._s(t.applyForm.mobile))])]),t._v(" "),a("el-form-item",{attrs:{label:"备注信息:"}},[a("div",{domProps:{innerHTML:t._s(t.applyForm.text)}})]),t._v(" "),a("el-form-item",{attrs:{label:"申请时间:"}},[a("div",[t._v("\n "+t._s(t._f("handleTime")(t.applyForm.create_time))+"\n ")])]),t._v(" "),a("div",{staticClass:"space-lg"}),t._v(" "),a("div",{staticClass:"space-lg b-1px-t"}),t._v(" "),a("div",{staticClass:"space-lg"}),t._v(" "),1!==t.applyForm.status?a("block",[a("div",{staticClass:"flex-warp"},[a("el-form-item",{staticStyle:{width:"50%"},attrs:{label:"审核结果:",prop:"status"}},[a("el-tag",{attrs:{type:t.statusText[t.applyForm.status].type}},[t._v(t._s(t.statusText[t.applyForm.status].text))])],1),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1!=t.applyForm.status&&t.applyForm.sh_time,expression:"applyForm.status != 1 && applyForm.sh_time"}],staticStyle:{width:"50%"},attrs:{label:"审核时间:",prop:""}},[a("div",{staticClass:"c-warning"},[t._v("\n "+t._s(t._f("handleTime")(t.applyForm.sh_time))+"\n ")])])],1),t._v(" "),t.applyForm.sh_text&&3!==t.applyForm.status?a("el-form-item",{attrs:{label:"审核意见:",prop:"sh_text"}},[a("div",[t._v(t._s(t.applyForm.sh_text))])]):t._e()],1):t._e()],1),t._v(" "),1===t.applyForm.status||3==t.applyForm.status?a("el-form",{ref:"subForm",attrs:{model:t.subForm,rules:t.subFormRules,"label-width":"130px",size:"mini"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{staticStyle:{width:"50%"},attrs:{label:"审核结果:",prop:"status"}},[a("el-radio-group",{model:{value:t.subForm.status,callback:function(e){t.$set(t.subForm,"status",e)},expression:"subForm.status"}},[a("el-radio",{attrs:{label:2}},[t._v("通过")]),t._v(" "),1===t.applyForm.status?a("el-radio",{attrs:{label:4}},[t._v("驳回")]):t._e()],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"审核意见:"}},[a("el-input",{attrs:{type:"textarea",rows:10,maxlength:"300","show-word-limit":"",resize:"none",placeholder:"请输入审核意见"},model:{value:t.subForm.sh_text,callback:function(e){t.$set(t.subForm,"sh_text",e)},expression:"subForm.sh_text"}})],1)],1):t._e()],1):t._e(),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.showApply=!1}}},[t._v(t._s(t.$t("action.cancel")))]),t._v(" "),1===t.applyForm.status||3===t.applyForm.status?a("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:t.submitFormInfo}},[t._v(t._s(t.$t("action.comfirm")))]):t._e()],1)])],1)],1)},staticRenderFns:[]};var h=a("VU/8")(m,p,!1,function(t){a("IPwu")},"data-v-7e059ba1",null);e.default=h.exports},IPwu:function(t,e){}}); |