| | |
| | | {title: '购买用户', field: 'payUser', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购课学员', field: 'payStudent', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买方式', field: 'buyType', visible: true, align: 'center', valign: 'middle', |
| | | { |
| | | title: '购买方式', field: 'buyType', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"线下",2:"线上",3:"折扣"}[data] |
| | | } |
| | |
| | | {title: '总金额', field: 'originalPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'discountAmount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付价格', field: 'cashPayment', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付状态', field: 'payStatus', visible: true, align: 'center', valign: 'middle', |
| | | { |
| | | title: '支付状态', field: 'payStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"待支付",2:"已支付"}[data] |
| | | } |
| | |
| | | {title: '赠送课时', field: 'giftClassHours', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | function currentTime(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var date = new Date(timestamp); |
| | | ; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var date = new Date(timestamp); |
| | | ; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | |
| | | var strDate = Y + M + D ; |
| | | return strDate |
| | | } |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | |
| | | ajax.start(); |
| | | }; |
| | | TQuestion.addSubmit = function(){ |
| | | let studentId = $("#studentId").val(); |
| | | let pCode = $("#pCode").val(); |
| | | let cCode = $("#cCode").val(); |
| | | let store = $("#store").val(); |
| | | let coursePackageType = $("#coursePackageType").val(); |
| | | let coursePackageName = $("#coursePackageName").val(); |
| | | if (studentId == '' || studentId == null) { |
| | | Feng.info("请选择学员") |
| | | return; |
| | | } |
| | | if (pCode == '' || pCode == null) { |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if (cCode == '' || cCode == null) { |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if (store == '' || store == null) { |
| | | Feng.info("请选择门店") |
| | | return; |
| | | } |
| | | if (coursePackageType == '' || coursePackageType == null) { |
| | | Feng.info("请选择课包类型") |
| | | return; |
| | | } |
| | | if (coursePackageName == '' || coursePackageName == null) { |
| | | Feng.info("请选择课包名称") |
| | | return; |
| | | } |
| | | var data = { |
| | | appUserId:null, |
| | | studentId:null, |
| | |
| | | coursePackageConfigId:null |
| | | }; |
| | | data.appUserId = appUserId; |
| | | console.log("我看看规格id") |
| | | console.log($("#courseTime").val()) |
| | | data.coursePackageConfigId = $("#courseTime").val(); |
| | | data.studentId = $("#student").val() |
| | | data.coursePackageId = $("#coursePackageName").val() |
| | | data.cashPayment = $("#cashPayment").val() |
| | | data.playPaiCoin = $("#playPaiCoin").val() |
| | | data.classHours = $('#courseTime option:selected').text() |
| | | if (role == 1){ |
| | | if($("#studentId").val()=='' ){ |
| | | Feng.info("请选择学员") |
| | | return; |
| | | } |
| | | if($("#pCode").val()=='' ){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if($("#cCode").val()=='' ){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | } |
| | | if (role!=3){ |
| | | if($("#store").val()==''){ |
| | | Feng.info("请选择门店") |
| | | return; |
| | | } |
| | | } |
| | | if($("#coursePackageType").val()=='' ){ |
| | | Feng.info("请选择课包类型") |
| | | return; |
| | | } |
| | | if($("#coursePackageName").val()==''){ |
| | | Feng.info("请选择课包名称") |
| | | return; |
| | | } |
| | | |
| | | var selectElement = document.getElementById('coursePackageName'); |
| | | var selectedOption = selectElement.options[selectElement.selectedIndex]; |
| | | console.log("插入") |
| | | var type = selectedOption.getAttribute('data-type'); |
| | | console.log('type----------'+type) |
| | | |
| | | |
| | | |
| | | if (type==1) { |
| | |
| | | } |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | |
| | | |
| | | |
| | | var ajax1 = new $ax(Feng.ctxPath + "/cpPayment/getCoursePackageType", function(data){ |
| | |
| | | }); |
| | | |
| | | |
| | | |
| | | }; |
| | | |
| | | TQuestion.freeze = function () { |
| | |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |