1、用户余额变更记录联调

2、商品分类联调
This commit is contained in:
cuiyouliang 2025-06-18 16:53:57 +08:00
parent 34b31007d0
commit 21d564b7e8
5 changed files with 105 additions and 13 deletions

View File

@ -169,3 +169,13 @@ export function getUserBlackList(params) {
params
});
}
// 余额变更记录列表
export function getUserBalanceList(data) {
return request({
url: `/ums/account/change/record/list`,
method: 'post',
data: data
});
}

View File

@ -13,8 +13,10 @@ export const useMallStore = defineStore('mall', () => {
if (!force && state.value.productCategories.length > 0) {
return Promise.resolve();
}
return listPmsProductCategory({}).then((res: any) => {
state.value.productCategories = res;
// 无全量枚举接口,暂用分页接口代替
return listPmsProductCategory({ current: 1, size: 99999 }).then((res: any) => {
const { records } = res.data || {};
state.value.productCategories = records || [];
});
};
const loadAreaSelect = async (force: any = false) => {

View File

@ -35,7 +35,7 @@ export default {
if (!this.productCategories || this.productCategories.length === 0) {
return [];
}
this.recurs(this.productCategories);
this.recurs(this.productCategories || []);
return this.productCategories;
}
},

View File

@ -79,8 +79,10 @@
{{ scope.row.orderSn }}
<el-link @click="copy(scope.row.orderSn)" :underline="false"><i class="el-icon-document-copy el-icon--right"></i></el-link>
</div>
<el-button size="small" type="text" @click="handleDetail(scope.row.orderId)" v-hasPermi="['oms:aftersale:query']">详情 </el-button>
<el-button size="small" type="text" @click="showLog(scope.row.orderId)" v-hasPermi="['oms:aftersale:log']">日志 </el-button>
<el-button size="small" text type="primary" @click="handleDetail(scope.row.orderId)" v-hasPermi="['oms:aftersale:query']"
>详情
</el-button>
<el-button size="small" text type="primary" @click="showLog(scope.row.orderId)" v-hasPermi="['oms:aftersale:log']">日志 </el-button>
<el-button
size="small"
type="text"
@ -368,6 +370,9 @@ export default {
},
/** 售后详情 */
handleDetail(orderId) {
if (!orderId) {
return this.$modal.msgError('当前数据订单号orderId不存在请联系管理员');
}
const id = orderId;
this.$router.push({ path: '/aftersale/detail', query: { id } });
},
@ -474,6 +479,9 @@ export default {
}
},
showLog(orderId) {
if (!orderId) {
return this.$modal.msgError('当前数据订单号orderId不存在请联系管理员');
}
this.logObj.loading = true;
viewLog(orderId).then((response) => {
this.logObj.logList = response;

View File

@ -110,7 +110,7 @@
<el-button size="small" type="text">充值消费记录 </el-button>
<el-button size="small" type="text">开通代理 </el-button>
<el-button size="small" type="text" @click="showUserAccountEditModal(scope.row)">编辑 </el-button>
<el-button size="small" type="text">余额变更记录 </el-button>
<el-button size="small" type="text" @click="showUserBalanceInfoModal(scope.row, true)">余额变更记录 </el-button>
<el-button size="small" type="text">开通易生支付 </el-button>
<el-button size="small" type="text" @click="showUserLoginInfoModal(scope.row, true)">登录记录 </el-button>
<el-button size="small" type="text">操作日志 </el-button>
@ -180,6 +180,36 @@
</el-table-column>
</el-table>
</el-dialog>
<!--会员余额变更记录-->
<el-dialog title="会员余额变更记录" v-model="userBalanceInfoModalVisible" width="800px" append-to-body>
<el-table v-loading="userBalanceInfoTableLoading" :data="userBalanceInfo.data" border empty-text="暂无数据">
<el-table-column label="昵称" width="150">
<template v-slot="scope">
{{ userBalanceInfo.record.nickname }}
</template>
</el-table-column>
<el-table-column label="手机号" width="150">
<template v-slot="scope">
{{ userBalanceInfo.record.phone }}
</template>
</el-table-column>
<el-table-column label="变更前余额" prop="beforeBalance" width="180" />
<el-table-column label="变更后余额" prop="afterBalance" />
<el-table-column label="变更的金额" prop="changeAmount" width="100" />
<el-table-column label="变更金额来源" prop="source" width="100" />
</el-table>
<pagination
v-if="userBalanceInfo.total"
:total="userBalanceInfo.total"
v-model:page="userBalanceParams.current"
v-model:limit="userBalanceParams.size"
@pagination="
() => {
showUserBalanceInfoModal(userBalanceInfo.record);
}
"
/>
</el-dialog>
<!--会员登录信息-->
<el-dialog title="会员登录信息" v-model="userLoginInfoModalVisible" width="800px" append-to-body>
<el-table v-loading="userLoginInfoTableLoading" :data="userLoginInfo.data" border empty-text="暂无数据">
@ -353,7 +383,8 @@ import {
getUserFriendsList,
getUserFocusList,
getUserFansList,
getUserBlackList
getUserBlackList,
getUserBalanceList
} from '@/api/ums/member';
import dateUtil from '@/utils/DateUtil';
import { useUserStore } from '@/store/modules/user';
@ -439,11 +470,6 @@ export default {
},
title: '会员账户信息'
},
//
userLoginInfo: {
total: 0,
data: []
},
userAccountEditModal: {
open: false,
data: {}
@ -460,6 +486,11 @@ export default {
/* email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],*/
phone: [{ required: true, pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: '请输入正确的手机号码', trigger: 'blur' }]
},
//
userLoginInfo: {
total: 0,
data: []
},
userLoginInfoModalVisible: false,
userLoginInfoTableLoading: false,
//
@ -481,7 +512,21 @@ export default {
open: false,
data: {}
},
blackListTableLoading: false
blackListTableLoading: false,
//
userBalanceInfo: {
total: 0,
data: [],
record: {}
},
userBalanceInfoModalVisible: false,
userBalanceInfoTableLoading: false,
//
userBalanceParams: {
current: 1,
size: 10
}
};
},
created() {
@ -716,6 +761,33 @@ export default {
data: {}
};
},
//
showUserBalanceInfoModal(record, isFirst) {
const { id } = this.userBalanceInfo.record || {};
const reqParams = {
...this.userBalanceParams,
memberId: record.id ? record.id : id
};
this.userBalanceInfoTableLoading = true;
getUserBalanceList(reqParams)
.then((response) => {
const { records = [], total = 0 } = response.data || {};
if (isFirst) {
this.userBalanceInfoModalVisible = true;
}
this.userBalanceInfo = {
total: total,
data: records || [],
record: record
};
this.userBalanceInfoTableLoading = false;
})
.catch(() => {
this.userBalanceInfoTableLoading = false;
});
},
//
showUserLoginInfoModal(record, isFirst) {
const { id } = this.userLoginInfo.record || {};