George Williams 4 年前
父节点
当前提交
d4f76a5f85

+ 326
- 309
src/components/admin/status/editTimeShareAdminPage.vue 查看文件

@@ -9,52 +9,7 @@
9 9
             </div>
10 10
             <div align="left" class="custom-control custom-switch mb-2">
11 11
               <div class="row">
12
-                <div align="center" class="col">
13
-                  <!-- <label class="mr-5">Were you referred by an agent?</label> -->
14
-                  <!-- <input
15
-                  type="checkbox"
16
-                  class="custom-control-input"
17
-                  id="customSwitch1"
18
-                  :checked="refAgent"
19
-                  @change="changeRef"
20
-                /> -->
21
-                  <!-- <label class="custom-control-label" for="customSwitch1">{{
22
-                  refAgent ? "Yes" : "No"
23
-                }}</label> -->
24
-                  <!-- <div class="refbyAgent" :class="{ 'refbyAgent--clicked': refAgent }">
25
-                  <div class="col-md-6" v-if="refAgent">
26
-                    <label for="Name of Agency">Agency</label>
27
-                    <select
28
-                      class="form-control uniSelect"
29
-                      id="Agency"
30
-                      name="agency"
31
-                      v-model="sellItem.agencyId"
32
-                    >
33
-                      <option v-for="(item, i) in agencies" :key="i" :value="item.id">
34
-                        {{ item.agencyName }}
35
-                      </option>
36
-                    </select>
37
-                  </div>
38
-                  <div class="col-md-6" v-if="refAgent">
39
-                    <label for="Name of Agent">Agent</label>
40
-                    <select
41
-                      class="form-control uniSelect"
42
-                      id="agent"
43
-                      name="agent"
44
-                      v-model="sellItem.agentId"
45
-                      :disabled="!sellItem.agencyId"
46
-                    >
47
-                      <option
48
-                        v-for="(item, i) in displayNotDeletedAgents"
49
-                        :key="i"
50
-                        :value="item.id"
51
-                      >
52
-                        <div>{{ item.name + " " + item.surname }}</div>
53
-                      </option>
54
-                    </select>
55
-                  </div>
56
-                </div> -->
57
-                </div>
12
+                <div align="center" class="col"></div>
58 13
               </div>
59 14
             </div>
60 15
 
@@ -64,8 +19,11 @@
64 19
               <div class="form-row">
65 20
                 <div class="form-group col-md-6">
66 21
                   <div class="input-group">
67
-                    <!-- {{weekParam}} -->
68
-                    <label class="uniSelectLabel" for="weekInfoRegionSelect">REGION</label>
22
+                    <label v-if="!selectedRegion" class="uniSelectLabel" for="weekInfoRegionSelect"
23
+                      >REGION</label
24
+                    >
25
+                  </div>
26
+                  <float-label label="REGION" fixed>
69 27
                     <select
70 28
                       class="form-control uniSelect"
71 29
                       v-model="selectedRegion"
@@ -75,36 +33,41 @@
75 33
                         region.regionName
76 34
                       }}</option>
77 35
                     </select>
78
-                    <div class="validation"></div>
79
-                  </div>
36
+                  </float-label>
37
+
38
+                  <div class="validation"></div>
39
+
80 40
                   <div class="validation"></div>
81 41
                 </div>
82 42
                 <div class="form-group col-md-6">
83 43
                   <div class="input-group">
84
-                    <label class="uniSelectLabel" for="weekInfoResortSelect">RESORT NAME</label>
44
+                    <float-label label="RESORT NAME" style="width:100%" fixed>
45
+                      <select class="form-control uniSelect" v-model="selectedResort">
46
+                        <option value="Other">Other</option>
47
+                        <option
48
+                          v-for="(resort, r) in filteredResort"
49
+                          :key="r"
50
+                          :value="resort.resortCode"
51
+                          >{{ resort.resortName }}</option
52
+                        >
53
+                      </select>
54
+                    </float-label>
85 55
 
86
-                    <select class="form-control uniSelect" v-model="selectedResort">
87
-                      <option value="Other">Other</option>
88
-                      <option
89
-                        v-for="(resort, r) in filteredResort"
90
-                        :key="r"
91
-                        :value="resort.resortCode"
92
-                        >{{ resort.resortName }}</option
93
-                      >
94
-                    </select>
95 56
                     <div class="validation"></div>
96 57
                   </div>
97 58
                   <div class="validation"></div>
98 59
                 </div>
99 60
                 <div class="form-group col-md-6">
100
-                  <input
101
-                    class="form-control"
102
-                    v-if="weekParam.otherResort"
103
-                    placeholder="NAME OF RESORT (* IF OTHER)"
104
-                    type="text"
105
-                    name="other"
106
-                    v-model="weekParam.otherResortName"
107
-                  />
61
+                  <float-label>
62
+                    <input
63
+                      class="form-control"
64
+                      v-if="weekParam.otherResort"
65
+                      placeholder="NAME OF RESORT (* IF OTHER)"
66
+                      type="text"
67
+                      name="other"
68
+                      v-model="weekParam.otherResortName"
69
+                    />
70
+                  </float-label>
108 71
                 </div>
109 72
                 <div class="form-group col-md-6">
110 73
                   <div v-if="weekParam.otherResort">
@@ -112,137 +75,158 @@
112 75
                       >REGION</label
113 76
                     >
114 77
                   </div>
