Browse Source

管理后台界面调整

master
liupopo 2 years ago
parent
commit
e3f7c3c37a
  1. 6
      docs/databases/data_modify.sql
  2. 4
      mallplus-mbg/pom.xml
  3. 555
      mallplusui-web-admin/src/views/ums/member/index.vue

6
docs/databases/data_modify.sql

@ -0,0 +1,6 @@
UPDATE sys_permission SET status = 1 WHERE id = 243
UPDATE sys_permission SET status = 0 WHERE id = 243
-- 菜单--系统管理
UPDATE sys_permission SET status = 0 WHERE id = 19

4
mallplus-mbg/pom.xml

@ -55,12 +55,12 @@
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>${hutool.version}</version> <version>${hutool.version}</version>
</dependency> </dependency>
<!--支付宝依赖--> <!--支付宝依赖
<dependency> <dependency>
<groupId>com.alipay.sdk</groupId> <groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId> <artifactId>alipay-sdk-java</artifactId>
<version>${alipay.version}</version> <version>${alipay.version}</version>
</dependency> </dependency>-->
<!-- MyBatis 生成器 --> <!-- MyBatis 生成器 -->
<dependency> <dependency>
<groupId>org.mybatis.generator</groupId> <groupId>org.mybatis.generator</groupId>

555
mallplusui-web-admin/src/views/ums/member/index.vue

