rushfee/build/classes/html/rush/paigong.html

94 lines
3.6 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-admin" id="savebtn" onclick="save">派工</a>
<a widget="button" iconCls="icon-exit" onclick="CloseWindow()">退出</a>
</div>
<input id="customer_id" widget="hidden" />
<input id="crmid" widget="hidden" />
<input id="org_id" widget="hidden" />
<input widget="edit" name="cust_name" label="客户名称" readonly="true" style="width:400px;margin-top:5px"/>
<br/>
<input widget="edit" name="cust_tax_code" label="客户税号" readonly="true" style="margin-top:5px"/>
<input name="SERVICE_DATE" widget=datechooser allowinput="f" label="派工日期">
<input name="shiduan" widget=combox allowinput="f"
data="[{id:'上午',text:'上午'},{id:'下午',text:'下午'},{id:'全天',text:'全天'}]" label="派工时段">
<input widget="edit" name="feedback" label="反馈结果" readonly="true" style="margin-top:5px"/>
<input widget="edit" name="contact" label="联系人" />
<br/>
<input widget="edit" name="mobile" label="电话" />
<br/>
<input widget="textarea" name="invoice_addr" label="开票地址" width="400px" height="60px" />
<br/>
<input widget="textarea" name="remark" label="备注" width="400px" height="40px" />
<br/>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
var curDate = new Date();
var begintime = new Date(curDate.getTime() + 24*60*60*1000);
aos.get('SERVICE_DATE').setValue(begintime);
var select=aos.get('shiduan');
var asd ='全天';
select.setValue(asd);
function init(param){
aos.get("customer_id").setValue(param.customer_id);
aos.get("cust_name").setValue(param.cust_name);
aos.get("cust_tax_code").setValue(param.cust_tax_code);
aos.get("contact").setValue(param.contact);
aos.get("feedback").setValue(param.feedback);
aos.get("mobile").setValue(param.mobile);
aos.get("invoice_addr").setValue(param.invoice_addr);
aos.get("org_id").setValue(param.org_id);
/* alert(param.customer_id);
alert(param.mobile);*/
aos.post({
url:"rush/pai/crmid",
data:param,
success:function(data){
if(data.crmid==null){
aos.get("savebtn").disable();
aos.tip('未能和crm匹配无法保存派工单');
}
else{
aos.get("crmid").setValue(data.crmid);
}
}
});
}
function save(){
var data = aos.getForm().getData();
data['customer_id']=aos.get('customer_id').getValue();
data['cust_name']=aos.get('cust_name').getValue();
data['cust_tax_code']=aos.get('cust_tax_code').getValue();
data['contact']=aos.get('contact').getValue();
data['feedback']=aos.get('feedback').getValue();
data['mobile']=aos.get('mobile').getValue();
data['invoice_addr']=aos.get('invoice_addr').getValue();
data['remark']=aos.get('remark').getValue();
data['crmid']=aos.get('crmid').getValue();
data['org_id']=aos.get('org_id').getValue();
data['SERVICE_DATE']=aos.get('SERVICE_DATE').getValue();
data['SERVICE_PERIOD']=aos.get('shiduan').getValue();
aos.post({
url:"rush/pai/save",
data:data,
success:function(data){
if(data=1){
CloseWindow();}
else{
aos.tip('派工出现异常联系管理员!');
}
}
});
}
</script>
</html>