完善用户列表的详情和购买明细交互

master
panqihua 2 years ago
parent c7e6ae119b
commit 67f046c281
  1. 7
      src/views/platform/buyDetail.vue
  2. 10
      src/views/platform/cart.vue
  3. 8
      src/views/platform/discount.vue
  4. 17
      src/views/platform/walletDetail.vue
  5. 34
      src/views/system/user/index.vue
  6. 2
      src/views/system/user/profile/baseForm.vue

@ -10,8 +10,9 @@
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-date-picker v-model="queryParams.dateRange" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期"
end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item>
@ -21,7 +22,7 @@
</el-form>
<el-table v-loading="loading" :data="followers">
<el-table v-loading="loading" :data="buyDetailList">
<el-table-column label="新创建时间" align="center">
</el-table-column>
<el-table-column label="订单号" align="center">

@ -46,11 +46,11 @@ export default {
getList() {
// this.loading = true;
listCart(this.userId).then(response => {
this.cartList = response.rows;
this.total = response.total;
this.loading = false;
});
// listCart(this.userId).then(response => {
// this.cartList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
}
},
watch: {

@ -2,8 +2,9 @@
<div class="app-container">
<el-form class="query-form" :inline="true">
<el-form-item label="领取时间">
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-date-picker v-model="queryParams.dateRange" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期"
end-placeholder="结束日期"></el-date-picker>
</el-form-item>
@ -29,7 +30,7 @@
</el-row>
</div>
<el-table v-loading="loading" :data="followers">
<el-table v-loading="loading" :data="discountList">
<el-table-column label="领取时间" align="center">
</el-table-column>
<el-table-column label="名称" align="center">
@ -62,6 +63,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
dateRange: undefined
},
}
},

@ -1,23 +1,23 @@
<template>
<div class="app-container">
<el-row class="balance">
<el-col span="4">
<el-col :span="4">
<div>123.00</div>
<div>钱包余额</div>
</el-col>
<el-col span="4">
<el-col :span="4">
<div>123.00</div>
<div>提现总金额</div>
</el-col>
<el-col span="4">
<el-col :span="4">
<div>123.00</div>
<div>充值金额</div>
</el-col>
<el-col span="4">
<el-col :span="4">
<div>123.00</div>
<div>邀请金额</div>
</el-col>
<el-col span="4">
<el-col :span="4">
<div>123.00</div>
<div>支出金额</div>
</el-col>
@ -32,8 +32,9 @@
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-date-picker v-model="queryParams.dateRange" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期"
end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item>
@ -43,7 +44,7 @@
</el-form>
<el-table v-loading="loading" :data="followers">
<el-table v-loading="loading" :data="walletDetailList">
<el-table-column label="新创建时间" align="center">
</el-table-column>
<el-table-column label="订单号" align="center">

@ -99,12 +99,12 @@
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
<template slot-scope="scope" v-if="scope.row.userId !== 1">
<el-button size="mini" type="text" @click="handleUpdate(scope.row)"
<el-button size="mini" type="text" @click="showDetail(scope.row.userId)"
v-hasPermi="['system:user:edit']">详情</el-button>
<el-button size="mini" type="text"
@click="updateStatusByUserId(scope.row.status === '0' ? '1' : '0', scope.row.userId)"
v-hasPermi="['system:user:edit']">{{ scope.row.status === '0' ? '禁用' : '开启' }}</el-button>
<el-button size="mini" type="text" @click="handleUpdate(scope.row)"
<el-button size="mini" type="text" @click="showBuyDetail(scope.row.userId)"
v-hasPermi="['system:user:edit']">购买明细</el-button>
</template>
@ -123,7 +123,8 @@
</el-dialog>
<!-- 用户详情对话框 -->
<el-dialog :title="title" :visible.sync="detail.open" width="1200px" append-to-body @close="getList">
<el-dialog :title="title" :visible.sync="detail.open" width="1200px" append-to-body
@close="getList(); detail.activeName = null">
<el-tabs v-model="detail.activeName" type="card">
<el-tab-pane label="基本信息" name="base">
<base-form :reset="reset" :form="form" show-detail />
@ -131,7 +132,7 @@
<el-tab-pane label="钱包明细" name="balance">
<platform-wallet-detail :user-id="form.userId" />
</el-tab-pane>
<el-tab-pane label="购买明细" name="pay_detail">
<el-tab-pane label="购买明细" name="buy_detail">
<platform-buy-detail :user-id="form.userId" />
</el-tab-pane>
<el-tab-pane v-hasPermi="['platform:address:list']" label="收货地址" name="address">
@ -235,7 +236,7 @@ export default {
//
open: false,
//
activeName: "base"
activeName: null
},
//
upload: {
@ -282,6 +283,15 @@ export default {
});
},
methods: {
showBuyDetail(userId) {
this.detail.activeName = 'buy_detail'
this.clickUserId = userId
this.detail.open = true
},
showDetail(userId) {
this.detail.activeName = 'base'
this.clickUserId = userId
},
//
updateStatusByUserId(status, userId) {
updateStatus({
@ -391,18 +401,19 @@ export default {
});
},
/** 修改按钮操作 */
handleUpdate(row) {
handleUpdate() {
this.reset();
const userId = row.userId || this.ids;
const userId = this.clickUserId
getUser(userId).then(response => {
this.form = response.data;
this.postOptions = response.posts;
this.roleOptions = response.roles;
this.$set(this.form, "postIds", response.postIds);
this.$set(this.form, "roleIds", response.roleIds);
this.detail.open = true;
this.title = "用户详情";
this.form.password = "";
this.detail.open = true
this.form.referrerPhone = this.form.referrerSysUser.phonenumber
});
},
/** 重置密码按钮操作 */
@ -466,6 +477,13 @@ export default {
submitFileForm() {
this.$refs.upload.submit();
}
},
watch: {
'detail.activeName': function (value) {
if (value === 'base' && !this.detail.open) {
this.handleUpdate()
}
}
}
};
</script>

@ -152,8 +152,10 @@ export default {
}
]
}
}
},
methods: {
//
queryByPhone(queryString, cb) {

Loading…
Cancel
Save