rushfee/build/classes/html/rush/paydetail.html

396 lines
13 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<html login="false">
<head>
<title>客户信息明细</title>
</head>
<body >
<div widget="toolbar" >
<a widget="button" iconCls="icon-test" onclick="archives(1)">客户档案</a>
<a widget="button" iconCls="icon-admin" onclick="archives(3)">服务记录</a>
<a widget="button" iconCls="icon-next" onclick="latestrecord()">最近缴费</a>
<a widget="button" iconCls="icon-setup" id="callbtn" onclick="call">呼叫</a>
<a widget="button" iconCls="icon-disable" onclick="endcall">挂断</a>
<a widget="button" iconCls="icon-mail" onclick="message">短信</a>
</div>
<input name="logid" widget="hidden" />
<input id="cust_name" widget="hidden" />
<input id="customer_id" widget="hidden" />
<input id="is_call" widget="hidden" />
<input id="message" widget="hidden" />
<input id="msglogid" widget="hidden" />
<input widget="edit" name="cust_name" label="客户名称" readonly="true" style="width:300px;margin-top:5px"/>
<br/>
<input widget="edit" name="org_short_name" label="分公司" readonly="true" style="width:300px;margin-top:5px"/>
<br/>
<input widget="edit" name="cust_tax_code" label="客户税号" readonly="true" style="width:300px; margin-top:5px"/>
<br/>
<input widget="edit" name="tel1" label="电话1" readonly="true" style="width:300px; margin-top:5px"/>
<br/>
<input widget="edit" name="tel2" label="电话2" readonly="true" style="width:300px; margin-top:5px"/>
<br/>
<input widget="edit" name="person_tel" label="最新来电" readonly="true" style="width:300px; margin-top:5px"/>
<br/>
<input widget="textarea" name="invoice_addr" label="地址" emptyText="" width="300px" height="70px"/>
<div widget="toolbar" style="margin-left:305px;width:425px;margin-top:-254px;">
<a widget="button" iconcls="icon-add" onclick="addRow()">新增</a>
<a widget="button" iconcls="icon-delete" onclick="remove">删除</a>
<a widget="button" iconCls="icon-save" onclick="saveContact">保存</a>
</div>
<div style="margin-left:305px;">
<div widget="datagrid" name="grid" style="width:430px; height:224px;" url="rushtaskcenter/post/getCustomerContact" allowcelledit="true" allowcellselect="true" allowalternating="true" editnextonenterkey="true" editnextrowcell="true" >
<div type="checkcolumn" width="35" header="选择" allowNull="true"></div>
<div type="indexcolumn" width="35" header="序号"></div>
<div field="id" visible="false" ></div>
<div field="addrid" visible="false" ></div>
<div field="vital" visible="false" ></div>
<div field="is_default" visible="false" ></div>
<div field="contact" width="50" header="联系人" > <input editor="edit"/></div>
<div field="mobile" width="80" header="联系电话"> <input editor="edit"/></div>
<div field="source" width="80" header="来源" ></div>
<div field="mobile_mark" width="80" header="电话类型" >
<input editor="combox" name="mobile_mark" url="rushtaskcenter/getMobileMarkList"
textField="text" valueField="memo" allowInput="false" showNullItem="true" />
</div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
var flag =true;
var test = "";
function init(param){
parent.insertlogid("",2);
parent.document.getElementById('logid').value="";
var pageState = param['pageState'];
var org_id = param['org_id'];
if(pageState){
aos.setState(pageState)
}
if(param['customer_id']){
aos.post({
url:"rush/post/crmcustinfo",
data:param,
success:function(rtnData){
aos.getForm().setData(rtnData);
getCrmrecord();
}
});
var custormer_param={customer_id:param['customer_id']};
grid.load(custormer_param);
aos.get("is_call").setValue('N');
aos.get("customer_id").setValue(param['customer_id']);
aos.get("cust_name").setValue(param['cust_name']);
}
var params= {
org_id : org_id
}
aos.post({
url:" rushtaskcenter/post/areacode",
data:params,
success:function(rtnData){
var areacode = rtnData.areacode;
test = areacode ;
}
});
}
/**
*实时更新CRM中客户的服务费到期日期
*/
function getCrmrecord(){
var data = {};
data['customer_id']=aos.get('customer_id').getValue();
aos.post({
url:"rush/post/getCrmrecord",
data:data,
success:function(data){
if(null==data){
aos.tip('今年无来电电话');
}
else{
aos.tip('成功获取最新来电电话');
aos.get('person_tel').setValue(data.person_tel);
}
}
});
}
function endcall(){
if(parent.document.getElementById("newbarInit").value==1){
window.parent.phoneBar.agentApi.releaseCall();
}else{
window.parent.application.oJVccBar.Disconnect();
}
}
function addRow() {
var newRow = {
source:'催缴系统',
is_default:0
};
grid.addRow(newRow,0);
}
function getChangeData(status){
var list=grid.getChanges(status);
return list;
}
function remove(){
var row=grid.getSelected();
if(!row){
aos.alert('选择一行后进行删除!');
return;
}
aos.confirm('确认删除吗?',null,function(action){
if(action == 'cancel')
return;
grid.removeRow(row, true);
});
}
function saveContact(){
var data = {};
data['customer_id']=aos.get('customer_id').getValue();
data['added']=getChangeData("added");
data['modified']=getChangeData("modified");
data['removed']=getChangeData("removed");
//操作之前判断下一啊,去判断然后我在决定他去干什么
/* aos.post({
url:"rushtaskcenter/post/panduan",
data:data,
success:function(data, textStatus, jqXHR){
if(data==0){
alert('电话号码不能为空');
}
if(data==1){
alert('电话号码已存在,请勿重复添加');
}
if(data==3){
alert('添加号码为已删除号码,请联系管理员');
}
if(data==4){
alert('修改号码为已删除号码,请联系管理员');
}
else{
aos.post({
url:"rushtaskcenter/post/saveContact",
data:data,
success:function(){
aos.tip('保存联系人电话成功!');
var custormer_param={customer_id:aos.get('customer_id').getValue()};
grid.load(custormer_param);
}
});
}
}
}); */
aos.post({
url:"rushtaskcenter/post/saveContact",
data:data,
success:function(){
aos.tip('保存联系人电话成功!');
var custormer_param={customer_id:aos.get('customer_id').getValue()};
grid.load(custormer_param);
}
});
}
function call(){
var grid = aos.get('grid');
var zz = "0371";
var data = grid.getSelected();
if(!data){
aos.alert('请选择一条联系人!');
return;
}else{
var mobile = data.mobile;
if(mobile.substr(0,2)=='01'){
mobile = mobile.substr(1,mobile.length-1);
}
if(mobile=='无' || mobile== null || mobile==''){
aos.alert('选中的联系人没有联系电话请更改,谢谢~');
return;
}
var calldata = aos.getForm().getData();
calldata['customer_id']=aos.get('customer_id').getValue();
aos.get("is_call").setValue("Y");
//aos.get("cust_name").setValue(data.contact);
parent.document.getElementById('info').value="联系"+data.contact+"("+mobile+");"+"客户名称:"+aos.get("cust_name").getValue();
parent.document.getElementById('end_date').value=aos.get("person_tel").getValue();
parent.document.getElementById('customer_id').value=aos.get('customer_id').getValue();
if(parent.document.getElementById('CallJS').value==1){
if(mobile.substr(0,1)=='0'){
}else{
if((/^1(3|4|5|7|8)\d{9}$/.test(mobile))){
if(null==test||test==""){
}else{
mobile = test+mobile;
}
}else{
if(null==areacode||areacode==""){
mobile = zz+mobile;
}else{
mobile = test+mobile;
}
}
}
if(parent.document.getElementById("newbarInit").value==1){
window.parent.phoneBar.agentApi.makeCall(mobile,-1,3);
}else{
window.parent.application.oJVccBar.MakeCall(mobile);
}
}else{
aos.alert('请在主页面初始化电话条!');
return ;
}
}
}
//发送短信 电话拨通后可直接发送短信电话未接通发送短信会有提醒。发送成功后返回rush_log表id用于关联
function message(){
var grid = aos.get('grid');
var data = grid.getSelected();
if(!data){
aos.alert('请选择一条联系人!');
return;}
else{
var mobile = data.mobile;
if(mobile=='无' || mobile== null || mobile==''){
aos.alert('选中的联系人没有联系电话请更改,谢谢~');
return;
}else{
if(mobile.length != 11 || mobile.substr(0,1) != '1'){
aos.alert('选中的电话号码不符合要求,不允许发送短信,请选择其它号码,谢谢~');
return;
}
}
var messageparam = {};
messageparam['contact']=data.contact;
messageparam['mobile']=data.mobile;
messageparam['serviceDate']="2018-12-31";
messageparam['cust_name']=aos.get('cust_name').getValue();
if(parent.document.getElementById('message').value!="")
{
aos.showWindow('canvas/rush/message', messageparam, '550px', '350px', '短信发送', function(rtnValue){
aos.get("msglogid").setValue(rtnValue);
});
}
else{
aos.confirm('通话未接通,确定需要发送短信吗?',null,function(action){
if(action == 'cancel')
{return;}
else{
aos.showWindow('canvas/rush/message', messageparam, '550px', '350px', '短信发送', function(rtnValue){
aos.get("msglogid").setValue(rtnValue);
});
}
});
return ;
}
}
}
//查看客户档案和服务记录
function archives(n){
var customer_id = aos.get('customer_id').value;
var url = "";
if(n==1){
url ='http://crm.aisinoha.com/ZHYW/zh/commonInterface.jsp?url=pt/canvas?formid=crm_cus_org_customer_view*FormCreateState=editnew*PERSON_TEL=*org_customer_id='+customer_id+'*ispop=0*callid=&userid=hxcuijiao&userpass=aisino_123';
}else if(n==3){
url='http://crm.aisinoha.com/ZHYW/zh/commonInterface.jsp?url=pt/canvas?formid=zh_sm_customer_archives*FormCreateState=editnew*PERSON_TEL=*CUSTOMER_ID='+customer_id+'*ispop=0*callid=&userid=hxcuijiao&userpass=aisino_123';
}
if(customer_id){
window.open(url,'_blank','width=2000,height=2000,menubar=no,toolbar=no, status=no,scrollbars=yes')
}else{
aos.alert('页面出错!');
return;
}
}
function record(){
var param = {};
param['customer_id'] = aos.get('customer_id').getValue();
aos.showWindow( 'canvas/rush/oldrush', param, '600px','400px','催缴记录',
function(params, rtnData){
}
);}
function callAgain(){
var is_need_again = aos.get('is_need_again').getValue();
if(is_need_again=='N'){
aos.alert('是否需要回访须选择:是!');
return ;
}
var agree_visit_date = aos.get('agree_visit_date').getValue();
if(agree_visit_date==null || agree_visit_date==''){
aos.alert('需选择约定回访时间!');
return ;
}
var data = {};
data['is_need_again']=aos.get('is_need_again').getValue();
data['agree_visit_date']=aos.get('agree_visit_date').getValue();
data['center_id']=aos.get('center_id').getValue();
data['customername']=aos.get('cust_name').getValue();
aos.post({
url:"rushtaskcenter/post/callAgain",
data:data,
success:function(){
aos.tip('保存再次回访成功!');
//CloseWindow();
//var custormer_param={customer_id:aos.get('customer_id').getValue()};
//grid.load();
}
});
}
/**
* 客户最近缴费记录
*/
function latestrecord(){
var param = {};
param['customer_id'] = aos.get('customer_id').getValue();
aos.showWindow( 'canvas/rush/latestrecord', param, '700px','180px','最近缴费记录',
function(params, rtnData){
}
);}
function telsearch(){
var param = {};
param['customer_id'] = aos.get('customer_id').getValue();
aos.showWindow('canvas/rush/telrush', param, '800px','400px','依据电话查询',
function(params, rtnData){
}
);
}
</script>
</html>