rushfee/resource/html/tick/cancel.html

167 lines
6.4 KiB
HTML
Raw Normal View History

2022-05-16 15:07:40 +00:00
<html login="false" auth="false">
<head>
<title>注销导入查询</title>
<style>
</style>
</head>
<body>
<div widget="toolbar" style="padding:4px;border:0;">
<!-- style="width:300px;" -->
<input widget="combox" name="company" label="分公司" url="rush/excustomer/getOrgList"
emptyText="请选择" textField="text" valueField="id" allowInput="false"
showNullItem="true" onvaluechanged="getRevenue" />
<!--<input name="yuefen" widget=combox allowinput="f" showNullItem="true" multiSelect="true"
data="[{id:'201901',text:'201901'},{id:'201902',text:'201902'},{id:'201903',text:'201903'},{id:'201904',text:'201904'},{id:'201905',text:'201905'},{id:'201906',text:'201906'},{id:'201907',text:'201907'},{id:'201908',text:'201908'},{id:'201909',text:'201909'},{id:'201910',text:'201910'},{id:'201911',text:'201911'},{id:'201912',text:'201912'},
{id:'202001',text:'202001'},{id:'202002',text:'202002'},{id:'202003',text:'202003'},{id:'202004',text:'202004'},{id:'202005',text:'202005'},{id:'202006',text:'202006'},{id:'202007',text:'202007'},{id:'202008',text:'202008'},{id:'202009',text:'202009'},{id:'202010',text:'202010'},{id:'202011',text:'202011'},{id:'202012',text:'202012'}]" label="月份">
-->
<input widget="combox" name="nianfen" label="年份"
data="[{id:'2019',text:'2019'},{id:'2020',text:'2020'},{id:'2021',text:'2021'},{id:'2022',text:'2022'}]"
textField="text" valueField="id" value="2020" />
<input name="yuefen" widget=combox allowinput="f" showNullItem="true" multiSelect="true"
data="[{id:'01',text:'01'},{id:'02',text:'02'},{id:'03',text:'03'},{id:'04',text:'04'},{id:'05',text:'05'},{id:'06',text:'06'},{id:'07',text:'07'},{id:'08',text:'08'},{id:'09',text:'09'},{id:'10',text:'10'},{id:'11',text:'11'},{id:'12',text:'12'}]" label="月份">
<input widget="edit" name="cust_name" label="客户名称" />
<input widget="edit" name="cust_tax_code" label="客户税号"/>
<input name="opera" widget=combox allowinput="f" showNullItem="true"
data="[{id:'1',text:'已处理'},{id:'2',text:'待处理'}]" label="是否处理">
<a widget="button" iconCls="icon-import" onclick="imp()">导入数据</a>
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>&nbsp;&nbsp;&nbsp;
<a widget="button" iconCls="icon-delete" onclick="delinfo()">删除</a>
</div>
<div widget="autosize">
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="rush/kaohe/SearchCancel">
<div type="indexcolumn" width="30" header="序号"></div>
<div field="id" visible="false" ></div>
<div field="customer_id" visible = false width="80" header="客户ID" ></div>
<div field="cust_name" width="80" header="客户名称" ></div>
<div field="cust_tax_code" width="70" header="客户税号" ></div>
<div field="tax_bureau_id" visible = false width="70" header="税务机关ID" ></div>
<div field="short_name" width="50" header="税务机关名称"></div>
<div field="is_flag" width="30" align="center" header="是否需要注销" ></div>
<div field="org_name" width="40" align="center" header="所属分公司"></div>
<div field="is_valid" width="50" align="center" header="crm是否有效" renderer= "ynRenderer"></div>
<!-- <div field="logout_note" width="40" align="center"header="crm是否注销"renderer= "clRenderer"></div> -->
<div field="opera" width="30" align="center" renderer="onRenderer" header="操作"></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
/* var url="rush/org/getRevenueByOrgId?companyid="; */
/* var select=aos.get('isdeal');
var asd ='0,2'; */
//select.setValue(asd);
function search(){
var params= {};
params={
nianfen:aos.get('nianfen').getValue(),
quarter : aos.get('yuefen').getValue(),
cust_name : aos.get('cust_name').getValue(),
companyname : aos.get('company').getValue(),
opera:aos.get('opera').getValue(),
cust_tax_code : aos.get('cust_tax_code').getValue()
}
grid.load(params);
}
function imp(){
aos.showWindow('canvas/authtask/cancel_detail', null, '400px', '200px', '注销数据导入', function(){
});
}
/* function exp(){
var cust_name : aos.get('cust_name').value ;
var companyname : aos.get('company').value ;
var cust_tax_code : aos.get('cust_tax_code').value ;
var is_crm : aos.get('yesno').value ;
var base = document.getElementsByTagName("base")[0].href;
window.location.href=base+"rush/kaohe/exp_cancel?cust_name="+cust_name+
"&companyname="+companyname+"&cust_tax_code="+cust_tax_code+
"&is_crm="+is_crm;
} */
function ynRenderer(e){
var row = e.row;
var value = row.is_valid;
if(value==0){
return "无效";
}else if(value==1){
return "需要变更为无效";
}else {
return "";
}
}
function clRenderer(e){
var row = e.row;
var value = row.logout_note;
if(value==1){
return "注销";
}else if(value==2){
return "转百旺";
}else {
return "";
}
}
var url="rush/org/getRevenueByOrgId?companyid=";
function getRevenue(e){
var company = aos.get('company');
var revenue = aos.get('revenue');
revenue_url = url+company.getValue();
revenue.load(revenue_url)
}
function onRenderer(e) {
//alert(Flag);
if (e.row.opera == null){
return "<a href='javascript:void(0)' style='text-decoration:none' onclick='rekp(\""+e.row.customer_id+"\")'>"+"处理 ";
}else {
return "已处理";
}
}
function rekp(customer_id){
aos.post({
url:'rush/kaohe/updatecancel',
data:{customer_id:customer_id},
success: function(){
//console.info(data);
grid.reload();
}
});
}
function delinfo(){
var row =grid.getSelected();
if(row == null){
aos.alert('请选择要删除的行','警告');
return ;
}
aos.confirm("确定删除吗","提示",function(action,value){
if(action=='ok'){
//@Request.Post("import_Cancel")
aos.post({
url:"rush/kaohe/delinfo",
data:{"id":row.id},
success:function(data){
grid.load();
}
});
}
})
}
</script>
</html>