Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function(){
- $("#buttonhere").html("<button type='button' onclick='sync()'>同步</button>");
- })
- function sync(){
- $.ajax({
- url:'/weaverjn/qiluzhiyao/utils/it.jsp',
- type:'post',
- data:{
- EQUIPMENT_NO:$("#field16987").val(),
- ASSET_NO:$("#field16984").val(),
- billid:$("#billid").val()
- },
- beforeSend:function(){
- try{
- e8showAjaxTips('同步中...',true);
- }catch(e){}
- },
- complete:function(){
- e8showAjaxTips('',false);
- },
- success:function(data){
- if(data==0){
- top.Dialog.alert("同步成功");
- window.location.reload();
- }else if(data==1){
- top.Dialog.alert("更新失败");
- }else if(data==2){
- top.Dialog.alert("获取数据失败");
- }else if(data==3){
- top.Dialog.alert("设备号或资产号为空");
- }
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement