From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目
---
src/views/mall/promotion/bargain/record/BargainRecordListDialog.vue | 90 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 90 insertions(+), 0 deletions(-)
diff --git a/src/views/mall/promotion/bargain/record/BargainRecordListDialog.vue b/src/views/mall/promotion/bargain/record/BargainRecordListDialog.vue
new file mode 100644
index 0000000..9637ac8
--- /dev/null
+++ b/src/views/mall/promotion/bargain/record/BargainRecordListDialog.vue
@@ -0,0 +1,90 @@
+<template>
+ <Dialog v-model="dialogVisible" title="鍔╁姏鍒楄〃">
+ <!-- 鍒楄〃 -->
+ <ContentWrap>
+ <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
+ <el-table-column label="鐢ㄦ埛缂栧彿" prop="userId" min-width="80px" />
+ <el-table-column label="鐢ㄦ埛澶村儚" prop="avatar" min-width="80px">
+ <template #default="scope">
+ <el-avatar :src="scope.row.avatar" />
+ </template>
+ </el-table-column>
+ <el-table-column label="鐢ㄦ埛鏄电О" prop="nickname" min-width="100px" />
+ <el-table-column
+ label="鐮嶄环閲戦"
+ prop="reducePrice"
+ min-width="100px"
+ :formatter="fenToYuanFormat"
+ />
+ <el-table-column
+ label="鍔╁姏鏃堕棿"
+ align="center"
+ prop="createTime"
+ :formatter="dateFormatter"
+ width="180px"
+ />
+ </el-table>
+ <!-- 鍒嗛〉 -->
+ <Pagination
+ :total="total"
+ v-model:page="queryParams.pageNo"
+ v-model:limit="queryParams.pageSize"
+ @pagination="getList"
+ />
+ </ContentWrap>
+ </Dialog>
+</template>
+
+<script setup lang="ts">
+import { dateFormatter } from '@/utils/formatTime'
+import * as BargainHelpApi from '@/api/mall/promotion/bargain/bargainHelp'
+import { fenToYuanFormat } from '@/utils/formatter'
+
+/** 鍔╁姏鍒楄〃 */
+defineOptions({ name: 'BargainRecordListDialog' })
+
+const message = useMessage() // 娑堟伅寮圭獥
+
+const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
+const total = ref(0) // 鍒楄〃鐨勬�婚〉鏁�
+const list = ref([]) // 鍒楄〃鐨勬暟鎹�
+const queryParams = reactive({
+ pageNo: 1,
+ pageSize: 10,
+ recordId: undefined
+})
+const queryFormRef = ref() // 鎼滅储鐨勮〃鍗�
+
+/** 鎵撳紑寮圭獥 */
+const dialogVisible = ref(false) // 寮圭獥鐨勬槸鍚﹀睍绀�
+const open = async (recordId: any) => {
+ dialogVisible.value = true
+ queryParams.recordId = recordId
+ resetQuery()
+}
+defineExpose({ open }) // 鎻愪緵 open 鏂规硶锛岀敤浜庢墦寮�寮圭獥
+
+/** 鏌ヨ鍒楄〃 */
+const getList = async () => {
+ loading.value = true
+ try {
+ const data = await BargainHelpApi.getBargainHelpPage(queryParams)
+ list.value = data.list
+ total.value = data.total
+ } finally {
+ loading.value = false
+ }
+}
+
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+ queryParams.pageNo = 1
+ getList()
+}
+
+/** 閲嶇疆鎸夐挳鎿嶄綔 */
+const resetQuery = () => {
+ queryFormRef.value?.resetFields()
+ handleQuery()
+}
+</script>
--
Gitblit v1.8.0