Commit f804bf62f1ee02cad1e875ee9aa94d95c55071be

Authored by wuxw
1 parent 59833eeb

报表功能测试完成

src/api/report/printCommonReportTableApi.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +/**
  4 + * 获取通用报表数据
  5 + * @param {Object} params 查询参数
  6 + * @returns {Promise} Promise对象
  7 + */
  8 +export function getPrintCommonReportTableData(params) {
  9 + return new Promise((resolve, reject) => {
  10 + request({
  11 + url: '/report/api/printCommonReportTable.getPrintCommonReportTableData',
  12 + method: 'get',
  13 + params
  14 + }).then(response => {
  15 + const res = response.data
  16 + resolve(res)
  17 + }).catch(error => {
  18 + reject(error)
  19 + })
  20 + })
  21 +}
  22 +
  23 +/**
  24 + * 保存通用报表数据
  25 + * @param {Object} data 报表数据
  26 + * @returns {Promise} Promise对象
  27 + */
  28 +export function savePrintCommonReportTableData(data) {
  29 + return new Promise((resolve, reject) => {
  30 + request({
  31 + url: '/report/api/printCommonReportTable.savePrintCommonReportTableData',
  32 + method: 'post',
  33 + data
  34 + }).then(response => {
  35 + const res = response.data
  36 + resolve(res)
  37 + }).catch(error => {
  38 + reject(error)
  39 + })
  40 + })
  41 +}
  42 +
  43 +/**
  44 + * 打印通用报表
  45 + * @param {Object} data 打印数据
  46 + * @returns {Promise} Promise对象
  47 + */
  48 +export function printCommonReportTable(data) {
  49 + return new Promise((resolve, reject) => {
  50 + request({
  51 + url: '/report/api/printCommonReportTable.printCommonReportTable',
  52 + method: 'post',
  53 + data
  54 + }).then(response => {
  55 + const res = response.data
  56 + resolve(res)
  57 + }).catch(error => {
  58 + reject(error)
  59 + })
  60 + })
  61 +}
0 62 \ No newline at end of file
... ...
src/components/report/commonReportTable.vue
... ... @@ -2,7 +2,7 @@
2 2 <div class="common-report-table">
3 3 <div v-for="(item, index) in commonReportTableInfo.components" :key="index">
4 4 <el-card v-if="item.conditions && item.conditions.length > 0" class="query-card">
5   - <div slot="header" class="clearfix">
  5 + <div slot="header" class="flex justify-between">
6 6 <span>{{ $t('commonReportTable.queryConditions') }}</span>
7 7 </div>
8 8 <el-row :gutter="20">
... ... @@ -24,7 +24,7 @@
24 24 </el-card>
25 25  
26 26 <el-card class="table-card">
27   - <div slot="header" class="clearfix">
  27 + <div slot="header" class="flex justify-between">
28 28 <span>{{ item.componentName }}</span>
29 29 <div style="float: right;">
30 30 <el-button type="primary" size="small" @click="_exportReportTableMethod(item)">
... ... @@ -220,8 +220,8 @@ export default {
220 220 }
221 221 },
222 222 _printReportTableMethod(data) {
223   - this.$store.commit('SET_PRINT_DATA', data)
224   - window.open('/print.html#/pages/property/printCommonReportTable')
  223 + localStorage.setItem('printCommonReportTableData', JSON.stringify(data))
  224 + window.open('/#/pages/property/printCommonReportTable')
225 225 }
226 226 }
227 227 }
... ...
src/components/report/reportFeeDetailRoom.vue
... ... @@ -2,7 +2,7 @@
2 2 <div class="report-fee-detail-room">
3 3 <el-row :gutter="20">
4 4 <el-col :span="4">
5   - <el-card class="floor-tree">
  5 + <div class="floor-tree">
6 6 <el-scrollbar style="height: 650px;">
7 7 <el-menu>
8 8 <el-menu-item @click="swatchFloor('')" :class="{ 'is-active': reportFeeDetailRoomInfo.floorId === '' }">
... ... @@ -15,7 +15,7 @@
15 15 </el-menu-item>
16 16 </el-menu>
17 17 </el-scrollbar>
18   - </el-card>
  18 + </div>
19 19 </el-col>
20 20 <el-col :span="20">
21 21 <div class="operation-bar">
... ...
src/components/report/reportProficientCarFee.vue
1 1 <template>
2 2 <div class="report-proficient-car-fee">
3 3 <div class="table-container">
4   - <el-table :data="reportProficientCarFeeInfo.fees" border style="width: 100%" height="500">
  4 + <el-table :data="reportProficientCarFeeInfo.fees" border style="width: 100%" >
5 5 <!-- 固定列:基本信息 -->
6 6 <el-table-column prop="ownerName" :label="$t('reportProficientCarFee.name')" align="center" fixed="left" width="120">
7 7 </el-table-column>
... ...
src/components/report/reportProficientRoomFee.vue
1 1 <template>
2 2 <div class="report-proficient-room-fee">
3 3 <div class="table-container">
4   - <el-table :data="reportProficientRoomFeeInfo.fees" border style="width: 100%" height="500">
  4 + <el-table :data="reportProficientRoomFeeInfo.fees" border style="width: 100%" >
5 5 <!-- 固定列:基本信息 -->
6 6 <el-table-column prop="ownerName" :label="$t('reportProficientRoomFee.name')" align="center" fixed="left" width="120">
7 7 </el-table-column>
... ...
src/components/store/AdminLoginProperty.vue
1 1 <template>
2   - <el-dialog :title="$t('propertyCompanyManage.passwordConfirm')" :visible.sync="visible" width="50%">
  2 + <el-dialog :title="$t('propertyCompanyManage.passwordConfirm')" :visible.sync="visible" width="30%">
3 3 <el-form>
4 4 <el-form-item :label="$t('propertyCompanyManage.password')" required>
5 5 <el-input v-model="password" type="password" :placeholder="$t('propertyCompanyManage.enterCurrentPassword')" />
... ...
src/i18n/reportI18n.js
... ... @@ -19,6 +19,7 @@ import { messages as reportOwnerPayFeeMessages } from &#39;../views/report/reportOwn
19 19 import { messages as reportHuaningMessages } from '../views/report/reportHuaningLang'
20 20 import { messages as reportPayFeeDepositMessages } from '../views/report/reportPayFeeDepositLang'
21 21 import { messages as commonReportMessages } from '../views/report/commonReportLang'
  22 +import { messages as printCommonReportTableMessages } from '../views/report/printCommonReportTableLang'