115
-
116
-                  <select
117
-                    class="form-control uniSelect"
118
-                    v-if="weekParam.otherResort"
119
-                    name="region"
120
-                    id="region"
121
-                    v-model="weekParam.region"
122
-                  >
123
-                    <option v-for="(region, r) in regions" :key="r">{{ region.regionName }}</option>
124
-                  </select>
78
+                  <float-label>
79
+                    <select
80
+                      class="form-control uniSelect"
81
+                      v-if="weekParam.otherResort"
82
+                      name="region"
83
+                      id="region"
84
+                      v-model="weekParam.region"
85
+                    >
86
+                      <option v-for="(region, r) in regions" :key="r">{{
87
+                        region.regionName
88
+                      }}</option>
89
+                    </select>
90
+                  </float-label>
125 91
                 </div>
126 92
                 <div class="form-group col-md-6">
127
-                  <input
128
-                    type="number"
129
-                    class="form-control"
130
-                    name="unitNumber"
131
-                    id="unitNumber"
132
-                    placeholder="UNIT NUMBER"
133
-                    v-model="weekParam.unitNumber"
134
-                    data-msg="Please enter unit number"
135
-                  />
93
+                  <float-label>
94
+                    <input
95
+                      type="number"
96
+                      class="form-control"
97
+                      name="unitNumber"
98
+                      id="unitNumber"
99
+                      placeholder="UNIT NUMBER"
100
+                      v-model="weekParam.unitNumber"
101
+                      data-msg="Please enter unit number"
102
+                    />
103
+                  </float-label>
104
+
136 105
                   <div class="validation"></div>
137 106
                 </div>
138 107
                 <div class="form-group col-md-6">
139
-                  <input
140
-                    type="text"
141
-                    class="form-control"
142
-                    name="week"
143
-                    id="week"
144
-                    placeholder="UNIT / WEEK NUMBER"
145
-                    v-model="weekParam.weekNumber"
146
-                    data-msg="Please enter week number"
147
-                  />
108
+                  <float-label>
109
+                    <input
110
+                      type="text"
111
+                      class="form-control"
112
+                      name="week"
113
+                      id="week"
114
+                      placeholder="UNIT / WEEK NUMBER"
115
+                      v-model="weekParam.weekNumber"
116
+                      data-msg="Please enter week number"
117
+                    />
118
+                  </float-label>
119
+
148 120
                   <div class="validation"></div>
149 121
                 </div>
150
-                <div class="form-group col-md-6">
151
-                  <label class="uniSelectLabel" for="region">SEASON</label>
122
+                <div class="form-group col-md-6 mt-2">
123
+                  <float-label label="SEASON" fixed>
124
+                    <select
125
+                      class="form-control uniSelect"
126
+                      name="season"
127
+                      id="season"
128
+                      v-model="selectedSeason"
129
+                    >
130
+                      <option v-for="(season, r) in seasons" :key="r">{{ season.name }}</option>
131
+                    </select>
132
+                  </float-label>
152 133
 
153
-                  <select
154
-                    class="form-control uniSelect"
155
-                    name="season"
156
-                    id="season"
157
-                    v-model="selectedSeason"
158
-                  >
159
-                    <option v-for="(season, r) in seasons" :key="r">{{ season.name }}</option>
160
-                  </select>
161 134
                   <div class="validation"></div>
162 135
                 </div>
163
-                <div class="form-group col-md-6">
164
-                  <label class="uniSelectLabel" for="region">BEDROOM/S</label>
136
+                <div class="form-group col-md-6 mt-2">
137
+                  <float-label label="BEDROOM/S" fixed>
138
+                    <select
139
+                      class="form-control uniSelect"
140
+                      name="region"
141
+                      id="region"
142
+                      v-model="selectedBedrooms"
143
+                    >
144
+                      <option v-for="(item, i) in resortBedrooms" :key="i">{{ item }}</option>
145
+                    </select>
146
+                  </float-label>
165 147
 
166
-                  <select
167
-                    class="form-control uniSelect"
168
-                    name="region"
169
-                    id="region"
170
-                    v-model="selectedBedrooms"
171
-                  >
172
-                    <option v-for="(item, i) in resortBedrooms" :key="i">{{ item }}</option>
173
-                  </select>
174 148
                   <div class="validation"></div>
175 149
                 </div>
176
-                <div class="form-group col-md-6">
177
-                  <label class="uniSelectLabel" for="region">SLEEP MAX</label>
150
+                <div class="form-group col-md-6 mt-2">
151
+                  <float-label label="SLEEP MAX" fixed>
152
+                    <select
153
+                      class="form-control uniSelect"
154
+                      name="region"
155
+                      id="region"
156
+                      v-model="selectedMaxSleep"
157
+                    >
158
+                      <option v-for="(item, i) in maxSleep" :key="i">{{ item }}</option>
159
+                    </select>
160
+                  </float-label>
178 161
 
179
-                  <select
180
-                    class="form-control uniSelect"
181
-                    name="region"
182
-                    id="region"
183
-                    v-model="selectedMaxSleep"
184
-                  >
185
-                    <option v-for="(item, i) in maxSleep" :key="i">{{ item }}</option>
186
-                  </select>
187 162
                   <div class="validation"></div>
188 163
                 </div>
189
-                <div class="form-group col-md-6">
190
-                  <input
191
-                    type="number"
192
-                    class="form-control"
193
-                    name="levy"
194
-                    id="levy"
195
-                    placeholder="Levy Amount"
196
-                    v-model="weekParam.levyAmount"
197
-                    data-msg="Please enter levy amount"
198
-                  />
164
+                <div class="form-group col-md-6 mt-2">
165
+                  <float-label>
166
+                    <input
167
+                      type="number"
168
+                      class="form-control"
169
+                      name="levy"
170
+                      id="levy"
171
+                      placeholder="Levy Amount"
172
+                      v-model="weekParam.levyAmount"
173
+                      data-msg="Please enter levy amount"
174
+                    />
175
+                  </float-label>
176
+
199 177
                   <div class="validation"></div>
