소스 검색

财务端报表整理

wangqifan 5 년 전
부모
커밋
855a31e689

+ 23 - 0
src/main/java/com/izouma/zhumj/domain/sale/BillReceipt.java

@@ -1,5 +1,7 @@
 package com.izouma.zhumj.domain.sale;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.izouma.zhumj.domain.BaseEntity;
 import com.izouma.zhumj.enums.ReceiptStatus;
 import com.izouma.zhumj.enums.ReceiptType;
@@ -29,39 +31,60 @@ import java.time.LocalDate;
 @ApiModel("发票申请")
 public class BillReceipt extends BaseEntity {
     @ApiModelProperty(value = "周期id")
+    @ExcelProperty("周期id")
+    @ExcelIgnore
     private Long          billId;
     @ApiModelProperty(value = "合同编号")
+    @ExcelProperty("合同编号")
     private String        contractNumber;
     @ApiModelProperty(value = "公司名称")
+    @ExcelProperty(value = "公司名称")
     private String        customerName;
     @ApiModelProperty(value = "收款类型")
+    @ExcelProperty(value = "公司名称")
     @Enumerated(EnumType.STRING)
+    @ExcelIgnore
     private ReceiptType   billType;
     @ApiModelProperty(value = "周期名")
+    @ExcelProperty(value = "周期名")
     private Integer       idx;
     @ApiModelProperty(value = "申请时间")
+    @ExcelProperty(value = "申请时间")
     private LocalDate     dueTime;
     @ApiModelProperty(value = "开票金额")
+    @ExcelProperty(value = "开票金额")
     private BigDecimal    amount;
     @ApiModelProperty(value = "销售员")
+    @ExcelProperty(value = "销售员")
     private String        saleName;
     @ApiModelProperty(value = "发票号码")
+    @ExcelProperty(value = "发票号码")
     private String        billNumber;
     @ApiModelProperty(value = "周期")
+    @ExcelProperty(value = "周期")
     private String        cycleRange;
     @ApiModelProperty(value = "回复发票号")
+    @ExcelProperty(value = "回复发票号")
     private String        returnNumber;
     @ApiModelProperty(value = "备注")
+    @ExcelProperty(value = "备注")
     private String        remark;
     @ApiModelProperty(value = "开票状态")
+    @ExcelProperty(value = "开票状态")
+    @ExcelIgnore
     @Enumerated(EnumType.STRING)
     private ReceiptStatus status;
     @ApiModelProperty(value = "是否个人")
+    @ExcelProperty(value = "是否个人")
+    @ExcelIgnore
     private boolean       personal = false;
     @ApiModelProperty(value = "发票抬头")
+    @ExcelProperty(value = "发票抬头")
     private String        title;
     @ApiModelProperty(value = "发票识别号")
+    @ExcelProperty(value = "发票识别号")
     private String        mark;
     @ApiModelProperty(value = "注册电话")
+    @ExcelProperty(value = "注册电话")
     private String        phone;
 }

+ 4 - 1
src/main/java/com/izouma/zhumj/dto/report/RechargeRecordReportDTO.java

