Ext.Ajax.request({
url: '${pageContext.request.contextPath}/tcl/CcTclApply_getCustNbrdetails.action',
params : {},
success: function(r,request) {
Ext.getBody().unmask();
var tempInfo = Ext.util.JSON.decode(r.responseText);
Ext.getCmp('custNbr').setText(tempInfo.custNbr);
Ext.getCmp('custNbr').setRawValue(tempInfo.custNbr);
Ext.getCmp('nameLine1').setText(tempInfo.nameLine1);
Ext.getCmp('nameLine1').setRawValue(tempInfo.nameLine1);
Ext.getCmp('idNo').setText(tempInfo.idNo);
Ext.getCmp('idNo').setRawValue(tempInfo.idNo);
Ext.getCmp('idType').setRawValue(tempInfo.idType);
Ext.getCmp('idType').setText(lookupKeyItem('Q002', tempInfo.idType));
Ext.getCmp('collectorId').setText(tempInfo.collectorName);
Ext.getCmp('collectorId').setRawValue(tempInfo.collectorId);
Ext.getCmp('sex').setRawValue(tempInfo.sex);
if(tempInfo.sex'=='F')
{
Ext.getCmp('sex').setText('女');
}else
{
Ext.getCmp('sex').setText('男');
}
},
failure: function(r,request) {
Ext.getBody().unmask();
Ext.MessageBox.alert("异常提示信息", "脚本内容获取异常");
}
});
/*
*
* 得到客户信息的方法
*/
public String getCustNbrdetails() {
try {
userContext = (UserContext) ActionContext.getContext().getSession()
.get(Constant.SESSION_USER_KEY);
String org = ActionContext.getContext().getSession().get(
Constant.ORG).toString();
String custNbr = ActionContext.getContext().getSession().get(
Constant.CUST_NBR).toString();
CcBusCustworklistVO ccbu = new CcBusCustworklistVO();
ccbu.setOrg(org);
ccbu.setCustNbr(custNbr);
this.ccbuscustworklistVO = this.ccbuscustworklistService
.findCcBusCustworklistByKey(ccbu);
this.ccbuscustworklistVO
.setCollectorName(userContext.getUserName());
JSONObject json = JSONObject.fromObject(ccbuscustworklistVO);
Struts2Utils.renderJson(json.toString());
} catch (BusinessException e) {
setMessage(e);
return "failureMessage";
} catch (Exception ex) {
log.error("Exception", ex);
setMessage(Constant.LOG_ERROR_MSG);
return "failureMessage";
}
return null;
}