Kaynağa Gözat

入住需知

xiongzhu 5 yıl önce
ebeveyn
işleme
c16bb7cc86

+ 8 - 0
db/migrate001.sql

@@ -13,6 +13,14 @@ create table member_info
     sex         varchar(255),
     primary key (id_no)
 ) engine = InnoDB;
+alter table deposit_refund_apply
+    add column user_id bigint;
+alter table room_rate
+    add column day_price decimal(10, 2);
+alter table user
+    add column expire_at datetime;
+alter table user
+    add column temporal bit not null;
 alter table user
     modify id_no varchar(20) null;
 alter table deposit_record

+ 37 - 68
src/main/java/com/izouma/zhumj/service/DepartmentService.java

@@ -6,7 +6,7 @@ import com.izouma.zhumj.dto.DepartmentDTO;
 import com.izouma.zhumj.exception.BusinessException;
 import com.izouma.zhumj.repo.DepartmentRepo;
 import com.izouma.zhumj.repo.UserRepo;
-import org.springframework.beans.factory.annotation.Autowired;
+import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 
 import java.util.HashSet;
@@ -15,120 +15,93 @@ import java.util.Set;
 import java.util.stream.Collectors;
 
 @Service
+@AllArgsConstructor
 public class DepartmentService {
-
-    @Autowired
     private DepartmentRepo departmentRepo;
+    private UserRepo       userRepo;
 
-    @Autowired
-    private UserRepo userRepo;
-
-
-    private DepartmentDTO changeDepartmentDTO(Department department) {
-
+    private DepartmentDTO toDTO(Department department) {
         DepartmentDTO departmentDTO = new DepartmentDTO();
         departmentDTO.setId(department.getId());
         departmentDTO.setName(department.getName());
         departmentDTO.setParentid(department.getParentid());
         departmentDTO.setRemark(department.getRemark());
         if (department.getChildren() != null) {
-            departmentDTO.setChildren(department.getChildren().stream().map(d -> changeDepartmentDTO(d)).collect(Collectors.toList()));
+            departmentDTO.setChildren(department.getChildren().stream().map(this::toDTO)
+                    .collect(Collectors.toList()));
         }
-
         return departmentDTO;
     }
 
-    private DepartmentDTO changeWithUsersDepartmentDTO(Department department) {
-
+    private DepartmentDTO toDTOWithUsers(Department department) {
         DepartmentDTO departmentDTO = new DepartmentDTO();
         departmentDTO.setId(department.getId());
         departmentDTO.setName(department.getName());
         departmentDTO.setParentid(department.getParentid());
         departmentDTO.setRemark(department.getRemark());
         if (department.getChildren() != null) {
-            departmentDTO.setChildren(department.getChildren().stream().map(d -> changeWithUsersDepartmentDTO(d)).collect(Collectors.toList()));
+            departmentDTO.setChildren(department.getChildren().stream().map(this::toDTOWithUsers)
+                    .collect(Collectors.toList()));
         }
         departmentDTO.setUsers(userRepo.findAllByDepartmentsContains(department));
-
         return departmentDTO;
     }
 
-    /**
-     * 获取部门用户id及下属部门用户id
-     *
-     * @param department
-     * @param userIdSet
-     */
-    private void getDepartmentUsers(Department department, Set<Long> userIdSet) {
-
-        addDepartmentUserIdSet(department, userIdSet);
+    private Set<Long> getDepartmentUsers(Department department) {
+        Set<Long> userIds = userRepo.findAllByDepartmentsContains(department)
+                .stream().map(User::getId).collect(Collectors.toSet());
 
         if (department.getChildren() != null) {
-            department.getChildren().forEach(d -> getDepartmentUsers(d, userIdSet));
+            for (Department child : department.getChildren()) {
+                userIds.addAll(getDepartmentUsers(child));
+            }
         }
 
-    }
-
-    /**
-     * 添加部门用户id到set
-     *
-     * @param department
-     * @param userIdSet
-     */
-    private void addDepartmentUserIdSet(Department department, Set<Long> userIdSet) {
-        List<User> users = userRepo.findAllByDepartmentsContains(department);
-        userIdSet.addAll(users.parallelStream().map(User::getId).collect(Collectors.toSet()));
+        return userIds;
     }
 
     public List<DepartmentDTO> allList(Long id) {
         List<Department> departmentList = departmentRepo.findAllByParentid(id);
-        List<DepartmentDTO> departmentDTOList = departmentList.stream().map(d -> changeDepartmentDTO(d)).collect(Collectors.toList());
-        return departmentDTOList;
+        return departmentList.stream().map(this::toDTO)
+                .collect(Collectors.toList());
     }
 
     public List<DepartmentDTO> allListWithUsers(Long id) {
         List<Department> departmentList = departmentRepo.findAllByParentid(id);
-        List<DepartmentDTO> departmentDTOList = departmentList.stream().map(d -> changeWithUsersDepartmentDTO(d)).collect(Collectors.toList());
-        return departmentDTOList;
+        return departmentList.stream().map(this::toDTOWithUsers)
+                .collect(Collectors.toList());
     }
 
 
     public DepartmentDTO tree(Long id) {
         Department department = departmentRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-        DepartmentDTO departmentDTO = changeDepartmentDTO(department);
-        return departmentDTO;
+        return toDTO(department);
     }
 
     public DepartmentDTO treeWithUsers(Long id) {
         Department department = departmentRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-        DepartmentDTO departmentDTO = changeWithUsersDepartmentDTO(department);
-        return departmentDTO;
+        return toDTOWithUsers(department);
     }
 
     public Set<Long> users(Long id) {
         Department department = departmentRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-        Set<Long> userIdSet = new HashSet<>();
-        addDepartmentUserIdSet(department, userIdSet);
-        return userIdSet;
+        List<User> users = userRepo.findAllByDepartmentsContains(department);
+        return users.stream().map(User::getId).collect(Collectors.toSet());
     }
 
     public Set<Long> allUsers(Long id) {
         Department department = departmentRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-        Set<Long> userIdSet = new HashSet<>();
-        getDepartmentUsers(department, userIdSet);
-        return userIdSet;
+        return getDepartmentUsers(department);
     }
 
     public Set<Long> allUsersByUserId(Long userId) {
         User user = userRepo.findById(userId).orElseThrow(new BusinessException("无记录"));
         Set<Department> departments = user.getDepartments();
         Set<Long> userIdSet = new HashSet<>();
-        departments.forEach(department ->
-                getDepartmentUsers(department, userIdSet)
-        );
-
+        for (Department department : departments) {
+            userIdSet.addAll(getDepartmentUsers(department));
+        }
         return userIdSet;
-
     }
 
     public Set<Long> allUsersWithOutThisDepartmentByUserId(Long userId) {
@@ -136,33 +109,29 @@ public class DepartmentService {
         Set<Department> departments = user.getDepartments();
         Set<Long> userIdSet = new HashSet<>();
         departments.forEach(department -> {
-                    if (department.getChildren() != null) {
-                        department.getChildren().forEach(d -> getDepartmentUsers(d, userIdSet));
-                    }
-
+            if (department.getChildren() != null) {
+                for (Department child : department.getChildren()) {
+                    userIdSet.addAll(getDepartmentUsers(child));
                 }
-        );
+            }
+        });
         userIdSet.add(userId);
-
         return userIdSet;
-
     }
 
     public List<User> allUserInfosWithOutThisDepartmentByUserId(Long userId) {
         Set<Long> userIdSet = allUsersWithOutThisDepartmentByUserId(userId);
         return userRepo.findAllById(userIdSet);
-
     }
 
     public Set<Long> usersByUserId(Long userId) {
         User user = userRepo.findById(userId).orElseThrow(new BusinessException("无记录"));
         Set<Department> departments = user.getDepartments();
         Set<Long> userIdSet = new HashSet<>();
-        departments.forEach(department ->
-                addDepartmentUserIdSet(department, userIdSet)
-        );
-
+        for (Department department : departments) {
+            List<User> users = userRepo.findAllByDepartmentsContains(department);
+            userIdSet.addAll(users.stream().map(User::getId).collect(Collectors.toSet()));
+        }
         return userIdSet;
-
     }
 }

+ 5 - 4
src/main/java/com/izouma/zhumj/web/sale/SaleBaseController.java

@@ -190,13 +190,14 @@ public class SaleBaseController {
                         .equal(root.get("saleId"), MapUtils.getLong(pageQuery.getQuery(), "saleId"))));
             } else {
                 Long saleId = SecurityUtils.getAuthenticatedUser().getId();
-                Set<Long> longs = departmentService.allUsersWithOutThisDepartmentByUserId(saleId);
-                if (SecurityUtils.getAuthenticatedUser().getPosition().equals("销售助理")) {
+                Set<Long> userIds = departmentService.allUsersWithOutThisDepartmentByUserId(saleId);
+                if ("销售助理".equals(SecurityUtils.getAuthenticatedUser().getPosition())
+                        || saleId == 69) {
 
-                } else if (!longs.isEmpty()) {
+                } else if (!userIds.isEmpty()) {
                     Path<Object> path = root.get("saleId");
                     CriteriaBuilder.In<Object> in = criteriaBuilder.in(path);
-                    longs.forEach(in::value);
+                    userIds.forEach(in::value);
                     and.add(criteriaBuilder.and(in));
                 } else {
                     and.add(criteriaBuilder.and(criteriaBuilder.equal(root.get("saleId"), saleId)));

+ 1 - 1
src/main/resources/application.yaml

@@ -9,7 +9,7 @@ spring:
     profiles:
         active: dev
     datasource:
-        url: jdbc:mysql://rdsave1o67m1ido6gwp6public.mysql.rds.aliyuncs.com/zhu_meng_ju?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8
+        url: jdbc:mysql://rdsave1o67m1ido6gwp6public.mysql.rds.aliyuncs.com/zhu_meng_ju_test?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8
         username: microball
         password: 2wsx@WSX#EDC
         hikari:

+ 1 - 1
src/main/vue/src/views/Admin.vue

@@ -139,7 +139,7 @@
                     <el-tab-pane v-for="item in tabs" :key="item.name" :label="item.title" :name="item.name">
                     </el-tab-pane>
                 </el-tabs>
-                <keep-alive include="ShiftHandoverEdit,ShiftSummary,FeeDetaliReport,BusinessReport">
+                <keep-alive include="ShiftHandoverEdit,ShiftSummary,FeeDetaliReport,BusinessReport,ContractList">
                     <router-view> </router-view>
                 </keep-alive>
             </el-main>

+ 46 - 71
src/main/vue/src/views/sale/ContractList.vue

@@ -1,13 +1,8 @@
 <template>
-    <div class="list-view">
+    <div class="list-view" v-loading="tableLoading">
         <div class="filters-container">
             <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
 
-            <el-button @click="onCurrentChange(1)" type="primary" icon="el-icon-search" class="filter-item"
-                >搜索
-            </el-button>
-
-            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">添加</el-button>
             <el-select
                 filterable
                 v-model="saleId"
@@ -53,6 +48,10 @@
                     :value="item.value"
                 ></el-option>
             </el-select>
+            <el-button @click="onCurrentChange(1)" type="primary" icon="el-icon-search" class="filter-item"
+                >搜索
+            </el-button>
+            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">添加</el-button>
         </div>
         <el-table
             :data="tableData"
@@ -65,16 +64,10 @@
             cell-class-name="table-cell"
             v-loading="$store.state.fetchingData"
         >
-            <el-table-column align="center" v-if="multipleMode" type="selection" width="50"></el-table-column>
+            <el-table-column v-if="multipleMode" type="selection" width="50"></el-table-column>
             <el-table-column type="index" width="50"></el-table-column>
-            <el-table-column align="center" prop="contractNumber" label="合同编号" width="200">
-                <!-- <template slot="header" slot-scope="{column}">
-                                    <sortable-header :column="column" :current-sort="sort"
-                                        @changeSort="changeSort">
-                                    </sortable-header>
-                </template>-->
-            </el-table-column>
-            <el-table-column align="center" prop="contractEndTime" label="距离合同到期时间" width="200">
+            <el-table-column prop="contractNumber" label="合同编号" width="200"> </el-table-column>
+            <el-table-column prop="contractEndTime" label="距离合同到期时间" width="200">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
@@ -96,82 +89,73 @@
                 </template>
             </el-table-column>
 
-            <!--            <el-table-column align="center" prop="payType" label="15天内应收款项"-->
+            <!--            <el-table-column prop="payType" label="15天内应收款项"-->
             <!--                width="300">-->
 
             <!--                <template slot-scope="{row}">-->
             <!--                    {{yingCycle(row,1)}}-->
             <!--                </template>-->
             <!--            </el-table-column>-->
-            <!--            <el-table-column align="center" prop="payType" label="30天内应收款项"-->
+            <!--            <el-table-column prop="payType" label="30天内应收款项"-->
             <!--                width="300">-->
             <!--                <template slot-scope="{row}">-->
             <!--                    {{yingCycle(row,2)}}-->
             <!--                </template>-->
             <!--            </el-table-column>-->
-            <el-table-column align="center" prop="customer.customerNumber" label="客户编号" width="150">
-                <template slot="header" slot-scope="{ column }">
-                    <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
-                </template>
-            </el-table-column>
-            <el-table-column align="center" prop="customer.coFullName" label="公司全称" width="200">
+            <el-table-column prop="customer.customerNumber" label="客户编号" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="customer.coSimpleName" label="公司简称" width="150">
-                <template slot="header" slot-scope="{ column }">
-                    <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
-                </template>
+            <el-table-column prop="customer.coFullName" label="公司全称" width="200"> </el-table-column>
+            <el-table-column prop="customer.coSimpleName" label="公司简称" width="150">
                 <template slot-scope="{ row }">
-                    <el-button v-if="row.customer" @click="customerLook(row)">{{
-                        row.customer.coSimpleName
-                    }}</el-button>
+                    <el-link v-if="row.customer" @click="customerLook(row)">{{ row.customer.coSimpleName }}</el-link>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="bedsAmount" label="总床位数" width="100">
+            <el-table-column prop="bedsAmount" label="总床位数" width="100">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
-            <el-table-column align="center" label="房型床位" width="80">
+            <el-table-column label="房型床位" width="80">
                 <template slot-scope="{ row }">
                     <el-button @click="openRoomDataDialog(row.roomList)" size="mini" plain>查看</el-button>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="flowBet" label="押金" width="100">
+            <el-table-column prop="flowBet" label="押金" width="100">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="monthlyRent" label="月租金" width="100">
+            <el-table-column prop="monthlyRent" label="月租金" width="100">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="contractTotalRent" label="合同总租金" width="150">
+            <el-table-column prop="contractTotalRent" label="合同总租金" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
 
-            <el-table-column align="center" prop="contractBeginTime" label="合同开始时间" width="150">
+            <el-table-column prop="contractBeginTime" label="合同开始时间" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="contractEndTime" label="合同结束时间" width="150">
+            <el-table-column prop="contractEndTime" label="合同结束时间" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
 
-            <el-table-column align="center" prop="contractDays" label="合同期(天)" width="150">
+            <el-table-column prop="contractDays" label="合同期(天)" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="payType" label="付款方式" width="150">
+            <el-table-column prop="payType" label="付款方式" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
@@ -185,106 +169,94 @@
                 width="150"
             ></el-table-column>
 
-            <el-table-column align="center" prop="enclosure" label="附件" width="150">
+            <el-table-column prop="enclosure" label="附件" width="150">
                 <template slot-scope="{ row }">
                     <a :href="row.enclosure">下载</a>
                 </template>
             </el-table-column>
 
-            <el-table-column align="center" prop="contractSource" label="合同来源" width="300">
-                <template slot="header" slot-scope="{ column }">
-                    <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
-                </template>
-                <template slot-scope="{ row }">
-                    <el-popover trigger="hover" placement="top">
-                        <p>{{ contractSourceLabel(row.contractSource) }}</p>
-                        <div slot="reference" class="name-wrapper">
-                            <el-tag size="medium">{{ contractSourceLabel(row.contractSource) }}</el-tag>
-                        </div>
-                    </el-popover>
-                </template>
-            </el-table-column>
+            <el-table-column prop="contractSource" label="合同来源" width="300"> </el-table-column>
 
-            <el-table-column align="center" prop="customerSource" label="客户来源" width="300">
+            <el-table-column prop="customerSource" label="客户来源" width="300">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
                 <template slot-scope="{ row }">
                     <el-popover trigger="hover" placement="top">
-                        <p>{{ sourceLabel(row.customerSource) }}</p>
-                        <div slot="reference" class="name-wrapper">
-                            <el-tag size="medium">{{ sourceLabel(row.customerSource) }}</el-tag>
-                        </div>
+                        <span>{{ sourceLabel(row.customerSource) }}</span>
+                        <span slot="reference" class="name-wrapper">
+                            {{ sourceLabel(row.customerSource) }}
+                        </span>
                     </el-popover>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="customerIndustry" label="客户行业" width="150">
+            <el-table-column prop="customerIndustry" label="客户行业" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
-            <el-table-column align="center" label="联系人" width="80">
+            <el-table-column label="联系人" width="80">
                 <template slot-scope="{ row }">
                     <el-button @click="openContactsDataDialog(row.contactsList)" size="mini" plain>查看</el-button>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="saleName" label="销售员" width="150">
+            <el-table-column prop="saleName" label="销售员" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
-            <!--      <el-table-column align="center" label="续约订单信息" width="100">-->
+            <!--      <el-table-column label="续约订单信息" width="100">-->
             <!--        <template slot-scope="{row}">-->
             <!--          <el-button @click="renewalList(row.contractNumber)" size="mini" plain>查看</el-button>-->
             <!--        </template>-->
             <!--      </el-table-column>-->
-            <el-table-column align="center" label="退宿信息" width="100">
+            <el-table-column label="退宿信息" width="100">
                 <template slot-scope="{ row }">
                     <el-button @click="residenceList(row.contractNumber)" size="mini" plain>查看</el-button>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="contractRenewals" label="续约次数" width="150">
+            <el-table-column prop="contractRenewals" label="续约次数" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
 
-            <el-table-column align="center" label="收款周期" width="80">
+            <el-table-column label="收款周期" width="80">
                 <template slot-scope="{ row }">
                     <el-button @click="openCycleDataDialog(row.cycles)" size="mini" plain>查看</el-button>
                 </template>
             </el-table-column>
 
-            <el-table-column align="center" label="合同人员" width="80">
+            <el-table-column label="合同人员" width="80">
                 <template slot-scope="{ row }">
                     <el-button @click="openStaffDataDialog(row)" size="mini" plain>查看</el-button>
                 </template>
             </el-table-column>
 
-            <el-table-column align="center" label="房间信息查看" width="80">
+            <el-table-column label="房间信息查看" width="80">
                 <template slot-scope="{ row }">
                     <el-button @click="openRoomInfoDataDialog(row.contractStoreList)" size="mini" plain>查看</el-button>
                 </template>
             </el-table-column>
 
-            <el-table-column align="center" prop="contactAddress" label="联系地址" width="200">
+            <el-table-column prop="contactAddress" label="联系地址" width="200">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
             </el-table-column>
-            <el-table-column align="center" prop="status" label="状态(在住/已退)" width="150">
+            <el-table-column prop="status" label="状态(在住/已退)" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
                 <template slot-scope="{ row }">{{ statusLabel(row.status) }}</template>
             </el-table-column>
-            <el-table-column align="center" prop="checkInType" label="合作模式" width="150">
+            <el-table-column prop="checkInType" label="合作模式" width="150">
                 <template slot="header" slot-scope="{ column }">
                     <sortable-header :column="column" :current-sort="sort" @changeSort="changeSort"></sortable-header>
                 </template>
                 <template slot-scope="{ row }">{{ CustomerCooperationLabel(row.checkInType) }}</template>
             </el-table-column>
-            <el-table-column label="操作" align="center" fixed="right" min-width="300">
+            <el-table-column label="操作" fixed="right" min-width="300">
                 <template slot-scope="{ row }">
                     <el-button @click="renewalRow(row)" type="success" size="mini" plain>续约</el-button>
                     <el-button @click="residenceDialog(row)" type="warning" size="mini" plain>退宿</el-button>
@@ -1237,5 +1209,8 @@ export default {
         flex-grow: 1;
         flex-basis: 0;
     }
+    .el-link {
+        font-size: inherit;
+    }
 }
 </style>

+ 9 - 10
src/main/vue/src/views/sale/CustomerList.vue

@@ -282,16 +282,6 @@ import pageableTable from '@/mixins/pageableTable';
 export default {
     name: 'CustomerList',
     mixins: [pageableTable],
-    created() {
-        this.getCanUser();
-        if (this.$route.query.saleId) {
-            this.saleId = this.$route.query.saleId;
-        }
-        if (this.$route.query.id) {
-            this.id = this.$route.query.id;
-        }
-        this.getData();
-    },
     data() {
         return {
             brands: '',
@@ -393,6 +383,15 @@ export default {
         }
     },
     methods: {
+        beforeOnCreate() {
+            this.getCanUser();
+            if (this.$route.query.saleId) {
+                this.saleId = this.$route.query.saleId;
+            }
+            if (this.$route.query.id) {
+                this.id = this.$route.query.id;
+            }
+        },
         sourceLabel(cellValue) {
             var valueStr = '未知';
             this.sourceData.forEach(item => {

BIN
src/main/zmj_mp/src/assets/checkbox.png


BIN
src/main/zmj_mp/src/assets/checkbox_checked.png


BIN
src/main/zmj_mp/src/assets/icon_help.png


+ 9 - 1
src/main/zmj_mp/src/router.js

@@ -100,6 +100,11 @@ const router = new Router({
             path: '/withdrawRecord',
             name: 'withdrawRecord',
             component: () => import(/* webpackChunkName: "withdrawRecord" */ '@/views/WithdrawRecord.vue')
+        },
+        {
+            path: '/help',
+            name: 'help',
+            component: () => import(/* webpackChunkName: "help" */ '@/views/Help.vue')
         }
     ]
 });
@@ -168,7 +173,10 @@ router.beforeEach((to, from, next) => {
             .catch(e => {
                 console.log(e);
                 localStorage.removeItem('token');
-                // window.location = 'http://zmj.izouma.com/wx/redirect?redirectUrl=http%3A%2F%2Fzmj.izouma.com%2Fmp%2F';
+                if (new URLSearchParams(window.location.search).get('token') !== 'true') {
+                    window.location =
+                        'http://zmj.izouma.com/wx/redirect?redirectUrl=http%3A%2F%2Fzmj.izouma.com%2Fmp%2F';
+                }
             });
     } else {
         v.$loading.close();

+ 10 - 1
src/main/zmj_mp/src/styles/app.less

@@ -46,7 +46,16 @@ input {
 }
 .fade-enter-active,
 .fade-leave-active {
-    transition: all 3s;
+    transition: all 0.3s;
+}
+.zoom-enter,
+.zoom-leave-active {
+    opacity: 0;
+    transform: scale3d(1.1, 1.1, 1);
+}
+.zoom-enter-active,
+.zoom-leave-active {
+    transition: all 0.3s;
 }
 .loadmore {
     display: flex;

+ 78 - 0
src/main/zmj_mp/src/views/CheckinNotice.vue

@@ -0,0 +1,78 @@
+<template>
+    <div>
+        <div><b>尊敬的住户,欢迎您入住本公寓!为营造安全舒适的居住空间,请仔细阅读本须知并遵守各项条规:</b></div>
+        <br />
+        <div>(1)入住期内违约或退宿,剩余房费及押金不予退还,若续租,应于入住期满前一周提出申请。</div>
+        <div>
+            (2)办理入住需根据公寓要求支付押金(押金在退宿办完日起最长于第15个工作日返还)
+            。每周期租金应提前15天缴纳,超出天数的,从超过应支付日起按房租的10%缴纳滞纳金,计算到缴清下周期的租金为止。
+        </div>
+        <div>
+            (3)入住本公寓应按月交付水、电、网等各项其他费用。逾期不交的,本公寓有权要求住户补足所欠费用及缴纳滞纳金(从超过应当支付日起开始收取,每天滞纳金额以拖欠费用总额的5%计算)。
+        </div>
+        <div>
+            (4)本公寓不接待55岁以上人员、孕妇及婴幼儿及外籍人员入住,不接待患有传染病、心脑血管疾病、心理或精神异常者。办理入住须持本人身份证证件,如发现身份不符,立即勒令其退宿处理。
+        </div>
+        <div>
+            (5)访客须到前台登记,当天22点前须离开。私带访客进入或留宿访客的,本公寓有权向住户收取1000元违约金;二次违规的直接勒令退宿。
+        </div>
+        <div>
+            (6)退宿当天应搬离个人物品,逾期视为放弃所有权。若遗留5件以上物品,押金将被扣除100元作为清洁费。如不办退宿视为在住,房租及水电网等费用持续计算到办完退宿为止。无论任何原因不再住本公寓,超过3天仍不办理退宿的,视为同意放弃物品所有权,本公寓有权做清理处理且押金不予退还。
+        </div>
+        <div>
+            (7)住户不得私自更换床位,如私自占用空床位,需从自占用日起向本公寓足额缴床位费,直到清空为止。若经我方二次催告,住户拒不清空,我方有权直接丢弃住户物品,并勒令住户退宿。
+        </div>
+        <div>
+            (8)本公寓每15天免费提供一次布草清洗服务。如要求更换或退宿时,布草有不清洁者(如:划线、油渍、血渍等),需按照赔偿价目表上的全新布草价格向本公寓赔偿。
+        </div>
+        <div>
+            (9)入住期间不得私自更换房屋内的设施设备、并应爱惜使用。若因使用不当或不合理而造成的损失及故障,由本公寓代为维修,费用由住户承担(损坏依赔偿价目表照价赔偿)。
+        </div>
+        <div>
+            (10)根据相关条例,住户需配合本公寓做好垃圾分类工作。若不配合的,本公寓当天将拒绝进入房屋内进行保洁工作,直到住户改善为止。不配合或拒绝改善达三次的,本公寓有权勒令对方退宿。
+        </div>
+        <div>(11)公寓前台提供收、放快递和放置外卖固定点,概不承担遗失、损坏。但不提供寄快递服务。</div>
+        <div>
+            (12)住户应爱护公共财产(如:文明乘坐电梯)、爱护公共区域卫生(如:不乱扔垃圾果皮等)、不干扰他人正常学习和休息(如:不饲养宠物、不酗酒、不打牌、不奏乐器。不在房内起哄、喧哗、敲打物品等)。
+        </div>
+        <div>(13)严禁窗外丢物、高空抛物!因此类行为造成的一切后果,由住户本人承担完全责任。</div>
+        <div>
+            (14)严禁在房屋内私拉乱接电源线,并严禁使用以下违规电器:包括但不限于拖线板、微波炉、电饭锅、电磁炉、电热毯、电暖器、热得快、热水壸等,一经发现,本公寓有权没收。其他电器(如充电器、电吹风、卷发器),使用后应立即拔除,一经发现未拔除,本公寓暂收到前台,请住户自行前往认领,三天内未认领的,本公寓有权直接丢弃。若再次违规的,本公寓有权直接没收物品不予归还。
+        </div>
+        <div>
+            (15)住户应配合公寓有关部门做好安全防范,公寓内禁用明火、禁止存放易燃易爆物品(如打火机油、打火机充气罐)、存放点火源(如打火机、酒精炉灶等)。若携带或私藏国家法律法规禁止的物品,由住户承担所有责任。如发生火灾请及时联系工作人员。
+        </div>
+        <div>
+            (16)公寓内所有区域均为无烟区,若在房屋内或公区发现烟头或抽烟者,按第一次100元、第二次200元作为违约金收取。抽烟累计达三次的,本公寓有权勒令住户立即退宿,押金作为违约金概不退还。
+        </div>
+        <div>
+            (17)严禁电瓶车和电瓶车电池进入本公寓内!不得在房屋内或私拉电线为电瓶车充电,一经发现,本公寓有权直接没收电线、电瓶或收取500元违约金。
+        </div>
+        <div>
+            (18)公寓内所有走道、窗户均为消防逃生通道,严禁晾晒衣物、鞋袜及其他物品阻挡的违法行为。一经发现违规,本公寓暂收到前台,请住户自行前往认领,三天内未认领的,本公寓有权直接丢弃。若再次违规的,本公寓有权直接没收物品不予归还。
+        </div>
+        <div>(19)人员离开锁闭门窗、关水关电。贵重物品及个人钱财自行保管,若有遗失,公寓概不负责。</div>
+        <div>
+            (20)公寓内禁止饮酒、不得赌博、不打架斗殴、不得传播色情信息、不得捏造传播虚假恐慌信息等。相关违法行为一经发现作严重警告处理,情节严重者作劝退处理。如发生治安事件请及时联系工作人员。
+        </div>
+        <br />
+        <div>
+            <b>
+                <u>
+                    以上所有条款适用于筑梦居全国所有门店!若遇特定城市的法令规范不一而有出入的,以该城市的规范为准!若遇个别门店所在地的公安部门、街道、小区或物业等,对住户提出其他规定的,住户必需配合!
+                </u>
+            </b>
+        </div>
+        <br />
+        <div>
+            <b style="color:#F7931D">
+                严正声明:住户因其违反公寓公约或各项法令,造成公寓、公寓方人员、或其他住户任何形式的伤害或损失的,无论其是否已提出退宿,该住户仍应承担法律和经济赔偿等全部责任!
+            </b>
+        </div>
+        <br />
+        <div>
+            前台留有夜间值班人员电话,若有紧急情况欢迎拨打!
+            <br />欢迎您对我们的服务提出更多意见:(400-8365-186)
+        </div>
+    </div>
+</template>

+ 26 - 0
src/main/zmj_mp/src/views/CheckoutNotice.vue

@@ -0,0 +1,26 @@
+<template>
+    <div>
+        <div>尊敬的客户:</div>
+        <div>
+            感谢您陪伴我们在筑梦居渡过了一段美好的时光,当您点开这份文件时,代表着我们即将要告别,期待我们下次再相聚!
+        </div>
+        <br />
+        <div>搬离公寓的伙伴须知:</div>
+        <div>
+            1.自您办理退宿手续当日请携带好私人物品,如有遗留,视为您遗弃,公寓不负责保管,若因此产生的财务纠纷由您自行承担!
+        </div>
+        <div>
+            2.您在入住公寓时已经熟知公寓管理制度,须在搬离前结清相关费用。若对屋内设施设备有损坏的需要维修恢复原样并可以正常使用。若因搬离前有费用未结清及产生的损失您理解并同意支付。
+        </div>
+        <div>3.办理退宿流程时,请您携带以下物品到前台:</div>
+        <div>&emsp;①房卡/钥匙、门禁卡、水卡、储物柜钥匙</div>
+        <div>&emsp;②个人交款的押金单据</div>
+        <div>4.请确保以下物品都已整理完毕:</div>
+        <div>&emsp;①床上用品6件套完好无损</div>
+        <div>&emsp;②个人用品已全部撤空</div>
+        <div>&emsp;③柜子物品清理干净,无任何衣物或杂物滞留衣柜</div>
+        <div>&emsp;④个人使用设施完好(床铺、柜子)</div>
+        <div>&emsp;⑤公寓设施完好无损(固定设施、电视机、空调及遥控器)</div>
+        <div>&emsp;⑥公共设施费用结清(冷水费、热水费、电费、网络费等)</div>
+    </div>
+</template>

+ 78 - 0
src/main/zmj_mp/src/views/Help.vue

@@ -0,0 +1,78 @@
+<template>
+    <div style="background:#F2F4F5">
+        <div class="cell-group">
+            <div class="cell" @click="showCheckinNotice = !showCheckinNotice">
+                <label>入住须知</label>
+                <img src="../assets/icon_into.png" />
+            </div>
+            <checkin-notice v-if="showCheckinNotice" class="notice"></checkin-notice>
+            <div class="cell" @click="showCheckoutNotice = !showCheckoutNotice">
+                <label>退宿须知</label>
+                <img src="../assets/icon_into.png" />
+            </div>
+            <checkout-notice v-if="showCheckoutNotice" class="notice"></checkout-notice>
+        </div>
+    </div>
+</template>
+<script>
+import CheckinNotice from './CheckinNotice';
+import CheckoutNotice from './CheckoutNotice';
+export default {
+    name: 'Help',
+    metaInfo: {
+        title: '帮助说明'
+    },
+    data() {
+        return {
+            showCheckinNotice: false,
+            showCheckoutNotice: false
+        };
+    },
+    components: {
+        CheckinNotice,
+        CheckoutNotice
+    }
+};
+</script>
+<style lang="less" scoped>
+.cell-group {
+    border-radius: 4px;
+    background-color: white;
+    width: calc(100% - 30px);
+    margin: 15px auto 0 auto;
+    .cell {
+        height: 70px;
+        position: relative;
+        padding: 0 15px;
+        display: flex;
+        align-items: center;
+        label {
+            flex-grow: 1;
+            font-weight: 500;
+        }
+        img {
+            width: 24px;
+            height: 24px;
+        }
+        &::after {
+            content: '';
+            height: 1px;
+            transform: scaleY(0.5);
+            background-color: #f2f4f5;
+            position: absolute;
+            left: 15px;
+            right: 15px;
+            bottom: 0;
+        }
+        &:last-child {
+            &::after {
+                content: none;
+            }
+        }
+    }
+    .notice {
+        padding: 15px;
+        font-size: 13px;
+    }
+}
+</style>

+ 108 - 6
src/main/zmj_mp/src/views/Login.vue

@@ -25,7 +25,15 @@
             <img class="icon" src="../assets/icon_code.png" />
             <input placeholder="请输入验证码" type="tel" v-model="code" />
         </div>
-        <div class="tip">为了您的住房便捷,请正确输入您的信息进行绑定</div>
+        <div class="tip" @click="checked = !checked">
+            <img class="cb" src="../assets/checkbox_checked.png" v-if="checked" />
+            <img class="cb" src="../assets/checkbox.png" v-else />
+            我已阅读并同意<span class="link" @click.stop="onShowTip(1)">&nbsp;入住须知&nbsp;</span>和<span
+                class="link"
+                @click.stop="onShowTip(2)"
+                >&nbsp;退宿须知</span
+            >
+        </div>
         <div class="btn" :class="{ disabled: disabled, loading: loading }" @click="bind">
             <vue-loading
                 v-if="loading"
@@ -35,9 +43,23 @@
             ></vue-loading>
             确认绑定
         </div>
+
+        <transition name="fade"> <div class="mask" v-if="showTip" @click="showTip = false"></div></transition>
+        <transition name="zoom">
+            <div class="dialog" v-if="showTip">
+                <div class="title">{{ tipType === 1 ? '入住须知' : '退宿须知' }}</div>
+                <checkin-notice class="body" v-if="tipType === 1"></checkin-notice>
+                <checkout-notice class="body" v-else></checkout-notice>
+                <div class="btn-wrapper">
+                    <div class="dialog-btn" @click="confirm">确认并同意</div>
+                </div>
+            </div>
+        </transition>
     </div>
 </template>
 <script>
+import CheckinNotice from './CheckinNotice';
+import CheckoutNotice from './CheckoutNotice';
 export default {
     name: 'login',
     metaInfo: {
@@ -51,7 +73,10 @@ export default {
             code: '',
             loading: false,
             time: 0,
-            sending: false
+            sending: false,
+            checked: false,
+            tipType: 2,
+            showTip: false
         };
     },
     computed: {
@@ -62,7 +87,8 @@ export default {
                     this.id
                 ) &&
                 /^1[3-9]\d{9}$/.test(this.phone) &&
-                this.code
+                this.code &&
+                this.checked
             );
         }
     },
@@ -139,7 +165,19 @@ export default {
                         this.$toast('发送失败,请稍后再试');
                     }
                 });
+        },
+        onShowTip(i) {
+            this.tipType = i;
+            this.showTip = true;
+        },
+        confirm() {
+            this.showTip = false;
+            this.checked = true;
         }
+    },
+    components: {
+        CheckinNotice,
+        CheckoutNotice
     }
 };
 </script>
@@ -207,12 +245,21 @@ export default {
     }
 }
 .tip {
-    width: calc(100vw - 64px);
+    width: calc(100vw - 40px);
     margin: 20px auto 0 auto;
     font-size: 14px;
-    color: #f7931d;
     line-height: 20px;
-    text-align: center;
+    color: #aaacad;
+    display: flex;
+    align-items: center;
+    .link {
+        color: #f7931d;
+    }
+    .cb {
+        width: 16px;
+        height: 16px;
+        margin-right: 5px;
+    }
 }
 .btn {
     width: 230px;
@@ -240,4 +287,59 @@ export default {
         bottom: 0;
     }
 }
+.mask {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    background-color: rgba(0, 0, 0, 0.68);
+}
+.dialog {
+    width: calc(100% - 76px);
+    height: calc(100% - 200px);
+    background: white;
+    border-radius: 4px;
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    margin: auto;
+    display: flex;
+    flex-direction: column;
+    .title {
+        height: 52px;
+        line-height: 52px;
+        text-align: center;
+        font-size: 16px;
+        font-weight: 500;
+        color: black;
+    }
+    .body {
+        flex-basis: 0;
+        flex-grow: 1;
+        overflow: auto;
+        -webkit-overflow-scrolling: touch;
+        padding: 0 15px;
+        font-size: 12px;
+        color: black;
+    }
+    .btn-wrapper {
+        padding: 12px 0;
+        .dialog-btn {
+            width: 200px;
+            height: 44px;
+            min-height: 44px;
+            margin: auto;
+            text-align: center;
+            line-height: 44px;
+            background: rgba(255, 143, 0, 1);
+            border-radius: 22px;
+            font-size: 16px;
+            font-weight: 500;
+            color: white;
+        }
+    }
+}
 </style>

+ 7 - 0
src/main/zmj_mp/src/views/User.vue

@@ -61,6 +61,13 @@
                 </div>
                 <img src="../assets/icon_into.png" class="into" />
             </div>
+            <div class="menu-cell" v-if="roomInfo && !roomInfo.checkout">
+                <img src="../assets/icon_help.png" class="icon" />
+                <div class="title" @click="$router.push('/help')">
+                    帮助说明
+                </div>
+                <img src="../assets/icon_into.png" class="into" />
+            </div>
         </div>
     </div>
 </template>

+ 1 - 1
src/main/zmj_mp/vue.config.js

@@ -19,7 +19,7 @@ module.exports = {
         config.plugin('vConsole').use(vConsolePlugin, [
             {
                 filter: [], // 需要过滤的入口文件
-                enable: true // 发布代码前记得改回 false
+                enable: false // 发布代码前记得改回 false
             }
         ]);
     }