@@ -28,7 +28,7 @@ import java.time.LocalDateTime;
 @Builder
 @ApiModel(value = "微信充值明细报表", description = "微信充值明细报表")
 public class RechargeRecordReportDTO implements Serializable {
-    private Long id;
+    private Long         id;
     @Enumerated(EnumType.STRING)
     @ApiModelProperty(value = "类型", name = "type")
     private RechargeType type;
@@ -39,6 +39,9 @@ public class RechargeRecordReportDTO implements Serializable {
     @ApiModelProperty(value = "房间ID", name = "roomId")
     private Long roomId;
 
+    @ApiModelProperty(value = "房间ID", name = "roomId")
+    private String storeName;
+
     @Column(nullable = false, length = 20)
     @ApiModelProperty(value = "住客", name = "idNo")
     private String idNo;

+ 2 - 0
src/main/java/com/izouma/zhumj/repo/CheckinInfoRepo.java

@@ -115,6 +115,8 @@ public interface CheckinInfoRepo extends JpaRepository<CheckinInfo, Long>, JpaSp
 
     List<CheckinInfo> findByOrderIdAndCheckoutIsFalse(Long orderId);
 
+    List<CheckinInfo> findAllByCheckoutTimeBetweenAndStoreId(LocalDateTime start, LocalDateTime end, Long storeId);
+
     List<CheckinInfo> findByStoreIdAndTeamName(Long storeId, String teamName);
 
     List<CheckinInfo> findAllByStoreIdAndBedIdInAndCheckoutIsFalse(Long storeId, Set<Long> bedIdSet);

+ 3 - 0
src/main/java/com/izouma/zhumj/repo/StoreInfoRepo.java

@@ -1,6 +1,7 @@
 package com.izouma.zhumj.repo;
 
 import com.izouma.zhumj.domain.StoreInfo;
+import com.izouma.zhumj.enums.StoreStatus;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Modifying;
@@ -18,4 +19,6 @@ public interface StoreInfoRepo extends JpaRepository<StoreInfo, Long>, JpaSpecif
     StoreInfo findFirstByStoreName(String storeName);
 
     List<StoreInfo> findAllByCity(String city);
+
+    List<StoreInfo> findAllByStoreStatus(StoreStatus storeStatus);
 }

+ 2 - 0
src/main/java/com/izouma/zhumj/repo/sale/ContractStoreRepo.java

@@ -42,4 +42,6 @@ public interface ContractStoreRepo extends JpaRepository<ContractStore, Long>, J
     void deleteByContractId(Long contractId);
 
     List<ContractStore> findByStoreId(Long storeId);
+
+    List<ContractStore> findAllByStoreIdNotIn(List<Long> storeIds);
 }

+ 1 - 1
src/main/java/com/izouma/zhumj/service/BusinessIndicatorService.java

