From 460947ebceb81b3a8baa3590bea78ea42f5b4d57 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Wed, 18 Nov 2020 15:07:51 +0800 Subject: [PATCH] * Change toString to zui function. --- module/productplan/js/create.js | 4 ++-- module/productplan/js/edit.js | 4 ++-- module/program/js/common.js | 2 +- module/program/view/prjedit.html.php | 2 +- module/project/js/common.js | 2 +- module/testtask/js/common.js | 2 +- module/upgrade/js/mergeprogram.js | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/module/productplan/js/create.js b/module/productplan/js/create.js index 802f61c961..67c80cbebb 100644 --- a/module/productplan/js/create.js +++ b/module/productplan/js/create.js @@ -32,8 +32,8 @@ function computeEndDate(delta) delta = (weekend == 2) ? (delta - 2) : (delta - 1); } - var currentBeginDate = beginDate.toString('yyyy-MM-dd'); - var endDate = beginDate.addDays(delta - 1).toString('yyyy-MM-dd'); + var currentBeginDate = $.zui.formatDate(beginDate, 'yyyy-MM-dd'); + var endDate = $.zui.formatDate(beginDate.addDays(delta - 1), 'yyyy-MM-dd'); $('#begin').val(currentBeginDate); $('#end').val(endDate).datetimepicker('update'); diff --git a/module/productplan/js/edit.js b/module/productplan/js/edit.js index 3c8946f044..3acfaeb631 100644 --- a/module/productplan/js/edit.js +++ b/module/productplan/js/edit.js @@ -32,8 +32,8 @@ function computeEndDate(delta) delta = (weekend == 2) ? (delta - 2) : (delta - 1); } - currentBeginDate = beginDate.toString('yyyy-MM-dd'); - endDate = beginDate.addDays(delta - 1).toString('yyyy-MM-dd'); + currentBeginDate = $.zui.formatDate(beginDate, 'yyyy-MM-dd'); + endDate = $.zui.formatDate(beginDate.addDays(delta - 1), 'yyyy-MM-dd'); $('#begin').val(currentBeginDate); $('#end').val(endDate).datetimepicker('update'); diff --git a/module/program/js/common.js b/module/program/js/common.js index 7fa69d3e5a..b119771980 100644 --- a/module/program/js/common.js +++ b/module/program/js/common.js @@ -116,7 +116,7 @@ function computeEndDate(delta) delta = (weekend == 2) ? (delta - 2) : (delta - 1); } - endDate = beginDate.addDays(delta - 1).toString('yyyy-MM-dd'); + endDate = $.zui.formatDate(beginDate.addDays(delta - 1), 'yyyy-MM-dd'); $('#end').val(endDate).datetimepicker('update'); computeWorkDays(); } diff --git a/module/program/view/prjedit.html.php b/module/program/view/prjedit.html.php index f164025daa..153d31e22d 100644 --- a/module/program/view/prjedit.html.php +++ b/module/program/view/prjedit.html.php @@ -118,7 +118,7 @@ end == '2059-12-31' ? 999 : '';?> - program->endList , '', "onclick='computeEndDate(this.value)'");?> + program->endList , $deltaValue, "onclick='computeEndDate(this.value)'");?> model == 'scrum'):?> diff --git a/module/project/js/common.js b/module/project/js/common.js index 1b773fe56f..91e8ca7acc 100644 --- a/module/project/js/common.js +++ b/module/project/js/common.js @@ -110,7 +110,7 @@ function computeEndDate(delta) delta = (weekend == 2) ? (delta - 2) : (delta - 1); } - endDate = beginDate.addDays(delta - 1).toString('yyyy-MM-dd'); + endDate = $.zui.formatDate(beginDate.addDays(delta - 1), 'yyyy-MM-dd'); $('#end').val(endDate).datetimepicker('update'); computeWorkDays(); } diff --git a/module/testtask/js/common.js b/module/testtask/js/common.js index 9fc5ac1201..eeb0358f06 100644 --- a/module/testtask/js/common.js +++ b/module/testtask/js/common.js @@ -104,7 +104,7 @@ function suitEndDate() endDate = $('#end').val(); if(endDate) return; - endDate = convertStringToDate(beginDate).addDays(1).toString('yyyy-MM-dd'); + endDate = $.zui.formatDate(convertStringToDate(beginDate).addDays(1), 'yyyy-MM-dd'); $('#end').val(endDate); } diff --git a/module/upgrade/js/mergeprogram.js b/module/upgrade/js/mergeprogram.js index f5d2525e41..d95afd2882 100644 --- a/module/upgrade/js/mergeprogram.js +++ b/module/upgrade/js/mergeprogram.js @@ -291,7 +291,7 @@ function computeEndDate(delta) delta = (weekend == 2) ? (delta - 2) : (delta - 1); } - endDate = beginDate.addDays(delta - 1).toString('yyyy-MM-dd'); + endDate = $.zui.formatDate(beginDate.addDays(delta - 1), 'yyyy-MM-dd'); $('#end').val(endDate).datetimepicker('update'); computeWorkDays(); }