| | |
| | | TCompetition.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'provinceAndCity', visible: role==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '门店名称', field: 'storeName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包类型', field: 'coursePackageType', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | Feng.info("请输入玩湃币支付") |
| | | return; |
| | | } |
| | | var courseTimeId= $("#courseTime").val() |
| | | console.log("看看课时") |
| | | console.log(courseTimeId) |
| | | if(typeof courseTimeId === 'undefined'){ |
| | | console.log("进入") |
| | | courseTimeId=0; |
| | | } |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/cpPayment/addCoursePackagePayment/"+ $("#courseTime").val(), |
| | | url: Feng.ctxPath + "/cpPayment/addCoursePackagePayment/"+ courseTimeId, |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | if (response == "5001"){ |
| | | Feng.error("当前课包预约人数已满!") |
| | | }else if(response == "5002"){ |
| | | Feng.error("剩余课时不足,无法购买!") |
| | | }else{ |
| | | Feng.success("上架成功!"); |
| | | TCompetition.close(); |
| | |
| | | } |
| | | TCompetition.getCoursePackage = function (e) { |
| | | var oneId=$(e).val(); |
| | | console.log("门店id") |
| | | console.log(oneId) |
| | | var storeId = $("#store").val(); |
| | | console.log("课包类型") |
| | | console.log(storeId) |
| | | var content = "<option value=''>请选择</option>"; |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/getCoursePackageByType", function(data){ |
| | | if(data!=null){ |
| | |
| | | $("#coursePackageName").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("storeId",oneId); |
| | | ajax.set("storeId",storeId); |
| | | ajax.set("typeId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.getCoursePackageConfig = function (e) { |
| | |
| | | }; |
| | | |
| | | TCompetition.threeChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var content1 = "<option value=''>请选择门店</option>"; |
| | | var ajax2=new $ax(Feng.ctxPath + "/cpPayment/getStore", function(data){ |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#store").empty().append(content1); |
| | | }); |
| | | ajax2.set("city",oneId); |
| | | ajax2.start(); |
| | | }; |
| | | TCompetition.fourChange = function (e) { |
| | | var content1 = "<option value=''>请选择门店</option>"; |
| | | var ajax2=new $ax(Feng.ctxPath + "/cpPayment/getStore", function(data){ |
| | | $.each(data, function(k,v) { |
| | |
| | | ajax2.set("city",e); |
| | | ajax2.start(); |
| | | }; |
| | | |
| | | |
| | | TCompetition.getStudent = function () { |
| | | var phone = $("#vipPhone").val(); |
| | |
| | | if (option.text === city) { |
| | | option.selected = true; |
| | | c = option.text; |
| | | |
| | | TCompetition.threeChange(c) |
| | | TCompetition.fourChange(c) |
| | | |
| | | break; // 找到匹配的选项后,可以选择停止遍历 |
| | | } |