rushfee/build/classes/html/revisit/hf_excust_detail.html

185 lines
5.7 KiB
HTML

<html login="false">
<head>
<title>回访客户信息明细</title>
</head>
<div >
<div widget="toolbar" >
<a widget="button" iconCls="icon-log" onclick="hfLog()">回访记录</a>
<a widget="button" iconCls="icon-log" onclick="companyrecord()">处理记录</a>
<a widget="button" iconCls="icon-save" id="savebtn" onclick="save" linkToState="editold,editnew">保存</a>
</div>
<div style="clear:both" id="left_div">
<input name="id" widget="hidden" />
<input widget="edit" name="cust_name" label="客户名称" style="width:502px;margin-top:5px"/>
<br/>
<input widget="edit" name="cust_tax_code" label="客户税号" style="width:502px;margin-top:5px"/>
<br/>
<input widget="edit" name="org_name" label="分公司" style="width:502px;margin-top:5px"/>
<br/>
<!-- <input widget="edit" name="legal_person" label="法人代表" readonly="true" /> -->
<br/>
<div style="clear:both">
<div name="rustype" label="反馈结果" widget="radiobuttonlist"
repeatitems="4" repeatlayout="table" textfield="name" valuefield="name" url="hfexception/getDealType">
</div>
</div>
<br/>
<input widget="textarea" name="remark" label="备注" width="500px" height="78px"/>
</div>
</div>
<div widget="toolbar" id="right_top" style="margin-left:510px;width:665px;margin-top:-285px;">
<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:510px;">
<div widget="datagrid" name="grid" style="width:670px; height:254px;" url="revisit/getContactAll" allowcelledit="true" allowcellselect="true" allowalternating="true" editnextonenterkey="true" editnextrowcell="true" >
<div type="checkcolumn" width="20" header="选择" allowNull="true"></div>
<div type="indexcolumn" width="20" 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="50" header="联系电话"><input editor="edit"/></div>
<div field="source" width="50" header="来源" ></div>
<div field="flag" width="45" header="历史操作" ></div>
<div field="operate_date" width="75" header="更新日期" ></div>
<div field="mobile_mark" width="50" 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;
function resetHeight(){
var height=$("#left_div").height();
// alert(height);
$("#right_top").css("marginTop",5-height);
}
function init(param){
var pageState = param['pageState'];
aos.get("id").setValue(param['id']);
aos.get("cust_name").setValue(param['cust_name']);
aos.get("cust_tax_code").setValue(param['cust_tax_code']);
aos.get("org_name").setValue(param['org_name']);
if(pageState){
aos.setState(pageState)
}
grid.load(param);
if(param['state']=='1'){
aos.get("savebtn").disable();
aos.tip("该企业异常已处理");
}
resetHeight();
}
function hfLog(){
var param = {};
param['cust_name'] = aos.get('cust_name').getValue();
aos.showWindow( 'canvas/revisit/revisitRecord', param, '800px','400px','回访记录',
function(params,rtnData){
}
);
}
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 save(){
// if(!flag){
// alert('已保存!')
// return ;
// }
var rustype = aos.get('rustype');
if(rustype.value == null || rustype.value==''){
aos.alert('请录入反馈结果!');
return ;
}
if(getChangeData("added")==""&&getChangeData("modified")==""&&getChangeData("removed")){
aos.alert('请先对联系信息进行维护!');
return;
}
var grid = aos.get('grid');
var data = aos.getForm().getData();
data['grid']=grid.getData();
data['added']=getChangeData("added");
data['modified']=getChangeData("modified");
data['removed']=getChangeData("removed");
data['mobile_source']='branchorg';//分公司维护
data['id']=aos.get('id').getValue();
data['cust_name']=aos.get('cust_name').getValue();
data['rustype']=aos.get('rustype').getValue();
data['remark']=aos.get('remark').getValue();
aos.post({
url:"hfexception/saveRecord",
data:data,
success:function(rtnData){
if(rtnData.isOk == 1){
aos.tip('保存成功!');
CloseWindow();
flag=true;
}else{
aos.alert(rtnData.msg);
var params={cust_name:aos.get('cust_name').getValue()};
grid.reload(params);
flag=true;
}
}
});
}
function companyrecord(){
var param = {};
param['obj_id'] = aos.get('id').getValue();
aos.showWindow('canvas/revisit/hf_excust_log', param, '600px','400px','处理记录',
function(params, rtnData){
}
);
}
</script>
</html>