From 326bf69bb1324a29c70bd0b6c50ab6f2aa829af9 Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期一, 04 十二月 2023 10:48:41 +0800 Subject: [PATCH] 12.4 --- cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageDiscount.js | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageDiscount.js b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageDiscount.js index b8a08c7..77de3f2 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageDiscount.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageDiscount.js @@ -191,7 +191,7 @@ lay('.startAndEndDay').each(function(i, e){ laydate.render({ trigger: 'click', - elem: this + elem: e ,type: 'datetime' ,range: true ,done: function(value, date, endDate){ @@ -832,7 +832,7 @@ lay('.startAndEndDay').each(function(i, e){ laydate.render({ trigger: 'click', - elem: this + elem: e ,type: 'datetime' ,range: true ,done: function(value, date, endDate){ @@ -840,7 +840,16 @@ let obj = CoursePackageDiscount.coursePackagePaymentConfig[index]; let ii = $(e).parent('div').parent('div').parent('div').parent('div').attr('index'); for (let i = 0; i < obj.coursePackageDiscount.length; i++) { - if(type == obj.coursePackageDiscount[i].type){ + if(3 == obj.coursePackageDiscount[i].type){ + let jsonArray = obj.coursePackageDiscount[i].content; + for (let j = 0; j < jsonArray.length; j++) { + if(j == ii){ + let arr = value.split(" - "); + obj.coursePackageDiscount[i].content[j]['startDate'] = arr[0]; + obj.coursePackageDiscount[i].content[j]['endDate'] = arr[1]; + } + } + } if(4 == obj.coursePackageDiscount[i].type){ let jsonArray = obj.coursePackageDiscount[i].content; for (let j = 0; j < jsonArray.length; j++) { if(j == ii){ -- Gitblit v1.7.1