Browse Source

git-svn-id: https://192.168.57.71/svn/jsgkj@205 931142cf-59ea-a443-aa0e-51397b428577

ld_xuhx 9 năm trước cách đây
mục cha
commit
3aa356968a

+ 350 - 0
gkjsjy/trunk/WebContent/static/biz/js/gkjygl/gklhxkgl/gkjylhbg/lhbgdetail.js

@@ -0,0 +1,350 @@
+/**
+ * 理货变更
+ * 
+ */
+$.namespace("lhbg.detail");
+
+
+lhbg.detail.selData=null;
+lhbg.detail.szdData=null;
+lhbg.detail.gk = null;
+lhbg.detail.gq = null;
+
+lhbg.detail.init = function() {
+	initgkSelect('gksel', '', lhbg.detail.szdData,'showgq', 300);
+	initgqSelect('gqsel','','','',null,300);
+	initzyqSelect('zyqsel','','',null,300);
+}
+
+
+lhbg.detail.delData=function(data){
+	$.confirm({
+	    title: '确认框',
+	    content: '确认删除吗',
+	    confirm: function(){
+	    	 $.post($.app + "/lhbg/delete", {
+                 id : data
+             }, function(data) {
+                 if (data.success) {
+                	 $.alert({
+                		    title: '提示',
+                		    content: '删除成功',
+                		    confirm: function(){
+                		    	location.href=$.app+'/lhbg/main';
+                		    }
+                	 });
+                 } else {
+                	 $.alert({
+             		    title: '提示',
+             		    content: data.message,
+             		    confirm: function(){
+             		        
+             		    }
+             	 });
+                 }
+             }, "json");
+	    },
+	    cancel: function(){
+	    }
+	});
+}
+
+function guanbitcpop() {
+	$('.theme-popover-mask-tc').fadeOut(100);
+	$('.theme-popover-tc').slideUp(0);
+}
+
+
+
+function showgk() {
+	initgqSelect('gqsel', '', '', '', 'showzyq', 300);
+	initgkSelect('gksel', '', xkzsq.detail.szdData, "showgq", 300);
+}
+
+function showgq() {
+	initgqSelect('gqsel', '', xkzsq.detail.szdData, $('.gkselectpicker')
+			.val(), null, 300);
+}
+
+
+
+
+lhbg.detail.bgdzChe = function(){
+	if($('#bgdzChe').is(':checked')){
+		$("#xbgdz").removeAttr("readonly"); 
+	}else{
+		 $("#xbgdz").attr({ readonly: 'true' });
+		 $('#xbgdz').val('');
+	}
+}
+
+lhbg.detail.fddbrChe = function(){
+	if($('#fddbrChe').is(':checked')){
+		$("#xfddbr").removeAttr("readonly"); 
+	}else{
+		 $("#xfddbr").attr({ readonly: 'true' });
+		 $('#xfddbr').val('');
+	}
+}
+
+
+vae=function(a,b){
+	if(isEmpty(a.val())){
+		ts(b+"不能为空",a);
+		return false;
+		}
+	return true;
+};
+
+// 保存
+lhbg.detail.save = function(){
+	
+	//验证必填字段是否为空
+	if(vae($('#addform input[name=jyrmc]'),"港口经营人名称")==false){return false;}
+	if (vae($('#addform input[name=lxr]'), "联系人") == false) {
+		return false;
+	}
+	if (vae($('#addform input[name=dh]'), "电话") == false) {
+		return false;
+	}
+	
+	if($('#bgdzChe').is(':checked')){
+		if(vae($('#addform input[name=xbgdz]'),"变更后办公地址")==false){return false;}
+	}
+	
+	if($('#fddbrChe').is(':checked')){
+		if(vae($('#addform input[name=xfddbr]'),"变更后法定代表人")==false){return false;}
+	}
+	
+	$(".btn").attr("disabled",true);
+	 $.ajax({
+         url:$.app+"/lhbg/save",
+         data:$("#addform").serialize(),
+         type:"post",
+         dataType:"json",
+         success:function(data){// ajax返回的数据
+	           if (data.success) {
+	        	   $.alert({
+						title : '提示',
+						content : '操作成功',
+						confirm : function() {
+							 location.href=$.app+'/lhbg/main';
+						}
+					});
+		       		
+	           }else{
+		           	$.alert({
+		       		    title: '提示',
+		       		    content: data.message,
+		       		    confirm: function(){
+		       		    	$(".btn").attr("disabled",false);
+		       		    }
+		           	});
+	           }
+	     }
+    }); 
+}
+
+//保存
+lhbg.detail.submit = function(){
+	//验证必填字段是否为空
+	if(vae($('#addform input[name=jyrmc]'),"港口经营人名称")==false){return false;}
+	//验证必填字段是否为空
+	if(vae($('#addform input[name=jyrmc]'),"港口经营人名称")==false){return false;}
+	if (vae($('#addform input[name=lxr]'), "联系人") == false) {
+		return false;
+	}
+	if (vae($('#addform input[name=dh]'), "电话") == false) {
+		return false;
+	}
+	
+	
+	if($('#bgdzChe').is(':checked')){
+		if(vae($('#addform input[name=xbgdz]'),"变更后办公地址")==false){return false;}
+	}
+	
+	if($('#fddbrChe').is(':checked')){
+		if(vae($('#addform input[name=xfddbr]'),"变更后法定代表人")==false){return false;}
+	}
+	
+	$(".btn").attr("disabled",true);
+	 $.ajax({
+		 url:$.app+"/lhbg/submit",
+         data:$("#addform").serialize(),
+		type : "post",
+		dataType : "json",
+         success:function(data){// ajax返回的数据
+	           if (data.success) {
+	        	   $.alert({
+						title : '提示',
+						content : '操作成功',
+						confirm : function() {
+							 location.href=$.app+'/lhbg/main';
+						}
+					});
+	           }else{
+		           	$.alert({
+		       		    title: '提示',
+		       		    content: data.message,
+		       		    confirm: function(){
+		       		    	$(".btn").attr("disabled",false);
+		       		    }
+		           	});
+	           }
+	     }
+    }); 
+}
+
+// 返回
+lhbg.detail.back = function(){
+	
+	location.href=$.app+'/lhbg/main';
+   		
+}
+
+// 保存附件
+lhbg.detail.submitFile = function(id){
+	 $('#addform').form('submit', {
+		 url :$.app + '/lhbg/saveFile',
+	        onSubmit : function() {
+	        },
+	        success : function(data, status) {
+	        	 var file = $('#fjid'+id);
+	             file.after(file.clone().val(""));
+	             file.remove();
+	             if (data) {
+	            	 data = data.replace("<audio controls=\"controls\" style=\"display: none;\"></audio>","");
+	                 data = $.parseJSON(data);
+	             }
+	             if (data.success) {
+	 				var accContect = data.attrs.acc.fjmc;
+					var fjid = data.attrs.acc.fjid;
+					var accid = data.attrs.acc.id;
+					var str = "<tr align='center'>";
+					str =str +"<td style='width:40%'>"+ "<input value='"
+							+ accid
+							+ "' name='accid' type='hidden'>"
+							+ "<a class='main_title' href='/jsjy/accessory/download?id="
+							+ fjid + "'> " + accContect + "</a>" +"</td>";
+					
+					str =str+"<td style='width:15%'>"+ '<a class="btn btn-default btn-xs" href="#" onclick="lhbg.detail.delFj(\''
+							+ accid
+							+ '\','
+							+ '$(this)'
+							+ ')">删除</a>' +"</td></tr>";
+					$('#tableId').append(str);
+	             }
+	             else {
+	                 $.messager.showError(data.message);
+	             }
+	        }
+	    });
+
+}
+ 
+// 删除accid 附件关联ID,id 是第几行附件
+lhbg.detail.delFj = function(accid,tr){
+	$.confirm({
+	    title: '确认框',
+	    content: '确认删除吗',
+	    confirm: function(){
+	    	 $.post($.app + "/lhbg/delFj", {
+                 ids : accid
+             }, function(data) {
+                 if (data.success) {
+                	 $(tr).parent().parent().remove();
+                 } else {
+                	 $.alert({
+             		    title: '提示',
+             		    content: data.message,
+             		    confirm: function(){
+             		    }
+             	 });
+                 }
+             }, "json");
+	    },
+	    cancel: function(){
+	    }
+	});
+}
+
+
+
+lhbg.detail.audit=function(auditpass,id){
+	var opflag = $('#opflag').val();
+	var shyj="";
+	if(opflag == 1){
+		shyj = $('#clscyj').val();
+	}else if(opflag == 2){
+		shyj = $('#hcyj').val();
+	}else if(opflag == 3){
+		shyj = $('#fhyj').val();
+	}else if(opflag == 4){
+		shyj = $('#spyj').val();
+	}
+	var audit;
+	if(auditpass=="Y"){
+		audit=true;
+	}else{
+		audit=false;
+	}
+	$.post($.app + "/lhbg/audit", {
+		id:id,
+        shyj:shyj,
+        flag:audit
+    }, function(data) {
+    	if (data.success) {
+    		if(data.attrs.jflag){
+    			location.href=$.app+'/lhbg/addXkzjds?bgid='+id;
+    		}else{
+    		 	$.alert({
+           		    title: '提示',
+           		    content: '操作成功',
+           		    confirm: function(){
+           		    	lhbg.detail.back();
+           		    }
+               	});
+    		}
+    		
+          
+       }else {
+           	$.alert({
+       		    title: '提示',
+       		    content: data.message,
+       		    confirm: function(){
+       		    	
+       		    }
+           	});
+       }
+    	
+    }, "json");
+}
+
+
+lhbg.detail.submitAudit=function(){
+	 $.ajax({
+         url:$.app + "/lhbg/submitAudit",
+         data:$("#addform").serialize(),
+         type:"post",
+         dataType:"json",
+         success:function(data){// ajax返回的数据
+        	 if (data.success) {
+     		 	$.alert({
+            		    title: '提示',
+            		    content: '操作成功',
+            		    confirm: function(){
+            		    	location.href=$.app+'/lhbg/main';
+            		    }
+                	});
+            }else {
+                	$.alert({
+            		    title: '提示',
+            		    content: data.message,
+            		    confirm: function(){
+            		    	
+            		    }
+                	});
+            }
+	     }
+    }); 
+}

