sale-client 4.3.53 → 4.3.54

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,5 +1,26 @@
1
1
  # Change Log
2
2
  所有关于本产品的变化都在该文档里。
3
+
4
+ ## **🚀 V4.3.54 -2026-05-13 `@柳博`**
5
+
6
+ ### `🌟` 功能调整
7
+
8
+ ---
9
+
10
+ 优化保险开始日期逻辑
11
+
12
+ - 移除了开始日期字段的验证样式绑定
13
+ - 统一日期格式为 'yyyy-MM-dd' 不再包含时间部分
14
+ - 添加了默认保险开始日期计算方法
15
+ - 实现了保险开始日期必须在当前日期次日之后的验证
16
+ - 在购买日期初始化时设置标准时间格式
17
+ - 重构了保险开始日期设置逻辑
18
+ - 简化了续保日期计算逻辑
19
+ - 添加了日期格式化和解析工具方法
20
+ - 添加了核销期判断逻辑和二次确认警告
21
+
22
+
23
+
3
24
  ## **🚀 V4.3.29 2026-04-08 `@张科科`**
4
25
  ### `🌟` 功能调整
5
26
  - 洪雅 机表收费 页面中 实欠气费 改为 用气金额
@@ -1,7 +1,7 @@
1
1
  var path = require('path')
2
2
  var checkVersion = require('./versionCheck.js')
3
3
  checkVersion()
4
- const [ serverRul, localUrl ] = ['http://222.83.114.229:31785/', 'http://127.0.0.1:9026/']
4
+ const [ serverRul, localUrl ] = ['http://192.168.50.67:31567/', 'http://192.168.50.67:31567/']
5
5
  var merge = require('webpack-merge')
6
6
  var baseConfig = require('./webpack.dev.conf')
7
7
  var devConfig = {
@@ -56,24 +56,6 @@ var devConfig = {
56
56
  // },
57
57
  // target: "http://localhost:8080"
58
58
  // },
59
- '/api/af-revenue/file': {
60
- pathRewrite: {
61
- '/api/af-revenue': '/'
62
- },
63
- target: localUrl
64
- },
65
- '/api/af-revenue/handPlanAudit': {
66
- pathRewrite: {
67
- '/api/af-revenue': '/'
68
- },
69
- target: localUrl
70
- },
71
- '/api/af-revenue/logic/getBatchOperaPro': {
72
- pathRewrite: {
73
- '/api/af-revenue': '/'
74
- },
75
- target: localUrl
76
- },
77
59
  '/api': {
78
60
  target: serverRul
79
61
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.3.53",
3
+ "version": "4.3.54",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -42,7 +42,7 @@
42
42
  :show-reset-button="true">
43
43
  </datepicker>
44
44
  </div>
45
- <div class="col-sm-6 form-group" :class="[$v.f_ins_start_date.required ? 'has-error' : '']" v-if="model.f_state === '待执行'">
45
+ <div class="col-sm-6 form-group" v-if="model.f_state === '待执行'">
46
46
  <label class="font_normal_body">本次保费开始日期</label>
47
47
  <input type="text" v-show="false" v-model="model.f_ins_start_date">
48
48
  <datepicker id="f_ins_start_date" placeholder="本次保费开始日期" style="width:60%"
@@ -52,14 +52,13 @@
52
52
  :show-reset-button="true">
53
53
  </datepicker>
54
54
  </div>
55
- <div class="col-sm-6 form-group" :class="[$v.f_ins_start_date.required ? 'has-error' : '']" v-else="model.f_state !== '待执行'">
55
+ <div class="col-sm-6 form-group" v-else="model.f_state !== '待执行'">
56
56
  <label class="font_normal_body">本次保费开始日期</label>
57
- <input type="text" v-show="false" v-model="model.f_ins_start_date"
58
- v-validate:f_ins_start_date='{required: true }'>
57
+ <input type="text" v-show="false" v-model="model.f_ins_start_date">
59
58
  <datepicker id="f_ins_start_date" placeholder="本次保费开始日期" style="width:60%"
60
59
  v-model="model.f_ins_start_date"
61
60
  :value.sync="model.f_ins_start_date"
62
- :format="'yyyy-MM-dd HH:mm:ss'"
61
+ :format="'yyyy-MM-dd'"
63
62
  :show-reset-button="true">
64
63
  </datepicker>
65
64
  </div>
@@ -81,7 +80,7 @@
81
80
  v-ref:f_expiration_date
82
81
  v-model="model.f_expiration_date"
83
82
  :value.sync="model.f_expiration_date"
84
- :format="'yyyy-MM-dd HH:mm:ss'"
83
+ :format="'yyyy-MM-dd'"
85
84
  :show-reset-button="true">
86
85
  </datepicker>
87
86
  </div>
@@ -93,7 +92,7 @@
93
92
  v-ref:f_expiration_date
94
93
  v-model="model.f_expiration_date"
95
94
  :value.sync="model.f_expiration_date"
96
- :format="'yyyy-MM-dd HH:mm:ss'"
95
+ :format="'yyyy-MM-dd'"
97
96
  :show-reset-button="true">
98
97
  </datepicker>
99
98
  </div>
@@ -219,6 +218,7 @@
219
218
  insurancestate: '有效'
220
219
  },
221
220
  model: {
221
+ f_buy_date: Util.toStandardTimeString(),
222
222
  f_ins_start_date: '',
223
223
  f_receivable: 0,
224
224
  f_money: 0
@@ -287,17 +287,13 @@
287
287
  f_user_phone: this.row.f_user_phone,
288
288
  f_salecount: this.row.f_saleCount,
289
289
  f_userinfo_code: this.row.f_userinfo_code,
290
- f_ins_start_date:Util.toStandardTimeString(),
290
+ f_ins_start_date: Util.toStandardDateString(),
291
291
  f_last_insexpiration_date: this.row.f_ins_stop_date
292
292
  }
293
293
  }
294
294
  }
