Commit 5f2a159bfefaed060e4e6d5b0d9dfb602996ee46
1 parent
3eb57e35
回执单
Showing
4 changed files
with
201 additions
and
14 deletions
src/api/fee/index.ts
| ... | ... | @@ -83,10 +83,11 @@ export const propertyFeeDelete = async (params: any) => { |
| 83 | 83 | * @description 文件导出 |
| 84 | 84 | * @function propertyFeeExport |
| 85 | 85 | */ |
| 86 | - export const propertyFeeExport = async () => { | |
| 86 | + export const propertyFeeExport = async (params: any) => { | |
| 87 | 87 | let res: any = await request({ |
| 88 | 88 | method: 'post', |
| 89 | 89 | responseType: 'blob', |
| 90 | + params: deleteEmptyParam(params), | |
| 90 | 91 | url: '/housePropertyFee/exportExcel', |
| 91 | 92 | }) |
| 92 | 93 | return res |
| ... | ... | @@ -102,4 +103,17 @@ export const propertyFeeDelete = async (params: any) => { |
| 102 | 103 | url: '/housePropertyFee/importExcel', |
| 103 | 104 | }) |
| 104 | 105 | return res |
| 106 | +} | |
| 107 | + | |
| 108 | +/** | |
| 109 | + * @description 回执单详情 | |
| 110 | + * @function propertyFeePaper | |
| 111 | + */ | |
| 112 | +export const propertyFeePaper = async (params: any) => { | |
| 113 | + let res: any = await request({ | |
| 114 | + method: 'get', | |
| 115 | + url: '/housePropertyFee/receiptInfo', | |
| 116 | + params: params | |
| 117 | + }) | |
| 118 | + return res | |
| 105 | 119 | } |
| 106 | 120 | \ No newline at end of file | ... | ... |
src/views/fee/config.ts
| ... | ... | @@ -34,4 +34,16 @@ export const payStatus: EnumArrayItem[] = [ |
| 34 | 34 | label: '已确认', |
| 35 | 35 | value: 1 |
| 36 | 36 | } |
| 37 | +] | |
| 38 | + | |
| 39 | +// 支付平台 | |
| 40 | +export const bankType: EnumArrayItem[] = [ | |
| 41 | + { | |
| 42 | + label: '支付宝', | |
| 43 | + value: 3 | |
| 44 | + }, | |
| 45 | + { | |
| 46 | + label: '微信', | |
| 47 | + value: 1 | |
| 48 | + } | |
| 37 | 49 | ] |
| 38 | 50 | \ No newline at end of file | ... | ... |
src/views/fee/index.vue
| ... | ... | @@ -9,6 +9,7 @@ import { |
| 9 | 9 | propertyFeeSureFast, |
| 10 | 10 | propertyFeeImport, |
| 11 | 11 | propertyFeeExport, |
| 12 | + propertyFeePaper, | |
| 12 | 13 | } from "@/api/fee"; |
| 13 | 14 | import { getTableList } from "@/api/community/residence"; |
| 14 | 15 | import { getTableList as getBuildings } from "@/api/community/housekeeper"; |
| ... | ... | @@ -17,6 +18,7 @@ import { parseTime, globalFilters, exportData } from "@/utils/tool"; |
| 17 | 18 | import { price } from "@/utils/validate"; |
| 18 | 19 | import Pagination from "@/components/Pagination/index.vue"; |
| 19 | 20 | import File from "@/components/FileUpload/index.vue"; |
| 21 | +import Paper from "./paper.vue"; | |
| 20 | 22 | import { statusData, payData, payStatus } from "./config"; |
| 21 | 23 | import { ElMessageBox, ElMessage } from "element-plus"; |
| 22 | 24 | import type { ElTable } from "element-plus"; |
| ... | ... | @@ -82,7 +84,9 @@ let data = reactive({ |
| 82 | 84 | neighborhoods: [], |
| 83 | 85 | buildings: [], |
| 84 | 86 | units: [], |
| 87 | + paperData: [], | |
| 85 | 88 | loading: false, |
| 89 | + paperVisible: false, | |
| 86 | 90 | totals: 0, // 一键确认按钮上的总金额数 |
| 87 | 91 | params: { |
| 88 | 92 | total: 0, // 分页数据总条数 |
| ... | ... | @@ -154,7 +158,12 @@ const handleChange = (value: number, pageSize: number) => { |
| 154 | 158 | * @param {object} obj 一条表格对象 |
| 155 | 159 | */ |
| 156 | 160 | const paper = (obj: any) => { |
| 157 | - console.log("查看回执"); | |
| 161 | + propertyFeePaper({ | |
| 162 | + id: obj.id, | |
| 163 | + }).then((res) => { | |
| 164 | + data.paperData = res?.data?.data; | |
| 165 | + data.paperVisible = true; | |
| 166 | + }); | |
| 158 | 167 | }; |
| 159 | 168 | /** |
| 160 | 169 | * 楼宇改变获取单元数 |
| ... | ... | @@ -676,7 +685,7 @@ onMounted(() => { |
| 676 | 685 | </template> |
| 677 | 686 | </el-table-column> |
| 678 | 687 | <el-table-column |
| 679 | - prop="payUserid" | |
| 688 | + prop="residentName" | |
| 680 | 689 | label="缴费人" |
| 681 | 690 | align="center" |
| 682 | 691 | ></el-table-column> |
| ... | ... | @@ -706,7 +715,7 @@ onMounted(() => { |
| 706 | 715 | <el-button |
| 707 | 716 | type="text" |
| 708 | 717 | @click="paper(scope.row)" |
| 709 | - v-show="~~scope.row.payStatus === 1" | |
| 718 | + v-show="~~scope.row.payStatus === 1 && ~~scope.row.payType === 2" | |
| 710 | 719 | >回执单</el-button |
| 711 | 720 | > |
| 712 | 721 | <el-button |
| ... | ... | @@ -730,6 +739,9 @@ onMounted(() => { |
| 730 | 739 | v-model:pageSize="data.params.query.pageSize" |
| 731 | 740 | @pageChange="getList" |
| 732 | 741 | ></Pagination> |
| 742 | + <el-dialog v-model="data.paperVisible" title="回执单"> | |
| 743 | + <Paper :paperData="data.paperData"></Paper> | |
| 744 | + </el-dialog> | |
| 733 | 745 | <el-dialog v-model="form.visible" title="编辑" @close="handleClose"> |
| 734 | 746 | <el-form |
| 735 | 747 | :model="form.data" |
| ... | ... | @@ -757,16 +769,6 @@ onMounted(() => { |
| 757 | 769 | </el-input> |
| 758 | 770 | </el-form-item> |
| 759 | 771 | <el-form-item label="费用周期"> |
| 760 | - <!-- <el-date-picker | |
| 761 | - v-model="form.data.period" | |
| 762 | - type="datetimerange" | |
| 763 | - format="YYYY-MM" | |
| 764 | - range-separator="至" | |
| 765 | - start-placeholder="开始时间" | |
| 766 | - end-placeholder="结束时间" | |
| 767 | - @change="handleTimeChange($event, 'form')" | |
| 768 | - > --> | |
| 769 | - <!-- </el-date-picker> --> | |
| 770 | 772 | <el-date-picker |
| 771 | 773 | v-model="form.data.period" |
| 772 | 774 | type="monthrange" | ... | ... |
src/views/fee/paper.vue
0 → 100644
| 1 | +<script setup lang="ts"> | |
| 2 | +import { reactive, ref, getCurrentInstance } from "vue"; | |
| 3 | +import { parseTime, globalFilters } from "@/utils/tool"; | |
| 4 | +import { bankType } from "./config"; | |
| 5 | +/** | |
| 6 | + * @description 组件属性 | |
| 7 | + * @prop {string | null} paperData 回单详情数据 | |
| 8 | + */ | |
| 9 | +interface Props { | |
| 10 | + paperData: {}; | |
| 11 | +} | |
| 12 | +const props = withDefaults(defineProps<Props>(), { | |
| 13 | + paperData: { | |
| 14 | + type: Object, | |
| 15 | + default: { | |
| 16 | + value: {}, | |
| 17 | + }, | |
| 18 | + }, | |
| 19 | +}); | |
| 20 | +</script> | |
| 21 | + | |
| 22 | +<template> | |
| 23 | + <p>电子回执单号码:{{ paperData.receiptId }}</p> | |
| 24 | + <div class="paper-table"> | |
| 25 | + <el-row class="paper-table-line"> | |
| 26 | + <el-col :span="12"> | |
| 27 | + <el-col :span="8"> | |
| 28 | + <div class="paper-table-label">回单类型</div> | |
| 29 | + </el-col> | |
| 30 | + <el-col :span="16"> | |
| 31 | + <div class="paper-table-content">{{ paperData.receiptType }}</div> | |
| 32 | + </el-col> | |
| 33 | + </el-col> | |
| 34 | + <el-col :span="12"> | |
| 35 | + <el-col :span="8" class="paper-table-content-right"> | |
| 36 | + <div class="paper-table-label">缴费项目</div> | |
| 37 | + </el-col> | |
| 38 | + <el-col :span="16"> | |
| 39 | + <div class="paper-table-content">{{ paperData.receiptName }}</div> | |
| 40 | + </el-col> | |
| 41 | + </el-col> | |
| 42 | + </el-row> | |
| 43 | + <el-row class="paper-table-line"> | |
| 44 | + <el-col :span="24"> | |
| 45 | + <el-col :span="4"> | |
| 46 | + <div class="paper-table-label">收费单位</div> | |
| 47 | + </el-col> | |
| 48 | + <el-col :span="20"> | |
| 49 | + <div class="paper-table-content"> | |
| 50 | + {{ paperData.propertyName }} | |
| 51 | + </div> | |
| 52 | + </el-col> | |
| 53 | + </el-col> | |
| 54 | + </el-row> | |
| 55 | + <el-row class="paper-table-line"> | |
| 56 | + <el-col :span="12"> | |
| 57 | + <el-col :span="8"> | |
| 58 | + <div class="paper-table-label">缴费房屋</div> | |
| 59 | + </el-col> | |
| 60 | + <el-col :span="16"> | |
| 61 | + <div class="paper-table-content">{{ paperData.locality }}</div> | |
| 62 | + </el-col> | |
| 63 | + </el-col> | |
| 64 | + <el-col :span="12"> | |
| 65 | + <el-col :span="8" class="paper-table-content-right"> | |
| 66 | + <div class="paper-table-label">缴费人</div> | |
| 67 | + </el-col> | |
| 68 | + <el-col :span="16"> | |
| 69 | + <div class="paper-table-content">{{ paperData.payerName }}</div> | |
| 70 | + </el-col> | |
| 71 | + </el-col> | |
| 72 | + </el-row> | |
| 73 | + <el-row class="paper-table-line"> | |
| 74 | + <el-col :span="12"> | |
| 75 | + <el-col :span="8"> | |
| 76 | + <div class="paper-table-label">金额(大写)</div> | |
| 77 | + </el-col> | |
| 78 | + <el-col :span="16"> | |
| 79 | + <div class="paper-table-content">{{ paperData.rmb }}</div> | |
| 80 | + </el-col> | |
| 81 | + </el-col> | |
| 82 | + <el-col :span="12"> | |
| 83 | + <el-col :span="8" class="paper-table-content-right"> | |
| 84 | + <div class="paper-table-label">金额(小写)</div> | |
| 85 | + </el-col> | |
| 86 | + <el-col :span="16"> | |
| 87 | + <div class="paper-table-content"> | |
| 88 | + {{ (paperData.totalFee / 100).toFixed(2) }} | |
| 89 | + </div> | |
| 90 | + </el-col> | |
| 91 | + </el-col> | |
| 92 | + </el-row> | |
| 93 | + <el-row class="paper-table-line"> | |
| 94 | + <el-col :span="24"> | |
| 95 | + <el-col :span="4"> | |
| 96 | + <div class="paper-table-label">支付方式</div> | |
| 97 | + </el-col> | |
| 98 | + <el-col :span="20"> | |
| 99 | + <div class="paper-table-content"> | |
| 100 | + {{ globalFilters(paperData.bankPayType, bankType) }} | |
| 101 | + </div> | |
| 102 | + </el-col> | |
| 103 | + </el-col> | |
| 104 | + </el-row> | |
| 105 | + <el-row class="paper-table-line"> | |
| 106 | + <el-col :span="24"> | |
| 107 | + <el-col :span="4"> | |
| 108 | + <div class="paper-table-label">账单周期</div> | |
| 109 | + </el-col> | |
| 110 | + <el-col :span="20"> | |
| 111 | + <div class="paper-table-content"> | |
| 112 | + {{ | |
| 113 | + parseTime(new Date(paperData.beginTime).getTime()).slice(0, 7) | |
| 114 | + }} | |
| 115 | + ~ {{ parseTime(new Date(paperData.endTime).getTime()).slice(0, 7) }} | |
| 116 | + </div> | |
| 117 | + </el-col> | |
| 118 | + </el-col> | |
| 119 | + </el-row> | |
| 120 | + <el-row class="paper-table-line"> | |
| 121 | + <el-col :span="24"> | |
| 122 | + <el-col :span="4"> | |
| 123 | + <div class="paper-table-label">支付时间</div> | |
| 124 | + </el-col> | |
| 125 | + <el-col :span="20"> | |
| 126 | + <div class="paper-table-content"> | |
| 127 | + {{ parseTime(new Date(paperData.payTime).getTime()) }} | |
| 128 | + </div> | |
| 129 | + </el-col> | |
| 130 | + </el-col> | |
| 131 | + </el-row> | |
| 132 | + </div> | |
| 133 | +</template> | |
| 134 | + | |
| 135 | +<style lang="scss" scoped> | |
| 136 | +.paper-table { | |
| 137 | + border: 1px solid #ebeef5; | |
| 138 | + &-line { | |
| 139 | + border-bottom: 1px solid #ebeef5; | |
| 140 | + display: flex; | |
| 141 | + } | |
| 142 | + &-content-right { | |
| 143 | + border-left: 1px solid #ebeef5; | |
| 144 | + flex-grow: 1; | |
| 145 | + } | |
| 146 | +} | |
| 147 | +.paper-table-label { | |
| 148 | + background-color: #f5f7fa; | |
| 149 | + line-height: 30px; | |
| 150 | + padding: 10px; | |
| 151 | + width: 100px; | |
| 152 | + border-right: 1px solid #ebeef5; | |
| 153 | + text-align: center; | |
| 154 | +} | |
| 155 | +.paper-table-content { | |
| 156 | + line-height: 30px; | |
| 157 | + padding: 10px; | |
| 158 | +} | |
| 159 | +</style> | ... | ... |