@ -1,126 +1,92 @@
<template>  <template>
<div class="app-container"> <div class="app-container">
<el-card class="filter-container" shadow="never"> <el-card class="filter-container" shadow="never">
<div> <div>
<i class="el-icon-search"></i> <i class="el-icon-search"></i>
<span>筛选搜索</span> <span>筛选搜索</span>
<el-button <el-button style="float: right" @click="searchMemberList()" type="primary" size="small">查询结果</el-button>
style="float: right" <el-button style="float: right" @click="updateOrderInfo()" type="primary" size="small">同步订单统计</el-button>
@click="searchMemberList()"
type="primary"
size="small">
查询结果
</el-button>
<el-button
style="float: right"
@click="updateOrderInfo()"
type="primary"
size="small">
同步订单统计
</el-button>
</div> </div>
<div style="margin-top: 15px"> <div style="margin-top: 15px">
<el-form :inline="true" :model="listQuery" size="small" label-width="140px"> <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
<el-form-item label="输入搜索:"> <el-form-item label="输入搜索:"><el-input style="width: 203px" v-model="listQuery.keyword" placeholder="会员名称/关键字"></el-input></el-form-item>
<el-input style="width: 203px" v-model="listQuery.keyword" placeholder="会员名称/关键字"></el-input>
</el-form-item>
</el-form> </el-form>
</div> </div>
</el-card> </el-card>
<el-card class="operate-container" shadow="never"> <el-card class="operate-container" shadow="never">
<i class="el-icon-tickets"></i> <i class="el-icon-tickets"></i>
<span>数据列表</span> <span>数据列表</span>
</el-card> </el-card>
<div class="table-container"> <div class="table-container">
<el-table ref="brandTable" <el-table ref="brandTable" :data="list" style="width: 100%" @selection-change="handleSelectionChange" v-loading="listLoading" border>
:data="list" <el-table-column type="selection" width="50" align="center"></el-table-column>
style="width: 100%" <el-table-column label="编号" width="80" align="center">
@selection-change="handleSelectionChange" <template slot-scope="scope">
v-loading="listLoading" {{ scope.row.id }}
border> </template>
<el-table-column type="selection" width="60" align="center"></el-table-column>
<el-table-column label="编号" width="180" align="center">
<template slot-scope="scope">{{scope.row.id}}</template>
</el-table-column> </el-table-column>
<el-table-column label="邀请人" width="180" align="center"> <el-table-column label="汇融乡村振兴卡号" width="180" align="center">
<template slot-scope="scope">{{scope.row.invitecode}}</template> <template slot-scope="scope">
{{ scope.row.invitecode }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="注册时间" width="180" align="center"> <el-table-column label="注册时间" width="160" align="center">
<template slot-scope="scope">{{scope.row.createTime | formatTime}}</template> <template slot-scope="scope">
{{ scope.row.createTime | formatTime }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="用户昵称" align="center"> <el-table-column label="用户昵称" align="center">
<template slot-scope="scope">{{scope.row.nickname}}</template> <template slot-scope="scope">
{{ scope.row.nickname }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="用户账号" width="180" align="center"> <el-table-column label="用户账号" align="center">
<template slot-scope="scope">{{scope.row.username}}</template> <template slot-scope="scope">
{{ scope.row.username }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="电话号码" width="180" align="center"> <el-table-column label="电话号码" width="120" align="center">
<template slot-scope="scope">{{scope.row.phone}}</template> <template slot-scope="scope">
{{ scope.row.phone }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="用户余额" width="180" align="center"> <el-table-column label="用户余额" width="180" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p> {{scope.row.blance}}</p> <p>{{ scope.row.blance }}</p>
<p> <p><el-button type="text" @click="handleShowVeriyEditDialog(scope.$index, scope.row)">余额记录</el-button></p>
<el-button
type="text"
@click="handleShowVeriyEditDialog(scope.$index, scope.row)">余额记录
</el-button>
</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="用户积分" width="180" align="center"> <!-- <el-table-column label="用户积分" width="180" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p> {{scope.row.integration}}</p> <p>{{ scope.row.integration }}</p>
<p> <p><el-button type="text" @click="handleShowIntegrationDialog(scope.$index, scope.row)">积分记录</el-button></p>
<el-button
type="text"
@click="handleShowIntegrationDialog(scope.$index, scope.row)">积分记录
</el-button>
</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否显示" width="100" align="center"> <el-table-column label="是否显示" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch @change="handleShowChange(scope.$index, scope.row)" :active-value="1" :inactive-value="0" v-model="scope.row.status"></el-switch>
@change="handleShowChange(scope.$index, scope.row)"
:active-value="1"
:inactive-value="0"
v-model="scope.row.status">
</el-switch>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="购买订单" width="180" align="center"> <el-table-column label="购买订单" width="180" align="center">
<template slot-scope="scope">{{scope.row.buyCount}}</template> <template slot-scope="scope">
{{ scope.row.buyCount }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="消费金额" width="180" align="center"> <el-table-column label="消费金额" width="180" align="center">
<template slot-scope="scope">{{scope.row.buyMoney}}</template> <template slot-scope="scope">
{{ scope.row.buyMoney }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="250" align="center"> <el-table-column label="操作" width="250" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="danger" @click="addBlacne(scope.$index, scope.row)">余额充值</el-button>
size="mini" <!-- <el-button size="mini" type="danger" @click="addIntegration(scope.$index, scope.row)">积分充值</el-button> -->
type="danger" <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
@click="addBlacne(scope.$index, scope.row)">余额充值
</el-button>
<el-button
size="mini"
type="danger"
@click="addIntegration(scope.$index, scope.row)">积分充值
</el-button>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.$index, scope.row)">删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="batch-operate-container"> <div class="batch-operate-container"></div>
</div>
<div class="pagination-container"> <div class="pagination-container">
<el-pagination <el-pagination
background background
@ -128,134 +94,132 @@
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="total, sizes,prev, pager, next,jumper" layout="total, sizes,prev, pager, next,jumper"
:page-size="listQuery.pageSize" :page-size="listQuery.pageSize"
:page-sizes="[5,10,15]" :page-sizes="[5, 10, 15]"
:current-page.sync="listQuery.pageNum" :current-page.sync="listQuery.pageNum"
:total="total"> :total="total"
</el-pagination> ></el-pagination>
</div> </div>
<el-dialog <el-dialog title="积分记录" :visible.sync="dialogVisible1" width="40%">
title="积分记录" <el-table style="width: 100%;margin-top: 20px" :data="integrationList" border>
:visible.sync="dialogVisible1"
width="40%">
<el-table style="width: 100%;margin-top: 20px"
:data="integrationList"
border>
<el-table-column label="编号" align="center"> <el-table-column label="编号" align="center">
<template slot-scope="scope">{{scope.row.id}}</template> <template slot-scope="scope">
{{ scope.row.id }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="会员" align="center"> <el-table-column label="会员" align="center">
<template slot-scope="scope">{{scope.row.memberId}}</template> <template slot-scope="scope">
{{ scope.row.memberId }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="价格" align="center"> <el-table-column label="价格" align="center">
<template slot-scope="scope">{{scope.row.changeCount}}</template> <template slot-scope="scope">
{{ scope.row.changeCount }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="类别" align="center"> <el-table-column label="类别" align="center">
<template slot-scope="scope">{{scope.row.changeType |formatchangeType}}</template> <template slot-scope="scope">
{{ scope.row.changeType | formatchangeType }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="来源" align="center"> <el-table-column label="来源" align="center">
<template slot-scope="scope">{{scope.row.sourceType |formatsourceType}}</template> <template slot-scope="scope">
{{ scope.row.sourceType | formatsourceType }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center">
<template slot-scope="scope">{{scope.row.operateNote}}</template> <template slot-scope="scope">
{{ scope.row.operateNote }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" width="180" align="center"> <el-table-column label="创建时间" width="180" align="center">
<template slot-scope="scope">{{scope.row.createTime | formatTime}}</template> <template slot-scope="scope">
{{ scope.row.createTime | formatTime }}
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
<el-dialog <el-dialog title="余额记录" :visible.sync="dialogVisible" width="40%">
title="余额记录" <el-table style="width: 100%;margin-top: 20px" :data="blanceList" border>
:visible.sync="dialogVisible"
width="40%">
<el-table style="width: 100%;margin-top: 20px"
:data="blanceList"
border>
<el-table-column label="会员" align="center"> <el-table-column label="会员" align="center">
<template slot-scope="scope">{{scope.row.memberId}}</template> <template slot-scope="scope">
{{ scope.row.memberId }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="价格" align="center"> <el-table-column label="价格" align="center">
<template slot-scope="scope">{{scope.row.price}}</template> <template slot-scope="scope">
{{ scope.row.price }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="类别" align="center"> <el-table-column label="类别" align="center">
<template slot-scope="scope">{{scope.row.type |formatStatus}}</template> <template slot-scope="scope">
{{ scope.row.type | formatStatus }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center">
<template slot-scope="scope">{{scope.row.note}}</template> <template slot-scope="scope">
{{ scope.row.note }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" width="180" align="center"> <el-table-column label="创建时间" width="180" align="center">
<template slot-scope="scope">{{scope.row.createTime | formatTime}}</template> <template slot-scope="scope">
{{ scope.row.createTime | formatTime }}
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
<el-dialog <el-dialog title="余额充值" :visible.sync="blance.dialogVisible" width="40%">
title="余额充值"
:visible.sync="blance.dialogVisible"
width="40%">
<el-form :model="blance" ref="brandFrom" label-width="150px"> <el-form :model="blance" ref="brandFrom" label-width="150px">
<el-form-item label="充值金额:" prop="detail"><el-input v-model="blance.blance"></el-input></el-form-item>
<el-form-item label="充值金额:" prop="detail">
<el-input v-model="blance.blance"></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button @click="blance.dialogVisible = false"> </el-button> <el-button @click="blance.dialogVisible = false"> </el-button>
<el-button type="primary" @click="handleEditBlance"> </el-button> <el-button type="primary" @click="handleEditBlance"> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-dialog> </el-dialog>
<el-dialog <el-dialog title="积分充值" :visible.sync="integration.dialogVisible" width="40%">
title="积分充值"
:visible.sync="integration.dialogVisible"
width="40%">
<el-form :model="integration" ref="brandFrom" label-width="150px"> <el-form :model="integration" ref="brandFrom" label-width="150px">
<el-form-item label="充值积分:" prop="detail"><el-input v-model="integration.integration"></el-input></el-form-item>
<el-form-item label="充值积分:" prop="detail">
<el-input v-model="integration.integration"></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button @click="integration.dialogVisible = false"> </el-button> <el-button @click="integration.dialogVisible = false"> </el-button>
<el-button type="primary" @click="handleEditIntegration"> </el-button> <el-button type="primary" @click="handleEditIntegration"> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {formatDate} from '@/utils/date'; import { formatDate } from '@/utils/date'
import {fetchList, updateShowStatus, updateFactoryStatus, deleteMember,updateMemberOrderInfo,handleEditIntegration,handleEditBlance} from '@/api/ums/member' import { fetchList, updateShowStatus, updateFactoryStatus, deleteMember, updateMemberOrderInfo, handleEditIntegration, handleEditBlance } from '@/api/ums/member'
import {fetchList as fetchBlanceList} from '@/api/ums/memberBlanceLog' import { fetchList as fetchBlanceList } from '@/api/ums/memberBlanceLog'
import {fetchList as fetchIntegrationList} from '@/api/ums/memberIntegration' import { fetchList as fetchIntegrationList } from '@/api/ums/memberIntegration'
export default { export default {
name: 'memberList', name: 'memberList',
data() { data() {
return { return {
dialogVisible:false, dialogVisible: false,
dialogVisible1:false, dialogVisible1: false,
blanceList:null, blanceList: null,
integrationList:null, integrationList: null,
blance:{ blance: {
dialogVisible:false, dialogVisible: false,
id:null, id: null
}, },
integration:{ integration: {
dialogVisible:false, dialogVisible: false,
id:null, id: null
}, },
operates: [ operates: [
{ {
label: "显示会员", label: '显示会员',
value: "showMember" value: 'showMember'
}, },
{ {
label: "隐藏会员", label: '隐藏会员',
value: "hideMember" value: 'hideMember'
} }
], ],
operateType: null, operateType: null,
@ -271,178 +235,173 @@
} }
}, },
created() { created() {
this.getList(); this.getList()
}, },
filters:{ filters: {
formatTime(time) { formatTime(time) {
if(time==null||time===''){ if (time == null || time === '') {
return 'N/A'; return 'N/A'
} }
let date = new Date(time); let date = new Date(time)
return formatDate(date, 'yyyy-MM-dd hh:mm:ss') return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
}, },
verifyStatusFilter(value) { verifyStatusFilter(value) {
if (value === 1) { if (value === 1) {
return '消费'; return '消费'
} else { } else {
return '收入'; return '收入'
} }
}, },
formatchangeType(value) { formatchangeType(value) {
if (value === 1) { if (value === 1) {
return '增加'; return '增加'
} else { } else {
return '减少'; return '减少'
} }
}, },
formatsourceType(value) { formatsourceType(value) {
if (value === 1) { if (value === 1) {
return '下单'; return '下单'
} if (value === 2) { }
return '登录'; if (value === 2) {
}else { return '登录'
return '注册'; } else {
return '注册'
} }
}, },
formatStatus(value){ formatStatus(value) {
if (value === 1) { if (value === 1) {
return '消费'; return '消费'
} if (value === 2) { }
return '退款'; if (value === 2) {
return '退款'
} }
if (value === 3) { if (value === 3) {
return '充值'; return '充值'
} }
if (value === 4) { if (value === 4) {
return '提现'; return '提现'
} }
if (value === 5) { if (value === 5) {
return '佣金'; return '佣金'
} }
if (value === 6) { if (value === 6) {
return '平台调整'; return '平台调整'
}else { } else {
return '收入'; return '收入'
} }
}, },
formatReturnAmount(row){ formatReturnAmount(row) {
return row.productRealPrice*row.productCount; return row.productRealPrice * row.productCount
} }
}, },
methods: { methods: {
addBlacne(index,row){ addBlacne(index, row) {
this.blance.dialogVisible=true; this.blance.dialogVisible = true
this.blance.id=row.id; this.blance.id = row.id
}, },
addIntegration(index,row){ addIntegration(index, row) {
this.integration.dialogVisible=true; this.integration.dialogVisible = true
this.integration.id=row.id; this.integration.id = row.id
}, },
handleEditBlance(){ handleEditBlance() {
if(this.blance.blance==null){ if (this.blance.blance == null) {
this.$message({ this.$message({
message: '请输入余额', message: '请输入余额',
type: 'warning', type: 'warning',
duration: 1000 duration: 1000
}); })
return return
} }
this.$confirm('是否要进行余额充值', '提示', { this.$confirm('是否要进行余额充值', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(()=>{ }).then(() => {
let params = new URLSearchParams(); let params = new URLSearchParams()
params.append('id', this.blance.id); params.append('id', this.blance.id)
params.append('blance', this.blance.blance); params.append('blance', this.blance.blance)
handleEditBlance(params).then(response => { handleEditBlance(params).then(response => {
this.$message({ this.$message({
message: '余额充值成功', message: '余额充值成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); })
this.getList(); this.getList()
}); })
this.blance.dialogVisible=false; this.blance.dialogVisible = false
})
}); },
}, handleEditIntegration() {
handleEditIntegration(){ if (this.integration.integration == null) {
if(this.integration.integration==null){
this.$message({ this.$message({
message: '请输入积分', message: '请输入积分',
type: 'warning', type: 'warning',
duration: 1000 duration: 1000
}); })
return return
} }
this.$confirm('是否要进行积分充值', '提示', { this.$confirm('是否要进行积分充值', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(()=>{ }).then(() => {
let params = new URLSearchParams(); let params = new URLSearchParams()
params.append('id', this.integration.id); params.append('id', this.integration.id)
params.append('integration', this.integration.integration); params.append('integration', this.integration.integration)
handleEditIntegration(params).then(response => { handleEditIntegration(params).then(response => {
this.$message({ this.$message({
message: '积分充值成功', message: '积分充值成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); })
this.getList(); this.getList()
}); })
this.integration.dialogVisible=false; this.integration.dialogVisible = false
})
}); },
}, handleShowVeriyEditDialog(index, row) {
handleShowVeriyEditDialog(index,row){ this.dialogVisible = true
this.dialogVisible=true; fetchBlanceList({ memberId: row.id }).then(response => {
fetchBlanceList({memberId:row.id}).then(response=>{ this.blanceList = response.data.records
this.blanceList=response.data.records; })
}); },
}, handleShowIntegrationDialog(index, row) {
handleShowIntegrationDialog(index,row){ this.dialogVisible1 = true
this.dialogVisible1=true; fetchIntegrationList({ memberId: row.id }).then(response => {
fetchIntegrationList({memberId:row.id}).then(response=>{ this.integrationList = response.data.records
this.integrationList=response.data.records; })
});
}, },
handleShowChange(index, row) { handleShowChange(index, row) {
let params = new URLSearchParams(); let params = new URLSearchParams()
params.append('ids', row.id); params.append('ids', row.id)
params.append('showStatus', row.showStatus); params.append('showStatus', row.showStatus)
updateShowStatus(params).then(response => { updateShowStatus(params).then(response => {
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); })
}); })
}, },
getList() { getList() {
this.listLoading = true; this.listLoading = true
fetchList(this.listQuery).then(response => { fetchList(this.listQuery).then(response => {
this.listLoading = false; this.listLoading = false
this.list = response.data.records; this.list = response.data.records
this.total = response.data.total; this.total = response.data.total
this.totalPage = response.data.pages; this.totalPage = response.data.pages
this.pageSize = response.data.size; this.pageSize = response.data.size
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val
}, },
handleUpdate(index, row) { handleUpdate(index, row) {
this.$router.push({path: '/ums/updateMember', query: {id: row.id}}) this.$router.push({ path: '/ums/updateMember', query: { id: row.id } })
}, },
handleDelete(index, row) { handleDelete(index, row) {
this.$confirm('是否要删除该会员', '提示', { this.$confirm('是否要删除该会员', '提示', {
@ -455,125 +414,123 @@
message: '删除成功', message: '删除成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); })
this.getList(); this.getList()
}); })
}); })
}, },
getProductList(index, row) { getProductList(index, row) {
console.log(index, row); console.log(index, row)
}, },
getProductCommentList(index, row) { getProductCommentList(index, row) {
console.log(index, row); console.log(index, row)
}, },
handleFactoryStatusChange(index, row) { handleFactoryStatusChange(index, row) {
var data = new URLSearchParams(); var data = new URLSearchParams()
data.append("ids", row.id); data.append('ids', row.id)
data.append("factoryStatus", row.factoryStatus); data.append('factoryStatus', row.factoryStatus)
updateFactoryStatus(data).then(response => { updateFactoryStatus(data)
.then(response => {
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); })
}).catch(error => { })
.catch(error => {
if (row.factoryStatus === 0) { if (row.factoryStatus === 0) {
row.factoryStatus = 1; row.factoryStatus = 1
} else { } else {
row.factoryStatus = 0; row.factoryStatus = 0
} }
}); })
}, },
handleShowStatusChange(index, row) { handleShowStatusChange(index, row) {
let data = new URLSearchParams(); let data = new URLSearchParams()
; data.append('ids', row.id)
data.append("ids", row.id); data.append('showStatus', row.showStatus)
data.append("showStatus", row.showStatus); updateShowStatus(data)
updateShowStatus(data).then(response => { .then(response => {
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); })
}).catch(error => { })
.catch(error => {
if (row.showStatus === 0) { if (row.showStatus === 0) {
row.showStatus = 1; row.showStatus = 1
} else { } else {
row.showStatus = 0; row.showStatus = 0
} }
}); })
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.pageNum = 1; this.listQuery.pageNum = 1
this.listQuery.pageSize = val; this.listQuery.pageSize = val
this.getList(); this.getList()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.pageNum = val; this.listQuery.pageNum = val
this.getList(); this.getList()
}, },
searchMemberList() { searchMemberList() {
this.listQuery.pageNum = 1; this.listQuery.pageNum = 1
this.getList(); this.getList()
}, },
updateOrderInfo(){ updateOrderInfo() {
updateMemberOrderInfo().then(response => { updateMemberOrderInfo().then(response => {
this.getList(); this.getList()
this.$message({ this.$message({
message: '同步成功', message: '同步成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); })
}); })
}, },
handleBatchOperate() { handleBatchOperate() {
console.log(this.multipleSelection); console.log(this.multipleSelection)
if (this.multipleSelection < 1) { if (this.multipleSelection < 1) {
this.$message({ this.$message({
message: '请选择一条记录', message: '请选择一条记录',
type: 'warning', type: 'warning',
duration: 1000 duration: 1000
}); })
return; return
} }
let showStatus = 0; let showStatus = 0
if (this.operateType === 'showMember') { if (this.operateType === 'showMember') {
showStatus = 1; showStatus = 1
} else if (this.operateType === 'hideMember') { } else if (this.operateType === 'hideMember') {
showStatus = 0; showStatus = 0
} else { } else {
this.$message({ this.$message({
message: '请选择批量操作类型', message: '请选择批量操作类型',
type: 'warning', type: 'warning',
duration: 1000 duration: 1000
}); })
return; return
} }
let ids = []; let ids = []
for (let i = 0; i < this.multipleSelection.length; i++) { for (let i = 0; i < this.multipleSelection.length; i++) {
ids.push(this.multipleSelection[i].id); ids.push(this.multipleSelection[i].id)
} }
let data = new URLSearchParams(); let data = new URLSearchParams()
data.append("ids", ids); data.append('ids', ids)
data.append("showStatus", showStatus); data.append('showStatus', showStatus)
updateShowStatus(data).then(response => { updateShowStatus(data).then(response => {
this.getList(); this.getList()
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); })
}); })
}, },
addMember() { addMember() {
this.$router.push({path: '/pms/addMember'}) this.$router.push({ path: '/pms/addMember' })
}
} }
} }
}
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped></style>
</style>

Loading…
Cancel
Save