From c69e75c9e3560c0a158b2d1bb3a62e5cbc7ed320 Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期三, 25 十月 2023 16:53:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java |    2 
 cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info1.js        |  744 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_info.html         |    2 
 cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js         |    7 
 4 files changed, 746 insertions(+), 9 deletions(-)

diff --git a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java
index b9c1e01..7663d26 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java
@@ -318,7 +318,7 @@
                                 case 2:
                                     return fieldValue != null && !fieldValue.isEmpty() && fieldValue.charAt(0) == '+';
                                 default:
-                                    break;
+                                    return fieldValue != null && !fieldValue.isEmpty();
                             }
                         }
                         return false;
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_info.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_info.html
index 8da88b9..a8516c3 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_info.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_info.html
@@ -189,7 +189,7 @@
         </div>
     </div>
 </div>
-<script src="${ctxPath}/modular/system/ball/yuyue_info.js"></script>
+<script src="${ctxPath}/modular/system/ball/yuyue_info1.js"></script>
 <script type="text/javascript">
     function updateType(o) {
         if(o==1){
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js b/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js
index dcdecf0..d175826 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js
@@ -674,13 +674,6 @@
 
 $(function () {
 
-    console.log("=======iiiii======"+            window.parent.TStudent.seItem.status)
-
-    if (window.parent.TStudent.seItem.status != 5 ){
-        // Hide the elements with the specified IDs
-        document.getElementById("hi1").style.display = "none";
-        document.getElementById("hi2").style.display = "none";
-        document.getElementById("hi3").style.display = "none";}
 
 
 
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info1.js b/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info1.js
new file mode 100644
index 0000000..dcdecf0
--- /dev/null
+++ b/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info1.js
@@ -0,0 +1,744 @@
+/**
+ * 用户详情对话框(可用于添加和修改对话框)
+ */
+var CoursePackageInfo = {
+    userInfoData: {},
+};
+
+
+
+/**
+ * 关闭此对话框
+ */
+CoursePackageInfo.close = function () {
+    parent.layer.close(window.parent.TStudent.layerIndex);
+};
+
+
+CoursePackageInfo.openDia = function (i) {
+
+        let index = layer.open({
+            type: 2,
+            title: '编辑',
+            area: ['80%', '80%'], //宽高
+            fix: false, //不固定
+            maxmin: true,
+            content: Feng.ctxPath + '/coursePackage/conpun/'+i
+        });
+        this.layerIndex = index;
+};
+
+CoursePackageInfo.openDia1 = function (i) {
+    var ids = $("#counpons"+i).val()
+
+        console.log($("#counpons"+i).val())
+    let index = layer.open({
+        type: 2,
+        title: '编辑',
+        area: ['80%', '80%'], //宽高
+        fix: false, //不固定
+        maxmin: true,
+        content: Feng.ctxPath + '/coursePackage/conpun1'+'/'+i+'?conpunids='+ids
+    });
+    this.layerIndex = index;
+};
+
+
+CoursePackageInfo.addTime = function (a) {
+    console.log("==========="+a)
+    var ajax = new $ax(Feng.ctxPath + "/ball/yuyuetimes/"+ $('#siteId').val(), function(data){
+        console.log("================"+data)
+        if(data!=null){
+            var content='';
+            $.each(data, function(k, v) {
+                var buttonClass = "layui-btn layui-btn-primary";
+                var style = "";
+                if (v.state === 0) {
+                    style = "background-color: red;";
+                }
+                var disabledAttribute = v.state === 0 ? "disabled" : "";
+                content += '<button type="button" class="' + buttonClass + '" ' + disabledAttribute + ' style="' + style + '" onclick="toggleColor(this)">' + v.time + '</button>';
+            });
+            $("#ttt2").empty().append(content);
+        }
+    })
+    ajax.set("date",$('#time').val());
+    ajax.start()
+
+    var ajax1 = new $ax(Feng.ctxPath + "/ball/halfName/"+ $('#siteId').val(), function(data){
+        console.log("================"+data)
+        if(data!=null){
+            let htmlStr = '';
+            for (let i = 0; i < data.length; i++) {
+                htmlStr += '<option value="' + data[i] + '">' + data[i] + '</option>'
+            }
+            $("#half").empty().append(htmlStr);
+        }
+    })
+    ajax1.start()
+
+
+
+
+
+};
+
+
+
+CoursePackageInfo.addTime1 = function (a) {
+
+
+    if ($('#siteId').val() != $('#selSiteId').val()||$('#time').val()!=$('#selDate').val()){
+        $("#ttt3").hide()
+        $("#ttt2").show()
+
+    }else {
+        $("#ttt3").show()
+        $("#ttt2").hide()
+
+    }
+
+    console.log("==========="+a)
+    var ajax = new $ax(Feng.ctxPath + "/ball/yuyuetimes/"+ $('#siteId').val(), function(data){
+        console.log("================"+data)
+        if(data!=null){
+            var content='';
+            $.each(data, function(k, v) {
+                var buttonClass = "layui-btn layui-btn-primary";
+                var style = "";
+                if (v.state === 0) {
+                    style = "background-color: red;";
+                }
+                var disabledAttribute = v.state === 0 ? "disabled" : "";
+                content += '<button type="button" class="' + buttonClass + '" ' + disabledAttribute + ' style="' + style + '" onclick="toggleColor(this)">' + v.time + '</button>';
+            });
+            $("#ttt2").empty().append(content);
+        }
+    })
+    ajax.start()
+
+    var ajax1 = new $ax(Feng.ctxPath + "/ball/halfName/"+ $('#siteId').val(), function(data){
+        console.log("================"+data)
+        if(data!=null){
+            let htmlStr = '';
+            for (let i = 0; i < data.length; i++) {
+                htmlStr += '<option value="' + data[i] + '">' + data[i] + '</option>'
+            }
+            $("#half").empty().append(htmlStr);
+        }
+    })
+    ajax1.start()
+
+
+
+
+
+};
+
+/**
+ * 提交添加用户
+ */
+CoursePackageInfo.addSubmit = function () {
+    let province = $('#provinceCode option:checked').text();
+    let provinceCode = $('#provinceCode').val();
+    let city = $('#cityCode option:checked').text();
+    let cityCode = $('#cityCode').val();
+    let storeId = $('#storeId').val();
+    let siteId = $('#siteId').val();
+    let site = $('#siteId option:checked').text();
+
+
+    var radios = document.getElementsByName("type");
+    var selectedValue;
+
+    for (var i = 0; i < radios.length; i++) {
+        if (radios[i].checked) {
+            selectedValue = radios[i].value;
+            break;
+        }
+    }
+
+    let type = selectedValue;
+    let half = $('#half').val();
+    let date = $('#time').val();
+
+
+    var elements = document.getElementsByClassName("layui-btn layui-btn-primary green-button");
+    var values = "";
+
+    for (var i = 0; i < elements.length; i++) {
+         values += date +" "+ elements[i].innerText + ";";
+    }
+
+// 去除最后一个逗号
+    values = values.slice(0, -1);
+
+    console.log(values);
+
+    var times = values;
+
+    let cash = $('#cash').val();
+    let play = $('#play').val();
+    let booker = $('#booker').val();
+    let phone = $('#phone').val();
+
+    // if(null == provinceCode || '' == provinceCode){
+    //     Feng.error("所在省不能为空");
+    //     return
+    // }
+    // if(null == cityCode || '' == cityCode){
+    //     Feng.error("所在市不能为空");
+    //     return
+    // }
+    // if(null == storeId || '' == storeId){
+    //     Feng.error("所属门店不能为空");
+    //     return
+    // }
+    // if(null == coursePackageTypeId || '' == coursePackageTypeId){
+    //     Feng.error("课程类型不能为空");
+    //     return
+    // }
+    // if(null == name || '' == name){
+    //     Feng.error("课包名称不能为空");
+    //     return
+    // }
+    // if(null == siteId || '' == siteId){
+    //     Feng.error("上课场地不能为空");
+    //     return
+    // }
+    // if(null == coachId || '' == coachId){
+    //     Feng.error("授课教师不能为空");
+    //     return
+    // }
+    //
+    // classWeeks = classWeeks.substring(0, classWeeks.length - 1);
+    //
+    // if(null == coverDrawing || '' == coverDrawing){
+    //     Feng.error("课包封面不能为空");
+    //     return
+    // }
+    // if(null == detailDrawing || '' == detailDrawing){
+    //     Feng.error("详情页不能为空");
+    //     return
+    // }
+    // if(null == introduceDrawing || '' == introduceDrawing){
+    //     Feng.error("课包介绍不能为空");
+    //     return
+    // }
+
+
+    //提交信息
+    var ajax = new $ax(Feng.ctxPath + "/ball/ordersave", function (data) {
+        if(data.code == 200){
+            Feng.success("添加成功!");
+            CoursePackageInfo.close();
+            window.parent.TStudent.table.refresh();
+        }else{
+            Feng.error(data.msg);
+        }
+    }, function (data) {
+        Feng.error("添加失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set("province",province)
+    ajax.set("provinceCode",provinceCode);
+    ajax.set("city",city);
+    ajax.set("cityCode",cityCode);
+    ajax.set("storeId",storeId);
+    ajax.set("isHalf",type);
+    ajax.set("siteId",siteId);
+    ajax.set("nextName",site);
+    ajax.set("halfName",half);
+    ajax.set("date",date);
+    ajax.set("times",times);
+    ajax.set("money",cash+","+play);
+    ajax.set("booker",booker);
+    ajax.set("phone",phone);
+
+    ajax.start();
+};
+
+
+/**
+ * 新修改
+ */
+CoursePackageInfo.addSubmit1 = function () {
+    let province = $('#provinceCode option:checked').text();
+    let provinceCode = $('#provinceCode').val();
+    let city = $('#cityCode option:checked').text();
+    let cityCode = $('#cityCode').val();
+    let storeId = $('#storeId').val();
+    let siteId = $('#siteId').val();
+    let site = $('#siteId option:checked').text();
+
+
+    var radios = document.getElementsByName("type");
+    var selectedValue;
+
+
+
+    for (var i = 0; i < radios.length; i++) {
+        if (radios[i].checked) {
+            selectedValue = radios[i].value;
+            break;
+        }
+    }
+
+    let type = selectedValue;
+    let half = $('#half').val();
+    let date = $('#time').val();
+
+
+    var elements = document.getElementsByClassName("layui-btn layui-btn-primary green-button");
+    var values = "";
+    console.log("==============="+elements[0])
+    if ($('#siteId').val() != $('#selSiteId').val()||$('#time').val()!=$('#selDate').val()) {
+        for (var i = 0; i < elements.length; i++) {
+            if (elements[i].name != 'has') {
+                values += date + " " + elements[i].innerText + ";";
+            }
+
+        }
+    }else {
+        for (var i = 0; i < elements.length; i++) {
+            if (elements[i].name = 'has') {
+                values += date + " " + elements[i].innerText + ";";
+            }
+        }
+    }
+// 去除最后一个逗号
+    values = values.slice(0, -1);
+
+    console.log(values);
+
+    var times = values;
+
+    let cash = $('#cash').val();
+    let play = $('#play').val();
+    let booker = $('#booker').val();
+    let phone = $('#phone').val();
+    let id = $('#id').val();
+
+
+    // if(null == provinceCode || '' == provinceCode){
+    //     Feng.error("所在省不能为空");
+    //     return
+    // }
+    // if(null == cityCode || '' == cityCode){
+    //     Feng.error("所在市不能为空");
+    //     return
+    // }
+    // if(null == storeId || '' == storeId){
+    //     Feng.error("所属门店不能为空");
+    //     return
+    // }
+    // if(null == coursePackageTypeId || '' == coursePackageTypeId){
+    //     Feng.error("课程类型不能为空");
+    //     return
+    // }
+    // if(null == name || '' == name){
+    //     Feng.error("课包名称不能为空");
+    //     return
+    // }
+    // if(null == siteId || '' == siteId){
+    //     Feng.error("上课场地不能为空");
+    //     return
+    // }
+    // if(null == coachId || '' == coachId){
+    //     Feng.error("授课教师不能为空");
+    //     return
+    // }
+    //
+    // classWeeks = classWeeks.substring(0, classWeeks.length - 1);
+    //
+    // if(null == coverDrawing || '' == coverDrawing){
+    //     Feng.error("课包封面不能为空");
+    //     return
+    // }
+    // if(null == detailDrawing || '' == detailDrawing){
+    //     Feng.error("详情页不能为空");
+    //     return
+    // }
+    // if(null == introduceDrawing || '' == introduceDrawing){
+    //     Feng.error("课包介绍不能为空");
+    //     return
+    // }
+
+
+    //提交信息
+    var ajax = new $ax(Feng.ctxPath + "/ball/orderedit", function (data) {
+        if(data.code == 200){
+            Feng.success("添加成功!");
+            CoursePackageInfo.close();
+            window.parent.TStudent.table.refresh();
+        }else{
+            Feng.error(data.msg);
+        }
+    }, function (data) {
+        Feng.error("添加失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set("province",province)
+    ajax.set("provinceCode",provinceCode);
+    ajax.set("city",city);
+    ajax.set("cityCode",cityCode);
+    ajax.set("storeId",storeId);
+    ajax.set("isHalf",type);
+    ajax.set("siteId",siteId);
+    ajax.set("nextName",site);
+    ajax.set("halfName",half);
+    ajax.set("date",date);
+    ajax.set("times",times);
+    ajax.set("money",cash+","+play);
+    ajax.set("booker",booker);
+    ajax.set("phone",phone);
+    ajax.set("id",id);
+
+
+    ajax.start();
+};
+/**
+ * 提交修改
+ */
+CoursePackageInfo.editSubmit = function () {
+    let id = $('#id').val();
+    let province = $('#provinceCode option:checked').text();
+    let provinceCode = $('#provinceCode').val();
+    let city = $('#cityCode option:checked').text();
+    let cityCode = $('#cityCode').val();
+    let storeId = $('#storeId').val();
+    let coursePackageTypeId = $('#coursePackageTypeId').val();
+    let name = $('#name').val();
+    let siteId = $('#siteId').val();
+    let coachId = $('#coachId').val();
+    let maxSubscribeNumber = $('#maxSubscribeNumber').val();
+    let codeTime = $('#codeTime').val();
+    let type = $('#type').val();
+
+    let holitime = $('#holitime').val();
+
+    var inputElements = document.querySelectorAll('input[name="classStartTime"]');
+    let classStartTime =  JSON.stringify(Array.from(inputElements).map(function(element) {
+        return element.value;
+    }))
+
+    // let classStartTime = $('#classStartTime').val();
+    let classWeeks = '';
+    $('input[name="classWeeks"]:checked').each(function (index, e) {
+        classWeeks += $(e).val() + ";";
+    })
+    let coverDrawing = $('#coverDrawing').val();
+    let detailDrawing = $('#detailDrawing').val();
+    let introduceDrawing = $('#introduceDrawing').val();
+    let sort = $('#sort').val();
+    let validDays = $('#validDays').val();
+    // let counpons = $($(e).find(".counpons")).val();
+
+    let price = [];
+    $('#price>.form-group').each(function (i, e) {
+        let classHours = $($(e).find(".classNumber_span input[class='classNumber']")[0]).val();
+        let cash = $($(e).find(".cash_span input[class='cash']")[0]).val();
+        let paiCoin = $($(e).find(".paiCoin_span input[class='paiCoin']")[0]).val();
+        let counpons = $($(e).find(".counpons")).val();
+
+        price.push({
+            classHours: classHours,
+            cashPayment: typeof cash == "undefined" ? 0 : cash,
+            playPaiCoin: typeof paiCoin == "undefined" ? 0 : paiCoin,
+            couponIds: typeof counpons == "undefined" ? 0 : counpons
+
+        })
+    });
+    if(null == provinceCode || '' == provinceCode){
+        Feng.error("所在省不能为空");
+        return
+    }
+    if(null == cityCode || '' == cityCode){
+        Feng.error("所在市不能为空");
+        return
+    }
+    if(null == storeId || '' == storeId){
+        Feng.error("所属门店不能为空");
+        return
+    }
+    if(null == coursePackageTypeId || '' == coursePackageTypeId){
+        Feng.error("课程类型不能为空");
+        return
+    }
+    if(null == name || '' == name){
+        Feng.error("课包名称不能为空");
+        return
+    }
+    if(null == siteId || '' == siteId){
+        Feng.error("上课场地不能为空");
+        return
+    }
+    if(null == coachId || '' == coachId){
+        Feng.error("授课教师不能为空");
+        return
+    }
+    // if(null == maxSubscribeNumber || '' == maxSubscribeNumber){
+    //     Feng.error("最多预约人数不能为空");
+    //     return
+    // }
+    // if(null == codeTime || '' == codeTime){
+    //     Feng.error("扣除课时不能为空");
+    //     return
+    // }
+    // if(null == classStartTime || '' == classStartTime){
+    //     Feng.error("上课时间不能为空");
+    //     return
+    // }
+    // if(null == classWeeks || '' == classWeeks){
+    //     Feng.error("周不能为空");
+    //     return
+    // }
+    classWeeks = classWeeks.substring(0, classWeeks.length - 1);
+
+    if(null == coverDrawing || '' == coverDrawing){
+        Feng.error("课包封面不能为空");
+        return
+    }
+    if(null == detailDrawing || '' == detailDrawing){
+        Feng.error("详情页不能为空");
+        return
+    }
+    if(null == introduceDrawing || '' == introduceDrawing){
+        Feng.error("课包介绍不能为空");
+        return
+    }
+    // if(null == validDays || '' == validDays){
+    //     Feng.error("课时有效期不能为空");
+    //     return
+    // }
+
+    let obj = {
+        id: id,
+        province: province,
+        provinceCode: provinceCode,
+        city: city,
+        cityCode: cityCode,
+        storeId: storeId,
+        coursePackageTypeId: coursePackageTypeId,
+        name: name,
+        siteId: siteId,
+        coachId: coachId,
+        maxSubscribeNumber: maxSubscribeNumber,
+        codeTime: codeTime,
+        type:type,
+        classStartTime: classStartTime,
+        // classEndTime: classStartTime.split(" - ")[1],
+        classWeeks: classWeeks,
+        coverDrawing: coverDrawing,
+        detailDrawing: detailDrawing,
+        introduceDrawing: introduceDrawing,
+        sort: sort,
+        validDays: validDays,
+        coursePackagePaymentConfig: JSON.stringify(price),
+        holitime:holitime
+    }
+
+    console.log("======="+obj)
+
+    //提交信息
+    var ajax = new $ax(Feng.ctxPath + "/coursePackage/updateCoursePackage", function (data) {
+        if(data.code == 200){
+            Feng.success("编辑成功!");
+            CoursePackageInfo.close();
+            window.parent.CoursePackage.table.refresh();
+        }else{
+            Feng.error(data.msg);
+        }
+    }, function (data) {
+        Feng.error("编辑失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set(obj);
+    ajax.start();
+};
+
+
+
+
+function queryStore() {
+    let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryStore", function (data) {
+        let htmlStr = '';
+        for (let i = 0; i < data.length; i++) {
+            htmlStr += '<option value="' + data[i].id + '">' + data[i].name + '</option>'
+        }
+        $('#storeId').html(htmlStr);
+
+        querySite();
+    }, function (data) {
+        Feng.error("获取失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set("cityCode", $('#cityCode').val());
+    ajax.start();
+}
+
+
+
+function querySite(){
+    let ajax = new $ax(Feng.ctxPath + "/coursePackage/querySite", function (data) {
+        let htmlStr = '';
+        for (let i = 0; i < data.length; i++) {
+            htmlStr += '<option value="' + data[i].id + '">' + data[i].name + '</option>'
+        }
+        $('#siteId').html(htmlStr);
+    }, function (data) {
+        Feng.error("获取失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set("storeId", $('#storeId').val());
+    ajax.start();
+}
+
+
+function queryCoach(){
+    let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryCoach", function (data) {
+        let htmlStr = '';
+        for (let i = 0; i < data.length; i++) {
+            htmlStr += '<option value="' + data[i].id + '">' + data[i].name + '</option>'
+        }
+        $('#coachId').html(htmlStr);
+    }, function (data) {
+        Feng.error("获取失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set("cityCode", $('#cityCode').val());
+    ajax.start();
+}
+
+
+function addPrice(y){
+    console.log("===="+y)
+    let cash = false;
+    let paiCoin = false;
+    $('input[name="payType"]:checked').each(function (index, e) {
+        let v = $(e).val();
+        if(v == 1){
+            cash = true;
+        }
+        if(v == 2){
+            paiCoin = true;
+        }
+    })
+    var i =  $('#price > div').length+1
+    let htmlStr = ''
+
+
+    if (y===1){
+
+        htmlStr +=   '<div class="form-group">\n' +
+            '                        <label class="col-sm-3 control-label">*课时数:</label>\n' +
+            '                        <div class="col-sm-8">\n' +
+            '                            <span class="classNumber_span"><input class="classNumber" type="number" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;">&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class="cash_span">\n';
+
+    }
+    if (y===2){
+
+        htmlStr +=   '<div class="form-group">\n' +
+            '                        <label class="col-sm-3 control-label"></label>\n' +
+            '                        <div class="col-sm-8">\n' +
+            '                            <span class="classNumber_span" hidden="hidden"><input class="classNumber" type="number" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;">&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class="cash_span">\n';
+
+    }
+        '<div class="form-group">\n' +
+        '                        <label class="col-sm-3 control-label">*课时数:</label>\n' +
+        '                        <div class="col-sm-8">\n' +
+        '                            <span class="classNumber_span"><input class="classNumber" type="number" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;">&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class="cash_span">\n';
+        if(cash){
+            htmlStr += '现金支付:<input class="cash" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> ¥&nbsp;&nbsp;&nbsp;&nbsp;\n';
+        }
+        htmlStr += '</span> <span class="paiCoin_span">';
+        if(paiCoin){
+            htmlStr += '玩湃币支付:<input class="paiCoin" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 币&nbsp;&nbsp;&nbsp;&nbsp;\n';
+        }
+    htmlStr += '<button type="button" class="btn btn-info " onclick="CoursePackageInfo.openDia('+i+')" id="ensure">\n' +
+        '    <i class="fa fa-check"></i>&nbsp;优惠券\n' +
+        '</button>';
+
+    htmlStr += '</span> <i class="fa fa-trash-o" style="font-size:24px" onclick="removePrice(this)"></i>\n' +
+        '</div>\n' +'<input type="text" hidden="hidden" class = "counpons" id = "counpons'+i+'" >'+i+
+        '</div>';
+    $('#price').append(htmlStr);
+}
+
+
+
+
+function removePrice(e){
+    $(e).parent('div').parent('div').remove();
+}
+
+function removePrice1(e){
+    $(e).parent('div').remove();
+}
+
+
+
+$(function () {
+
+    console.log("=======iiiii======"+            window.parent.TStudent.seItem.status)
+
+    if (window.parent.TStudent.seItem.status != 5 ){
+        // Hide the elements with the specified IDs
+        document.getElementById("hi1").style.display = "none";
+        document.getElementById("hi2").style.display = "none";
+        document.getElementById("hi3").style.display = "none";}
+
+
+
+    $('#provinceCode').change(function () {
+        let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryCity", function (data) {
+            let htmlStr = '';
+            for (let i = 0; i < data.length; i++) {
+                htmlStr += '<option value="' + data[i].code + '">' + data[i].name + '</option>'
+            }
+            $('#cityCode').html(htmlStr);
+
+            queryStore();
+            queryCoach();
+        }, function (data) {
+            Feng.error("获取失败!" + data.responseJSON.message + "!");
+        });
+        ajax.set("code", $(this).val());
+        ajax.start();
+    })
+
+
+    $('#cityCode').change(function () {
+        queryStore();
+    })
+
+
+    $('#storeId').change(function () {
+        querySite();
+    })
+
+    $('input[name="payType"]').click(function () {
+        $('input[name="payType"]').each(function (index, e) {
+            let v = $(e).val();
+            if(v == 1) {
+                if (e.checked) {
+                    $('span[class="cash_span"]').each(function (index, e) {
+                        $(e).html('现金支付:<input class="cash" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> ¥&nbsp;&nbsp;&nbsp;&nbsp;');
+                    })
+                } else {
+                    $('span[class="cash_span"]').each(function (index, e) {
+                        $(e).html('');
+                    })
+                }
+            }
+
+            if(v == 2){
+                if (e.checked) {
+                    $('span[class="paiCoin_span"]').each(function (index, e) {
+                        $(e).html('玩湃币支付:<input class="paiCoin" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 币&nbsp;&nbsp;&nbsp;&nbsp;')
+                    })
+                } else {
+                    $('span[class="paiCoin_span"]').each(function (index, e) {
+                        $(e).html('');
+                    })
+                }
+            }
+        })
+    })
+
+
+});

--
Gitblit v1.7.1