+ 96 - 0
gkjsjy/trunk/WebContent/static/biz/js/gkjygl/gklhxkgl/gkjylhbg/lhbgmain.js

@@ -0,0 +1,96 @@
+/**
+ * 理货变更
+ * 
+ */
+$.namespace("lhbg.main");
+
+lhbg.main.szd = null;
+lhbg.main.szgq = null;
+lhbg.main.szgk = null;
+
+
+lhbg.main.init = function() {
+	
+	lhbg.main.sel();
+	// 把form传入,构造翻页控件
+	pageinfo($("#lhbgform"));
+}
+
+lhbg.main.sel = function(){
+	initszdSelect('szdsel', lhbg.main.szd, 'showgk', '80%');
+	initgkSelect('gksel', lhbg.main.szgk,  lhbg.main.szd,'showgq', '80%');
+	initgqSelect('gqsel', lhbg.main.szgq,  lhbg.main.szd,lhbg.main.szgk, null, '80%');
+}
+
+function showgk() {
+	initgqSelect('gqsel','','','',null,200);
+	initgkSelect('gksel', lhbg.main.szgk, $('.szdselectpicker').val(),
+			'showgq', '80%');
+}
+
+function showgq() {
+	initgqSelect('gqsel', lhbg.main.szgq, $('.szdselectpicker').val(),
+			$('.gkselectpicker').val(), null, '80%');
+}
+
+
+//新增
+lhbg.main.add = function() {
+	
+	location.href=$.app+"/lhbg/add";
+			
+	
+}
+
+lhbg.main.search=function(){
+	$("#lhbgform").submit();
+}
+
+lhbg.main.del=function(data){
+	$.confirm({
+	    title: '确认框',
+	    content: '确认删除吗',
+	    confirm: function(){
+	    	 $.post($.app + "/lhbg/delete", {
+                 id : data
+             }, function(data) {
+                 if (data.success) {
+                	 $.alert({
+                		    title: '提示',
+                		    content: '删除成功',
+                		    confirm: function(){
+                		    	$("#lhbgform").submit();
+                		    }
+                	 });
+                 } else {
+                	 $.alert({
+             		    title: '提示',
+             		    content: data.message,
+             		    confirm: function(){
+             		        
+             		    }
+             	 });
+                 }
+             }, "json");
+	    },
+	    cancel: function(){
+	    }
+	});
+}
+
+lhbg.main.edit=function(data){
+	location.href=$.app+"/lhbg/edit?id="+data;
+}
+
+lhbg.main.back=function(data){
+	location.href=$.app+"/lhbg/edit?flag=th&id="+data;
+}
+
+lhbg.main.banli=function(data){
+	location.href=$.app+"/lhbg/view?flag=audit&id="+data;
+}
+
+lhbg.main.view=function(data){
+	location.href=$.app+"/lhbg/view?id="+data;
+}
+