200 178
                 </div>
201
-                <div class="form-group col-md-6">
202
-                  <label class="uniSelectLabel" for="region">WEEK TYPE</label>
203
-                  <select
204
-                    class="form-control uniSelect"
205
-                    name="region"
206
-                    id="region"
207
-                    v-model="selectedWeekType"
208
-                  >
209
-                    <option :key="0">Flexi</option>
210
-                    <option :key="1">Fixed</option>
211
-                    <option :key="2">Module</option>
212
-                    <option :key="3">Syndicate</option>
213
-                  </select>
179
+                <div class="form-group col-md-6 mt-2">
180
+                  <float-label label="WEEK TYPE" fixed>
181
+                    <select
182
+                      class="form-control uniSelect"
183
+                      name="region"
184
+                      id="region"
185
+                      v-model="selectedWeekType"
186
+                    >
187
+                      <option :key="0">Flexi</option>
188
+                      <option :key="1">Fixed</option>
189
+                      <option :key="2">Module</option>
190
+                      <option :key="3">Syndicate</option>
191
+                    </select>
192
+                  </float-label>
214 193
                 </div>
215 194
                 <div class="form-row">
216
-                  <div class="form-group col-md-6">
217
-                    Arrival Date :
218
-                    <input
219
-                      type="datetime-local"
220
-                      class="form-control"
221
-                      name="occupationDate1"
222
-                      v-model="weekParam.arrivalDate"
223
-                    />
195
+                  <div class="form-group col-md-6 mt-2">
196
+                    <float-label label="ARRIVAL DATE" fixed>
197
+                      <input
198
+                        type="date"
199
+                        class="form-control"
200
+                        name="occupationDate1"
201
+                        v-model="dateParam"
202
+                      />
203
+                    </float-label>
204
+
224 205
                     <div class="validation"></div>
225 206
                   </div>
226
-                  <div class="form-group col-md-6">
227
-                    Departure Date :
228
-                    <input
229
-                      type="datetime-local"
230
-                      class="form-control"
231
-                      name="occupationDate2"
232
-                      v-model="weekParam.departureDate"
233
-                    />
207
+                  <div class="form-group col-md-6 mt-2">
208
+                    <float-label label="DEPARTURE DATE" fixed>
209
+                      <input
210
+                        type="date"
211
+                        class="form-control"
212
+                        name="occupationDate2"
213
+                        v-model="depDateParam"
214
+                      />
215
+                    </float-label>
216
+
234 217
                     <div class="validation"></div>
235 218
                   </div>
236
-                  <div class="form-group col-md-6">
237
-                    Purchase Price:
238
-                    <input
239
-                      class="form-control"
240
-                      placeholder="R"
241
-                      type="number"
242
-                      step="any"
243
-                      name="purchasePrice"
244
-                      v-model="weekParam.sellPrice"
245
-                    />
219
+                  <div class="form-group col-md-6 mt-2">
220
+                    <float-label label="PURCHASE PRICE">
221
+                      <input
222
+                        class="form-control"
223
+                        placeholder="R"
224
+                        type="number"
225
+                        step="any"
226
+                        name="purchasePrice"
227
+                        v-model="weekParam.sellPrice"
228
+                      />
229
+                    </float-label>
246 230
                     <div class="validation"></div>
247 231
                   </div>
248 232
                 </div>
@@ -258,9 +242,9 @@
258 242
                     id="customSwitch2"
259 243
                     :checked="sellItem.currentYearBanked"
260 244
                   />
261
-                  <label class="custom-control-label" for="customSwitch2">{{
262
-                    sellItem.currentYearBanked ? "Yes" : "No"
263
-                  }}</label>
245
+                  <label class="custom-control-label" for="customSwitch2">
246
+                    {{ sellItem.currentYearBanked ? "Yes" : "No" }}
247
+                  </label>
264 248
                   <div
265 249
                     class="spacebanked1"
266 250
                     :class="{ 'spacebanked1--clicked': sellItem.currentYearBanked }"
@@ -271,24 +255,6 @@
271 255
                         v-if="sellItem.currentYearBanked"
272 256
                         >Please confirm with whom</label
273 257
                       >
274
-                      <select
275
-                        class="form-control uniSelect"
276
-                        id="howMarried"
277
-                        v-model="indiv.howMarried"
278
-                      >
279
-                        <option value="N/A">N/A</option>
280
-                        <option value="In Community Of Property">In Community Of Property</option>
281
-                        <option value="Out of Community Of Property"
282
-                          >Out of Community Of Property</option
283
-                        >
284
-                        <option value="Other">Other</option>
285
-                        <option value="Traditional Wedding">Traditional Wedding</option>
286
-                        <option value="Single">Single</option>
287
-                        <option value="Divorced">Divorced</option>
288
-                        <option value="Widow">Widow</option>
289
-                        <option value="Committed Relationship">Committed Relationship</option>
290
-                        <option value="Partner">Partner</option>
291
-                      </select>
292 258
                     </div>
293 259
                     <div class="validation"></div>
294 260
                   </div>
@@ -296,103 +262,124 @@
296 262
               </div>
297 263
             </div>
298 264
 
299
-            <div class="section-header">
265
+            <div class="section-header" style="margin-top:50px">
300 266
               <h2>Detailed Individual Information</h2>
301 267
             </div>
302 268
             <div class="form">
303 269
               <div class="row">