@@ -146,7 +146,7 @@ public class BusinessIndicatorService {
                     .completedOther(completedOther)
                     .other(other)
                     .otherPercent(otherString)
-                    .owner(businessIndicator.getBusinessOwner())
+                    .owner(storeInfo.getPrincipal())
                     .ratePercent(rateString)
                     .percent(rateResult)
                     .storeNumber(storeInfo.getShortCode())

+ 4 - 4
src/main/java/com/izouma/zhumj/service/CustomerAccountService.java

@@ -92,10 +92,10 @@ public class CustomerAccountService {
             StringBuilder billStr = new StringBuilder();
             contractBills.forEach(contractBill -> {
                 billStr.append(contractBill.getContractNumber())
-                        .append("-周期")
-                        .append(contractBill.getIdx()).append(contractBill.getStartTime()).append("-")
-                        .append(contractBill.getEndTime())
-                        .append(";");
+                        .append("-周期(")
+                        .append(contractBill.getIdx()).append(contractBill.getStartTime().toLocalDate()).append("-")
+                        .append(contractBill.getEndTime().toLocalDate())
+                        .append(");");
                 if (contractBill.getContractId() != null) {
                     List<ContractStore> contractStores = Objects
                             .requireNonNull(contractRepo.findById(contractBill.getContractId())

+ 32 - 13
src/main/java/com/izouma/zhumj/service/FinancialService.java

@@ -19,7 +19,9 @@ import com.izouma.zhumj.repo.*;
 import com.izouma.zhumj.repo.client.DepositRefundApplyRepo;
 import com.izouma.zhumj.repo.sale.ContractBillRepo;
 import com.izouma.zhumj.repo.sale.ContractRepo;
+import com.izouma.zhumj.repo.sale.CustomerRepo;
 import com.izouma.zhumj.security.Authority;
+import com.izouma.zhumj.service.sale.CustomerService;
 import com.izouma.zhumj.service.sale.SaleTargetService;
 import com.izouma.zhumj.utils.SecurityUtils;
 import lombok.AllArgsConstructor;
@@ -31,10 +33,12 @@ import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 
+import javax.persistence.criteria.Predicate;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.LocalTime;
 import java.time.temporal.ChronoUnit;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -60,6 +64,7 @@ public class FinancialService {
     private DepositRefundApplyRepo depositRefundApplyRepo;
     private RechargeRecordService  rechargeRecordService;
     private ExtraFeeRepo           extraFeeRepo;
+    private CustomerRepo           customerRepo;
 
     public Page<BillReview> billReview(BillStatus billStatus, Pageable pageable) {
         Page<ContractBill> page = contractBillRepo.findByStatus(billStatus, pageable);
@@ -193,18 +198,30 @@ public class FinancialService {
         return realTimeFees;
     }
 
-    public Page<ContractDeposit> contractDeposit(Pageable pageable) {
-        if (SecurityUtils.getAuthenticatedUser()
-                .getAuthorities()
-                .contains(Authority.getInstance(Authority.NAME.ROLE_SALE))) {
-            Page<Contract> page = contractRepo.findAll((Specification<Contract>) (root, criteriaQuery, criteriaBuilder) ->
-                    criteriaBuilder.equal(
-                            root.get("saleName"),
-                            SecurityUtils.getAuthenticatedUser().getNickname()
-                    ), pageable);
-            return getContractDeposits(pageable, page);
-        }
-        Page<Contract> page = contractRepo.findAll(pageable);
+    public Page<ContractDeposit> contractDeposit(String search, LocalDate start, LocalDate end, Pageable pageable) {
+
+        Page<Contract> page = contractRepo
+                .findAll((Specification<Contract>) (root, criteriaQuery, criteriaBuilder) -> {
+                    List<Predicate> and = new ArrayList<>();
+                    if (SecurityUtils.getAuthenticatedUser()
+                            .getAuthorities()
+                            .contains(Authority.getInstance(Authority.NAME.ROLE_SALE))) {
+                        and.add(criteriaBuilder.equal(
+                                root.get("saleName"),
+                                SecurityUtils.getAuthenticatedUser().getNickname()
+                        ));
+                    }
+                    if (StringUtils.isNotBlank(search)) {
+                        List<Long> customerIds = customerRepo.findByCoFullNameLikeOrCoSimpleNameLike(search, search)
+                                .stream().map(Customer::getId).collect(Collectors.toList());
+                        and.add(root.get("customerId").in(customerIds));
+                    }
+                    if (start != null & end != null) {
+                        criteriaBuilder.between(root.get("contractBeginTime"), start.atStartOfDay(), end
+                                .atTime(LocalTime.MAX));
+                    }
+                    return criteriaBuilder.and(and.toArray(new Predicate[0]));
+                }, pageable);
         return getContractDeposits(pageable, page);
     }
 
@@ -232,6 +249,7 @@ public class FinancialService {
                                         .map(StoreInfo::getStoreName)
                                         .collect(Collectors.toList()), ","))
                                 .deposit(contract.getFlowBet())
+                                .monthlyRent(contract.getMonthlyRent())
                                 .build()).collect(Collectors.toList());
         return new PageImpl<>(list, pageable, page.getTotalElements());
     }
@@ -368,7 +386,8 @@ public class FinancialService {
             total = total.add(individualRent);
 
             List<FeeType> feeTypeList = feeTypeRepo.findByStoreId(storeInfo.getId());
-            List<RoomFee> roomFeeList = roomFeeRepo.findByStoreIdAndSettleTimeBetweenAndEnabled(storeInfo.getId(), start, end, true);
+            List<RoomFee> roomFeeList = roomFeeRepo
+                    .findByStoreIdAndSettleTimeBetweenAndEnabled(storeInfo.getId(), start, end, true);
             List<PersonalFeeType> personalFeeTypeList = personalFeeTypeRepo.findByStoreId(storeInfo.getId());
             List<PersonalFee> personalFeeList = personalFeeRepo
                     .findByStoreIdAndSettleTimeBetweenAndEnabled(storeInfo.getId(), start, end, true);

+ 2 - 0
src/main/java/com/izouma/zhumj/service/RechargeRecordService.java

@@ -165,6 +165,8 @@ public class RechargeRecordService {
                         .amount(rechargeRecord.getAmount())
                         .id(rechargeRecord.getId())
                         .idNo(rechargeRecord.getIdNo())
+                        .storeName(checkinInfoRepo.findFirstByIdNo(rechargeRecord.getIdNo()).getStoreInfo()
+                                .getStoreName())
                         .payMethod(rechargeRecord.getPayMethod())
                         .payTime(rechargeRecord.getPayTime())
                         .remark(rechargeRecord.getRemark())

+ 14 - 8
src/main/java/com/izouma/zhumj/service/sale/ContractBillService.java

@@ -2,6 +2,7 @@ package com.izouma.zhumj.service.sale;
 
 import com.izouma.zhumj.domain.BedInfo;
 import com.izouma.zhumj.domain.CheckinInfo;
+import com.izouma.zhumj.domain.StoreInfo;
 import com.izouma.zhumj.domain.sale.*;
 import com.izouma.zhumj.dto.sale.PaymentReportDTO;
 import com.izouma.zhumj.enums.*;
@@ -339,20 +340,25 @@ public class ContractBillService {
 
     public Page<ContractBill> arrearsContractBill(String search, LocalDate start, LocalDate end, Pageable pageable) {
         List<Long> breaks = new ArrayList<>();
-        List<Long> customerIds = customerRepo.findByCoFullNameLikeOrCoSimpleNameLike(search, search)
-                .stream()
-                .map(Customer::getId)
-                .collect(Collectors.toList());
-        List<Long> contracts = contractRepo.findAllByCustomerIdIn(customerIds)
-                .stream()
-                .map(Contract::getId)
-                .collect(Collectors.toList());
         contractRepo.findByStatus(ContractStatus.BREAK).forEach(contract -> breaks.add(contract.getId()));
+        List<Long> enabledStore = storeInfoRepo.findAllByStoreStatus(StoreStatus.BUSINESS).stream()
+                .map(StoreInfo::getId).collect(Collectors.toList());
+        List<Long> disabledContractIds = contractStoreRepo.findAllByStoreIdNotIn(enabledStore).stream()
+                .map(ContractStore::getContractId).collect(Collectors.toList());
         return contractBillRepo.findAll((Specification<ContractBill>) (root, criteriaQuery, criteriaBuilder) -> {
             List<Predicate> and = new ArrayList<>();
             and.add(criteriaBuilder.not(root.get("contractId").in(breaks)));
+            and.add(criteriaBuilder.not(root.get("contractId").in(disabledContractIds)));
             and.add(criteriaBuilder.lessThan(root.get("rest"), BigDecimal.ZERO));
             if (StringUtils.isNotBlank(search)) {
+                List<Long> customerIds = customerRepo.findByCoFullNameLikeOrCoSimpleNameLike(search, search)
+                        .stream()
+                        .map(Customer::getId)
+                        .collect(Collectors.toList());
+                List<Long> contracts = contractRepo.findAllByCustomerIdIn(customerIds)
+                        .stream()
+                        .map(Contract::getId)
+                        .collect(Collectors.toList());
                 and.add(root.get("contractId").in(contracts));
             }
             and.add(criteriaBuilder.not(criteriaBuilder.equal(root.get("status"), BillStatus.COMPLETED)));

+ 11 - 0
src/main/java/com/izouma/zhumj/web/CheckinInfoController.java

@@ -29,6 +29,7 @@ import java.io.IOException;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.LocalTime;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
@@ -225,4 +226,14 @@ public class CheckinInfoController extends BaseController {
     public void batchEmptyIn(@RequestBody CheckinInfoInDTO dto) {
         checkinInfoService.batchEmptyIn(dto);
     }
+
+    @GetMapping("/checkoutList")
+    public List<CheckinInfo> checkoutList(@RequestParam(required = false) LocalDate start, @RequestParam(required = false) LocalDate end, Long storeId) {
+        if (start == null & end == null) {
+            start = LocalDate.now();
+            end = LocalDate.now();
+        }
+        return checkinInfoRepo
+                .findAllByCheckoutTimeBetweenAndStoreId(start.atStartOfDay(), end.atTime(LocalTime.MAX), storeId);
+    }
 }

+ 2 - 2
src/main/java/com/izouma/zhumj/web/FinancialController.java

@@ -42,8 +42,8 @@ public class FinancialController {
     }
 
     @GetMapping("/contractDeposit")
-    public Page<ContractDeposit> contractDeposit(Pageable pageable) {
-        return financialService.contractDeposit(pageable);
+    public Page<ContractDeposit> contractDeposit(String search, @RequestParam(required = false) LocalDate start, @RequestParam(required = false) LocalDate end, Pageable pageable) {
+        return financialService.contractDeposit(search, start, end, pageable);
     }
 
     @GetMapping("/businessReport")

+ 9 - 0
src/main/java/com/izouma/zhumj/web/sale/ContractBillController.java

@@ -6,12 +6,14 @@ import com.alibaba.excel.write.metadata.WriteSheet;
 import com.alibaba.excel.write.metadata.WriteTable;
 import com.izouma.zhumj.domain.sale.BillDetail;
 import com.izouma.zhumj.domain.sale.ContractBill;
+import com.izouma.zhumj.dto.ResidenceReDTO;
 import com.izouma.zhumj.dto.excel.BillDetailExcelDTO;
 import com.izouma.zhumj.dto.sale.PaymentReportDTO;
 import com.izouma.zhumj.enums.BillType;
 import com.izouma.zhumj.repo.sale.ContractBillRepo;
 import com.izouma.zhumj.service.sale.ContractBillService;
 import com.izouma.zhumj.utils.excel.BooleanConverter;
+import com.izouma.zhumj.utils.excel.ExcelUtils;
 import com.izouma.zhumj.utils.excel.LocalDateConverter;
 import com.izouma.zhumj.utils.excel.LocalDateTimeConverter;
 import lombok.AllArgsConstructor;
@@ -141,6 +143,13 @@ public class ContractBillController {
         return contractBillService.arrearsContractBill(search, start, end, pageable);
     }
 
+    @GetMapping("/arrearsContractBillExcel")
+    @ResponseBody
+    public void arrearsContractBillExcel(HttpServletResponse response, String search, @RequestParam(required = false) LocalDate start, @RequestParam(required = false) LocalDate end, Pageable pageable) throws IOException {
+        List<ContractBill> data = contractBillService.arrearsContractBill(search, start, end, pageable).getContent();
+        ExcelUtils.export(response, data);
+    }
+
     @GetMapping("/getContractBill")
     public List<ContractBill> getContractBill(Long contractId) {
         return contractBillRepo.findByContractId(contractId);

+ 102 - 2
src/main/vue/src/views/ArrearsContractBill.vue

@@ -11,6 +11,15 @@
             </el-date-picker>
             <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
             <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索</el-button>
+            <el-button
+                @click="download"
+                type="primary"
+                icon="el-icon-download"
+                :loading="downloading"
+                class="filter-item"
+            >
+                导出EXCEL
+            </el-button>
         </div>
         <el-table
             :data="tableData"
@@ -21,15 +30,23 @@
             header-cell-class-name="table-header-cell"
             row-class-name="table-row"
             cell-class-name="table-cell"
+            :summary-method="getSummaries"
+            show-summary
         >
             <el-table-column prop="contractNumber" label="合同编号" width="300"></el-table-column>
             <el-table-column prop="coSimpleName" label="所属"></el-table-column>
             <el-table-column prop="startTime" label="开始时间"></el-table-column>
             <el-table-column prop="endTime" label="结束时间"></el-table-column>
             <el-table-column prop="recharged" label="充值金额"></el-table-column>
-            <el-table-column prop="rest" label="欠款金额"></el-table-column>
+            <el-table-column prop="money" label="欠款金额"></el-table-column>
             <el-table-column prop="dueTime" label="应支付时间"></el-table-column>
-            <el-table-column prop="money" label="总金额"></el-table-column>
+            <el-table-column prop="money" label="总金额">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.recharged != null && scope.row.money != null">{{
+                        scope.row.recharged - scope.row.money
+                    }}</span>
+                </template>
+            </el-table-column>
         </el-table>
         <div class="pagination-wrapper">
             <el-pagination
@@ -106,6 +123,89 @@ export default {
         }
     },
     methods: {
+        getSummaries(param) {
+            const { columns, data } = param;
+            const sums = [];
+            //循环处理所有列数据
+            columns.forEach((column, index) => {
+                if (index === 0) {
+                    sums[index] = '总计';
+                    return;
+                }
+                let numbers1 = [0, 1, 2, 3, 6];
+                if (numbers1.includes(index)) {
+                    sums[index] = '';
+                    return;
+                }
+                let numbers2 = [];
+                if (numbers2.includes(index)) {
+                    const values = data.map(item => Number(item[column.property]));
+                    sums[index] =
+                        values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0) / values.length;
+                    sums[index] = parseFloat(sums[index]).toFixed(2);
+                    return;
+                }
+                //将每列的所有数据数字化处理成一个数组
+                const values = data.map(item => Number(item[column.property]));
+                //当前列的所有数据全是数字类型时
+                if (!values.every(value => isNaN(value))) {
+                    //将当前列数据数组中的所有值,从左到右依次累加处理
+                    sums[index] = values.reduce((prev, curr) => {
+                        const value = Number(curr);
+                        if (!isNaN(value)) {
+                            return prev + curr;
+                        } else {
+                            return prev;
+                        }
+                    }, 0);
+                    sums[index] += '';
+                } else {
+                    sums[index] = 'N/A';
+                }
+            });
+            this.$nextTick(() => {
+                this.$refs['table'].doLayout();
+            });
+            return sums;
+        },
+        download() {
+            this.downloading = true;
+            let params = {};
+            if (this.dateRange && this.dateRange.length > 0) {
+                params.start = this.dateRange[0];
+                params.end = this.dateRange[1];
+            }
+            params.search = this.search;
+            params.size = 10000;
+            this.$axios
+                .get('/contractBill/arrearsContractBillExcel', {
+                    responseType: 'blob',
+                    params
+                })
+                .then(res => {
+                    console.log(res);
+                    this.downloading = false;
+                    const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
+                    const link = document.createElement('a');
+                    link.href = downloadUrl;
+                    link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
+                    document.body.appendChild(link);
+                    link.click();
+                    link.remove();
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.downloading = false;
+                    this.$message.error(e.error);
+                });
+        },
         created() {
             let now = new Date();
             this.range = [format(addMonths(now, -1), 'yyyy-MM-dd'), format(now, 'yyyy-MM-dd')];

+ 56 - 4
src/main/vue/src/views/BillReceiptList.vue

@@ -1,11 +1,37 @@
 <template>
     <div class="list-view">
         <div class="filters-container">
+            <el-date-picker
+                v-model="dateRange"
+                type="datetimerange"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                start-placeholder="请选择开始时间"
+                end-placeholder="请选择结束时间"
+                range-separator="至"
+                :default-time="['00:00:00', '23:59:59']"
+                class="filter-item"
+            >
+            </el-date-picker>
+            <el-select v-model="status" clearable filterable placeholder="请选择">
+                <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+            </el-select>
             <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
             <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button>
+            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索</el-button>
+            <el-button
+                @click="download"
+                type="primary"
+                icon="el-icon-download"
+                :loading="downloading"
+                class="filter-item"
+            >
+                导出EXCEL
+            </el-button>
         </div>
         <el-table
             :data="tableData"
+            status
             row-key="id"
             ref="table"
             header-row-class-name="table-header-row"
@@ -16,7 +42,7 @@
         >
             <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
             <el-table-column prop="id" label="ID" width="100"> </el-table-column>
-            <el-table-column prop="contractNumber" label="合同编号"> </el-table-column>
+            <el-table-column prop="contractNumber" width="200px" label="合同编号"> </el-table-column>
             <el-table-column prop="customerName" label="公司名称"> </el-table-column>
             <el-table-column prop="billType" label="收款类型" :formatter="billTypeFormatter"> </el-table-column>
             <el-table-column prop="dueTime" label="申请时间"> </el-table-column>
@@ -128,6 +154,8 @@ export default {
             multipleMode: false,
             search: '',
             form: {},
+            status: '',
+            dateRange: [],
             showChange: false,
             url: '/billReceipt/all',
             downloading: false,
@@ -138,7 +166,7 @@ export default {
                 { label: '房费', value: 'ROOM' }
             ],
             statusOptions: [
-                { label: '待处理', value: 'UNDO' },
+                { label: '待处理', value: 'APPLY' },
                 { label: '通过', value: 'COMPLETED' },
                 { label: '驳回', value: 'CANCELED' }
             ]
@@ -225,9 +253,19 @@ export default {
             return '';
         },
         beforeGetData() {
+            let data = {
+                query: {}
+            };
             if (this.search) {
-                return { search: this.search };
+                data.search = this.search;
             }
+            if (this.dateRange && this.dateRange.length > 0) {
+                data.query.createdAt = this.dateRange[0] + ',' + this.dateRange[1];
+            }
+            if (this.status) {
+                data.query.status = this.status;
+            }
+            return data;
         },
         toggleMultipleMode(multipleMode) {
             this.multipleMode = multipleMode;
@@ -252,11 +290,25 @@ export default {
             });
         },
         download() {
+            let params = {
+                query: {
+                    size: 10000
+                }
+            };
+            if (this.search) {
+                params.search = this.search;
+            }
+            if (this.dateRange && this.dateRange.length > 0) {
+                params.query.createdAt = this.dateRange[0] + ',' + this.dateRange[1];
+            }
+            if (this.status) {
+                params.query.status = this.status;
+            }
             this.downloading = true;
             this.$axios
                 .get('/billReceipt/excel', {
                     responseType: 'blob',
-                    params: { size: 10000 }
+                    params
                 })
                 .then(res => {
                     console.log(res);

+ 8 - 7
src/main/vue/src/views/CheckoutReport.vue

@@ -2,11 +2,11 @@
     <div class="list-view">
         <div class="filters-container">
             <el-date-picker
-                v-model="date"
-                type="date"
-                placeholder="选择日期"
+                type="daterange"
                 value-format="yyyy-MM-dd"
-                class="filter-item"
+                v-model="dateRange"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
             >
             </el-date-picker>
             <el-button type="primary" @click="getData" class="filter-item">查询 </el-button>
@@ -54,6 +54,7 @@ export default {
         return {
             date: null,
             start: null,
+            dateRange: [],
             end: null
         };
     },
@@ -62,12 +63,12 @@ export default {
     },
     methods: {
         getData() {
-            if (this.start && this.end) {
+            if (this.dateRange && this.dateRange.length === 2) {
                 this.$http
                     .get('/checkinInfo/checkoutList', {
                         storeId: this.selectedStoreId,
-                        start: this.start,
-                        end: this.end
+                        start: this.dateRange[0],
+                        end: this.dateRange[1]
                     })
                     .then(res => {
                         this.tableData = res;

+ 25 - 0
src/main/vue/src/views/ContractDeposit.vue

@@ -1,5 +1,17 @@
 <template>
     <div class="list-view">
+        <div class="filters-container">
+            <el-date-picker
+                type="daterange"
+                value-format="yyyy-MM-dd"
+                v-model="dateRange"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+            >
+            </el-date-picker>
+            <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
+            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索</el-button>
+        </div>
         <el-table
             :data="tableData"
             row-key="id"
@@ -57,8 +69,21 @@ export default {
     mixins: [pageableTable],
     data() {
         return {
+            search: '',
+            dateRange: [],
             url: '/financial/contractDeposit'
         };
+    },
+    methods: {
+        beforeGetData() {
+            let data = {};
+            if (this.dateRange && this.dateRange.length > 0) {
+                data.start = this.dateRange[0];
+                data.end = this.dateRange[1];
+            }
+            data.search = this.search;
+            return data;
+        }
     }
 };
 </script>

+ 3 - 1
src/main/vue/src/views/CustomerPaymentList.vue

@@ -218,7 +218,9 @@ export default {
                     sums[index] = 'N/A';
                 }
             });
-
+            this.$nextTick(() => {
+                this.$refs['table'].doLayout();
+            });
             return sums;
         },
         changeInfo(row) {

+ 5 - 0
src/main/vue/src/views/RechargeRecordList.vue

@@ -43,6 +43,11 @@
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"> </sortable-header>
                 </template>
             </el-table-column>
+            <el-table-column prop="storeName" label="门店">
+                <template slot="header" slot-scope="{ column }">
+                    <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"> </sortable-header>
+                </template>
+            </el-table-column>
             <el-table-column prop="bedNo" label="床位号">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"> </sortable-header>