44323
2023-11-14 ddbb38c54db9c3670e5ff53f4bf713525de1099d
cloud-server-management/src/main/webapp/static/modular/system/coursePackage/TCoupon.js
@@ -37,7 +37,7 @@
            }},
        {title: '发放方式', field: 'distributionMethod', visible: true, align: 'center', valign: 'middle',
            formatter: function (value, row, index) {
                return {1: "积分购买", 2: "注册赠送", 3: "自动发券"}[value]
                return {1: "积分购买", 2: "注册赠送", 3: "自动发券",4:"课包赠送"}[value]
            }},
        {title: '有效期', field: 'timeValue', visible: true, align: 'center', valign: 'middle'},
        {title: '用户人群', field: 'userPopulation', visible: true, align: 'center', valign: 'middle',
@@ -93,7 +93,19 @@
TCoupon.backids = function (i) {
    console.log("aaaaaa"+i)
    if (this.check()) {
    var selected = $('#' + this.id).bootstrapTable('getSelections');
    // if(selected.length == 0){
    //     Feng.info("请先选中表格中的某一记录!");
    //     return false;
    // }else{
    //     return true;
    // }
    if (selected.length != 0) {
        TCoupon.seItem = selected[0];
        TCoupon.seItem1 = selected;
        var ids = TCoupon.seItem1.map(function(item) {
            return item.id;
@@ -110,6 +122,10 @@
        //
        // }
        window.parent.layer.closeAll();
    }else {
        window.parent.document.getElementById("counpons"+i).value = "";
        window.parent.layer.closeAll();
    }
};
@@ -320,7 +336,6 @@
$(function () {
    // console.log("父级"+window.parent.document.getElementById("cityCode").val())
    console.log("父级" + window.parent.document.getElementById("cityCode").value);
    var defaultColunms = TCoupon.initColumn();
    var table = new BSTable(TCoupon.id, "/tCouponManage/list1", defaultColunms);
    table.setPaginationType("client");
@@ -330,8 +345,14 @@
    //     params.customParam2 = window.parent.document.getElementById("cityCode").value;
    //     return params;
    // };
    table.queryParams = {'cityCode': window.parent.document.getElementById("cityCode").value,'storeId': window.parent.document.getElementById("storeId").value}
    table.height=400
    var cityCode = ""
    console.log("看看市")
    console.log(window.parent.document.getElementById("cityCode"))
    if (!window.parent.document.getElementById("cityCode")== null){
        cityCode = window.parent.document.getElementById("cityCode").value;
    }
    table.queryParams = {'cityCode': cityCode,
        'storeId': window.parent.document.getElementById("storeId").value}
    table.height=600
    TCoupon.table = table.init();
});