chunk-50286cbd.3cee535c.js 28 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-50286cbd"],{"44f1":function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"d",(function(){return r})),a.d(t,"e",(function(){return s})),a.d(t,"g",(function(){return i})),a.d(t,"f",(function(){return o})),a.d(t,"b",(function(){return l})),a.d(t,"i",(function(){return c})),a.d(t,"h",(function(){return u})),a.d(t,"c",(function(){return d}));a("a9e3"),a("b680"),a("ac1f"),a("5319"),a("4ec9"),a("d3b7"),a("3ca3"),a("ddb0"),a("4de4"),a("d81d");function n(e){var t=Number(e);if(t){t=Math.round(100*t)/1e4,t=t.toFixed(2),t+="";var a=t.indexOf(".")>-1?/(\d{1,3})(?=(?:\d{3})+\.)/g:/(\d{1,3})(?=(?:\d{3})+$)/g;return t.replace(a,"$1,")}return t+".00"}function r(e,t){return e?(Number(e)+"").replace(/\d{1,4}(?=(\d{4})+(\.\d*)?$)/g,"$&,"):0}function s(e,t){if(e){var a=new Map([[0,{color:"#909399",name:"没取消"}],[1,{color:"#909399",name:"审核中"}],[2,{color:"#909399",name:"已取消"}],[3,{color:"#909399",name:"被驳回"}]]);return a.get(e)||{name:"未知订单状态",color:"#909399"}}var n=new Map([[0,{color:"#f97547",name:"待付款"}],[1,{color:"#13c19f",name:"待发货"}],[2,{color:"#ffaa1d",name:"待收货"}],[3,{color:"#409EFF",name:"已完成"}],[4,{color:"#74a2e6",name:"已完成"}]]);return n.get(t)||{name:"未知订单状态",color:"#909399"}}function i(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"};case 4:return{name:"被驳回",color:"#999"};case 5:return{name:"已冻结",color:"#ccc"};default:return{name:"审核中",color:"#13c19f"}}}function o(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 l(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 c=function(e){var t=0;return e.map((function(e){e.sku.map((function(e){t+=e.num*e.price}))})),t},u=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 a=Date.parse(new Date(t))/1e3,n=Date.parse(new Date(e))/1e3,r=function(e){return e<10?"0"+e:e},s=a-n;if(s>0){var i=Math.floor(s/86400),o=Math.floor(s%86400/3600),l=Math.floor((s-86400*i-3600*o)/60);Math.floor(s-86400*i-3600*o-60*l);return"".concat(r(i))}return 0}},"46f4":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"content"},[a("div",{staticClass:"search_box"},[a("div",[a("el-select",{staticClass:"select",attrs:{placeholder:"认证状态"},on:{change:function(t){return e.toSearch()}},model:{value:e.params.is_apply,callback:function(t){e.$set(e.params,"is_apply",t)},expression:"params.is_apply"}},e._l(e.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),a("el-input",{attrs:{clearable:"",maxlength:"11",placeholder:"店铺名称/手机号","prefix-icon":"el-icon-search"},on:{clear:function(t){return e.toSearch()}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toSearch()}},model:{value:e.params.search_name,callback:function(t){e.$set(e.params,"search_name",t)},expression:"params.search_name"}}),a("el-button",{attrs:{type:"primary",icon:"el-icon-search",loading:e.loading},on:{click:function(t){return e.toSearch()}}},[e._v("搜索")]),a("el-button",{attrs:{type:"primary",icon:"el-icon-download"},on:{click:e.exportExcel}},[e._v("导出")])],1)]),a("div",{staticClass:"store_num"},[a("span",[e._v("可开通店铺人数:"+e._s(e.format(e.canOpenNum)||0))]),a("span",{staticStyle:{"margin-left":"20px"}},[e._v("已开通店铺人数:"+e._s(e.format(e.openedNum)||0))]),a("span",{staticStyle:{"margin-left":"20px"}},[e._v("【已完成:"+e._s(e.format(e.number.finish,!0)||0))]),a("span",{staticStyle:{"margin-left":"20px"}},[e._v("未认证:"+e._s(e.format(e.number.no_cert,!0)||0))]),a("span",{staticStyle:{"margin-left":"20px"}},[e._v("审核中:"+e._s(e.format(e.number.authing,!0)||0))]),a("span",{staticStyle:{"margin-left":"20px"}},[e._v("待签约:"+e._s(e.format(e.number.wait_sign,!0)||0))]),a("span",{staticStyle:{"margin-left":"20px"}},[e._v("被驳回:"+e._s(e.format(e.number.rejected,!0)||0))]),a("span",{staticStyle:{"margin-left":"20px"}},[e._v("已冻结:"+e._s(e.format(e.number.frozen,!0)||0))]),a("span",{staticStyle:{"margin-left":"20px"}},[e._v("已删除:"+e._s(e.format(e.number.delete,!0)||0)+"】")])]),a("div",{staticClass:"tabs"},[a("el-tabs",{on:{"tab-click":e.handleTagToggle}},[a("el-tab-pane",{attrs:{name:"0"}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 未删除 ")])]),a("el-tab-pane",{attrs:{name:"1"}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(" 已删除 ")])])],1)],1),a("div",{staticClass:"table_box"},[a("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"}}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"80",align:"center",index:function(t){return e.params.page_size*(e.params.page_index-1)+t+1}}}),a("el-table-column",{staticStyle:{padding:"0"},attrs:{label:"头像",prop:"img",width:"80","label-class-name":"label",align:"center"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("img",{staticClass:"hoverImg",attrs:{width:"36",height:"36",src:e.row.img}})]}}])}),a("el-table-column",{attrs:{prop:"name",label:"店铺名称",align:"center",width:"280","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.getMoreInfo(n)}}},[e._v(e._s(n.name)+"的店铺")])]}}])}),a("el-table-column",{attrs:{label:"开通时间",prop:"created_at",align:"center",width:"160","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"昵称",prop:"user",align:"center","show-overflow-tooltip":!0,width:"190"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.user&&a.user.nickname)+" ")]}}])}),a("el-table-column",{attrs:{label:"手机号",prop:"phone",align:"center",width:"160","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"认证状态",prop:"user",align:"center","show-overflow-tooltip":!0,width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-tag",{staticStyle:{color:"#ffffff"},attrs:{color:e.storeStatus(n.is_apply).color}},[e._v(" "+e._s(e.storeStatus(n.is_apply).name)+" ")])]}}])}),a("el-table-column",{attrs:{label:"操作",prop:"status",width:"320",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button",{directives:[{name:"permit",rawName:"v-permit",value:0,expression:"0"}],attrs:{"roles-permit":e.roles,type:"text",disabled:!!n.deleted_at},on:{click:function(t){return e.handleDisable(n,0)}}},[e._v(e._s(0===n.status?"禁用":"启用"))]),a("el-button",{directives:[{name:"permit",rawName:"v-permit",value:1,expression:"1"}],attrs:{"roles-permit":e.roles,type:"text",disabled:1===n.is_failure},on:{click:function(t){return e.handleDel(n)}}},[e._v(" "+e._s(n.deleted_at?"恢复":"删除"))]),n.deleted_at?a("el-button",{directives:[{name:"permit",rawName:"v-permit",value:2,expression:"2"}],attrs:{"roles-permit":e.roles,type:"text",disabled:1===n.is_failure},on:{click:function(t){return e.handleReopen(n)}}},[e._v("重开")]):e._e(),2!=n.is_apply||n.deleted_at?e._e():a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.resetAuth(n)}}},[e._v(" 认证重置 ")]),a("el-button",{directives:[{name:"permit",rawName:"v-permit",value:3,expression:"3"}],attrs:{"roles-permit":e.roles,type:"text"},on:{click:function(t){return e.handleDetail(n)}}},[e._v("账户明细")])]}}])})],1)],1),a("el-drawer",{attrs:{title:e.storeInfo.name,visible:e.showUser,direction:"rtl",size:"45%"},on:{"update:visible":function(t){e.showUser=t}}},[a("div",{staticClass:"sidebar_box"},[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"基本信息",name:"first"}}),a("el-tab-pane",{attrs:{label:"用户列表",name:"second"}}),a("el-tab-pane",{attrs:{label:"收款记录",name:"third"}})],1),"first"==e.activeName?a("el-form",[a("el-form-item",{attrs:{label:"商户号:"}},[e._v(e._s(e.authState.sub_mchid))]),a("el-form-item",{attrs:{label:"店铺名称:"}},[e._v(e._s(e.storeInfo.name))]),a("el-form-item",{attrs:{label:"联系方式:"}},[e._v(e._s(e.storeInfo.phone))]),e.storeInfo?a("el-form-item",{attrs:{label:"认证状态:"}},[[e.authState?a("span",[e._v(e._s(e.authState.applyment_state_desc))]):a("span",[e._v("未认证")])]],2):e._e(),e.authState.audit_detail&&e.authState.audit_detail.length>0?a("el-form-item",{attrs:{label:"原因:"}},[e._v(e._s(e.authState.audit_detail[0].reject_reason))]):e._e(),a("el-form-item",{attrs:{label:"星级:"}},[e._v(e._s(e.storeInfo.star))]),a("el-form-item",{attrs:{label:"店铺地区:"}},[e._v(" "+e._s(e.storeInfo.province?e.storeInfo.province:"")+e._s(e.storeInfo.city?e.storeInfo.city:"")+e._s(e.storeInfo.area?e.storeInfo.area:"")+" ")]),a("el-form-item",{attrs:{label:"店铺地址:"}},[e._v(" "+e._s(e.storeInfo.address?e.storeInfo.address:"")+" ")]),a("el-form-item",{attrs:{label:"可提现资金:"}},[e._v(e._s(e.accountInfo.available_amount?e.blanceFmt(e.accountInfo.available_amount):0)+"元")]),a("el-form-item",{attrs:{label:"冻结资金:"}},[e._v(" "+e._s(e.accountInfo.pending_amount?e.blanceFmt(e.accountInfo.pending_amount):0)+"元")]),3==e.storeInfo.is_apply?a("el-form-item",{attrs:{label:"开户银行:"}},[e._v(e._s(e.storeInfo.account_bank))]):e._e(),3==e.storeInfo.is_apply?a("el-form-item",{attrs:{label:"银行卡号:"}},[e._v(e._s(e.storeInfo.account_number))]):e._e(),e.storeInfo.qr_code?a("el-form-item",{attrs:{label:"微信二维码:"}},[[a("img",{staticClass:"qr_code",attrs:{src:e.storeInfo.qr_code}})]],2):e._e()],1):e._e(),"second"==e.activeName?a("div",{staticClass:"user_table"},[a("div",{staticClass:"search_box"},[a("el-input",{attrs:{placeholder:"请输入手机号搜索",clearable:""},on:{clear:function(t){e.userParams.page_index=1,e.getUser()}},model:{value:e.userParams.search_name,callback:function(t){e.$set(e.userParams,"search_name",t)},expression:"userParams.search_name"}}),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.getUser()}}},[e._v("搜索")])],1),a("div",{staticClass:"user_info"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",stripe:"",data:e.userList,"header-cell-style":{background:"#eef1f6",color:"#606266"},"cell-style":{padding:"2px 0"}}},[a("el-table-column",{attrs:{label:"客户昵称",prop:"nickname",align:"center"}}),a("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){var t=e.row;return[a("img",{staticClass:"hoverImg",attrs:{width:"36",height:"36",src:t.avatar}})]}}],null,!1,3012779399)}),a("el-table-column",{attrs:{label:"手机号",prop:"phone",align:"center"}}),a("el-table-column",{attrs:{label:"总销量",prop:"total",align:"center"}}),a("el-table-column",{attrs:{label:"总销售金额",prop:"account",align:"center"}}),a("el-table-column",{attrs:{label:"用户状态",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-tag",{attrs:{type:0==n.status?"success":"danger"}},[e._v(" "+e._s(0==n.status?"启用":"禁用")+" ")])]}}],null,!1,2317155960)}),a("el-table-column",{attrs:{label:"操作",prop:"status",width:"120",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleDisable(n,1)}}},[e._v(e._s(0===n.status?"禁用":"启用"))])]}}],null,!1,77331947)})],1)],1),a("div",{staticClass:"page"},[a("pagination",{attrs:{total:e.userTotal,limit:e.userParams.page_size,page:e.userParams.page_index},on:{pagination:e.userPage,"update:limit":e.userPage}})],1)]):e._e(),"third"==e.activeName?a("div",[a("div",{staticClass:"date_picker"},[a("el-date-picker",{attrs:{type:"daterange","picker-options":e.pickerOptions,"range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["00:00:00","23:59:59"],"value-format":"yyyy-MM-dd HH:mm:ss",format:"yyyy-MM-dd HH:mm:ss",align:"right",clearable:!1},on:{change:function(t){e.receiptParams.page_index=1,e.getReceipt()}},model:{value:e.dateVal,callback:function(t){e.dateVal=t},expression:"dateVal"}})],1),a("el-tabs",{staticClass:"date_tab",attrs:{type:"card"},on:{"tab-click":e.changeState},model:{value:e.receiptParams.type,callback:function(t){e.$set(e.receiptParams,"type",t)},expression:"receiptParams.type"}},[e.showAll?a("el-tab-pane",{attrs:{label:"全部",name:"0"}}):e._e(),a("el-tab-pane",{attrs:{label:"收款",name:"1"}}),a("el-tab-pane",{attrs:{label:"解冻",name:"2"}}),a("el-tab-pane",{attrs:{label:"提现",name:"3"}}),a("el-tab-pane",{attrs:{label:"退款",name:"4"}})],1),a("div",{staticClass:"record"},[a("div",{staticClass:"record_table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{border:"",stripe:"",data:e.receiptList,"header-cell-style":{background:"#f8fbfc"},"cell-style":{padding:3==e.receiptParams.type?"2px 0":"8px 0"}}},[a("el-table-column",{attrs:{label:"类型",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[1==n.type?a("span",[e._v("收款")]):e._e(),2==n.type?a("span",[e._v("解冻")]):e._e(),3==n.type?a("span",[e._v("提现")]):e._e(),4==n.type?a("span",[e._v("退款")]):e._e()]}}],null,!1,1426857912)}),a("el-table-column",{attrs:{label:"金额(元)",prop:"money",align:"center",width:"100"}}),"0"===e.receiptParams.type?a("el-table-column",{attrs:{label:"可提现金额(元)",prop:"account",align:"center",width:"140"}}):e._e(),a("el-table-column",{attrs:{label:"时间",prop:"created_at",align:"center",width:3==e.receiptParams.type?160:""}}),3==e.receiptParams.type?a("el-table-column",{attrs:{label:"提现状态",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(e._f("getStatus")(a.status_code,a.status))+" ")]}}],null,!1,1745610718)}):e._e(),3==e.receiptParams.type?a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.withdrawalDetail(n)}}},[e._v("查看明细")])]}}],null,!1,407455275)}):e._e()],1),a("el-dialog",{attrs:{title:"提现明细",visible:e.showDetail,width:"30%",center:"",modal:!1},on:{"update:visible":function(t){e.showDetail=t}}},[a("el-form",[e.withdrawal.amount?a("el-form-item",{attrs:{label:"提现金额:"}},[e._v(e._s(e.blanceFmt(e.withdrawal.amount)))]):e._e(),e.withdrawal.create_time?a("el-form-item",{attrs:{label:"提现时间:"}},[e._v(e._s(e._f("rTime")(e.withdrawal.create_time)))]):e._e(),e.withdrawal.status?a("el-form-item",{attrs:{label:"提现状态:"}},[e._v(e._s(e._f("getStatus1")(e.withdrawal.status)))]):e._e(),"FAIL"==e.withdrawal.status?a("el-form-item",{attrs:{label:"失败原因:"}},[e._v(e._s(e.withdrawal.reason))]):e._e(),e.withdrawal.update_time?a("el-form-item",{attrs:{label:"更新时间:"}},[e._v(e._s(e._f("rTime")(e.withdrawal.update_time)))]):e._e()],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.showDetail=!1}}},[e._v("确 定")])],1)],1),a("pagination",{attrs:{total:e.receiptTotal,limit:e.receiptParams.page_size,page:e.receiptParams.page_index},on:{pagination:e.receiptPage,"update:limit":e.receiptPage}})],1)])],1):e._e()],1)]),a("div",{staticClass:"batch-container"},[a("pagination",{attrs:{total:e.totalPage,limit:e.params.page_size,page:e.params.page_index},on:{pagination:e.changePagination,"update:limit":e.changePagination}})],1)],1)},r=[],s=(a("99af"),a("e9c4"),a("a9e3"),a("b0c0"),a("d81d"),a("d3b7"),a("3ca3"),a("ddb0"),a("73f5")),i=a("44f1"),o=a("8975"),l={name:"StoreList",filters:{getStatus:function(e,t){return"SUCCESS"===e&&0===t?"受理成功":"SUCCESS"===e&&1===t?"提现成功":"CREATE_SUCCESS"===e?"受理成功":"FAIL"===e?"提现失败":"REFUND"===e?"提现退票":"CLOSE"===e?"关单":"INIT"===e?"业务单已创建":"未知"},getStatus1:function(e){switch(e){case"CREATE_SUCCESS":return"受理成功";case"SUCCESS":return"提现成功";case"FAIL":return"提现失败";case"REFUND":return"提现退票";case"CLOSE":return"关单";case"INIT":return"业务单已创建"}},rTime:function(e){var t=function(e){return e<10?"0"+e:e},a=new Date(e),n=a.getFullYear(),r=a.getMonth()+1,s=a.getDate(),i=a.getHours(),o=a.getMinutes(),l=a.getSeconds();return"".concat(n,"-").concat(t(r),"-").concat(t(s)," ").concat(t(i),":").concat(t(o),":").concat(t(l))}},data:function(){return{showAll:!1,dateVal:[],pickerOptions:{},loading:!1,canOpenNum:0,openedNum:0,number:"",activeName:"first",roles:this.$route.meta.buttonAuthList?this.$route.meta.buttonAuthList:[],params:{page_index:1,page_size:15,search_name:"",is_apply:0,is_delete:0},options:[{value:0,label:"全部"},{value:1,label:"未认证"},{value:2,label:"审核中"},{value:3,label:"待签约"},{value:4,label:"已完成"},{value:5,label:"被驳回"},{value:6,label:"已冻结"}],userParams:{page_index:1,page_size:15,search_name:"",store_id:""},receiptParams:{page_index:1,page_size:15,id:"",type:"1",start_at:"",end_at:""},storeInfo:"",userList:[],showUser:!1,userTotal:0,list:[],searchName:"",totalPage:0,receiptList:[],receiptTotal:0,authState:{},accountInfo:{available_amount:0,pending_amount:0},withdrawal:"",showDetail:!1,tableHeight:0}},created:function(){console.log(this.$route.meta.buttonAuthList,"roles"),this.storeStatus=i["g"],this.blanceFmt=i["a"],this.format=i["d"],this.getList(),this.getData()},mounted:function(){var e=this;this.$nextTick((function(){e.tableHeight=document.getElementsByClassName("table_box")[0].offsetHeight}))},methods:{handleDetail:function(e){this.storeInfo=JSON.parse(JSON.stringify(e)),this.showAll=!0,this.showUser=!0,this.receiptParams.type="0",this.activeName="third",this.dateVal=[],this.getCurrentMonthFirst(),this.getCurrentMonthLast(),this.getReceipt()},getCurrentMonthFirst:function(){var e=new Date;e.setDate(1);var t=parseInt(e.getMonth()+1),a=e.getDate(),n=e.getFullYear();t<10&&(t="0"+t),a<10&&(a="0"+a),this.dateVal[0]="".concat(n,"-").concat(t,"-").concat(a," 00:00:00")},getCurrentMonthLast:function(){var e=new Date,t=e.getMonth(),a=++t,n=new Date(e.getFullYear(),a,1),r=864e5,s=new Date(n-r),i=parseInt(s.getMonth()+1),o=s.getDate(),l=s.getFullYear();i<10&&(i="0"+i),o<10&&(o="0"+o),this.dateVal[1]="".concat(l,"-").concat(i,"-").concat(o," 23:59:59")},handleTagToggle:function(e){this.params.is_delete=Number(e.name),this.list=[],this.getList()},getData:function(){var e=this;Object(s["d"])().then((function(t){200===t.code?e.number=t.data:e.$message.error(t.msg||"获取数据失败")}))},handleReopen:function(e){var t=this;this.$confirm("确认要重开".concat(e.name,"的店铺吗?,请确保店铺钱包里没有资金"),{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.reopenStore(e)}))},reopenStore:function(e){var t=this;Object(s["g"])({id:e.id}).then((function(a){200===a.code?(t.$message.success("重开".concat(e.name,"的店铺成功!")),t.getList()):t.$message.error(a.msg||"重开".concat(e.name,"的店铺失败!"))}))},handleDel:function(e){var t=this,a=e.deleted_at?"恢复":"删除";e.deleted_at?this.$confirm("确认要".concat(a).concat(e.name,"的店铺吗?"),{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.delStore(e.id,e.name,a)})):this.$prompt("请输入删除原因","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^.+$/,inputErrorMessage:"删除原因不能为空"}).then((function(n){var r=n.value;t.delStore(e.id,e.name,a,r)})).catch((function(){t.$message({type:"info",message:"取消输入"})}))},delStore:function(e,t,a,n){var r=this,i="恢复"===a?s["h"]:s["a"],o="恢复"===a?{id:e}:{id:e,remark:n};i(o).then((function(e){200===e.code?(r.$message.success("".concat(a).concat(t,"的店铺成功!")),r.getList()):r.$message.error(e.msg||"".concat(a).concat(t,"的店铺失败!"))}))},refState:function(e){var t=this;Object(s["m"])({id:this.storeInfo.id}).then((function(e){200===e.code?t.authState=0===e.data.length?"":e.data:t.$message.error(e.msg||"状态更新失败")}))},resetAuth:function(e){var t=this;this.$confirm("确认要重置".concat(e.name,"的店铺认证状态吗?"),{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.setWxAuth(e.id,e.name)}))},setWxAuth:function(e,t){var a=this;Object(s["i"])({store_id:e}).then((function(e){200===e.code?(a.$message.success("重置".concat(t,"的店铺认证状态成功")),a.getList()):a.$message.error("重置".concat(t,"的店铺认证状态失败"))}))},exportExcel:function(){var e=this;this.loading=!0;var t=this.params,n=t.page_index,r=t.page_size,i=t.search_name,l=t.is_apply,c=t.is_delete,u=0===l?"all":l-1;Object(s["k"])({page_index:n,page_size:r,search_name:i,is_apply:u,is_delete:c}).then((function(t){if(200===t.code){console.log(t.data);var n=t.data;if(n.length<1)return e.$message.error("暂无可导出数据"),!1;var r=["序号","店铺名称","开通时间","昵称","手机号","店铺状态"];n.map((function(t,a){t.index=a+1,t.store_name=t.name+"的店铺",t.user&&t.user.crown?t.company=t.user&&t.user.crown.nickname:3===t.user.level?t.company=t.user.nickname:t.company="",t.is_apply=e.storeStatus(t.is_apply).name}));var s=["index","store_name","created_at","name","phone","is_apply"],i=e.formatJson(s,n);Promise.all([a.e("chunk-1457ffd4"),a.e("chunk-2133cd4f")]).then(a.bind(null,"4bf8")).then((function(e){e.export_json_to_excel({header:r,data:i,filename:"".concat(Object(o["formatter"])(new Date,"yyyy-MM-dd"),"店铺"),bookType:"xlsx"})}))}e.loading=!1}))},formatJson:function(e,t){return t.map((function(t){return e.map((function(e){return"timestamp"===e?parseTime(t[e]):t[e]}))}))},withdrawalDetail:function(e){var t=this;this.loading=!0;var a=e.transaction_id,n=e.order_no;Object(s["f"])({id:this.storeInfo.id,withdraw_id:a,out_request_no:n}).then((function(e){200==e.code?(t.withdrawal=e.data,t.showDetail=!0,console.log(e,"提现状态")):t.$message.error(e.msg||"获取失败"),t.loading=!1})).catch((function(){t.loading=!1}))},getMoreInfo:function(e){this.showAll=!1,this.storeInfo=JSON.parse(JSON.stringify(e)),this.authState=[],this.showUser=!0,this.activeName="first",this.receiptParams.type="1",this.getInfo()},getInfo:function(){var e=this;this.refState(1),3===this.storeInfo.is_apply?Object(s["b"])({id:this.storeInfo.id}).then((function(t){200===t.code?e.accountInfo=t.data:e.$message.error(t.msg||"获取账户信息失败")})):this.accountInfo=[]},getList:function(){var e=this;this.loading=!0;var t=this.params,a=t.page_index,n=t.page_size,r=t.search_name,i=t.is_apply,o=t.is_delete,l=0===i?"all":i-1;Object(s["l"])({page_index:a,page_size:n,search_name:r,is_apply:l,is_delete:o}).then((function(t){200===t.code?(e.loading=!1,e.totalPage=t.data.total,e.list=t.data.list.list,e.canOpenNum=t.data.list.total,e.openedNum=t.data.list.num):e.$message.error(t.msg||"获取店铺列表失败"),e.loading=!1})).catch((function(){e.loading=!1}))},getUser:function(){var e=this;this.userParams.store_id=this.storeInfo.id;var t=this.userParams;Object(s["n"])(t).then((function(t){200===t.code?(e.userList=t.data.list,e.userTotal=t.data.total):e.$message.error(t.msg||"获取用户列表失败")}))},getReceipt:function(){var e=this;if(this.receiptList=[],this.dateVal)if(this.receiptParams.id=this.storeInfo.id,this.receiptParams.start_at=this.dateVal[0],this.receiptParams.end_at=this.dateVal[1],"0"===this.receiptParams.type){var t=this.receiptParams,a=t.page_index,n=t.page_size,r=t.id,i=t.start_at,o=t.end_at;Object(s["c"])({page_index:a,page_size:n,id:r,start_at:i,end_at:o}).then((function(t){200===t.code&&(e.receiptList=t.data.list.list,e.receiptTotal=t.data.total)}))}else Object(s["e"])(this.receiptParams).then((function(t){200===t.code?(e.receiptList=t.data.list.list,e.receiptTotal=t.data.total):e.$message.error(t.msg||"获取收款记录失败")}));else this.$message.warning("请先选择时间")},handleClick:function(e){var t=e.name;switch(t){case"first":this.getInfo();case"second":this.getUser();break;case"third":this.getCurrentMonthFirst(),this.getCurrentMonthLast(),this.getReceipt();break;default:break}},changeState:function(e){this.receiptParams.type=e.name,this.receiptParams.page_index=1,this.getReceipt()},changedate:function(e){this.receiptParams.cycle=e.name,this.receiptParams.page_index=1,this.getReceipt()},handleDisable:function(e,t){var a=this,n=e.id,r=e.name,s=e.status;if(0!==s){var i=0===s?"禁用":"启用";this.$confirm("确认要".concat(i).concat(r),{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){a.operaDisabled(n,r,t,s)}))}else this.$prompt("请输入禁用原因","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^.+$/,inputErrorMessage:"禁用原因不能为空"}).then((function(e){var i=e.value;console.log(i,"value"),a.operaDisabled(n,r,t,s,i)})).catch((function(){a.$message({type:"info",message:"取消输入"})}))},operaDisabled:function(e,t,a,n,r){var i=this,o=0===a?s["j"]:s["o"],l=0===a?{id:e,remark:r}:{id:e};o(l).then((function(e){200===e.code?(i.$message.success(0===n?"已禁用".concat(t):"已启用".concat(t)),0===a?i.getList():i.getUser()):i.$message.error("设置失败")}))},changePagination:function(e,t){console.log(e,t);var a=e.page,n=e.limit;this.params.page_size=n,this.params.page_index=a,this.getList()},userPage:function(e){var t=e.page,a=e.limit;this.userParams.page_size=a,this.userParams.page_index=t,this.getUser()},receiptPage:function(e){var t=e.page,a=e.limit;this.receiptParams.page_size=a,this.receiptParams.page_index=t,this.getReceipt()},toSearch:function(){this.params.page_index=1,this.getList()}}},c=l,u=(a("a4f3"),a("2877")),d=Object(u["a"])(c,n,r,!1,null,"332de843",null);t["default"]=d.exports},"4ec9":function(e,t,a){"use strict";var n=a("6d61"),r=a("6566");e.exports=n("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r)},"61cf":function(e,t,a){},"73f5":function(e,t,a){"use strict";a.d(t,"j",(function(){return r})),a.d(t,"l",(function(){return s})),a.d(t,"n",(function(){return i})),a.d(t,"o",(function(){return o})),a.d(t,"m",(function(){return l})),a.d(t,"b",(function(){return c})),a.d(t,"f",(function(){return u})),a.d(t,"e",(function(){return d})),a.d(t,"k",(function(){return p})),a.d(t,"i",(function(){return m})),a.d(t,"d",(function(){return f})),a.d(t,"a",(function(){return h})),a.d(t,"h",(function(){return g})),a.d(t,"g",(function(){return _})),a.d(t,"c",(function(){return b}));var n=a("b775"),r=function(e){return Object(n["a"])({url:"/store/disabled",method:"post",params:e})},s=function(e){return Object(n["a"])({url:"/store/list",method:"get",params:e})},i=function(e){return Object(n["a"])({url:"/store/get_all_user",method:"get",params:e})},o=function(e){return Object(n["a"])({url:"/user/disabled",method:"post",data:e})},l=function(e){return Object(n["a"])({url:"/store/query",method:"get",params:e})},c=function(e){return Object(n["a"])({url:"/store/get_account_info",method:"get",params:e})},u=function(e){return Object(n["a"])({url:"/store/get_withdrawal_state",method:"get",params:e})},d=function(e){return Object(n["a"])({url:"/store/get_account_detail",method:"get",params:e})},p=function(e){return Object(n["a"])({url:"/store/export",method:"get",params:e})},m=function(e){return Object(n["a"])({url:"/store/set_wx_auth",method:"post",data:e})},f=function(e){return Object(n["a"])({url:"/store/get_data_info",method:"get",params:e})},h=function(e){return Object(n["a"])({url:"/store/deleteStore",method:"post",params:e})},g=function(e){return Object(n["a"])({url:"/store/resDelStore",method:"post",params:e})},_=function(e){return Object(n["a"])({url:"/store/newStore",method:"post",params:e})},b=function(e){return Object(n["a"])({url:"/store/get_account_detail_all",method:"get",params:e})}},a4f3:function(e,t,a){"use strict";a("61cf")}}]);