luoyisheng
2023-10-05 2736b19570db55be1fc9ab7b65395d9f2097d782
cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackage.js
@@ -1,7 +1,7 @@
/**
 * 系统管理--用户管理的单例对象
 */
let CoursePackage = {
var CoursePackage = {
    id: "managerTable",//表格id
    seItem: null,      //选中的条目
    table: null,
@@ -18,6 +18,23 @@
        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
        {title: '所在省市', field: 'city', align: 'center', valign: 'middle'},
        {title: '所属门店', field: 'store', align: 'center', valign: 'middle'},
        {
            title: '课包种类',
            field: 'type',
            align: 'center',
            valign: 'middle',
            formatter: function(value) {
                if (value === 1) {
                    return '常规课';
                } else if (value === 2) {
                    return '假期课';
                } else if (value === 3) {
                    return '体验课';
                } else {
                    return '';
                }
            }
        },
        {title: '课包类型', field: 'coursePackageType', align: 'center', valign: 'middle'},
        {title: '课包名称', field: 'name', align: 'center', valign: 'middle'},
        {title: '最多预约人数', field: 'maxSubscribeNumber', align: 'center', valign: 'middle'},
@@ -53,6 +70,10 @@
    return columns;
};
CoursePackage.close = function () {
    window.close()
};
/**
 * 检查是否选中
 */
@@ -78,6 +99,20 @@
        fix: false, //不固定
        maxmin: true,
        content: Feng.ctxPath + '/coursePackage/openAddCoursePackage'
    });
    this.layerIndex = index;
};
CoursePackage.addCoursePackage1 = function () {
    let index = layer.open({
        type: 2,
        title: '添加',
        area: ['100%', '100%'], //宽高
        fix: false, //不固定
        maxmin: true,
        content: Feng.ctxPath + '/tStudent/openAddCoursePackage'
    });
    this.layerIndex = index;
};
@@ -193,14 +228,16 @@
            area: ['100%', '100%'], //宽高
            fix: false, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/coursePackage/registrationRecord?id=' + this.seItem.id
            content: Feng.ctxPath + '/coursePackage/registrationRecord?id=' + this.seItem.id+'&type='+this.seItem.type
        });
        this.layerIndex = index;
    }
};
CoursePackage.resetSearch = function () {
    $("#provinceCode").val("");
    $("#cityCode").val("");