first commit
This commit is contained in:
334
src/views/integral/IntegralGoods.vue
Normal file
334
src/views/integral/IntegralGoods.vue
Normal file
@@ -0,0 +1,334 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="float: right;margin-right:2%;">
|
||||
<el-button style='margin: 10px 0;' size="mini" type="primary"
|
||||
icon="document" @click="Notice">刷新</el-button>
|
||||
<el-button style='margin: 10px 0;' :disabled="!isAuth('IntegralGoods:add')" size="mini" type="primary"
|
||||
icon="document" @click="addNotice">添加</el-button>
|
||||
</div>
|
||||
<el-table v-loading="tableDataLoading" :data="tableData.list">
|
||||
|
||||
<el-table-column fixed prop="payClassifyId" label="编号" width="50">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="memberImg" label="图片">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.memberImg" width="60" height="60" />
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="price" label="售价">
|
||||
</el-table-column>
|
||||
<el-table-column prop="payDiamond" label="钻石价格" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column prop="money" label="金豆数量">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="wxGoodsId" label="微信道具id">
|
||||
</el-table-column>
|
||||
<el-table-column prop="productId" label="苹果道具id">
|
||||
</el-table-column>
|
||||
<el-table-column prop="sort" label="排序">
|
||||
</el-table-column>
|
||||
<el-table-column prop="giveMoney" label="赠送金豆">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" :disabled="!isAuth('IntegralGoods:update')"
|
||||
@click="amendBanner(scope.$index, scope.row)">修改
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger" :disabled="!isAuth('IntegralGoods:delete')" @click="deletes(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center;margin-top: 10px;">
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:page-sizes="[10, 20, 30, 50, 100]" :page-size="limit" :current-page="page"
|
||||
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center>
|
||||
<!-- <div style="margin-bottom: 10px;display: flex;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">图片:</span>
|
||||
<div style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
v-model="memberImg"
|
||||
:action="$http.adornUrl('alioss/upload')"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
>
|
||||
<img v-if="memberImg" :src="memberImg" class="avatar" style="border-radius: 6px;width: 148px;height: 148px;"/>
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</div>
|
||||
</div> -->
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">售价:</span>
|
||||
<el-input style="width:50%;" v-model="price" placeholder="请输入售价"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">钻石价格:</span>
|
||||
<el-input style="width:50%;" v-model="payDiamond" placeholder="请输入钻石价格"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">金豆数量:</span>
|
||||
<el-input style="width:50%;" v-model="money" placeholder="请输入金豆数量"></el-input>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">赠送金豆:</span>
|
||||
<el-input style="width:50%;" v-model="giveMoney" placeholder="请输入赠送金豆"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">微信道具id:</span>
|
||||
<el-input style="width:50%;" v-model="wxGoodsId" placeholder="请输入微信道具id"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">苹果道具id:</span>
|
||||
<el-input style="width:50%;" v-model="productId" placeholder="请输入苹果道具id"></el-input>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">排序:</span>
|
||||
<el-input style="width:50%;" v-model="sort" placeholder="请输入排序"
|
||||
onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addNoticeTo()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
tableDataLoading: true,
|
||||
dialogFormVisible: false,
|
||||
tableData: [],
|
||||
price: '',
|
||||
memberImg: '',
|
||||
memberId: '',
|
||||
money: '',
|
||||
payDiamond:'',
|
||||
wxGoodsId:'',
|
||||
productId:'',
|
||||
giveMoney: '',
|
||||
sort: '',
|
||||
payClassifyId: '',
|
||||
title: '添加'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
dataSelect() {
|
||||
this.tableDataLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('payClassify/selectPayClassifyList'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'page': this.page,
|
||||
'limit': this.limit
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
if (data && data.code === 0) {
|
||||
console.log('会员列表', data)
|
||||
this.tableDataLoading = false
|
||||
let returnData = data.data;
|
||||
this.tableData = returnData;
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
//上传成功
|
||||
handleAvatarSuccess(file) {
|
||||
this.memberImg = file.data
|
||||
},
|
||||
Notice(){
|
||||
this.page = 1
|
||||
this.dataSelect()
|
||||
},
|
||||
addNotice() {
|
||||
this.money = ''
|
||||
this.wxGoodsId = ''
|
||||
this.productId = ''
|
||||
this.memberId = ''
|
||||
this.price = ''
|
||||
this.giveMoney = ''
|
||||
this.sort = ''
|
||||
this.payDiamond = ''
|
||||
this.title = '添加'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.page = val
|
||||
this.dataSelect()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.limit = val
|
||||
this.dataSelect()
|
||||
},
|
||||
// 添加banner图
|
||||
addNoticeTo() {
|
||||
if (this.price === '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请输入售价',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
if (this.payDiamond === '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请输入钻石价格',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
if (this.money === '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请输入金豆数量',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
if (this.giveMoney === '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请输入赠送金豆',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
this.classify = 1
|
||||
if (this.title == '添加') {
|
||||
var url = 'payClassify/insertPayClassify'
|
||||
} else {
|
||||
var url = 'payClassify/updatePayClassify'
|
||||
}
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(url),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'money': this.money,
|
||||
'wxGoodsId':this.wxGoodsId,
|
||||
'productId':this.productId,
|
||||
'memberId': this.memberId,
|
||||
'price': this.price,
|
||||
'sort': this.sort,
|
||||
'giveMoney': this.giveMoney,
|
||||
'payClassifyId': this.payClassifyId,
|
||||
'payDiamond':this.payDiamond,
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
if(data.code==0){
|
||||
this.dialogFormVisible = false
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
|
||||
this.dataSelect()
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'warning',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 修改
|
||||
amendBanner(index, rows, a) {
|
||||
if (rows.wxGoodsId) {
|
||||
this.wxGoodsId = rows.wxGoodsId
|
||||
} else {
|
||||
this.wxGoodsId = ''
|
||||
}
|
||||
if (rows.productId) {
|
||||
this.productId = rows.productId
|
||||
} else {
|
||||
this.productId = ''
|
||||
}
|
||||
if (rows.payDiamond) {
|
||||
this.payDiamond = rows.payDiamond
|
||||
} else {
|
||||
this.payDiamond = ''
|
||||
}
|
||||
|
||||
this.dialogFormVisible = true
|
||||
this.payClassifyId = rows.payClassifyId
|
||||
this.money = rows.money
|
||||
|
||||
this.sort = rows.sort
|
||||
this.giveMoney = rows.giveMoney
|
||||
this.price = rows.price
|
||||
this.title = '修改'
|
||||
},
|
||||
//删除一级
|
||||
deletes(row) {
|
||||
let delid = row.payClassifyId
|
||||
this.$confirm(`确定删除此条信息?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`payClassify/deletePayClassify/?payClassifyId=${delid}`),
|
||||
method: 'post',
|
||||
params: this.$http.adornParams({})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
if(data.code==0){
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.dataSelect()
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'warning',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.dataSelect()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
320
src/views/integral/exchangeList.vue
Normal file
320
src/views/integral/exchangeList.vue
Normal file
@@ -0,0 +1,320 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="display: inline-block;">
|
||||
<span>开始时间:</span>
|
||||
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right" type="date"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
|
||||
</el-date-picker>
|
||||
<span>截止时间:</span>
|
||||
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
|
||||
</el-date-picker>
|
||||
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="timeDate2">
|
||||
查询</el-button>
|
||||
</div>
|
||||
<el-table v-loading="tableDataLoading" :data="tableData.list">
|
||||
<el-table-column prop="id" label="编号" width="50"></el-table-column>
|
||||
<el-table-column prop="userName" label="用户名">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #f56c6c;cursor:pointer" @click="updates(scope.row)">{{ scope.row.userName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderId" label="充值订单号" width="200"></el-table-column>
|
||||
<el-table-column prop="money" label="充值金额"></el-table-column>
|
||||
<el-table-column prop="userId" label="会员编号"></el-table-column>
|
||||
<el-table-column label="分类">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.classify == 1">app微信</span>
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.classify == 2">微信公众号</span>
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.classify == 3">微信小程序</span>
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.classify == 4">app支付宝</span>
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.classify == 5">h5支付宝</span>
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.classify == 6">抖音</span>
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.classify == 7">苹果支付</span>
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.classify == 8">快手支付</span>
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.classify == 9">系统充值</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.state == 0">待支付</span>
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.state == 1">支付成功</span>
|
||||
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.state == 2">支付失败</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" width="170">
|
||||
</el-table-column>
|
||||
<el-table-column prop="payTime" label="支付时间" width="170">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center;margin-top: 10px;">
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:page-sizes="[10, 20, 30, 50, 100]" :page-size="limit" :current-page="page"
|
||||
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center>
|
||||
<div style="margin-bottom: 10px;display: flex;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">图片:</span>
|
||||
<div
|
||||
style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
|
||||
<el-upload class="avatar-uploader" v-model="memberImg" :action="$http.adornUrl('alioss/upload')"
|
||||
:show-file-list="false" :on-success="handleAvatarSuccess">
|
||||
<img v-if="memberImg" :src="memberImg" class="avatar"
|
||||
style="border-radius: 6px;width: 148px;height: 148px;" />
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">名称:</span>
|
||||
<el-input style="width:50%;" v-model="memberName" placeholder="请输入名称"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">排序:</span>
|
||||
<el-input style="width:50%;" v-model="sort" placeholder="请输入排序"
|
||||
onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addNoticeTo()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
tableDataLoading: true,
|
||||
dialogFormVisible: false,
|
||||
tableData: [],
|
||||
memberName: '',
|
||||
memberImg: '',
|
||||
memberId: '',
|
||||
sort: '',
|
||||
title: '添加',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
info: {
|
||||
stockDate: this.getNowTime(), //日期
|
||||
},
|
||||
info2: {
|
||||
stockDate2: this.getNowTime2(), //日期
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//处理默认选中当前日期
|
||||
getNowTime() {
|
||||
var now = new Date()
|
||||
var year = now.getFullYear() //得到年份
|
||||
var month = now.getMonth() //得到月份
|
||||
var date = now.getDate() //得到日期
|
||||
month = month + 1
|
||||
month = month.toString().padStart(2, '0')
|
||||
date = date.toString().padStart(2, '0')
|
||||
var defaultDate = `${year}-${month}-${date}`
|
||||
return defaultDate
|
||||
this.$set(this.info, 'stockDate', defaultDate)
|
||||
},
|
||||
//处理默认选中当前日期
|
||||
getNowTime2() {
|
||||
var now = new Date()
|
||||
var year = now.getFullYear() //得到年份
|
||||
var month = now.getMonth() - now.getMonth() //得到月份
|
||||
var date = now.getDate() - now.getDate() + 1 //得到日期
|
||||
month = month + 1
|
||||
month = month.toString().padStart(2, '0')
|
||||
date = date.toString().padStart(2, '0')
|
||||
var defaultDate = `${year}-${month}-${date}`
|
||||
return defaultDate
|
||||
this.$set(this.info, 'stockDate', defaultDate)
|
||||
},
|
||||
// 详情跳转
|
||||
updates(row) {
|
||||
this.$router.push({
|
||||
path: '/userDetail',
|
||||
query: {
|
||||
userId: row.userId
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取数据列表
|
||||
dataSelect() {
|
||||
|
||||
this.tableDataLoading = true
|
||||
if (this.endTime == '') {
|
||||
this.endTime = this.info.stockDate
|
||||
}
|
||||
if (this.startTime == '') {
|
||||
this.startTime = this.info2.stockDate2
|
||||
}
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('cash/selectUserRechargeByUserId'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'page': this.page,
|
||||
'limit': this.limit,
|
||||
'endTime': this.endTime,
|
||||
'startTime': this.startTime,
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
if (data && data.code === 0) {
|
||||
console.log('会员列表', data)
|
||||
this.tableDataLoading = false
|
||||
let returnData = data.data;
|
||||
this.tableData = returnData;
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
timeDate2() {
|
||||
this.dataSelect()
|
||||
},
|
||||
//上传成功
|
||||
handleAvatarSuccess(file) {
|
||||
this.memberImg = file.data
|
||||
},
|
||||
addNotice() {
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.page = val
|
||||
this.dataSelect()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.limit = val
|
||||
this.dataSelect()
|
||||
},
|
||||
// 添加banner图
|
||||
addNoticeTo() {
|
||||
if (this.memberImg == '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请上传图片',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
if (this.memberName == '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请输入名称',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
this.classify = 1
|
||||
if (this.title == '添加') {
|
||||
var url = 'member/insertMember'
|
||||
} else {
|
||||
var url = 'member/updateMember'
|
||||
}
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(url),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'memberImg': this.memberImg,
|
||||
'memberId': this.memberId,
|
||||
'memberName': this.memberName,
|
||||
'sort': this.sort
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
this.dialogFormVisible = false
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.memberImg = ''
|
||||
this.memberId = ''
|
||||
this.memberName = ''
|
||||
this.sort = ''
|
||||
this.title = '添加'
|
||||
this.dataSelect()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 修改
|
||||
amendBanner(index, rows, a) {
|
||||
if (a == 1) {
|
||||
this.pl = 1
|
||||
} else {
|
||||
this.pl = 0
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
this.id = rows.id
|
||||
this.memberImg = rows.memberImg
|
||||
this.memberId = rows.memberId
|
||||
this.sort = rows.sort
|
||||
this.memberName = rows.memberName
|
||||
this.title = '修改'
|
||||
},
|
||||
// 修改
|
||||
amendNoticeTo() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(
|
||||
`?memberId=${this.memberId}&memberImg=${this.memberImg}&sort=${this.sort}&memberName=${this.memberName}`
|
||||
),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
this.dialogFormVisible = false
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.dataSelect()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
//删除一级
|
||||
deletes(row) {
|
||||
let delid = row.memberId
|
||||
this.$confirm(`确定删除此条信息?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`member/deleteMemberById/?memberId=${delid}`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.dataSelect()
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.dataSelect()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
347
src/views/integral/integral.vue
Normal file
347
src/views/integral/integral.vue
Normal file
@@ -0,0 +1,347 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="margin:2% 0;display: inline-block;">
|
||||
<el-input style="width: 180px;" @keydown.enter.native="select" clearable placeholder="请输入推送活动名称"
|
||||
v-model="integralName"></el-input>
|
||||
</div>
|
||||
<div style="display: inline-block;">
|
||||
<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="select">查询
|
||||
</el-button>
|
||||
<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="cleans">重置
|
||||
</el-button>
|
||||
</div>
|
||||
<div style="float: right;margin-right:2%;">
|
||||
<el-button style='margin: 10px 0;' :disabled="!isAuth('integral:add')" size="mini" type="primary"
|
||||
icon="document" @click="addNotice">添加推送活动</el-button>
|
||||
<el-button style='margin: 10px 0;' :disabled="!isAuth('integral:delete') || checkBoxData.length <= 0"
|
||||
size="mini" type="danger" icon="document" @click="choideletes()">批量删除</el-button>
|
||||
</div>
|
||||
<el-table v-loading="tableDataLoading" @selection-change="changeFun" :data="tableData.list">
|
||||
<el-table-column type="selection">
|
||||
</el-table-column>
|
||||
<el-table-column prop="sendMoneyId" label="编号" width="80">
|
||||
</el-table-column>
|
||||
<el-table-column prop="integralName" label="活动名称" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="describes" label="活动描述" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="integralNum" label="活动积分">
|
||||
</el-table-column>
|
||||
<el-table-column prop="money" label="活动金额">
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" width="160">
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" :disabled="!isAuth('integral:update')"
|
||||
@click="look(scope.row)">详情
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" :disabled="!isAuth('integral:update')"
|
||||
@click="updates(scope.row)">修改
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger" :disabled="!isAuth('integral:delete')"
|
||||
@click="deleteuser(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center;margin-top: 10px;">
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
|
||||
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<!-- 添加弹框 -->
|
||||
<el-dialog title="添加推送活动" :visible.sync="dialogFormVisible" center>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">活动名称:</span>
|
||||
<el-input style="width:50%;" v-model="integralName" placeholder="请输入活动名称"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">活动积分:</span>
|
||||
<el-input style="width:50%;" v-model="integralNum" placeholder="请输入活动积分" type="number"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">活动金额:</span>
|
||||
<el-input style="width:50%;" v-model="money" placeholder="请输入活动金额" type="number"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span
|
||||
style="width: 200px;display: inline-block;text-align: right;position: relative;top: -75px;">活动描述:</span>
|
||||
<el-input style="width:50%;" v-model="describes" type="textarea" :rows="4" placeholder="请输入活动描述">
|
||||
</el-input>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addNoticeTo()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 修改弹框 -->
|
||||
<el-dialog title="修改推送活动" :visible.sync="dialogFormVisible1" center>
|
||||
<el-form :model="form">
|
||||
<el-form-item label="活动名称:" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.integralName" style="width:65%;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动积分:" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.integralNum" style="width:65%;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动金额:" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.money" style="width:65%;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动描述:" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.describes" style="width:65%;"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="amendNoticeTo()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
integralName: '',
|
||||
describes: '',
|
||||
integralNum: '',
|
||||
money: '',
|
||||
sendMoneyId: '',
|
||||
checkBoxData: [], //多选框选择的值
|
||||
form: {
|
||||
sendMoneyId: '',
|
||||
integralName: '',
|
||||
describes: '',
|
||||
integralNum: '',
|
||||
money: '',
|
||||
state: '',
|
||||
createTime: ''
|
||||
},
|
||||
formLabelWidth: '200px',
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
tableDataLoading: true,
|
||||
tableData: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 多选
|
||||
changeFun(val) {
|
||||
this.checkBoxData = val;
|
||||
},
|
||||
// 详情跳转
|
||||
look(row) {
|
||||
this.$router.push({
|
||||
path: '/integralDetail',
|
||||
query: {
|
||||
sendMoneyId: row.sendMoneyId
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.limit = val
|
||||
this.dataSelect()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.page = val
|
||||
this.dataSelect()
|
||||
},
|
||||
// 查询
|
||||
select() {
|
||||
this.dataSelect()
|
||||
},
|
||||
// 重置
|
||||
cleans() {
|
||||
this.integralName = ''
|
||||
this.dataSelect()
|
||||
},
|
||||
//添加推送活动弹框
|
||||
addNotice() {
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 添加推送活动
|
||||
addNoticeTo() {
|
||||
if (this.integralName == '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请输入推送活动名称',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
if (this.describes == '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请输入活动描述',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
if (this.integralNum == '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请输入积分',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
if (this.money == '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请输入金额',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('integral/insertSendMoney'),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'integralName': this.integralName,
|
||||
'describes': this.describes,
|
||||
'integralNum': this.integralNum,
|
||||
'money': this.money
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
this.dialogFormVisible = false
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.integralName = ''
|
||||
this.describes = ''
|
||||
this.integralNum = ''
|
||||
this.money = ''
|
||||
this.dataSelect()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 修改推送活动
|
||||
updates(rows) {
|
||||
console.log(rows)
|
||||
this.dialogFormVisible1 = true
|
||||
this.form.sendMoneyId = rows.sendMoneyId
|
||||
this.form.integralName = rows.integralName
|
||||
this.form.describes = rows.describes
|
||||
this.form.integralNum = rows.integralNum
|
||||
this.form.money = rows.money
|
||||
this.form.createTime = rows.createTime
|
||||
this.form.state = rows.state
|
||||
},
|
||||
// 修改
|
||||
amendNoticeTo() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('integral/updateSendMoney'),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'sendMoneyId': this.form.sendMoneyId,
|
||||
'integralName': this.form.integralName,
|
||||
'describes': this.form.describes,
|
||||
'integralNum': this.form.integralNum,
|
||||
'money': this.form.money,
|
||||
'state': this.form.state,
|
||||
'createTime': this.form.createTime
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
this.dialogFormVisible1 = false
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.dataSelect()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 批量删除任务
|
||||
choideletes(sendMoneyId) {
|
||||
var ids = sendMoneyId ? [sendMoneyId] : this.checkBoxData.map(item => {
|
||||
return item.sendMoneyId
|
||||
})
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`integral/deleteSendMoney?sendMoneyIds=${ids}`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
this.$message({
|
||||
message: '批量删除成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.dataSelect()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteuser(row) {
|
||||
let delid = row.sendMoneyId
|
||||
this.$confirm(`确定删除此条信息?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`integral/deleteSendMoney?sendMoneyIds=${delid}`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.dataSelect()
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(() => {})
|
||||
|
||||
},
|
||||
// 获取数据列表
|
||||
dataSelect() {
|
||||
this.tableDataLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('integral/selectSendMoneyList'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'page': this.page,
|
||||
'limit': this.limit,
|
||||
'integralName': this.integralName,
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
this.tableDataLoading = false
|
||||
let returnData = data.data
|
||||
this.tableData = returnData
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.dataSelect()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
96
src/views/integral/integralDetail.vue
Normal file
96
src/views/integral/integralDetail.vue
Normal file
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="display: inline-block;font-size:18px;margin-bottom: 15px;">
|
||||
<a href="#" @click="prev" style="text-decoration:none;font-size: 14px;">
|
||||
<icon-svg name="jiantou" style="width: 1.2em;height: 1.2em;position: relative;top: 0.3em;"></icon-svg>
|
||||
返回
|
||||
</a>
|
||||
<span style="display: inline-block;margin: 0 15px;color: #D9D9D9;">|</span>
|
||||
<span>活动详情</span>
|
||||
</div>
|
||||
<el-table v-loading="tableDataLoading" :data="tableData.list">
|
||||
<el-table-column prop="nickName" label="昵称" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
style="color: #4f9dec;cursor: pointer;">{{scope.row.nickName ? scope.row.nickName : '未绑定'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="integralName" label="活动名称" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="describes" label="活动描述">
|
||||
</el-table-column>
|
||||
<el-table-column prop="money" label="活动金额">
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" width="160">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center;margin-top: 10px;">
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
|
||||
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
tableDataLoading: true,
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 返回上一级
|
||||
prev() {
|
||||
this.$router.back()
|
||||
},
|
||||
// 详情跳转
|
||||
updates(row) {
|
||||
this.$router.push({
|
||||
path: '/userDetail',
|
||||
query: {
|
||||
userId: row.userId
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.limit = val
|
||||
this.dataSelect()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.page = val
|
||||
this.dataSelect()
|
||||
},
|
||||
// 获取数据列表
|
||||
dataSelect() {
|
||||
let sendMoneyId = this.$route.query.sendMoneyId
|
||||
this.tableDataLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('integral/selectSendMoneyDetailsList'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'page': this.page,
|
||||
'limit': this.limit,
|
||||
'sendMoneyId': sendMoneyId,
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
this.tableDataLoading = false
|
||||
let returnData = data.data
|
||||
this.tableData = returnData
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.dataSelect()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user