puzhibing
2024-02-05 640ff18d2d7f4be02ddb7f8f75e899f05545eb98
cloud-server-management/src/main/webapp/static/modular/system/tCity/tCity.js
@@ -14,6 +14,7 @@
TCompetition.initColumn = function () {
    return [
        {field: 'selectItem', radio: true},
        {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'},
        {title: '省', field: 'province', visible: true, align: 'center', valign: 'middle'
        },
        {title: '市', field: 'city', visible: true, align: 'center', valign: 'middle'},
@@ -101,7 +102,7 @@
            area: ['100%', '100%'], //宽高
            fix: false, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/TCompetition/TCompetition_update/' + TCompetition.seItem.id
            content: Feng.ctxPath + '/tCity/tCity_update/' + TCompetition.seItem.id
        });
        this.layerIndex = index;
    }
@@ -151,7 +152,69 @@
        });
    }
};
TCompetition.oneChange = function (e) {
    console.log(111)
    var oneId=$(e).val();
    var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){
        if(data!=null){
            if(language==1){
                var content='<option value="">选择市</option>';
            }else if(language==2){
                var content='<option value="">Choose your franchisee</option>';
            }else {
                var content='<option value="">Pilih franchisee Anda</option>';
            }
            $.each(data, function(k,v) {
                content += "<option value='"+v.code+"'>"+v.name+"</option>";
            });
            $("#cCode").empty().append(content);
        }
    });
    ajax.set("oneId",oneId);
    ajax.start();
}
TCompetition.freeze = function () {
    if (this.check()) {
        var ajax = new $ax(Feng.ctxPath + "/tCity/freeze", function (data) {
            Feng.success("冻结成功!");
            TCompetition.table.refresh();
        }, function (data) {
            Feng.error("冻结失败!" + data.responseJSON.message + "!");
        });
        ajax.set("id",this.seItem.id);
        ajax.start();
    }
};
TCompetition.unfreeze = function () {
    if (this.check()) {
        var ajax = new $ax(Feng.ctxPath + "/tCity/unfreeze", function (data) {
            Feng.success("解冻成功!");
            TCompetition.table.refresh();
        }, function (data) {
            Feng.error("解冻失败!" + data.responseJSON.message + "!");
        });
        ajax.set("id",this.seItem.id);
        ajax.start();
    }
};
TCompetition.reload = function () {
    if (this.check()) {
        let id = this.seItem.id
        var operation = function(){
            var ajax = new $ax(Feng.ctxPath + "/tCity/pwd", function (data) {
                Feng.success("重置成功!");
                TCompetition.table.refresh();
            }, function (data) {
                Feng.error("重置失败!" + data.responseJSON.message + "!");
            });
            ajax.set("id",id);
            ajax.start();
        }
        Feng.confirm("确认重置密码?重置后密码为:a123456", operation);
    }
};
TCompetition.carInsurance = function () {
    if (this.check()) {
@@ -174,10 +237,18 @@
 */
TCompetition.search = function () {
    var queryData = {};
    queryData['provinceCode'] = $("#pCode").val();
    queryData['cityCode'] = $("#cCode").val();
    queryData['name'] = $("#name").val();
    queryData['phone'] = $("#phone").val();
    TCompetition.table.refresh({query: queryData});
};
TCompetition.resetSearch = function () {
    $("#pCode").val("");
    $("#cCode").val("");
    $("#name").val("");
    $("#phone").val("");
    TCompetition.search();
};