|
@@ -97,33 +97,6 @@ $(document).ready(function() {
|
|
$('#remove').prop('disabled', ! $('#table').bootstrapTable('getSelections').length);
|
|
$('#remove').prop('disabled', ! $('#table').bootstrapTable('getSelections').length);
|
|
$('#edit').prop('disabled', $('#table').bootstrapTable('getSelections').length!=1);
|
|
$('#edit').prop('disabled', $('#table').bootstrapTable('getSelections').length!=1);
|
|
});
|
|
});
|
|
-
|
|
|
|
- $("#btnImport").click(function(){
|
|
|
|
- jp.open({
|
|
|
|
- type: 1,
|
|
|
|
- area: [500, 300],
|
|
|
|
- title:"导入数据",
|
|
|
|
- content:$("#importBox").html() ,
|
|
|
|
- btn: ['下载模板','确定', '关闭'],
|
|
|
|
- btn1: function(index, layero){
|
|
|
|
- window.location='${ctx}/oa/oaNotify/import/template';
|
|
|
|
- },
|
|
|
|
- btn2: function(index, layero){
|
|
|
|
- var inputForm =top.$("#importForm");
|
|
|
|
- var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
|
- inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
- inputForm.onsubmit = function(){
|
|
|
|
- jp.loading(' 正在导入,请稍等...');
|
|
|
|
- }
|
|
|
|
- inputForm.submit();
|
|
|
|
- jp.close(index);
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- btn3: function(index){
|
|
|
|
- jp.close(index);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
|
|
$("#search").click("click", function() {// 绑定查询按扭
|
|
$("#search").click("click", function() {// 绑定查询按扭
|
|
$('#table').bootstrapTable('refresh');
|
|
$('#table').bootstrapTable('refresh');
|
|
@@ -137,30 +110,11 @@ $(document).ready(function() {
|
|
$('#table').bootstrapTable('refresh');
|
|
$('#table').bootstrapTable('refresh');
|
|
});
|
|
});
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
function getIdSelections() {
|
|
function getIdSelections() {
|
|
return $.map($("#table").bootstrapTable('getSelections'), function (row) {
|
|
return $.map($("#table").bootstrapTable('getSelections'), function (row) {
|
|
return row.id
|
|
return row.id
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
-function deleteAll(){
|
|
|
|
-
|
|
|
|
- jp.confirm('确认要删除通知吗?', function(){
|
|
|
|
- jp.loading();
|
|
|
|
- jp.get("${ctx}/oa/oaNotify/deleteAll?ids=" + getIdSelections(), function(data){
|
|
|
|
- if(data.success){
|
|
|
|
- $('#table').bootstrapTable('refresh');
|
|
|
|
- jp.success(data.msg);
|
|
|
|
- }else{
|
|
|
|
- jp.error(data.msg);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
- function edit(){
|
|
|
|
- jp.go("${ctx}/oa/oaNotify/form?id=" + getIdSelections());
|
|
|
|
- }
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|