22 23  
23 24 export const messages = {
24 25 en: {
... ... @@ -42,6 +43,7 @@ export const messages = {
42 43 ...reportHuaningMessages.en,
43 44 ...reportPayFeeDepositMessages.en,
44 45 ...commonReportMessages.en,
  46 + ...printCommonReportTableMessages.en,
45 47 },
46 48 zh: {
47 49 ...reportCustomComponentRelManageMessages.zh,
... ... @@ -63,5 +65,6 @@ export const messages = {
63 65 ...reportHuaningMessages.zh,
64 66 ...reportPayFeeDepositMessages.zh,
65 67 ...commonReportMessages.zh,
  68 + ...printCommonReportTableMessages.zh,
66 69 }
67 70 }
68 71 \ No newline at end of file
... ...
src/router/index.js
... ... @@ -700,15 +700,20 @@ const routes = [
700 700 component: () => import('@/views/account/printAccountReceiptList.vue')
701 701 },
702 702 {
703   - path:'/pages/property/printSmallAccountReceipt',
704   - name:'/pages/property/printSmallAccountReceipt',
  703 + path: '/pages/property/printSmallAccountReceipt',
  704 + name: '/pages/property/printSmallAccountReceipt',
705 705 component: () => import('@/views/account/printSmallAccountReceiptList.vue')
706   - },
707   - {
708   - path:'/pages/property/printRepairDetail',
709   - name:'/pages/property/printRepairDetail',
710   - component: () => import('@/views/work/printRepairDetailList.vue')
711   - },
  706 + },
  707 + {
  708 + path: '/pages/property/printRepairDetail',
  709 + name: '/pages/property/printRepairDetail',
  710 + component: () => import('@/views/work/printRepairDetailList.vue')
  711 + },
  712 + {
  713 + path: '/pages/property/printCommonReportTable',
  714 + name: '/pages/property/printCommonReportTable',
  715 + component: () => import('@/views/report/printCommonReportTableList.vue')
  716 + },
712 717 ]
713 718  
714 719 const router = new VueRouter({
... ...
src/router/reportRouter.js
... ... @@ -69,4 +69,5 @@ export default [
69 69 name: '/pages/property/commonReport',
70 70 component: () => import('@/views/report/commonReportList.vue')
71 71 },
  72 +
72 73 ]
73 74 \ No newline at end of file
... ...
src/views/report/feeRemindList.vue
... ... @@ -13,8 +13,8 @@
13 13 clearable />
14 14 </el-col>
15 15 <el-col :span="4">
16   - <el-input v-model.trim="feeRemindInfo.conditions.ownerName" :placeholder="$t('feeRemind.ownerNamePlaceholder')"
17   - clearable />
  16 + <el-input v-model.trim="feeRemindInfo.conditions.ownerName"
  17 + :placeholder="$t('feeRemind.ownerNamePlaceholder')" clearable />
18 18 </el-col>
19 19 <el-col :span="4">
20 20 <el-input v-model.trim="feeRemindInfo.conditions.link" :placeholder="$t('feeRemind.linkPlaceholder')"
... ... @@ -48,7 +48,7 @@
48 48 </el-card>
49 49  
50 50 <el-card class="box-card margin-top">
51   - <el-tabs v-model="feeRemindInfo._currentTab" @tab-click="changeTab">
  51 + <el-tabs v-model="feeRemindInfo._currentTab" @tab-click="changeTab(feeRemindInfo._currentTab)">
52 52 <el-tab-pane :label="$t('feeRemind.prePaymentRemind')" name="reportPrePaymentFee">
53 53 <report-pre-payment-fee v-if="feeRemindInfo._currentTab === 'reportPrePaymentFee'" ref="prePaymentFee" />
54 54 </el-tab-pane>
... ... @@ -99,9 +99,9 @@ export default {
99 99 },
100 100 methods: {
101 101 changeTab(tab) {
102   - this.feeRemindInfo._currentTab = tab.name || tab
  102 + this.feeRemindInfo._currentTab = tab
103 103 setTimeout(() => {
104   - if (tab.name === 'reportPrePaymentFee') {
  104 + if (tab === 'reportPrePaymentFee') {
105 105 this.$refs.prePaymentFee && this.$refs.prePaymentFee.loadData(this.feeRemindInfo.conditions)
106 106 } else {
107 107 this.$refs.deadlineFee && this.$refs.deadlineFee.loadData(this.feeRemindInfo.conditions)
... ...
src/views/report/printCommonReportTableLang.js 0 → 100644
  1 +export const messages = {
  2 + en: {
  3 + printCommonReportTable: {
  4 + print: 'Print',
  5 + cancel: 'Cancel',
  6 + componentName: 'Report Name',
  7 + tableHeader: 'Table Header',
  8 + footer: 'Footer Information'
  9 + }
  10 + },
  11 + zh: {
  12 + printCommonReportTable: {
  13 + print: '打印',
  14 + cancel: '取消',
  15 + componentName: '报表名称',
  16 + tableHeader: '表头',
  17 + footer: '页脚信息'
  18 + }
  19 + }
  20 +}
0 21 \ No newline at end of file
... ...
src/views/report/printCommonReportTableList.vue 0 → 100644
  1 +<template>
  2 + <div class="print-common-report-table-container">
  3 +
  4 + <div class="top-1">
  5 + <h1 class="text-center">{{ printCommonReportTableInfo.componentName }}</h1>
  6 + </div>
  7 +
  8 + <div class="context-1">
  9 + <table class="custom-table">
  10 + <thead>
  11 + <tr>
  12 + <th v-for="(itemTh, indexTh) in printCommonReportTableInfo.th" :key="indexTh"
  13 + style="color: #000; font-size: 20px; text-align: center; padding: 12px 8px; border: 1px solid #000;">
  14 + {{ itemTh }}
  15 + </th>
  16 + </tr>
  17 + </thead>
  18 + <tbody>
  19 + <tr v-for="(row, rowIndex) in printCommonReportTableInfo.data" :key="rowIndex">
  20 + <td v-for="(itemTh, indexTh) in printCommonReportTableInfo.th" :key="indexTh"
  21 + style="color: #000; font-size: 20px; text-align: center; padding: 12px 8px; border: 1px solid #000;">
  22 + {{ row[itemTh] }}
  23 + </td>
  24 + </tr>
  25 + </tbody>
  26 + </table>
  27 +
  28 + <el-row v-if="printCommonReportTableInfo.footer" class="padding-left">
  29 + <el-col v-for="(value, key) in printCommonReportTableInfo.footer" :key="key" :span="4">
  30 + <div>{{ key }}: {{ value }}</div>
  31 + </el-col>
  32 + </el-row>
  33 +
  34 + <div class="text-right" id="print-btn">
  35 + <el-button type="primary" class="float-right" @click="_printPurchaseApplyDiv">
  36 + <i class="el-icon-printer"></i>&nbsp;{{ $t('printCommonReportTable.print') }}
  37 + </el-button>
  38 + <el-button type="warning" class="float-right" style="margin-right: 20px;" @click="_closePage">
  39 + {{ $t('printCommonReportTable.cancel') }}
  40 + </el-button>
  41 + </div>
  42 + </div>
  43 +
  44 + </div>
  45 +</template>
  46 +
  47 +<script>
  48 +export default {
  49 + name: 'PrintCommonReportTableList',
  50 + data() {
  51 + return {
  52 + printCommonReportTableInfo: {}
  53 + }
  54 + },
  55 + created() {
  56 + this._initData()
  57 + },
  58 + methods: {
  59 + _initData() {
  60 + this.printCommonReportTableInfo = JSON.parse(localStorage.getItem('printCommonReportTableData'))
  61 + },
  62 + _printPurchaseApplyDiv() {
  63 + document.getElementById("print-btn").style.display = "none"
  64 + window.print()
  65 + window.opener = null
  66 + window.close()
  67 + },
  68 + _closePage() {
  69 + window.opener = null
  70 + window.close()
  71 + }
  72 + }
  73 +}
  74 +</script>
  75 +
  76 +<style lang="scss" scoped>
  77 +.print-common-report-table-container {
  78 + padding: 20px;
  79 +
  80 + .top-1 {
  81 + margin-bottom: 20px;
  82 +
  83 + h1 {
  84 + color: #000;
  85 + font-weight: 400;
  86 + }
  87 + }
  88 +
  89 + .context-1 {
  90 + .custom-table {
  91 + width: 100%;
  92 + border-collapse: collapse;
  93 + margin-bottom: 20px;
  94 +
  95 + th, td {
  96 + border: 1px solid #000;
  97 + background-color: #fff;
  98 + }
  99 +
  100 + th {
  101 + background-color: #f5f5f5;
  102 + font-weight: bold;
  103 + }
  104 +
  105 + tr:nth-child(even) {
  106 + background-color: #fafafa;
  107 + }
  108 +
  109 + tr:hover {
  110 + background-color: #f0f0f0;
  111 + }
  112 + }
  113 +
  114 + .padding-left {
  115 + padding-left: 20px;
  116 + margin-top: 20px;
  117 + font-size: 20px;
  118 + color: #000;
  119 + }
  120 +
  121 + .text-right {
  122 + margin-top: 20px;
  123 + text-align: right;
  124 + }
  125 + }
  126 +}
  127 +</style>
0 128 \ No newline at end of file
... ...
src/views/report/reportFeeDetailList.vue
... ... @@ -79,7 +79,8 @@
79 79 </report-fee-detail-contract>
80 80 </el-tab-pane>
81 81 <el-tab-pane label="车辆费用明细" name="reportFeeDetailCar">
82   - <report-fee-detail-car v-if="reportFeeDetailInfo._currentTab === 'reportFeeDetailCar'" ref="reportFeeDetailCar">
  82 + <report-fee-detail-car v-if="reportFeeDetailInfo._currentTab === 'reportFeeDetailCar'"
  83 + ref="reportFeeDetailCar">
83 84 </report-fee-detail-car>
84 85 </el-tab-pane>
85 86 </el-tabs>
... ... @@ -163,8 +164,8 @@ export default {
163 164 this.reportFeeDetailInfo._currentTab = tab.name || tab
164 165 setTimeout(() => {
165 166 this.$refs[tab.name || tab].open(this.reportFeeDetailInfo.conditions)
166   - },500)
167   -
  167 + }, 500)
  168 +
168 169 },
169 170 queryMethod() {
170 171 this.changeTab(this.reportFeeDetailInfo._currentTab)
... ...
src/views/report/reportOweFeeDetailList.vue
... ... @@ -2,19 +2,7 @@
2 2 <div class="report-owe-fee-detail-container animated fadeInRight">
3 3 <el-row :gutter="20">
4 4 <el-col :span="3">
5   - <el-card class="floor-list-card">
6   - <ul class="floor-list">
7   - <li class="floor-item" @click="swatchFloor('')"
8   - :class="{ 'active': reportOweFeeDetailInfo.conditions.floorId === '' }">
9   - {{ $t('reportOweFeeDetail.all') }}
10   - </li>
11   - <li class="floor-item" v-for="(item, index) in reportOweFeeDetailInfo.floors" :key="index"
12   - @click="swatchFloor(item.floorId)"
13   - :class="{ 'active': reportOweFeeDetailInfo.conditions.floorId === item.floorId }">
14   - {{ item.floorName }}
15   - </li>
16   - </ul>
17   - </el-card>
  5 + <select-community-floor ref="selectCommunityFloor" />
18 6 </el-col>
19 7 <el-col :span="21">
20 8 <el-card>
... ... @@ -22,7 +10,7 @@
22 10 <span>{{ $t('reportOweFeeDetail.searchCondition') }}</span>
23 11 </div>
24 12 <el-form :inline="true" :model="reportOweFeeDetailInfo.conditions" class="search-form text-left">
25   - <el-form-item :label="$t('reportOweFeeDetail.feeType')">
  13 + <el-form-item >
26 14 <el-select v-model="reportOweFeeDetailInfo.conditions.feeTypeCd"
27 15 :placeholder="$t('reportOweFeeDetail.selectFeeType')" style="width:100%">
28 16 <el-option v-for="(item, index) in reportOweFeeDetailInfo.feeTypeCds" :key="index" :label="item.name"
... ... @@ -31,25 +19,26 @@
31 19 </el-select>
32 20 </el-form-item>
33 21  
34   - <el-form-item :label="$t('reportOweFeeDetail.roomNum')">
  22 + <el-form-item >
35 23 <el-input v-model="reportOweFeeDetailInfo.conditions.objNameLike"
36 24 :placeholder="$t('reportOweFeeDetail.inputRoomNum')">
37 25 </el-input>
38 26 </el-form-item>
39 27  
40   - <el-form-item :label="$t('reportOweFeeDetail.startTime')">
  28 + <el-form-item >
41 29 <el-date-picker v-model="reportOweFeeDetailInfo.conditions.startTime" type="date"
42 30 :placeholder="$t('reportOweFeeDetail.selectStartTime')">
43 31 </el-date-picker>
44 32 </el-form-item>
45 33  
46   - <el-form-item :label="$t('reportOweFeeDetail.endTime')">
  34 + <el-form-item >
47 35 <el-date-picker v-model="reportOweFeeDetailInfo.conditions.endTime" type="date"
48 36 :placeholder="$t('reportOweFeeDetail.selectEndTime')">
49 37 </el-date-picker>
50 38 </el-form-item>
51 39  
52   - <el-form-item v-if="reportOweFeeDetailInfo.communitys.length > 1" :label="$t('reportOweFeeDetail.community')">
  40 + <el-form-item v-if="reportOweFeeDetailInfo.communitys.length > 1"
  41 + >
53 42 <el-select v-model="reportOweFeeDetailInfo.conditions.communityId" @change="_changCommunity"
54 43 :placeholder="$t('reportOweFeeDetail.selectCommunity')" style="width:100%">
55 44 <el-option v-for="(item, index) in reportOweFeeDetailInfo.communitys" :key="index" :label="item.name"
... ... @@ -60,12 +49,10 @@
60 49  
61 50 <el-form-item>
62 51 <el-button type="primary" @click="_queryMethod">{{ $t('reportOweFeeDetail.search') }}</el-button>
63   - <el-button @click="_resetMethod" style="margin-left: 10px;">{{ $t('reportOweFeeDetail.reset') }}</el-button>
  52 + <el-button @click="_resetMethod" style="margin-left: 10px;">{{ $t('reportOweFeeDetail.reset')
  53 + }}</el-button>
64 54 </el-form-item>
65   - </el-form>
66   -
67   - <el-form :inline="true" class="search-form text-left">
68   - <el-form-item :label="$t('reportOweFeeDetail.ownerName')">
  55 + <el-form-item >
69 56 <el-input v-model="reportOweFeeDetailInfo.conditions.ownerNameLike"
70 57 :placeholder="$t('reportOweFeeDetail.inputOwnerName')">
71 58 </el-input>
... ... @@ -132,7 +119,7 @@
132 119 </div>
133 120  
134 121 <div class="footer">
135   - <div class="footer-left">
  122 + <div class="text-left table-desc">
136 123 <p>{{ $t('reportOweFeeDetail.feeStartTimeDesc') }}</p>
137 124 <p>{{ $t('reportOweFeeDetail.oweDaysDesc1') }}</p>
138 125 <p>{{ $t('reportOweFeeDetail.oweDaysDesc2') }}</p>
... ... @@ -154,14 +141,19 @@
154 141 <script>
155 142 import { getDict } from '@/api/community/communityApi'
156 143 import { getCommunityId } from '@/api/community/communityApi'
  144 +import SelectCommunityFloor from '@/components/report/selectCommunityFloor'
  145 +
157 146 import { queryOweFeeDetail, exportData } from '@/api/report/reportOweFeeDetailApi'
158   -import {searchFloors} from '@/api/room/searchFloorApi'
  147 +import { searchFloors } from '@/api/room/searchFloorApi'
159 148 import {
160 149 listMyEnteredCommunitys
161 150 } from '@/api/report/dataReportApi'
162 151  
163 152 export default {
164 153 name: 'ReportOweFeeDetailList',
  154 + components: {
  155 + SelectCommunityFloor
  156 + },
165 157 data() {
166 158 return {
167 159 loading: false,
... ... @@ -197,6 +189,14 @@ export default {
197 189 },
198 190 created() {
199 191 this.initData()
  192 + setTimeout(() => {
  193 + this.$refs.selectCommunityFloor.open({
  194 + callBack: (floor) => {
  195 + this.reportOweFeeDetailInfo.conditions.floorId = floor.floorId
  196 + this._listFees()
  197 + }
  198 + })
  199 + }, 500)
200 200 },
201 201 methods: {
202 202 async initData() {
... ... @@ -369,7 +369,6 @@ export default {
369 369 }
370 370  
371 371 .search-form {
372   - margin-bottom: 20px;
373 372  
374 373 .el-form-item {
375 374 margin-right: 20px;
... ... @@ -377,9 +376,7 @@ export default {
377 376 }
378 377  
379 378 .summary {
380   - margin: 20px 0;
381 379 padding: 10px;
382   - background-color: #f5f7fa;
383 380 border-radius: 4px;
384 381  
385 382 .summary-item {
... ... @@ -398,7 +395,6 @@ export default {
398 395 .footer {
399 396 display: flex;
400 397 justify-content: space-between;
401   - margin-top: 20px;
402 398  
403 399 .footer-left {
404 400 width: 60%;
... ...
src/views/report/reportPayFeeDetailList.vue
... ... @@ -147,11 +147,11 @@
147 147 <el-table-column prop="lateFee" :label="$t('reportPayFeeDetail.table.lateFee')" align="center" />
148 148 <el-table-column prop="builtUpArea" :label="$t('reportPayFeeDetail.table.area')" align="center" />
149 149 <el-table-column prop="psName" :label="$t('reportPayFeeDetail.table.parkingSpace')" align="center" />
150   - <el-table-column prop="remark" :label="$t('reportPayFeeDetail.table.remark')" align="center" width="200" />
  150 + <el-table-column prop="remark" :label="$t('reportPayFeeDetail.table.remark')" align="center" width="100" />
151 151 </el-table>
152 152  
153 153 <!-- 统计信息 -->
154   - <el-row class="summary-row">
  154 + <el-row class="summary-row text-left">
155 155 <el-col :span="24">
156 156 <el-row>
157 157 <el-col :span="2">{{ $t('reportPayFeeDetail.summary.subtotal') }}</el-col>
... ... @@ -201,7 +201,7 @@
201 201 </el-row>
202 202  
203 203 <!-- 说明 -->
204   - <el-row class="explanation-row">
  204 + <el-row class="text-left table-desc">
205 205 <el-col :span="18">
206 206 <div>{{ $t('reportPayFeeDetail.explanation.preferential') }}</div>
207 207 <div>{{ $t('reportPayFeeDetail.explanation.deduction') }}</div>
... ...
src/views/report/reportRepairList.vue
... ... @@ -73,7 +73,7 @@
73 73 </el-col>
74 74 </el-row>
75 75  
76   - <el-row :gutter="20" style="margin-top: 20px;">
  76 + <el-row :gutter="20" >
77 77 <el-col :span="24">
78 78 <el-card class="box-card">
79 79 <div slot="header" class="flex justify-between">
... ... @@ -91,46 +91,53 @@
91 91 </div>
92 92 </div>
93 93 <div class="card-body">
94   - <el-table :data="reportRepairInfo.repairs" border style="width: 100%" v-loading="loading">
95   - <el-table-column prop="index" :label="$t('reportRepair.repairId')" align="center" width="80">
96   - <template slot-scope="scope">
97   - {{ scope.$index + 1 }}
98   - </template>
99   - </el-table-column>
100   - <el-table-column prop="staffId" :label="$t('reportRepair.staffId')" align="center" />
101   - <el-table-column prop="staffName" :label="$t('reportRepair.staffName')" align="center" />
102   - <el-table-column prop="dealAmount" :label="$t('reportRepair.dealing')" align="center" />
103   - <el-table-column prop="dispatchAmount" :label="$t('reportRepair.dispatch')" align="center" />
104   - <el-table-column prop="transferOrderAmount" :label="$t('reportRepair.transfer')" align="center" />
105   - <el-table-column prop="chargebackAmount" :label="$t('reportRepair.chargeback')" align="center" />
106   - <el-table-column prop="returnAmount" :label="$t('reportRepair.returnVisit')" align="center" />
107   - <el-table-column prop="statementAmount" :label="$t('reportRepair.finished')" align="center" />
108   - <el-table-column prop="score" :label="$t('reportRepair.score')" align="center">
109   - <template slot-scope="scope">
110   - {{ scope.row.score || '-' }}
111   - </template>
112   - </el-table-column>
113   - </el-table>
114   -
115   - <el-table :data="[{}]" border style="width: 100%; margin-top: 20px;">
116   - <el-table-column :label="$t('reportRepair.statistics')" align="center" width="80"
117   - class-name="statistics-cell" />
118   - <el-table-column label="---" align="center" class-name="statistics-cell" />
119   - <el-table-column label="---" align="center" class-name="statistics-cell" />
120   - <el-table-column :label="reportRepairInfo.conditions.dealNumber" align="center"
121   - class-name="statistics-cell" />
122   - <el-table-column :label="reportRepairInfo.conditions.dispatchNumber" align="center"
123   - class-name="statistics-cell" />
124   - <el-table-column :label="reportRepairInfo.conditions.transferOrderNumber" align="center"
125   - class-name="statistics-cell" />
126   - <el-table-column :label="reportRepairInfo.conditions.chargebackNumber" align="center"
127   - class-name="statistics-cell" />
128   - <el-table-column :label="reportRepairInfo.conditions.returnNumber" align="center"
129   - class-name="statistics-cell" />
130   - <el-table-column :label="reportRepairInfo.conditions.statementNumber" align="center"
131   - class-name="statistics-cell" />
132   - <el-table-column label="---" align="center" class-name="statistics-cell" />
133   - </el-table>
  94 + <div class="table-container" v-loading="loading">
  95 + <table class="custom-table">
  96 + <thead>
  97 + <tr>
  98 + <th style="width: 80px; text-align: center; padding: 12px 8px;">{{ $t('reportRepair.repairId') }}</th>
  99 + <th style="text-align: center; padding: 12px 8px;">{{ $t('reportRepair.staffId') }}</th>
  100 + <th style="text-align: center; padding: 12px 8px;">{{ $t('reportRepair.staffName') }}</th>
  101 + <th style="text-align: center; padding: 12px 8px;">{{ $t('reportRepair.dealing') }}</th>
  102 + <th style="text-align: center; padding: 12px 8px;">{{ $t('reportRepair.dispatch') }}</th>
  103 + <th style="text-align: center; padding: 12px 8px;">{{ $t('reportRepair.transfer') }}</th>
  104 + <th style="text-align: center; padding: 12px 8px;">{{ $t('reportRepair.chargeback') }}</th>
  105 + <th style="text-align: center; padding: 12px 8px;">{{ $t('reportRepair.returnVisit') }}</th>
  106 + <th style="text-align: center; padding: 12px 8px;">{{ $t('reportRepair.finished') }}</th>
  107 + <th style="text-align: center; padding: 12px 8px;">{{ $t('reportRepair.score') }}</th>
  108 + </tr>
  109 + </thead>
  110 + <tbody>
  111 + <!-- 数据行 -->
  112 + <tr v-for="(item, index) in reportRepairInfo.repairs" :key="index" class="data-row">
  113 + <td style="text-align: center; padding: 12px 8px;">{{ index + 1 }}</td>
  114 + <td style="text-align: center; padding: 12px 8px;">{{ item.staffId }}</td>
  115 + <td style="text-align: center; padding: 12px 8px;">{{ item.staffName }}</td>
  116 + <td style="text-align: center; padding: 12px 8px;">{{ item.dealAmount }}</td>
  117 + <td style="text-align: center; padding: 12px 8px;">{{ item.dispatchAmount }}</td>
  118 + <td style="text-align: center; padding: 12px 8px;">{{ item.transferOrderAmount }}</td>
  119 + <td style="text-align: center; padding: 12px 8px;">{{ item.chargebackAmount }}</td>
  120 + <td style="text-align: center; padding: 12px 8px;">{{ item.returnAmount }}</td>
  121 + <td style="text-align: center; padding: 12px 8px;">{{ item.statementAmount }}</td>
  122 + <td style="text-align: center; padding: 12px 8px;">{{ item.score || '-' }}</td>
  123 + </tr>
  124 +
  125 + <!-- 统计汇总行 -->
  126 + <tr class="statistics-row">
  127 + <td style="text-align: center; padding: 12px 8px; font-size: 18px; color: red;">{{ $t('reportRepair.statistics') }}</td>
  128 + <td style="text-align: center; padding: 12px 8px; font-size: 18px; color: red;">---</td>
  129 + <td style="text-align: center; padding: 12px 8px; font-size: 18px; color: red;">---</td>
  130 + <td style="text-align: center; padding: 12px 8px; font-size: 18px; color: red;">{{ reportRepairInfo.conditions.dealNumber }}</td>
  131 + <td style="text-align: center; padding: 12px 8px; font-size: 18px; color: red;">{{ reportRepairInfo.conditions.dispatchNumber }}</td>
  132 + <td style="text-align: center; padding: 12px 8px; font-size: 18px; color: red;">{{ reportRepairInfo.conditions.transferOrderNumber }}</td>
  133 + <td style="text-align: center; padding: 12px 8px; font-size: 18px; color: red;">{{ reportRepairInfo.conditions.chargebackNumber }}</td>
  134 + <td style="text-align: center; padding: 12px 8px; font-size: 18px; color: red;">{{ reportRepairInfo.conditions.returnNumber }}</td>
  135 + <td style="text-align: center; padding: 12px 8px; font-size: 18px; color: red;">{{ reportRepairInfo.conditions.statementNumber }}</td>
  136 + <td style="text-align: center; padding: 12px 8px; font-size: 18px; color: red;">---</td>
  137 + </tr>
  138 + </tbody>
  139 + </table>
  140 + </div>
134 141  
135 142 <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
136 143 :current-page="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size"
... ... @@ -327,17 +334,48 @@ export default {
327 334 justify-content: space-between;
328 335 }
329 336  
330   - .card-body {
331   - padding: 20px 0;
332   - }
  337 +
333 338 }
334 339  
335   - .el-table {
336   - margin-top: 20px;
  340 + .table-container {
  341 +
  342 + overflow-x: auto;
  343 + }
337 344  
338   - .statistics-cell {
339   - font-size: 18px;
340   - color: red;
  345 + .custom-table {
  346 + width: 100%;
  347 + border-collapse: collapse;
  348 + border: 1px solid #EBEEF5;
  349 +
  350 + th, td {
  351 + border: 1px solid #EBEEF5;
  352 + background-color: #fff;
  353 + }
  354 +
  355 + th {
  356 + background-color: #fafafa;
  357 + font-weight: 500;
  358 + color: #606266;
  359 + }
  360 +
  361 + .data-row {
  362 + &:hover {
  363 + background-color: #f5f7fa;
  364 + }
  365 +
  366 + &:nth-child(even) {
  367 + background-color: #fafafa;
  368 + }
  369 + }
  370 +
  371 + .statistics-row {
  372 + background-color: #fff !important;
  373 +
  374 + td {
  375 + font-size: 18px;
  376 + color: red;
  377 + font-weight: bold;
  378 + }
341 379 }
342 380 }
343 381  
... ...