提交 7df1f826 作者: 施汉文

w账号详情新增字段

上级 082689f6
...@@ -313,22 +313,35 @@ export function corp_follow_up_task_index(data) { ...@@ -313,22 +313,35 @@ export function corp_follow_up_task_index(data) {
return request({ return request({
url: returnApi('/corp_follow_up_task/index'), url: returnApi('/corp_follow_up_task/index'),
method: 'post', method: 'post',
data data,
}) });
} }
// 【智能待办】工作台-我的 // 【智能待办】工作台-我的
export function corpIntelligentTaskMineList(data) { export function corpIntelligentTaskMineList(data) {
return request({ return request({
url: returnApi('/corp_intelligent_task/mineList'), url: returnApi('/corp_intelligent_task/mineList'),
method: 'post', method: 'post',
data data,
}) });
} }
// 【智能待办】工作台-完成、未完成 // 【智能待办】工作台-完成、未完成
export function corpIntelligentTaskExternalList(data) { export function corpIntelligentTaskExternalList(data) {
return request({ return request({
url: returnApi('/corp_intelligent_task/externalList'), url: returnApi('/corp_intelligent_task/externalList'),
method: 'post', method: 'post',
data data,
}) });
} }
\ No newline at end of file /**
* 查询会员首次绑定企微微信信息(首次绑定昵称/标识与首次绑定时间)
* @see https://doc.wozhangwan.com/project/514/interface/api/58755
* @param {{ member_id: string|number }} data - 掌游会员 id
* @returns {import('axios').AxiosPromise}
*/
export function getFirstBindExternalUser(data) {
return request({
url: returnApi('/corp_zyou_bind/getFirstBindExternalUser'),
method: 'post',
data,
});
}
<template> <template>
<el-drawer title="新增关联账号" :visible="show" size="360px" :append-to-body="true" @close="close"> <el-drawer
title="新增关联账号"
:visible="show"
size="360px"
:append-to-body="true"
@close="close"
>
<div class="content-wrapper"> <div class="content-wrapper">
<div class="content"> <div class="content">
<el-form ref="form" :model="form" label-position="top" :rules="rules" label-width="120px"> <el-form
<div class="inputContent"> ref="form"
<el-form-item label="请输入w账号" prop="username"> :model="form"
<el-input v-model.trim="form.username" placeholder="请输入w账号" class="input-with-select"> label-position="top"
</el-input> :rules="rules"
</el-form-item> label-width="120px"
<el-form-item label="请输入主游戏名" prop="main_game_id"> >
<el-select v-model="form.main_game_id" filterable remote clearable reserve-keyword placeholder="请输入主游戏名" <div class="inputContent">
style="width: 100%;" :remote-method="remoteMethod" :loading="loading" @focus="gameNameList = optionsList"> <el-form-item label="请输入w账号" prop="username">
<el-option v-for="item in gameNameList" :key="item.value" :label="item.label" :value="item.value"> <el-input
</el-option> v-model.trim="form.username"
</el-select> placeholder="请输入w账号"
</el-form-item> class="input-with-select"
<el-form-item >
label="请输入CP角色ID" </el-input>
prop="username" </el-form-item>
> <el-form-item label="请输入主游戏名" prop="main_game_id">
<el-input <el-select
v-model.trim="form.cp_role_id" v-model="form.main_game_id"
placeholder="请先选择主游戏" filterable
:disabled="form.main_game_id==''" remote
class="input-with-select" clearable
> reserve-keyword
</el-input> placeholder="请输入主游戏名"
</el-form-item> style="width: 100%"
<el-form-item label="请输入区服" prop="server_info"> :remote-method="remoteMethod"
<el-select v-model.trim="form.server_info" filterable remote :disabled="form.main_game_id == ''" clearable :loading="loading"
style="width: 100%;" reserve-keyword placeholder="请先选择主游戏" :remote-method="remoteMethodServer" @focus="gameNameList = optionsList"
:loading="loading"> >
<el-option v-for="item in serverNameList" :key="item.id" :label="item.label" :value="item.value"> <el-option
</el-option> v-for="item in gameNameList"
</el-select> :key="item.value"
</el-form-item> :label="item.label"
<el-form-item label="请输入角色名" prop="role_name"> :value="item.value"
<el-input v-model.trim="form.role_name" :disabled="form.main_game_id==''" placeholder="请先选择主游戏" class="input-with-select"> >
</el-input> </el-option>
</el-form-item> </el-select>
<el-form-item> </el-form-item>
<el-button type="primary" size="small" @click="onSubmit">搜索</el-button> <el-form-item label="请输入CP角色ID" prop="username">
</el-form-item> <el-input
</div> v-model.trim="form.cp_role_id"
</el-form> placeholder="请先选择主游戏"
<div class="table account_table"> :disabled="form.main_game_id == ''"
<div class="bind-account-title"> class="input-with-select"
账号列表 >
</div> </el-input>
<userTable :list="tableList" @checkedTag="checkedTag" /> </el-form-item>
</div> <el-form-item label="请输入区服" prop="server_info">
<!-- <div class="line"></div> w92865226508--> <el-select
<div v-if="userDetails.username" class="account_select_userInfo"> v-model.trim="form.server_info"
<div class="bind-account-title" style="margin-top: 20px;"> filterable
账号详情 remote
</div> :disabled="form.main_game_id == ''"
<div class="item rowFlex columnCenter"><span class="label">账号</span> clearable
<p class="text">{{ userDetails.username }}</p> <span v-if="userDetails.account_type == 2" style="width: 100%"
class="account_type"></span> reserve-keyword
</div> placeholder="请先选择主游戏"
<div class="item rowFlex columnCenter"><span class="label">获客渠道</span> :remote-method="remoteMethodServer"
<p class="text">{{ userDetails.channel_name }}</p> :loading="loading"
</div> >
<div class="item rowFlex columnCenter"><span class="label">注册渠道</span> <el-option
<p class="text">{{ userDetails.register_channel_name }}</p> v-for="item in serverNameList"
</div> :key="item.id"
<div class="item rowFlex columnCenter"><span class="label">运营渠道</span> :label="item.label"
<p class="text">{{ userDetails.operator_channel_name }}</p> :value="item.value"
</div> >
<div class="item rowFlex columnCenter"><span class="label">注册游戏</span> </el-option>
<p class="text">{{ userDetails.reg_game_name }}</p> </el-select>
</div> </el-form-item>
<div class="item rowFlex columnCenter"><span class="label">主游戏</span> <el-form-item label="请输入角色名" prop="role_name">
<p class="text">{{ userDetails.main_game_name }}</p> <el-input
</div> v-model.trim="form.role_name"
<div class="item rowFlex columnCenter"><span class="label">真实姓名</span> :disabled="form.main_game_id == ''"
<p class="text">{{ userDetails.real_name }}</p> placeholder="请先选择主游戏"
</div> class="input-with-select"
<div class="item rowFlex columnCenter"><span class="label">手机号</span> >
<p class="text">{{ userDetails.mobile }}</p> </el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="onSubmit"
>搜索</el-button
>
</el-form-item>
</div>
</el-form>
<div class="table account_table">
<div class="bind-account-title">账号列表</div>
<userTable :list="tableList" @checkedTag="checkedTag" />
</div> </div>
<div class="item rowFlex columnCenter"><span class="label">染色时间</span> <!-- <div class="line"></div> w92865226508-->
<p class="text">{{ moment(userDetails.seq_time * 1000).format('YYYY-MM-DD') }}</p> <div v-if="userDetails.username" class="account_select_userInfo">
</div> <div class="bind-account-title" style="margin-top: 20px">
<div class="item rowFlex columnCenter"><span class="label">注册时间</span> 账号详情
<p class="text">{{ moment(userDetails.reg_time * 1000).format('YYYY-MM-DD') }}</p> </div>
</div> <div class="item rowFlex columnCenter">
<div class="item rowFlex columnCenter"><span class="label">登录系统</span> <span class="label">账号</span>
<p class="text">{{ userDetails.last_login_os }}</p> <p class="text">{{ userDetails.username }}</p>
</div> <span v-if="userDetails.account_type == 2" class="account_type"
<div class="item rowFlex columnCenter"><span class="label">充值金额</span> ></span
<p class="text">{{ userDetails.recharge_total }}</p> >
</div> </div>
<div class="item rowFlex columnCenter"><span class="label">是否添加微信</span> <div class="item rowFlex columnCenter">
<p class="text">{{ userDetails.wechat_add_status_text }}</p> <span class="label">获客渠道</span>
<p class="text">{{ userDetails.channel_name }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">注册渠道</span>
<p class="text">{{ userDetails.register_channel_name }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">运营渠道</span>
<p class="text">{{ userDetails.operator_channel_name }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">注册游戏</span>
<p class="text">{{ userDetails.reg_game_name }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">主游戏</span>
<p class="text">{{ userDetails.main_game_name }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">真实姓名</span>
<p class="text">{{ userDetails.real_name }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">手机号</span>
<p class="text">{{ userDetails.mobile }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">染色时间</span>
<p class="text">
{{ moment(userDetails.seq_time * 1000).format('YYYY-MM-DD') }}
</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">注册时间</span>
<p class="text">
{{ moment(userDetails.reg_time * 1000).format('YYYY-MM-DD') }}
</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">登录系统</span>
<p class="text">{{ userDetails.last_login_os }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">充值金额</span>
<p class="text">{{ userDetails.recharge_total }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">是否添加微信</span>
<p class="text">{{ userDetails.wechat_add_status_text }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">首次绑定微信</span>
<p class="text">{{ firstWechatBind?.external_user_name }}</p>
</div>
<div class="item rowFlex columnCenter">
<span class="label">首次绑定时间</span>
<p class="text">{{ firstWechatBind?.bind_time }}</p>
</div>
</div> </div>
</div> </div>
</div> <page
<page class="pageInfo" :page-info="pageInfo" @requestNextPage="requestNextPage" /> class="pageInfo"
<span class="dialog-footer rowFlex"> :page-info="pageInfo"
<el-button class="btn" type="primary" size="small" :disabled="!userDetails.id" @click="confirmSubmit"> @requestNextPage="requestNextPage"
</el-button> />
<span class="dialog-footer rowFlex">
<el-button
class="btn"
type="primary"
size="small"
:disabled="!userDetails.id"
@click="confirmSubmit"
>确 定</el-button
>
<el-button class="btn" size="small" @click="close">取 消</el-button> <el-button class="btn" size="small" @click="close">取 消</el-button>
</span> </span>
</div> </div>
...@@ -108,246 +193,296 @@ ...@@ -108,246 +193,296 @@
</template> </template>
<script type="text/javascript"> <script type="text/javascript">
import moment from 'moment' import moment from 'moment';
import userTable from './userTable.vue' import userTable from './userTable.vue';
import { getRoleHoLo, memberView, selectSearch } from '@/api/game' import { getRoleHoLo, memberView, selectSearch } from '@/api/game';
import { checkZyouBind,zyouBind } from '@/api/works' import { checkZyouBind, zyouBind } from '@/api/works';
import { mapMutations, mapActions, mapState } from 'vuex' import { mapMutations, mapActions, mapState } from 'vuex';
import page from '@/components/page/pageNum.vue' import { getFirstBindExternalUser } from '@/api/works';
export default { import page from '@/components/page/pageNum.vue';
name: 'addUser', export default {
components: { name: 'addUser',
userTable, components: {
page userTable,
}, page,
props: ['show'], },
data() { props: ['show'],
return { data() {
moment, return {
tableList: [], moment,
checkoutUser: {}, tableList: [],
userDetails: {}, checkoutUser: {},
loading: false, userDetails: {},
pageInfo: { firstWechatBind: {},
page: 1, loading: false,
page_size: 20, pageInfo: {
total: 0 page: 1,
}, page_size: 20,
form: { total: 0,
member_id: '', },
username: '', form: {
role_name: '', member_id: '',
cp_role_id:'', username: '',
main_game_id: '', role_name: '',
server_info: '' cp_role_id: '',
}, main_game_id: '',
gameNameList: [], server_info: '',
optionsList: [], },
serverNameList: [], gameNameList: [],
rules: {}, optionsList: [],
serverNameList: [],
rules: {},
};
},
computed: {
...mapState('game', ['chatUserInfo', 'userid', 'external_userid']),
},
watch: {
show(newVal, oldVal) {
if (newVal) {
// this.requestRoleList()
this.requestGameList();
} }
}, },
computed: { },
...mapState('game', ['chatUserInfo','userid','external_userid']), mounted() {},
}, methods: {
watch: { ...mapActions('game', ['gameBindUser']),
show(newVal, oldVal) { ...mapMutations('game', ['set_accountSelect']),
if (newVal) { requestRoleList() {
// this.requestRoleList() const data = {
this.requestGameList() member_id: this.form.member_id,
username: this.form.username.trim(),
role_name: this.form.role_name.trim(),
main_game_id:
this.form.main_game_id !== '' ? [this.form.main_game_id] : [],
zyou_server_id:
this.form.server_info !== '' ? [this.form.server_info] : [],
cp_role_id: this.form.cp_role_id.trim() || '',
search_type: 'bind',
...this.pageInfo,
};
getRoleHoLo(data).then((res) => {
if (res.status_code == 1) {
if (res.data.data.length == 0) {
this.tableList = [];
this.$message.warning('暂无数据');
} else {
this.tableList = res.data.data;
this.pageInfo = res.data.page_info;
}
} }
} });
}, },
mounted() { // S181.啊呸¤可瑞 八荒181服
// 分页
requestNextPage(pageInfo) {
this.pageInfo.page = pageInfo.page;
this.requestRoleList();
}, },
methods: { remoteMethodServer(query) {
...mapActions('game', ['gameBindUser']), if (query !== '') {
...mapMutations('game', ['set_accountSelect']), this.loading = true;
requestRoleList() {
const data = { const data = {
member_id: this.form.member_id, type: 'server_info',
username: this.form.username.trim(), value: query,
role_name: this.form.role_name.trim(), main_game_ids: this.form.main_game_id,
main_game_id: this.form.main_game_id !== '' ? [this.form.main_game_id] : [], };
zyou_server_id: this.form.server_info !== '' ? [this.form.server_info] : [], selectSearch(data).then((res) => {
cp_role_id: this.form.cp_role_id.trim() || '', this.loading = false;
search_type: 'bind',
...this.pageInfo
}
getRoleHoLo(data).then(res => {
if (res.status_code == 1) { if (res.status_code == 1) {
if (res.data.data.length == 0) { this.serverNameList = res.data.data;
this.tableList = []
this.$message.warning('暂无数据')
} else {
this.tableList = res.data.data
this.pageInfo = res.data.page_info
}
} }
}) });
}, }
// S181.啊呸¤可瑞 八荒181服 },
remoteMethod(query) {
// 分页 if (query !== '') {
requestNextPage(pageInfo) { this.gameNameList = this.optionsList.filter((item) => {
this.pageInfo.page = pageInfo.page return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
this.requestRoleList() });
}, } else {
remoteMethodServer(query) { this.gameNameList = [];
if (query !== '') { }
this.loading = true },
const data = { requestGameList() {
type: 'server_info', const data = {
value: query, type: 'mainGameList',
main_game_ids: this.form.main_game_id value: '',
} weixin_blong_id: '',
selectSearch(data).then(res => { };
this.loading = false selectSearch(data).then((res) => {
if (res.status_code == 1) { this.loading = false;
this.serverNameList = res.data.data if (res.status_code == 1) {
} this.gameNameList = this.optionsList = res.data.data;
})
} }
}, });
remoteMethod(query) { },
if (query !== '') { close() {
this.gameNameList = this.optionsList.filter(item => { this.$emit('update:show', false);
return item.label.toLowerCase() this.resizeData();
.indexOf(query.toLowerCase()) > -1 this.$emit('close');
}) },
onSubmit() {
this.$refs.form.validate((valid) => {
this.pageInfo = {
page: 1,
page_size: 20,
total: 0,
};
if (valid) {
if (
this.form.role_name == '' &&
this.form.username == '' &&
this.form.cp_role_id == ''
) {
this.$message.warning('请输入角色名或者w账号或者CP角色ID');
return;
}
this.requestRoleList();
} else { } else {
this.gameNameList = [] console.log('error submit!!');
return false;
} }
}, });
requestGameList() { },
const data = { resizeData() {
type: 'mainGameList', this.form = {
value: '', member_id: '',
weixin_blong_id: '' username: '',
} role_name: '',
selectSearch(data).then(res => { cp_role_id: '',
this.loading = false main_game_id: '',
if (res.status_code == 1) { server_info: '',
this.gameNameList = this.optionsList = res.data.data };
} this.tableList = [];
}) this.checkoutUser = {};
}, this.userDetails = {};
close() { this.firstWechatBind = {};
this.$emit('update:show', false) },
this.resizeData() /**
this.$emit('close') * 拉取当前选中会员的首次绑定微信信息;仅在表格勾选 w 账号并成功返回 memberView 后调用(见 rquestUserInfo)。
}, * 快速切换用户时用 member_id 比对,避免旧请求覆盖新数据。
onSubmit() { * @param {string|number|undefined} memberId - 会员 id,与 userDetails.id 一致
this.$refs.form.validate((valid) => { */
this.pageInfo = { requestFirstWechatBind(memberId) {
page: 1, if (!memberId) {
page_size: 20, this.firstWechatBind = {};
total: 0 return;
} }
if (valid) { const reqMemberId = memberId;
if (this.form.role_name == '' && this.form.username == '' && this.form.cp_role_id == '') { getFirstBindExternalUser({ member_id: memberId })
this.$message.warning('请输入角色名或者w账号或者CP角色ID') .then((res) => {
return if (reqMemberId !== this.userDetails.id) return;
} if (res.status_code === 1 && res.data) {
this.requestRoleList() this.firstWechatBind = res.data;
} else { } else {
console.log('error submit!!') this.firstWechatBind = {};
return false
} }
}) })
}, .catch(() => {
resizeData() { if (reqMemberId === this.userDetails.id) {
this.form = { this.firstWechatBind = {};
member_id: '', }
username: '', });
role_name: '', },
cp_role_id: '', confirmSubmit() {
main_game_id: '', const data = {
server_info: '' member_id:
this.userDetails.id && this.userDetails.id != ''
? this.userDetails.id
: this.checkoutUser.member_id,
username: this.userDetails.username,
};
checkZyouBind(data).then((res) => {
console.log(data);
if (!res.data.has_bind) {
this.submit();
} else {
this.$confirm(res.data.tip || '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.submit();
})
.catch((err) => {
console.log(err);
this.$message({
type: 'info',
message: '已取消删除',
});
});
} }
this.tableList = [] });
this.checkoutUser = {} },
this.userDetails = {} submit() {
}, const data = {
confirmSubmit() { userid: this.userid || this.chatUserInfo.userid,
const data = { external_userid:
member_id: this.userDetails.id && this.userDetails.id != '' ? this.userDetails.id : this.checkoutUser.member_id, this.external_userid || this.chatUserInfo.external_userid,
username: this.userDetails.username member_id:
this.userDetails.id && this.userDetails.id != ''
? this.userDetails.id
: this.checkoutUser.member_id,
username: this.userDetails.username,
reg_game_id: this.userDetails.reg_game_id,
main_game_id: this.userDetails.main_game_id,
recharge_total: this.userDetails.recharge_total,
};
console.log(
this.chatUserInfo,
'this.chatUserInfo',
this.userid,
this.external_userid,
);
// 绑定掌游账号
zyouBind(data).then((res) => {
if (res.status_code == 1) {
this.$message.success(res.msg);
this.updateData();
} }
checkZyouBind(data).then(res => { });
console.log(data) },
if (!res.data.has_bind) { // 更新列表数据
this.submit() updateData() {
const data = {
userid: this.chatUserInfo.userid,
external_userid: this.chatUserInfo.external_userid,
};
this.gameBindUser(data).then((res) => {
this.set_accountSelect(this.userDetails.id);
this.close();
});
},
// 勾选活码
checkedTag(value) {
this.checkoutUser = value;
const data = {
member_id: value.member_id,
need_channel: 1,
need_roleInfo: 1,
};
this.rquestUserInfo(data);
},
rquestUserInfo(data) {
memberView(data).then((res) => {
if (res.status_code == 1) {
this.userDetails = res.data;
const memberId = res.data.id ?? res.data.member_id ?? data.member_id;
if (memberId) {
this.requestFirstWechatBind(memberId);
} else { } else {
this.$confirm(res.data.tip || '', { this.firstWechatBind = {};
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.submit()
})
.catch((err) => {
console.log(err)
this.$message({
type: 'info',
message: '已取消删除'
})
})
} }
})
},
submit() {
const data = {
userid: this.userid || this.chatUserInfo.userid ,
external_userid:this.external_userid || this.chatUserInfo.external_userid ,
member_id: this.userDetails.id && this.userDetails.id != '' ? this.userDetails.id : this.checkoutUser.member_id,
username: this.userDetails.username,
reg_game_id: this.userDetails.reg_game_id,
main_game_id: this.userDetails.main_game_id,
recharge_total: this.userDetails.recharge_total,
}
console.log(this.chatUserInfo,'this.chatUserInfo',this.userid,this.external_userid)
// 绑定掌游账号
zyouBind(data).then(res => {
if (res.status_code == 1) {
this.$message.success(res.msg)
this.updateData()
}
})
},
// 更新列表数据
updateData() {
const data = {
userid: this.chatUserInfo.userid,
external_userid: this.chatUserInfo.external_userid
} }
this.gameBindUser(data).then(res => { });
this.set_accountSelect(this.userDetails.id) },
this.close() },
}) };
}, </script>
// 勾选活码
checkedTag(value) {
this.checkoutUser = value
const data = {
member_id: value.member_id,
need_channel: 1,
need_roleInfo: 1
}
this.rquestUserInfo(data)
},
rquestUserInfo(data) {
memberView(data).then(res => {
if (res.status_code == 1) {
this.userDetails = res.data
}
})
}
}
}
</script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-drawer { ::v-deep .el-drawer {
...@@ -428,7 +563,6 @@ ...@@ -428,7 +563,6 @@
} }
} }
} }
} }
.account_table { .account_table {
...@@ -477,4 +611,4 @@ ...@@ -477,4 +611,4 @@
::v-deep .el-select-dropdown { ::v-deep .el-select-dropdown {
min-width: 210px !important; min-width: 210px !important;
} }
</style> </style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论