272 lines
8.3 KiB
HTML
272 lines
8.3 KiB
HTML
|
<html login="false">
|
||
|
<head>
|
||
|
<title>代理会计</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div widget="toolbar" style="padding:10px;border:0;">
|
||
|
<input widget="edit" name="custname" label="客户名称"/>
|
||
|
<input widget="edit" name="mobile" label="电话"/>
|
||
|
<input name="enddate" widget=datechooser allowinput="f" valueFormat="yyyy-MM-dd" label="到期时间(<=)" >
|
||
|
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
|
||
|
<a widget="button" iconCls="icon-edit" onclick="tianjia()">批量保存</a>
|
||
|
<a widget="button" iconCls="icon-edit" onclick="edit()">批量标记</a>
|
||
|
<a widget="button" iconCls="icon-enabled" onclick="all()">全选</a>
|
||
|
</div>
|
||
|
<div widget="autosize">
|
||
|
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="rush/account/getlist" allowcelledit="true" allowcellselect="true" allowalternating="true" editnextonenterkey="true" editnextrowcell="true" multiSelect="true" >
|
||
|
<div type="checkcolumn" width="4" header="选择" ></div>
|
||
|
<div type="indexcolumn" width="6" header="序号"></div>
|
||
|
<div field="customerid" visible="false" header="客户id"></div>
|
||
|
<div field="revenueid" visible="false" header="税局id"></div>
|
||
|
<div field="cust_name" width="30" header="客户名称"></div>
|
||
|
<div field="cust_tax_code" width="10" header="客户税号"></div>
|
||
|
<div field="end_date" width="11" align="center" header="到期日期"></div>
|
||
|
<div field="agree_visit_date" width="11" align="center" header="约定回访日期"></div>
|
||
|
<div field="id" visible="id"></div>
|
||
|
<div field="intask" width="10" header="是否在任务中心"></div>
|
||
|
<div field="user_name" width="10" header="任务拥有者"></div>
|
||
|
<div field="task_id" visible="任务id"></div>
|
||
|
<div field="org_id" visible="分公司id"></div>
|
||
|
<div field="operate_date" width="14" header="最近一次催缴日期"></div>
|
||
|
<div field="org_short_name" width="13" header="分公司"></div>
|
||
|
<div field="injf" width="20" header="是否在机柜"></div>
|
||
|
<div field="ifmz" width="20" header="是否免征"></div>
|
||
|
<div field="cust_type" width="20" header="客户类型"></div>
|
||
|
<div field="revenuename" width="25" header="税局"></div>
|
||
|
<div field="task_user_id" visible="false" header="任务人员id"></div>
|
||
|
<div field="user_id" visible="false" header="任务参与人id"></div>
|
||
|
<!-- <div field="mobile" width="10" header="电话"></div> -->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</body>
|
||
|
<script type="text/javascript">
|
||
|
var grid = aos.get('grid');
|
||
|
|
||
|
function search(){
|
||
|
var custname=aos.get('custname').value;
|
||
|
var mobile=aos.get('mobile').value;
|
||
|
if(custname==''&&mobile==''){
|
||
|
aos.alert("请输入客户名称或手机号后再查询。");
|
||
|
return;
|
||
|
}
|
||
|
var params={custname:aos.get('custname').value,
|
||
|
mobile:aos.get('mobile').value,
|
||
|
enddate:aos.get('enddate').getValue()
|
||
|
};
|
||
|
grid.load(params);
|
||
|
}
|
||
|
/* 进行批量保存前先看看是不是自己的任务
|
||
|
*/
|
||
|
|
||
|
|
||
|
|
||
|
function tianjia(){
|
||
|
|
||
|
|
||
|
var a=0;
|
||
|
var rows=grid.getSelecteds();
|
||
|
if (rows==null||rows==''){
|
||
|
aos.alert('需要勾选保存企业');
|
||
|
return ;
|
||
|
}
|
||
|
else{
|
||
|
for(var i=0;rows.length>i;i++){
|
||
|
var params={
|
||
|
agree_visit_date:rows[i].agree_visit_date,
|
||
|
user_id:rows[i].user_id,
|
||
|
operate_date:rows[i].operate_date
|
||
|
}
|
||
|
aos.post({
|
||
|
url:"rush/account/mytask",
|
||
|
data:params,
|
||
|
success:function(data, textStatus, jqXHR){
|
||
|
if(data==1){
|
||
|
a=a+1;
|
||
|
}
|
||
|
else{
|
||
|
aos.tip('最近催缴日期在三天之内不能保存');
|
||
|
return;
|
||
|
}
|
||
|
if(a==rows.length){
|
||
|
add();}
|
||
|
}
|
||
|
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
function add(){
|
||
|
// aos.get("logid").setValue(parent.document.getElementById('logid').value+aos.get("msglogid").getValue());
|
||
|
var param = {};
|
||
|
param['pageState'] = 'editnew';
|
||
|
aos.showWindow('canvas/tick/feedbackadd', param, '500px', '400px', '批量反馈类型添加', function(params,rtnValue){
|
||
|
var feedback = params['feedback'];
|
||
|
var remark = params['remark']+'(保存自代理会计)';
|
||
|
if(params=="close"){
|
||
|
return;
|
||
|
}
|
||
|
var rows=grid.getSelecteds();
|
||
|
for(var i=0;rows.length>i;i++){
|
||
|
var data={
|
||
|
customer_id:rows[i].customerid,
|
||
|
cust_name:rows[i].cust_name,
|
||
|
legal_person:rows[i].legal_person,
|
||
|
address:rows[i].address,
|
||
|
task_id:rows[i].task_id,
|
||
|
center_id:rows[i].id,
|
||
|
org_name:rows[i].org_short_name,
|
||
|
task_id:rows[i].task_id,
|
||
|
detail_id:rows[i].detail_id,
|
||
|
task_user_id:rows[i].task_user_id,
|
||
|
agree_visit_date:rows[i].agree_visit_date,
|
||
|
user_id:rows[i].user_id,
|
||
|
revenuename:rows[i].revenuename,
|
||
|
cust_tax_code:rows[i].cust_tax_code,
|
||
|
feedback:feedback,
|
||
|
remark:remark,
|
||
|
end_date:rows[i].end_date,
|
||
|
org_id:rows[i].org_id
|
||
|
}
|
||
|
|
||
|
aos.post({
|
||
|
url:"rush/account/save",
|
||
|
data:data,
|
||
|
success:function(rtnData){
|
||
|
aos.tip('保存成功');
|
||
|
grid.reload();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
});
|
||
|
}
|
||
|
function edit(){
|
||
|
var b=0;
|
||
|
var rows=grid.getSelecteds();
|
||
|
|
||
|
if (rows==null||rows==''){
|
||
|
aos.alert('需要勾选标记企业');
|
||
|
return ;
|
||
|
}
|
||
|
else{
|
||
|
for(var i=0;rows.length>i;i++){
|
||
|
var params={
|
||
|
agree_visit_date:rows[i].agree_visit_date,
|
||
|
user_id:rows[i].user_id,
|
||
|
operate_date:rows[i].operate_date
|
||
|
}
|
||
|
aos.post({
|
||
|
url:"rush/account/mytask",
|
||
|
data:params,
|
||
|
success:function(data, textStatus, jqXHR){
|
||
|
if(data==1){
|
||
|
b=b+1;
|
||
|
}
|
||
|
else{
|
||
|
aos.tip('不是本人标记不能再次标记,最近催缴日期在三天之内不能在标记');
|
||
|
return;
|
||
|
}
|
||
|
if(b==rows.length){
|
||
|
zhixing();}
|
||
|
}
|
||
|
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
function zhixing(){
|
||
|
var param = {};
|
||
|
param['pageState'] = 'editnew';
|
||
|
aos.showWindow('canvas/tick/yuyueadd', param, '350px', '350px', '指定回访日期', function(params,rtnValue){
|
||
|
var visit_date = params['agree_visit_date'];
|
||
|
if(params=="close"){
|
||
|
return;
|
||
|
}
|
||
|
var rows=grid.getSelecteds();
|
||
|
for(var i=0;rows.length>i;i++){
|
||
|
if(rows[i].agree_visit_date==null||rows[i].agree_visit_date==""){
|
||
|
var data={ customer_id:rows[i].customerid,
|
||
|
revenueid:rows[i].revenueid,
|
||
|
cust_name:rows[i].cust_name,
|
||
|
legal_person:rows[i].legal_person,
|
||
|
address:rows[i].address,
|
||
|
task_id:rows[i].task_id,
|
||
|
center_id:rows[i].id,
|
||
|
org_name:rows[i].org_short_name,
|
||
|
task_id:rows[i].task_id,
|
||
|
detail_id:rows[i].detail_id,
|
||
|
task_user_id:rows[i].task_user_id,
|
||
|
agree_visit_date:visit_date,
|
||
|
user_id:rows[i].user_id,
|
||
|
revenuename:rows[i].revenuename,
|
||
|
cust_tax_code:rows[i].cust_tax_code,
|
||
|
end_date:rows[i].end_date,
|
||
|
org_id:rows[i].org_id
|
||
|
}
|
||
|
aos.post({
|
||
|
url:"rush/account/biaoji",
|
||
|
data:data,
|
||
|
success:function(rtnData){
|
||
|
aos.tip('预约回访成功');
|
||
|
grid.reload();
|
||
|
}
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
else{
|
||
|
var abc={
|
||
|
center_id:rows[i].id,
|
||
|
|
||
|
agree_visit_date:visit_date
|
||
|
|
||
|
}
|
||
|
aos.post({
|
||
|
url:"rush/account/biao",
|
||
|
data:abc,
|
||
|
success:function(rtnData){
|
||
|
aos.tip('预约回访成功');
|
||
|
grid.reload();
|
||
|
}
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
}
|
||
|
function all(){
|
||
|
grid.selectAll();
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</html>
|