304 270
                 <div class="form-group col-md-6">
305
-                  <input
306
-                    type="text"
307
-                    name="name"
308
-                    class="form-control"
309
-                    id="name"
310
-                    placeholder="Name"
311
-                    data-rule="minlen:4"
312
-                    data-msg="Please enter your name"
313
-                    v-model="week.owner.name"
314
-                  />
271
+                  <float-label>
272
+                    <input
273
+                      type="text"
274
+                      name="name"
275
+                      class="form-control"
276
+                      id="name"
277
+                      placeholder="Name"
278
+                      data-rule="minlen:4"
279
+                      data-msg="Please enter your name"
280
+                      v-model="week.owner.name"
281
+                    />
282
+                  </float-label>
283
+
315 284
                   <div class="validation"></div>
316 285
                 </div>
317 286
                 <div class="form-group col-md-6">
318
-                  <input
319
-                    type="text"
320
-                    class="form-control"
321
-                    name="surname"
322
-                    id="surname"
323
-                    placeholder="Surname"
324
-                    data-msg="Please enter your surname"
325
-                    v-model="week.owner.surname"
326
-                  />
287
+                  <float-label>
288
+                    <input
289
+                      type="text"
290
+                      class="form-control"
291
+                      name="surname"
292
+                      id="surname"
293
+                      placeholder="Surname"
294
+                      data-msg="Please enter your surname"
295
+                      v-model="week.owner.surname"
296
+                    />
297
+                  </float-label>
298
+
327 299
                   <div class="validation"></div>
328 300
                 </div>
329 301
               </div>
330
-              <div class="row">
302
+              <div class="row mt-2">
331 303
                 <div class="form-group col-md-6">
332
-                  <input
333
-                    type="text"
334
-                    name="idnum"
335
-                    class="form-control"
336
-                    id="idnum"
337
-                    placeholder="ID Number"
338
-                    data-rule="minlen:4"
339
-                    data-msg="Please enter your ID number"
340
-                    v-model="week.owner.idNumber"
341
-                  />
304
+                  <float-label>
305
+                    <input
306
+                      type="text"
307
+                      name="idnum"
308
+                      class="form-control"
309
+                      id="idnum"
310
+                      placeholder="ID Number"
311
+                      data-rule="minlen:4"
312
+                      data-msg="Please enter your ID number"
313
+                      v-model="week.owner.idNumber"
314
+                    />
315
+                  </float-label>
316
+
342 317
                   <div class="validation"></div>
343 318
                 </div>
344 319
                 <div class="form-group col-md-6">
345
-                  <input
346
-                    type="text"
347
-                    class="form-control"
348
-                    name="company"
349
-                    id="company"
350
-                    placeholder="Company Reg Number"
351
-                    data-rule="minlen:4"
352
-                    data-msg="Please enter your company reg number"
353
-                    v-model="week.owner.companyRegNumber"
354
-                  />
320
+                  <float-label>
321
+                    <input
322
+                      type="text"
323
+                      class="form-control"
324
+                      name="company"
325
+                      id="company"
326
+                      placeholder="Company Reg Number"
327
+                      data-rule="minlen:4"
328
+                      data-msg="Please enter your company reg number"
329
+                      v-model="week.owner.companyRegNumber"
330
+                    />
331
+                  </float-label>
332
+
355 333
                   <div class="validation"></div>
356 334
                 </div>
357 335
               </div>
358
-              <div class="row">
336
+              <div class="row mt-2">
359 337
                 <div class="form-group col-md-6">
360
-                  <input
361
-                    type="text"
362
-                    class="form-control"
363
-                    name="email"
364
-                    id="email"
365
-                    placeholder="Email Address"
366
-                    data-msg="Please enter your email address"
367
-                    v-model="week.owner.emailAddress"
368
-                  />
338
+                  <float-label>
339
+                    <input
340
+                      type="text"
341
+                      class="form-control"
342
+                      name="email"
343
+                      id="email"
344
+                      placeholder="Email Address"
345
+                      data-msg="Please enter your email address"
346
+                      v-model="week.owner.emailAddress"
347
+                    />
348
+                  </float-label>
349
+
369 350
                   <div class="validation"></div>
370 351
                 </div>
371 352
               </div>
372
-              <div class="row">
353
+              <div class="row mt-2">
373 354
                 <div class="form-group col-md-6">
374
-                  <input
375
-                    type="text"
376
-                    name="cell"
377
-                    class="form-control"
378
-                    id="cell"
379
-                    placeholder="Cell Number"
380
-                    data-rule="minlen:4"
381
-                    data-msg="Please enter your cell number"
382
-                    v-model="week.owner.cellNumner"
383
-                  />
355
+                  <float-label>
356
+                    <input
357
+                      type="text"
358
+                      name="cell"
359
+                      class="form-control"
360
+                      id="cell"
361
+                      placeholder="Cell Number"
362
+                      data-rule="minlen:4"
363
+                      data-msg="Please enter your cell number"
364
+                      v-model="week.owner.cellNumner"
365
+                    />
366
+                  </float-label>
367
+
384 368
                   <div class="validation"></div>
385 369
                 </div>
386 370
                 <div class="form-group col-md-6">
387
-                  <input
388
-                    type="text"
389
-                    class="form-control"
390
-                    name="landline"
391
-                    id="landline"
392
-                    placeholder="Landline Number"
393
-                    data-msg="Please enter your landline number"
394
-                    v-model="week.owner.landlineNumber"
395
-                  />
371
+                  <float-label>
372
+                    <input
373
+                      type="text"
374
+                      class="form-control"
375
+                      name="landline"
376
+                      id="landline"
377
+                      placeholder="Landline Number"
378
+                      data-msg="Please enter your landline number"
379
+                      v-model="week.owner.landlineNumber"
380
+                    />
381
+                  </float-label>
382
+
396 383
                   <div class="validation"></div>