+ 0 - 0
gkjsjy/trunk/WebContent/static/biz/js/gkjygl/gklhxkgl/lhxkgldetail.js → gkjsjy/trunk/WebContent/static/biz/js/gkjygl/gklhxkgl/gkjylhsq/lhsqdetail.js


+ 92 - 0
gkjsjy/trunk/WebContent/static/biz/js/gkjygl/gklhxkgl/gkjylhsq/lhsqmain.js

@@ -0,0 +1,92 @@
+/**
+ * 理货申请
+ * 
+ */
+$.namespace("lhsq.main");
+
+
+
+lhsq.main.init = function() {
+
+	lhsq.main.sel();
+	// 把form传入,构造翻页控件
+	pageinfo($("#lhsqform"));
+}
+lhsq.main.sel = function() {
+	initszdSelect('szdsel', lhsq.main.szd, 'showgk', '80%');
+	initgkSelect('gksel', lhsq.main.szgk, lhsq.main.szd, 'showgq', '80%');
+	initgqSelect('gqsel', lhsq.main.szgq, lhsq.main.szd, lhsq.main.szgk,
+			null, '80%');
+}
+
+function showgk() {
+	initgqSelect('gqsel', '', '', '', null, 200);
+	initgkSelect('gksel', lhsq.main.szgk, $('.szdselectpicker').val(),
+			'showgq', '80%');
+}
+
+function showgq() {
+	initgqSelect('gqsel', lhsq.main.szgq, $('.szdselectpicker').val(), $(
+			'.gkselectpicker').val(), null, '80%');
+}
+
+
+
+lhsq.main.search = function() {
+	debugger;
+	$('#pagejump').val(1);
+	$("#lhsqform").submit();
+}
+
+lhsq.main.edit = function(data) {
+	location.href = $.app + "/gklhsq/editmain?id=" + data;
+}
+
+lhsq.main.back = function(data) {
+	location.href = $.app + "/gklhsq/editmain?flag=th&id=" + data;
+}
+
+lhsq.main.view = function(data) {
+	location.href = $.app + "/gklhsq/viewmain?id=" + data;
+}
+
+lhsq.main.del = function(data) {
+	$.confirm({
+		title : '确认框',
+		content : '确认删除吗',
+		confirm : function() {
+			$.post($.app + "/lhsq/delete", {
+				id : data
+			}, function(data) {
+				if (data.success) {
+					$.alert({
+						title : '提示',
+						content : '删除成功',
+						confirm : function() {
+							$("#lhsqform").submit();
+						}
+					});
+				} else {
+					$.alert({
+						title : '提示',
+						content : data.message,
+						confirm : function() {
+
+						}
+					});
+				}
+			}, "json");
+		},
+		cancel : function() {
+		}
+	});
+}
+
+
+//新增
+lhsq.main.add = function() {
+	
+	location.href = $.app + "/lhsq/addmain";
+			
+
+}

