浏览代码

WeekList

master
Kobus 5 年前
父节点
当前提交
b13a966bcb
共有 2 个文件被更改,包括 10 次插入4 次删除
  1. 7
    1
      src/components/timeshare/buy/weekListComponent.vue
  2. 3
    3
      src/store/modules/timeshare/weekList.js

+ 7
- 1
src/components/timeshare/buy/weekListComponent.vue 查看文件

@@ -3,9 +3,12 @@
3 3
     <table class="table table-bordered">
4 4
       <thead>
5 5
         <tr>
6
+          <th>Region</th>
6 7
           <th>Resort</th>
7 8
           <th>Unit Number</th>
8 9
           <th>Week Number</th>
10
+          <th>Arrival Date</th>
11
+          <th>Departure Date</th>
9 12
           <th>Bedrooms</th>
10 13
           <th>Price</th>
11 14
           <th>Status</th>
@@ -14,9 +17,12 @@
14 17
       </thead>
15 18
       <tbody>
16 19
         <tr v-for="(item, i) in filteredWeeks" :key="i">
17
-          <td>{{item.resort.resortName}}</td>
20
+          <td>{{item.region ? item.region.regionName : ''}}</td>
21
+          <td>{{item.resort ? item.resort.resortName : ''}}</td>
18 22
           <td>{{item.unitNumber}}</td>
19 23
           <td>{{item.weekNumber}}</td>
24
+          <td>{{item.arrivalDate}}</td>
25
+          <td>{{item.departureDate}}</td>
20 26
           <td>{{item.bedrooms}}</td>
21 27
           <td>{{item.sellPrice | toCurrency}}</td>
22 28
           <td>{{item.status ? item.status.description : ''}}</td>

+ 3
- 3
src/store/modules/timeshare/weekList.js 查看文件

@@ -33,11 +33,11 @@ export default {
33 33
       const {
34 34
         filter,
35 35
       } = state;
36
-      console.log(JSON.stringify(weekList));
36
+      // console.log(JSON.stringify(weekList));
37 37
       if (filter) {
38 38
         if (filter.region) {
39
-          weekList = _.filter(weekList, x => x.region
40
-            && x.region.regionCode === filter.region.regionCode);
39
+          weekList = _.filter(weekList, x => x.region && x.region.regionCode === filter.region
40
+            .regionCode);
41 41
         }
42 42
         if (filter.resort) {
43 43
           weekList = _.filter(weekList, x => x.resort.resortCode

正在加载...
取消
保存