| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251 |
- <div id="user_detail_view" v-if="detailInfo" v-cloak>
- <div class="user_info">
- <div class="user_detail">
- <el-image style="height:50px;width:50px;border-radius: 50%;margin-right: 20px;" :src="detailInfo.avatar_url?detailInfo.avatar_url:'/resources/img/common/default-avatar.png'" lazy></el-image>
- <div style="flex:1;">
- <div style="margin-bottom: 20px;" class="my_flex">
- <div style="flex:1;">
- <div class="user_name">
- {{detailInfo.nickname}}
- </div>
- <div class="info">
- <div>
- <span>ID:</span>
- <span class="text">{{detailInfo.id || '无'}}</span>
- </div>
- <div>
- <span>来源渠道:</span>
- <span class="text">{{detailInfo.platform || '无'}}</span>
- </div>
- <div>
- <span>所有登录渠道:</span>
- <span class="text">{{detailInfo.all_platform|| '无'}}</span>
- </div>
- </div>
- </div>
- <div>
- <el-tooltip class="item" effect="light" content="清除用户微信公众号及微信小程序授权" placement="top">
- <el-button size="small" @click="clearAuth">清除授权</el-button>
- </el-tooltip>
- <el-button size="small" @click="promotePop">{{detailInfo.is_inviter==1?'关闭推广资格':'开启推广资格'}}</el-button>
- <el-button size="small" type="primary" @click="handleListOfNames">{{detailInfo.status == 0?'加入白名单':'加入黑名单'}}</el-button>
- </div>
- </div>
- <el-row :gutter="24" style="margin-bottom: 20px;">
- <el-col :span="6">手机号:{{detailInfo.mobile || '无'}}
- <i class="el-icon-edit" @click="upMobile"></i>
- <span class="title_bu_text">|</span>
- <span class="title_bu" style="margin-left:0;" @click="dialogVisibleTPopChangeMobile">
- 修改记录
- </span>
- </el-col>
- <el-col :span="6">注册时间:{{detailInfo.created_at | dateTimeFormat("Y-m-d H:i:s")}}</el-col>
- <el-col :span="6">会员等级:{{detailInfo.level || '无'}}
- <i class="el-icon-edit hover-close" @click="updateLevel"></i>
- </el-col>
- <el-col :span="6">来源方式:{{detailInfo.source || '无'}}</el-col>
- </el-row>
- <el-row :gutter="24" style="margin-bottom: 20px;">
- <el-col :span="6">最近浏览:{{detailInfo.last_login_at | dateTimeFormat("Y-m-d H:i:s") }}</el-col>
- <el-col :span="6">公众号:{{detailInfo.is_follow || '无'}}</el-col>
- <el-col :span="6">默认收货地址:{{detailInfo.address || '无'}}</el-col>
- <el-col :span="6">邀请码:{{detailInfo.invite_code || '无'}}</el-col>
- </el-row>
- <el-row :gutter="24" style="margin-bottom: 20px;">
- <el-col :span="6">
- <span>推荐人:{{detailInfo.parent_nickname || '无'}}</span>
- <i class="el-icon-edit" @click="dialogVisiblePop"></i>
- <span class="title_bu_text" v-if="is_show_user_relationship_log==1">|</span>
- <span class="title_bu" style="margin-left:0;" @click="dialogVisibleTPop" v-if="is_show_user_relationship_log==1">
- 修改记录
- </span>
- </el-col>
- <el-col :span="6">
- <span>修改密码:</span>
- <i class="el-icon-edit" @click="changePasswordPop=true"></i>
- </el-col>
- <el-col :span="6">
- 真实姓名:{{detailInfo.username || '无'}}
- <i class="el-icon-edit" @click="upUsername"></i>
- </el-col>
- <el-col :span="6">
- 会员过期时间:{{detailInfo.user_level_expired}}
- </el-col>
- </el-row>
- <el-row :gutter="24" style="margin-bottom: 20px;">
- <el-col :span="6">
- 备注:{{detailInfo.remark || '无'}}
- <i class="el-icon-edit" @click="upDescPop"></i>
- </el-col>
- <el-col :span="6">
- <span>登录设备:</span>
- <span>{{ getDeviceTypeText(detailInfo.device_type) }}</span>
- </el-col>
- <el-col :span="6">
- <span>设备MAC地址:</span>
- <span>{{ detailInfo.device_mac }}</span>
- </el-col>
- <el-col :span="6">
- <span>重置支付密码:</span>
- <i class="el-icon-edit" @click="paymentForm.is_reset_box_show = true"></i>
- </el-col>
- </el-row>
- </div>
- </div>
- </div>
- <!-- 会员资料 -->
- <div class="user_material">
- <div class="material_m">
- <div class="material_title ">
- <span>会员资料</span>
- <span class="title_bu" @click="updateUserInfoPop">编辑</span>
- </div>
- <el-row :gutter="24" style="margin-bottom: 20px;">
- <el-col :span="10">性别:{{detailInfo.sex_text || '-'}}</el-col>
- <el-col :span="8">出生年月:{{detailInfo.birthday || '-' }}</el-col>
- <el-col :span="6">微信号:{{detailInfo.wechat || '-'}}</el-col>
- </el-row>
- <el-row :gutter="24" style="margin-bottom: 20px;">
- <el-col :span="10">身份证号:{{detailInfo.id_card || '-'}}</el-col>
- <el-col :span="6">地区:{{detailInfo.area.province + detailInfo.area.city + detailInfo.area.area || '-'}}</el-col>
- </el-row>
- </div>
- <div class="material_m">
- <div class="material_title my_flex">
- <div style="flex:1;">推广身份</div>
- <div>
- <el-tooltip class="item" effect="dark" content="时间是升级身份的时间" placement="bottom">
- <i style="color: #BFBFBF;" class="el-icon-question"></i>
- </el-tooltip>
- </div>
- </div>
- <el-row :gutter="24" style="margin-bottom: 20px;" v-for="item in materialArr">
- <el-col :span="12" class="my_flex" v-for="val in item">
- <div style="flex: 1">{{val.name}}:{{val.level_name}}</div>
- <div>{{val.time}}</div>
- </el-col>
- </el-row>
- </div>
- </div>
- <!-- 用户资产 -->
- <div class="user_assets user_info">
- <div class="material_title">
- 用户资产
- </div>
- <el-row :gutter="24" style="margin-bottom: 20px;" v-for="item in propertyArr.slice(propertyPage*propertyCount,(propertyPage+1)*propertyCount)">
- <el-col :span="12" class="assets_ms" v-for="val in item">
- <div class="assets_title my_flex">
- <div>{{val.name}}</div>
- <div class="title_bu" @click="addM(val.englists,val.code)" v-if="val.englists == 'balance' || val.englists == 'score'|| val.englists == 'redpack' || val.englists == 'red_packet' || val.englists == 'currency'|| val.englists == 'digital'">
- <!-- {{val.englists == 'balance'?'充余额':val.englists == 'redpack'?'充红包':val.englists == 'score'?'充积分':val.englists == 'currency'?'充值'+val.name:''}}-->
- {{val.englists == 'balance'?'充余额':val.englists == 'redpack'?'充红包':val.englists == 'score'?'充积分':val.englists == 'currency'?'充值'+val.name:val.englists == 'digital'?'充数字币':''}}
- </div>
- <div style="flex: 1;text-align: end;" class="title_bu" @click="navDetail(val.englists,val.code)">查看明细</div>
- </div>
- <div class="my_flex assets_mo">
- <div class="assets_info" v-for="vv in val.list">
- <div>{{vv.name}}</div>
- <div class="info">{{vv.val}}</div>
- </div>
- </div>
- </el-col>
- </el-row>
- <div class="round_page">
- <div class="round" @click="uppropertySel(index)" :class="{page_sel: propertySel == index}" v-for="(item,index) in propertyMaxCount"></div>
- </div>
- </div>
- <!-- 用户标签 -->
- <div class="user_lable user_info" v-loading="tagLoading">
- <div class="material_title ">
- <span>用户标签</span>
- <span class="title_bu" @click="upTag">编辑</span>
- </div>
- <div class="my_flex">
- <el-tag
- v-for="item in detailInfo.tag"
- :key="item.userLabel.id"
- :color="item.userLabel.color"
- size="small"
- effect="dark"
- :closable="false"
- :hit="true"
- style="margin-left:10px"
- >
- <span>{{item.userLabel.name}} </span>
- <i class="hover-close el-icon-close" @click="delTag(item.label_id)"></i>
- </el-tag>
- <el-tag
- v-for="item in detailInfo.userMemberLabel"
- :key="item.id"
- :color="item.color"
- size="small"
- effect="dark"
- :closable="false"
- :hit="true"
- style="margin-left:10px"
- >
- <span>{{item.name}} </span>
- </el-tag>
- </div>
- </div>
- <!-- 社交能力 -->
- <div class="user_info">
- <div class="material_title my_flex">
- <div style="flex:1">社交能力</div>
- <div class="title_bu" style="font-size:16px;" v-if="detailInfo.is_show_my_customer" @click="navUserInfo">我的客户</div>
- </div>
- <div class="my_flex">
- <div v-for="(item,index) in socialityArr" class="assets_info">
- <div>{{item.name}}</div>
- <div class="info">{{item.value}}</div>
- </div>
- </div>
- </div>
- <!-- 购买能力 -->
- <!-- <div class="user_info">-->
- <!-- <div class="material_title ">-->
- <!-- <span>购买能力</span>-->
- <!-- <span class="title_bu" @click="gotoOrderIndex">累计订单</span>-->
- <!-- </div>-->
- <!-- <div class="my_flex">-->
- <!-- <div v-for="item in buyArr" class="assets_info">-->
- <!-- <div>{{item.name}}</div>-->
- <!-- <div class="info">{{item.value}}</div>-->
- <!-- </div>-->
- <!-- </div>-->
- <!-- </div>-->
- <!-- 兴趣爱好 -->
- <!-- <div class="user_info">-->
- <!-- <div class="material_title ">-->
- <!-- <span>兴趣爱好</span>-->
- <!-- </div>-->
- <!-- <el-tabs v-model="activeName" @tab-click="handleClick">-->
- <!-- <el-tab-pane :label="item.name" :name="item.type" v-for="item in detailInfo.interest">-->
- <!-- <el-table :data="item.list" stripe style="width: 100%">-->
- <!-- <el-table-column prop="no" label="序号" ></el-table-column>-->
- <!-- <el-table-column prop="name" :label="item.name + '名称'" ></el-table-column>-->
- <!-- <el-table-column prop="counts" label="浏览量" ></el-table-column>-->
- <!-- </el-table>-->
- <!-- </el-tab-pane>-->
- <!-- </el-tabs>-->
- <!-- </div>-->
- <!-- 修改上级推荐人 -->
- <el-dialog :close-on-click-modal="false" title="更换推荐人" :visible.sync="dialogVisible" width="50%">
- <el-alert title="风险警告" type="error" :closable="false" style="margin-bottom: 10px">
- 1.此操作有风险,如果无特别需求,不建议修改关系链。<br/>
- 2.修改关系链可能会导致数据不一致。<br/>
- 3.修改关系链不会立即生效,会根据你的提交任务排队处理。<br/>
- </el-alert>
- <el-form class="my_flex" style="margin-bottom: 10px;" v-model="searchForm" label-width="100px">
- <div style="width: 200px;margin-right: 10px;">
- <el-input size="small" v-model="searchForm.inviter_id" placeholder="请输入会员ID"></el-input>
- </div>
- <div style="width: 200px;margin-right: 10px;">
- <el-input size="small" v-model="searchForm.keyword" placeholder="请输入会员手机号"></el-input>
- </div>
- <el-tooltip class="item" effect="dark" content="没有推广资格的用户,搜索不出来" placement="top">
- <div>
- <el-button type="primary" size="small" @click="searchFun">查 询</el-button>
- </div>
- </el-tooltip>
- <div class="claer"></div>
- </el-form>
- <div style="color:#909090;">已选:{{selectUser?selectUser.nickname:''}}</div>
- <el-table stripe v-loading="listLoading" :data="searchInfo" style="margin-top: 5px;"
- @selection-change="selectionChange">
- <el-table-column width="100px" label="ID" props="id" align="center">
- <template slot-scope="props">
- <el-radio-group v-model="radioSelection" @change="selectionChange(props.row)">
- <el-radio :label="props.row.id"></el-radio>
- </el-radio-group>
- </template>
- </el-table-column>
- <el-table-column label="头像">
- <template slot-scope="props">
- <div><com-image width="40px" height="40px" mode="aspectFill" :src="props.row.avatar_url? props.row.avatar_url:'/resources/img/common/default-avatar.png'" style="border-radius: 50%;"></com-image></div>
- </template>
- </el-table-column>
- <el-table-column label="昵称" prop="nickname"></el-table-column>
- <el-table-column label="手机" prop="mobile"></el-table-column>
- <el-table-column label="会员等级" prop="level_name"></el-table-column>
- <!-- <el-table-column label="已绑定推荐人" prop="parent_name"></el-table-column>-->
- </el-table>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="confirmSelectUser">确认</el-button>
- <el-button :loading="btnLoading" type="primary" @click="changePlatform">修改成平台</el-button>
- </span>
- </el-dialog>
- <!-- 修改推荐人记录 -->
- <el-dialog :close-on-click-modal="false" title="修改记录" :visible.sync="dialogVisibleT" width="50%">
- <div style="color:#909090;">
- <span style="margin-right: 15px;">当前绑定上级:{{referrerName}}</span>
- <span>ID:{{referrerId}}</span>
- </div>
- <el-table :data="referrerList" stripe style="width: 100%" v-loading="referrerLoading">
- <el-table-column label="变更前绑定">
- <template slot-scope="props">
- <div>{{props.row.before_id == '0'?'平台':props.row.before_name?props.row.before_name:'无'}}</div>
- <div style="font-size: 12px;color:#909090;">会员ID:{{props.row.before_id}}</div>
- </template>
- </el-table-column>
- <el-table-column label="变更后绑定">
- <template slot-scope="props">
- <div>{{props.row.after_id == '0'?'平台':props.row.after_name?props.row.after_name:'无'}}</div>
- <div style="font-size: 12px;color:#909090;">会员ID:{{props.row.after_id}}</div>
- </template>
- </el-table-column>
- <el-table-column label="变更时间" prop="updated_at"></el-table-column>
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination @current-change="referrerPagination" background layout="prev, pager, next"
- :page-count="referrerPageCount" :current-page="referrerPage"></el-pagination>
- </div>
- </el-dialog>
- <el-dialog :close-on-click-modal="false" title="修改记录" :visible.sync="dialogVisibleChangeMobile" width="50%">
- <el-table :data="referrerList" style="width: 100%" v-loading="referrerLoading">
- <el-table-column label="操作员">
- <template slot-scope="props">
- <div style="font-size: 12px;color:#909090;">{{props.row.operator}}</div>
- </template>
- </el-table-column>
- <el-table-column label="修改后">
- <template slot-scope="props">
- <div style="font-size: 12px;color:#909090;">{{props.row.new_mobile}}</div>
- </template>
- </el-table-column>
- <el-table-column label="修改前">
- <template slot-scope="props">
- <div style="font-size: 12px;color:#909090;">{{props.row.old_mobile}}</div>
- </template>
- </el-table-column>
- <el-table-column label="变更时间" prop="created_at"></el-table-column>
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination @current-change="referrerPagination" background layout="prev, pager, next"
- :page-count="referrerPageCount" :current-page="referrerPage"></el-pagination>
- </div>
- </el-dialog>
- <!-- 修改备注 -->
- <el-dialog :close-on-click-modal="false" title="修改备注" :visible.sync="userDescPop" width="50%">
- <el-input v-model="newDesc" placeholder="请输入你要备注的内容"></el-input>
- <span slot="footer" class="dialog-footer">
- <el-button @click="userDescPop = false">取 消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="updateDesc">确认</el-button>
- </span>
- </el-dialog>
- <!-- 修改真实姓名 -->
- <el-dialog :close-on-click-modal="false" title="修改真实姓名" :visible.sync="usernamePop" width="50%">
- <el-input v-model="username" placeholder="请输入真实姓名"></el-input>
- <span slot="footer" class="dialog-footer">
- <el-button @click="usernamePop = false">取 消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="updateUsername">确认</el-button>
- </span>
- </el-dialog>
- <el-dialog :close-on-click-modal="false" title="修改手机号码" :visible.sync="descPop" width="50%">
- <el-input v-model="mobile" placeholder="请输入手机号码"></el-input>
- <span slot="footer" class="dialog-footer">
- <el-button @click="descPop = false">取 消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="updateMobile">确认</el-button>
- </span>
- </el-dialog>
- <!-- 修改会员资料 -->
- <el-dialog :close-on-click-modal="false" title="编辑基本信息" :visible.sync="userInfoPop" width="50%">
- <el-form ref="form" :model="userForm" label-width="100px" ref="integralForm">
- <el-form-item label="性别:" prop="sex">
- <div style="width: 200px;">
- <el-select v-model="userForm.sex" placeholder="请选择性别">
- <el-option label="男" value="1"></el-option>
- <el-option label="女" value="2"></el-option>
- </el-select>
- </div>
- </el-form-item>
- <el-form-item label="出生年月:">
- <div style="width: 200px;">
- <el-date-picker value-format="yyyy-MM-dd" type="date" placeholder="选择日期" v-model="userForm.birthday" style="width: 100%;"></el-date-picker>
- </div>
- </el-form-item>
- <el-form-item label="微信号:">
- <div style="width: 200px;">
- <el-input v-model="userForm.wechat" placeholder="请输入微信号"></el-input>
- </div>
- </el-form-item>
- <el-form-item label="地区:">
- <div class="my_flex up_user_s">
- <!-- <el-select v-model="userForm.province_id" placeholder="省" @change="upAddrs">-->
- <!-- <el-option :label="item.name" :value="item.id" v-for="item in addrs" :key="item.id"></el-option>-->
- <!-- </el-select>-->
- <!-- <el-select v-model="userForm.city_id" placeholder="市" @change="upCity">-->
- <!-- <el-option :label="item.name" :value="item.id" v-for="item in cityArr" :key="item.id"></el-option>-->
- <!-- </el-select>-->
- <!-- <el-select v-model="userForm.area_id" placeholder="区">-->
- <!-- <el-option :label="item.name" :value="item.id" v-for="item in areaArr" :key="item.id"></el-option>-->
- <!-- </el-select>-->
- <el-select v-model="regionArr[0]" size="small" placeholder="请选择" @change="getCity">
- <el-option v-for="item in province" :key="item.id" :label="item.name" :value="item.name"></el-option>
- </el-select>
- <el-select v-model="regionArr[1]" size="small" placeholder="请选择" @change="getDistrict">
- <el-option v-for="item in city" :key="item.id" :label="item.name" :value="item.name"></el-option>
- </el-select>
- <el-select v-model="regionArr[2]" size="small" placeholder="请选择" @change="getArea">
- <el-option v-for="item in district" :key="item.id" :label="item.name" :value="item.name"></el-option>
- </el-select>
- </div>
- </el-form-item>
- <el-form-item label="身份证号码:">
- <div style="width: 200px;">
- <el-input v-model="userForm.id_card" placeholder="请输入身份证号码"></el-input>
- </div>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="userInfoPop = false">取 消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="updateUserInfo">确认</el-button>
- </span>
- </el-dialog>
- <!-- 充值余额 -->
- <el-dialog :close-on-click-modal="false" :title="hintBoo?'提示':'充值余额'" :visible.sync="dialogBalance" width="30%" @close="closePop">
- <div v-if="hintBoo">
- 选择清空余额,是否还要继续
- </div>
- <el-form v-else :model="balanceForm" label-width="80px" :rules="balanceFormRules" ref="integralForm">
- <el-form-item label="余额数量" prop="price" size="small">
- <el-input type="number" v-model="balanceForm.price" placeholder="请输入要加/减的余额(-1代表减1余额)"></el-input>
- </el-form-item>
- <el-form-item label="备注" prop="remark" size="small">
- <el-input v-model="balanceForm.remark"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogBalance = false">取消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="balanceSubmit">确定</el-button>
- </div>
- </el-dialog>
- <!-- 充值积分 -->
- <el-dialog :close-on-click-modal="false" :title="hintBoo?'提示':'充值积分'" :visible.sync="dialogIntegral" width="30%" @close="closePop">
- <div v-if="hintBoo">
- 选择清空积分,是否还要继续
- </div>
- <el-form v-else :model="integralForm" label-width="80px" :rules="integralFormRules" ref="integralForm">
- <el-form-item label="积分数量" prop="num" size="small">
- <el-input type="number" v-model="integralForm.num" placeholder="请输入要加/减的积分值(-1代表减1积分)"></el-input>
- </el-form-item>
- <el-form-item label="备注" prop="remark" size="small">
- <el-input v-model="integralForm.remark" placeholder="备注原因"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogIntegral = false">取消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="integralSubmit">确定</el-button>
- </div>
- </el-dialog>
- <!-- 货币充值 -->
- <el-dialog :close-on-click-modal="false" title="货币充值" :visible.sync="currencyBoo" width="30%">
- <el-form :model="currencyForm" label-width="80px" :rules="currencyFormRules" ref="integralForm">
- <el-form-item label="货币数量" prop="money" size="small">
- <el-input type="number" v-model="currencyForm.money" placeholder="请输入要加/减的货币值(-1代表减1货币)"></el-input>
- </el-form-item>
- <el-form-item label="备注" prop="desc" size="small">
- <el-input v-model="currencyForm.desc"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="currencyBoo = false">取消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="currencySubmit">确定</el-button>
- </div>
- </el-dialog>
- <!-- 加标签 -->
- <el-dialog :close-on-click-modal="false" title="编辑标签" :visible.sync="labelBoo" width="30%">
- <el-select
- v-model="lableValue"
- multiple
- filterable
- allow-create
- default-first-option
- placeholder="请选择会员标签"
- >
- <el-option
- v-for="item in userTagList"
- :key="item.tag_id"
- :label="item.name"
- :value="item.tag_id">
- </el-option>
- </el-select>
- <div slot="footer" class="dialog-footer">
- <el-button v-loading="tagLoading" @click="labelBoo = false">取消</el-button>
- <el-button :loading="btnLoading" v-loading="tagLoading" type="primary" @click="labelSubmit">确定</el-button>
- </div>
- </el-dialog>
- <!-- 编辑会员等级 -->
- <el-dialog :close-on-click-modal="false" title="修改会员等级" :visible.sync="userRankPop" width="30%">
- <el-form label-position="right" label-width="80px">
- <el-form-item label="等级名称">
- <el-select v-model="selUserRank" placeholder="请选择会员等级">
- <el-option :label="default_level_name" value="0"></el-option>
- <el-option
- v-for="(item,index) in detailInfo.user_level_list"
- :key="index"
- :label="item"
- :value="index">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="userRankPop = false">取 消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="updateRank">确认</el-button>
- </span>
- </el-dialog>
- <!-- 修改密码 -->
- <el-dialog :close-on-click-modal="false" title="修改密码" :visible.sync="changePasswordPop" width="30%">
- <el-form label-position="right" @submit.native.prevent label-width="80px">
- <el-form-item label="密码">
- <el-input placeholder="请输入密码" v-model="change_password" @keyup.enter.native="changePasswordSubmit" show-password></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="changePasswordPop = false">取消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="changePasswordSubmit">确定</el-button>
- </div>
- </el-dialog>
- <!-- 加入黑白名单 -->
- <el-dialog :close-on-click-modal="false" title="提示" :visible.sync="listOfNamesBoo" width="30%">
- <div>
- {{balanceForm.status == 1?'您确认加入黑名单吗':'您确认加入白名单吗'}}
- </div>
- <div style="line-height: 30px;color: #FA6565;" v-if="balanceForm.status == 1">
- 拉黑后,该账号将无法访问商城
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="listOfNamesBoo = false">取消</el-button>
- <el-button :loading="btnLoading" :loading="btnLoading" type="primary" @click="listOfNamesBooSubmit">确定</el-button>
- </div>
- </el-dialog>
- <!-- 红包充值 -->
- <el-dialog :close-on-click-modal="false" :title="hintBoo?'提示':'红包充值'" :visible.sync="dialogRedpack" width="30%" @close="closePop">
- <div v-if="hintBoo">
- 选择清空余额,是否还要继续
- </div>
- <el-form v-else :model="redpackForm" label-width="80px" :rules="redpackFormRules" ref="integralForm">
- <el-form-item label="红包金额" prop="redpack_money" size="small">
- <el-input onInput="value = toNumber(value, 2, true)" v-model="redpackForm.redpack_money" placeholder="请输入要加/减的余额(-1代表减1余额)"></el-input>
- </el-form-item>
- <el-form-item label="红包类型" prop="redpack_type" size="small">
- <el-radio-group v-model="redpackForm.redpack_type">
- <el-radio label="frozen_redpack">冻结红包</el-radio>
- <el-radio label="redpack">激活红包</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="备注" prop="remark" size="small">
- <el-input v-model="redpackForm.remark"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogRedpack = false">取消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="redpackSubmit">确定</el-button>
- </div>
- </el-dialog>
- <!-- 是否开启推广资格 -->
- <el-dialog :close-on-click-modal="false" title="提示" :visible.sync="promoteBoo" width="30%">
- <div>
- {{detailInfo.is_inviter==1?'关闭后该会员无法绑定下级,是否确认关闭':'是否开启推广资格'}}
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="promoteBoo = false">取消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="promoteSubmit">确定</el-button>
- </div>
- </el-dialog>
- <!-- 优惠券 -->
- <el-dialog :close-on-click-modal="false" title="优惠券" :visible.sync="couponBoo" width="50%">
- <el-radio-group v-model="couponListType" size="mini" @input="couponListTypeChange">
- <el-radio-button label="1">商城平台</el-radio-button>
- <el-radio-button label="2">o2o门店</el-radio-button>
- </el-radio-group>
- <el-tabs v-model="couponSel" @tab-click="couponClick">
- <el-tab-pane :label="item.name" :name="item.type" v-for="item in couponType">
- <el-table :data="couponListData" stripe style="width: 100%" v-loading="couponLoading">
- <el-table-column key='1' type="index" prop="name" label="序号" ></el-table-column>
- <el-table-column key='1' prop="name" label="优惠券名称" ></el-table-column>
- <el-table-column key='2' prop="get_time" label="领取时间" >
- <template slot-scope="scope">{{scope.row.get_time | dateTimeFormat("Y-m-d H:i:s")}}</template>
- </el-table-column>
- <el-table-column key='2' prop="end_time" label="到期时间" >
- <template slot-scope="scope">{{scope.row.end_time | dateTimeFormat("Y-m-d H:i:s")}}</template>
- </el-table-column>
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination
- @current-change="upCouponPage"
- background
- layout="prev, pager, next"
- :page-count="couponPageCount"
- :current-page.sync="couponPage"
- ></el-pagination>
- </div>
- </el-tab-pane>
- </el-tabs>
- <el-dialog :close-on-click-modal="false" width="30%" title="提示" :visible.sync="delPop" append-to-body>
- <div>你确定是否删除</div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="delPop = false">取消</el-button>
- <el-button :loading="btnLoading" :loading="btnLoading" type="primary" @click="delSub(1)">确定</el-button>
- </div>
- </el-dialog>
- </el-dialog>
- <!-- 电子卷 -->
- <el-dialog :close-on-click-modal="false" title="电子卷" :visible.sync="e_couponBoo" width="50%">
- <el-tabs v-model="e_couponSel" @tab-click="e_couponClick">
- <el-tab-pane :label="item.name" :name="item.type" v-for="item in e_couponType">
- <el-table :data="e_couponList" stripe style="width: 100%" v-loading="e_couponLoading">
- <el-table-column key='1' prop="e_coupon_name" label="优惠券名称"></el-table-column>
- <el-table-column key='2' prop="created_at" :label="e_couponSel == '2'?'激活时间':e_couponSel == '3'?'兑换时间':'领取时间'" ></el-table-column>
- <el-table-column key='3' prop="expired_time" label="到期时间" v-if="e_couponSel == 1 || e_couponSel == 2 || e_couponSel == 4"></el-table-column>
- <el-table-column key='4' prop="status" label="状态" v-if="e_couponSel == 2"></el-table-column>
- <el-table-column key='5' prop="price" label="激活金额" v-if="e_couponSel == 1 || e_couponSel == 2"></el-table-column>
- <el-table-column key='6' prop="receive_amount" label="数量" v-if="e_couponSel == 1 || e_couponSel == 2"></el-table-column>
- <el-table-column key='7' label="操作" v-if="e_couponSel == '1'">
- <template slot-scope="scope">
- <el-button type="text" @click="delCoupon(scope.row.id)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination @current-change="upECouponPage" background layout="prev, pager, next"
- :page-count="ecouponPageCount" :current-page="ecouponPage"></el-pagination>
- </div>
- </el-tab-pane>
- </el-tabs>
- <el-dialog :close-on-click-modal="false" width="30%" title="提示" :visible.sync="delPop" append-to-body>
- <div>你确定是否删除</div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="delPop = false">取消</el-button>
- <el-button :loading="btnLoading" :loading="btnLoading" type="primary" @click="delSub(2)">确定</el-button>
- </div>
- </el-dialog>
- </el-dialog>
- <!--重置支付密码-->
- <el-dialog :close-on-click-modal="false" title="重置支付密码" :visible.sync="paymentForm.is_reset_box_show" :before-close="clearResetPayment" width="30%">
- <el-form label-position="right" :model="paymentForm" :rules="paymentResetRules" ref="paymentForm" label-width="80px">
- <el-form-item label="密码" prop="password">
- <el-input placeholder="请输入密码" v-model="paymentForm.password" show-password></el-input>
- </el-form-item>
- <el-form-item label="确认密码" prop="ack_password" required>
- <el-input placeholder="请输入确认密码" v-model="paymentForm.ack_password" show-password></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="clearResetPayment">取消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="resetPaymentPasswordSubmit">确定</el-button>
- </div>
- </el-dialog>
- <!-- 充值数字币 -->
- <el-dialog :close-on-click-modal="false" :title="hintBoo?'提示':'充值数字币'" :visible.sync="dialogDigital" width="30%" @close="closePop">
- <el-form :model="digitalForm" label-width="80px" :rules="digitalFormRules" ref="dialogForm">
- <el-form-item label="数字币数量" prop="price" size="small">
- <el-input type="number" v-model="digitalForm.price" placeholder="请输入要加/减的数字币(-1代表减1余额)"></el-input>
- </el-form-item>
- <el-form-item label="备注" prop="remark" size="small">
- <el-input v-model="digitalForm.remark"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogDigital = false">取消</el-button>
- <el-button :loading="btnLoading" type="primary" @click="digitalSubmit">确定</el-button>
- </div>
- </el-dialog>
- </div>
- <script>
- // getQuery('order_id'),
- const app = new Vue({
- el: '#user_detail_view',
- data() {
- return {
- user_id: 0,
- detailInfo: null,
- materialArr: [],
- paymentForm: {
- password: '',
- ack_password: '',
- is_reset_box_show: false
- },
- paymentResetRules: {
- password: [
- { required: true, message: '请输入密码', trigger: 'blur' },
- { min: 6,max: 6, message: '支付密码只能为六位字符', trigger: 'blur' },
- { pattern: /^[0-9]*$/, message: '支付密码必须为数字', trigger: 'blur' },
- ],
- ack_password: [
- { validator: this.paymentAckPassword, trigger: 'blur' },
- ],
- },
- socialityArr: [
- {
- type: 'team_count',
- name: '团队人数',
- value: '0'
- },{
- type: 'first',
- name: '好友人数',
- value: '0'
- },{
- type: 'second',
- name: '粉丝人数',
- value: '0'
- }
- ],
- buyArr: [
- {
- type: 'total_price',
- name: '累计消费金额(元)',
- value: '0',
- v_type: 'double'
- },{
- type: 'total_orders',
- name: '累计消费订单数',
- value: '0',
- v_type: 'num'
- },{
- type: 'unit_price',
- name: '客单价(元)',
- value: '0',
- v_type: 'double'
- },{
- type: 'last_time',
- name: '最近下单时间',
- value: '-',
- v_type: 'time'
- },{
- type: 'total_refund_price',
- name: '累计退款金额(元)',
- value: '0',
- v_type: 'double'
- },{
- type: 'total_refund_orders',
- name: '累计退款订单数',
- value: '0',
- v_type: 'num'
- },
- ],
- propertyArr:[],
- activeName: '',
- propertyPage: 0,
- propertyCount: 2,
- propertyMaxCount: 1,
- propertySel: 0,
- searchForm: {
- inviter_id: '',
- keyword: '',
- },
- dialogVisible: false,//修改推荐人弹窗
- searchInfo: [],//修改推荐人搜索出来的内容
- listLoading: false,
- radioSelection: 0,//选中用户ID
- selectUser: null, //选中的用户
- dialogVisibleT: false,//修改记录弹窗
- dialogVisibleChangeMobile: false,//修改记录弹窗
- referrerList: [],//推荐人记录
- referrerName: '',
- referrerId: '',
- referrerLoading: false,
- referrerPage: 1,
- referrerPageCount: 0,
- descPop: false, //备注弹框
- usernamePop: false, //修改用户名
- userDescPop: false, //备注弹框
- newDesc: '',//备注内容
- userForm: { //修改会员资料
- sex: '',
- birthday: '',
- wechat: '',
- province: '',
- city: '',
- area: '',
- id_card: '',
- province_id: '',
- city_id: '',
- area_id: '',
- },
- userInfoPop: false,//修改会员资料弹窗
- regionArr: [],
- province: [],//省市区列表
- city: [],//市列表
- district: [],//区列表
- dialogBalance: false,
- balanceForm: {
- type: '1',
- price: '',
- pic_url: '',
- remark: '',
- },
- balanceFormRules: {
- price: [
- {required: true, message: '金额不能为空', trigger: 'blur'},
- ],
- // remark: [
- // {required: true, message: '备注不能为空', trigger: 'blur'},
- // ]
- },
- hintBoo: false,
- integralOrBalanceType: 1, //积分或余额充值状态,1:加或减 2:标识清零
- btnLoading: false,
- //积分
- dialogIntegral: false,
- integralForm: {
- type: '1',
- num: '',
- pic_url: '',
- remark: '',
- },
- integralFormRules: {
- num: [
- {required: true, message: '积分数量不能为空', trigger: 'blur'},
- ],
- // remark: [
- // {required: true, message: '备注不能为空', trigger: 'blur'},
- // ]
- },
- // 货币
- currencyBoo: false,
- currencyFormRules: {
- money: [
- {required: true, message: '货币数量不能为空', trigger: 'blur'},
- ],
- desc: [
- {required: true, message: '备注不能为空', trigger: 'blur'},
- ],
- code: [
- {required: true, message: '货币类型不能为空', trigger: 'blur'},
- ]
- },
- currencyForm: {
- type: '1',
- code:'',
- money: '',
- desc: '',
- },
- currencyList: [],
- specifyCurrency: false,//是否指定货币充值
- // 标签
- labelBoo: false,
- lableValue: [],
- userTagList: [],//会员标签列表
- // 黑白名单
- listOfNamesBoo: false,
- // 推广资格
- promoteBoo: false,
- // 修改密码
- changePasswordPop: false,
- change_password: null,
- // 优惠卷
- couponBoo: false,
- couponSel: '2',
- couponType: [
- {
- name: '可使用',
- type: '2'
- },
- {
- name: '已使用',
- type: '1'
- },
- {
- name: '已过期',
- type: '3'
- },
- {
- name: '已失效',
- type: '4'
- }
- ],
- couponList: [],
- couponListData: [],
- couponListType: '1', // 优惠券列表类型
- couponLoading: false,
- couponPage: 1,
- couponPageCount: 0,
- // 电子卷
- e_couponBoo: false,
- e_couponSel: '1',
- e_couponType: [{
- name: '未激活',
- type: '1'
- },{
- name: '已激活',
- type: '2'
- },{
- name: '已兑换',
- type: '3'
- },{
- name: '未激活',
- type: '4'
- }],
- e_couponList: [],
- e_couponLoading: false,
- ecouponPage: 1,
- ecouponPageCount: 0,
- // 删除卷弹窗
- delPop: false,
- delId: 0,//删除ID
- userRankPop: false, //编辑会员等级
- tagLoading: false,
- //红包
- dialogRedpack: false,
- redpackForm: {
- redpack_type: "frozen_redpack",
- redpack_money: '',
- user_id:'',
- remark: '',
- },
- redpackFormRules: {
- redpack_money: [
- {required: true, message: '红包金额不能为空', trigger: 'blur'},
- ],
- },
- redpack_type:[],//红包类型
- selUserRank:'',
- username:'',
- mobile:'',
- default_level_name: '普通会员',
- is_show_user_relationship_log:0,
- dialogDigital:false,
- digitalForm: {
- user_id:'',
- price: '',
- remark: '',
- },
- digitalFormRules: {
- price: [
- {required: true, message: '数字币数量不能为空', trigger: 'blur'},
- ],
- // remark: [
- // {required: true, message: '备注不能为空', trigger: 'blur'},
- // ]
- },
- }
- },
- mounted(){
- this.user_id = getQuery('id');
- this.getList();
- this.getTagList();
- // this.getCurrencyList();
- },
- methods:{
- getList(){
- let that = this;
- request({
- params: {
- r: 'mall/user/user-detail',
- id: this.user_id
- },
- method: 'get'
- }).then(res => {
- if(res.data.code == 0){
- this.propertyArr = [];
- this.detailInfo = res.data.data.detail;
- this.is_show_user_relationship_log = res.data.data.is_show_user_relationship_log;
- let arr = [];
- this.detailInfo.user_promote_identity.forEach((v,i) => {
- arr.push(v);
- // if((i+1) % 2 == 0){
- that.materialArr.push(arr);
- arr = [];
- // }
- })
- let arrTwo = [];
- this.detailInfo.user_property.forEach((v,i) => {
- arrTwo.push(v);
- if((i+1) % 2 == 0){
- that.propertyArr.push(arrTwo);
- arrTwo = [];
- } else if(i+1 == this.detailInfo.user_property.length){
- that.propertyArr.push(arrTwo);
- arrTwo = [];
- }
- })
- // debugger;
- this.propertyMaxCount = Math.ceil(this.propertyArr.length / this.propertyCount);
- // console.info(this.propertyMaxCount);
- for (const key in this.detailInfo.team) {
- let info = this.socialityArr.filter(v => v.type == key); //订单概况
- if(info.length){
- let index = this.socialityArr.findIndex(v => v.type==info[0].type);
- this.socialityArr[index].value = this.detailInfo.team[key];
- }
- }
- for (const key in this.detailInfo.buy_power) {
- let info = this.buyArr.filter(v => v.type == key); //订单概况
- if(info.length){
- let index = this.buyArr.findIndex(v => v.type==info[0].type);
- this.buyArr[index].value = this.detailInfo.buy_power[key];
- }
- }
- if(this.detailInfo.interest.length){
- this.activeName = this.detailInfo.interest[0].type;
- }
- console.log(this.propertyArr,555);
- this.checkedAll = false;
- this.default_level_name = res.data.data.default_level_name;
- }else{
- this.$message.error(res.data.msg);
- }
- this.tagLoading = false;
- }).catch(err => {
- })
- },
- uppropertySel(index){
- if(this.propertySel == index) return;
- this.propertyPage = index;
- this.propertySel = index;
- },
- handleClick(tab, event){
- },
- // 搜索
- searchFun(){
- if (!this.searchForm.inviter_id && !this.searchForm.keyword){
- this.$message.error('查询内容不能为空');
- this.listLoading = false;
- return false;
- }
- this.listLoading = true;
- request({
- params: {
- r: 'mall/user/get-can-bind-inviter',
- inviter_id: this.searchForm.inviter_id,
- keyword: this.searchForm.keyword,
- user_id: this.user_id,
- },
- }).then(e => {
- this.listLoading = false;
- if (e.data.code === 0) {
- this.searchInfo = e.data.data.list.list;
- } else {
- this.$message.error(res.data.msg);
- }
- }).catch(e => {
- this.listLoading = false;
- });
- },
- // 打开修改推荐人窗口
- dialogVisiblePop(){
- this.searchForm = {
- inviter_id: '',
- keyword: '',
- }
- this.searchInfo.splice(0,this.searchInfo.length);
- this.radioSelection = 0;
- this.selectUser = null;
- this.dialogVisible = true;
- },
- // 修改推荐人
- confirmSelectUser(){
- this.$confirm('是否修改推荐人?', '警告', {type: 'warning'}).then(() => {
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/update-parent'
- },
- method: 'post',
- data: {
- user_id: this.user_id,
- parent_id: this.radioSelection
- }
- }).then(res => {
- if (res.data.code == 0) {
- this.$message.success(res.data.msg);
- } else {
- this.$message.error(res.data.msg);
- }
- this.dialogVisible = false;
- this.btnLoading = false;
- }).catch(err => {
- console.info(err);
- this.btnLoading = false;
- this.dialogVisible = false;
- })
- });
- },
- changePlatform(){
- this.$confirm('是否把推荐人修改成平台?', '警告', {type: 'warning'}).then(() => {
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/update-parent'
- },
- method: 'post',
- data: {
- user_id: this.user_id,
- parent_id: 0
- }
- }).then(res => {
- if (res.data.code == 0) {
- this.$message.success(res.data.msg);
- } else {
- this.$message.error(res.data.msg);
- }
- this.dialogVisible = false;
- this.btnLoading = false;
- }).catch(err => {
- console.info(err);
- this.btnLoading = false;
- this.dialogVisible = false;
- })
- });
- },
- selectionChange(e){
- this.selectUser = e;
- },
- dialogVisibleTPopChangeMobile(){
- this.dialogVisibleChangeMobile = true;
- this.getChangeMobileList();
- },
- getChangeMobileList(){
- this.referrerLoading = true;
- request({
- params: {
- r: 'mall/user/get-change-mobile-log',
- user_id: this.user_id
- },
- method: 'get'
- }).then(res => {
- if(res.data.code == 0){
- this.referrerList = res.data.data.list;
- this.referrerPageCount = res.data.data.page_count;
- } else {
- this.$message.error(res.data.msg);
- }
- this.referrerLoading = false;
- }).catch(err => {
- console.info(err);
- this.referrerLoading = false;
- })
- },
- // 打开推荐人记录窗口
- dialogVisibleTPop(){
- this.dialogVisibleT = true;
- this.getReferrerList();
- },
- getReferrerList(){
- this.referrerLoading = true;
- request({
- params: {
- r: 'mall/user/user-change-parent-log',
- user_id: this.user_id
- },
- method: 'get'
- }).then(res => {
- if(res.data.code == 0){
- this.referrerList = res.data.data.list;
- this.referrerName = res.data.data.parent_nickname;
- this.referrerId = res.data.data.parent_id;
- this.referrerPageCount = res.data.data.page_count;
- } else {
- this.$message.error(res.data.msg);
- }
- this.referrerLoading = false;
- }).catch(err => {
- console.info(err);
- this.referrerLoading = false;
- })
- },
- // 推荐人记录分页
- referrerPagination(currentPage){
- this.referrerPage = currentPage;
- this.getReferrerList();
- },
- // 备注弹框
- upDescPop(){
- this.newDesc = this.detailInfo.remark;
- this.userDescPop = true;
- },
- upUsername(){
- this.username = this.detailInfo.username;
- this.usernamePop = true;
- },
- upMobile(){
- this.descPop = true;
- },
- // 修改备注
- updateDesc(){
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/edit-remark'
- },
- method: 'post',
- data: {
- remark: this.newDesc,
- user_id: this.user_id
- }
- }).then(res => {
- if(res.data.code == 0){
- this.$message.success(res.data.msg);
- this.detailInfo.remark = this.newDesc;
- } else{
- this.$message.error(res.data.msg);
- }
- this.btnLoading = false;
- this.userDescPop = false;
- }).catch(err => {
- this.btnLoading = false;
- this.userDescPop = false;
- })
- },
- updateUsername(){
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/edit-username'
- },
- method: 'post',
- data: {
- username: this.username,
- user_id: this.user_id
- }
- }).then(res => {
- if(res.data.code == 0){
- this.$message.success(res.data.msg);
- this.detailInfo.username = this.username;
- this.usernamePop = false;
- } else{
- this.$message.error(res.data.msg);
- }
- this.btnLoading = false;
- this.descPop = false;
- }).catch(err => {
- this.btnLoading = false;
- this.descPop = false;
- })
- },
- updateMobile(){
- this.btnLoading = true;
- this.$confirm('修改手机号后,登录账号也将相应的修改为新手机号?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request({
- params: {
- r: 'mall/user/update-mobile'
- },
- method: 'post',
- data: {
- mobile: this.mobile,
- user_id: this.user_id
- }
- }).then(res => {
- if(res.data.code == 0){
- this.$message.success(res.data.msg);
- this.detailInfo.mobile = this.mobile;
- } else{
- this.$message.error(res.data.msg);
- }
- this.btnLoading = false;
- this.descPop = false;
- }).catch(err => {
- this.btnLoading = false;
- this.descPop = false;
- })
- }).catch(err => {
- this.btnLoading = false;
- })
- },
- openAddress() {
- request({
- params: {
- r: 'common/region/list',
- level: 3
- },
- }).then(res => {
- this.province = res.data.data.list;
- for (let i = 0; i < this.province.length; i++) {
- if (this.regionArr[0] == this.province[i].name) {
- this.city = this.province[i].children
- }
- }
- for (let i = 0; i < this.city.length; i++) {
- if (this.regionArr[1] == this.city[i].name) {
- this.district = this.city[i].children
- }
- }
- })
- },
- // 获取城市列表
- getCity() {
- for (let i = 0; i < this.province.length; i++) {
- if (this.regionArr[0] == this.province[i].name) {
- this.city = this.province[i].children
- this.regionArr[1] = this.city[0].name
- this.district = this.city[0].children
- this.regionArr[2] = this.district[0].name
- this.userForm.province = this.province[i].name;
- }
- }
- },
- // 获取区县
- getDistrict() {
- for (let i = 0; i < this.city.length; i++) {
- if (this.regionArr[1] == this.city[i].name) {
- this.district = this.city[i].children
- this.regionArr[2] = this.district[0].name
- this.userForm.city = this.city[i].name;
- }
- }
- },
- getArea(e) {
- this.district.forEach((it, i) => {
- if (it.name == e) {
- this.userForm.area = it.name;
- }
- })
- },
- // 编辑会员资料弹窗
- updateUserInfoPop(){
- this.regionArr = [this.detailInfo.area.province,this.detailInfo.area.city,this.detailInfo.area.area];
- this.openAddress();
- this.userInfoPop = true;
- this.userForm.sex = Boolean(this.detailInfo.sex)?this.detailInfo.sex + '':'';
- this.userForm.birthday = this.detailInfo.birthday;
- this.userForm.wechat = this.detailInfo.wechat;
- this.userForm.id_card = this.detailInfo.id_card;
- this.userForm.province = this.detailInfo.area.province;
- this.userForm.city = this.detailInfo.area.city;
- this.userForm.area = this.detailInfo.area.area;
- },
- // 修改会员资料
- updateUserInfo(){
- let boo = /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}(\d|x|X)$/.test(this.userForm.id_card);
- if(this.userForm.id_card.length > 0 && boo == false){
- this.$message.error("身份证格式错误");
- return;
- }
- this.btnLoading = true;
- this.userForm.user_id = this.user_id;
- if(!this.userForm.province){
- this.userForm.province = '';
- }
- if(!this.userForm.city){
- this.userForm.city = '';
- }
- if(!this.userForm.area){
- this.userForm.area = '';
- }
- if(!this.userForm.sex){
- this.userForm.sex = 0;
- }
- request({
- params: {
- r: 'mall/user/user-extra-edit'
- },
- method: 'post',
- data: this.userForm,
- }).then(res => {
- console.info(res);
- if(res.data.code == 0){
- this.detailInfo.sex = Boolean(this.userForm.sex)? this.userForm.sex + '':'';
- // this.userForm.sex = Boolean(this.detailInfo.sex)?this.detailInfo.sex + '':'';
- this.detailInfo.sex_text = this.userForm.sex == 1?'男':this.userForm.sex == 2?'女':'未知';
- this.detailInfo.birthday = this.userForm.birthday;
- this.detailInfo.wechat = this.userForm.wechat;
- this.detailInfo.id_card = this.userForm.id_card;
- this.detailInfo.area.province = this.userForm.province;
- this.detailInfo.area.city = this.userForm.city;
- this.detailInfo.area.area = this.userForm.area;
- this.$message.success(res.data.msg);
- }else{
- this.$message.error(res.data.msg);
- }
- this.userInfoPop = false;
- this.btnLoading = false;
- }).catch(err => {
- this.userInfoPop = false;
- this.btnLoading = false;
- })
- },
- handleRedpack(){
- this.redpackForm.redpack_money = "";
- this.redpackForm.remark = "";
- this.dialogRedpack = true;
- },
- // 余额验证
- redpackSubmit() {
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/redpack',
- },
- method: 'post',
- data: {
- user_id:this.user_id,
- type:this.redpackForm.redpack_type,
- money:this.redpackForm.redpack_money,
- desc:this.redpackForm.remark},
- }).then(e => {
- if (e.data.code === 0) {
- this.dialogRedpack = false;
- // location.reload();
- this.getList();
- } else {
- this.$message.error(e.data.msg);
- }
- this.dialogBalance = false;
- this.btnLoading = false;
- }).catch(e => {
- this.dialogBalance = false;
- this.btnLoading = false;
- });
- },
- // 关闭积分余额窗口
- closePop(){
- this.hintBoo = false;
- this.integralOrBalanceType = 1;
- },
- // 余额验证
- balanceSubmit() {
- // 批量清零
- if(this.integralOrBalanceType == 2){
- this.balanceRequest();
- return;
- }
- // 表单验证
- this.$refs.integralForm.validate((valid) => {
- if (valid) {
- this.balanceRequest();
- }
- });
- },
- //余额充值请求接口
- balanceRequest(){
- let num = Number(this.balanceForm.price);
- num >= 0 ?this.balanceForm.type = 1:this.balanceForm.type = 2;
- let para = Object.assign({}, this.balanceForm);
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/balance',
- },
- method: 'post',
- data: para,
- }).then(e => {
- if (e.data.code === 0) {
- location.reload();
- // this.getList();
- } else {
- this.$message.error(e.data.msg);
- }
- this.dialogBalance = false;
- this.btnLoading = false;
- }).catch(e => {
- this.dialogBalance = false;
- this.btnLoading = false;
- });
- },
- // 积分充值验证
- integralSubmit() {
- if(this.integralOrBalanceType == 2){
- this.integralRequest();
- return;
- }
- this.$refs.integralForm.validate((valid) => {
- if (valid) {
- this.integralRequest();
- }
- });
- },
- // 请求积分充值接口
- integralRequest(){
- let num = Number(this.integralForm.num);
- num >= 0 ?this.integralForm.type = 1:this.integralForm.type = 2;
- let para = Object.assign({}, this.integralForm);
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/score',
- },
- method: 'post',
- data: para,
- }).then(e => {
- if (e.data.code === 0) {
- location.reload();
- // this.integralForm.num = "";
- // this.getList();
- } else {
- this.$message.error(e.data.msg);
- }
- this.dialogIntegral = false;
- this.btnLoading = false;
- this.hintBoo = false;
- }).catch(e => {
- this.dialogIntegral = false;
- this.btnLoading = false;
- this.hintBoo = false;
- });
- },
- // 货币充值
- currencySubmit(){
- // 表单验证
- this.$refs.integralForm.validate((valid) => {
- if (valid) {
- let para = Object.assign({}, this.currencyForm);
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/add-currency',
- },
- method: 'post',
- data: para,
- }).then(res => {
- console.info(res);
- if(res.data.code == 0){
- location.reload();
- // this.getList();
- }else {
- this.$message.error(res.data.msg);
- }
- this.currencyBoo = false;
- this.btnLoading = false;
- }).catch(err => {
- this.currencyBoo = false;
- this.btnLoading = false;
- })
- }
- })
- },
- // 获取货币列表
- getCurrencyList(){
- request({
- params: {
- r: 'mall/user/get-currency-list'
- },
- method: 'get'
- }).then(res => {
- console.info(res);
- if(res.data.code == 0){
- this.currencyList = res.data.data.list;
- }
- })
- },
- // 充值
- addM(type,code){
- if(type == 'balance'){
- this.balanceForm.user_id = this.user_id;
- this.dialogBalance = true;
- } else if(type == 'score'){
- this.integralForm.user_id = this.user_id;
- this.integralForm.num = "";
- this.dialogIntegral = true;
- } else if(type == 'currency'){
- this.currencyForm = {
- type: '1',
- code:'',
- money: '',
- desc: '',
- }
- this.currencyForm.code = code;
- this.specifyCurrency = false;
- this.currencyForm.user_id = this.user_id;
- this.currencyBoo = true;
- } else if(type == 'red_packet'){
- this.currencyForm = {
- type: '1',
- code:'red_packet',
- money: '',
- desc: '',
- }
- this.specifyCurrency = true;
- this.currencyForm.user_id = this.user_id;
- this.currencyBoo = true;
- } else if(type == 'redpack'){
- this.handleRedpack();
- } else if(type == 'digital'){
- this.dialogDigital = true;
- this.digitalForm.user_id = this.user_id;
- }
- },
- getTagIds(){
- this.balanceForm.user_id = this.user_id;
- this.detailInfo.tag.forEach((v,i) => {
- this.lableValue.push(v.label_id);
- })
- },
- // 编辑标签
- upTag(){
- this.lableValue = [];
- this.getTagIds();
- this.labelBoo = true;
- },
- getTagList(){
- request({
- params: {
- r: 'mall/user-label/get-mall-label'
- },
- method: 'post'
- }).then(res => {
- if(res.data.code == 0){
- this.userTagList = res.data.data;
- console.info(this.userTagList);
- }
- })
- },
- // 删除标签
- delTag(id){ console.log(id,888888);
- this.getTagIds();
- let index = this.lableValue.findIndex(v => v == id);
- this.tagLoading = true;
- this.lableValue.splice(index,1);
- this.labelSubmit();
- },
- labelSubmit(){
- let that = this; console.log(this.lableValue);
- let url = 'mall/user-label/add-user-label'
- let data = {
- user_id: this.balanceForm.user_id,
- label_id: JSON.stringify(this.lableValue)
- }
- this.tagLoading = true;
- request({
- params: {
- r: url
- },
- method: 'post',
- data: data
- }).then(res => {
- that.labelSubmitBoo = false;
- if(res.data.code == 0){
- that.lableValue = [];
- that.getList();
- }else {
- that.tagLoading = false;
- }
- that.labelBoo = false;
- }).catch(e => {
- that.labelSubmitBoo = false;
- that.labelBoo = false;
- that.tagLoading = false;
- // console.log(e);
- });
- },
- navUserInfo(){
- this.$navigate({
- r: 'team-data/default/my-customer',
- user_id: this.user_id
- })
- },
- // 跳转明细
- navDetail(type,code = ''){
- let url = ''
- if(type == 'balance'){
- url = 'mall/finance/balance-log'
- } else if(type == 'score'){
- url = 'mall/finance/score-log'
- } else if(type == 'commission'){
- url = 'mall/finance/commission-log'
- }else if(type == 'currency'){
- url = 'mall/currency/wallet-log'
- } else if(type == 'red_packet'){
- // 红包明细
- url = 'mall/currency/wallet-log'
- } else if(type == 'coupon'){
- // plugin/e_coupon/mall/approval-log/index
- this.getCouponList();
- this.couponBoo = true;
- return;
- } else if(type == 'e_coupon'){
- this.getECouponList();
- this.e_couponBoo = true;
- return;
- } else if(type == 'redpack'){
- // 红包明细
- url = 'redpack/wallet-log/index'
- } else if(type == 'secondary_card'){
- // 红包明细
- url = 'secondary-card/default/order'
- } else if(type == 'digital'){
- // 数字币明细
- url = 'mall/digital/index'
- }
- this.$navigate({
- r: url,
- user_id: this.user_id
- })
- },
- // 打开黑白名单窗口
- handleListOfNames(){
- this.balanceForm = Object.assign(this.balanceForm, {
- user_id: this.user_id,
- status: this.detailInfo.status,
- });
- this.listOfNamesBoo = true;
- },
- // 黑白名单
- listOfNamesBooSubmit(){
- let that = this;
- let data = "";
- this.btnLoading = true;
- let status = this.balanceForm.status;
- if(status == 0){
- status = 1;
- }else if(status == 1)(
- status = 0
- )
- data = {
- user_id: this.balanceForm.user_id,
- status: status
- }
- request({
- params: {
- r: 'mall/user/add-blacklist'
- },
- method: 'post',
- data: data
- }).then(res => {
- if(res.data.code == 0){
- this.$message.success("修改成功");
- this.listOfNamesBoo = false;
- this.btnLoading = false;
- this.getList();
- } else{
- this.$message.error(res.data.msg);
- }
- }).catch(e => {
- console.log(e);
- this.btnLoading = false;
- });
- },
- couponListTypeChange($event) {
- // 重新触发获取优惠卷列表
- this.getCouponList();
- },
- // 获取优惠卷列表
- getCouponList(){
- this.couponLoading = true;
- // debugger;
- this.couponList.splice(0,this.couponList.length);
- request({
- params: {
- r: 'mall/user/get-user-coupon',
- type: this.couponSel,
- coupon_list_type: this.couponListType,
- user_id: this.user_id,
- page: this.couponPage,
- },
- }).then(res => {
- //console.info(res);
- if(res.data.code == 0){
- this.couponListData = res.data.data.list.list;
- this.couponPageCount = res.data.data.list.page_count
- } else {
- this.$message.error(res.data.msg);
- }
- this.couponLoading = false;
- }).catch(err => {
- this.couponLoading = false;
- })
- },
- // 获取电子卷列表
- getECouponList(){
- this.e_couponLoading = true;
- this.e_couponList.splice(0,this.e_couponList.length)
- request({
- params: {
- r: 'mall/user/get-user-ecoupon'
- },
- method: 'post',
- data: {
- type: this.e_couponSel,
- user_id: this.user_id,
- page: this.ecouponPage,
- }
- }).then(res => {
- if(res.data.code == 0){
- this.e_couponList.push(...res.data.data.list);
- this.ecouponPageCount = res.data.data.pagination.page_count;
- } else {
- this.$message.error(res.data.msg);
- }
- this.e_couponLoading = false;
- }).catch(err => {
- this.e_couponLoading = false;
- })
- },
- couponClick(tab, event){
- this.couponPage = 1
- this.getCouponList();
- },
- upCouponPage(currentPage){
- this.couponPage = currentPage;
- this.getCouponList();
- },
- // 电子卷分页
- upECouponPage(currentPage){
- this.ecouponPage = currentPage;
- this.getECouponList();
- },
- // 删除优惠卷
- delCoupon(id){
- console.info(id);
- this.delPop = true;
- this.delId = id;
- },
- // 删除卷请求
- delSub(type){
- // 1:优惠卷 2:电子卷
- this.btnLoading = true;
- if(type == 1){
- request({
- params: {
- r: 'mall/user/del-user-coupon',
- id: this.delId,
- user_id: this.user_id
- },
- method: 'get'
- }).then(res => {
- // debugger;
- console.info(res);
- if(res.data.code == 0){
- this.getCouponList();
- this.$message.success("删除成功");
- }else {
- this.$message.error(res.data.msg);
- }
- this.delId = 0;
- this.delPop = false;
- this.btnLoading = false;
- }).catch(err => {
- console.info(err);
- this.delId = 0;
- this.delPop = false;
- this.btnLoading = false;
- })
- } else if(type == 2){
- request({
- params: {
- r: 'mall/user/del-user-ecoupon',
- id: this.delId,
- user_id: this.user_id
- },
- method: 'get'
- }).then(res => {
- // debugger;
- console.info(res);
- if(res.data.code == 0){
- this.getECouponList();
- this.$message.success("删除成功");
- }else {
- this.$message.error(res.data.msg);
- }
- this.delId = 0;
- this.delPop = false;
- this.btnLoading = false;
- }).catch(err => {
- console.info(err);
- this.delId = 0;
- this.delPop = false;
- this.btnLoading = false;
- })
- }
- },
- // 电子卷
- e_couponClick(){
- this.getECouponList();
- },
- // 开启推广资格窗口
- promotePop(){
- this.promoteBoo = true;
- // this.detailInfo.is_inviter
- },
- // 清除微信授权
- clearAuth(){
- this.$confirm('此操作不能恢复,确定清除吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request({
- params: {
- r: 'mall/user/clear-auth'
- },
- method: 'post',
- data: {
- user_id: this.user_id,
- }
- }).then(res => {
- this.$message.success("清除成功");
- }).catch(e => {
- this.$message.error("清除失败");
- });
- })
- },
- // 推广资格
- promoteSubmit(){
- this.btnLoading = true;
- let boo = this.detailInfo.is_inviter;
- if(boo == 0){
- boo = 1;
- }else if(boo == 1)(
- boo = 0
- )
- request({
- params: {
- r: 'mall/user/change-inviter'
- },
- method: 'post',
- data: {
- user_id: this.user_id,
- is_inviter: boo
- }
- }).then(res => {
- if(res.data.code == 0){
- this.$message.success("修改成功");
- this.detailInfo.is_inviter = boo;
- this.promoteBoo = false;
- this.btnLoading = false;
- } else{
- }
- }).catch(e => {
- console.log(e);
- this.btnLoading = false;
- });
- },
- gotoOrderIndex(){
- this.$navigate({
- r: 'mall/order/index',
- user_id: this.user_id
- })
- },
- updateLevel(){
- this.userRankPop = true;
- this.selUserRank = this.detailInfo.level + "";
- },
- updateRank(){
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/edit-user-level'
- },
- method: 'post',
- data: {
- user_id: this.user_id,
- level: this.selUserRank
- }
- }).then(res => {
- console.info(res);
- if(res.data.code == 0){
- this.detailInfo.user_level = this.selUserRank;
- let arr = JSON.parse(JSON.stringify(this.detailInfo.user_level_list));
- this.$set(arr,"-1","默认会员");
- arr[0] = this.default_level_name
- let fruitsObj = { ...arr };
- this.detailInfo.level = fruitsObj[this.selUserRank];
- this.userRankPop = false;
- this.selUserRank = '';
- } else {
- this.$message.error(res.data.msg);
- }
- this.btnLoading = false;
- }).catch(err => {
- this.btnLoading = false;
- })
- },
- changePasswordSubmit(){
- this.btnLoading = true;
- let password = this.change_password;
- request({
- params: {
- r: 'mall/user/update-password'
- },
- method: 'post',
- data: {
- user_id: this.user_id,
- password: password
- }
- }).then(res => {
- if(res.data.code == 0){
- this.$message.success("修改成功");
- this.changePasswordPop = false;
- } else{
- this.$message.error(res.data.msg);
- }
- this.btnLoading = false;
- }).catch(e => {
- console.log(e);
- this.btnLoading = false;
- });
- },
- /**
- * 获取登录设备文本
- */
- getDeviceTypeText(device) {
- // 可添加处理
- return device
- },
- paymentAckPassword(rule, value, callback) {// 确认密码验证
- if (value === '') {
- callback(new Error('请输入确认密码'));
- } else if (value.length < 6) {
- callback(new Error('确认密码不能小于六位数'));
- } else if (value !== this.paymentForm.password) {
- callback(new Error('两次密码不一致'));
- } else {
- callback();
- }
- },
- resetPaymentPasswordSubmit() {
- // 重置支付密码提交
- this.$refs.paymentForm.validate((valid) => {
- if (valid) {
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/reset-payment-password'
- },
- method: 'post',
- data: {
- user_id: this.user_id,
- password: this.paymentForm.password
- }
- }).then(res => {
- if(res.data.code === 0){
- let that = this;
- this.$message({
- type: 'success',
- message: '修改成功',
- duration: 2000,
- onClose: function () {
- that.clearResetPayment();
- }
- })
- } else{
- this.$message.error(res.data.msg);
- }
- this.btnLoading = false;
- }).catch(e => {
- console.log(e);
- this.btnLoading = false;
- });
- } else {
- return false;
- }
- })
- },
- clearResetPayment() {// 清除支付表单数据
- this.$refs.paymentForm.resetFields();
- this.paymentForm = {
- is_reset_box_show: false,
- password: null,
- ack_password: null,
- }
- },
- digitalSubmit(){
- // 表单验证
- this.$refs.dialogForm.validate((valid) => {
- if (valid) {
- let para = Object.assign({}, this.digitalForm);
- this.btnLoading = true;
- request({
- params: {
- r: 'mall/user/add-digital',
- },
- method: 'post',
- data: para,
- }).then(res => {
- console.info(res);
- if(res.data.code == 0){
- location.reload();
- // this.getList();
- }else {
- this.$message.error(res.data.msg);
- }
- this.currencyBoo = false;
- this.btnLoading = false;
- }).catch(err => {
- this.currencyBoo = false;
- this.btnLoading = false;
- })
- }
- })
- },
- }
- })
- </script>
- <style>
- .el-main{
- flex-basis: unset;
- display: flex;
- display: -webkit-flex;
- }
- #user_detail_view{
- flex: 1;
- }
- .user_info{
- background: #FFF;
- padding: 20px;
- margin-bottom: 10px;
- }
- .user_detail{
- display: flex;
- /* align-items: center; */
- }
- .user_detail .info{
- display: flex;
- font-size: 12px;
- color: #939393;
- }
- .user_detail .info .text{
- color: #000;
- margin-right: 40px;
- }
- .user_detail .user_name{
- font-size: 15px;
- margin-bottom: 10px;
- }
- .user_material{
- display: flex;
- margin-bottom: 10px;
- }
- .material_m{
- background: #FFF;
- flex: 1;
- padding: 10px 30px
- }
- .material_m:first-child{
- margin-right: 8px;
- }
- .material_m:last-child{
- margin-left: 8px;
- }
- .material_title{
- font-size: 16px;
- margin-bottom: 20px;
- border-left: 5px solid #1479F0;
- padding-left: 8px;
- line-height: 24px;
- }
- .my_flex{
- display: flex;
- }
- .assets_title{
- font-size: 16px;
- margin-bottom: 15px;
- align-items: flex-end;
- }
- .assets_info{
- flex: 1;
- }
- .assets_info .info{
- /* font-weight: bold; */
- margin-top: 5px;
- font-size: 20px;
- }
- .assets_mo{
- background: #F2F2F2;
- padding: 20px 30px;
- }
- .title_bu{
- font-size: 12px;
- color: #2E8FF6;
- margin-left: 10px;
- }
- .title_bu:hover{
- cursor:pointer;
- }
- .hover-close:hover{
- color: #2E8FF6;
- cursor:pointer;
- }
- .title_bu_text{
- font-size: 12px;
- color: #2E8FF6;
- }
- .title_bu_text:hover{
- cursor:default;
- }
- .lable_i{
- background: #F4F4F4;
- padding: 5px 15px;
- margin-right: 14px;
- }
- .round_page{
- display: flex;
- justify-content: center;
- }
- .round{
- width: 10px;
- height: 10px;
- background: #F2F2F2;
- border-radius: 50%;
- margin-right: 10px;
- }
- .page_sel{
- background: #2E8FF4;
- }
- .el-dialog__body {
- padding: 15px 20px 20px;
- }
- .up_user_s .el-select{
- margin-right: 10px;
- }
- </style>
|