44323
2023-12-12 312cd22230809437aae8462d71d3335e6540f78a
cloud-server-management/src/main/webapp/static/modular/system/cpPayment/cpPayment_info.js
@@ -23,7 +23,8 @@
        {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]
            }
@@ -32,7 +33,8 @@
        {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]
            }
@@ -40,12 +42,14 @@
        {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()) + ' ';
@@ -62,7 +66,8 @@
    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()) + ' ';
@@ -73,6 +78,7 @@
    var strDate = Y + M + D ;
    return strDate
}
/**
 * 检查是否选中
 */
@@ -237,6 +243,36 @@
    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,
@@ -263,49 +299,15 @@
        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) {
@@ -413,7 +415,6 @@
    }
    ajax.set("id",oneId);
    ajax.start();
    var ajax1 = new $ax(Feng.ctxPath + "/cpPayment/getCoursePackageType", function(data){
@@ -623,7 +624,6 @@
    });
};
TQuestion.freeze = function () {
@@ -700,7 +700,6 @@
        this.layerIndex = index;
    }
};
/**