295
- this.model.f_buy_date = Util.toStandardTimeString()
296
- if(this.model.f_ins_stop_date && this.model.f_ins_stop_date>Util.toStandardTimeString()){
297
- this.$set('model.f_ins_start_date',this.model.f_ins_stop_date)
298
- }else{
299
- this.$set('model.f_ins_start_date',Util.toStandardTimeString())
300
- }
295
+ this.model.f_buy_date = this.model.f_buy_date || Util.toStandardTimeString()
296
+ this.$set('model.f_ins_start_date', this.getDefaultInsStartDate())
301
297
  this.model.f_salecount = 1
302
298
  this.configMerge()
303
299
  },
@@ -311,12 +307,7 @@
311
307
  day: tx.getDate()
312
308
  }
313
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))
314
- let date
315
- if (tmp.month < (tmpdate.getMonth() + 1)) {
316
- date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000 * 2)
317
- } else {
318
- date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000)
319
- }
310
+ let date = tmpdate
320
311
  let jt = {
321
312
  year: date.getFullYear(),
322
313
  month: date.getMonth() + 1,
@@ -344,12 +335,7 @@
344
335
  day: tx.getDate()
345
336
  }
346
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))
347
- let date
348
- if (tmp.month < (tmpdate.getMonth() + 1)) {
349
- date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000 * 2)
350
- } else {
351
- date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000)
352
- }
338
+ let date = tmpdate
353
339
  let jt = {
354
340
  year: date.getFullYear(),
355
341
  month: date.getMonth() + 1,
@@ -365,7 +351,7 @@
365
351
  if (val && this.model.f_userinfo_id) {
366
352
  this.model.f_insurance_type = this.model.f_insurance_type == null ? this.config.insuranceType : this.model.f_insurance_type
367
353
  this.model.f_state = this.model.f_state == null ? this.config.insurancestate : this.model.f_state
368
- this.model.f_ins_start_date = Util.toStandardDateString()
354
+ this.model.f_ins_start_date = this.getDefaultInsStartDate()
369
355
  console.log('cs===================cs', this.model.f_userinfo_id, this.model.f_ins_start_date)
370
356
  }
371
357
  }
@@ -425,13 +411,47 @@
425
411
  this.$dispatch('refresh', this.row)
426
412
  this.$dispatch('close')
427
413
  },
