From 0d7af9483de1d430ae415e81925befcad495799e Mon Sep 17 00:00:00 2001 From: hzz Date: Mon, 18 Sep 2023 09:29:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E7=99=BB=E5=A4=A7=E5=B1=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20=E4=BA=A4=E8=B4=A7=E6=97=B6=E9=97=B4=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=88=90=E4=B8=8B=E6=9C=88=E6=9F=90=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Temp/Large_Format/index.vue | 36 +++++++++++- src/views/Temp/Tufting/component/center.vue | 65 +++++++++++++++++---- src/views/Temp/Winding/component/center.vue | 48 +++++++++++++-- 3 files changed, 133 insertions(+), 16 deletions(-) diff --git a/src/views/Temp/Large_Format/index.vue b/src/views/Temp/Large_Format/index.vue index 9ab7db1..95b0ca4 100644 --- a/src/views/Temp/Large_Format/index.vue +++ b/src/views/Temp/Large_Format/index.vue @@ -62,6 +62,34 @@ function WH(div: HTMLElement) { size.oHeight = a.oHeight; } + +function getNextMonth(date) { + let arr = date.split('-'); + let year = arr[0]; //获取当前日期的年份 + let month = arr[1]; //获取当前日期的月份 + let day = arr[2]; //获取当前日期的日 + let days: any = new Date(year, month, 0); + days = days.getDate(); //获取当前日期中的月的天数 + let year2 = year; + let month2: any = parseInt(month) + 1; + if (month2 == 13) { + year2 = parseInt(year2) + 1; + month2 = 1; + } + let day2 = day; + let days2: any = new Date(year2, month2, 0); + days2 = days2.getDate(); + if (day2 > days2) { + day2 = days2; + } + if (month2 < 10) { + month2 = '0' + month2; + } + + let t2 = year2 + '年' + month2 + '月' + day2 + '日'; + return t2; +} + async function getDeviceDetailfun() { setTimeout(() => { let result = { @@ -152,7 +180,13 @@ async function getDeviceDetailfun() { } } } - + let date = new Date(); + let year = date.getFullYear(); + let month = date.getMonth() + 1; + let day = 26; + + let datetime = year + '-' + month + '-' + day + result.data.imgTip.prtDeliveryDate = getNextMonth(datetime) store.setnewPageData(result.data) }); } diff --git a/src/views/Temp/Tufting/component/center.vue b/src/views/Temp/Tufting/component/center.vue index b52b68c..051df5b 100644 --- a/src/views/Temp/Tufting/component/center.vue +++ b/src/views/Temp/Tufting/component/center.vue @@ -10,8 +10,7 @@ - + +} + diff --git a/src/views/Temp/Winding/component/center.vue b/src/views/Temp/Winding/component/center.vue index 6b0d05d..e2ec39e 100644 --- a/src/views/Temp/Winding/component/center.vue +++ b/src/views/Temp/Winding/component/center.vue @@ -23,7 +23,7 @@