提交
This commit is contained in:
parent
a14e1841cc
commit
05ca0e6a45
|
@ -1,12 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<el-col :span="span">
|
<el-col :span="span">
|
||||||
<el-form-item :label="label" :prop="prop" :label-width="labelWidth">
|
<el-form-item :prop="prop" :label-width="labelWidth">
|
||||||
|
<template #label>
|
||||||
|
<el-tooltip v-if="!isEmpty(tip)" :content="tip" placement="top">
|
||||||
|
<i class="el-icon-question" style="margin-right: 5px;cursor: pointer"/>
|
||||||
|
</el-tooltip>
|
||||||
|
<span>{{label}}</span>
|
||||||
|
</template>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { isEmpty } from '@/utils/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'FormCol',
|
name: 'FormCol',
|
||||||
props: {
|
props: {
|
||||||
|
@ -25,7 +33,14 @@ export default {
|
||||||
labelWidth: {
|
labelWidth: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
|
},
|
||||||
|
tip: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
isEmpty,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -37,7 +37,7 @@ export default {
|
||||||
pageSizes: {
|
pageSizes: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default() {
|
default() {
|
||||||
return [10, 20, 30, 50]
|
return [10, 20, 30, 50, 100]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 移动端页码按钮的数量端默认值5
|
// 移动端页码按钮的数量端默认值5
|
||||||
|
|
|
@ -206,9 +206,9 @@
|
||||||
<el-tab-pane label="命令日志" :lazy="true">
|
<el-tab-pane label="命令日志" :lazy="true">
|
||||||
<command-log :query="{macList: macList}" :views="views.device"/>
|
<command-log :query="{macList: macList}" :views="views.device"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="时长/电量变化" :lazy="true">
|
<!-- <el-tab-pane label="时长/电量变化" :lazy="true">
|
||||||
<record-time :query="{deviceId: deviceData.deviceId}" view="device"/>
|
<record-time :query="{deviceId: deviceData.deviceId}" view="device"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
<el-tab-pane label="抄表记录" :lazy="true">
|
<el-tab-pane label="抄表记录" :lazy="true">
|
||||||
<reading-record :device-id="deviceData.deviceId"/>
|
<reading-record :device-id="deviceData.deviceId"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
169
src/views/system/smUser/components/UserFormDialog.vue
Normal file
169
src/views/system/smUser/components/UserFormDialog.vue
Normal file
|
@ -0,0 +1,169 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog :title="title" :visible.sync="visible" width="700px" append-to-body @close="onClose">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<form-col :span="span" label="用户头像" prop="avatar">
|
||||||
|
<image-upload v-model="form.avatar" :limit="1"/>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="用户类型" prop="type">
|
||||||
|
<el-select v-model="form.type" placeholder="请选择用户类型" style="width: 100%">
|
||||||
|
<el-option v-for="item of dict.type.sm_user_type" :key="item.value" :label="item.label" :value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="用户名称" prop="userName">
|
||||||
|
<el-input v-model="form.userName" placeholder="请输入用户名称" :maxlength="20" ></el-input>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="手机号" prop="phonenumber">
|
||||||
|
<el-input v-model="form.phonenumber" placeholder="请输入手机号" :maxlength="11" show-word-limit
|
||||||
|
clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="密码" prop="password">
|
||||||
|
<el-input v-model="form.password" placeholder="请输入密码,为空则不修改" type="password" :maxlength="32" show-word-limit show-password/>
|
||||||
|
</form-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<form-col :span="span" label="商户服务费" prop="serviceRate" label-width="8em" tip="平台收取商户的服务费">
|
||||||
|
<el-input v-model="form.serviceRate" placeholder="请输入平台收取商户服务费" type="number">
|
||||||
|
<template #append>%</template>
|
||||||
|
</el-input>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="代理服务费" prop="agentServiceRate" label-width="9em" v-if="form.type === SmUserType.AGENT" tip="平台收取代理商的服务费">
|
||||||
|
<el-input v-model="form.agentServiceRate" placeholder="请输入平台收取代理商服务费" type="number">
|
||||||
|
<template #append>%</template>
|
||||||
|
</el-input>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span * 2" label="提现服务费" prop="withdrawServiceRate" label-width="6em">
|
||||||
|
<el-input v-model="form.withdrawServiceRate" placeholder="请输入提现服务费" type="number">
|
||||||
|
<template #prepend>
|
||||||
|
<el-select v-model="form.withdrawServiceType" placeholder="请选择提现服务费收取方式" style="width: 10em">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.withdraw_service_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
<template #append>{{withdrawServiceUnit(form.withdrawServiceType)}}</template>
|
||||||
|
</el-input>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span * 2" label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" :maxlength="500" show-word-limit type="textarea"/>
|
||||||
|
</form-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="visible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { addSmUser, getSmUser, updateSmUser } from '@/api/system/smUser'
|
||||||
|
import { SmUserType } from '@/utils/constants'
|
||||||
|
import { $withdrawServiceType } from '@/utils/mixins'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "UserFormDialog",
|
||||||
|
dicts: ['sm_user_status', 'sm_user_type', 'sys_user_sex', 'service_type', 'withdraw_service_type'],
|
||||||
|
mixins: [$withdrawServiceType],
|
||||||
|
props: {
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
userId: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
span: 12,
|
||||||
|
title: '',
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
userName: [
|
||||||
|
{ required: true, message: '请输入用户名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
phonenumber: [
|
||||||
|
{ required: true, message: '请输入手机号',trigger: 'blur'}
|
||||||
|
],
|
||||||
|
type: [
|
||||||
|
{ required: true, message: '请选择用户类型', trigger: 'change' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
SmUserType() {
|
||||||
|
return SmUserType
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
show: {
|
||||||
|
handler(val) {
|
||||||
|
this.visible = val
|
||||||
|
if (val) {
|
||||||
|
this.reset()
|
||||||
|
if (this.userId) {
|
||||||
|
this.getDetail()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
userId: null,
|
||||||
|
userName: null,
|
||||||
|
nickName: null,
|
||||||
|
phonenumber: null,
|
||||||
|
sex: "2",
|
||||||
|
avatar: null,
|
||||||
|
type: '1',
|
||||||
|
deviceAdmin: false,
|
||||||
|
serviceType: '1',
|
||||||
|
withdrawServiceType: "1",
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.form && this.$refs.form.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDetail() {
|
||||||
|
getSmUser(this.userId).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.title = "修改用户信息"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
this.$refs.form.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.userId != null) {
|
||||||
|
updateSmUser(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功")
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('success')
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addSmUser(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功")
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('success')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onClose() {
|
||||||
|
this.$emit('update:show', false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -8,7 +8,22 @@
|
||||||
<el-row type="flex" style="justify-content: space-between">
|
<el-row type="flex" style="justify-content: space-between">
|
||||||
<div>用户详情</div>
|
<div>用户详情</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="text" icon="el-icon-setting" size="small" style="padding: 5px 0 0;" @click="showConfigDialog = true">用户配置</el-button>
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-setting"
|
||||||
|
size="small"
|
||||||
|
style="padding: 5px 0 0"
|
||||||
|
@click="showConfigDialog = true"
|
||||||
|
>配置</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="small"
|
||||||
|
style="padding: 5px 0 0"
|
||||||
|
@click="showEditDialog = true"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
@ -17,58 +32,110 @@
|
||||||
<div class="user-header">
|
<div class="user-header">
|
||||||
<el-avatar :size="64" :src="detail.avatar"></el-avatar>
|
<el-avatar :size="64" :src="detail.avatar"></el-avatar>
|
||||||
<el-row type="flex" class="name-box">
|
<el-row type="flex" class="name-box">
|
||||||
<span class="user-name">{{detail.realOrUserName}}</span>
|
<span class="user-name">{{ detail.realOrUserName }}</span>
|
||||||
<dict-tag :value="detail.type" :options="dict.type.sm_user_type"/>
|
<dict-tag
|
||||||
|
:value="detail.type"
|
||||||
|
:options="dict.type.sm_user_type"
|
||||||
|
/>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="phone-number">{{detail.phonenumber}}</div>
|
<div class="phone-number">{{ detail.phonenumber }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-row type="flex" style="margin-top: 16px;">
|
<el-row type="flex" style="margin-top: 16px">
|
||||||
<el-statistic title="店铺数" :value="detail.storeCount" :precision="0" suffix="家"/>
|
<el-statistic
|
||||||
<el-statistic title="设备数" :value="detail.deviceCount" :precision="0" suffix="台"/>
|
title="店铺数"
|
||||||
<el-statistic title="账户余额" :value="detail.balance" :precision="2" suffix="元"/>
|
:value="detail.storeCount"
|
||||||
<el-statistic title="总收入" :value="detail.totalIncome" :precision="2" suffix="元"/>
|
:precision="0"
|
||||||
<el-statistic title="未入账" :value="detail.waitBonusAmount" :precision="2" suffix="元"/>
|
suffix="家"
|
||||||
<el-statistic title="总提现" :value="detail.withDrawlAmount" :precision="2" suffix="元"/>
|
/>
|
||||||
<el-statistic title="总消费" :value="detail.rechargeAmount" :precision="2" suffix="元"/>
|
<el-statistic
|
||||||
|
title="设备数"
|
||||||
|
:value="detail.deviceCount"
|
||||||
|
:precision="0"
|
||||||
|
suffix="台"
|
||||||
|
/>
|
||||||
|
<el-statistic
|
||||||
|
title="账户余额"
|
||||||
|
:value="detail.balance"
|
||||||
|
:precision="2"
|
||||||
|
suffix="元"
|
||||||
|
/>
|
||||||
|
<el-statistic
|
||||||
|
title="总收入"
|
||||||
|
:value="detail.totalIncome"
|
||||||
|
:precision="2"
|
||||||
|
suffix="元"
|
||||||
|
/>
|
||||||
|
<el-statistic
|
||||||
|
title="未入账"
|
||||||
|
:value="detail.waitBonusAmount"
|
||||||
|
:precision="2"
|
||||||
|
suffix="元"
|
||||||
|
/>
|
||||||
|
<el-statistic
|
||||||
|
title="总提现"
|
||||||
|
:value="detail.withDrawlAmount"
|
||||||
|
:precision="2"
|
||||||
|
suffix="元"
|
||||||
|
/>
|
||||||
|
<el-statistic
|
||||||
|
title="总消费"
|
||||||
|
:value="detail.rechargeAmount"
|
||||||
|
:precision="2"
|
||||||
|
suffix="元"
|
||||||
|
/>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<div class="user-description">
|
<div class="user-description">
|
||||||
<el-descriptions :column="3">
|
<el-descriptions :column="3">
|
||||||
<el-descriptions-item label="充值服务费">
|
<el-descriptions-item label="充值服务费">
|
||||||
{{detail.realServiceRate | money | defaultValue}} %
|
{{ detail.realServiceRate | money | defaultValue }} %
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="代理服务费">
|
<el-descriptions-item label="代理服务费">
|
||||||
{{detail.agentServiceRate | money | defaultValue}} %
|
{{ detail.agentServiceRate | money | defaultValue }} %
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="提现服务费">
|
<el-descriptions-item label="提现服务费">
|
||||||
<template v-if="detail.withdrawServiceRate == null || detail.withdrawServiceType == null">跟随渠道</template>
|
<template
|
||||||
|
v-if="
|
||||||
|
detail.withdrawServiceRate == null ||
|
||||||
|
detail.withdrawServiceType == null
|
||||||
|
"
|
||||||
|
>跟随渠道</template
|
||||||
|
>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<dict-tag :options="dict.type.withdraw_service_type" :value="detail.withdrawServiceType" size="mini"/>
|
<dict-tag
|
||||||
{{detail.withdrawServiceRate}} {{serviceUnit(detail.withdrawServiceType)}}
|
:options="dict.type.withdraw_service_type"
|
||||||
|
:value="detail.withdrawServiceType"
|
||||||
|
size="mini"
|
||||||
|
/>
|
||||||
|
{{ detail.withdrawServiceRate }}
|
||||||
|
{{ serviceUnit(detail.withdrawServiceType) }}
|
||||||
</template>
|
</template>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="实名认证">
|
<el-descriptions-item label="实名认证">
|
||||||
<boolean-tag :value="detail.isReal" size="small"/>
|
<boolean-tag :value="detail.isReal" size="small" />
|
||||||
<el-link
|
<el-link
|
||||||
v-if="detail.isReal"
|
v-if="detail.isReal"
|
||||||
style="margin-left: 4px;"
|
style="margin-left: 4px"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
icon="el-icon-link"
|
icon="el-icon-link"
|
||||||
@click="handleResetRealName"
|
@click="handleResetRealName"
|
||||||
>解除实名</el-link>
|
>解除实名</el-link
|
||||||
|
>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="姓名">
|
<el-descriptions-item label="姓名">
|
||||||
{{detail.realName | defaultValue}}
|
{{ detail.realName | defaultValue }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="身份证">
|
<el-descriptions-item label="身份证">
|
||||||
{{detail.realIdCard | defaultValue}}
|
{{ detail.realIdCard | defaultValue }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="实名手机">
|
<el-descriptions-item label="实名手机">
|
||||||
{{detail.realPhone | defaultValue}}
|
{{ detail.realPhone | defaultValue }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="备注" :span="2">{{detail.remark | defaultValue}}</el-descriptions-item>
|
<el-descriptions-item label="备注" :span="2">{{
|
||||||
|
detail.remark | defaultValue
|
||||||
|
}}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -77,12 +144,15 @@
|
||||||
<el-col :lg="14" :md="12" :xs="24">
|
<el-col :lg="14" :md="12" :xs="24">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<el-row type="flex">
|
<el-row type="flex">
|
||||||
<el-tabs style="width: 100%">
|
<el-tabs style="width: 100%">
|
||||||
<el-tab-pane label="日报表" lazy>
|
<el-tab-pane label="日报表" lazy>
|
||||||
<user-daily-recharge-report v-if="detail.userId != null" :query="{arrivalId: detail.userId}"/>
|
<user-daily-recharge-report
|
||||||
|
v-if="detail.userId != null"
|
||||||
|
:query="{ arrivalId: detail.userId }"
|
||||||
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="月报表" lazy>
|
<el-tab-pane label="月报表" lazy>
|
||||||
<user-recharge-report :mch-id="detail.userId"/>
|
<user-recharge-report :mch-id="detail.userId" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -93,61 +163,94 @@
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<el-tabs>
|
<el-tabs>
|
||||||
<el-tab-pane label="商户设备列表" lazy>
|
<el-tab-pane label="商户设备列表" lazy>
|
||||||
<device v-if="detail.userId != null" :query="{userId: detail.userId}" :view="views.user"/>
|
<device
|
||||||
|
v-if="detail.userId != null"
|
||||||
|
:query="{ userId: detail.userId }"
|
||||||
|
:view="views.user"
|
||||||
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="代理设备列表" lazy>
|
<el-tab-pane label="代理设备列表" lazy>
|
||||||
<device v-if="detail.userId != null" :query="{agentId: detail.userId}" :view="views.user"/>
|
<device
|
||||||
|
v-if="detail.userId != null"
|
||||||
|
:query="{ agentId: detail.userId }"
|
||||||
|
:view="views.user"
|
||||||
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="店铺列表" lazy>
|
<el-tab-pane label="店铺列表" lazy>
|
||||||
<store :query="{userId: detail.userId}" :view="views.user"/>
|
<store :query="{ userId: detail.userId }" :view="views.user" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="套餐列表" lazy>
|
<el-tab-pane label="套餐列表" lazy>
|
||||||
<suit :query="{userId: detail.userId}" :view="views.user"/>
|
<suit :query="{ userId: detail.userId }" :view="views.user" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="充值订单" lazy>
|
<el-tab-pane label="充值订单" lazy>
|
||||||
<recharge :query="{userId: detail.userId}" :view="views.user"/>
|
<recharge :query="{ userId: detail.userId }" :view="views.user" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="收入订单" lazy>
|
<el-tab-pane label="收入订单" lazy>
|
||||||
<recharge :query="{mchId: detail.userId}" :view="views.mch"/>
|
<recharge :query="{ mchId: detail.userId }" :view="views.mch" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="分成记录" lazy>
|
<el-tab-pane label="分成记录" lazy>
|
||||||
<bonus :query="{arrivalId: detail.userId, arrivalTypes: BonusArrivalType.userList()}" :view="views.user"/>
|
<bonus
|
||||||
|
:query="{
|
||||||
|
arrivalId: detail.userId,
|
||||||
|
arrivalTypes: BonusArrivalType.userList(),
|
||||||
|
}"
|
||||||
|
:view="views.user"
|
||||||
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="提现列表" lazy>
|
<el-tab-pane label="提现列表" lazy>
|
||||||
<withdraw :query="{userId: detail.userId}" :view="views.user"/>
|
<withdraw :query="{ userId: detail.userId }" :view="views.user" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="应收账" lazy>
|
<el-tab-pane label="应收账" lazy>
|
||||||
<receive-bill :query="{userId: detail.userId}" :view="views.user"/>
|
<receive-bill
|
||||||
|
:query="{ userId: detail.userId }"
|
||||||
|
:view="views.user"
|
||||||
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="账变记录" lazy>
|
<el-tab-pane label="账变记录" lazy>
|
||||||
<record-balance :query="{userId: detail.userId}" :view="views.user"/>
|
<record-balance
|
||||||
|
:query="{ userId: detail.userId }"
|
||||||
|
:view="views.user"
|
||||||
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="风控记录" lazy>
|
<el-tab-pane label="风控记录" lazy>
|
||||||
<risk :query="{userId: detail.userId}" :view="views.user"/>
|
<risk :query="{ userId: detail.userId }" :view="views.user" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="风控审核" lazy>
|
<el-tab-pane label="风控审核" lazy>
|
||||||
<risk-info :query="{userId: detail.userId}" :view="views.user"/>
|
<risk-info :query="{ userId: detail.userId }" :view="views.user" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="实名认证记录" lazy>
|
<el-tab-pane label="实名认证记录" lazy>
|
||||||
<real-name :query="{userId: detail.userId}" :view="views.user"/>
|
<real-name :query="{ userId: detail.userId }" :view="views.user" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="绑定记录" lazy>
|
<el-tab-pane label="绑定记录" lazy>
|
||||||
<bind-record :query="{userId: detail.userId}" :view="views.user"/>
|
<bind-record
|
||||||
|
:query="{ userId: detail.userId }"
|
||||||
|
:view="views.user"
|
||||||
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="收款账户" lazy>
|
<el-tab-pane label="收款账户" lazy>
|
||||||
<account :query="{userId: detail.userId}" :view="views.user"/>
|
<account :query="{ userId: detail.userId }" :view="views.user" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="用户秘钥" lazy>
|
<el-tab-pane label="用户秘钥" lazy>
|
||||||
<access :query="{userId: detail.userId}" :view="views.user"/>
|
<access :query="{ userId: detail.userId }" :view="views.user" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<el-empty v-else description="用户不存在"/>
|
<el-empty v-else description="用户不存在" />
|
||||||
|
|
||||||
<!--用户设置-->
|
<!--用户设置-->
|
||||||
<user-config-dialog :show.sync="showConfigDialog" :user-id="detail.userId" @success="getDetail"/>
|
<user-config-dialog
|
||||||
|
:show.sync="showConfigDialog"
|
||||||
|
:user-id="detail.userId"
|
||||||
|
@success="getDetail"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!--用户编辑-->
|
||||||
|
<user-form-dialog
|
||||||
|
:show.sync="showEditDialog"
|
||||||
|
:user-id="detail.userId"
|
||||||
|
@success="getDetail"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -176,12 +279,35 @@ import UserDailyRechargeReport from '@/views/system/smUser/components/UserDailyR
|
||||||
import Bonus from '@/views/ss/bonus/index.vue'
|
import Bonus from '@/views/ss/bonus/index.vue'
|
||||||
import RiskInfo from '@/views/ss/riskInfo/index.vue'
|
import RiskInfo from '@/views/ss/riskInfo/index.vue'
|
||||||
import BindRecord from '@/views/system/bindRecord/index.vue'
|
import BindRecord from '@/views/system/bindRecord/index.vue'
|
||||||
|
import UserFormDialog from '@/views/system/smUser/components/UserFormDialog.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'User/:userId',
|
name: 'User/:userId',
|
||||||
mixins: [$view, $serviceType],
|
mixins: [$view, $serviceType],
|
||||||
dicts: ['sm_user_type', 'service_type', 'withdraw_service_type'],
|
dicts: ['sm_user_type', 'service_type', 'withdraw_service_type'],
|
||||||
components: { BindRecord, RiskInfo, Bonus, UserDailyRechargeReport, Risk, ReceiveBill, UserConfigDialog, RealName, Withdraw, BooleanTag, Recharge, Device, Suit, Account, RecordBalance, Store, Access, UserRechargeReport, UserAccount, UserDevice, LineChart},
|
components: {
|
||||||
|
BindRecord,
|
||||||
|
RiskInfo,
|
||||||
|
Bonus,
|
||||||
|
UserDailyRechargeReport,
|
||||||
|
Risk,
|
||||||
|
ReceiveBill,
|
||||||
|
UserConfigDialog,
|
||||||
|
RealName,
|
||||||
|
Withdraw,
|
||||||
|
BooleanTag,
|
||||||
|
Recharge,
|
||||||
|
Device,
|
||||||
|
Suit,
|
||||||
|
Account,
|
||||||
|
RecordBalance,
|
||||||
|
Store,
|
||||||
|
Access,
|
||||||
|
UserRechargeReport,
|
||||||
|
UserAccount,
|
||||||
|
UserDevice,
|
||||||
|
LineChart,
|
||||||
|
UserFormDialog
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
BonusArrivalType,
|
BonusArrivalType,
|
||||||
|
@ -189,6 +315,7 @@ export default {
|
||||||
detail: {},
|
detail: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
showConfigDialog: false,
|
showConfigDialog: false,
|
||||||
|
showEditDialog: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -243,7 +370,7 @@ export default {
|
||||||
.phone-number {
|
.phone-number {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
color: #9B9B9B;
|
color: #9b9b9b;
|
||||||
}
|
}
|
||||||
.user-header {
|
.user-header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -224,78 +224,22 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改普通用户信息对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-row>
|
|
||||||
<form-col :span="span" label="用户头像" prop="avatar">
|
|
||||||
<image-upload v-model="form.avatar" :limit="1"/>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="用户类型" prop="type">
|
|
||||||
<el-select v-model="form.type" placeholder="请选择用户类型" style="width: 100%">
|
|
||||||
<el-option v-for="item of dict.type.sm_user_type" :key="item.value" :label="item.label" :value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="用户名称" prop="userName">
|
|
||||||
<el-input v-model="form.userName" placeholder="请输入用户名称" :maxlength="20" ></el-input>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="手机号" prop="phonenumber">
|
|
||||||
<el-input v-model="form.phonenumber" placeholder="请输入手机号" :maxlength="11" show-word-limit
|
|
||||||
clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="密码" prop="password">
|
|
||||||
<el-input v-model="form.password" placeholder="请输入密码,为空则不修改" type="password" :maxlength="32" show-word-limit show-password/>
|
|
||||||
</form-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<form-col :span="span" label="商户服务费" prop="serviceRate" label-width="6em">
|
|
||||||
<el-input v-model="form.serviceRate" placeholder="请输入平台收取商户服务费" type="number">
|
|
||||||
<template #append>%</template>
|
|
||||||
</el-input>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="代理服务费" prop="agentServiceRate" label-width="7em" v-if="form.type === SmUserType.AGENT">
|
|
||||||
<el-input v-model="form.agentServiceRate" placeholder="请输入平台收取代理商服务费" type="number">
|
|
||||||
<template #append>%</template>
|
|
||||||
</el-input>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span * 2" label="提现服务费" prop="withdrawServiceRate" label-width="6em">
|
|
||||||
<el-input v-model="form.withdrawServiceRate" placeholder="请输入提现服务费" type="number">
|
|
||||||
<template #prepend>
|
|
||||||
<el-select v-model="form.withdrawServiceType" placeholder="请选择提现服务费收取方式" style="width: 10em">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.withdraw_service_type"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
<template #append>{{withdrawServiceUnit(form.withdrawServiceType)}}</template>
|
|
||||||
</el-input>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span * 2" label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" :maxlength="500" show-word-limit type="textarea"/>
|
|
||||||
</form-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<!--用户设置-->
|
<!--用户设置-->
|
||||||
<user-config-dialog :show.sync="showConfigDialog" :user-id="row.userId" @success="getList" show-current/>
|
<user-config-dialog :show.sync="showConfigDialog" :user-id="row.userId" @success="getList" show-current/>
|
||||||
|
|
||||||
|
<!-- 添加或修改普通用户信息对话框 -->
|
||||||
|
<user-form-dialog
|
||||||
|
:show.sync="open"
|
||||||
|
:user-id="userId"
|
||||||
|
@success="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
listSmUser,
|
listSmUser,
|
||||||
getSmUser,
|
|
||||||
addSmUser,
|
|
||||||
updateSmUser,
|
|
||||||
delSmUser,
|
delSmUser,
|
||||||
resetSmUserService
|
resetSmUserService
|
||||||
} from '@/api/system/smUser'
|
} from '@/api/system/smUser'
|
||||||
|
@ -304,6 +248,7 @@ import UserLink from '@/components/Business/SmUser/UserLink.vue'
|
||||||
import { SmUserType } from '@/utils/constants'
|
import { SmUserType } from '@/utils/constants'
|
||||||
import UserConfigDialog from '@/views/system/smUser/components/UserConfigDialog.vue'
|
import UserConfigDialog from '@/views/system/smUser/components/UserConfigDialog.vue'
|
||||||
import BooleanTag from '@/components/BooleanTag/index.vue'
|
import BooleanTag from '@/components/BooleanTag/index.vue'
|
||||||
|
import UserFormDialog from './components/UserFormDialog.vue'
|
||||||
|
|
||||||
const defaultSort = {
|
const defaultSort = {
|
||||||
prop: "createTime",
|
prop: "createTime",
|
||||||
|
@ -313,7 +258,7 @@ const defaultSort = {
|
||||||
export default {
|
export default {
|
||||||
name: "SmUser",
|
name: "SmUser",
|
||||||
mixins: [$showColumns, $serviceType, $withdrawServiceType],
|
mixins: [$showColumns, $serviceType, $withdrawServiceType],
|
||||||
components: { BooleanTag, UserConfigDialog, UserLink },
|
components: { BooleanTag, UserConfigDialog, UserLink, UserFormDialog },
|
||||||
dicts: ['sm_user_status', 'sm_user_type', 'sys_user_sex', 'service_type', 'withdraw_service_type'],
|
dicts: ['sm_user_status', 'sm_user_type', 'sys_user_sex', 'service_type', 'withdraw_service_type'],
|
||||||
computed: {
|
computed: {
|
||||||
SmUserType() {
|
SmUserType() {
|
||||||
|
@ -384,20 +329,7 @@ export default {
|
||||||
realOrUserName: null,
|
realOrUserName: null,
|
||||||
deviceAdmin: null
|
deviceAdmin: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
userId: null,
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
userName: [
|
|
||||||
{ required: true, message: '请输入用户名称', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
phonenumber: [
|
|
||||||
{ required: true, message: '请输入手机号',trigger: 'blur'}
|
|
||||||
],
|
|
||||||
type: [
|
|
||||||
{ required: true, message: '请选择用户类型', trigger: 'change' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -452,46 +384,9 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
userId: null,
|
|
||||||
userName: null,
|
|
||||||
nickName: null,
|
|
||||||
phonenumber: null,
|
|
||||||
sex: "2",
|
|
||||||
avatar: null,
|
|
||||||
type: '1',
|
|
||||||
deviceAdmin: false,
|
|
||||||
serviceType: '1',
|
|
||||||
withdrawServiceType: "1",
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.userId)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.userId = null;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加用户信息";
|
this.title = "添加用户信息";
|
||||||
},
|
},
|
||||||
|
@ -501,38 +396,14 @@ export default {
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.userId = row.userId || this.ids;
|
||||||
const userId = row.userId || this.ids
|
this.open = true;
|
||||||
getSmUser(userId).then(response => {
|
this.title = "修改用户信息";
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改用户信息";
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
handleUpdateRisk(row) {
|
handleUpdateRisk(row) {
|
||||||
this.row = row;
|
this.row = row;
|
||||||
this.showConfigDialog = true;
|
this.showConfigDialog = true;
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.userId != null) {
|
|
||||||
updateSmUser(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addSmUser(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const userIds = row.userId || this.ids;
|
const userIds = row.userId || this.ids;
|
||||||
|
@ -548,7 +419,23 @@ export default {
|
||||||
this.download('system/smUser/export', {
|
this.download('system/smUser/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `smUser_${new Date().getTime()}.xlsx`)
|
}, `smUser_${new Date().getTime()}.xlsx`)
|
||||||
}
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.userId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user