397 384
                 </div>
398 385
               </div>
@@ -403,37 +390,47 @@
403 390
             <div class="form">
404 391
               <div class="row">
405 392
                 <div class="form-group col-md-6">
406
-                  <label class="uniSelectLabel" for="region">STATUS</label>
407
-                  <select
408
-                    class="form-control uniSelect"
409
-                    name="region"
410
-                    id="region"
411
-                    v-model="selectedWeekType"
393
+                  <label v-if="!weekParam.weekStatus" class="uniSelectLabel" for="status"
394
+                    >STATUS</label
412 395
                   >
413
-                    <option :key="0">For Sale</option>
414
-                    <option :key="1">Sold</option>
415
-                  </select>
396
+                  <float-label label="STATUS" fixed>
397
+                    <select
398
+                      class="form-control uniSelect"
399
+                      name="status"
400
+                      id="status"
401
+                      v-model="weekParam.weekStatus"
402
+                    >
403
+                      <option :key="0">For Sale</option>
404
+                      <option :key="1">Sold</option>
405
+                    </select>
406
+                  </float-label>
416 407
                 </div>
417 408
                 <div class="form-group col-md-6">
418
-                  <label class="uniSelectLabel" for="region">Publish</label>
419
-                  <select
420
-                    class="form-control uniSelect"
421
-                    name="region"
422
-                    id="region"
423
-                    v-model="selectedWeekType"
409
+                  <label v-if="!weekParam.publish" class="uniSelectLabel" for="publish"
410
+                    >Publish</label
424 411
                   >
425
-                    <option :key="0">Yes</option>
426
-                    <option :key="1">No</option>
427
-                  </select>
412
+                  <float-label label="Publish" fixed>
413
+                    <select
414
+                      class="form-control uniSelect"
415
+                      name="publish"
416
+                      id="publish"
417
+                      v-model="weekParam.publish"
418
+                    >
419
+                      <option :key="0" :value="false">No</option>
420
+                      <option :key="1" :value="true">Yes</option>
421
+                    </select>
422
+                  </float-label>
428 423
                 </div>
429
-                <div class="form-group col-md-6">
430
-                  Date Published :
431
-                  <input
432
-                    type="datetime-local"
433
-                    class="form-control"
434
-                    name="occupationDate2"
435
-                    v-model="datetime"
436
-                  />
424
+                <div class="form-group col-md-6 mt-2">
425
+                  <float-label label="DATE PUBLISHED" fixed>
426
+                    <input
427
+                      type="date"
428
+                      class="form-control"
429
+                      name="publishDate"
430
+                      v-model="pubDateParam"
431
+                    />
432
+                  </float-label>
433
+
437 434
                   <div class="validation"></div>
438 435
                 </div>
439 436
               </div>
@@ -442,9 +439,7 @@
442 439
               <div id="sendmessage">Your details has been sent. Thank you!</div>
443 440
               <div id="errormessage"></div>
444 441
               <div class="text-center col-12">
445
-                <button class="btn-solid-blue" v-on:click="saveEdit()">
446
-                  Save
447
-                </button>
442
+                <button class="btn-solid-blue" v-on:click="saveEdit()">Save</button>
448 443
               </div>
449 444
               <div class="text-center col-12">
450 445
                 <button class="btn-solid-blue" v-on:click="backToListView()">Back</button>
@@ -488,7 +483,12 @@ export default {
488 483
       selectedSeason: {},
489 484
       selectedBedrooms: {},
490 485
       selectedMaxSleep: {},
491
-      selectedWeekType: {}
486
+      selectedWeekType: {},
487
+      selectedStatus: {},
488
+      selectedPublish: {},
489
+      dateParam: {},
490
+      depDateParam: {},
491
+      pubDateParam: {}
492 492
     };
493 493
   },
