/**
*码头
*
*/
$.namespace("mt.main");
mt.main.sfdwkfData=null;
mt.main.sfdwkf=null;
mt.main.sfwhpData=null;
mt.main.sfwhp=null;
mt.main.init=function(){
//把form传入,构造翻页控件
pageinfo($("#mtform"));
};
mt.main.search=function(){
$('#pagejump').val(1);
$("#mtform").submit();
};
mt.main.del=function(data){
$.confirm({
title: '确认框',
content: '确认删除吗',
confirm: function(){
$.post($.app + "/mt/delete", {
id : data
}, function(data) {
if (data.success) {
$.alert({
title: '提示',
content: '操作成功',
confirm: function(){
$("#mtform").submit();
}
});
} else {
$.alert({
title: '提示',
content: data.message,
confirm: function(){
}
});
}
}, "json");
},
cancel: function(){
}
});
}
mt.main.edit=function(data){
location.href=$.app+"/mt/edit?id="+data;
}
mt.main.view=function(data){
location.href=$.app+"/mt/view?id="+data;
}
/**
* 弹出新增页面
* */
mt.main.add=function(){
location.href=$.app+"/mt/add";
}
mt.main.initSfdwkfSel=function(existVal){
$.post($.app + "/selectSf", {
}, function(data) {
var str = "";
str+="";
$("#sfdwkfDiv").empty();
$("#sfdwkfDiv").append(str);
$('.selectpicker').selectpicker({
width:'80%'
});
}, "json");
};
mt.main.initSfwhpSel=function(existVal){
$.post($.app + "/selectSf", {
}, function(data) {
var str = "";
str+="";
$("#sfwhpDiv").empty();
$("#sfwhpDiv").append(str);
$('.selectpicker').selectpicker({
width:'80%'
});
}, "json");
}
mt.main.initFwlx=function(divid, existVal){
$.post($.app + "/bw/selectFwlx", {
}, function(data) {
if (data) {
var str = "";
str+="";
$("#"+divid).empty();
$("#"+divid).append(str);
$('.fwlxselectpicker').selectpicker({
width:'80%'
});
} else {
}
}, "json");
};
mt.main.initMtyt=function(divid, existVal){
$.post($.app + "/bw/selectMtyt", {
}, function(data) {
var str = "";
str+="";
$("#"+divid).empty();
$("#"+divid).append(str);
$('.mtytselectpicker').selectpicker({
width: '80%'
});
}, "json");
};