rushfee/build/classes/html/rush/taskuser.html

244 lines
8.2 KiB
HTML
Raw Normal View History

2022-05-16 15:07:40 +00:00
<html login="false">
<head>
<meta charset="UTF-8">
<title>任务指派</title>
</head>
<body >
<div widget="toolbar" >
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
<a widget="button" iconCls="icon-save" onclick="save">保存</a>
<a widget="button" iconCls="icon-exit" onclick="CloseWindow()">退出</a>
</div>
<input widget="combox" name="company" label="分公司" url="rush/org/getOrgList"
emptyText="请选择" textField="text" valueField="id" allowInput="false" showNullItem="true"
style="width:502px;margin-top:5px" onvaluechanged="getRevenue" />
<br/>
<input widget="combox" name="revenue" label="税务机关" style="width:502px;" emptyText="请选择" textField="text" valueField="id" allowInput="false" showNullItem="true"/>
<br/>
<input widget="combox" name="expstate" label="到期情况" sqlid="rushfee_list.grouplist" showNullItem="true"/>
<input widget="combox" name="expstate" label="距上次催缴天数" sqlid="rushfee_list.grouplist" showNullItem="true"/>
<br/>
<input widget="edit" name="cust_tax_code" label="任务总条数" />
<br/>
<div widget="toolbar" style="margin-left:35px;width:460px;margin-top:10px;">
<a widget="button" iconcls="icon-add" onclick="addRow()">新增</a>
<a widget="button" iconcls="icon-delete" onclick="remove">删除</a>
</div>
<div widget="autosize" style="margin-left:35px;">
<div widget="datagrid" name="grid" style="width: 465px; height:140px;" url="" allowcelledit="true" allowcellselect="true" allowalternating="true" editnextonenterkey="true" editnextrowcell="true" >
<div type="indexcolumn" width="35" header="序号"></div>
<div field="user" width="50" header="人员" ><input editor="edit"/></div>
<div field="tasknum" width="30" header="条数" ><input editor="edit"/></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
var url="rush/org/getRevenueByOrgId?companyid=";
function init(param){
}
function getRevenue(e){
var company = aos.get('company');
var revenue = aos.get('revenue');
revenue_url = url+company.getValue();
revenue.load(revenue_url)
}
function addRow() {
var newRow = {
user:"请输入接受人账号",
tasknum:'输入任务条数'
};
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:"rush/record/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(aos.get('is_call').getValue() == 'N'){
// aos.alert('还未呼叫不能进行保存操作!');
//return ;
//}
var feedback = aos.get('feedback');
if(feedback.value == null || feedback.value==''){
aos.alert('请录入反馈结果!');
return ;
}
var grid = aos.get('grid');
var data = aos.getForm().getData();
data['grid']=grid.getData();
data['customer_id']=aos.get('customer_id').getValue();
data['callLogs']=aos.get('logid').getValue();
data['added']=getChangeData("added");
data['modified']=getChangeData("modified");
data['removed']=getChangeData("removed");
aos.post({
url:"rush/record/saveRecord",
data:data,
success:function(){
aos.tip('保存成功!');
parent.insertlogid("",2);
CloseWindow();
}
});
}
function record(){
var param = {};
param['customer_id'] = aos.get('customer_id').getValue();;
aos.showWindow( 'canvas/rush/rushlog', param, '1000px','500px','催缴记录',
function(params, rtnData){
}
);
}
function call(){
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;
}
var calldata = aos.getForm().getData();
calldata['customer_id']=aos.get('customer_id').getValue();
calldata['end_date']=aos.get('end_date').getValue();
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){
/* aos.post({
url:"rush/search/onCall",
data:calldata,
});
*/
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;
}
var messageparam = {};
messageparam['contact']=data.contact;
messageparam['mobile']=data.mobile;
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;
}
}
</script>
</html>