sale-client 4.3.54 → 4.3.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
所有关于本产品的变化都在该文档里。
|
|
3
3
|
|
|
4
|
+
## **🚀 V4.3.55 -2026-05-14 `@柳博`**
|
|
5
|
+
|
|
6
|
+
### `🌟` 功能调整
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
修复保险记录表单中的日期验证和计算逻辑
|
|
11
|
+
|
|
12
|
+
- 移除待执行状态下手动输入保费结束日期功能,改为根据开始日期和购买年限自动计算
|
|
13
|
+
- 添加保费结束日期的验证逻辑,确保日期在当日之后
|
|
14
|
+
- 重构日期计算方法,统一使用recalcExpirationDate函数处理到期日期计算
|
|
15
|
+
- 优化日期比较逻辑,使用getTime()方法进行准确的时间对比
|
|
16
|
+
- 在保险记录组件中添加太平洋保险公司条件判断
|
|
17
|
+
- 修正日期格式化处理,统一时间戳为00:00:00格式
|
|
18
|
+
- 删除不再使用的datepicker组件相关代码和验证规则
|
|
19
|
+
|
|
4
20
|
## **🚀 V4.3.54 -2026-05-13 `@柳博`**
|
|
5
21
|
|
|
6
22
|
### `🌟` 功能调整
|
package/package.json
CHANGED
|
@@ -72,29 +72,19 @@
|
|
|
72
72
|
<input type="number" v-model="model.f_salecount" placeholder="购买年限" style="width: 60%"
|
|
73
73
|
class="input_search" v v-el:style v-next-el="inpipe">
|
|
74
74
|
</div>
|
|
75
|
-
<div class="col-sm-6 form-group"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
:format="'yyyy-MM-dd'"
|
|
84
|
-
:show-reset-button="true">
|
|
85
|
-
</datepicker>
|
|
86
|
-
</div>
|
|
87
|
-
<div class="col-sm-6 form-group" :class="[$v.f_expiration_date2.required ? 'has-error' : '']" v-else="model.f_state !== '待执行'">
|
|
75
|
+
<div class="col-sm-6 form-group" v-if="model.f_state === '待执行'">
|
|
76
|
+
<input type="text" v-show="false" v-model="tmp" :value.sync='model.f_expiration_date' v-el:f_expiration_date2>
|
|
77
|
+
<label class="font_normal_body">  保费结束日期</label>
|
|
78
|
+
<input type="text" class="input_search" style="width:60%" disabled="disabled"
|
|
79
|
+
:value="model.f_expiration_date"
|
|
80
|
+
placeholder="根据开始日期和购买年限自动计算">
|
|
81
|
+
</div>
|
|
82
|
+
<div class="col-sm-6 form-group" v-else="model.f_state !== '待执行'">
|
|
88
83
|
<input type="text" v-show="false" v-model="tmp" :value.sync='model.f_expiration_date' v-validate:f_expiration_date2='{required: true }' v-el:f_expiration_date2>
|
|
89
84
|
<label class="font_normal_body">  保费结束日期</label>
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
v-model="model.f_expiration_date"
|
|
94
|
-
:value.sync="model.f_expiration_date"
|
|
95
|
-
:format="'yyyy-MM-dd'"
|
|
96
|
-
:show-reset-button="true">
|
|
97
|
-
</datepicker>
|
|
85
|
+
<input type="text" class="input_search" style="width:60%" disabled="disabled"
|
|
86
|
+
:value="model.f_expiration_date"
|
|
87
|
+
placeholder="根据开始日期和购买年限自动计算">
|
|
98
88
|
</div>
|
|
99
89
|
<div class="col-sm-6 form-group" :class="[$v.f_insurance_type.required ? 'has-error' : '']">
|
|
100
90
|
<label class="font_normal_body" title="参数:险种">      险种</label>
|
|
@@ -295,26 +285,12 @@
|
|
|
295
285
|
this.model.f_buy_date = this.model.f_buy_date || Util.toStandardTimeString()
|
|
296
286
|
this.$set('model.f_ins_start_date', this.getDefaultInsStartDate())
|
|
297
287
|
this.model.f_salecount = 1
|
|
288
|
+
this.recalcExpirationDate()
|
|
298
289
|
this.configMerge()
|
|
299
290
|
},
|
|
300
291
|
watch: {
|
|
301
292
|
'model.f_ins_start_date' (val) {
|
|
302
|
-
|
|
303
|
-
let tx = new Date(val)
|
|
304
|
-
let tmp = {
|
|
305
|
-
year: tx.getFullYear(),
|
|
306
|
-
month: tx.getMonth() + 1,
|
|
307
|
-
day: tx.getDate()
|
|
308
|
-
}
|
|
309
|
-
let tmpdate = new Date((tmp.year + (this.model.f_salecount - 0)) + '-' + (tmp.month < 10 ? '0' + tmp.month : tmp.month) + '-' + (tmp.day < 10 ? '0' + tmp.day : tmp.day))
|
|
310
|
-
let date = tmpdate
|
|
311
|
-
let jt = {
|
|
312
|
-
year: date.getFullYear(),
|
|
313
|
-
month: date.getMonth() + 1,
|
|
314
|
-
day: date.getDate()
|
|
315
|
-
}
|
|
316
|
-
this.$refs.f_expiration_date.value = jt.year + '-' + (jt.month < 10 ? '0' + jt.month : jt.month) + '-' + (jt.day < 10 ? '0' + jt.day : jt.day)
|
|
317
|
-
}
|
|
293
|
+
this.recalcExpirationDate()
|
|
318
294
|
},
|
|
319
295
|
'model.f_money' (val) {
|
|
320
296
|
if (val && (val < 0 || Math.floor(val - 0) !== (val - 0))) {
|
|
@@ -328,22 +304,10 @@
|
|
|
328
304
|
this.model.f_salecount = 0
|
|
329
305
|
this.f_salecount.dctest = false
|
|
330
306
|
} else if (val && this.model.f_ins_start_date) {
|
|
331
|
-
|
|
332
|
-
let tmp = {
|
|
333
|
-
year: tx.getFullYear(),
|
|
334
|
-
month: tx.getMonth() + 1,
|
|
335
|
-
day: tx.getDate()
|
|
336
|
-
}
|
|
337
|
-
let tmpdate = new Date((tmp.year + (val - 0)) + '-' + (tmp.month < 10 ? '0' + tmp.month : tmp.month) + '-' + (tmp.day < 10 ? '0' + tmp.day : tmp.day))
|
|
338
|
-
let date = tmpdate
|
|
339
|
-
let jt = {
|
|
340
|
-
year: date.getFullYear(),
|
|
341
|
-
month: date.getMonth() + 1,
|
|
342
|
-
day: date.getDate()
|
|
343
|
-
}
|
|
344
|
-
this.$refs.f_expiration_date.value = jt.year + '-' + (jt.month < 10 ? '0' + jt.month : jt.month) + '-' + (jt.day < 10 ? '0' + jt.day : jt.day)
|
|
307
|
+
this.recalcExpirationDate()
|
|
345
308
|
this.f_salecount.dctest = true
|
|
346
309
|
} else {
|
|
310
|
+
this.model.f_expiration_date = ''
|
|
347
311
|
this.f_salecount.dctest = true
|
|
348
312
|
}
|
|
349
313
|
},
|
|
@@ -352,6 +316,8 @@
|
|
|
352
316
|
this.model.f_insurance_type = this.model.f_insurance_type == null ? this.config.insuranceType : this.model.f_insurance_type
|
|
353
317
|
this.model.f_state = this.model.f_state == null ? this.config.insurancestate : this.model.f_state
|
|
354
318
|
this.model.f_ins_start_date = this.getDefaultInsStartDate()
|
|
319
|
+
this.model.f_salecount = 1
|
|
320
|
+
this.recalcExpirationDate()
|
|
355
321
|
console.log('cs===================cs', this.model.f_userinfo_id, this.model.f_ins_start_date)
|
|
356
322
|
}
|
|
357
323
|
}
|
|
@@ -423,23 +389,32 @@
|
|
|
423
389
|
return new Date(date.getFullYear(), date.getMonth(), date.getDate())
|
|
424
390
|
},
|
|
425
391
|
getDefaultInsStartDate () {
|
|
426
|
-
let
|
|
427
|
-
|
|
428
|
-
tomorrow.setDate(tomorrow.getDate() + 1)
|
|
429
|
-
let minDate = tomorrow
|
|
392
|
+
let today = new Date()
|
|
393
|
+
today.setHours(0, 0, 0, 0)
|
|
430
394
|
let stopDate = this.parseDateOnly(this.model.f_ins_stop_date)
|
|
431
|
-
if (stopDate) {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
395
|
+
if (stopDate && stopDate.getTime() > today.getTime()) {
|
|
396
|
+
return this.formatYmd(stopDate)
|
|
397
|
+
}
|
|
398
|
+
let tomorrow = new Date(today.getTime())
|
|
399
|
+
tomorrow.setDate(tomorrow.getDate() + 1)
|
|
400
|
+
return this.formatYmd(tomorrow)
|
|
401
|
+
},
|
|
402
|
+
recalcExpirationDate () {
|
|
403
|
+
let startDate = this.parseDateOnly(this.model.f_ins_start_date)
|
|
404
|
+
let saleCount = this.model.f_salecount - 0
|
|
405
|
+
if (!startDate || !saleCount || saleCount < 0) {
|
|
406
|
+
this.model.f_expiration_date = ''
|
|
407
|
+
return
|
|
437
408
|
}
|
|
438
|
-
|
|
409
|
+
let expirationDate = new Date((startDate.getFullYear() + saleCount) + '-' + ((startDate.getMonth() + 1) < 10 ? '0' + (startDate.getMonth() + 1) : (startDate.getMonth() + 1)) + '-' + (startDate.getDate() < 10 ? '0' + startDate.getDate() : startDate.getDate()))
|
|
410
|
+
this.model.f_expiration_date = this.formatYmd(expirationDate)
|
|
439
411
|
},
|
|
440
412
|
async save () {
|
|
441
413
|
let saveState = true
|
|
442
414
|
let startDate = this.parseDateOnly(this.model.f_ins_start_date)
|
|
415
|
+
let expirationDate = this.parseDateOnly(this.model.f_expiration_date)
|
|
416
|
+
let today = new Date()
|
|
417
|
+
today.setHours(0, 0, 0, 0)
|
|
443
418
|
let tomorrow = new Date()
|
|
444
419
|
tomorrow.setHours(0, 0, 0, 0)
|
|
445
420
|
tomorrow.setDate(tomorrow.getDate() + 1)
|
|
@@ -447,13 +422,20 @@
|
|
|
447
422
|
this.$showAlert('保险开始日期必须在当前日期的次日及之后', 'warning', 2000)
|
|
448
423
|
saveState = false
|
|
449
424
|
}
|
|
425
|
+
if (saveState && (!expirationDate || expirationDate.getTime() <= today.getTime())) {
|
|
426
|
+
this.$showAlert('保单截止日期必须在当日之后', 'warning', 2000)
|
|
427
|
+
saveState = false
|
|
428
|
+
}
|
|
450
429
|
if (this.model.f_state !== '待执行') {
|
|
451
|
-
if (saveState &&
|
|
430
|
+
if (saveState && startDate.getTime() > expirationDate.getTime()) {
|
|
452
431
|
this.$showAlert('结束日期不能早于开始日期', 'warning', 2000)
|
|
453
432
|
saveState = false
|
|
454
|
-
} else if (saveState
|
|
455
|
-
this
|
|
456
|
-
|
|
433
|
+
} else if (saveState) {
|
|
434
|
+
let stopDate = this.parseDateOnly(this.model.f_ins_stop_date)
|
|
435
|
+
if (stopDate && stopDate.getTime() > startDate.getTime()) {
|
|
436
|
+
this.$showAlert('开始日期不能早于上期保费截止日期', 'warning', 2000)
|
|
437
|
+
saveState = false
|
|
438
|
+
}
|
|
457
439
|
}
|
|
458
440
|
}
|
|
459
441
|
|
|
@@ -470,9 +452,8 @@
|
|
|
470
452
|
if (startDate) {
|
|
471
453
|
this.model.f_ins_start_date = this.formatYmd(startDate) + ' 00:00:00'
|
|
472
454
|
}
|
|
473
|
-
let expirationDate = this.parseDateOnly(this.model.f_expiration_date)
|
|
474
455
|
if (expirationDate) {
|
|
475
|
-
this.model.f_expiration_date = this.formatYmd(expirationDate) + '
|
|
456
|
+
this.model.f_expiration_date = this.formatYmd(expirationDate) + ' 00:00:00'
|
|
476
457
|
}
|
|
477
458
|
this.model.f_total_ins_charge = this.model.f_total_ins_charge == null ? 0 : this.model.f_total_ins_charge
|
|
478
459
|
this.model.f_operat_type = '保险'
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
</div>
|
|
150
150
|
</div>
|
|
151
151
|
<div class="form-group" :class="[$v.f_cancel_reason.required ? 'has-error' : 'has-success']">
|
|
152
|
-
<label for="f_cancel_reason" class=" col-sm-2 control-label"
|
|
152
|
+
<label for="f_cancel_reason" class=" col-sm-2 control-label">撤销原因:</label>
|
|
153
153
|
<div class="col-sm-8">
|
|
154
154
|
<textarea class="form-control"
|
|
155
155
|
v-model="model.f_cancel_reason" rows="2"
|
|
@@ -165,13 +165,13 @@
|
|
|
165
165
|
</validator>
|
|
166
166
|
</article>
|
|
167
167
|
<footer slot="modal-footer" class="modal-footer">
|
|
168
|
+
<button class="btn btn-default" @click="clean()">取消</button>
|
|
168
169
|
<button class="btn btn-success" v-if="config.hasAudit && !isTodayResult" @click="auditConfirm()"
|
|
169
170
|
:disabled="!$v.valid">提交审核
|
|
170
171
|
</button>
|
|
171
172
|
<button class="btn btn-success" v-if="!config.hasAudit || isTodayResult" @click="confirm()"
|
|
172
173
|
:disabled="!$v.valid">确认
|
|
173
174
|
</button>
|
|
174
|
-
<button class="btn btn-default" @click="clean()">取消</button>
|
|
175
175
|
</footer>
|
|
176
176
|
</modal>
|
|
177
177
|
</div>
|
|
@@ -261,6 +261,7 @@ export default {
|
|
|
261
261
|
/** 核销期使用购买时间判断:当前操作时间已超过购买当日 17:30:00 */
|
|
262
262
|
needsVerificationPeriod (row) {
|
|
263
263
|
if (!row) return false
|
|
264
|
+
if (row.f_insurance_company !== '太平洋保险') return false
|
|
264
265
|
const buyDate = this.parseDateTime(row.f_buy_date)
|
|
265
266
|
if (!buyDate) return false
|
|
266
267
|
const now = new Date()
|