| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455 |
- <template>
- <div>
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="企业总用户" name="first">
- <div style="margin:5px;display: inline-block;">
- <span>手机号:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
- v-model="phone"></el-input>
- </div>  
- <div style="margin:5px;display: inline-block;">
- <span>昵称:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
- v-model="campus"></el-input>
- </div>  
- <!-- <div style="margin:5px;display: inline-block;">
- <span>邀请码:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
- v-model="invitationCodeT"></el-input>
- </div>  
- <div style="margin:5px;display: inline-block;">
- <span>邀请人邀请码:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请人邀请码"
- v-model="inviterCodeT"></el-input>
- </div>   -->
- <div style="margin:5px;display: inline-block;">
- <span>开始时间:</span>
- <el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
- type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
- </el-date-picker>
- </div>
- <div style="margin:5px;display: inline-block;">
- <span>截止时间:</span>
- <el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
- format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
- </el-date-picker>
- </div>
- <div style="display: inline-block;">
- <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
- </el-button>
- <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
- </el-button>
- <el-button style='margin-left:15px;' size="mini" type="warning" icon="document" :disabled="!isAuth('user:daochu')" @click="exportBtn">导出Excel
- </el-button>
- </div>
- <div style="color: orange;"> * 导出数据提示:导出数据前请进行时间或者状态等筛选,否则导出单量过多易出现卡顿或系统崩溃</div>
- <el-table v-loading="tableDataLoading" :data="tableData.list">
- <el-table-column prop="userId" label="编号" width="80" fixed="left"></el-table-column>
- <el-table-column fixed prop="userName" label="昵称" width="150">
- <template slot-scope="scope">
- <span style="color: #f56c6c;" v-if="!isAuth('userList:phone') && scope.row.userName1">{{ scope.row.userName1 ? scope.row.userName1 : '未绑定' }}</span>
- <span style="color: #f56c6c;" v-else>{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="sex" label="性别">
- <template slot-scope="scope">
- <span v-if="scope.row.sex==1">男</span>
- <span v-else-if="scope.row.sex==2">女</span>
- <span v-else>未设置</span>
- </template>
- </el-table-column>
- <el-table-column label="图像">
- <template slot-scope="scope">
- <img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
- height="40">
- <img v-else :src="scope.row.avatar" alt="" width="40" height="40">
- </template>
- </el-table-column>
- <el-table-column prop="phone" label="手机号" width="160">
- <template slot-scope="scope">
- <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-if="isAuth('userList:phone')">
- {{ scope.row.phone ? scope.row.phone : '未绑定' }}
- </span>
- <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-else>
- {{ scope.row.phone1 ? scope.row.phone1 : '-' }}
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="invitationCode" label="邀请码">
- <template slot-scope="scope">
- <span style="color: #4f9dec;cursor: pointer;"
- @click="onChangeShow(scope.row.invitationCode,scope.row.userId,scope.row.userName)">{{ scope.row.invitationCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="邀请人邀请码">
- <template slot-scope="scope">
- <span style="color: #4f9dec;cursor: pointer;"
- @click="updates2(scope.row.inviterCode)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="zhiFuBaoName" label="支付宝名称">
- <template slot-scope="scope">
- <span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="zhiFuBao" label="支付宝账号">
- <template slot-scope="scope">
- <span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column prop="rate" label="商家佣金比例" width="150">
- <template slot-scope="scope">
- <span>{{scope.row.rate?scope.row.rate:'0'}}</span>
- <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
- style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'rate')">
- 修改</el-button>
- </span>
- </template>
- </el-table-column> -->
- <el-table-column prop="zhiRate" label="一级佣金比例" width="150">
- <template slot-scope="scope">
- <span>{{scope.row.zhiRate?scope.row.zhiRate:'0'}}</span>
- <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
- style="color: #4f9dec;background: #fff;border: none;"
- @click="xiugai(scope.row,'zhiRate')">修改</el-button>
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="feiRate" label="二级佣金比例" width="150">
- <template slot-scope="scope">
- <span>{{scope.row.feiRate?scope.row.feiRate:'0'}}</span>
- <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
- style="color: #4f9dec;background: #fff;border: none;"
- @click="xiugai(scope.row,'feiRate')">修改</el-button>
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="isCompanyVip" label="是否会员">
- <template slot-scope="scope">
- <span v-if="scope.row.isCompanyVip==1">是</span>
- <span v-else>否</span>
- </template>
- </el-table-column>
- <el-table-column prop="companyMonthTime" label="会员到期时间" width="160"></el-table-column>
- <el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
- <el-table-column prop="state " label="状态">
- <template slot-scope="scope">
- <el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
- :active-value="openValue" :disabled="!isAuth('userList:delete')"
- :inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
- </el-switch>
- </template>
- </el-table-column>
- <el-table-column fixed="right" label="操作" width="120">
- <template slot-scope="scope">
- <el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
- <el-button size="mini" type="warning" @click="zengsongVip(scope.row)" :disabled="!isAuth('userList:updateVip')" >修改会员</el-button>
- <el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.isCompanyVip==1" plain>取消会员</el-button>
- <el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
- @click="deleteuser(scope.row)">删除用户</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: center;margin-top: 10px;">
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
- :page-sizes="[10, 20, 30, 40, 50]" :page-size="limit" :current-page="page"
- layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
- </el-pagination>
- </div>
- </el-tab-pane>
- <el-tab-pane label="会员用户" name="yixing">
- <div style="margin:5px;display: inline-block;">
- <span>手机号:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
- v-model="phone"></el-input>
- </div>  
- <div style="margin:5px;display: inline-block;">
- <span>昵称:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
- v-model="campus"></el-input>
- </div>  
- <!-- <div style="margin:5px;display: inline-block;">
- <span>邀请码:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
- v-model="invitationCodeT"></el-input>
- </div>  
- <div style="margin:5px;display: inline-block;">
- <span>邀请人邀请码:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请人邀请码"
- v-model="inviterCodeT"></el-input>
- </div>   -->
- <div style="margin:5px;display: inline-block;">
- <span>开始时间:</span>
- <el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
- type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
- </el-date-picker>
- </div>
- <div style="margin:5px;display: inline-block;">
- <span>截止时间:</span>
- <el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
- format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
- </el-date-picker>
- </div>
- <div style="display: inline-block;">
- <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
- </el-button>
- <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
- </el-button>
- <el-button style='margin-left:15px;' size="mini" type="warning" icon="document" :disabled="!isAuth('user:daochu')" @click="exportBtn">导出Excel
- </el-button>
- </div>
- <div style="color: orange;"> * 导出数据提示:导出数据前请进行时间或者状态等筛选,否则导出单量过多易出现卡顿或系统崩溃</div>
- <el-table v-loading="tableDataLoading" :data="tableData.list">
- <el-table-column prop="userId" label="编号" width="80" fixed="left"></el-table-column>
- <el-table-column fixed prop="userName" label="昵称" width="150">
- <template slot-scope="scope">
- <span style="color: #f56c6c;" v-if="!isAuth('userList:phone') && scope.row.userName1">{{ scope.row.userName1 ? scope.row.userName1 : '未绑定' }}</span>
- <span style="color: #f56c6c;" v-else>{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="sex" label="性别">
- <template slot-scope="scope">
- <span v-if="scope.row.sex==1">男</span>
- <span v-else-if="scope.row.sex==2">女</span>
- <span v-else>未设置</span>
- </template>
- </el-table-column>
- <el-table-column label="图像">
- <template slot-scope="scope">
- <img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
- height="40">
- <img v-else :src="scope.row.avatar" alt="" width="40" height="40">
- </template>
- </el-table-column>
- <el-table-column prop="phone" label="手机号" width="160">
- <template slot-scope="scope">
- <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-if="isAuth('userList:phone')">
- {{ scope.row.phone ? scope.row.phone : '未绑定' }}
- </span>
- <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-else>
- {{ scope.row.phone1 ? scope.row.phone1 : '-' }}
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="invitationCode" label="邀请码"></el-table-column>
- <el-table-column label="邀请人邀请码">
- <template slot-scope="scope">
- <span style="color: #4f9dec;cursor: pointer;"
- @click="updates2(scope.row.inviterCode)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="zhiFuBaoName" label="支付宝名称">
- <template slot-scope="scope">
- <span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="zhiFuBao" label="支付宝账号">
- <template slot-scope="scope">
- <span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column prop="rate" label="商家佣金比例" width="150">
- <template slot-scope="scope">
- <span>{{scope.row.rate?scope.row.rate:'0'}}</span>
- <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
- style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'rate')">
- 修改</el-button>
- </span>
- </template>
- </el-table-column> -->
- <el-table-column prop="zhiRate" label="一级佣金比例" width="150">
- <template slot-scope="scope">
- <span>{{scope.row.zhiRate?scope.row.zhiRate:'0'}}</span>
- <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
- style="color: #4f9dec;background: #fff;border: none;"
- @click="xiugai(scope.row,'zhiRate')">修改</el-button>
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="feiRate" label="二级佣金比例" width="150">
- <template slot-scope="scope">
- <span>{{scope.row.feiRate?scope.row.feiRate:'0'}}</span>
- <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
- style="color: #4f9dec;background: #fff;border: none;"
- @click="xiugai(scope.row,'feiRate')">修改</el-button>
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="isCompanyVip" label="是否会员">
- <template slot-scope="scope">
- <span v-if="scope.row.isCompanyVip==1">是</span>
- <span v-else>否</span>
- </template>
- </el-table-column>
- <el-table-column prop="companyMonthTime" label="会员到期时间" width="160"></el-table-column>
- <el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
- <el-table-column prop="state " label="状态">
- <template slot-scope="scope">
- <el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
- :active-value="openValue" :disabled="!isAuth('userList:delete')"
- :inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
- </el-switch>
- </template>
- </el-table-column>
- <el-table-column fixed="right" label="操作" width="120">
- <template slot-scope="scope">
- <el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
- <el-button size="mini" type="warning" @click="zengsongVip(scope.row)" :disabled="!isAuth('userList:updateVip')" >修改会员</el-button>
- <el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.isCompanyVip==1" plain>取消会员</el-button>
- <el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
- @click="deleteuser(scope.row)">删除用户</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: center;margin-top: 10px;">
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
- :page-sizes="[10, 20, 30, 40, 50]" :page-size="limit" :current-page="page"
- layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
- </el-pagination>
- </div>
- </el-tab-pane>
- <el-tab-pane label="普通用户" name="erxing">
- <div style="margin:5px;display: inline-block;">
- <span>手机号:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
- v-model="phone"></el-input>
- </div>  
- <div style="margin:5px;display: inline-block;">
- <span>昵称:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
- v-model="campus"></el-input>
- </div>  
- <!-- <div style="margin:5px;display: inline-block;">
- <span>邀请码:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
- v-model="invitationCodeT"></el-input>
- </div>  
- <div style="margin:5px;display: inline-block;">
- <span>邀请人邀请码:</span>
- <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请人邀请码"
- v-model="inviterCodeT"></el-input>
- </div>   -->
- <div style="margin:5px;display: inline-block;">
- <span>开始时间:</span>
- <el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
- type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
- </el-date-picker>
- </div>
- <div style="margin:5px;display: inline-block;">
- <span>截止时间:</span>
- <el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
- format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
- </el-date-picker>
- </div>
- <div style="display: inline-block;">
- <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
- </el-button>
- <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
- </el-button>
- <el-button style='margin-left:15px;' size="mini" type="warning" icon="document" :disabled="!isAuth('user:daochu')" @click="exportBtn">导出Excel
- </el-button>
- </div>
- <div style="color: orange;"> * 导出数据提示:导出数据前请进行时间或者状态等筛选,否则导出单量过多易出现卡顿或系统崩溃</div>
- <el-table v-loading="tableDataLoading" :data="tableData.list">
- <el-table-column prop="userId" label="编号" width="80" fixed="left"></el-table-column>
- <el-table-column fixed prop="userName" label="昵称" width="150">
- <template slot-scope="scope">
- <span style="color: #f56c6c;" v-if="!isAuth('userList:phone') && scope.row.userName1">{{ scope.row.userName1 ? scope.row.userName1 : '未绑定' }}</span>
- <span style="color: #f56c6c;" v-else>{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="sex" label="性别">
- <template slot-scope="scope">
- <span v-if="scope.row.sex==1">男</span>
- <span v-else-if="scope.row.sex==2">女</span>
- <span v-else>未设置</span>
- </template>
- </el-table-column>
- <el-table-column label="图像">
- <template slot-scope="scope">
- <img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
- height="40">
- <img v-else :src="scope.row.avatar" alt="" width="40" height="40">
- </template>
- </el-table-column>
- <el-table-column prop="phone" label="手机号" width="160">
- <template slot-scope="scope">
- <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-if="isAuth('userList:phone')">
- {{ scope.row.phone ? scope.row.phone : '未绑定' }}
- </span>
- <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-else>
- {{ scope.row.phone1 ? scope.row.phone1 : '-' }}
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="invitationCode" label="邀请码"></el-table-column>
- <el-table-column label="邀请人邀请码">
- <template slot-scope="scope">
- <span style="color: #4f9dec;cursor: pointer;"
- @click="updates2(scope.row.inviterCode)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="zhiFuBaoName" label="支付宝名称">
- <template slot-scope="scope">
- <span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="zhiFuBao" label="支付宝账号">
- <template slot-scope="scope">
- <span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column prop="rate" label="商家佣金比例" width="150">
- <template slot-scope="scope">
- <span>{{scope.row.rate?scope.row.rate:'0'}}</span>
- <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
- style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'rate')">
- 修改</el-button>
- </span>
- </template>
- </el-table-column> -->
- <el-table-column prop="zhiRate" label="一级佣金比例" width="150">
- <template slot-scope="scope">
- <span>{{scope.row.zhiRate?scope.row.zhiRate:'0'}}</span>
- <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
- style="color: #4f9dec;background: #fff;border: none;"
- @click="xiugai(scope.row,'zhiRate')">修改</el-button>
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="feiRate" label="二级佣金比例" width="150">
- <template slot-scope="scope">
- <span>{{scope.row.feiRate?scope.row.feiRate:'0'}}</span>
- <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
- style="color: #4f9dec;background: #fff;border: none;"
- @click="xiugai(scope.row,'feiRate')">修改</el-button>
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="isCompanyVip" label="是否会员">
- <template slot-scope="scope">
- <span v-if="scope.row.isCompanyVip==1">是</span>
- <span v-else>否</span>
- </template>
- </el-table-column>
- <el-table-column prop="companyMonthTime" label="会员到期时间" width="160"></el-table-column>
- <el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
- <el-table-column prop="state " label="状态">
- <template slot-scope="scope">
- <el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
- :active-value="openValue" :disabled="!isAuth('userList:delete')"
- :inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
- </el-switch>
- </template>
- </el-table-column>
- <el-table-column fixed="right" label="操作" width="120">
- <template slot-scope="scope">
- <el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
- <el-button size="mini" type="warning" @click="zengsongVip(scope.row)" :disabled="!isAuth('userList:updateVip')" >修改会员</el-button>
- <el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.isCompanyVip==1" plain>取消会员</el-button>
- <el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
- @click="deleteuser(scope.row)">删除用户</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: center;margin-top: 10px;">
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
- :page-sizes="[10, 20, 30, 40, 50]" :page-size="limit" :current-page="page"
- layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
- </el-pagination>
- </div>
- </el-tab-pane>
- <!-- 修改比例 -->
- <el-dialog title="修改佣金比例" :visible.sync="dialogFormVisible2" center>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;">佣金比例:</span>
- <el-input style="width:50%;" v-model="proportion" type="number" :min="0" :controls="false"
- placeholder="请输入佣金比例"></el-input>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible2 = false">取 消</el-button>
- <el-button type="primary" @click="StairNoticeTo2()">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 任务拒绝弹框 -->
- <el-dialog title="审核拒绝" :visible.sync="dialogFormVisible" center>
- <div style="margin-bottom: 10px;">
- <span
- style="width: 200px;display: inline-block;text-align: right;position: relative;top: -70px;">拒绝理由:</span>
- <el-input style="width:50%;" v-model="content" type="textarea" :rows="4" placeholder="请输入拒绝理由">
- </el-input>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible = false">取 消</el-button>
- <el-button type="primary" @click="refuseto()">确 定</el-button>
- </div>
- </el-dialog>
- </el-tabs>
- <!-- 不可提现添加金额 -->
- <el-dialog title="修改" :visible.sync="dialogFormVisible1" center>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;">次数:</span>
- <el-input style="width:50%;" v-model="money" type="number" :min="0" :max="100" :controls="false"
- placeholder="请输入次数"></el-input>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible1 = false">取 消</el-button>
- <el-button type="primary" @click="StairNoticeTo1()">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 修改会员 -->
- <el-dialog title="修改会员" :visible.sync="dialogFormVisibleZs" center>
- <!-- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;">类型:</span>
- <el-radio-group v-model="type">
- <el-radio :label="1">添加</el-radio>
- <el-radio :label="2">减少</el-radio>
- </el-radio-group>
- </div> -->
- <div style="margin-bottom: 20px;position: relative;">
- <div style="width: 200px;display: inline-block;text-align: right;position: absolute;top: 0;">会员种类:</div>
- <div class="ruleitem" style="display: inline-block;margin-left: 205px;">
- <span><el-radio v-for="(item,index) in vipData" :key="index" v-model="vipId"
- :label="item.id">{{item.vipName}}</el-radio></span>
- </div>
- </div>
- <div style="margin-bottom: 20px;">
- <span style="width: 200px;display: inline-block;text-align: right;">会员等级:</span>
- <el-radio-group v-model="vipNameType">
- <el-radio :label="0">月会员</el-radio>
- <el-radio :label="1">季会员</el-radio>
- <el-radio :label="2">年会员</el-radio>
- </el-radio-group>
- </div>
- <div style="margin-bottom: 10px;">
- <span style="width: 200px;display: inline-block;text-align: right;">修改天数:</span>
- <el-input style="width:50%;" v-model="proportion" type="number" :min="0" :controls="false"
- placeholder="请输入修改天数"></el-input>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisibleZs = false">取 消</el-button>
- <el-button type="primary" @click="updateVip()">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog title="邀请人员" :visible.sync="isShow">
- <el-button type="text" @click="downloadTemplate">生成邀请码</el-button>
- <el-table :data="dataSource">
- <el-table-column property="userName" label="姓名"></el-table-column>
- <el-table-column property="createTime" label="邀请时间"></el-table-column>
- </el-table>
- <el-pagination
- small
- background
- @current-change="onChangeDataSourcePage"
- layout="prev, pager, next"
- :current-page="dataParams.page"
- :page-size="dataParams.limit"
- :total="dataParams.total">
- </el-pagination>
- </el-dialog>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- openValue: 1,
- closeValue: 2,
- state: 'false',
- limit: 10,
- page: 1,
- phone: '',
- nickNam: '',
- platform: 'all',
- isRelation: -1,
- isTuan: -1,
- value: '',
- payData: [],
- nickName: '',
- grade: '',
- name: '',
- activeName: 'first',
- tableDataLoading: true,
- tableData: [],
- platforms: [{
- value: 'all',
- label: '全部'
- }, {
- value: 'wap',
- label: '网站'
- }, {
- value: 'app',
- label: 'APP'
- }, {
- value: 'weixin',
- label: '微信公众号'
- },
- {
- value: 'mp',
- label: '微信小程序'
- }
- ],
- campus: '',
- homeData1: [],
- isAuthentication: 2,
- dialogFormVisible2: false,
- dialogFormVisible: false,
- proportion: '',
- texts: '',
- userIdss: '',
- content: '',
- status: -1,
- helpTakeId: '',
- checkBoxData: [], //多选框选择的值
- userResumesStatus: '',
- userResumesStatuslist: [{
- value: '',
- label: '全部'
- }, {
- value: 1,
- label: '简历展示'
- }, {
- value: 2,
- label: '简历隐藏'
- }, {
- value: 3,
- label: '审核中'
- }, ],
- dialogFormVisible1:false,
- money:'',
- userId:'',
- member:'',
- weekMember:'',
- isUserVip:'',
- isCompanyVip:'',
- info: {
- stockDate: this.getNowTime(), //日期
- },
- info2: {
- stockDate2: this.getNowTime2(), //日期
- },
- startTime: '',
- endTime: '',
- dialogFormVisibleZs:false,
- isVip:'',
- type:1,
- proportion:'',
- vipData: [],
- vipId: '',
- vipNameType: 0,
- // inviterCodeT: '',
- // invitationCodeT: '',
- isShow: false,
- dataSource: [{
- date: '2026-1-15 22:02:07',
- userName: '用户',
- address: '中国'
- }],
- dataParams: {
- page: 1,
- total: 0,
- limit: 10,
- },
- invitationCode: '',
- invitationUserId: ''
- }
- },
- methods: {
- // 显示拉人头
- onChangeShow(code, id, userName) {
- this.isShow = true
- this.invitationCode = code
- this.invitationUserId = id
- this.userName = userName
- this.getDataSource()
- },
- getDataSource(page = 1) {
- this.$http({
- url: this.$http.adornUrl(`user/selectUserListByInvitationCode?page=${page}&limit=${this.dataParams.limit}&invitationCode=${this.invitationCode}`),
- method: 'get'
- }).then((res) => {
- this.dataSource = res.data.data.list
- this.dataParams = {
- page: res.data.data.currPage,
- limit: res.data.data.pageSize,
- total: res.data.data.totalCount,
- }
- })
- },
- onChangeDataSourcePage(page) {
- this.getDataSource(page)
- },
- base64ToFileDownload(base64Data, fileName, fileType) {
- const mimeMap = {
- png: 'image/png',
- jpg: 'image/jpeg',
- jpeg: 'image/jpeg',
- pdf: 'application/pdf',
- xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
- docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
- txt: 'text/plain'
- };
- const mime = mimeMap[fileType] || 'application/octet-stream';
- let pureBase64 = base64Data;
- if (base64Data.includes('base64,')) {
- pureBase64 = base64Data.split('base64,')[1];
- }
- const byteCharacters = window.atob(pureBase64);
- const byteNumbers = new Array(byteCharacters.length);
- for (let i = 0; i < byteCharacters.length; i++) {
- byteNumbers[i] = byteCharacters.charCodeAt(i);
- }
- const byteArray = new Uint8Array(byteNumbers);
- const blob = new Blob([byteArray], { type: mime });
- const blobUrl = window.URL.createObjectURL(blob);
- const a = document.createElement('a');
- a.href = blobUrl;
- a.download = `${fileName}.${fileType}`;
- document.body.appendChild(a);
- a.click();
- document.body.removeChild(a);
- window.URL.revokeObjectURL(blobUrl);
- },
- // 下载海报
- downloadTemplate() {
- this.$http({
- url: this.$http.adornUrl(`invite/selectInviteAndPoster?userId=${this.invitationUserId}`),
- method: 'get',
- }).then((res) => {
- if(res.data.code == 500){
- this.$message.error(res.data.msg)
- }
- this.base64ToFileDownload(res.data.data.image, this.userName, 'png')
- })
- },
- //处理默认选中当前日期
- getNowTime() {
- var now = new Date()
- var year = now.getFullYear() //得到年份
- var month = now.getMonth() //得到月份
- var date = now.getDate() //得到日期
- month = month + 1
- month = month.toString().padStart(2, '0')
- date = date.toString().padStart(2, '0')
- var defaultDate = `${year}-${month}-${date}`
- return defaultDate
- this.$set(this.info, 'stockDate', defaultDate)
- },
- //处理默认选中当前日期
- getNowTime2() {
- var now = new Date()
- var year = now.getFullYear() //得到年份
- var month = now.getMonth() - now.getMonth() //得到月份
- var date = now.getDate() - now.getDate() + 1 //得到日期
- month = month + 1
- month = month.toString().padStart(2, '0')
- date = date.toString().padStart(2, '0')
- var defaultDate = `${year}-${month}-${date}`
- return defaultDate
- this.$set(this.info, 'stockDate', defaultDate)
- },
- // 多选
- changeFun(val) {
- this.checkBoxData = val;
- },
- // 状态
- change(val, userId) {
- this.$http({
- url: this.$http.adornUrl(`user/updateUserStatusByUserId?userId=${userId}`),
- method: 'get',
- data: this.$http.adornData({})
- }).then(({
- data
- }) => {
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.dataSelect()
- }
- })
- })
- },
- // 详情跳转
- updates(row) {
- this.$router.push({
- path: '/userDetailQ',
- query: {
- userId: row.userId
- }
- })
- },
- // 详情跳转
- updates2(inviterCode) {
- if(inviterCode){
- this.$http({
- url: this.$http.adornUrl('user/selectUserByInvitationCode'),
- method: 'get',
- params: this.$http.adornParams({
- 'invitationCode':inviterCode
- })
- }).then(({
- data
- }) => {
- if (data.code == 0) {
- if(data.data.userEntity){
- this.$router.push({
- path: '/userDetailQ',
- query: {
- userId: data.data.userEntity.userId
- }
- })
- }
- } else {
- this.$message({
- message: data.msg,
- type: 'warning',
- duration: 1500,
- onClose: () => {}
- })
- }
- })
- }
-
- // this.$router.push({
- // path: '/userDetailQ',
- // query: {
- // userId: row.superior
- // }
- // })
- },
- // 获取会员类型
- classSelectVipType() {
- this.$http({
- url: this.$http.adornUrl('vipDetails/selectVipDetailsList'),
- method: 'get',
- params: this.$http.adornParams({
- })
- }).then(({
- data
- }) => {
- if (data.code == 0) {
- this.tableDataLoading = false
- let returnData = data.data
- this.vipData = returnData.list
- } else {
- this.$notify({
- title: '提示',
- duration: 1800,
- message: data.msg,
- type: 'warning'
- });
- }
- })
- },
- handleClick(tab, event) {
- this.page = 1
- this.campus = ''
- // this.inviterCodeT = ''
- // this.invitationCodeT = ''
- this.phone = ''
- this.checkBoxData = []
- if (tab._props.label == '企业总用户') {
- this.isAuthentication = 2
- this.weekMember = ''
- this.userResumesStatus = ''
- this.member = ''
- this.isUserVip = ''
- this.isCompanyVip = ''
- this.dataSelect()
- }
- if (tab._props.label == '会员用户') {
- this.isAuthentication = 2
- this.userResumesStatus = ''
- this.member = ''
- this.isUserVip = ''
- this.isCompanyVip = 1
- this.weekMember = ''
- this.dataSelect()
- }
- if (tab._props.label == '普通用户') {
- this.isAuthentication = 2
- this.userResumesStatus = ''
- this.member = ''
- this.isUserVip = ''
- this.isCompanyVip = 0
- this.weekMember = ''
- this.dataSelect()
- }
- if (tab._props.label == '周卡用户') {
- this.isAuthentication = 0
- this.userResumesStatus = ''
- this.member = ''
- this.weekMember = ''
- this.dataSelect()
- }
- },
- handleSizeChange(val) {
- this.limit = val
- this.dataSelect()
- },
- handleCurrentChange(val) {
- this.page = val
- this.dataSelect()
- },
- handleSizeChange1(val) {
- this.limit = val
- this.paySelect()
- },
- handleCurrentChange1(val) {
- this.page = val
- this.paySelect()
- },
- // select自动选择
- selectTrigger() {
- this.dataSelect()
- },
- // 查询
- select() {
- this.page = 1
- this.dataSelect()
- },
- select2() {
- this.paySelect()
- },
- // 重置
- cleans() {
- this.page = 1
- this.campus = ''
- this.phone = ''
- this.inviterCodeT = ''
- // this.invitationCodeT = ''
- // this.userResumesStatus = ''
- this.startTime = ''
- this.endTime = ''
- this.dataSelect()
- },
- //删除用户
- deleteuser(row) {
- let delid = row.userId
- this.$confirm(`确定删除此条信息?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.$http({
- url: this.$http.adornUrl(`user/deleteUserByUserId/${delid}`),
- method: 'post',
- params: this.$http.adornData({})
- }).then(({
- data
- }) => {
- if (data.code == 0) {
- this.$message({
- message: '删除成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.dataSelect()
- }
- })
- } else {
- this.$message({
- message: data.msg,
- type: 'warning',
- duration: 1500,
- onClose: () => {}
- })
- }
- })
- })
- },
- // 封号
- updates1(row) {
- },
- // 获取社区数据列表
- homeSelect() {
- this.tableDataLoading = true
- this.$http({
- url: this.$http.adornUrl('helpCampus/selectCampusList'),
- method: 'get',
- params: this.$http.adornParams({
- // 'page':this.page,
- // 'limit':this.limit,
- // 'content':this.content
- })
- }).then(({
- data
- }) => {
- this.tableDataLoading = false
- let returnData = data.data;
- this.homeData1 = returnData
- })
- },
- // 筛选信息
- animeDat2(state) {
- this.dataSelect()
- },
- // 获取数据列表
- dataSelect() {
- if(this.startTime!=""&&this.startTime !==null){
- if (this.endTime == ''||this.endTime ==null) {
- this.$notify({
- title: '提示',
- duration: 1800,
- message: '请选择截止时间',
- type: 'warning'
- });
- return
- }
- }
- if(this.endTime!=""&&this.endTime !==null){
- if (this.startTime == ''||this.startTime ==null) {
- this.$notify({
- title: '提示',
- duration: 1800,
- message: '请选择开始时间',
- type: 'warning'
- });
- return
- }
- }
- this.tableDataLoading = true
- this.$http({
- url: this.$http.adornUrl('user/selectUserList'),
- method: 'get',
- params: this.$http.adornParams({
- 'page': this.page,
- 'limit': this.limit,
- 'member': this.member,
- 'phone': this.phone,
- 'userName': this.campus,
- 'userType': this.isAuthentication,
- // 'userResumesStatus': this.userResumesStatus,
- 'weekMember':this.weekMember,
- 'isUserVip':this.isUserVip,
- 'isCompanyVip':this.isCompanyVip,
- 'startTime': this.startTime,
- 'endTime': this.endTime,
- // 'inviterCode': this.inviterCodeT,
- // 'invitationCode': this.invitationCodeT,
- })
- }).then(({
- data
- }) => {
- this.tableDataLoading = false
- if(data.data&&data.data.list.length>0){
- for(var i in data.data.list){
- var pattern = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
- var phone1 = data.data.list[i].phone
- var userName1 = data.data.list[i].userName
- if(pattern.test(phone1)){
- var one = phone1.slice(0, 3)
- var two = phone1.slice(7, 11)
- data.data.list[i].phone1 = one+'****'+two
- }
- if(pattern.test(userName1)){
- var one = userName1.slice(0, 3)
- var two = userName1.slice(7, 11)
- data.data.list[i].userName1 = one+'****'+two
- }
-
-
- }
- }
- let returnData = data.data
- this.tableData = returnData
- })
- },
- xiugai(row, text) {
- if (text == 'rate') {
- this.proportion = row.rate
- }
- if (text == 'zhiRate') {
- this.proportion = row.zhiRate
- }
- if (text == 'feiRate') {
- this.proportion = row.feiRate
- }
- this.texts = text
- this.userIdss = row.userId
- this.dialogFormVisible2 = true
- },
- StairNoticeTo2() {
- var datas = {}
- if (this.texts == 'rate') {
- datas.rate = this.proportion
- }
- if (this.texts == 'zhiRate') {
- datas.zhiRate = this.proportion
- }
- if (this.texts == 'feiRate') {
- datas.feiRate = this.proportion
- }
- datas.userId = this.userIdss
- this.$http({
- url: this.$http.adornUrl('user/updateUserByUserId'),
- method: 'post',
- data: this.$http.adornData(datas)
- }).then(({
- data
- }) => {
- console.log('data', data)
- this.$message({
- message: '修改成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.dialogFormVisible2 = false
- this.dataSelect()
- }
- })
- })
- },
- //任务通过
- passClick(id) {
- this.status = 1
- this.content = '同意'
- var ids = id ? [id] : this.checkBoxData.map(item => {
- return item.userId
- })
- this.$http({
- url: this.$http.adornUrl('user/updateUserResumes'),
- method: 'post',
- params: this.$http.adornParams({
- 'userIds': ids,
- 'status': this.status,
- 'auditContent': this.content
- })
- }).then(({
- data
- }) => {
- if (data.code == 0) {
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.content = ''
- this.status = -1
- this.dataSelect()
- }
- })
- } else {
- this.$message({
- message: data.msg,
- type: 'error',
- duration: 1500,
- onClose: () => {
- this.content = ''
- this.status = -1
- this.dataSelect()
- }
- })
- }
- })
- },
- //单条任务通过
- passClicks(row) {
- this.status = 1
- this.content = '同意'
- this.$http({
- url: this.$http.adornUrl('user/updateUserResumes'),
- method: 'post',
- params: this.$http.adornParams({
- 'userIds': row.userId,
- 'status': this.status,
- 'auditContent': this.content
- })
- }).then(({
- data
- }) => {
- if (data.code == 0) {
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.content = ''
- this.status = -1
- this.dataSelect()
- }
- })
- } else {
- this.$message({
- message: data.msg,
- type: 'error',
- duration: 1500,
- onClose: () => {
- this.content = ''
- this.status = -1
- this.dataSelect()
- }
- })
- }
- })
- },
- //任务拒绝
- refuseClick(rows) {
- this.status = 2
- this.helpTakeId = rows.userId
- this.content = ''
- this.dialogFormVisible = true
- },
- refuseto() {
- if (this.content == '') {
- this.$notify({
- title: '提示',
- duration: 1800,
- message: '请输入拒绝理由',
- type: 'warning'
- });
- return
- }
- this.$http({
- url: this.$http.adornUrl('user/updateUserResumes'),
- method: 'post',
- params: this.$http.adornParams({
- 'userIds': this.helpTakeId,
- 'status': this.status,
- 'auditContent': this.content
- })
- }).then(({
- data
- }) => {
- this.dialogFormVisible = false
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.content = ''
- this.status = -1
- this.dataSelect()
- }
- })
- })
- },
- // 不可提现金额充值
- rechargenone(userId) {
- this.userId = userId
- this.dialogFormVisible1 = true
- },
- StairNoticeTo1() {
- if (this.money == '') {
- this.$notify({
- title: '提示',
- duration: 1800,
- message: '请输入次数',
- type: 'warning'
- })
- return
- }
- this.$http({
- url: this.$http.adornUrl('user/updateUserViewResumes'),
- method: 'post',
- params: this.$http.adornParams({
- 'userId':this.userId,
- 'num':this.money
- })
- }).then(({
- data
- }) => {
- if (data.code == 0) {
- this.$message({
- message: '修改成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.money = ''
- this.dataSelect()
- }
- })
- this.dialogFormVisible1 = false
- } else {
- this.$message.error(data.msg)
- }
- })
- },
- // 导出
- exportBtn() {
- var endTime=this.endTime
- if(this.endTime!=''){
- endTime=this.endTime+" 23:59:59"
- }
- this.$http({
- url: this.$http.adornUrl('user/exportExcelUser'),
- method: 'get',
- responseType: 'blob',
- params: this.$http.adornParams({
- // 'page': page,
- // 'size': this.size,
- 'member': this.member,
- 'phone': this.phone,
- 'userName': this.campus,
- 'userType': this.isAuthentication,
- // 'userResumesStatus': this.userResumesStatus,
- 'weekMember':this.weekMember,
- 'isUserVip':this.isUserVip,
- 'isCompanyVip':this.isCompanyVip,
- 'startTime': this.startTime,
- 'endTime': this.endTime,
- // 'inviterCode': this.inviterCodeT,
- // 'invitationCode': this.invitationCodeT,
- })
- }).then(({
- data
- }) => {
- let blob = new Blob([data], {
- type: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
- })
- if (window.navigator.msSaveOrOpenBlob) {
- navigator.msSaveBlob(blob)
- } else {
- let url = window.URL.createObjectURL(blob)
- let elink = document.createElement('a')
- elink.download = '企业用户列表.xlsx'
- elink.style.display = 'none'
- elink.href = url
- document.body.appendChild(elink)
- elink.click()
- document.body.removeChild(elink)
- }
- })
- },
- // 修改会员弹框
- zengsongVip(row){
- this.type = 1
- this.proportion = ''
- this.userIdss = row.userId
- this.dialogFormVisibleZs = true
- this.vipId=''
- this.vipNameType = 0
- this.classSelectVipType()
- },
- // 设置会员
- updateVip(row){
- if (this.vipId == '') {
- this.$notify({
- title: '提示',
- duration: 1800,
- message: '请选择会员种类',
- type: 'warning'
- });
- return
- }
- if (this.proportion === '') {
- this.$notify({
- title: '提示',
- duration: 1800,
- message: '请输入天数',
- type: 'warning'
- });
- return
- }
- this.$http({
- url: this.$http.adornUrl('vipDetails/giveUserVip'),
- method: 'post',
- params: this.$http.adornParams({
- 'userId':this.userIdss,
- 'num':this.proportion,
- 'vipType':2,
- 'vipId': this.vipId,
- 'vipNameType': this.vipNameType,
- // 'type':this.type
- })
- }).then(({
- data
- }) => {
- if(data.code==0){
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.dialogFormVisibleZs = false
- this.dataSelect()
- }
- })
- }else{
- this.$message({
- message: data.msg,
- type: 'warning',
- duration: 1500,
- onClose: () => {
- this.dataSelect()
- }
- })
- }
- })
- },
- // 取消会员
- quxiaoVip(row){
- this.$confirm(`确定要取消会员?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.$http({
- url: this.$http.adornUrl('vipDetails/cancelUserVip'),
- method: 'post',
- // data: this.$http.adornData({
- params: this.$http.adornParams({
- 'userId':row.userId,
- 'vipType':2,
- })
- }).then(({
- data
- }) => {
- if(data.code==0){
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.dataSelect()
- }
- })
- }else{
- this.$message({
- message: data.msg,
- type: 'warning',
- duration: 1500,
- onClose: () => {
- }
- })
- }
- })
- })
- },
- },
- mounted() {
- // this.homeSelect()
- this.dataSelect()
- }
- }
- </script>
- <style scoped="scoped">
- .el-button+.el-button {
- margin-left: 0 !important;
- margin-top: 5px !important;
- }
- </style>
|