From eb7a808aaf7dd0a6dd2ff70f9ef3f8ce0b1e31d1 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 22 五月 2026 18:27:32 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/gtzxinglijicun
---
admin/src/components/business/OperaMemberDetail.vue | 288 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 263 insertions(+), 25 deletions(-)
diff --git a/admin/src/components/business/OperaMemberDetail.vue b/admin/src/components/business/OperaMemberDetail.vue
index 6ad3abb..447511c 100644
--- a/admin/src/components/business/OperaMemberDetail.vue
+++ b/admin/src/components/business/OperaMemberDetail.vue
@@ -2,7 +2,7 @@
<GlobalWindow
:title="title"
:visible.sync="visible"
- width="600px"
+ width="1000px"
:withFooter="false"
>
<div class="detail-container">
@@ -17,25 +17,140 @@
<div class="info-grid">
<div class="info-item">
<span class="label">寰俊openid锛�</span>
- <span class="value">{{ detailInfo.openId }}</span>
+ <span class="value">{{ detailInfo.openid || '' }}</span>
</div>
<div class="info-item">
<span class="label">鐢ㄦ埛鏄电О锛�</span>
- <span class="value">{{ detailInfo.nickName }}</span>
+ <span class="value">{{ detailInfo.nickName || ''}}</span>
</div>
<div class="info-item">
<span class="label">浼氬憳濮撳悕锛�</span>
- <span class="value">{{ detailInfo.name }}</span>
+ <span class="value">{{ detailInfo.name || ''}}</span>
</div>
<div class="info-item">
<span class="label">鎺堟潈鎵嬫満鍙凤細</span>
- <span class="value">{{ detailInfo.telephone }}</span>
+ <span class="value">{{ detailInfo.telephone||'' }}</span>
</div>
<div class="info-item">
<span class="label">鐘舵�侊細</span>
<span class="value">{{ detailInfo.status === 0 ? '姝e父' : detailInfo.status === 1 ? '鍋滅敤' : '宸叉敞閿�' }}</span>
</div>
</div>
+ </div>
+
+ <!-- 寮�绁ㄥ巻鍙� -->
+ <div class="section">
+ <div class="section-header">
+ <span class="section-title">寮�绁ㄥ巻鍙�</span>
+ </div>
+
+ <!-- 鏌ヨ琛ㄥ崟 -->
+ <el-form :inline="true" :model="invoiceQuery" class="query-form" style="margin-bottom: 20px;">
+ <el-form-item label="寮�绁ㄧ紪鍙�">
+ <el-input v-model="invoiceQuery.invoiceNo" placeholder="璇疯緭鍏ュ紑绁ㄧ紪鍙�" style="width: 180px;"></el-input>
+ </el-form-item>
+ <el-form-item label="鍙戠エ绫诲瀷">
+ <el-select v-model="invoiceQuery.invoiceType" placeholder="璇烽�夋嫨鍙戠エ绫诲瀷" style="width: 150px;">
+ <el-option label="鐢靛瓙鏅�氬彂绁�" value="0"></el-option>
+ <el-option label="鐢靛瓙涓撶敤鍙戠エ" value="1"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎶ご绫诲瀷">
+ <el-select v-model="invoiceQuery.orgType" placeholder="璇烽�夋嫨鎶ご绫诲瀷" style="width: 150px;">
+ <el-option label="涓汉" value="1"></el-option>
+ <el-option label="浼佷笟" value="2"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鍙戠エ鎶ご">
+ <el-input v-model="invoiceQuery.name" placeholder="璇疯緭鍏ュ彂绁ㄦ姮澶�" style="width: 200px;"></el-input>
+ </el-form-item>
+ <el-form-item label="寮�绁ㄧ姸鎬�">
+ <el-select v-model="invoiceQuery.status" placeholder="璇烽�夋嫨寮�绁ㄧ姸鎬�" style="width: 150px;">
+ <el-option label="鐢宠涓�" value="0"></el-option>
+ <el-option label="寮�鍏锋垚鍔�" value="1"></el-option>
+ <el-option label="寮�鍏峰け璐�" value="99"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鐢宠鏃堕棿">
+ <el-date-picker
+ v-model="invoiceQuery.dateRange"
+ type="daterange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ style="width: 250px;">
+ </el-date-picker>
+ </el-form-item>
+ <section>
+ <el-button type="primary" @click="queryInvoices">鏌ヨ</el-button>
+ <el-button @click="resetQuery">閲嶇疆</el-button>
+ </section>
+ </el-form>
+
+ <!-- 缁熻淇℃伅 -->
+ <div class="stats-row" style="margin-bottom: 20px;">
+ <div class="stat-item">
+ <span class="stat-label">寮�绁ㄦ暟锛�</span>
+ <span class="stat-value">{{ invoicePage.total }}</span>
+ </div>
+ <div class="stat-item">
+ <span class="stat-label">寮�绁ㄦ�婚锛�</span>
+ <span class="stat-value amount">楼{{ invoiceSummary.totalAmount }}</span>
+ </div>
+ <div class="stat-item">
+ <span class="stat-label">宸插紑绁ㄦ�婚锛�</span>
+ <span class="stat-value amount">楼{{ invoiceSummary.issuedAmount }}</span>
+ </div>
+ </div>
+
+ <!-- 寮�绁ㄥ巻鍙茶〃鏍� -->
+ <el-table :data="invoiceList" border style="width: 100%" :loading="invoiceLoading">
+ <el-table-column prop="orderNo" label="璁㈠崟缂栧彿" min-width="120">
+ <template slot-scope="scope">
+ <a href="javascript:void(0)" @click="openInvoiceDetail(scope.row)">{{ scope.row.orderNo }}</a>
+ </template>
+ </el-table-column>
+ <el-table-column label="鍙戠エ绫诲瀷" min-width="120">
+ <template slot-scope="scope">
+ {{ scope.row.invoiceType === 1 ? '澧炲�肩◣鏅�氬彂绁�' : '澧炲�肩◣涓撶敤鍙戠エ' }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="orgType" label="鎶ご绫诲瀷" min-width="100">
+ <template slot-scope="scope">
+ {{ scope.row.orgType === 0 ? '涓汉' : '浼佷笟' }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="name" label="鍙戠エ鎶ご" min-width="150"></el-table-column>
+ <el-table-column prop="taxId" label="鍙戠エ绋庡彿" min-width="150"></el-table-column>
+ <el-table-column label="寮�绁ㄩ噾棰濓紙鍏冿級" min-width="120">
+ <template slot-scope="scope">
+ 楼{{ ((scope.row.invoiceAmount || 0) / 100).toFixed(2) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="createTime" label="鐢宠鏃堕棿" min-width="150"></el-table-column>
+ <el-table-column label="寮�绁ㄧ姸鎬�" min-width="120">
+ <template slot-scope="scope">
+ <el-tag :type="getStatusType(scope.row.status)">
+ {{ getStatusText(scope.row.status) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <!-- 寮�绁ㄨ鎯呭脊绐� -->
+ <OperaInvoiceDetail ref="operaInvoiceDetail" @close="handleClose" />
+
+ <!-- 鍒嗛〉 -->
+ <el-pagination
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ :current-page="invoicePage.page"
+ :page-sizes="[10, 20, 50, 100]"
+ :page-size="invoicePage.size"
+ :total="invoicePage.total"
+ layout="total, sizes, prev, pager, next, jumper"
+ style="margin-top: 20px; text-align: right;">
+ </el-pagination>
</div>
</div>
</GlobalWindow>
@@ -44,20 +159,34 @@
<script>
import GlobalWindow from '@/components/common/GlobalWindow'
import { getById } from '@/api/business/memberManage'
+import { fetchList, summary } from '@/api/business/invoiceRecord'
import BaseOpera from '@/components/base/BaseOpera'
+import OperaInvoiceDetail from './OperaInvoiceDetail'
export default {
name: 'OperaMemberDetail',
extends: BaseOpera,
- components: { GlobalWindow, BaseOpera },
+ components: { GlobalWindow, BaseOpera, OperaInvoiceDetail },
data () {
return {
- detailInfo: {
- id: null,
- openId: '',
- nickName: '',
- name: '',
- phone: '',
- status: 1
+ detailInfo: { },
+ invoiceQuery: {
+ invoiceNo: '',
+ invoiceType: '',
+ titleType: '',
+ invoiceTitle: '',
+ status: '',
+ dateRange: []
+ },
+ invoiceList: [],
+ invoiceLoading: false,
+ invoicePage: {
+ page: 1,
+ size: 10,
+ total: 10
+ },
+ invoiceSummary: {
+ issuedAmount: 0,
+ totalAmount: 0
}
}
},
@@ -65,27 +194,111 @@
open (title, row) {
this.title = title
getById(row.id).then(res => {
- this.detailInfo = {
- id: res.id,
- openId: res.openId,
- nickName: res.nickName,
- name: res.name,
- phone: res.phone,
- status: res.status
- }
+ this.detailInfo = res
this.visible = true
+ // 鍒濆鍖栧紑绁ㄥ巻鍙叉暟鎹�
+ this.queryInvoices()
}).catch(e => {
this.$tip.apiFailed(e)
})
+ },
+ // 鏌ヨ寮�绁ㄥ巻鍙�
+ async queryInvoices() {
+ this.invoiceLoading = true
+ try {
+ // 鏋勫缓鏌ヨ鍙傛暟
+ const model = {
+ invoiceNo: this.invoiceQuery.invoiceNo,
+ invoiceType: this.invoiceQuery.invoiceType,
+ titleType: this.invoiceQuery.titleType,
+ invoiceTitle: this.invoiceQuery.invoiceTitle,
+ status: this.invoiceQuery.status,
+ memberId: this.detailInfo.id,
+ startDate: this.invoiceQuery.dateRange[0] ? this.invoiceQuery.dateRange[0].format('YYYY-MM-DD') : null,
+ endDate: this.invoiceQuery.dateRange[1] ? this.invoiceQuery.dateRange[1].format('YYYY-MM-DD') : null
+ }
+ // 鍚屾椂鏌ヨ鍒楄〃鏁版嵁鍜岀粺璁℃暟鎹�
+ const [listRes, summaryRes] = await Promise.all([
+ fetchList({
+ capacity: this.invoicePage.size,
+ page: this.invoicePage.page,
+ model: model
+ }),
+ summary({
+ capacity: this.invoicePage.size,
+ page: this.invoicePage.page,
+ model: model
+ })
+ ])
+ this.invoiceList = listRes.records
+ this.invoicePage.total = listRes.total
+ this.invoiceSummary.issuedAmount = ((summaryRes.issuedAmount || 0) / 100).toFixed(2)
+ this.invoiceSummary.totalAmount = ((summaryRes.totalAmount || 0) / 100).toFixed(2)
+ } finally {
+ this.invoiceLoading = false
+ }
+ },
+ // 閲嶇疆鏌ヨ鏉′欢
+ resetQuery() {
+ this.invoiceQuery = {
+ invoiceNo: '',
+ invoiceType: '',
+ orgType: '',
+ invoiceTitle: '',
+ status: '',
+ dateRange: []
+ }
+ this.queryInvoices()
+ },
+ // 鍒嗛〉澶у皬鏀瑰彉
+ handleSizeChange(val) {
+ this.invoicePage.size = val
+ this.queryInvoices()
+ },
+ // 褰撳墠椤垫敼鍙�
+ handleCurrentChange(val) {
+ this.invoicePage.page = val
+ this.queryInvoices()
+ },
+ // 鑾峰彇寮�绁ㄧ姸鎬佹枃鏈�
+ getStatusText(status) {
+ switch(status) {
+ case 0:
+ return '鐢宠涓�'
+ case 1:
+ return '寮�绁ㄦ垚鍔�'
+ case 2:
+ return '澶辫触'
+ default:
+ return '鏈煡'
+ }
+ },
+ // 鑾峰彇寮�绁ㄧ姸鎬佹爣绛剧被鍨�
+ getStatusType(status) {
+ switch(status) {
+ case 0:
+ return 'warning'
+ case 1:
+ return 'success'
+ case 2:
+ return 'danger'
+ default:
+ return 'info'
+ }
+ },
+ // 鎵撳紑寮�绁ㄨ鎯�
+ openInvoiceDetail(row) {
+ this.$refs.operaInvoiceDetail.open('寮�绁ㄨ鎯�', row)
+ },
+ // 鍏抽棴璇︽儏寮圭獥
+ handleClose() {
+ // 鍙互鍦ㄨ繖閲屾坊鍔犲叧闂悗鐨勯�昏緫
}
}
}
</script>
<style scoped>
-.detail-container {
- padding: 20px;
-}
.section {
margin-bottom: 30px;
}
@@ -126,7 +339,6 @@
padding: 0 10px;
}
.info-item {
- display: flex;
font-size: 14px;
}
.info-item .label {
@@ -140,6 +352,32 @@
color: #f56c6c;
font-weight: bold;
}
+.query-form {
+ padding: 15px;
+ background: #f5f7fa;
+ border-radius: 4px;
+}
+.stats-row {
+ display: flex;
+ gap: 30px;
+ padding: 10px 15px;
+ background: #f5f7fa;
+ border-radius: 4px;
+}
+.stat-item {
+ font-size: 14px;
+}
+.stat-label {
+ color: #909399;
+ margin-right: 5px;
+}
+.stat-value {
+ color: #606266;
+ font-weight: bold;
+}
+.stat-value.amount {
+ color: #f56c6c;
+}
.info-item.full-width {
grid-column: span 2;
}
--
Gitblit v1.9.3