From 3ca287938e02837ef01ccd681bf0262fee2fb424 Mon Sep 17 00:00:00 2001
From: zhaoxiaohao <279049017@qq.com>
Date: Wed, 02 Dec 2020 17:42:43 +0800
Subject: [PATCH] 将固定套餐去除, 去除打印和debugger

---
 kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html
index ec0b7e0..a5c65f0 100644
--- a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html
+++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html
@@ -335,7 +335,6 @@
             if(listData!=null&&listData.length>0){
                
                 listData.forEach((element,index) => {
-                    debugger
                     if(index==0){
                         max=element.endTime;
                         min=element.beginTime;
@@ -556,7 +555,6 @@
                             var hospitalProvince = hospitalData.hospitalProvince != null ? hospitalData.hospitalProvince : "";
                             var hospitalCity = hospitalData.hospitalCity != null ? hospitalData.hospitalCity : "";
                             var hospitalArea = hospitalData.hospitalArea != null ? hospitalData.hospitalArea : "";
-                            // console.log(hospitalProvince + " " + hospitalCity + " " +hospitalArea)
                             $("#hospitalAreas").val(hospitalProvince + " " + hospitalCity + " " + hospitalArea);
 
                             //装载产品数据
@@ -815,8 +813,6 @@
                     }
                 }
                 if (!strUtil.isEmpty(data.endTime)){
-                    console.log(contractEndTime,"contractEndTime")
-                    console.log(data.endTime,"data.endTimedata.endTime")
                     if (dateUtil.compareDate(data.endTime,contractEndTime)) {
                         layer.msg("结束时间必须小于合同的结束时间!");
                         return false;
@@ -952,7 +948,6 @@
         form.on('submit(recharge-form-submit)', function (data) {
             if (!isRun) {
                 layer.load(2);
-                debugger
                 var listData = admin.getTempData("t_tempProduct");
                 // if (listData != null) {
                     var count= 0;
@@ -1009,7 +1004,22 @@
                                             listDetailData.push(detailData);
                                         })
 
-                                        if (listDetailData.length > 0) {
+                                        if (listDetailData.length <=0) {
+                                            var detailData = {
+                                                orderId: orderData.id + '',
+                                                proId:  "0",
+                                                proType: 1,
+                                                proName: "软件服务周期",
+                                                isShare: 0,
+                                                ailightCount:  0,
+                                                recordCount: 0,
+                                                proBegintime: $("#contractBeginTime").val()+' 00:00:00' ,
+                                                proEndtime: $("#contractEndTime").val()+' 00:00:00' ,
+                                                orderAilightCount: 0,
+                                                orderRecordCount: 0,
+                                            };
+                                            listDetailData.push(detailData)
+                                        } 
                                             //提交订单数据
                                             admin.req(
                                                 'api-opration/productorderdetail/saveall',
@@ -1036,11 +1046,9 @@
                                                         });
                                                     }
                                                 }, 'POST');
-                                        } else {
-                                            layer.closeAll();
-                                            layer.msg("充值数据成功!");
-                                            isRun = false;
-                                        }
+                                            // layer.closeAll();
+                                            // layer.msg("充值数据成功!");
+                                            // isRun = false;
                                     } else {
                                         layer.msg(data.msg, {
                                             icon: 2,

--
Gitblit v1.8.0