|  | @@ -15,8 +15,9 @@
 | 
	
		
			
				|  |  |            v-model:active="activeTab"
 | 
	
		
			
				|  |  |            title-active-color="#2E69EB"
 | 
	
		
			
				|  |  |            title-inactive-color="#0C1935"
 | 
	
		
			
				|  |  | +          @change="handleChangeTab"
 | 
	
		
			
				|  |  |          >
 | 
	
		
			
				|  |  | -          <van-tab name="rentBill" title="账单明细">
 | 
	
		
			
				|  |  | +          <van-tab name="bill" title="账单明细">
 | 
	
		
			
				|  |  |              <van-dropdown-menu active-color="#2E69EB">
 | 
	
		
			
				|  |  |                <van-dropdown-item
 | 
	
		
			
				|  |  |                  v-model="dataForm.costCycle"
 | 
	
	
		
			
				|  | @@ -26,35 +27,35 @@
 | 
	
		
			
				|  |  |                />
 | 
	
		
			
				|  |  |                <van-dropdown-item
 | 
	
		
			
				|  |  |                  v-model="dataForm.costType"
 | 
	
		
			
				|  |  | -                @change="handelChange('costType', costType)"
 | 
	
		
			
				|  |  | +                @change="handelChange('costType', dataForm.costType)"
 | 
	
		
			
				|  |  |                  :title="costTypeTitle"
 | 
	
		
			
				|  |  | -                :options="costTypeList"
 | 
	
		
			
				|  |  | +                :options="payTypeList"
 | 
	
		
			
				|  |  |                />
 | 
	
		
			
				|  |  |                <van-dropdown-item
 | 
	
		
			
				|  |  |                  v-model="dataForm.status"
 | 
	
		
			
				|  |  | -                @change="handelChange('status', status)"
 | 
	
		
			
				|  |  | +                @change="handelChange('status', dataForm.status)"
 | 
	
		
			
				|  |  |                  :title="statusTitle"
 | 
	
		
			
				|  |  | -                :options="statusList"
 | 
	
		
			
				|  |  | +                :options="payStatusList"
 | 
	
		
			
				|  |  |                />
 | 
	
		
			
				|  |  |              </van-dropdown-menu>
 | 
	
		
			
				|  |  |            </van-tab>
 | 
	
		
			
				|  |  | -          <van-tab name="reduceRecord" title="扣缴记录">
 | 
	
		
			
				|  |  | +          <van-tab name="record" title="扣缴记录">
 | 
	
		
			
				|  |  |              <van-dropdown-menu active-color="#2E69EB">
 | 
	
		
			
				|  |  |                <van-dropdown-item
 | 
	
		
			
				|  |  |                  v-model="dataForm.reduceDate"
 | 
	
		
			
				|  |  | -                @change="handelChange('reduceDate', reduceDate)"
 | 
	
		
			
				|  |  | +                @change="handelChange('reduceDate', dataForm.reduceDate)"
 | 
	
		
			
				|  |  |                  :title="reduceDateTitle"
 | 
	
		
			
				|  |  |                  :options="reduceDateList"
 | 
	
		
			
				|  |  |                />
 | 
	
		
			
				|  |  |                <van-dropdown-item
 | 
	
		
			
				|  |  |                  v-model="dataForm.type"
 | 
	
		
			
				|  |  | -                @change="handelChange('type', type)"
 | 
	
		
			
				|  |  | +                @change="handelChange('type', dataForm.type)"
 | 
	
		
			
				|  |  |                  :title="typeTitle"
 | 
	
		
			
				|  |  | -                :options="typeList"
 | 
	
		
			
				|  |  | +                :options="payTypeList"
 | 
	
		
			
				|  |  |                />
 | 
	
		
			
				|  |  |                <van-dropdown-item
 | 
	
		
			
				|  |  |                  v-model="dataForm.operator"
 | 
	
		
			
				|  |  | -                @change="handelChange('operator', operator)"
 | 
	
		
			
				|  |  | +                @change="handelChange('operator', dataForm.operator)"
 | 
	
		
			
				|  |  |                  :title="operatorTitle"
 | 
	
		
			
				|  |  |                  :options="operatorList"
 | 
	
		
			
				|  |  |                />
 | 
	
	
		
			
				|  | @@ -67,12 +68,12 @@
 | 
	
		
			
				|  |  |          <v-count-up
 | 
	
		
			
				|  |  |            :end-val="dataList.length"
 | 
	
		
			
				|  |  |            class="count_up"
 | 
	
		
			
				|  |  | -          options="{ separator: ',' }"
 | 
	
		
			
				|  |  | +          :options="{ separator: ',' }"
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  |          <van-col>条记录</van-col>
 | 
	
		
			
				|  |  |        </van-row>
 | 
	
		
			
				|  |  | -      <template v-if="activeTab == 'rentBill'">
 | 
	
		
			
				|  |  | -        <div class="info_list" key="rentBill">
 | 
	
		
			
				|  |  | +      <template v-if="activeTab == 'bill'">
 | 
	
		
			
				|  |  | +        <div class="info_list" key="bill">
 | 
	
		
			
				|  |  |            <van-list
 | 
	
		
			
				|  |  |              v-model:loading="loading"
 | 
	
		
			
				|  |  |              :finished="finished"
 | 
	
	
		
			
				|  | @@ -81,72 +82,88 @@
 | 
	
		
			
				|  |  |              finished-text="没有更多了"
 | 
	
		
			
				|  |  |              @load="onLoad"
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  | -            <div
 | 
	
		
			
				|  |  | -              v-for="(item, index) in dataList"
 | 
	
		
			
				|  |  | -              :key="item.id"
 | 
	
		
			
				|  |  | -              class="list_item"
 | 
	
		
			
				|  |  | +            <van-checkbox-group
 | 
	
		
			
				|  |  | +              ref="checkboxGroup"
 | 
	
		
			
				|  |  | +              v-model="checkedCollapse"
 | 
	
		
			
				|  |  | +              style="width: 100%"
 | 
	
		
			
				|  |  |              >
 | 
	
		
			
				|  |  | -              <van-collapse
 | 
	
		
			
				|  |  | -                v-model="activeCollapse"
 | 
	
		
			
				|  |  | -                :border="false"
 | 
	
		
			
				|  |  | -                style="width: 100%"
 | 
	
		
			
				|  |  | -                accordion
 | 
	
		
			
				|  |  | +              <div
 | 
	
		
			
				|  |  | +                v-for="item in dataList"
 | 
	
		
			
				|  |  | +                :key="item.id"
 | 
	
		
			
				|  |  | +                class="list_item"
 | 
	
		
			
				|  |  | +                style="flex-direction: row; align-items: baseline"
 | 
	
		
			
				|  |  |                >
 | 
	
		
			
				|  |  | -                <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-checkbox
 | 
	
		
			
				|  |  | +                  :name="item.id"
 | 
	
		
			
				|  |  | +                  :disabled="item.status == 1"
 | 
	
		
			
				|  |  | +                  style="margin-left: 16px"
 | 
	
		
			
				|  |  | +                ></van-checkbox>
 | 
	
		
			
				|  |  | +                <van-collapse
 | 
	
		
			
				|  |  | +                  v-model="activeCollapse"
 | 
	
		
			
				|  |  | +                  :border="false"
 | 
	
		
			
				|  |  | +                  style="flex: 1"
 | 
	
		
			
				|  |  | +                  accordion
 | 
	
		
			
				|  |  | +                >
 | 
	
		
			
				|  |  | +                  <van-collapse-item :name="item.id">
 | 
	
		
			
				|  |  | +                    <template #title>
 | 
	
		
			
				|  |  | +                      <van-row class="collapse_title">
 | 
	
		
			
				|  |  | +                        <van-col class="label"
 | 
	
		
			
				|  |  | +                          >{{
 | 
	
		
			
				|  |  | +                            `${
 | 
	
		
			
				|  |  | +                              dict_filter(item.costType, "payTypeList")[
 | 
	
		
			
				|  |  | +                                "dictLabel"
 | 
	
		
			
				|  |  | +                              ]
 | 
	
		
			
				|  |  | +                            }`
 | 
	
		
			
				|  |  | +                          }}:</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">
 | 
	
		
			
				|  |  |                        <van-row
 | 
	
		
			
				|  |  |                          class="info_item"
 | 
	
		
			
				|  |  | -                        v-for="ele in billLists"
 | 
	
		
			
				|  |  | +                        v-for="ele in item.billLists"
 | 
	
		
			
				|  |  |                          :key="ele.id"
 | 
	
		
			
				|  |  |                        >
 | 
	
		
			
				|  |  | -                        <van-col
 | 
	
		
			
				|  |  | -                          >{{ ele.deviceName }}费用:¥{{ ele.amount }}</van-col
 | 
	
		
			
				|  |  | +                        <template
 | 
	
		
			
				|  |  | +                          v-if="
 | 
	
		
			
				|  |  | +                            item.costType == 'Water' || item.costType == 'Elec'
 | 
	
		
			
				|  |  | +                          "
 | 
	
		
			
				|  |  |                          >
 | 
	
		
			
				|  |  | -                      </van-row>
 | 
	
		
			
				|  |  | -                    </template>
 | 
	
		
			
				|  |  | -                    <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
 | 
	
		
			
				|  |  | +                            >{{ ele.equipName }}费用:¥{{
 | 
	
		
			
				|  |  | +                              (parseInt(ele.amount * 100) / 100).toFixed(2)
 | 
	
		
			
				|  |  | +                            }}</van-col
 | 
	
		
			
				|  |  |                            >
 | 
	
		
			
				|  |  | -                        </van-row>
 | 
	
		
			
				|  |  | -                      </div>
 | 
	
		
			
				|  |  | -                    </template>
 | 
	
		
			
				|  |  | -                  </div>
 | 
	
		
			
				|  |  | -                </van-collapse-item>
 | 
	
		
			
				|  |  | -              </van-collapse>
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | +                        </template>
 | 
	
		
			
				|  |  | +                        <template v-if="item.costType == 'PropertyFee'">
 | 
	
		
			
				|  |  | +                          <van-col
 | 
	
		
			
				|  |  | +                            >{{
 | 
	
		
			
				|  |  | +                              `${
 | 
	
		
			
				|  |  | +                                dict_filter(ele.costType, "propertyTypeList")[
 | 
	
		
			
				|  |  | +                                  "dictLabel"
 | 
	
		
			
				|  |  | +                                ]
 | 
	
		
			
				|  |  | +                              }`
 | 
	
		
			
				|  |  | +                            }}:¥{{
 | 
	
		
			
				|  |  | +                              (parseInt(ele.amount * 100) / 100).toFixed(2)
 | 
	
		
			
				|  |  | +                            }}</van-col
 | 
	
		
			
				|  |  | +                          >
 | 
	
		
			
				|  |  | +                        </template>
 | 
	
		
			
				|  |  | +                      </van-row>
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  | +                  </van-collapse-item>
 | 
	
		
			
				|  |  | +                </van-collapse>
 | 
	
		
			
				|  |  | +              </div>
 | 
	
		
			
				|  |  | +            </van-checkbox-group>
 | 
	
		
			
				|  |  |            </van-list>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |        </template>
 | 
	
		
			
				|  |  | -      <template v-if="activeTab == 'reduceRecord'">
 | 
	
		
			
				|  |  | -        <div class="info_list" key="reduceRecord">
 | 
	
		
			
				|  |  | +      <template v-if="activeTab == 'record'">
 | 
	
		
			
				|  |  | +        <div class="info_list" key="record">
 | 
	
		
			
				|  |  |            <van-list
 | 
	
		
			
				|  |  |              v-model:loading="loading"
 | 
	
		
			
				|  |  |              :finished="finished"
 | 
	
	
		
			
				|  | @@ -166,12 +183,12 @@
 | 
	
		
			
				|  |  |                  class="reduce_type"
 | 
	
		
			
				|  |  |                  :style="{
 | 
	
		
			
				|  |  |                    'background-color': `${
 | 
	
		
			
				|  |  | -                    reduceType_filter(item.type)['color']
 | 
	
		
			
				|  |  | +                    dict_filter(item.type, 'payTypeList')['color']
 | 
	
		
			
				|  |  |                    }`,
 | 
	
		
			
				|  |  |                  }"
 | 
	
		
			
				|  |  |                >
 | 
	
		
			
				|  |  |                  <van-col>{{
 | 
	
		
			
				|  |  | -                  `${reduceType_filter(item.type)["label"]}`
 | 
	
		
			
				|  |  | +                  `${dict_filter(item.type, "payTypeList")["dictLabel"]}`
 | 
	
		
			
				|  |  |                  }}</van-col>
 | 
	
		
			
				|  |  |                </van-row>
 | 
	
		
			
				|  |  |                <van-row class="header">
 | 
	
	
		
			
				|  | @@ -208,65 +225,77 @@
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </van-pull-refresh>
 | 
	
		
			
				|  |  |    <template v-if="role == 'admin'">
 | 
	
		
			
				|  |  | -    <van-tabbar
 | 
	
		
			
				|  |  | -      v-model="activeTabBar"
 | 
	
		
			
				|  |  | -      :safe-area-inset-bottom="true"
 | 
	
		
			
				|  |  | -      class="tab_bar"
 | 
	
		
			
				|  |  | -    >
 | 
	
		
			
				|  |  | +    <van-tabbar v-model="activeTabBar" 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>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +  <template v-if="role == 'Tenant' && activeTab == 'record'">
 | 
	
		
			
				|  |  | +    <van-submit-bar class="save_btn">
 | 
	
		
			
				|  |  | +      <template #button>
 | 
	
		
			
				|  |  | +        <van-button block type="primary" @click="handleClick('fee')">
 | 
	
		
			
				|  |  | +          预存充值
 | 
	
		
			
				|  |  | +        </van-button>
 | 
	
		
			
				|  |  | +      </template>
 | 
	
		
			
				|  |  | +    </van-submit-bar>
 | 
	
		
			
				|  |  | +  </template>
 | 
	
		
			
				|  |  | +  <template
 | 
	
		
			
				|  |  | +    v-if="role == 'Tenant' && activeTab == 'bill' && checkedCollapse.length"
 | 
	
		
			
				|  |  | +  >
 | 
	
		
			
				|  |  | +    <van-submit-bar
 | 
	
		
			
				|  |  | +      :price="parseInt(amount * 100)"
 | 
	
		
			
				|  |  | +      button-text="立即支付"
 | 
	
		
			
				|  |  | +      button-color="#2E69EB"
 | 
	
		
			
				|  |  | +      @submit="handleClick('bill')"
 | 
	
		
			
				|  |  | +    >
 | 
	
		
			
				|  |  | +      <van-checkbox v-model="checkedAll" :disabled="disabledAll"
 | 
	
		
			
				|  |  | +        >全选</van-checkbox
 | 
	
		
			
				|  |  | +      >
 | 
	
		
			
				|  |  | +    </van-submit-bar>
 | 
	
		
			
				|  |  | +  </template>
 | 
	
		
			
				|  |  |    <van-popup
 | 
	
		
			
				|  |  | -    v-model:show="showPopup"
 | 
	
		
			
				|  |  | +    v-model:show="showPayPopup"
 | 
	
		
			
				|  |  |      position="bottom"
 | 
	
		
			
				|  |  | -    :style="{ height: '30%' }"
 | 
	
		
			
				|  |  | +    :safe-area-inset-bottom="true"
 | 
	
		
			
				|  |  | +    :overlay-style="{ background: 'unset' }"
 | 
	
		
			
				|  |  |      class="popup_info"
 | 
	
		
			
				|  |  |    >
 | 
	
		
			
				|  |  | -    <van-row class="popup_title">
 | 
	
		
			
				|  |  | -      <van-col :span="24">{{ popupTitle }}</van-col>
 | 
	
		
			
				|  |  | -    </van-row>
 | 
	
		
			
				|  |  | -    <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>
 | 
	
		
			
				|  |  | +    <component
 | 
	
		
			
				|  |  | +      :is="currComponent"
 | 
	
		
			
				|  |  | +      :pay-info="payInfo"
 | 
	
		
			
				|  |  | +      @close="close"
 | 
	
		
			
				|  |  | +      v-if="showPayPopup"
 | 
	
		
			
				|  |  | +    ></component>
 | 
	
		
			
				|  |  |    </van-popup>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import Api from "../utils/api";
 | 
	
		
			
				|  |  | -import { isEmpty } from "@/utils/index.js";
 | 
	
		
			
				|  |  | -import VCountUp from "./CountUp";
 | 
	
		
			
				|  |  | +import Api from "@/utils/api";
 | 
	
		
			
				|  |  | +import { isEmpty, getDictDataList } from "@/utils/index";
 | 
	
		
			
				|  |  | +import VCountUp from "../CountUp";
 | 
	
		
			
				|  |  | +import payFee from "./fee.vue";
 | 
	
		
			
				|  |  | +import payBill from "./pay.vue";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    components: {
 | 
	
		
			
				|  |  |      "v-count-up": VCountUp,
 | 
	
		
			
				|  |  | +    "pay-fee": payFee,
 | 
	
		
			
				|  |  | +    "pay-bill": payBill,
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | +      showPayPopup: false,
 | 
	
		
			
				|  |  | +      payInfo: {},
 | 
	
		
			
				|  |  | +      currComponent: "",
 | 
	
		
			
				|  |  |        role: "",
 | 
	
		
			
				|  |  |        title: "",
 | 
	
		
			
				|  |  | +      disabledAll: false,
 | 
	
		
			
				|  |  |        showPopup: false,
 | 
	
		
			
				|  |  |        popupTitle: "",
 | 
	
		
			
				|  |  | -      money: "",
 | 
	
		
			
				|  |  | -      activeTab: "rentBill",
 | 
	
		
			
				|  |  | +      flag: false,
 | 
	
		
			
				|  |  | +      checkedAll: false,
 | 
	
		
			
				|  |  | +      checkedCollapse: [],
 | 
	
		
			
				|  |  | +      amount: 0,
 | 
	
		
			
				|  |  | +      activeTab: "",
 | 
	
		
			
				|  |  |        activeTabBar: 0,
 | 
	
		
			
				|  |  |        activeCollapse: "",
 | 
	
		
			
				|  |  |        costCycleTitle: "计费周期",
 | 
	
	
		
			
				|  | @@ -276,26 +305,11 @@ export default {
 | 
	
		
			
				|  |  |        typeTitle: "扣缴类型",
 | 
	
		
			
				|  |  |        operatorTitle: "操作人",
 | 
	
		
			
				|  |  |        costCycleList: [],
 | 
	
		
			
				|  |  | -      costTypeList: [
 | 
	
		
			
				|  |  | -        { text: "电费", value: "Elec" },
 | 
	
		
			
				|  |  | -        { text: "水费", value: "Water" },
 | 
	
		
			
				|  |  | -        { text: "物业费", value: "PropertyFee" },
 | 
	
		
			
				|  |  | -      ],
 | 
	
		
			
				|  |  | -      statusList: [
 | 
	
		
			
				|  |  | -        { text: "已支付", value: 1 },
 | 
	
		
			
				|  |  | -        { text: "待支付", value: 2 },
 | 
	
		
			
				|  |  | -        { text: "支付失败", value: 3 },
 | 
	
		
			
				|  |  | -      ],
 | 
	
		
			
				|  |  | +      payStatusList: [],
 | 
	
		
			
				|  |  |        reduceDateList: [],
 | 
	
		
			
				|  |  | -      typeList: [
 | 
	
		
			
				|  |  | -        { text: "预存", value: "PreStorage" },
 | 
	
		
			
				|  |  | -        { text: "补助", value: "Subsidy" },
 | 
	
		
			
				|  |  | -        { text: "退费", value: "Refund" },
 | 
	
		
			
				|  |  | -        { text: "核缴(水)", value: 4 },
 | 
	
		
			
				|  |  | -        { text: "核缴(电)", value: 5 },
 | 
	
		
			
				|  |  | -        { text: "核缴(物业)", value: 6 },
 | 
	
		
			
				|  |  | -      ],
 | 
	
		
			
				|  |  | +      payTypeList: [],
 | 
	
		
			
				|  |  |        operatorList: [],
 | 
	
		
			
				|  |  | +      propertyList: [],
 | 
	
		
			
				|  |  |        dataForm: {
 | 
	
		
			
				|  |  |          tenantId: "",
 | 
	
		
			
				|  |  |          costCycle: "2022-08",
 | 
	
	
		
			
				|  | @@ -308,16 +322,40 @@ export default {
 | 
	
		
			
				|  |  |          limit: 10,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        dataList: [],
 | 
	
		
			
				|  |  | -      billDetailList: [],
 | 
	
		
			
				|  |  |        loading: false,
 | 
	
		
			
				|  |  |        refreshing: false,
 | 
	
		
			
				|  |  |        finished: false,
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    watch: {
 | 
	
		
			
				|  |  | -    activeTab: {
 | 
	
		
			
				|  |  | +    checkedCollapse: {
 | 
	
		
			
				|  |  |        handler(newval, oldval) {
 | 
	
		
			
				|  |  | -        this.onRefresh();
 | 
	
		
			
				|  |  | +        if (newval.length == this.dataList.length) {
 | 
	
		
			
				|  |  | +          if (this.dataList.length) {
 | 
	
		
			
				|  |  | +            this.checkedAll = true;
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          this.checkedAll = false;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        this.amount = 0;
 | 
	
		
			
				|  |  | +        this.checkedCollapse.forEach((item) => {
 | 
	
		
			
				|  |  | +          this.amount += this.dataList.find((ele) => ele.id == item).amount;
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      deep: true,
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    checkedAll: {
 | 
	
		
			
				|  |  | +      handler(newval, oldval) {
 | 
	
		
			
				|  |  | +        if (newval) {
 | 
	
		
			
				|  |  | +          this.checkedCollapse = [];
 | 
	
		
			
				|  |  | +          this.dataList.forEach((item) => {
 | 
	
		
			
				|  |  | +            this.checkedCollapse.push(item.id);
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          if (this.checkedCollapse.length == this.dataList.length) {
 | 
	
		
			
				|  |  | +            this.checkedCollapse = [];
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        deep: true,
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -326,50 +364,57 @@ export default {
 | 
	
		
			
				|  |  |      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.dataForm.costCycle =
 | 
	
		
			
				|  |  | +      this.$route.query.costCycle || this.dataForm.costCycle;
 | 
	
		
			
				|  |  |      this.activeTab = this.$route.query.activeTab;
 | 
	
		
			
				|  |  | +    this.getPayStatusList();
 | 
	
		
			
				|  |  | +    this.getPayTypeList();
 | 
	
		
			
				|  |  | +    this.getPropertyTypeList();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | -    reduceType_filter(val) {
 | 
	
		
			
				|  |  | -      if (isEmpty(val)) {
 | 
	
		
			
				|  |  | -        return {};
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (val == "PreStorage") {
 | 
	
		
			
				|  |  | -        return { label: "预存", color: "#30D3A2" };
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (val == "Subsidy") {
 | 
	
		
			
				|  |  | -        return { label: "补助", color: "#09C700" };
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (val == "Refund") {
 | 
	
		
			
				|  |  | -        return { label: "退费", color: "#FA5555" };
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (val == 4) {
 | 
	
		
			
				|  |  | -        return { label: "核缴(水)", color: "#FF9C27" };
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (val == 5) {
 | 
	
		
			
				|  |  | -        return { label: "核缴(电)", color: "#FF9C27" };
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (val == 6) {
 | 
	
		
			
				|  |  | -        return { label: "核缴(物业)", color: "#FF9C27" };
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (val == "CancelSubsidy") {
 | 
	
		
			
				|  |  | -        return { label: "撤销补助", color: "#FF9C27" };
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      CancelSubsidy;
 | 
	
		
			
				|  |  | +    getPayStatusList() {
 | 
	
		
			
				|  |  | +      this.payStatusList = getDictDataList("PayStatus");
 | 
	
		
			
				|  |  | +      this.payStatusList.forEach((item) => {
 | 
	
		
			
				|  |  | +        item.text = item.dictLabel;
 | 
	
		
			
				|  |  | +        item.value = item.dictValue;
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    costType_filter(val) {
 | 
	
		
			
				|  |  | +    getPayTypeList() {
 | 
	
		
			
				|  |  | +      this.payTypeList = getDictDataList("PayType");
 | 
	
		
			
				|  |  | +      this.payTypeList.forEach((item) => {
 | 
	
		
			
				|  |  | +        item.text = item.dictLabel;
 | 
	
		
			
				|  |  | +        item.value = item.dictValue;
 | 
	
		
			
				|  |  | +        if (item.value == "PreStorage") {
 | 
	
		
			
				|  |  | +          item.color = "#30D3A2";
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (item.value == "Subsidy") {
 | 
	
		
			
				|  |  | +          item.color = "#09C700";
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (item.value == "Refund") {
 | 
	
		
			
				|  |  | +          item.color = "#FA5555";
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (item.value == "Water") {
 | 
	
		
			
				|  |  | +          item.color = "#FF9C27";
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (item.value == "Elec") {
 | 
	
		
			
				|  |  | +          item.color = "#FF9C27";
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (item.value == "PropertyFee") {
 | 
	
		
			
				|  |  | +          item.color = "#FF9C27";
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (item.value == "CancelSubsidy") {
 | 
	
		
			
				|  |  | +          item.color = "#ED3A25";
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    getPropertyTypeList() {
 | 
	
		
			
				|  |  | +      this.propertyTypeList = getDictDataList("PropertyType");
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    dict_filter(val, list) {
 | 
	
		
			
				|  |  |        if (isEmpty(val)) {
 | 
	
		
			
				|  |  |          return "";
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      if (val == "Elec") {
 | 
	
		
			
				|  |  | -        return "电费";
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (val == "Water") {
 | 
	
		
			
				|  |  | -        return "水费";
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (val == "PropertyFee") {
 | 
	
		
			
				|  |  | -        return "物业费";
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +      return this[list].find((item) => item.dictValue == val);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onLoad() {
 | 
	
		
			
				|  |  |        setTimeout(async () => {
 | 
	
	
		
			
				|  | @@ -383,20 +428,24 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onRefresh() {
 | 
	
		
			
				|  |  |        // 清空列表数据
 | 
	
		
			
				|  |  | +      this.checkedAll = false;
 | 
	
		
			
				|  |  | +      this.checkedCollapse = [];
 | 
	
		
			
				|  |  | +      this.activeCollapse = "";
 | 
	
		
			
				|  |  | +      this.amount = 0;
 | 
	
		
			
				|  |  |        this.finished = false;
 | 
	
		
			
				|  |  | +      this.dataList = [];
 | 
	
		
			
				|  |  |        // 重新加载数据
 | 
	
		
			
				|  |  |        // 将 loading 设置为 true,表示处于加载状态
 | 
	
		
			
				|  |  |        this.loading = true;
 | 
	
		
			
				|  |  |        this.dataForm.page = 1; // 分页数赋值为1
 | 
	
		
			
				|  |  | -      this.dataList = [];
 | 
	
		
			
				|  |  |        this.onLoad();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 获取列表数据方法
 | 
	
		
			
				|  |  |      getDataList() {
 | 
	
		
			
				|  |  | -      if (this.activeTab == "rentBill") {
 | 
	
		
			
				|  |  | +      if (this.activeTab == "bill") {
 | 
	
		
			
				|  |  |          this.getRentBillList();
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      if (this.activeTab == "reduceRecord") {
 | 
	
		
			
				|  |  | +      if (this.activeTab == "record") {
 | 
	
		
			
				|  |  |          this.getReduceRecordList();
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -409,10 +458,13 @@ export default {
 | 
	
		
			
				|  |  |                this.dataList = []; // 清空数组
 | 
	
		
			
				|  |  |                this.finished = true; // 停止加载
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            res.data.forEach((item, index) => {
 | 
	
		
			
				|  |  | +              item.id = "index_" + index;
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  |              // 若数据条数不等于0
 | 
	
		
			
				|  |  |              this.dataList.push(...res.data); // 将数据放入list中
 | 
	
		
			
				|  |  |              this.loading = false; // 加载状态结束
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +            this.disabledAll = this.dataList.every((item) => item.status == 1);
 | 
	
		
			
				|  |  |              // 如果list长度大于等于总数据条数,数据全部加载完成
 | 
	
		
			
				|  |  |              if (this.dataList.length >= res.data.length) {
 | 
	
		
			
				|  |  |                this.finished = true; // 结束加载状态
 | 
	
	
		
			
				|  | @@ -456,32 +508,83 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    handelChange() {},
 | 
	
		
			
				|  |  | +    handelChange(type, val) {
 | 
	
		
			
				|  |  | +      if (type == "costType") {
 | 
	
		
			
				|  |  | +        // 这里打印出来的值就是我们想要的text
 | 
	
		
			
				|  |  | +        this.costTypeTitle = this.payTypeList.filter(
 | 
	
		
			
				|  |  | +          (item) => item.value === val
 | 
	
		
			
				|  |  | +        )[0].text;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (type == "type") {
 | 
	
		
			
				|  |  | +        // 这里打印出来的值就是我们想要的text
 | 
	
		
			
				|  |  | +        this.typeTitle = this.payTypeList.filter(
 | 
	
		
			
				|  |  | +          (item) => item.value === val
 | 
	
		
			
				|  |  | +        )[0].text;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (type == "status") {
 | 
	
		
			
				|  |  | +        // 这里打印出来的值就是我们想要的text
 | 
	
		
			
				|  |  | +        this.typeTitle = this.payStatusList.filter(
 | 
	
		
			
				|  |  | +          (item) => item.value === val
 | 
	
		
			
				|  |  | +        )[0].text;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.onRefresh();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    handleChangeTab() {
 | 
	
		
			
				|  |  | +      this.onRefresh();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      handleChangeTabBar(val) {
 | 
	
		
			
				|  |  | -      this.money = "";
 | 
	
		
			
				|  |  | +      let popupTitle = "";
 | 
	
		
			
				|  |  | +      let payType = "";
 | 
	
		
			
				|  |  |        if (val == 1) {
 | 
	
		
			
				|  |  | -        this.popupTitle = "预存";
 | 
	
		
			
				|  |  | +        popupTitle = "预存";
 | 
	
		
			
				|  |  | +        payType = "PreStorage";
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        if (val == 2) {
 | 
	
		
			
				|  |  | -        this.popupTitle = "补助";
 | 
	
		
			
				|  |  | +        popupTitle = "补助";
 | 
	
		
			
				|  |  | +        payType = "Subsidy";
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        if (val == 3) {
 | 
	
		
			
				|  |  | -        this.popupTitle = "退费";
 | 
	
		
			
				|  |  | +        popupTitle = "退费";
 | 
	
		
			
				|  |  | +        payType = "Refund";
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      this.showPopup = !this.showPopup;
 | 
	
		
			
				|  |  | +      this.currComponent = "pay-fee";
 | 
	
		
			
				|  |  | +      this.payInfo = {
 | 
	
		
			
				|  |  | +        payType: payType,
 | 
	
		
			
				|  |  | +        tenantId: this.dataForm.tenantId,
 | 
	
		
			
				|  |  | +        popupTitle: popupTitle,
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      this.showPayPopup = true;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onSubmit() {
 | 
	
		
			
				|  |  | -      this.$toast.loading({
 | 
	
		
			
				|  |  | -        message: "正在缴费...",
 | 
	
		
			
				|  |  | -        forbidClick: true,
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | -      Api.repairInfoSave(this.dataForm).then((res) => {
 | 
	
		
			
				|  |  | -        if (res.code == 0) {
 | 
	
		
			
				|  |  | -          this.$toast.success("缴费成功");
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -          this.$toast.fail("缴费失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +    handleClick(type) {
 | 
	
		
			
				|  |  | +      if (type == "fee") {
 | 
	
		
			
				|  |  | +        this.currComponent = "pay-fee";
 | 
	
		
			
				|  |  | +        this.payInfo = {
 | 
	
		
			
				|  |  | +          payType: "PreStorage",
 | 
	
		
			
				|  |  | +          tenantId: this.dataForm.tenantId,
 | 
	
		
			
				|  |  | +          popupTitle: "预存",
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (type == "bill") {
 | 
	
		
			
				|  |  | +        let billIds = [];
 | 
	
		
			
				|  |  | +        this.checkedCollapse.forEach((item) => {
 | 
	
		
			
				|  |  | +          let tempBillList = [];
 | 
	
		
			
				|  |  | +          tempBillList = this.dataList.find((ele) => ele.id == item).billLists;
 | 
	
		
			
				|  |  | +          tempBillList.forEach((bill) => {
 | 
	
		
			
				|  |  | +            billIds.push(bill.id);
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +        this.currComponent = "pay-bill";
 | 
	
		
			
				|  |  | +        this.payInfo = {
 | 
	
		
			
				|  |  | +          tenantId: this.dataForm.tenantId,
 | 
	
		
			
				|  |  | +          amount: this.amount,
 | 
	
		
			
				|  |  | +          billIds: billIds,
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.showPayPopup = true;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    close() {
 | 
	
		
			
				|  |  | +      this.payInfo = {};
 | 
	
		
			
				|  |  | +      this.showPayPopup = false;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      backPath() {
 | 
	
		
			
				|  |  |        this.$router.back();
 | 
	
	
		
			
				|  | @@ -531,7 +634,6 @@ export default {
 | 
	
		
			
				|  |  |        margin: 0 2px;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |    .info_list {
 | 
	
		
			
				|  |  |      padding: 0 16px;
 | 
	
		
			
				|  |  |      .list_item {
 | 
	
	
		
			
				|  | @@ -580,6 +682,14 @@ export default {
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +      /deep/ {
 | 
	
		
			
				|  |  | +        .van-cell:after {
 | 
	
		
			
				|  |  | +          border-bottom: 0;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        .van-collapse-item__content {
 | 
	
		
			
				|  |  | +          padding: 0 16px;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      .reduce_record {
 | 
	
		
			
				|  |  |        .van-col {
 | 
	
	
		
			
				|  | @@ -629,22 +739,8 @@ export default {
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  .popup_info {
 | 
	
		
			
				|  |  | +  height: auto;
 | 
	
		
			
				|  |  |    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>
 |