75 lines
2.7 KiB
Plaintext
75 lines
2.7 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||
/*
|
||
Author: undefined 2017-10-31
|
||
Content:
|
||
History Log:
|
||
*/
|
||
ASObjectModel doTemp = new ASObjectModel("T_MESSAGE_NOTICE_TASKS");
|
||
//默认预查询
|
||
doTemp.setJboWhereWhenNoFilter(" and O.SEND_STATUS = 'N' ");
|
||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||
dwTemp.Style="1"; //--设置为Grid风格--
|
||
dwTemp.ReadOnly = "1"; //只读模式
|
||
dwTemp.MultiSelect = true; //多选
|
||
dwTemp.setPageSize(10);
|
||
dwTemp.genHTMLObjectWindow("");
|
||
|
||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||
String sButtons[][] = {
|
||
{"true","","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit",""},
|
||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'')","","","","btn_icon_delete",""},
|
||
{"true","","Button","发送短信","给被勾选中号码发送短信","sendMsgSingleMt()","","","","btn_icon_submit",""},
|
||
};
|
||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||
<script type="text/javascript">
|
||
//设置预查询状态
|
||
function initFilter(){
|
||
filterValues["myiframe0"][TableFactory.getTableColIndexFromDZ("myiframe0",getColIndex(0,"SEND_STATUS"))] = "N";
|
||
}
|
||
window.onload= initFilter;
|
||
|
||
function newRecord(){
|
||
var sUrl = "/Tenwa/Lease/App/Message/MessageTaskInfo.jsp";
|
||
AsDialog.PopView(sUrl, "", "resizable=yes;dialogWidth=770px;dialogHeight=300px;center:yes;status:no;statusbar:no", function res(){
|
||
reloadSelf();
|
||
}, "新增待发送短信");
|
||
}
|
||
function viewAndEdit(){
|
||
var sUrl = "/Tenwa/Lease/App/Message/MessageTaskInfo.jsp";
|
||
var sPara = getItemValue(0,getRow(),'ID');
|
||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||
alert("请选择一条数据!");
|
||
return ;
|
||
}
|
||
AsDialog.PopView(sUrl, "ID="+sPara, "resizable=yes;dialogWidth=770px;dialogHeight=300px;center:yes;status:no;statusbar:no", function res(){
|
||
reloadSelf();
|
||
}, "修改待发送短信");
|
||
}
|
||
|
||
//发送短信
|
||
function sendMsgSingleMt(){
|
||
debugger;
|
||
var sParm=getItemValueArray(0, "id");
|
||
if(typeof(sParm)=="undefined" || sParm.length==0){
|
||
alert("请选择至少一条数据");
|
||
return;
|
||
}
|
||
var ids = "";
|
||
for(var i = 0;i < sParm.length; i++){
|
||
if(ids.length == 0)
|
||
ids += sParm[i];
|
||
else
|
||
ids += "@" + sParm[i];
|
||
}
|
||
//发送短信
|
||
var res = RunJavaMethodTrans("com.tenwa.messagesend.cache.MessageSendClient", "sendMultiMsg", "ids="+ids);
|
||
if(res == "success"){
|
||
alert("发送成功");
|
||
}
|
||
reloadSelf();
|
||
}
|
||
|
||
</script>
|
||
<%@ include file="/Frame/resources/include/include_end.jspf"%> |