+ 327 - 0
gkjsjy/trunk/WebContent/static/biz/js/gkjygl/gklhxkgl/gkjylhyx/lhyxdetail.js

@@ -0,0 +1,327 @@
+/**
+ * 理货延续
+ * 
+ */
+$.namespace("lhyx.detail");
+
+
+lhyx.detail.selData=null;
+lhyx.detail.szdData=null;
+lhyx.detail.gk = null;
+lhyx.detail.gq = null;
+
+lhyx.detail.init = function() {
+	initgkSelect('gksel', '', lhyx.detail.szdData,'showgq', 300);
+	initgqSelect('gqsel','','','',null,300);
+	initzyqSelect('zyqsel','','',null,300);
+}
+
+
+lhyx.detail.delData=function(data){
+	$.confirm({
+	    title: '确认框',
+	    content: '确认删除吗',
+	    confirm: function(){
+	    	 $.post($.app + "/lhyx/delete", {
+                 id : data
+             }, function(data) {
+                 if (data.success) {
+                	 $.alert({
+                		    title: '提示',
+                		    content: '删除成功',
+                		    confirm: function(){
+                		    	location.href=$.app+'/lhyx/main';
+                		    }
+                	 });
+                 } else {
+                	 $.alert({
+             		    title: '提示',
+             		    content: data.message,
+             		    confirm: function(){
+             		        
+             		    }
+             	 });
+                 }
+             }, "json");
+	    },
+	    cancel: function(){
+	    }
+	});
+}
+
+function guanbitcpop() {
+	$('.theme-popover-mask-tc').fadeOut(100);
+	$('.theme-popover-tc').slideUp(0);
+}
+
+
+
+function showgk() {
+	initgqSelect('gqsel', '', '', '', 'showzyq', 300);
+	initgkSelect('gksel', '', xkzsq.detail.szdData, "showgq", 300);
+}
+
+function showgq() {
+	initgqSelect('gqsel', '', xkzsq.detail.szdData, $('.gkselectpicker')
+			.val(), null, 300);
+}
+
+
+
+
+lhyx.detail.bgdzChe = function(){
+	if($('#bgdzChe').is(':checked')){
+		$("#xbgdz").removeAttr("readonly"); 
+	}else{
+		 $("#xbgdz").attr({ readonly: 'true' });
+		 $('#xbgdz').val('');
+	}
+}
+
+lhyx.detail.fddbrChe = function(){
+	if($('#fddbrChe').is(':checked')){
+		$("#xfddbr").removeAttr("readonly"); 
+	}else{
+		 $("#xfddbr").attr({ readonly: 'true' });
+		 $('#xfddbr').val('');
+	}
+}
+
+
+vae=function(a,b){
+	if(isEmpty(a.val())){
+		ts(b+"不能为空",a);
+		return false;
+		}
+	return true;
+};
+
+// 保存
+lhyx.detail.save = function(){
+	
+	//验证必填字段是否为空
+	if(vae($('#addform input[name=jyrmc]'),"港口经营人名称")==false){return false;}
+	if (vae($('#addform input[name=lxr]'), "联系人") == false) {
+		return false;
+	}
+	
+	$(".btn").attr("disabled",true);
+	 $.ajax({
+         url:$.app+"/lhyx/save",
+         data:$("#addform").serialize(),
+         type:"post",
+         dataType:"json",
+         success:function(data){// ajax返回的数据
+	           if (data.success) {
+	        	   $.alert({
+						title : '提示',
+						content : '操作成功',
+						confirm : function() {
+							 location.href=$.app+'/lhyx/main';
+						}
+					});
+		       		
+	           }else{
+		           	$.alert({
+		       		    title: '提示',
+		       		    content: data.message,
+		       		    confirm: function(){
+		       		    	$(".btn").attr("disabled",false);
+		       		    }
+		           	});
+	           }
+	     }
+    }); 
+}
+
+//保存
+lhyx.detail.submit = function(){
+	//验证必填字段是否为空
+	if(vae($('#addform input[name=jyrmc]'),"港口经营人名称")==false){return false;}
+	//验证必填字段是否为空
+	if(vae($('#addform input[name=jyrmc]'),"港口经营人名称")==false){return false;}
+	if (vae($('#addform input[name=lxr]'), "联系人") == false) {
+		return false;
+	}
+	
+	$(".btn").attr("disabled",true);
+	 $.ajax({
+		url:$.app+"/lhyx/save",
+	    data:$("#addform").serialize(),
+		type : "post",
+		dataType : "json",
+         success:function(data){// ajax返回的数据
+	           if (data.success) {
+	        	   $.alert({
+						title : '提示',
+						content : '操作成功',
+						confirm : function() {
+							 location.href=$.app+'/lhyx/main';
+						}
+					});
+	           }else{
+		           	$.alert({
+		       		    title: '提示',
+		       		    content: data.message,
+		       		    confirm: function(){
+		       		    	$(".btn").attr("disabled",false);
+		       		    }
+		           	});
+	           }
+	     }
+    }); 
+}
+
+// 返回
+lhyx.detail.back = function(){
+	
+	location.href=$.app+'/lhyx/main';
+   		
+}
+
+// 保存附件
+lhyx.detail.submitFile = function(id){
+	 $('#addform').form('submit', {
+		 url :$.app + '/lhyx/saveFile',
+	        onSubmit : function() {
+	        },
+	        success : function(data, status) {
+	        	 var file = $('#fjid'+id);
+	             file.after(file.clone().val(""));
+	             file.remove();
+	             if (data) {
+	            	 data = data.replace("<audio controls=\"controls\" style=\"display: none;\"></audio>","");
+	                 data = $.parseJSON(data);
+	             }
+	             if (data.success) {
+	 				var accContect = data.attrs.acc.fjmc;
+					var fjid = data.attrs.acc.fjid;
+					var accid = data.attrs.acc.id;
+					var str = "<tr align='center'>";
+					str =str +"<td style='width:40%'>"+ "<input value='"
+							+ accid
+							+ "' name='accid' type='hidden'>"
+							+ "<a class='main_title' href='/jsjy/accessory/download?id="
+							+ fjid + "'> " + accContect + "</a>" +"</td>";
+					
+					str =str+"<td style='width:15%'>"+ '<a class="btn btn-default btn-xs" href="#" onclick="lhyx.detail.delFj(\''
+							+ accid
+							+ '\','
+							+ '$(this)'
+							+ ')">删除</a>' +"</td></tr>";
+					$('#tableId').append(str);
+	             }
+	             else {
+	                 $.messager.showError(data.message);
+	             }
+	        }
+	    });
+
+}
+ 
+// 删除accid 附件关联ID,id 是第几行附件
+lhyx.detail.delFj = function(accid,tr){
+	$.confirm({
+	    title: '确认框',
+	    content: '确认删除吗',
+	    confirm: function(){
+	    	 $.post($.app + "/lhyx/delFj", {
+                 ids : accid
+             }, function(data) {
+                 if (data.success) {
+                	 $(tr).parent().parent().remove();
+                 } else {
+                	 $.alert({
+             		    title: '提示',
+             		    content: data.message,
+             		    confirm: function(){
+             		    }
+             	 });
+                 }
+             }, "json");
+	    },
+	    cancel: function(){
+	    }
+	});
+}
+
+
+
+lhyx.detail.audit=function(auditpass,id){
+	var opflag = $('#opflag').val();
+	var shyj="";
+	if(opflag == 1){
+		shyj = $('#clscyj').val();
+	}else if(opflag == 2){
+		shyj = $('#hcyj').val();
+	}else if(opflag == 3){
+		shyj = $('#fhyj').val();
+	}else if(opflag == 4){
+		shyj = $('#spyj').val();
+	}
+	var audit;
+	if(auditpass=="Y"){
+		audit=true;
+	}else{
+		audit=false;
+	}
+	$.post($.app + "/lhyx/audit", {
+		id:id,
+        shyj:shyj,
+        flag:audit
+    }, function(data) {
+    	if (data.success) {
+    		if(data.attrs.jflag){
+    			location.href=$.app+'/lhyx/addXkzjds?bgid='+id;
+    		}else{
+    		 	$.alert({
+           		    title: '提示',
+           		    content: '操作成功',
+           		    confirm: function(){
+           		    	lhyx.detail.back();
+           		    }
+               	});
+    		}
+    		
+          
+       }else {
+           	$.alert({
+       		    title: '提示',
+       		    content: data.message,
+       		    confirm: function(){
+       		    	
+       		    }
+           	});
+       }
+    	
+    }, "json");
+}
+
+
+lhyx.detail.submitAudit=function(){
+	 $.ajax({
+         url:$.app + "/lhyx/submitAudit",
+         data:$("#addform").serialize(),
+         type:"post",
+         dataType:"json",
+         success:function(data){// ajax返回的数据
+        	 if (data.success) {
+     		 	$.alert({
+            		    title: '提示',
+            		    content: '操作成功',
+            		    confirm: function(){
+            		    	location.href=$.app+'/lhyx/main';
+            		    }
+                	});
+            }else {
+                	$.alert({
+            		    title: '提示',
+            		    content: data.message,
+            		    confirm: function(){
+            		    	
+            		    }
+                	});
+            }
+	     }
+    }); 
+}

