hupeng
4 years ago
33 changed files with 721 additions and 223 deletions
@ -0,0 +1,207 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<!--工具栏--> |
||||
<div class="head-container"> |
||||
<!-- 搜索 --> |
||||
<el-input v-model="nickname" clearable placeholder="输入用户昵称" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery" /> |
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button> |
||||
<!-- 新增 --> |
||||
<el-button |
||||
type="danger" |
||||
class="filter-item" |
||||
size="mini" |
||||
icon="el-icon-refresh" |
||||
@click="toQuery" |
||||
>刷新</el-button> |
||||
|
||||
|
||||
</div> |
||||
<!--表单组件--> |
||||
<eForm ref="form" :is-add="isAdd" /> |
||||
<pForm ref="formp" :is-add="isAdd" /> |
||||
<!--表格渲染--> |
||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;"> |
||||
<el-table-column prop="nickname" label="用户昵称" /> |
||||
<el-table-column prop="title" label="账单标题" /> |
||||
<el-table-column prop="category" label="明细种类"> |
||||
<template slot-scope="scope"> |
||||
<span v-if="scope.row.category == 'now_money'">余额</span> |
||||
<span v-else-if="scope.row.category == 'integral'">积分</span> |
||||
<span v-else>未知</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="number" label="明细数字"> |
||||
<template slot-scope="scope"> |
||||
<span v-if="scope.row.pm == 1">+</span> |
||||
<span v-else>-</span> |
||||
<span>{{ scope.row.number }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column :show-overflow-tooltip="true" prop="addTime" label="创建日期"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.createTime }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<!--分页组件--> |
||||
<el-pagination |
||||
:total="total" |
||||
:current-page="page + 1" |
||||
style="margin-top: 8px;" |
||||
layout="total, prev, pager, next, sizes" |
||||
@size-change="sizeChange" |
||||
@current-change="pageChange" |
||||
/> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import checkPermission from '@/utils/permission' |
||||
import initData from '@/mixins/crud' |
||||
import { del, onStatus } from '@/api/yxUser' |
||||
import eForm from './form' |
||||
import pForm from './formp' |
||||
import { formatTime } from '@/utils/index' |
||||
export default { |
||||
components: { eForm, pForm }, |
||||
mixins: [initData], |
||||
data() { |
||||
return { |
||||
delLoading: false, nickname: '', category: '', type: '', |
||||
queryTypeOptions: [ |
||||
{ key: 'nickname', display_name: '用户昵称' }, |
||||
{ key: 'phone', display_name: '手机号码' } |
||||
], |
||||
categoryOptions: [ |
||||
{ value: 'now_money', label: '余额' }, |
||||
{ value: 'integral', label: '积分' } |
||||
], |
||||
typeOptions: [ |
||||
{ value: 'brokerage', label: '佣金' }, |
||||
{ value: 'sign', label: '签到' } |
||||
] |
||||
} |
||||
}, |
||||
created() { |
||||
this.$nextTick(() => { |
||||
this.init() |
||||
}) |
||||
}, |
||||
methods: { |
||||
formatTime, |
||||
checkPermission, |
||||
onStatus(id, status) { |
||||
this.$confirm(`确定进行[${status ? '禁用' : '开启'}]操作?`, '提示', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning' |
||||
}) |
||||
.then(() => { |
||||
onStatus(id, { status: status }).then(({ data }) => { |
||||
this.$message({ |
||||
message: '操作成功', |
||||
type: 'success', |
||||
duration: 1000, |
||||
onClose: () => { |
||||
this.init() |
||||
} |
||||
}) |
||||
}) |
||||
}) |
||||
.catch(() => { }) |
||||
}, |
||||
beforeInit() { |
||||
this.url = 'api/yxUserBill' |
||||
const sort = 'id,desc' |
||||
this.params = { |
||||
page: this.page, |
||||
size: this.size, |
||||
nickname: this.nickname, |
||||
category: 'now_money', |
||||
type: 'brokerage' |
||||
} |
||||
const query = this.query |
||||
const type = query.type |
||||
const value = query.value |
||||
if (type && value) { this.params[type] = value } |
||||
return true |
||||
}, |
||||
subDelete(uid) { |
||||
this.delLoading = true |
||||
del(uid).then(res => { |
||||
this.delLoading = false |
||||
this.$refs[uid].doClose() |
||||
this.dleChangePage() |
||||
this.init() |
||||
this.$notify({ |
||||
title: '删除成功', |
||||
type: 'success', |
||||
duration: 2500 |
||||
}) |
||||
}).catch(err => { |
||||
this.delLoading = false |
||||
this.$refs[uid].doClose() |
||||
console.log(err.response.data.message) |
||||
}) |
||||
}, |
||||
add() { |
||||
this.isAdd = true |
||||
this.$refs.form.dialog = true |
||||
}, |
||||
edit(data) { |
||||
this.isAdd = false |
||||
const _this = this.$refs.form |
||||
_this.form = { |
||||
uid: data.uid, |
||||
account: data.account, |
||||
pwd: data.pwd, |
||||
realName: data.realName, |
||||
birthday: data.birthday, |
||||
cardId: data.cardId, |
||||
mark: data.mark, |
||||
partnerId: data.partnerId, |
||||
groupId: data.groupId, |
||||
nickname: data.nickname, |
||||
avatar: data.avatar, |
||||
phone: data.phone, |
||||
addTime: data.addTime, |
||||
addIp: data.addIp, |
||||
lastTime: data.lastTime, |
||||
lastIp: data.lastIp, |
||||
nowMoney: data.nowMoney, |
||||
brokeragePrice: data.brokeragePrice, |
||||
integral: data.integral, |
||||
signNum: data.signNum, |
||||
status: data.status, |
||||
level: data.level, |
||||
spreadUid: data.spreadUid, |
||||
spreadTime: data.spreadTime, |
||||
userType: data.userType, |
||||
isPromoter: data.isPromoter, |
||||
payCount: data.payCount, |
||||
spreadCount: data.spreadCount, |
||||
cleanTime: data.cleanTime, |
||||
addres: data.addres, |
||||
adminid: data.adminid, |
||||
loginType: data.loginType |
||||
} |
||||
_this.dialog = true |
||||
}, |
||||
editP(data) { |
||||
this.isAdd = false |
||||
const _this = this.$refs.formp |
||||
_this.form = { |
||||
uid: data.uid, |
||||
nickname: data.nickname, |
||||
ptype: 1, |
||||
money: 0 |
||||
} |
||||
_this.dialog = true |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
@ -0,0 +1,207 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<!--工具栏--> |
||||
<div class="head-container"> |
||||
<!-- 搜索 --> |
||||
<el-input v-model="nickname" clearable placeholder="输入用户昵称" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery" /> |
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button> |
||||
<!-- 新增 --> |
||||
<el-button |
||||
type="danger" |
||||
class="filter-item" |
||||
size="mini" |
||||
icon="el-icon-refresh" |
||||
@click="toQuery" |
||||
>刷新</el-button> |
||||
|
||||
|
||||
</div> |
||||
<!--表单组件--> |
||||
<eForm ref="form" :is-add="isAdd" /> |
||||
<pForm ref="formp" :is-add="isAdd" /> |
||||
<!--表格渲染--> |
||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;"> |
||||
<el-table-column prop="nickname" label="用户昵称" /> |
||||
<el-table-column prop="title" label="账单标题" /> |
||||
<el-table-column prop="category" label="明细种类"> |
||||
<template slot-scope="scope"> |
||||
<span v-if="scope.row.category == 'now_money'">余额</span> |
||||
<span v-else-if="scope.row.category == 'integral'">积分</span> |
||||
<span v-else>未知</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="number" label="明细数字"> |
||||
<template slot-scope="scope"> |
||||
<span v-if="scope.row.pm == 1">+</span> |
||||
<span v-else>-</span> |
||||
<span>{{ scope.row.number }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column :show-overflow-tooltip="true" prop="addTime" label="创建日期"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.createTime }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<!--分页组件--> |
||||
<el-pagination |
||||
:total="total" |
||||
:current-page="page + 1" |
||||
style="margin-top: 8px;" |
||||
layout="total, prev, pager, next, sizes" |
||||
@size-change="sizeChange" |
||||
@current-change="pageChange" |
||||
/> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import checkPermission from '@/utils/permission' |
||||
import initData from '@/mixins/crud' |
||||
import { del, onStatus } from '@/api/yxUser' |
||||
import eForm from './form' |
||||
import pForm from './formp' |
||||
import { formatTime } from '@/utils/index' |
||||
export default { |
||||
components: { eForm, pForm }, |
||||
mixins: [initData], |
||||
data() { |
||||
return { |
||||
delLoading: false, nickname: '', category: '', type: '', |
||||
queryTypeOptions: [ |
||||
{ key: 'nickname', display_name: '用户昵称' }, |
||||
{ key: 'phone', display_name: '手机号码' } |
||||
], |
||||
categoryOptions: [ |
||||
{ value: 'now_money', label: '余额' }, |
||||
{ value: 'integral', label: '积分' } |
||||
], |
||||
typeOptions: [ |
||||
{ value: 'brokerage', label: '佣金' }, |
||||
{ value: 'sign', label: '签到' } |
||||
] |
||||
} |
||||
}, |
||||
created() { |
||||
this.$nextTick(() => { |
||||
this.init() |
||||
}) |
||||
}, |
||||
methods: { |
||||
formatTime, |
||||
checkPermission, |
||||
onStatus(id, status) { |
||||
this.$confirm(`确定进行[${status ? '禁用' : '开启'}]操作?`, '提示', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning' |
||||
}) |
||||
.then(() => { |
||||
onStatus(id, { status: status }).then(({ data }) => { |
||||
this.$message({ |
||||
message: '操作成功', |
||||
type: 'success', |
||||
duration: 1000, |
||||
onClose: () => { |
||||
this.init() |
||||
} |
||||
}) |
||||
}) |
||||
}) |
||||
.catch(() => { }) |
||||
}, |
||||
beforeInit() { |
||||
this.url = 'api/yxUserBill' |
||||
const sort = 'id,desc' |
||||
this.params = { |
||||
page: this.page, |
||||
size: this.size, |
||||
nickname: this.nickname, |
||||
category: 'integral', |
||||
type: '' |
||||
} |
||||
const query = this.query |
||||
const type = query.type |
||||
const value = query.value |
||||
if (type && value) { this.params[type] = value } |
||||
return true |
||||
}, |
||||
subDelete(uid) { |
||||
this.delLoading = true |
||||
del(uid).then(res => { |
||||
this.delLoading = false |
||||
this.$refs[uid].doClose() |
||||
this.dleChangePage() |
||||
this.init() |
||||
this.$notify({ |
||||
title: '删除成功', |
||||
type: 'success', |
||||
duration: 2500 |
||||
}) |
||||
}).catch(err => { |
||||
this.delLoading = false |
||||
this.$refs[uid].doClose() |
||||
console.log(err.response.data.message) |
||||
}) |
||||
}, |
||||
add() { |
||||
this.isAdd = true |
||||
this.$refs.form.dialog = true |
||||
}, |
||||
edit(data) { |
||||
this.isAdd = false |
||||
const _this = this.$refs.form |
||||
_this.form = { |
||||
uid: data.uid, |
||||
account: data.account, |
||||
pwd: data.pwd, |
||||
realName: data.realName, |
||||
birthday: data.birthday, |
||||
cardId: data.cardId, |
||||
mark: data.mark, |
||||
partnerId: data.partnerId, |
||||
groupId: data.groupId, |
||||
nickname: data.nickname, |
||||
avatar: data.avatar, |
||||
phone: data.phone, |
||||
addTime: data.addTime, |
||||
addIp: data.addIp, |
||||
lastTime: data.lastTime, |
||||
lastIp: data.lastIp, |
||||
nowMoney: data.nowMoney, |
||||
brokeragePrice: data.brokeragePrice, |
||||
integral: data.integral, |
||||
signNum: data.signNum, |
||||
status: data.status, |
||||
level: data.level, |
||||
spreadUid: data.spreadUid, |
||||
spreadTime: data.spreadTime, |
||||
userType: data.userType, |
||||
isPromoter: data.isPromoter, |
||||
payCount: data.payCount, |
||||
spreadCount: data.spreadCount, |
||||
cleanTime: data.cleanTime, |
||||
addres: data.addres, |
||||
adminid: data.adminid, |
||||
loginType: data.loginType |
||||
} |
||||
_this.dialog = true |
||||
}, |
||||
editP(data) { |
||||
this.isAdd = false |
||||
const _this = this.$refs.formp |
||||
_this.form = { |
||||
uid: data.uid, |
||||
nickname: data.nickname, |
||||
ptype: 1, |
||||
money: 0 |
||||
} |
||||
_this.dialog = true |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
@ -0,0 +1,74 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px"> |
||||
<el-form-item label="开启短信"> |
||||
<el-radio v-model="form.exp_enable" :label="1">开启</el-radio> |
||||
<el-radio v-model="form.exp_enable" :label="2">关闭</el-radio> |
||||
</el-form-item> |
||||
<el-form-item label="appId"> |
||||
<el-input v-model="form.exp_appId" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="appKey"> |
||||
<el-input v-model="form.exp_appKey" style="width: 370px;" type="password" /> |
||||
</el-form-item> |
||||
<el-form-item label=""> |
||||
<el-button type="primary" @click="doSubmit">提交</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import checkPermission from '@/utils/permission' |
||||
import initData from '@/mixins/crud' |
||||
import { del, add, get } from '@/api/yxSystemConfig' |
||||
import eForm from './form' |
||||
import picUpload from '@/components/pic-upload' |
||||
import { Message } from 'element-ui' |
||||
export default { |
||||
components: { eForm, picUpload }, |
||||
mixins: [initData], |
||||
data() { |
||||
return { |
||||
delLoading: false, |
||||
form: { |
||||
exp_enable: 2, |
||||
exp_appId: '', |
||||
exp_appKey: '' |
||||
}, |
||||
rules: { |
||||
} |
||||
} |
||||
}, |
||||
created() { |
||||
get().then(rese => { |
||||
const that = this; |
||||
rese.content.map(function(key, value) { |
||||
const keyName = key.menuName |
||||
const newValue = key.value |
||||
if(keyName in that.form){ |
||||
that.form[keyName] = newValue |
||||
} |
||||
}) |
||||
|
||||
this.form.exp_enable = parseInt(this.form.exp_enable) |
||||
}) |
||||
}, |
||||
methods: { |
||||
checkPermission, |
||||
doSubmit() { |
||||
add(this.form).then(res => { |
||||
Message({ message: '设置成功', type: 'success' }) |
||||
}).catch(err => { |
||||
// this.loading = false |
||||
console.log(err.response.data.message) |
||||
}) |
||||
} |
||||
|
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
@ -0,0 +1,78 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px"> |
||||
<el-form-item label="移动端H5地址"> |
||||
<el-input v-model="form.site_url" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="移动端API地址"> |
||||
<el-input v-model="form.api_url" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="后台API地址"> |
||||
<el-input v-model="form.admin_api_url" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="文件存储方式"> |
||||
<el-radio v-model="form.file_store_mode" :label="1">本地存储</el-radio> |
||||
<el-radio v-model="form.file_store_mode" :label="2">云存储</el-radio> |
||||
</el-form-item> |
||||
<el-form-item label=""> |
||||
<el-button type="primary" @click="doSubmit">提交</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import checkPermission from '@/utils/permission' |
||||
import initData from '@/mixins/crud' |
||||
import { del, add, get } from '@/api/yxSystemConfig' |
||||
import eForm from './form' |
||||
import picUpload from '@/components/pic-upload' |
||||
import { Message } from 'element-ui' |
||||
export default { |
||||
components: { eForm, picUpload }, |
||||
mixins: [initData], |
||||
data() { |
||||
return { |
||||
delLoading: false, |
||||
form: { |
||||
file_store_mode: 2, |
||||
site_url: '', |
||||
api_url: '', |
||||
admin_api_url: '' |
||||
}, |
||||
rules: { |
||||
} |
||||
} |
||||
}, |
||||
created() { |
||||
get().then(rese => { |
||||
const that = this; |
||||
rese.content.map(function(key, value) { |
||||
const keyName = key.menuName |
||||
const newValue = key.value |
||||
if(keyName in that.form){ |
||||
that.form[keyName] = newValue |
||||
} |
||||
}) |
||||
|
||||
this.form.file_store_mode = parseInt(this.form.file_store_mode) |
||||
}) |
||||
}, |
||||
methods: { |
||||
checkPermission, |
||||
doSubmit() { |
||||
add(this.form).then(res => { |
||||
Message({ message: '设置成功', type: 'success' }) |
||||
}).catch(err => { |
||||
// this.loading = false |
||||
console.log(err.response.data.message) |
||||
}) |
||||
} |
||||
|
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
@ -0,0 +1,86 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px"> |
||||
<el-form-item label="开启短信"> |
||||
<el-radio v-model="form.sms_enable" :label="1">开启</el-radio> |
||||
<el-radio v-model="form.sms_enable" :label="2">关闭</el-radio> |
||||
</el-form-item> |
||||
<el-form-item label="签名"> |
||||
<el-input v-model="form.sms_sign" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="模板id"> |
||||
<el-input v-model="form.sms_templateId" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="region"> |
||||
<el-input v-model="form.sms_region" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="accessKey"> |
||||
<el-input v-model="form.sms_access_key" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="accessKeySecret"> |
||||
<el-input v-model="form.sms_access_secret" style="width: 370px;" type="password" /> |
||||
</el-form-item> |
||||
<el-form-item label=""> |
||||
<el-button type="primary" @click="doSubmit">提交</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import checkPermission from '@/utils/permission' |
||||
import initData from '@/mixins/crud' |
||||
import { del, add, get } from '@/api/yxSystemConfig' |
||||
import eForm from './form' |
||||
import picUpload from '@/components/pic-upload' |
||||
import { Message } from 'element-ui' |
||||
export default { |
||||
components: { eForm, picUpload }, |
||||
mixins: [initData], |
||||
data() { |
||||
return { |
||||
delLoading: false, |
||||
form: { |
||||
sms_enable: 2, |
||||
sms_sign: '', |
||||
sms_templateId: '', |
||||
sms_region: '', |
||||
sms_access_key: '', |
||||
sms_access_secret: '' |
||||
}, |
||||
rules: { |
||||
} |
||||
} |
||||
}, |
||||
created() { |
||||
get().then(rese => { |
||||
const that = this; |
||||
rese.content.map(function(key, value) { |
||||
const keyName = key.menuName |
||||
const newValue = key.value |
||||
if(keyName in that.form){ |
||||
that.form[keyName] = newValue |
||||
} |
||||
}) |
||||
|
||||
this.form.sms_enable = parseInt(this.form.sms_enable) |
||||
}) |
||||
}, |
||||
methods: { |
||||
checkPermission, |
||||
doSubmit() { |
||||
add(this.form).then(res => { |
||||
Message({ message: '设置成功', type: 'success' }) |
||||
}).catch(err => { |
||||
// this.loading = false |
||||
console.log(err.response.data.message) |
||||
}) |
||||
} |
||||
|
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
Loading…
Reference in new issue