|
@@ -1,173 +1,224 @@
|
|
|
<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: ',' }"
|
|
|
+ <van-nav-bar :title="title" safe-area-inset-top>
|
|
|
+ <template #left>
|
|
|
+ <van-icon
|
|
|
+ :name="require('@/assets/arrow-left.svg')"
|
|
|
+ size="24"
|
|
|
+ @click="backPath"
|
|
|
/>
|
|
|
- <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"
|
|
|
+ </template>
|
|
|
+ </van-nav-bar>
|
|
|
+ <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
|
|
+ <div class="page_info">
|
|
|
+ <div class="search_pannel">
|
|
|
+ <van-tabs
|
|
|
+ v-model:active="activeTab"
|
|
|
+ title-active-color="#2E69EB"
|
|
|
+ title-inactive-color="#0C1935"
|
|
|
+ >
|
|
|
+ <van-tab name="rentBill" title="账单明细">
|
|
|
+ <van-dropdown-menu active-color="#2E69EB">
|
|
|
+ <van-dropdown-item
|
|
|
+ v-model="dataForm.costCycle"
|
|
|
+ @change="handelChange('costCycle', costCycle)"
|
|
|
+ :title="costCycleTitle"
|
|
|
+ :options="costCycleList"
|
|
|
+ />
|
|
|
+ <van-dropdown-item
|
|
|
+ v-model="dataForm.costType"
|
|
|
+ @change="handelChange('costType', costType)"
|
|
|
+ :title="costTypeTitle"
|
|
|
+ :options="costTypeList"
|
|
|
+ />
|
|
|
+ <van-dropdown-item
|
|
|
+ v-model="dataForm.status"
|
|
|
+ @change="handelChange('status', status)"
|
|
|
+ :title="statusTitle"
|
|
|
+ :options="statusList"
|
|
|
+ />
|
|
|
+ </van-dropdown-menu>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab name="reduceRecord" title="扣缴记录">
|
|
|
+ <van-dropdown-menu active-color="#2E69EB">
|
|
|
+ <van-dropdown-item
|
|
|
+ v-model="dataForm.reduceDate"
|
|
|
+ @change="handelChange('reduceDate', reduceDate)"
|
|
|
+ :title="reduceDateTitle"
|
|
|
+ :options="reduceDateList"
|
|
|
+ />
|
|
|
+ <van-dropdown-item
|
|
|
+ v-model="dataForm.type"
|
|
|
+ @change="handelChange('type', type)"
|
|
|
+ :title="typeTitle"
|
|
|
+ :options="typeList"
|
|
|
+ />
|
|
|
+ <van-dropdown-item
|
|
|
+ v-model="dataForm.operator"
|
|
|
+ @change="handelChange('operator', operator)"
|
|
|
+ :title="operatorTitle"
|
|
|
+ :options="operatorList"
|
|
|
+ />
|
|
|
+ </van-dropdown-menu>
|
|
|
+ </van-tab>
|
|
|
+ </van-tabs>
|
|
|
+ </div>
|
|
|
+ <van-row align="center" class="list_total">
|
|
|
+ <van-col>共有</van-col>
|
|
|
+ <v-count-up
|
|
|
+ :end-val="dataList.length"
|
|
|
+ class="count_up"
|
|
|
+ options="{ separator: ',' }"
|
|
|
+ />
|
|
|
+ <van-col>条记录</van-col>
|
|
|
+ </van-row>
|
|
|
+ <template v-if="activeTab == 'rentBill'">
|
|
|
+ <div class="info_list" key="rentBill">
|
|
|
+ <van-list
|
|
|
+ v-model:loading="loading"
|
|
|
+ :finished="finished"
|
|
|
+ :error="error"
|
|
|
+ error-text="请求失败,点击重新加载"
|
|
|
+ finished-text="没有更多了"
|
|
|
+ @load="onLoad"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in dataList"
|
|
|
+ :key="item.id"
|
|
|
+ class="list_item"
|
|
|
>
|
|
|
- <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
|
|
|
+ <van-collapse
|
|
|
+ v-model="activeCollapse"
|
|
|
+ :border="false"
|
|
|
+ style="width: 100%"
|
|
|
+ accordion
|
|
|
+ >
|
|
|
+ <van-collapse-item :name="index">
|
|
|
+ <template #title>
|
|
|
+ <van-row class="collapse_title">
|
|
|
+ <van-checkbox-group v-model="checked">
|
|
|
+ <van-checkbox :name="a"></van-checkbox>
|
|
|
+ <van-checkbox :name="b"></van-checkbox>
|
|
|
+ </van-checkbox-group>
|
|
|
+ <van-col class="label"
|
|
|
+ >{{ `${costType_filter(item.costType)}` }}:</van-col
|
|
|
+ >
|
|
|
+ <van-col style="font-weight: 600; color: #fa5555"
|
|
|
+ >¥{{
|
|
|
+ (parseInt(item.amount * 100) / 100).toFixed(2)
|
|
|
+ }}</van-col
|
|
|
+ >
|
|
|
+ </van-row>
|
|
|
+ </template>
|
|
|
+ <div class="collapse_info">
|
|
|
+ <template
|
|
|
+ v-if="item.costType == 'Water' || item.costType == 'Elec'"
|
|
|
+ >
|
|
|
+ <van-row
|
|
|
+ class="info_item"
|
|
|
+ v-for="ele in billLists"
|
|
|
+ :key="ele.id"
|
|
|
+ >
|
|
|
+ <van-col
|
|
|
+ >{{ ele.deviceName }}费用:¥{{ ele.amount }}</van-col
|
|
|
>
|
|
|
- </div>
|
|
|
+ </van-row>
|
|
|
</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
|
|
|
+ <template v-if="item.costType == 'PropertyFee'">
|
|
|
+ <div class="info_item">
|
|
|
+ <van-row>
|
|
|
+ <van-col>管理费:¥{{ item.manageMoney }}</van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row>
|
|
|
+ <van-col>电梯费:¥{{ item.elevatorMoney }}</van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row>
|
|
|
+ <van-col
|
|
|
+ >中央空调使用费:¥{{ item.AirMoney }}</van-col
|
|
|
>
|
|
|
- </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>
|
|
|
+ </van-row>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </van-collapse-item>
|
|
|
+ </van-collapse>
|
|
|
+ </div>
|
|
|
+ </van-list>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template v-if="activeTab == 1">
|
|
|
+ <template v-if="activeTab == 'reduceRecord'">
|
|
|
<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"
|
|
|
+ <van-list
|
|
|
+ v-model:loading="loading"
|
|
|
+ :finished="finished"
|
|
|
+ :error="error"
|
|
|
+ error-text="请求失败,点击重新加载"
|
|
|
+ finished-text="没有更多了"
|
|
|
+ @load="onLoad"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-for="item in dataList"
|
|
|
+ :key="item.id"
|
|
|
+ class="list_item reduce_record"
|
|
|
+ style="padding: 12px 16px"
|
|
|
>
|
|
|
- <div
|
|
|
- v-for="item in list"
|
|
|
- :key="item.id"
|
|
|
- class="list_item"
|
|
|
- style="padding: 12px 16px"
|
|
|
+ <van-row
|
|
|
+ align="center"
|
|
|
+ class="reduce_type"
|
|
|
+ :style="{
|
|
|
+ 'background-color': `${
|
|
|
+ reduceType_filter(item.type)['color']
|
|
|
+ }`,
|
|
|
+ }"
|
|
|
>
|
|
|
- <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>
|
|
|
+ <van-col>{{
|
|
|
+ `${reduceType_filter(item.type)["label"]}`
|
|
|
+ }}</van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="header">
|
|
|
+ <van-col>{{ item.tenantInfo && item.tenantInfo.name }}</van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row>
|
|
|
+ <van-col>扣缴金额:¥</van-col>
|
|
|
+ <van-col style="color: #fa5555">{{
|
|
|
+ (parseInt(item.amount * 100) / 100).toFixed(2)
|
|
|
+ }}</van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row>
|
|
|
+ <van-col>账户余额:¥</van-col>
|
|
|
+ <van-col>{{
|
|
|
+ (parseInt(item.surplus * 100) / 100).toFixed(2)
|
|
|
+ }}</van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row>
|
|
|
+ <van-col>租户电话:</van-col>
|
|
|
+ <van-col>{{ item.tenantInfo && item.tenantInfo.tel }}</van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row>
|
|
|
+ <van-col>操作人:</van-col>
|
|
|
+ <van-col>{{ item.createName }}</van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row>
|
|
|
+ <van-col>扣缴时间:</van-col>
|
|
|
+ <van-col>{{ item.createDate }}</van-col>
|
|
|
+ </van-row>
|
|
|
+ </div>
|
|
|
+ </van-list>
|
|
|
</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-pull-refresh>
|
|
|
+ <template v-if="role == 'admin'">
|
|
|
+ <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>
|
|
|
+ </template>
|
|
|
+
|
|
|
<van-popup
|
|
|
v-model:show="showPopup"
|
|
|
position="bottom"
|
|
@@ -177,30 +228,31 @@
|
|
|
<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-divider
|
|
|
+ style="border-color: #d8d8d8; border-bottom-width: 1px; margin: 0"
|
|
|
+ />
|
|
|
+ <van-form input-align="left" error-message-align="left" @submit="onSubmit">
|
|
|
+ <van-cell-group :border="false">
|
|
|
+ <van-field
|
|
|
+ v-model="money"
|
|
|
+ type="number"
|
|
|
+ label="¥"
|
|
|
+ required
|
|
|
+ clearable
|
|
|
+ :rules="[{ required: true, message: '请输入金额' }]"
|
|
|
+ placeholder="请输入金额"
|
|
|
+ />
|
|
|
+ </van-cell-group>
|
|
|
+ <div class="save_btn">
|
|
|
+ <van-button block type="primary" native-type="submit">
|
|
|
+ 立即缴费
|
|
|
+ </van-button>
|
|
|
+ </div>
|
|
|
+ </van-form>
|
|
|
</van-popup>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import Api from "../utils/api";
|
|
|
import { isEmpty } from "@/utils/index.js";
|
|
|
import VCountUp from "./CountUp";
|
|
|
export default {
|
|
@@ -209,156 +261,236 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- name: "合肥市传秀科技有限公司",
|
|
|
- loading: false,
|
|
|
+ role: "",
|
|
|
+ title: "",
|
|
|
showPopup: false,
|
|
|
popupTitle: "",
|
|
|
money: "",
|
|
|
- activeTab: 0,
|
|
|
+ activeTab: "rentBill",
|
|
|
activeTabBar: 0,
|
|
|
- activeCollapse: [],
|
|
|
- feeType: "",
|
|
|
- feeStatus: "",
|
|
|
- reduceType: "",
|
|
|
- operator: "",
|
|
|
- feeTypeTitle: "缴费类型",
|
|
|
- feeStatusTitle: "支付状态",
|
|
|
- reduceTypeTitle: "扣缴类型",
|
|
|
+ activeCollapse: "",
|
|
|
+ costCycleTitle: "计费周期",
|
|
|
+ costTypeTitle: "缴费类型",
|
|
|
+ statusTitle: "支付状态",
|
|
|
+ reduceDateTitle: "扣缴时间",
|
|
|
+ typeTitle: "扣缴类型",
|
|
|
operatorTitle: "操作人",
|
|
|
- feeTypeList: [
|
|
|
- { text: "电费", value: 1 },
|
|
|
- { text: "水费", value: 2 },
|
|
|
- { text: "物业相关费用", value: 3 },
|
|
|
+ costCycleList: [],
|
|
|
+ costTypeList: [
|
|
|
+ { text: "电费", value: "Elec" },
|
|
|
+ { text: "水费", value: "Water" },
|
|
|
+ { text: "物业费", value: "PropertyFee" },
|
|
|
],
|
|
|
- rentStatusList: [
|
|
|
+ statusList: [
|
|
|
{ text: "已支付", value: 1 },
|
|
|
{ text: "待支付", value: 2 },
|
|
|
+ { text: "支付失败", value: 3 },
|
|
|
],
|
|
|
- reduceTypeList: [
|
|
|
- { text: "预存", value: 1 },
|
|
|
- { text: "补助", value: 2 },
|
|
|
- { text: "退费", value: 3 },
|
|
|
+ reduceDateList: [],
|
|
|
+ typeList: [
|
|
|
+ { text: "预存", value: "PreStorage" },
|
|
|
+ { text: "补助", value: "Subsidy" },
|
|
|
+ { text: "退费", value: "Refund" },
|
|
|
{ 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 },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
+ operatorList: [],
|
|
|
+ dataForm: {
|
|
|
+ tenantId: "",
|
|
|
+ costCycle: "2022-08",
|
|
|
+ costType: "",
|
|
|
+ status: "",
|
|
|
+ type: "",
|
|
|
+ reduceDate: "",
|
|
|
+ operator: "",
|
|
|
+ page: 1,
|
|
|
+ limit: 10,
|
|
|
+ },
|
|
|
+ dataList: [],
|
|
|
+ billDetailList: [],
|
|
|
loading: false,
|
|
|
refreshing: false,
|
|
|
finished: false,
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
+ watch: {
|
|
|
+ activeTab: {
|
|
|
+ handler(newval, oldval) {
|
|
|
+ this.onRefresh();
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.role = localStorage.getItem("role");
|
|
|
+ this.title = this.$route.query.tenantName;
|
|
|
+ this.dataForm.tenantId = this.$route.query.tenantId;
|
|
|
+ this.dataForm.costCycle = this.$route.query.costCycle;
|
|
|
+ this.activeTab = this.$route.query.activeTab;
|
|
|
+ },
|
|
|
methods: {
|
|
|
reduceType_filter(val) {
|
|
|
if (isEmpty(val)) {
|
|
|
return {};
|
|
|
}
|
|
|
- if (val == 1) {
|
|
|
+ if (val == "PreStorage") {
|
|
|
return { label: "预存", color: "#30D3A2" };
|
|
|
}
|
|
|
- if (val == 2) {
|
|
|
+ if (val == "Subsidy") {
|
|
|
return { label: "补助", color: "#09C700" };
|
|
|
}
|
|
|
- if (val == 3) {
|
|
|
+ if (val == "Refund") {
|
|
|
return { label: "退费", color: "#FA5555" };
|
|
|
}
|
|
|
if (val == 4) {
|
|
|
return { label: "核缴(水)", color: "#FF9C27" };
|
|
|
}
|
|
|
- if (val == 4) {
|
|
|
+ if (val == 5) {
|
|
|
return { label: "核缴(电)", color: "#FF9C27" };
|
|
|
}
|
|
|
- if (val == 4) {
|
|
|
+ if (val == 6) {
|
|
|
return { label: "核缴(物业)", color: "#FF9C27" };
|
|
|
}
|
|
|
+ if (val == "CancelSubsidy") {
|
|
|
+ return { label: "撤销补助", color: "#FF9C27" };
|
|
|
+ }
|
|
|
+ CancelSubsidy;
|
|
|
},
|
|
|
- rentStatus_filter(val) {
|
|
|
+ costType_filter(val) {
|
|
|
if (isEmpty(val)) {
|
|
|
- return {};
|
|
|
- }
|
|
|
- if (val == 1) {
|
|
|
- return { label: "已支付", color: "#09C700" };
|
|
|
- }
|
|
|
- if (val == 2) {
|
|
|
- return { label: "未支付", color: "#FA5555" };
|
|
|
+ return "";
|
|
|
}
|
|
|
- },
|
|
|
- handleChangeTabBar(val) {
|
|
|
- this.money = "";
|
|
|
- if (val == 1) {
|
|
|
- this.popupTitle = "预存";
|
|
|
+ if (val == "Elec") {
|
|
|
+ return "电费";
|
|
|
}
|
|
|
- if (val == 2) {
|
|
|
- this.popupTitle = "补助";
|
|
|
+ if (val == "Water") {
|
|
|
+ return "水费";
|
|
|
}
|
|
|
- if (val == 3) {
|
|
|
- this.popupTitle = "退费";
|
|
|
+ if (val == "PropertyFee") {
|
|
|
+ return "物业费";
|
|
|
}
|
|
|
- this.showPopup = !this.showPopup;
|
|
|
},
|
|
|
onLoad() {
|
|
|
- setTimeout(() => {
|
|
|
+ setTimeout(async () => {
|
|
|
if (this.refreshing) {
|
|
|
- this.list = [];
|
|
|
+ this.dataList = [];
|
|
|
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);
|
|
|
+ await this.getDataList();
|
|
|
+ this.dataForm.page++; // 分页数加一
|
|
|
+ }, 100);
|
|
|
},
|
|
|
-
|
|
|
onRefresh() {
|
|
|
// 清空列表数据
|
|
|
this.finished = false;
|
|
|
-
|
|
|
// 重新加载数据
|
|
|
// 将 loading 设置为 true,表示处于加载状态
|
|
|
this.loading = true;
|
|
|
+ this.dataForm.page = 1; // 分页数赋值为1
|
|
|
+ this.dataList = [];
|
|
|
this.onLoad();
|
|
|
},
|
|
|
+ // 获取列表数据方法
|
|
|
+ getDataList() {
|
|
|
+ if (this.activeTab == "rentBill") {
|
|
|
+ this.getRentBillList();
|
|
|
+ }
|
|
|
+ if (this.activeTab == "reduceRecord") {
|
|
|
+ this.getReduceRecordList();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getRentBillList() {
|
|
|
+ Api.rentBillDetail(this.dataForm).then((res) => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ if (res.data) {
|
|
|
+ if (res.data.length == 0) {
|
|
|
+ // 判断获取数据条数若等于0
|
|
|
+ this.dataList = []; // 清空数组
|
|
|
+ this.finished = true; // 停止加载
|
|
|
+ }
|
|
|
+ // 若数据条数不等于0
|
|
|
+ this.dataList.push(...res.data); // 将数据放入list中
|
|
|
+ this.loading = false; // 加载状态结束
|
|
|
+
|
|
|
+ // 如果list长度大于等于总数据条数,数据全部加载完成
|
|
|
+ if (this.dataList.length >= res.data.length) {
|
|
|
+ this.finished = true; // 结束加载状态
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 判断获取数据条数若等于0
|
|
|
+ this.dataList = []; // 清空数组
|
|
|
+ this.finished = true; // 停止加载
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.loading = false; // 加载状态结束
|
|
|
+ this.finished = true; // 停止加载
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getReduceRecordList() {
|
|
|
+ Api.reduceRecordList(this.dataForm).then((res) => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ if (res.data) {
|
|
|
+ if (res.data.list.length == 0) {
|
|
|
+ // 判断获取数据条数若等于0
|
|
|
+ this.dataList = []; // 清空数组
|
|
|
+ this.finished = true; // 停止加载
|
|
|
+ }
|
|
|
+ // 若数据条数不等于0
|
|
|
+ this.dataList.push(...res.data.list); // 将数据放入list中
|
|
|
+ this.loading = false; // 加载状态结束
|
|
|
+
|
|
|
+ // 如果list长度大于等于总数据条数,数据全部加载完成
|
|
|
+ if (this.dataList.length >= res.data.total) {
|
|
|
+ this.finished = true; // 结束加载状态
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 判断获取数据条数若等于0
|
|
|
+ this.dataList = []; // 清空数组
|
|
|
+ this.finished = true; // 停止加载
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.loading = false; // 加载状态结束
|
|
|
+ this.finished = true; // 停止加载
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handelChange() {},
|
|
|
+ handleChangeTabBar(val) {
|
|
|
+ this.money = "";
|
|
|
+ if (val == 1) {
|
|
|
+ this.popupTitle = "预存";
|
|
|
+ }
|
|
|
+ if (val == 2) {
|
|
|
+ this.popupTitle = "补助";
|
|
|
+ }
|
|
|
+ if (val == 3) {
|
|
|
+ this.popupTitle = "退费";
|
|
|
+ }
|
|
|
+ this.showPopup = !this.showPopup;
|
|
|
+ },
|
|
|
onSubmit() {
|
|
|
- this.loading = true;
|
|
|
- setTimeout(() => {
|
|
|
- this.loading = false;
|
|
|
- this.showPopup = false;
|
|
|
- }, 2000);
|
|
|
+ this.$toast.loading({
|
|
|
+ message: "正在缴费...",
|
|
|
+ forbidClick: true,
|
|
|
+ });
|
|
|
+ Api.repairInfoSave(this.dataForm).then((res) => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.$toast.success("缴费成功");
|
|
|
+ } else {
|
|
|
+ this.$toast.fail("缴费失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ backPath() {
|
|
|
+ this.$router.back();
|
|
|
},
|
|
|
- onClickLeft() {},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-.page_check {
|
|
|
+.page_info {
|
|
|
height: 100%;
|
|
|
.search_pannel {
|
|
|
background: #ffffff;
|
|
@@ -368,10 +500,16 @@ export default {
|
|
|
}
|
|
|
.van-dropdown-menu__bar {
|
|
|
--van-gray-4: #999999;
|
|
|
- --van-dropdown-menu-title-font-size: 14px;
|
|
|
+ --van-dropdown-menu-title-font-size: 15px;
|
|
|
--van-dropdown-menu-title-text-color: #0c1935;
|
|
|
--van-dropdown-menu-box-shadow: 0;
|
|
|
}
|
|
|
+ .van-dropdown-item__option {
|
|
|
+ .van-cell__title,
|
|
|
+ .van-cell__value {
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.list_total {
|
|
@@ -379,7 +517,7 @@ export default {
|
|
|
margin: 8px 0;
|
|
|
display: flex;
|
|
|
text-align: left;
|
|
|
- span {
|
|
|
+ .van-col {
|
|
|
height: 16px;
|
|
|
font-size: 12px;
|
|
|
font-weight: 400;
|
|
@@ -393,96 +531,90 @@ export default {
|
|
|
margin: 0 2px;
|
|
|
}
|
|
|
}
|
|
|
- .check_info {
|
|
|
+
|
|
|
+ .info_list {
|
|
|
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;
|
|
|
+ .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;
|
|
|
+ }
|
|
|
+
|
|
|
+ .list_btn {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 15px;
|
|
|
+ right: 12px;
|
|
|
+ .van-button {
|
|
|
+ &:nth-child(2) {
|
|
|
+ margin: 0 12px;
|
|
|
+ }
|
|
|
}
|
|
|
- .header {
|
|
|
- height: 22px;
|
|
|
+ }
|
|
|
+ .collapse_title {
|
|
|
+ .label {
|
|
|
font-size: 16px;
|
|
|
font-weight: 500;
|
|
|
- color: #0c1935;
|
|
|
- line-height: 22px;
|
|
|
- margin-bottom: 8px;
|
|
|
+ color: #666666;
|
|
|
}
|
|
|
- span {
|
|
|
- height: 20px;
|
|
|
- font-size: 14px;
|
|
|
- color: #999999;
|
|
|
- line-height: 20px;
|
|
|
+ }
|
|
|
+ .collapse_info {
|
|
|
+ .info_item {
|
|
|
+ text-align: left;
|
|
|
margin-bottom: 2px;
|
|
|
- &:nth-last-child(1) {
|
|
|
- margin-bottom: 0;
|
|
|
+ .van-col {
|
|
|
+ height: 20px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #9da0ac;
|
|
|
+ line-height: 20px;
|
|
|
}
|
|
|
- }
|
|
|
- .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;
|
|
|
- }
|
|
|
+ &:nth-last-child(1) {
|
|
|
+ margin: 0;
|
|
|
}
|
|
|
}
|
|
|
- .collapse_title {
|
|
|
- span {
|
|
|
- height: 22px;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 500;
|
|
|
- color: #0c1935;
|
|
|
- line-height: 22px;
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .reduce_record {
|
|
|
+ .van-col {
|
|
|
+ height: 18px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #999999;
|
|
|
+ line-height: 18px;
|
|
|
+ margin-bottom: 4px;
|
|
|
+ &:nth-last-child(1) {
|
|
|
+ margin-bottom: 0;
|
|
|
}
|
|
|
- .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;
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ .header {
|
|
|
+ .van-col {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #0c1935;
|
|
|
+ line-height: 22px;
|
|
|
+ margin-bottom: 8px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .reduce_type {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ right: 0;
|
|
|
+ height: 24px;
|
|
|
+ padding: 0 12px;
|
|
|
+ border-radius: 0px 4px 0px 10px;
|
|
|
+ .van-col {
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 16px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|