rushfee/build/classes/html/rush/rushtasklistdetail.html

678 lines
23 KiB
HTML
Raw Normal View History

2022-05-16 15:07:40 +00:00
<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-bell" onclick="telsearch()">电话信息</a>
<a widget="button" iconCls="icon-log" onclick="record()">催缴记录</a>
<a widget="button" iconCls="icon-next" onclick="latestrecord()">最近缴费</a>
<a widget="button" iconCls="icon-next" onclick="callAgain()">再次回访</a>
<a widget="button" iconCls="icon-save" id="savebtn" onclick="save" linkToState="editold,editnew">保存</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>
<a widget="button" iconCls="icon-admin" onclick="paigong">派工</a>
<a widget="button" iconCls="icon-delete" id="finishbtn" onclick="finishTask()">完成</a>
<!-- <a widget="button" iconCls="icon-mail" onclick="messageback">退费短信</a>-->
<!-- <a widget="button" iconCls="icon-exit" onclick="CloseWindow()">退出</a> -->
</div>
<input name="logid" widget="hidden" />
<input id="date1" widget="datechooser" visible= "false" />
<input id="customername" widget="hidden" />
<input id="customer_id" widget="hidden" />
<input id="center_id" widget="hidden" />
<input id="task_id" widget="hidden" />
<input id="detail_id" widget="hidden" />
<input id="task_user_id" widget="hidden" />
<input id="is_call" widget="hidden" />
<input id="message" widget="hidden" />
<input id="msglogid" widget="hidden" />
<input id="areacode" widget="hidden" />
2023-01-31 14:21:49 +00:00
<input name="sourcetype" widget="hidden" />
<input name="org_id" widget="hidden" />
2022-05-16 15:07:40 +00:00
<input widget="edit" name="cust_name" label="客户名称" readonly="true" />
<input widget="edit" name="cust_type" label="客户类型" readonly="true" />
<br/>
<input widget="edit" name="cust_tax_code" label="客户税号" readonly="true" style="margin-top:5px"/>
<input widget="edit" name="org_name" label="分公司" readonly="true" />
<br/>
<input widget="edit" name="legal_person" label="法人代表" readonly="true" />
<input widget="datechooser" name="end_date" label="服务到期日期" onclick="getCrmCurrentEndDate()" readonly="true" />
<br/>
<input widget="edit" name="revenuename" label="所属税务机关" readonly="true" />
<input widget="edit" name="createtime" label="创建日期" readonly="true" />
<br/>
<input widget="textarea" name="invoice_addr" label="开票地址" width="502px" height="30px" readonly="true"/>
<br/>
<input widget="edit" name="targetcust" label="非目标客户" readonly="true" />
<br/>
<input widget="edit" name="injf" label="是否在机房" readonly="true" />
<input widget="edit" name="ifmz" label="是否免征" readonly="true" />
<br/>
<div name="is_need_again" label="是否需要回访" widget="radiobuttonlist"
repeatitems="2" repeatlayout="table" textfield="text" valuefield="id"
data="[{id:'Y',text:'是'},{id:'N',text:'否'}]" value="Y" style="float:left"></div>
<div style="float:left;margin-left:62px">
<input widget="datechooser" name="agree_visit_date" label="约定回访时间"
showTime="true" timeFormat="HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" valueFormat="yyyy-MM-dd HH:mm:ss" />
</div>
<br/>
<div style="clear:both">
<div name="feedback" label="反馈结果" widget="radiobuttonlist"
repeatitems="3" repeatlayout="table" textfield="name" valuefield="name" url="rush/feedback/getFeedbackList">
</div>
</div>
<br/>
<input widget="textarea" name="remark" label="备注" width="502px" height="30px"/>
<br/>
<div widget="toolbar" style="margin-left:550px;width:515px;margin-top:-494px;">
<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:550px;">
<div widget="datagrid" name="grid" style="width: 520px; height:220px;" url="rushtaskcenter/post/getCustomerContact" onselect="daili" 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="35" 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 field="vital" width="45" header="备注" ><input editor="edit"/></div>
</div>
<div widget="autosize">
<div widget="datagrid" name="daili" style="width: 520px; height:240px;" url="rush/account/getlistzuoxi" allowcelledit="true" allowcellselect="true" allowalternating="true" editnextonenterkey="true" editnextrowcell="true" multiSelect="true" >
<div type="indexcolumn" width="6" header="序号"></div>
<div field="cust_name" width="25" header="客户名称"></div>
<div field="cust_tax_code" width="10" header="客户税号"></div>
<div field="end_date" width="12" align="center" header="到期日期"></div>
<div field="cust_type" width="12" align="center" header="客户类型"></div>
<div field="injf" width="12" align="center" header="是否在机房"></div>
<div field="ifmz" width="12" align="center" header="是否免征"></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
var flag =true;
var mb="";
function init(param){
/* grid.checkcolumn.setSelected(1); */
parent.insertlogid("",2);
parent.document.getElementById('logid').value="";
var pageState = param['pageState'];
var task_id = param['task_id'];
var detail_id = param['detail_id'];
var user_id = param['user_id'];
var task_user_id = param['task_user_id'];
var center_id = param['center_id'];
var areacode = param['areacode'];
aos.get("areacode").setValue(areacode);
if(pageState){
aos.setState(pageState)
}
if(param['customer_id']){
aos.post({
url:"rushtaskcenter/post/getCustomerById",
data:param,
success:function(rtnData){
/**
*
* 如果分配任务时与当前系统中服务费到期日期不同则禁用保存和拨打电话按钮
* 否则禁用完成按钮
*/
aos.get("org_id").setValue(rtnData.org_id);
2023-01-31 14:21:49 +00:00
aos.get("sourcetype").setValue(rtnData.sourcetype);
2022-05-16 15:07:40 +00:00
aos.getForm().setData(rtnData);
if(rtnData.unequal==1){
/* if(aos.get('is_need_again').getValue()=='N'){
aos.get("savebtn").disable();
aos.get("callbtn").disable();}
else{
aos.get("callbtn").disable();
}
}else{
aos.get("finishbtn").disable();
} */
/* 因退费禁用 取消
aos.get("savebtn").disable();
aos.get("callbtn").disable(); */
}else{
aos.get("finishbtn").disable();
}
aos.getForm().setData(rtnData);
}
});
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("task_id").setValue(task_id);
aos.get("detail_id").setValue(detail_id);
aos.get("task_user_id").setValue(task_user_id);
aos.get("center_id").setValue(center_id);
aos.get("areacode").getValue(areacode);
}
}
function daili(e){
var grid = aos.get('daili');
var params={
mobile:e.record.mobile
};
grid.load(params);
}
function paigong(){
var grid = aos.get('grid');
var data = grid.getSelected();
if(!data){
aos.alert('你选择一个电话!');
return;
}
var feedback = aos.get('feedback');
if(feedback.value == null || feedback.value==''||(feedback.value!='同意办理托管'&&feedback.value!='在线指导办理托管'&&feedback.value!='已通过微信办理托管'&&feedback.value!='拒绝办理托管')){
aos.alert('你核实反馈结果是否需要派工!');
return ;
}
/* alert(data.mobile);
alert(aos.get('customer_id').getValue());
alert(aos.get('invoice_addr').getValue());*/
var param = {};
param['pageState'] = 'editnew';
param['customer_id']=aos.get('customer_id').getValue(); //客户id
param['cust_name']=aos.get('cust_name').getValue(); //客户名称
param['cust_tax_code']=aos.get('cust_tax_code').getValue();//客户税号
param['invoice_addr']=aos.get('invoice_addr').getValue(); //开票地址
param['mobile']=data.mobile; //最后一次的手机号
param['contact']=data.contact; //联系人的电话
param['feedback']=feedback.value; //反馈结果
param['org_id']=aos.get('org_id').getValue();
aos.showWindow('canvas/rush/paigong', param, '500px', '400px', '派工单详情', function(rtnValue){
grid.reload();
});
}
/**
*实时更新CRM中客户的服务费到期日期
*/
function getCrmCurrentEndDate(){
var data = {};
data['customer_id']=aos.get('customer_id').getValue();
aos.post({
url:"rush/post/getCrmCurrentEndDate",
data:data,
success:function(data){
aos.tip('成功获取最新CRM客户服务费到期日期');
aos.get('end_date').setValue(data.crm_end_date);
}
});
}
function endcall(){
if(parent.document.getElementById("newnewbarInit").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 save(){
aos.get("logid").setValue(parent.document.getElementById('logid').value+aos.get("msglogid").getValue());
if(!FORM.validate())
{
return;
}
if(!flag){
alert('已保存!')
return ;
}
/* var result=mb.split(',');
var grid = aos.get('grid');
aos.tip('对您拨打过得'+result+'这些电话进行标记',2*1000); */
var feedback = aos.get('feedback');
if(feedback.value == null || feedback.value==''){
aos.alert('请录入反馈结果!');
return ;
}
/* for(var i=0;i<result.length;i++){
}
*/
var grid = aos.get('grid');
var data = aos.getForm().getData();
data['grid']=grid.getData();
data['customer_id']=aos.get('customer_id').getValue();
data['center_id']=aos.get('center_id').getValue();
data['task_id']=aos.get('task_id').getValue();
data['detail_id']=aos.get('detail_id').getValue();
data['task_user_id']=aos.get('task_user_id').getValue();
2023-01-31 14:21:49 +00:00
data['sourcetype']=aos.get('sourcetype').getValue();
2022-05-16 15:07:40 +00:00
data['callLogs']=aos.get('logid').getValue();
data['added']=getChangeData("added");
data['modified']=getChangeData("modified");
data['removed']=getChangeData("removed");
aos.post({
url:"rushtaskcenter/post/saveRecord",
data:data,
success:function(){
aos.tip('保存成功!');
parent.insertlogid("",2);
CloseWindow();
}
});
/* aos.showWindow('canvas/rush/companyedit', param, '400px', '800px', '功能授权',function(rtnValue){
grid.reload();
}); */
flag=false;
}
function call(){
var areacode = aos.get("areacode").getValue();
var zz = "0371";
var grid = aos.get('grid');
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;
}
2022-11-22 06:55:55 +00:00
var one = {};
one['mobile']=mobile;
2022-05-16 15:07:40 +00:00
aos.post({
2022-11-22 06:55:55 +00:00
url:"rush/telaccount/check",
data:one,
2022-05-16 15:07:40 +00:00
success:function(rtnData){
2022-11-22 06:55:55 +00:00
if(rtnData=="1"){
aos.alert('所选电话不是本人测试电话电话,不允许拨打!');
return;
2022-05-16 15:07:40 +00:00
}
2022-11-22 06:55:55 +00:00
else{
var calldata = aos.getForm().getData();
calldata['customer_id']=aos.get('customer_id').getValue();
calldata['end_date']=aos.get('end_date').getValue();
mb+=mobile+',';
aos.post({
url:"rush/search/isCall",
data:calldata,
success:function(rtnData){
// 2018.1.31 暂时去掉正在联系的判断
if(rtnData.called=="A"){
aos.alert('客户正在联系中');
return;
}else{
aos.get("is_call").setValue("Y");
aos.get("customername").setValue(data.contact);
parent.document.getElementById('info').value="联系"+data.contact+"("+mobile+");"+"客户名称:"+aos.get("cust_name").getValue()+";"+"到期时间:"+aos.get("end_date").getValue();
parent.document.getElementById('end_date').value=aos.get("end_date").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))){
mobile = areacode+mobile;
}else{
if(null==areacode||areacode==""){
mobile = zz+mobile;
}
}
}
if(parent.document.getElementById("newnewbarInit").value==1){
window.parent.phoneBar.agentApi.makeCall(data.mobile,-1,3);
}else{
window.parent.application.oJVccBar.MakeCall(mobile);
}
}else{
aos.alert('请在主页面初始化电话条!');
return ;
}
}
}
});}
}})
2022-05-16 15:07:40 +00:00
}
}
//发送短信 电话拨通后可直接发送短信电话未接通发送短信会有提醒。发送成功后返回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']=aos.get('end_date').getValue();
messageparam['cust_name']=aos.get('cust_name').getValue();
messageparam['customer_id']=aos.get('customer_id').getValue();
messageparam['cutype']=aos.get('cust_type').getValue();
messageparam['injf']=aos.get('injf').getValue();
messageparam['ifmz']=aos.get('ifmz').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{
2023-06-18 13:01:29 +00:00
var one = {};
one['mobile']=mobile;
aos.post({
url:"rush/telaccount/check",
data:one,
success:function(rtnData){
if(rtnData=="1"){
aos.alert('所选电话不是本人测试电话电话,不允许发送短信!');
return;
}
else{
aos.showWindow('canvas/rush/message', messageparam, '550px', '350px', '短信发送', function(rtnValue){
aos.get("msglogid").setValue(rtnValue);
});
}
}
})
2022-05-16 15:07:40 +00:00
}
});
return ;
}
}
}
//退费短信
function messageback(){
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']=aos.get('end_date').getValue();
messageparam['cust_name']=aos.get('cust_name').getValue();
if(parent.document.getElementById('message').value!="")
{
aos.showWindow('canvas/rush/messageback', 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/messageback', 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();
data['visit_remark']=aos.get('remark').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 latestrecord(){
var param = {};
param['customer_id'] = aos.get('customer_id').getValue();
aos.showWindow( 'canvas/rush/oldpaylist', param, '600px','400px','缴费记录',
function(params, rtnData){
}
);}
/**
* 任务中心到期日期与当前客户到期日期不同,可点击完成直接完成此项任务
*/
function finishTask(){
var data = {};
data['detail_id']=aos.get('detail_id').getValue();
data['task_user_id']=aos.get('task_user_id').getValue();
data['center_id']=aos.get('center_id').getValue();
data['task_id']=aos.get('task_id').getValue();
aos.post({
url : 'rushtaskcenter/post/finishTaskById',
data : data,
success : function(data){
CloseWindow();
}
});
}
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>