无关风月
5 天以前 b27efc697f2f81e0d0f247a2708e58af52a5df9b
cloud-server-management/src/main/webapp/static/modular/system/appUser/tAppUser.js
@@ -23,7 +23,7 @@
        {title: '生日', field: 'birthday', visible: true, align: 'center', valign: 'middle'},
        {title: '性别', field: 'gender', visible: true, align: 'center', valign: 'middle',
            formatter:function (data) {
                return {1:"男",2:"女"}[data]
                return {0:"男",1:"男",2:"女"}[data]
            }
        },
        {title: '销售人员', field: 'salesmanUserName', visible: true, align: 'center', valign: 'middle'},
@@ -32,6 +32,7 @@
                return {1:"是",0:"否"}[data]
            }
        },
        {title: '注册时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'},
        {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle',
            formatter:function (data) {
                return {1:"正常",2:"冻结",3:"已注销"}[data]
@@ -100,6 +101,25 @@
                fix: false, //不固定
                maxmin: true,
                content: Feng.ctxPath + '/appUser/update/' + TQuestion.seItem.id+"/"+1
            });
            this.layerIndex = index;
        }
    }
};
TQuestion.changeIntegral = function () {
    var selected = $('#' + this.id).bootstrapTable('getSelections');
    if(selected.length >1 ){
        Feng.info("只能选择一个用户进行修改!");
    }else {
        if (this.check()){
            var selected = $('#' + this.id).bootstrapTable('getSelections');
            var index = layer.open({
                type: 2,
                title: '修改积分',
                area: ['100%', '100%'], //宽高
                fix: false, //不固定
                maxmin: true,
                content: Feng.ctxPath + '/appUser/changeIntegral/' + TQuestion.seItem.id
            });
            this.layerIndex = index;
        }
@@ -355,10 +375,6 @@
        Feng.info("请选择性别")
        return;
    }
    if($("#salesmanUserName").val()=='' ){
        Feng.info("请选择销售人员")
        return;
    }
    $.ajax({
        url: Feng.ctxPath + "/appUser/addAppUser" ,
@@ -381,6 +397,32 @@
            Feng.error("添加失败!" + error);
        }
    });
};
TQuestion.updateIntegral = function(){
    if (    $("#changeType").val()==null ||$("#changeType").val()==""){
        Feng.info("请选择变动类型")
        return;
    }
    if (    $("#integral").val()==null ||$("#integral").val()==""){
        Feng.info("请输入变动积分数")
        return;
    }
    //提交信息
    var ajax = new $ax(Feng.ctxPath + "/appUser/updateIntegral", function(data){
        Feng.success("添加成功!")
        TQuestion.close();
    },function(data){
        Feng.error("添加失败!" + data.responseJSON.message + "!");
    });
    ajax.set("changeType",$("#changeType").val());
    ajax.set("integral",$("#integral").val());
    ajax.set("remark",$("#remark").val());
    ajax.set("id",$("#id").val());
    ajax.start();
};
TQuestion.addStudentSubmit = function(){
@@ -438,10 +480,7 @@
        Feng.info("请输入身份证号")
        return;
    }
    if($("#img").val()=='' ){
        Feng.info("请上传体测表")
        return;
    }
    $.ajax({
        url: Feng.ctxPath + "/appUser/addAppUserStudent" ,