414
+ formatYmd (date) {
415
+ let month = date.getMonth() + 1
416
+ let day = date.getDate()
417
+ return date.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day)
418
+ },
419
+ parseDateOnly (val) {
420
+ if (!val) return null
421
+ let date = new Date(String(val).replace(/-/g, '/'))
422
+ if (isNaN(date.getTime())) return null
423
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate())
424
+ },
425
+ getDefaultInsStartDate () {
426
+ let tomorrow = new Date()
427
+ tomorrow.setHours(0, 0, 0, 0)
428
+ tomorrow.setDate(tomorrow.getDate() + 1)
429
+ let minDate = tomorrow
430
+ let stopDate = this.parseDateOnly(this.model.f_ins_stop_date)
431
+ if (stopDate) {
432
+ let nextStopDate = new Date(stopDate.getTime())
433
+ nextStopDate.setDate(nextStopDate.getDate() + 1)
434
+ if (nextStopDate.getTime() > minDate.getTime()) {
435
+ minDate = nextStopDate
436
+ }
437
+ }
438
+ return this.formatYmd(minDate)
439
+ },
428
440
  async save () {
429
441
  let saveState = true
442
+ let startDate = this.parseDateOnly(this.model.f_ins_start_date)
443
+ let tomorrow = new Date()
444
+ tomorrow.setHours(0, 0, 0, 0)
445
+ tomorrow.setDate(tomorrow.getDate() + 1)
446
+ if (!startDate || startDate.getTime() < tomorrow.getTime()) {
447
+ this.$showAlert('保险开始日期必须在当前日期的次日及之后', 'warning', 2000)
448
+ saveState = false
449
+ }
430
450
  if (this.model.f_state !== '待执行') {
431
- if (Date.parse(this.model.f_ins_start_date) > Date.parse(this.model.f_expiration_date)) {
451
+ if (saveState && Date.parse(this.model.f_ins_start_date) > Date.parse(this.model.f_expiration_date)) {
432
452
  this.$showAlert('结束日期不能早于开始日期', 'warning', 2000)
433
453
  saveState = false
434
- } else if (this.model.f_ins_start_date !== null && this.model.f_ins_start_date !== '' && Date.parse(this.model.f_ins_stop_date) > Date.parse(this.model.f_ins_start_date)) {
454
+ } else if (saveState && this.model.f_ins_start_date !== null && this.model.f_ins_start_date !== '' && Date.parse(this.model.f_ins_stop_date) > Date.parse(this.model.f_ins_start_date)) {
435
455
  this.$showAlert('开始日期不能早于上期保费截止日期', 'warning', 2000)
436
456
  saveState = false
437
457
  }
@@ -447,6 +467,13 @@
447
467
  }
448
468
  }
449
469
  if (saveState) {
470
+ if (startDate) {
471
+ this.model.f_ins_start_date = this.formatYmd(startDate) + ' 00:00:00'
472
+ }
473
+ let expirationDate = this.parseDateOnly(this.model.f_expiration_date)
474
+ if (expirationDate) {
475
+ this.model.f_expiration_date = this.formatYmd(expirationDate) + ' 23:59:59'
476
+ }
450
477
  this.model.f_total_ins_charge = this.model.f_total_ins_charge == null ? 0 : this.model.f_total_ins_charge
451
478
  this.model.f_operat_type = '保险'
452
479
  this.model.f_operator = this.operatorname[0]
@@ -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">撤销原因:</label>
152
+ <label for="f_cancel_reason" class=" col-sm-2 control-label">撤销原因1:</label>
153
153
  <div class="col-sm-8">
154
154
  <textarea class="form-control"
155
155
  v-model="model.f_cancel_reason" rows="2"
@@ -253,6 +253,29 @@ export default {
253
253
  inputDate.getDate() === today.getDate()
254
254
  )
255
255
  },
256
+ parseDateTime (val) {
257
+ if (val == null || val === '') return null
258
+ const d = new Date(String(val).replace(/-/g, '/'))
259
+ return isNaN(d.getTime()) ? null : d
260
+ },
261
+ /** 核销期使用购买时间判断:当前操作时间已超过购买当日 17:30:00 */
262
+ needsVerificationPeriod (row) {
263
+ if (!row) return false
264
+ const buyDate = this.parseDateTime(row.f_buy_date)
265
+ if (!buyDate) return false
266
+ const now = new Date()
267
+ const verifyStart = new Date(buyDate.getFullYear(), buyDate.getMonth(), buyDate.getDate(), 17, 30, 0, 0)
268
+ return now.getTime() > verifyStart.getTime()
269
+ },
270
+ needsExtraTwoStepDialogs (row) {
271
+ return this.needsVerificationPeriod(row)
272
+ },
273
+ buildFirstWarnMessage () {
274
+ return '当前保单已进入核销期或已出单,撤销可能产生费用或合约影响,须事先与保险公司沟通确认。保险公司联系人:瞿成,联系电话:15932351515。'
275
+ },
276
+ secondWarnMessage () {
277
+ return '请确认:操作员已向保险公司咨询(或报备),已知悉撤销后果,并同意继续办理撤销。'
278
+ },
256
279
  async getAuditor () {
257
280
  await this.$GetSaleParam.initinputtor()
258
281
  this.auditor = this.$GetSaleParam.getAudit(this.$login.f.orgid)
@@ -320,17 +343,26 @@ export default {
320
343
  // 执行logic
321
344
  logicName: 'cancelInsurance'
322
345
  }
323
- this.$resetpost('api/af-revenue/logic/commonAuditLogic', param, {
324
- warnMsg: `确定要对用户${this.recordlist[0].f_user_name}进行保险冲正吗?`,
325
- resolveMsg: `提交审核完成!!`,
326
- rejectMsg: `提交审核失败!!请重试!!`
327
- }).then((res) => {
328
- this.clean()
329
- })
346
+ const postOpts = this.needsExtraTwoStepDialogs(this.obj)
347
+ ? {
348
+ resolveMsg: `提交审核完成!!`,
349
+ rejectMsg: `提交审核失败!!请重试!!`
350
+ }
351
+ : {
352
+ warnMsg: `确定要对用户${this.recordlist[0].f_user_name}进行保险冲正吗?`,
353
+ resolveMsg: `提交审核完成!!`,
354
+ rejectMsg: `提交审核失败!!请重试!!`
355
+ }
356
+ const submit = () => {
357
+ this.$resetpost('api/af-revenue/logic/commonAuditLogic', param, postOpts).then((res) => {
358
+ this.clean()
359
+ })
360
+ }
361
+ this.runTwoStepInsuranceWarnThen(this.obj, submit)
330
362
  },
331
363
  cancelinsurance (row) {
332
364
  this.show = true
333
- if (row.f_payment.indexOf('扫码枪') > -1) {
365
+ if (row.f_payment && row.f_payment.indexOf('扫码枪') > -1) {
334
366
  this.paymentShow = false
335
367
  }
336
368
  this.obj = row
@@ -342,26 +374,44 @@ export default {
342
374
  f_cancel_reason: ''
343
375
  }
344
376
  },
377
+ submitCancelInsuranceApi () {
378
+ this.obj.f_operator = this.$login.f.name
379
+ this.obj.f_operatorid = this.$login.f.id
380
+ this.obj.f_orgid = this.$login.f.orgid
381
+ this.obj.f_orgname = this.$login.f.orgs
382
+ this.obj.f_depid = this.$login.f.depids
383
+ this.obj.f_depname = this.$login.f.deps
384
+ this.obj.f_payment = this.recordlist[0].f_payment
385
+ this.obj.f_cancel_reason = this.model.f_cancel_reason
386
+ console.log(this.obj)
387
+ this.$resetpost('api/af-revenue/logic/cancelInsurance', {data: this.obj}).then(() => {
388
+ this.$dispatch('refresh')
389
+ this.clean()
390
+ this.search()
391
+ })
392
+ },
393
+ runTwoStepInsuranceWarnThen (row, nextFn) {
394
+ if (!this.needsExtraTwoStepDialogs(row)) {
395
+ nextFn()
396
+ return
397
+ }
398
+ this.$showMessage(this.buildFirstWarnMessage(), ['confirm', 'cancel']).then((res) => {
399
+ if (res !== 'confirm') return
400
+ this.$showMessage(this.secondWarnMessage(), ['confirm', 'cancel']).then((res2) => {
401
+ if (res2 === 'confirm') nextFn()
402
+ })
403
+ })
404
+ },
345
405
  // 最后一条才能冲正
346
406
  confirm () {
347
- this.$showMessage('冲正后不可恢复,确认冲正吗?', ['confirm', 'cancel']).then((res) => {
348
- if (res === 'confirm') {
349
- this.obj.f_operator = this.$login.f.name
350
- this.obj.f_operatorid = this.$login.f.id
351
- this.obj.f_orgid = this.$login.f.orgid
352
- this.obj.f_orgname = this.$login.f.orgs
353
- this.obj.f_depid = this.$login.f.depids
354
- this.obj.f_depname = this.$login.f.deps
355
- this.obj.f_payment = this.recordlist[0].f_payment
356
- this.obj.f_cancel_reason = this.model.f_cancel_reason
357
- console.log(this.obj)
358
- this.$resetpost('api/af-revenue/logic/cancelInsurance', {data: this.obj}).then(() => {
359
- this.$dispatch('refresh')
360
- this.clean()
361
- this.search()
362
- })
363
- }
364
- })
407
+ const run = () => this.submitCancelInsuranceApi()
408
+ if (this.needsExtraTwoStepDialogs(this.obj)) {
409
+ this.runTwoStepInsuranceWarnThen(this.obj, run)
410
+ } else {
411
+ this.$showMessage('冲正后不可恢复,确认冲正吗?', ['confirm', 'cancel']).then((res) => {
412
+ if (res === 'confirm') run()
413
+ })
414
+ }
365
415
  }
366
416
  },
367
417
  watch: {
package/src/main.js CHANGED
@@ -2,7 +2,7 @@ import Vue from 'vue'
2
2
  import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
- import FilialeSale from './filiale/dexin/sale'
5
+ import FilialeSale from './filiale/jinhuang/sale'
6
6
  import sale from './sale'
7
7
  import address from 'address-client/src/address'
8
8
  import ldap from 'ldap-clients/src/ldap'
File without changes
File without changes
File without changes
@@ -1,2 +0,0 @@
1
- #Wed Mar 18 10:18:57 CST 2026
2
- gradle.version=5.2.1
Binary file
File without changes