|
|
|
@ -1,9 +1,23 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="divBox"> |
|
|
|
|
<el-card> |
|
|
|
|
<div class="mb20"> |
|
|
|
|
<el-button size="small" type="primary" @click="onAdd">{{ '添加预存'}}</el-button> |
|
|
|
|
<div class="selCard"> |
|
|
|
|
<el-form inline size="small" label-width="85px"> |
|
|
|
|
<div class="acea-row search-form"> |
|
|
|
|
<div> |
|
|
|
|
<el-form-item label="id:"> |
|
|
|
|
<el-input placeholder="请输入内容" v-model="tableFrom.uid" class="input-with-select selWidth" clearable @keyup.enter.native="getList(1)"> |
|
|
|
|
</el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<el-form-item class="search-form-sub"> |
|
|
|
|
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
<el-card> |
|
|
|
|
|
|
|
|
|
<el-table |
|
|
|
|
v-loading="listLoading" |
|
|
|
|
:data="tableData.data" |
|
|
|
@ -19,42 +33,61 @@ |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column |
|
|
|
|
:label="'预存金额'" |
|
|
|
|
label="用户手机号" |
|
|
|
|
min-width="180" |
|
|
|
|
> |
|
|
|
|
<template slot-scope="{row}"> |
|
|
|
|
<span v-text="row.user.phone" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column |
|
|
|
|
label="预存金额" |
|
|
|
|
min-width="180" |
|
|
|
|
> |
|
|
|
|
<template slot-scope="{row}"> |
|
|
|
|
<span v-text="row.price" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column |
|
|
|
|
label="预存时间" |
|
|
|
|
min-width="180" |
|
|
|
|
> |
|
|
|
|
<template slot-scope="{row}"> |
|
|
|
|
<span v-text="row.money" /> |
|
|
|
|
<span v-text="row.create_time" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column |
|
|
|
|
prop="cycle" |
|
|
|
|
label="提现周期" |
|
|
|
|
prop="deposit.cycle" |
|
|
|
|
label="提现周期(天)" |
|
|
|
|
min-width="150" |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
prop="count" |
|
|
|
|
label="名额" |
|
|
|
|
prop="diamond_current" |
|
|
|
|
label="已获得钻石" |
|
|
|
|
min-width="150" |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
prop="diamond" |
|
|
|
|
prop="deposit.diamond" |
|
|
|
|
label="赠送钻石/天" |
|
|
|
|
min-width="150" |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
prop="diamond_max" |
|
|
|
|
prop="deposit.diamond_max" |
|
|
|
|
label="钻石最大值" |
|
|
|
|
min-width="150" |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
prop="create_time" |
|
|
|
|
label="创建时间" |
|
|
|
|
min-width="150" |
|
|
|
|
/> |
|
|
|
|
label="预存状态" |
|
|
|
|
min-width="180" |
|
|
|
|
> |
|
|
|
|
<template slot-scope="{row}"> |
|
|
|
|
<span >{{ row.status == 1? '冻结' : '解冻' }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" min-width="90" fixed="right"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button type="text" size="small" @click="onEdit(scope.row.id)">编辑</el-button> |
|
|
|
|
<el-button type="text" size="small" @click="handleDelete(scope.row.id, scope.$index)">删除</el-button> |
|
|
|
|
<el-button v-if="scope.row.status == 1" type="text" size="small" @click="handleFree(scope.row.id, scope.$index)">解冻</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -84,16 +117,15 @@ |
|
|
|
|
// | Author: CRMEB Team <admin@crmeb.com> |
|
|
|
|
// +---------------------------------------------------------------------- |
|
|
|
|
import { |
|
|
|
|
depositLstApi, |
|
|
|
|
depositFormApi, |
|
|
|
|
depositEditApi, |
|
|
|
|
depositDeleteApi, |
|
|
|
|
depositUserLstApi, |
|
|
|
|
depositUserFreeApi, |
|
|
|
|
} from '@/api/user' |
|
|
|
|
export default { |
|
|
|
|
name: 'UserGroup', |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
tableFrom: { |
|
|
|
|
uid:'', |
|
|
|
|
page: 1, |
|
|
|
|
limit: 20 |
|
|
|
|
}, |
|
|
|
@ -120,7 +152,7 @@ export default { |
|
|
|
|
// 列表 |
|
|
|
|
getList() { |
|
|
|
|
this.listLoading = true |
|
|
|
|
depositLstApi(this.tableFrom).then(res => { |
|
|
|
|
depositUserLstApi(this.tableFrom).then(res => { |
|
|
|
|
this.tableData.data = res.data.list |
|
|
|
|
this.tableData.total = res.data.count |
|
|
|
|
this.listLoading = false |
|
|
|
@ -137,20 +169,11 @@ export default { |
|
|
|
|
this.tableFrom.limit = val |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
// 添加 |
|
|
|
|
onAdd() { |
|
|
|
|
this.$modalForm(depositFormApi()).then(() => this.getList()) |
|
|
|
|
}, |
|
|
|
|
// 编辑 |
|
|
|
|
onEdit(id) { |
|
|
|
|
this.$modalForm(depositEditApi(id)).then(() => this.getList()) |
|
|
|
|
}, |
|
|
|
|
// 删除 |
|
|
|
|
handleDelete(id, idx) { |
|
|
|
|
this.$modalSure('删除').then(() => { |
|
|
|
|
depositDeleteApi(id).then(({ message }) => { |
|
|
|
|
// 解冻 |
|
|
|
|
handleFree(id, idx) { |
|
|
|
|
this.$modalSure('解冻').then(() => { |
|
|
|
|
depositUserFreeApi(id).then(({ message }) => { |
|
|
|
|
this.$message.success(message) |
|
|
|
|
this.tableData.data.splice(idx, 1) |
|
|
|
|
this.getList() |
|
|
|
|
}).catch(({ message }) => { |
|
|
|
|
this.$message.error(message) |
|
|
|
|