1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c4eec9c"],{"44f1":function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return r})),n.d(t,"g",(function(){return o})),n.d(t,"f",(function(){return c})),n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"i",(function(){return u})),n.d(t,"h",(function(){return l})),n.d(t,"c",(function(){return d}));n("a9e3"),n("b680"),n("ac1f"),n("5319"),n("4ec9"),n("d3b7"),n("3ca3"),n("ddb0"),n("4de4"),n("d81d");function a(e){var t=Number(e);if(t){t=Math.round(100*t)/1e4,t=t.toFixed(2),t+="";var n=t.indexOf(".")>-1?/(\d{1,3})(?=(?:\d{3})+\.)/g:/(\d{1,3})(?=(?:\d{3})+$)/g;return t.replace(n,"$1,")}return t+".00"}function r(e,t){if(e){var n=new Map([[0,{color:"#909399",name:"没取消"}],[1,{color:"#909399",name:"审核中"}],[2,{color:"#909399",name:"已取消"}],[3,{color:"#909399",name:"被驳回"}]]);return n.get(e)||{name:"未知订单状态",color:"#909399"}}var a=new Map([[0,{color:"#f97547",name:"待付款"}],[1,{color:"#13c19f",name:"待发货"}],[2,{color:"#ffaa1d",name:"待收货"}],[3,{color:"#409EFF",name:"已完成"}],[4,{color:"#74a2e6",name:"已完成"}]]);return a.get(t)||{name:"未知订单状态",color:"#909399"}}function o(e){switch(+e){case 0:return{name:"未认证",color:"#f97547"};case 1:return{name:"审核中",color:"#13c19f"};case 2:return{name:"待签约",color:"#ffaa1d"};case 3:return{name:"已完成",color:"#409EFF"};default:return{name:"审核中",color:"#13c19f"}}}function c(e){switch(+e){case 0:return{name:"未审核",color:"#f96b6b"};case 1:return{name:"已同意",color:"#13c19f"};case 2:return{name:"已驳回",color:"#415161"};case 3:return{name:"已完成",color:"#f96b6b"};default:return{name:"未知支付状态",color:"#909399"}}}function i(e){if(!e&&0!==e)return{name:"级别待定",color:"#909399"};var t;switch(e){case 3:t={name:"代理公司",color:"#f0a637"};break;case 2:t={name:"销售经理",color:"#67c23a"};break;case 1:t={name:"销售主管",color:"#1fd3c2"};break;default:t={name:"未知",color:"#909399"}}return t}function s(e){var t;switch(e){case 0:t="销售未实名认证";break;case 1:t="等待邀请人审核";break;case 2:t="等待上级审核";break;case 3:t="等待用户确认";break;case 4:t="邀请人审核驳回";break;case 5:t="上级审核驳回";break;case 6:t="授权成功";break;default:t=e}return t}var u=function(e){console.log(e);var t=0;return e.map((function(e){e.sku.map((function(e){t+=e.num*e.price}))})),t},l=function(e){var t=0;return e.map((function(e){e.sku.map((function(e){t+=e.num}))})),t};function d(e,t){if(null==e)return 0;var n=Date.parse(new Date(t))/1e3,a=Date.parse(new Date(e))/1e3,r=function(e){return e<10?"0"+e:e},o=n-a;if(o>0){var c=Math.floor(o/86400),i=Math.floor(o%86400/3600),s=Math.floor((o-86400*c-3600*i)/60);Math.floor(o-86400*c-3600*i-60*s);return"".concat(r(c))}return 0}},"4ec9":function(e,t,n){"use strict";var a=n("6d61"),r=n("6566");e.exports=a("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r)},"73f5":function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"g",(function(){return o})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return i})),n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"d",(function(){return f}));var a=n("b775"),r=function(e){return Object(a["a"])({url:"/store/disabled",method:"post",params:e})},o=function(e){return Object(a["a"])({url:"/store/list",method:"get",params:e})},c=function(e){return Object(a["a"])({url:"/store/get_all_user",method:"get",params:e})},i=function(e){return Object(a["a"])({url:"/user/disabled",method:"post",data:e})},s=function(e){return Object(a["a"])({url:"/store/get_account_info",method:"get",params:e})},u=function(e){return Object(a["a"])({url:"/store/get_withdrawal_state",method:"get",params:e})},l=function(e){return Object(a["a"])({url:"/store/get_account_detail",method:"get",params:e})},d=function(e){return Object(a["a"])({url:"/store/export",method:"get",params:e})},f=function(e){return Object(a["a"])({url:"/store/set_wx_auth",method:"post",data:e})}},a062:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"content"},[n("div",{staticClass:"search_box"},[n("el-input",{attrs:{clearable:"",maxlength:"11",placeholder:"手机号或昵称","prefix-icon":"el-icon-search"},on:{clear:function(t){e.params.page_index=1,e.getList()}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSearch()}},model:{value:e.params.search_name,callback:function(t){e.$set(e.params,"search_name",t)},expression:"params.search_name"}}),n("el-button",{attrs:{type:"primary",icon:"el-icon-search",loading:e.loading},on:{click:function(t){return e.handleSearch()}}},[e._v("搜索/刷新")]),n("el-button",{attrs:{type:"primary",icon:"el-icon-download"},on:{click:e.exportExcel}},[e._v("导出")])],1),n("div",{staticClass:"table_box"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"listTable",staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#f8fbfc"},border:"",stripe:"",data:e.list,height:e.tableHeight+"px","cell-style":{padding:"10px 0"}}},[n("el-table-column",{attrs:{label:"序号",type:"index",width:"50",align:"center",index:function(t){return e.params.page_size*(e.params.page_index-1)+t+1}}}),n("el-table-column",{staticStyle:{padding:"0"},attrs:{label:"头像",prop:"avatar",width:"80","label-class-name":"label",align:"center"},scopedSlots:e._u([{key:"default",fn:function(e){return[n("img",{staticClass:"hoverImg",attrs:{width:"36",height:"36",src:e.row.avatar}})]}}])}),n("el-table-column",{attrs:{label:"昵称",prop:"nickname",align:"center"}}),n("el-table-column",{attrs:{label:"手机号",prop:"phone",align:"center"}}),n("el-table-column",{attrs:{label:"用户状态",prop:"status",width:"300",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[n("el-tag",{attrs:{type:0===a.status?"success":"danger"}},[e._v(e._s(0===a.status?"启用":"禁用"))])]}}])}),n("el-table-column",{attrs:{label:"操作",prop:"status",width:"300",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[n("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleDisable(a)}}},[e._v(e._s(0===a.status?"禁用":"启用"))])]}}])})],1)],1),n("div",{staticClass:"batch-container"},[n("pagination",{attrs:{total:e.totalPage,limit:e.params.page_size,page:e.params.page_index},on:{pagination:e.changePagination,"update:limit":e.changePagination}})],1)])},r=[],o=(n("b0c0"),n("99af"),n("d81d"),n("d3b7"),n("3ca3"),n("ddb0"),n("b775")),c=function(e){return Object(o["a"])({url:"/user/list",method:"get",params:e})},i=function(e){return Object(o["a"])({url:"/user/export",method:"get",params:e})},s=n("44f1"),u=n("73f5"),l=n("8975"),d={name:"user_list",data:function(){return{total:0,loading:!1,dialogFormVisible:!1,form:{},params:{page_index:1,page_size:20,search_name:""},list:[],totalPage:0,tableHeight:0}},created:function(){this.getList(),this.levelStatus=s["d"]},mounted:function(){var e=this;this.$nextTick((function(){e.tableHeight=document.getElementsByClassName("table_box")[0].offsetHeight}))},filters:{getStatus:function(e){return 1===e}},methods:{handleDisable:function(e){var t=this,n=e.id,a=e.name,r=e.status,o=0==r?"禁用":"启用";this.$confirm("确认要".concat(o).concat(a),{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(e){Object(u["i"])({id:n}).then((function(e){200==e.code?(t.getList(),t.$message.success(0==r?"已禁用".concat(a):"已启用".concat(a))):t.$message.error("设置失败")}))}))},exportExcel:function(){var e=this,t=this.params;i(t).then((function(t){if(200==t.code){var a=t.data;if(a.length<1)return e.$message.error("暂无可导出数据"),!1;var r=["序号","昵称","手机号","用户状态"];a.map((function(e,t){e.index=t+1,e.status=0==e.status?"启用":"禁用"}));var o=["index","nickname","phone","status"],c=e.formatJson(o,a);Promise.all([n.e("chunk-519483dc"),n.e("chunk-f2c374ea"),n.e("chunk-2133cd4f")]).then(n.bind(null,"4bf8")).then((function(e){e.export_json_to_excel({header:r,data:c,filename:"".concat(Object(l["formatter"])(new Date,"yyyy-MM-dd"),"用户列表"),bookType:"xlsx"})}))}}))},formatJson:function(e,t){return t.map((function(t){return e.map((function(e){return"timestamp"===e?parseTime(t[e]):t[e]}))}))},getList:function(){var e=this,t=this.params,n=t.page_index,a=t.page_size,r=t.search_name;c({page_index:n,page_size:a,search_name:r}).then((function(t){200===t.code?(e.list=t.data.list,e.totalPage=t.data.total):e.$message.error(t.msg||"获取用户列表失败")})).catch((function(e){})).finally((function(t){e.loading=!1}))},handleSearch:function(e){this.params.search_name?(this.loading=!0,!e&&(this.page=1),this.getList()):(this.page=1,this.created())},changePagination:function(e){var t=e.page,n=e.limit;this.params.page_size=n,this.params.page_index=t,this.getList()}}},f=d,m=(n("a285"),n("2877")),p=Object(m["a"])(f,a,r,!1,null,"3c675477",null);t["default"]=p.exports},a285:function(e,t,n){"use strict";n("c795")},c795:function(e,t,n){}}]);
|