xfrontend/web/srczip/logic/jurisdiction.js
2021-05-27 18:44:11 +08:00

31 lines
1.1 KiB
JavaScript

(function(){
X.pageLogic['jurisdiction'] = {
init : function(parms){
var me = this;
this.parms = parms;
this.callback = parms.callback; //选择后执行的回调
var data = parms.extData;//获取到上层弹窗传的数据
if(data == 'r'){
$("#Sjurisdiction-chakan").prop("checked", true);
}else{
$("#Sjurisdiction-bianji").prop("checked", true);
}
$(".Sjurisdiction-box .Sjurisdiction-but").click(function(){
var txt = $(this).attr('data-value');
if(txt == "仅查看"){
$("#Sjurisdiction-bianji").prop("checked", false);
$("#Sjurisdiction-chakan").prop("checked", true);
}else{
$("#Sjurisdiction-chakan").prop("checked", false);
$("#Sjurisdiction-bianji").prop("checked", true);
}
me.callback && me.callback(txt);
layer.close( me.parms.layIndex );//获取最新的弹窗关闭
})
}
};
})();