+ 96 - 0
gkjsjy/trunk/WebContent/static/biz/js/gkjygl/gklhxkgl/gkjylhyx/lhyxmain.js

@@ -0,0 +1,96 @@
+/**
+ * 理货延续
+ * 
+ */
+$.namespace("lhyx.main");
+
+lhyx.main.szd = null;
+lhyx.main.szgq = null;
+lhyx.main.szgk = null;
+
+
+lhyx.main.init = function() {
+	
+	lhyx.main.sel();
+	// 把form传入,构造翻页控件
+	pageinfo($("#lhyxform"));
+}
+
+lhyx.main.sel = function(){
+	initszdSelect('szdsel', lhyx.main.szd, 'showgk', '80%');
+	initgkSelect('gksel', lhyx.main.szgk,  lhyx.main.szd,'showgq', '80%');
+	initgqSelect('gqsel', lhyx.main.szgq,  lhyx.main.szd,lhyx.main.szgk, null, '80%');
+}
+
+function showgk() {
+	initgqSelect('gqsel','','','',null,200);
+	initgkSelect('gksel', lhyx.main.szgk, $('.szdselectpicker').val(),
+			'showgq', '80%');
+}
+
+function showgq() {
+	initgqSelect('gqsel', lhyx.main.szgq, $('.szdselectpicker').val(),
+			$('.gkselectpicker').val(), null, '80%');
+}
+
+
+//新增
+lhyx.main.add = function() {
+	
+	location.href=$.app+"/lhyx/add";
+			
+	
+}
+
+lhyx.main.search=function(){
+	$("#lhyxform").submit();
+}
+
+lhyx.main.del=function(data){
+	$.confirm({
+	    title: '确认框',
+	    content: '确认删除吗',
+	    confirm: function(){
+	    	 $.post($.app + "/lhyx/delete", {
+                 id : data
+             }, function(data) {
+                 if (data.success) {
+                	 $.alert({
+                		    title: '提示',
+                		    content: '删除成功',
+                		    confirm: function(){
+                		    	$("#lhyxform").submit();
+                		    }
+                	 });
+                 } else {
+                	 $.alert({
+             		    title: '提示',
+             		    content: data.message,
+             		    confirm: function(){
+             		        
+             		    }
+             	 });
+                 }
+             }, "json");
+	    },
+	    cancel: function(){
+	    }
+	});
+}
+
+lhyx.main.edit=function(data){
+	location.href=$.app+"/lhyx/edit?id="+data;
+}
+
+lhyx.main.back=function(data){
+	location.href=$.app+"/lhyx/edit?flag=th&id="+data;
+}
+
+lhyx.main.banli=function(data){
+	location.href=$.app+"/lhyx/view?flag=audit&id="+data;
+}
+
+lhyx.main.view=function(data){
+	location.href=$.app+"/lhyx/view?id="+data;
+}
+

