Quellcode durchsuchen

fix:额度支用bug修复

jiand vor 5 Monaten
Ursprung
Commit
2c2ee0f507

+ 1 - 1
src/utils/index.js

@@ -350,7 +350,7 @@ export function endPickerDate(startDate, endDate, isSelf = true) {
  * @param start 开始时间
  * @param end 结束时间
  **/
-export function startAndEndValue(start, end) {
+export function startAndEndValue(end, start) {
   if (start && end) {
     return parseInt((new Date(end).getTime() - new Date(start).getTime()) / (1000 * 60 * 60 * 24) + 1)
   } else {

+ 2 - 3
src/views/financingManage/limitExpenditure/components/FinancingInfo.vue

@@ -365,7 +365,6 @@ export default {
               this.getBusinessTypeInfoData()
             }, 500)
           })
-         
         }
       },
       immediate: true,
@@ -441,9 +440,9 @@ export default {
       const { repaymentAdjustment, startingDate, interestCalculate } = this.ruleForm
       if (repaymentAdjustment === 'fixed_repayment_date') {
         if (interestCalculate) {
-          this.ruleForm.financingPeriod = startAndEndValue(startingDate, this.endDate) + 1
+          this.ruleForm.financingPeriod = startAndEndValue(`${this.endDate} 00:00:00`, `${startingDate} 23:59:59`) + 1
         } else {
-          this.ruleForm.financingPeriod = startAndEndValue(startingDate, this.endDate)
+          this.ruleForm.financingPeriod = startAndEndValue(`${this.endDate} 00:00:00`, `${startingDate} 23:59:59`)
         }
       }
     },

+ 1 - 1
src/views/financingManage/limitExpenditure/mainContent.vue

@@ -221,7 +221,7 @@ export default {
       const { startDate, term } = this.ruleForm
       if (startDate && term) {
         const endDateGetTime = new Date(`${startDate} 00:00:00`).getTime() + (3600 * 1000 * 24 * term)
-        this.ruleForm.endDate = parseTime(endDateGetTime)
+        this.ruleForm.endDate = parseTime(endDateGetTime, 'y-m-d')
       }
     },
     async automaticGeneration() {