|
@@ -0,0 +1,518 @@
|
|
|
|
+<template>
|
|
|
|
+ <van-nav-bar
|
|
|
|
+ :title="name"
|
|
|
|
+ left-arrow
|
|
|
|
+ @click-left="onClickLeft"
|
|
|
|
+ safe-area-inset-top
|
|
|
|
+ />
|
|
|
|
+ <div class="page_check">
|
|
|
|
+ <div class="search_pannel">
|
|
|
|
+ <van-tabs
|
|
|
|
+ v-model:active="activeTab"
|
|
|
|
+ title-active-color="#2E69EB"
|
|
|
|
+ title-inactive-color="#0C1935"
|
|
|
|
+ >
|
|
|
|
+ <van-tab title="账单明细">
|
|
|
|
+ <van-dropdown-menu active-color="#2E69EB">
|
|
|
|
+ <van-dropdown-item
|
|
|
|
+ v-model="feeType"
|
|
|
|
+ @change="handelChange('feeType', feeType)"
|
|
|
|
+ :title="feeTypeTitle"
|
|
|
|
+ :options="feeTypeList"
|
|
|
|
+ />
|
|
|
|
+ <van-dropdown-item
|
|
|
|
+ v-model="feeStatus"
|
|
|
|
+ @change="handelChange('feeStatus', feeStatus)"
|
|
|
|
+ :title="feeStatusTitle"
|
|
|
|
+ :options="feeStatusList"
|
|
|
|
+ />
|
|
|
|
+ </van-dropdown-menu>
|
|
|
|
+ </van-tab>
|
|
|
|
+ <van-tab title="扣缴记录">
|
|
|
|
+ <van-dropdown-menu active-color="#2E69EB">
|
|
|
|
+ <van-dropdown-item
|
|
|
|
+ v-model="reduceType"
|
|
|
|
+ @change="handelChange('reduceType', reduceType)"
|
|
|
|
+ :title="reduceTypeTitle"
|
|
|
|
+ :options="reduceTypeList"
|
|
|
|
+ />
|
|
|
|
+ <van-dropdown-item
|
|
|
|
+ v-model="operator"
|
|
|
|
+ @change="handelChange('operator', operator)"
|
|
|
|
+ :title="operatorTitle"
|
|
|
|
+ :options="operatorList"
|
|
|
|
+ />
|
|
|
|
+ </van-dropdown-menu>
|
|
|
|
+ </van-tab>
|
|
|
|
+ </van-tabs>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="list_total">
|
|
|
|
+ <span>共有</span>
|
|
|
|
+ <v-count-up
|
|
|
|
+ :end-val="total"
|
|
|
|
+ class="count_up"
|
|
|
|
+ options="{ separator: ',' }"
|
|
|
|
+ />
|
|
|
|
+ <span>条记录</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="check_info">
|
|
|
|
+ <template v-if="activeTab == 0">
|
|
|
|
+ <div class="info_list" key="billDetail">
|
|
|
|
+ <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
|
|
|
+ <van-list
|
|
|
|
+ v-model:loading="loading"
|
|
|
|
+ :finished="finished"
|
|
|
|
+ :error="error"
|
|
|
|
+ error-text="请求失败,点击重新加载"
|
|
|
|
+ finished-text="没有更多了"
|
|
|
|
+ @load="onLoad"
|
|
|
|
+ >
|
|
|
|
+ <div v-for="item in list" :key="item.id" class="list_item">
|
|
|
|
+ <van-collapse
|
|
|
|
+ v-model="activeCollapse"
|
|
|
|
+ :border="false"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ >
|
|
|
|
+ <van-collapse-item :name="item.id">
|
|
|
|
+ <template #title>
|
|
|
|
+ <div class="collapse_title">
|
|
|
|
+ <template v-if="item.feeType == 1">
|
|
|
|
+ <span class="label">电费:</span>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="item.feeType == 2">
|
|
|
|
+ <span class="label">水费:</span>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="item.feeType == 3">
|
|
|
|
+ <span class="label">物业相关费用费:</span>
|
|
|
|
+ </template>
|
|
|
|
+ <span style="font-weight: 600; color: #fa5555"
|
|
|
|
+ >¥{{ item.totalMoney }}</span
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <div class="collapse_info">
|
|
|
|
+ <template v-if="item.feeType == 1 || item.feeType == 2">
|
|
|
|
+ <div
|
|
|
|
+ class="info_item"
|
|
|
|
+ v-for="ele in item.list"
|
|
|
|
+ :key="ele.id"
|
|
|
|
+ >
|
|
|
|
+ <span
|
|
|
|
+ >{{ ele.deviceName }}费用:¥{{ ele.money }}</span
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="item.feeType == 3">
|
|
|
|
+ <div class="info_item">
|
|
|
|
+ <span>管理费:¥{{ item.manageMoney }}</span>
|
|
|
|
+ <span>电梯费:¥{{ item.elevatorMoney }}</span>
|
|
|
|
+ <span>中央空调使用费:¥{{ item.AirMoney }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ </van-collapse-item>
|
|
|
|
+ </van-collapse>
|
|
|
|
+ </div>
|
|
|
|
+ </van-list>
|
|
|
|
+ </van-pull-refresh>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="activeTab == 1">
|
|
|
|
+ <div class="info_list" key="reduceRecord">
|
|
|
|
+ <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
|
|
|
+ <van-list
|
|
|
|
+ v-model:loading="loading"
|
|
|
|
+ :finished="finished"
|
|
|
|
+ :error="error"
|
|
|
|
+ error-text="请求失败,点击重新加载"
|
|
|
|
+ finished-text="没有更多了"
|
|
|
|
+ @load="onLoad"
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ v-for="item in list"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ class="list_item"
|
|
|
|
+ style="padding: 12px 16px"
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ class="reduce_type"
|
|
|
|
+ :style="{
|
|
|
|
+ 'background-color': `${
|
|
|
|
+ reduceType_filter(item.reduceType)['color']
|
|
|
|
+ }`,
|
|
|
|
+ }"
|
|
|
|
+ >
|
|
|
|
+ <span>{{
|
|
|
|
+ `${reduceType_filter(item.reduceType)["label"]}`
|
|
|
|
+ }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <span class="header">{{ item.name }}</span>
|
|
|
|
+ <span>扣缴金额:¥{{ item.reduceMoney }}</span>
|
|
|
|
+ <span>账户余额:{{ item.accountMoney }}</span>
|
|
|
|
+ <span>租户电话:{{ item.tel }}</span>
|
|
|
|
+ <span>操作人:{{ item.operator }}</span>
|
|
|
|
+ <span>扣缴时间:{{ item.reduceTime }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </van-list>
|
|
|
|
+ </van-pull-refresh>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <van-tabbar
|
|
|
|
+ v-model="activeTabBar"
|
|
|
|
+ :safe-area-inset-bottom="true"
|
|
|
|
+ class="tab_bar"
|
|
|
|
+ >
|
|
|
|
+ <van-tabbar-item @click="handleChangeTabBar(1)">预存</van-tabbar-item>
|
|
|
|
+ <van-tabbar-item @click="handleChangeTabBar(2)">补助</van-tabbar-item>
|
|
|
|
+ <van-tabbar-item @click="handleChangeTabBar(3)">退费</van-tabbar-item>
|
|
|
|
+ </van-tabbar>
|
|
|
|
+ <van-popup
|
|
|
|
+ v-model:show="showPopup"
|
|
|
|
+ position="bottom"
|
|
|
|
+ :style="{ height: '30%' }"
|
|
|
|
+ class="popup_info"
|
|
|
|
+ >
|
|
|
|
+ <van-row class="popup_title">
|
|
|
|
+ <van-col :span="24">{{ popupTitle }}</van-col>
|
|
|
|
+ </van-row>
|
|
|
|
+ <van-divider style="margin: 0" />
|
|
|
|
+ <van-cell-group :border="false">
|
|
|
|
+ <van-field
|
|
|
|
+ v-model="money"
|
|
|
|
+ type="number"
|
|
|
|
+ label="¥"
|
|
|
|
+ placeholder="请输入金额"
|
|
|
|
+ />
|
|
|
|
+ </van-cell-group>
|
|
|
|
+ <div class="save_btn">
|
|
|
|
+ <van-button
|
|
|
|
+ block
|
|
|
|
+ type="primary"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ loading-type="spinner"
|
|
|
|
+ loading-text="立即缴费"
|
|
|
|
+ @click="onSubmit"
|
|
|
|
+ >
|
|
|
|
+ 立即缴费
|
|
|
|
+ </van-button>
|
|
|
|
+ </div>
|
|
|
|
+ </van-popup>
|
|
|
|
+</template>
|
|
|
|
+<script>
|
|
|
|
+import { isEmpty } from "@/utils/index.js";
|
|
|
|
+import VCountUp from "./CountUp";
|
|
|
|
+export default {
|
|
|
|
+ components: {
|
|
|
|
+ "v-count-up": VCountUp,
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ name: "合肥市传秀科技有限公司",
|
|
|
|
+ loading: false,
|
|
|
|
+ showPopup: false,
|
|
|
|
+ popupTitle: "",
|
|
|
|
+ money: "",
|
|
|
|
+ activeTab: 0,
|
|
|
|
+ activeTabBar: 0,
|
|
|
|
+ activeCollapse: [],
|
|
|
|
+ feeType: "",
|
|
|
|
+ feeStatus: "",
|
|
|
|
+ reduceType: "",
|
|
|
|
+ operator: "",
|
|
|
|
+ feeTypeTitle: "缴费类型",
|
|
|
|
+ feeStatusTitle: "支付状态",
|
|
|
|
+ reduceTypeTitle: "扣缴类型",
|
|
|
|
+ operatorTitle: "操作人",
|
|
|
|
+ feeTypeList: [
|
|
|
|
+ { text: "电费", value: 1 },
|
|
|
|
+ { text: "水费", value: 2 },
|
|
|
|
+ { text: "物业相关费用", value: 3 },
|
|
|
|
+ ],
|
|
|
|
+ rentStatusList: [
|
|
|
|
+ { text: "已支付", value: 1 },
|
|
|
|
+ { text: "待支付", value: 2 },
|
|
|
|
+ ],
|
|
|
|
+ reduceTypeList: [
|
|
|
|
+ { text: "预存", value: 1 },
|
|
|
|
+ { text: "补助", value: 2 },
|
|
|
|
+ { text: "退费", value: 3 },
|
|
|
|
+ { text: "核缴(水)", value: 4 },
|
|
|
|
+ { text: "核缴(电)", value: 5 },
|
|
|
|
+ { text: "核缴(物业)", value: 6 },
|
|
|
|
+ ],
|
|
|
|
+ total: 3,
|
|
|
|
+ list: [
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ name: "合肥市传秀科技有限公司",
|
|
|
|
+ reduceType: 2,
|
|
|
|
+ reduceMoney: 100,
|
|
|
|
+ accountMoney: 100,
|
|
|
|
+ tel: 13212341111,
|
|
|
|
+ operator: "张浩",
|
|
|
|
+ reduceTime: "2022-09-20 10:34:22",
|
|
|
|
+ feeType: 1,
|
|
|
|
+ totalMoney: 2932,
|
|
|
|
+ manageMoney: 15080,
|
|
|
|
+ elevatorMoney: 180,
|
|
|
|
+ AirMoney: 3000,
|
|
|
|
+ list: [
|
|
|
|
+ { deviceName: "B13传秀电表1", money: 436 },
|
|
|
|
+ { deviceName: "B13传秀电表2", money: 674 },
|
|
|
|
+ { deviceName: "B13传秀电表3", money: 1822 },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ loading: false,
|
|
|
|
+ refreshing: false,
|
|
|
|
+ finished: false,
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ methods: {
|
|
|
|
+ reduceType_filter(val) {
|
|
|
|
+ if (isEmpty(val)) {
|
|
|
|
+ return {};
|
|
|
|
+ }
|
|
|
|
+ if (val == 1) {
|
|
|
|
+ return { label: "预存", color: "#30D3A2" };
|
|
|
|
+ }
|
|
|
|
+ if (val == 2) {
|
|
|
|
+ return { label: "补助", color: "#09C700" };
|
|
|
|
+ }
|
|
|
|
+ if (val == 3) {
|
|
|
|
+ return { label: "退费", color: "#FA5555" };
|
|
|
|
+ }
|
|
|
|
+ if (val == 4) {
|
|
|
|
+ return { label: "核缴(水)", color: "#FF9C27" };
|
|
|
|
+ }
|
|
|
|
+ if (val == 4) {
|
|
|
|
+ return { label: "核缴(电)", color: "#FF9C27" };
|
|
|
|
+ }
|
|
|
|
+ if (val == 4) {
|
|
|
|
+ return { label: "核缴(物业)", color: "#FF9C27" };
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ rentStatus_filter(val) {
|
|
|
|
+ if (isEmpty(val)) {
|
|
|
|
+ return {};
|
|
|
|
+ }
|
|
|
|
+ if (val == 1) {
|
|
|
|
+ return { label: "已支付", color: "#09C700" };
|
|
|
|
+ }
|
|
|
|
+ if (val == 2) {
|
|
|
|
+ return { label: "未支付", color: "#FA5555" };
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleChangeTabBar(val) {
|
|
|
|
+ this.money = "";
|
|
|
|
+ if (val == 1) {
|
|
|
|
+ this.popupTitle = "预存";
|
|
|
|
+ }
|
|
|
|
+ if (val == 2) {
|
|
|
|
+ this.popupTitle = "补助";
|
|
|
|
+ }
|
|
|
|
+ if (val == 3) {
|
|
|
|
+ this.popupTitle = "退费";
|
|
|
|
+ }
|
|
|
|
+ this.showPopup = !this.showPopup;
|
|
|
|
+ },
|
|
|
|
+ onLoad() {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ if (this.refreshing) {
|
|
|
|
+ this.list = [];
|
|
|
|
+ this.refreshing = false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (let i = 0; i < 10; i++) {
|
|
|
|
+ this.list.push(this.list.length + 1);
|
|
|
|
+ }
|
|
|
|
+ this.loading = false;
|
|
|
|
+
|
|
|
|
+ if (this.list.length >= 40) {
|
|
|
|
+ this.finished = true;
|
|
|
|
+ }
|
|
|
|
+ }, 1000);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ onRefresh() {
|
|
|
|
+ // 清空列表数据
|
|
|
|
+ this.finished = false;
|
|
|
|
+
|
|
|
|
+ // 重新加载数据
|
|
|
|
+ // 将 loading 设置为 true,表示处于加载状态
|
|
|
|
+ this.loading = true;
|
|
|
|
+ this.onLoad();
|
|
|
|
+ },
|
|
|
|
+ onSubmit() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ this.showPopup = false;
|
|
|
|
+ }, 2000);
|
|
|
|
+ },
|
|
|
|
+ onClickLeft() {},
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+.page_check {
|
|
|
|
+ height: 100%;
|
|
|
|
+ .search_pannel {
|
|
|
|
+ background: #ffffff;
|
|
|
|
+ /deep/ {
|
|
|
|
+ .van-tabs__line {
|
|
|
|
+ --van-tabs-bottom-bar-color: #2e69eb;
|
|
|
|
+ }
|
|
|
|
+ .van-dropdown-menu__bar {
|
|
|
|
+ --van-gray-4: #999999;
|
|
|
|
+ --van-dropdown-menu-title-font-size: 14px;
|
|
|
|
+ --van-dropdown-menu-title-text-color: #0c1935;
|
|
|
|
+ --van-dropdown-menu-box-shadow: 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .list_total {
|
|
|
|
+ padding: 0 16px;
|
|
|
|
+ margin: 8px 0;
|
|
|
|
+ display: flex;
|
|
|
|
+ text-align: left;
|
|
|
|
+ span {
|
|
|
|
+ height: 16px;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #999999;
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ }
|
|
|
|
+ .count_up {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #fa5555;
|
|
|
|
+ margin: 0 2px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .check_info {
|
|
|
|
+ padding: 0 16px;
|
|
|
|
+ height: calc(
|
|
|
|
+ 100% - var(--van-nav-bar-height) - var(--van-dropdown-menu-height) - 76px
|
|
|
|
+ );
|
|
|
|
+ .info_list {
|
|
|
|
+ height: 100%;
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ .list_item {
|
|
|
|
+ background: #ffffff;
|
|
|
|
+ box-shadow: 0px 0px 10px 0px rgba(153, 153, 153, 0.15);
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ margin-bottom: 12px;
|
|
|
|
+ padding: 6px 0;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: flex-start;
|
|
|
|
+ position: relative;
|
|
|
|
+ &:nth-last-child(1) {
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+ }
|
|
|
|
+ .header {
|
|
|
|
+ height: 22px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #0c1935;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ margin-bottom: 8px;
|
|
|
|
+ }
|
|
|
|
+ span {
|
|
|
|
+ height: 20px;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ color: #999999;
|
|
|
|
+ line-height: 20px;
|
|
|
|
+ margin-bottom: 2px;
|
|
|
|
+ &:nth-last-child(1) {
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .reduce_type {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 0;
|
|
|
|
+ right: 0;
|
|
|
|
+ height: 24px;
|
|
|
|
+ padding: 0 12px;
|
|
|
|
+ border-radius: 0px 4px 0px 10px;
|
|
|
|
+ span {
|
|
|
|
+ height: 16px;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .list_btn {
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom: 15px;
|
|
|
|
+ right: 12px;
|
|
|
|
+ .van-button {
|
|
|
|
+ &:nth-child(2) {
|
|
|
|
+ margin: 0 12px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .collapse_title {
|
|
|
|
+ span {
|
|
|
|
+ height: 22px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #0c1935;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .collapse_info {
|
|
|
|
+ .info_item {
|
|
|
|
+ text-align: left;
|
|
|
|
+ margin-bottom: 2px;
|
|
|
|
+ span {
|
|
|
|
+ height: 20px;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ color: #9da0ac;
|
|
|
|
+ line-height: 20px;
|
|
|
|
+ }
|
|
|
|
+ &:nth-last-child(1) {
|
|
|
|
+ margin: 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|
|
|
|
+<style lang="scss">
|
|
|
|
+.tab_bar {
|
|
|
|
+ /deep/ {
|
|
|
|
+ .van-tabbar-item {
|
|
|
|
+ color: #2e69eb;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.popup_info {
|
|
|
|
+ box-shadow: 0px -10px 20px 0px rgba(27, 32, 38, 0.1);
|
|
|
|
+ border-radius: 20px 20px 0px 0px;
|
|
|
|
+ /deep/ {
|
|
|
|
+ .popup_title {
|
|
|
|
+ padding: 14px 0;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ color: #333333;
|
|
|
|
+ text-shadow: 0px -10px 20px rgba(27, 32, 38, 0.1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .van-field__label {
|
|
|
|
+ width: unset;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #0c1935;
|
|
|
|
+ }
|
|
|
|
+ --van-cell-font-size: 24px;
|
|
|
|
+}
|
|
|
|
+</style>
|