cyy 3 lat temu
rodzic
commit
9e268c14cd

+ 4 - 2
src/views/demo/yangPin/yangPinShuJu/EntrustNumber.vue

@@ -42,7 +42,8 @@ export default {
       //填充数量的数组
       filledNum:[],
       yearA:'',
-      monthA:''
+      monthA:'',
+      monthB:''
 
 
       // //已收到要填充的数组
@@ -81,7 +82,8 @@ export default {
       this.monthA = ''
       this.yearA = this.NowTime1.split('-')[0]
       this.monthA = this.NowTime1.split('-')[1]
-      this.NowTime = this.yearA + '-' + this.monthA
+      this.monthB = Number(this.NowTime1.split('-')[1])>=10? Number(this.NowTime1.split('-')[1])+"":"0"+Number(this.NowTime1.split('-')[1])
+      this.NowTime = this.yearA + '-' + this.monthB
       // console.log('页面第一次进来显示时间',date.year,date.month)
       //进来获取当前时间 之后获取当前月份天数 传给
       // console.log('页面显示的时间',this.NowTime)  //2022-11

+ 3 - 1
src/views/demo/yangPin/yangPinShuJu/MonthlyNumber.vue

@@ -39,6 +39,8 @@
       day:0,
       //填充数量的数组
       filledNum:[],
+      yearA:'',
+      monthA:''
     }
   },
   created(){
@@ -63,7 +65,7 @@
       this.yearA = ''
       this.monthA = ''
       this.yearA = this.NowTime1.split('-')[0]
-      this.monthA = this.NowTime1.split('-')[1]
+      this.monthA = Number(this.NowTime1.split('-')[1])>=10? Number(this.NowTime1.split('-')[1])+"":"0"+Number(this.NowTime1.split('-')[1])
       this.NowTime = this.yearA + '-' + this.monthA
       // console.log('页面第一次进来显示时间',date.year,date.month)
       //进来获取当前时间 之后获取当前月份天数 传给

+ 1 - 1
src/views/demo/yangPin/yangPinShuJu/MonthlyStatus.vue

@@ -57,7 +57,7 @@ export default {
       this.yearA = ''
       this.monthA = ''
       this.yearA = this.NowTime1.split('-')[0]
-      this.monthA = this.NowTime1.split('-')[1]
+      this.monthA = Number(this.NowTime1.split('-')[1])>=10? Number(this.NowTime1.split('-')[1])+"":"0"+Number(this.NowTime1.split('-')[1])
       this.NowTime = this.yearA + '-' + this.monthA
       // console.log('页面第一次进来显示时间',date.year,date.month)
       //进来获取当前时间 之后获取当前月份天数 传给