494 494
   components: {
@@ -513,6 +513,14 @@ export default {
513 513
     this.selectedBedrooms = this.weekParam.bedrooms;
514 514
     this.selectedMaxSleep = this.weekParam.maxSleep;
515 515
     this.selectedWeekType = this.weekParam.weekType;
516
+    this.selectedStatus = this.weekParam.status;
517
+    this.selectedPublish = this.weekParam.publish;
518
+    var date = new Date(this.weekParam.arrivalDate).toISOString().substring(0, 10);
519
+    this.dateParam = date;
520
+    var depDate = new Date(this.weekParam.departureDate).toISOString().substring(0, 10);
521
+    this.depDateParam = depDate;
522
+    var datePub = new Date(this.weekParam.publish).toISOString().substring(0, 10);
523
+    this.pubDateParam = datePub;
516 524
   },
517 525
   created() {
518 526
     this.initTimeshare(this.weekId);
@@ -579,29 +587,38 @@ export default {
579 587
       });
580 588
       this.resorts.forEach(resort => {
581 589
         if (resort.resortCode === this.selectedResort) {
582
-          this.weekParam.resort = resort;
590
+          this.weekParam.resortName = resort.resortName;
583 591
         }
584 592
       });
585 593
       this.seasons.forEach(season => {
586
-        if (season.name === this.selectedSeason) {
587
-          this.weekParam.season = season;
594
+        if (season.name === this.selectedSeason.name) {
595
+          this.weekParam.season = season.name;
588 596
         }
589 597
       });
590
-      this.bedrooms.forEach(beedroom => {
598
+      this.resortBedrooms.forEach(bedroom => {
591 599
         if (bedroom === this.selectedBedrooms) {
592
-          this.weekParam.beedroom = beedroom;
600
+          this.weekParam.bedroom = bedroom;
593 601
         }
594 602
       });
595 603
       this.maxSleep.forEach(sleepMax => {
596
-        if (maxSleep === this.selectedMaxSleep) {
597
-          this.weekParam.maxSleep = maxSleep;
598
-        }
599
-      });
600
-      this.weekType.forEach(typeWeek => {
601
-        if (weekType === this.selectedWeekType) {
602
-          this.weekParam.weekType = weekType;
604
+        if (sleepMax === this.selectedMaxSleep) {
605
+          this.weekParam.maxSleep = sleepMax;
603 606
         }
604 607
       });
608
+      this.weekParam.arrivalDate = new Date(this.dateParam).toISOString().substring(0, 10);
609
+      this.weekParam.departureDate = new Date(this.depDateParam).toISOString().substring(0, 10);
610
+      this.weekParam.publishedDate = new Date(this.pubDateParam).toISOString().substring(0, 10);
611
+      this.weekParam.regionId = this.weekParam.region.id;
612
+      this.weekParam.agentId = this.week.agentId;
613
+      this.weekParam.bankedWith = this.week.bankedWith;
614
+      this.weekParam.owner = this.week.owner;
615
+      parseFloat(this.weekParam.sellPrice);
616
+      parseFloat(this.weekParam.levyAmount);
617
+      delete this.weekParam.weekType;
618
+      delete this.weekParam.Owner;
619
+      delete this.weekParam.agency;
620
+      delete this.weekParam.agent;
621
+      delete this.status;
605 622
       console.log(this.weekParam);
606 623
       this.editSave(this.weekParam);
607 624
     },

+ 17
- 4
src/components/admin/status/timeshareAdminPage.vue 查看文件

@@ -57,7 +57,7 @@
57 57
         <div class="col">
58 58
           <button style="float:right" class="btn-solid-blue" type="button">Filter</button>
59 59
         </div>
60
-      </div> -->
60
+      </div>-->
61 61
       <div class="row">
62 62
         <div class="col-md-12">
63 63
           <ListView
@@ -66,6 +66,8 @@
66 66
             :deleteable="true"
67 67
             :showCustomAction="true"
68 68
             :CustomActionHeading="'Publish'"
69
+            :showColumnChooser="false"
70
+            :displayColumns="columns"
69 71
             @onRowClick="onRowClick"
70 72
             @onClearSelected="onClearSelected"
71 73
             @onEdit="onEdit"
@@ -87,7 +89,7 @@
87 89
           {{ ButtonMessage }}
88 90
         </button> 
89 91
         <div>{{ Message }}</div>
90
-      </div> -->
92
+      </div>-->
91 93
     </div>
92 94
   </main>
93 95
 </template>
@@ -104,7 +106,18 @@ export default {
104 106
   data() {
105 107
     return {
106 108
       user: Log.getUser(),
107
-      selectedItems: [],
109
+      columns: [
110
+        "owner",
111
+        "agent",
112
+        "resort",
113
+        "weekNumber",
114
+        "unitNumber",
115
+        "bedrooms",
116
+        "season",
117
+        "region",
118
+        "sellPrice"
119
+      ],
120
+      // selectedItems: [],
108 121
       showMessage: false,
109 122
       region: ""
110 123
     };
@@ -184,7 +197,7 @@ export default {
184 197
       this.selectedItems = items;
185 198
     },
186 199
     onEdit(item) {
187
-      this.$router.push({ name: 'EditTimeshare', params: { weekParam: item } });
200
+      this.$router.push({ name: "EditTimeshare", params: { weekParam: item } });
188 201
       // this.$router.push(`/editTimeShare/${item.id}`);
189 202
     },
190 203
     onClearSelected() {

+ 81
- 54
src/components/timeshare/sell/contentSection.vue 查看文件

@@ -18,9 +18,11 @@
18 18
                   :checked="refAgent"
19 19
                   @change="changeRef"
20 20
                 />
21
-                <label class="custom-control-label" for="customSwitch1">{{
21
+                <label class="custom-control-label" for="customSwitch1">
22
+                  {{
22 23
                   refAgent ? "Yes" : "No"
23
-                }}</label>
24
+                  }}
25
+                </label>
24 26
                 <div class="refbyAgent" :class="{ 'refbyAgent--clicked': refAgent }">
25 27
                   <div class="col-md-6" v-if="refAgent">
26 28
                     <label for="Name of Agency">Agency</label>
@@ -30,9 +32,11 @@
30 32
                       name="agency"
31 33
                       v-model="sellItem.agencyId"
32 34
                     >
33
-                      <option v-for="(item, i) in agencies" :key="i" :value="item.id">
34
-                        {{ item.agencyName }}
35
-                      </option>
35
+                      <option
36
+                        v-for="(item, i) in agencies"
37
+                        :key="i"
38
+                        :value="item.id"
39
+                      >{{ item.agencyName }}</option>
36 40
                     </select>
37 41
                   </div>
38 42
                   <div class="col-md-6" v-if="refAgent">
@@ -64,9 +68,11 @@
64 68
             <div class="form-row">
65 69
               <div class="form-group col-md-6 mt-2">
66 70
                 <div class="input-group">
67
-                  <label v-if="!sellItem.region" class="uniSelectLabel" for="weekInfoRegionSelect"
68
-                    >REGION</label
69
-                  >
71
+                  <label
72
+                    v-if="!sellItem.region"
73
+                    class="uniSelectLabel"
74
+                    for="weekInfoRegionSelect"
75
+                  >REGION</label>
70 76
                   <float-label label="REGION" style="width:100%">
71 77
                     <select
72 78
                       id="weekInfoRegionSelect"
@@ -75,9 +81,11 @@
75 81
                       @change="regionChange()"
76 82
                       style="font-size: 15px"
77 83
                     >
78
-                      <option v-for="(region, r) in regions" :key="r" :value="region">{{
84
+                      <option v-for="(region, r) in regions" :key="r" :value="region">
85
+                        {{
79 86
                         region.regionName
80
-                      }}</option>
87
+                        }}
88
+                      </option>
81 89
                     </select>
82 90
                   </float-label>
83 91
                 </div>
@@ -95,9 +103,11 @@
95 103
               </div>
96 104
               <div class="form-group col-md-6 mt-2">
97 105
                 <div class="input-group">
98
-                  <label v-if="!sellItem.resort" class="uniSelectLabel" for="weekInfoResortSelect"
99
-                    >RESORT NAME</label
100
-                  >
106
+                  <label
107
+                    v-if="!sellItem.resort"
108
+                    class="uniSelectLabel"
109
+                    for="weekInfoResortSelect"
110
+                  >RESORT NAME</label>
101 111
                   <float-label label="RESORT NAME" style="width:100%">
102 112
                     <select
103 113
                       id="weekInfoResortSelect"
@@ -106,9 +116,11 @@
106 116
                       @change="resortChange()"
107 117
                     >
108 118
                       <option value="Other">Other</option>
109
-                      <option v-for="(resort, r) in filteredResort" :key="r" :value="resort">{{
119
+                      <option v-for="(resort, r) in filteredResort" :key="r" :value="resort">
120
+                        {{
110 121
                         resort.resortName
111
-                      }}</option>
122
+                        }}
123
+                      </option>
112 124
                     </select>
113 125
                   </float-label>
114 126
                 </div>
@@ -194,9 +206,7 @@
194 206
                 <div class="validation"></div>
195 207
               </div>
196 208
               <div class="form-group col-md-6 mt-2">
197
-                <label v-if="!sellItem.bedrooms" class="uniSelectLabel" for="region"
198
-                  >BEDROOM/S</label
199
-                >
209
+                <label v-if="!sellItem.bedrooms" class="uniSelectLabel" for="region">BEDROOM/S</label>
200 210
                 <float-label label="BEDROOM/S">
201 211
                   <select
202 212
                     class="form-control uniSelect"
@@ -211,9 +221,7 @@
211 221
                 <div class="validation"></div>
212 222
               </div>
213 223
               <div class="form-group col-md-6 mt-2">
214
-                <label v-if="!sellItem.maxSleep" class="uniSelectLabel" for="region"
215
-                  >SLEEP MAX</label
216
-                >
224
+                <label v-if="!sellItem.maxSleep" class="uniSelectLabel" for="region">SLEEP MAX</label>
217 225
                 <float-label label="SLEEP MAX">
218 226
                   <select
219 227
                     class="form-control uniSelect"
@@ -243,9 +251,7 @@
243 251
                 <div class="validation"></div>
244 252
               </div>
245 253
               <div class="form-group col-md-6 mt-2">
246
-                <label v-if="!sellItem.weekType" class="uniSelectLabel" for="region"
247
-                  >WEEK TYPE</label
248
-                >
254
+                <label v-if="!sellItem.weekType" class="uniSelectLabel" for="region">WEEK TYPE</label>
249 255
                 <float-label label="WEEK TYPE">
250 256
                   <select
251 257
                     class="form-control uniSelect"
@@ -273,17 +279,20 @@
273 279
                   :checked="sellItem.currentYearBanked"
274 280
                   @change="changeCurrentBanked"
275 281
                 />
276
-                <label class="custom-control-label" for="customSwitch2">{{
282
+                <label class="custom-control-label" for="customSwitch2">
283
+                  {{
277 284
                   sellItem.currentYearBanked ? "Yes" : "No"
278
-                }}</label>
285
+                  }}
286
+                </label>
279 287
                 <div
280 288
                   class="spacebanked1"
281 289
                   :class="{ 'spacebanked1--clicked': sellItem.currentYearBanked }"
282 290
                 >
283 291
                   <div class="col-md-6">
284
-                    <label for="If yes, please confirm with whom" v-if="sellItem.currentYearBanked"
285
-                      >Please confirm with whom</label
286
-                    >
292
+                    <label
293
+                      for="If yes, please confirm with whom"
294
+                      v-if="sellItem.currentYearBanked"
295
+                    >Please confirm with whom</label>
287 296
                     <select
288 297
                       class="form-control uniSelect"
289 298
                       name="spacebankOwner"
@@ -373,9 +382,11 @@
373 382
               <div class="form-group col-md-6">
374 383
                 <div class="input-group">
375 384
                   <span v-if="!indiv.howMarried">
376
-                    <label v-if="indiv.howMarried === 'N/A'" for="howMarried" class="uniSelectLabel"
377
-                      >Marital Status</label
378
-                    >
385
+                    <label
386
+                      v-if="indiv.howMarried === 'N/A'"
387
+                      for="howMarried"
388
+                      class="uniSelectLabel"
389
+                    >Marital Status</label>
379 390
                   </span>
380 391
 
381 392
                   <float-label label="Marital Status" style="width:100%">
@@ -386,9 +397,7 @@
386 397
                     >
387 398
                       <option value="N/A">N/A</option>
388 399
                       <option value="In Community Of Property">In Community Of Property</option>
389
-                      <option value="Out of Community Of Property"
390
-                        >Out of Community Of Property</option
391
-                      >
400
+                      <option value="Out of Community Of Property">Out of Community Of Property</option>
392 401
                       <option value="Other">Other</option>
393 402
                       <option value="Traditional Wedding">Traditional Wedding</option>
394 403
                       <option value="Single">Single</option>
@@ -635,9 +644,9 @@
635 644
                 class="form-group col-md-12"
636 645
                 style="border:solid;border-width:2px; border-color:rgb(27, 117, 187); border-radius: 3px"
637 646
               >
638
-                <p style="text-align: left; margin:auto; padding:10px">
639
-                  1. With respect to my timeshare module/week, I confirm that:
640
-                </p>
647
+                <p
648
+                  style="text-align: left; margin:auto; padding:10px"
649
+                >1. With respect to my timeshare module/week, I confirm that:</p>
641 650
                 <div class="validation"></div>
642 651
               </div>
643 652
             </div>
@@ -655,9 +664,11 @@
655 664
                     :checked="sellItem.leviesPaidInFull"
656 665
                     @change="changeLeviesPaidInFull"
657 666
                   />
658
-                  <label class="custom-control-label" for="customSwitch3">{{
667
+                  <label class="custom-control-label" for="customSwitch3">
668
+                    {{
659 669
                     sellItem.leviesPaidInFull ? "Yes" : "No"
660
-                  }}</label>
670
+                    }}
671
+                  </label>
661 672
                 </div>
662 673
                 <div class="validation"></div>
663 674
               </div>
@@ -676,9 +687,11 @@
676 687
                     :checked="sellItem.weekPlacedForRental"
677 688
                     @change="changeWeekPlacedForRental"
678 689
                   />
679
-                  <label class="custom-control-label" for="customSwitch4">{{
690
+                  <label class="custom-control-label" for="customSwitch4">
691
+                    {{
680 692
                     sellItem.weekPlacedForRental ? "Yes" : "No"
681
-                  }}</label>
693
+                    }}
694
+                  </label>
682 695
                 </div>
683 696
                 <div class="validation"></div>
684 697
               </div>
@@ -799,14 +812,12 @@
799 812
               </div>
800 813
             </div>
801 814
             <div class="text-center col-12" v-if="CanSave">
802
-              <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">
803
-                SUBMIT
804
-              </button>
815
+              <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">SUBMIT</button>
805 816
               <button class="btn-solid-blue" v-else @click="newSale()">NEW WEEK</button>
806 817
             </div>
807 818
             <!-- <div class="text-center col-12">
808 819
               <button class="btn-solid-blue" @click="paygateRedirect()">PayGate</button>
809
-            </div> -->
820
+            </div>-->
810 821
             <br />
811 822
             <br />
812 823
           </div>
@@ -884,7 +895,11 @@ export default {
884 895
     ...mapGetters("fees", ["getListingFee"]),
885 896
     filteredResort() {
886 897
       let list = [];
887
-      if (this.sellItem && this.sellItem.region && this.sellItem.region.regionCode) {
898
+      if (
899
+        this.sellItem &&
900
+        this.sellItem.region &&
901
+        this.sellItem.region.regionCode
902
+      ) {
888 903
         const item = this.detailedRegion.find(
889 904
           region => region.region.regionCode === this.sellItem.region.regionCode
890 905
         );
@@ -912,7 +927,11 @@ export default {
912 927
     },
913 928
     CanSave() {
914 929
       if (this.indiv.howMarried === "In Community Of Property") {
915
-        if (this.indiv.spouseName || this.indiv.spouseSurname || this.spouseEmail) {
930
+        if (
931
+          this.indiv.spouseName ||
932
+          this.indiv.spouseSurname ||
933
+          this.spouseEmail
934
+        ) {
916 935
           return true;
917 936
         }
918 937
         return false;
@@ -922,7 +941,12 @@ export default {
922 941
   },
923 942
   methods: {
924 943
     ...mapActions("individual", ["getIndividual"]),
925
-    ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek", "getBlankWeek"]),
944
+    ...mapActions("timeshare", [
945
+      "initTimeshare",
946
+      "onResortChange",
947
+      "saveWeek",
948
+      "getBlankWeek"
949
+    ]),
926 950
     ...mapActions("payment", ["addPayment"]),
927 951
     ...mapActions("bank", ["getBanks"]),
928 952
     newSale() {
@@ -933,10 +957,11 @@ export default {
933 957
       if (this.userLoggedIn) {
934 958
         this.sellItem.ownerObject = this.indiv;
935 959
         this.sellItem.status = undefined;
936
-        this.saveWeek(this.sellItem).then(fulfilled => {
937
-          this.paygateRedirect();
938
-        });
939
-      } else this.$router.push("/user/login");
960
+        console.log(this.sellItem);
961
+        //   this.saveWeek(this.sellItem).then(fulfilled => {
962
+        //     this.paygateRedirect();
963
+        //   });
964
+      }
940 965
     },
941 966
     paygateRedirect() {
942 967
       var amount = this.getListingFee.amount;
@@ -992,7 +1017,9 @@ export default {
992 1017
       }
993 1018
     },
994 1019
     regionChange() {
995
-      this.sellItem.regionId = this.sellItem.region ? this.sellItem.region.id : 1;
1020
+      this.sellItem.regionId = this.sellItem.region
1021
+        ? this.sellItem.region.id
1022
+        : 1;
996 1023
     },
997 1024
     UpdateAddress(address) {
998 1025
       this.indiv.address.streetNumber = address.streetNumber;

正在加载...
取消
保存