apzl_leasing/WebContent/Tenwa/wechat/WechatBasicChange.jsp
2019-12-23 17:26:53 +08:00

72 lines
2.7 KiB
Plaintext

<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2019-11-01
Content: 示例详情页面
History Log:
*/
String sPrevUrl = CurPage.getParameter("PrevUrl");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "WechatBasicChange";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.genHTMLObjectWindow(CurPage.getParameter("changeId"));
String sButtons[][] = {
{"true","","Button","保存","审批意见","saveRecord('save')","","","","btn_icon_save"},
{"true","","Button","通过","通过","saveRecord('via')","","","","btn_icon_submit"},
{"true","","Button","否决","否决","saveRecord('refuse')","","","","btn_icon_close"}
};
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function saveRecord(parameter){
var id = getItemValue(0,getRow(),"ID");
var isprocessed = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","isProcessed","basicChangeId="+id);
if("success"!=isprocessed){
alert(isprocessed);
return;
}
if("save"==parameter){
var opinions = allTrim(getItemValue(0,getRow(),"opinions"));
setItemValue(0,0,"opinions",opinions);
as_save(0);
}else if("via"==parameter){
var customerId = getItemValue(0,getRow(),"CUSTOMER_ID");
if(confirm('确实要变更吗?')){
var sReturnInfo = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","saveChange","basicChangeId="+id+",customerId="+customerId);
if("true"==sReturnInfo){
alert("变更成功!");
$(parent.document).find("div.tab_close")[0].click();
return;
}
alert("变更失败,请联系管理员!");
}
}else if ("refuse"==parameter){
var opinions = getItemValue(0,getRow(),"opinions");
if(opinions.length<=0){
alert("请先填写申请意见!!!");
return;
}
var isopinions = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","isopinions","id="+id+",type=basic");
if("success"!=isopinions){
alert(isopinions);
return;
}
if(confirm('确实要否決吗?')){
var sReturnInfo = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","refuseChange","basicChangeId="+id);
if("true"==sReturnInfo){
alert("已否决!");
$(parent.document).find("div.tab_close")[0].click();
return;
}
alert("否决失败,请联系管理员!");
}
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>