Merge branch 'main' of http://git.njrzwl.cn:3000/liuqing/qicheng_shop_backend
commit
a662266c08
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,189 @@ |
||||
<template> |
||||
<div class="divBox"> |
||||
<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" |
||||
size="small" |
||||
highlight-current-row |
||||
> |
||||
<el-table-column |
||||
label="ID" |
||||
min-width="60" |
||||
> |
||||
<template slot-scope="{row}"> |
||||
<span v-text="row.id" /> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column |
||||
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.create_time" /> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column |
||||
prop="deposit.cycle" |
||||
label="提现周期(天)" |
||||
min-width="150" |
||||
/> |
||||
<el-table-column |
||||
prop="diamond_current" |
||||
label="已获得钻石" |
||||
min-width="150" |
||||
/> |
||||
<el-table-column |
||||
prop="deposit.diamond" |
||||
label="赠送钻石/天" |
||||
min-width="150" |
||||
/> |
||||
<el-table-column |
||||
prop="deposit.diamond_max" |
||||
label="钻石最大值" |
||||
min-width="150" |
||||
/> |
||||
<el-table-column |
||||
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 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> |
||||
<div class="block"> |
||||
<el-pagination |
||||
background |
||||
:page-size="tableFrom.limit" |
||||
:current-page="tableFrom.page" |
||||
layout="total, prev, pager, next, jumper" |
||||
:total="tableData.total" |
||||
@size-change="handleSizeChange" |
||||
@current-change="pageChange" |
||||
/> |
||||
</div> |
||||
</el-card> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
// +---------------------------------------------------------------------- |
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] |
||||
// +---------------------------------------------------------------------- |
||||
// | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved. |
||||
// +---------------------------------------------------------------------- |
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 |
||||
// +---------------------------------------------------------------------- |
||||
// | Author: CRMEB Team <admin@crmeb.com> |
||||
// +---------------------------------------------------------------------- |
||||
import { |
||||
depositUserLstApi, |
||||
depositUserFreeApi, |
||||
} from '@/api/user' |
||||
export default { |
||||
name: 'UserGroup', |
||||
data() { |
||||
return { |
||||
tableFrom: { |
||||
uid:'', |
||||
page: 1, |
||||
limit: 20 |
||||
}, |
||||
tableData: { |
||||
data: [], |
||||
total: 0 |
||||
}, |
||||
listLoading: true |
||||
} |
||||
}, |
||||
mounted() { |
||||
this.getList() |
||||
}, |
||||
watch:{ |
||||
'$route.path': { |
||||
handler: function() { |
||||
this.getList() |
||||
}, |
||||
immediate: false, |
||||
deep: true |
||||
}, |
||||
}, |
||||
methods: { |
||||
// 列表 |
||||
getList() { |
||||
this.listLoading = true |
||||
depositUserLstApi(this.tableFrom).then(res => { |
||||
this.tableData.data = res.data.list |
||||
this.tableData.total = res.data.count |
||||
this.listLoading = false |
||||
}).catch(res => { |
||||
this.listLoading = false |
||||
this.$message.error(res.message) |
||||
}) |
||||
}, |
||||
pageChange(page) { |
||||
this.tableFrom.page = page |
||||
this.getList() |
||||
}, |
||||
handleSizeChange(val) { |
||||
this.tableFrom.limit = val |
||||
this.getList() |
||||
}, |
||||
// 解冻 |
||||
handleFree(id, idx) { |
||||
this.$modalSure('解冻').then(() => { |
||||
depositUserFreeApi(id).then(({ message }) => { |
||||
this.$message.success(message) |
||||
this.getList() |
||||
}).catch(({ message }) => { |
||||
this.$message.error(message) |
||||
}) |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
|
||||
</style> |
Loading…
Reference in new issue