+ 0 - 110
gkjsjy/trunk/WebContent/static/biz/js/gkjygl/gklhxkgl/lhxkglmain.js

@@ -1,110 +0,0 @@
-/**
- * 理货申请
- * 
- */
-$.namespace("lhxkgl.main");
-
-
-
-lhxkgl.main.init = function() {
-
-	lhxkgl.main.sel();
-	// 把form传入,构造翻页控件
-	pageinfo($("#lhxkglform"));
-}
-lhxkgl.main.sel = function() {
-	initszdSelect('szdsel', lhxkgl.main.szd, 'showgk', '80%');
-	initgkSelect('gksel', lhxkgl.main.szgk, lhxkgl.main.szd, 'showgq', '80%');
-	initgqSelect('gqsel', lhxkgl.main.szgq, lhxkgl.main.szd, lhxkgl.main.szgk,
-			null, '80%');
-}
-
-function showgk() {
-	initgqSelect('gqsel', '', '', '', null, 200);
-	initgkSelect('gksel', lhxkgl.main.szgk, $('.szdselectpicker').val(),
-			'showgq', '80%');
-}
-
-function showgq() {
-	initgqSelect('gqsel', lhxkgl.main.szgq, $('.szdselectpicker').val(), $(
-			'.gkselectpicker').val(), null, '80%');
-}
-
-
-
-lhxkgl.main.search = function() {
-	debugger;
-	$('#pagejump').val(1);
-	$("#lhxkglform").submit();
-}
-
-lhxkgl.main.edit = function(data) {
-	location.href = $.app + "/gklhxkgl/editmain?id=" + data;
-}
-
-lhxkgl.main.back = function(data) {
-	location.href = $.app + "/gklhxkgl/editmain?flag=th&id=" + data;
-}
-
-lhxkgl.main.view = function(data) {
-	location.href = $.app + "/gklhxkgl/viewmain?id=" + data;
-}
-
-lhxkgl.main.del = function(data) {
-	$.confirm({
-		title : '确认框',
-		content : '确认删除吗',
-		confirm : function() {
-			$.post($.app + "/gklhxkgl/delete", {
-				id : data
-			}, function(data) {
-				if (data.success) {
-					$.alert({
-						title : '提示',
-						content : '删除成功',
-						confirm : function() {
-							$("#lhxkglform").submit();
-						}
-					});
-				} else {
-					$.alert({
-						title : '提示',
-						content : data.message,
-						confirm : function() {
-
-						}
-					});
-				}
-			}, "json");
-		},
-		cancel : function() {
-		}
-	});
-}
-
-
-//新增
-lhxkgl.main.add = function() {
-	$.ajax({
-		async : true,
-		url : $.app + "/xkzxx/findByjyrid",
-		type : "post",
-		dataType : "json",
-		data:{
-			flag :1
-		},
-		success : function(data) {// ajax返回的数据
-			if (data.success) {
-				location.href = $.app + "/gklhxkgl/addmain";
-			} else {
-				$.alert({
-					title : '提示',
-					content : data.message,
-					confirm : function() {
-					}
-				});
-			}
-		}
-	});
-
-}