⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 w_grdz_dj.srw

📁 一套PB开发的工商行政管理全套源码,包括企业登记,执照,案件管理等.
💻 SRW
📖 第 1 页 / 共 4 页
字号:
			if sqlca.sqlcode=0 then
				if mid(qyhf,1,1)='1' then tabpage_detail.cbx_5.checked=true
				if mid(qyhf,1,1)='0' then tabpage_detail.cbx_5.checked=false		
				if mid(qyhf,2,1)='1' then tabpage_detail.cbx_6.checked=true
				if mid(qyhf,2,1)='0' then tabpage_detail.cbx_6.checked=false		
				if mid(qyhf,3,1)='1' then tabpage_detail.cbx_7.checked=true
				if mid(qyhf,3,1)='0' then tabpage_detail.cbx_7.checked=false		
				if mid(qyhf,4,1)='1' then tabpage_detail.cbx_8.checked=true
				if mid(qyhf,4,1)='0' then tabpage_detail.cbx_8.checked=false	
				if mid(qyhf,5,1)='1' then tabpage_detail.cbx_9.checked=true
				if mid(qyhf,5,1)='0' then tabpage_detail.cbx_9.checked=false	
				if mid(qyhf,6,1)='1' then tabpage_detail.cbx_10.checked=true
				if mid(qyhf,6,1)='0' then tabpage_detail.cbx_10.checked=false			
			end if				
		
			//名称不能改动
			this.dw_1.Settaborder('qymc',0)
	END CHOOSE
else
	st_1.visible=true
	st_name.visible=true
	st_name.text=qy.qymc
	
	//取出企业名称查询库的对应内容
	dw_qymccx.Retrieve(qy.nbxh)
	
//将企业名称查询表的数据窗口的内容拷贝到公司登记的数据窗口
	fn_gs_dj_cx(dw_1,dw_qymccx)

	select ssgpmc into :qyhf from a_qymccx where nbxh=:qy.nbxh;
	if sqlca.sqlcode=0 then
		if mid(qyhf,1,1)='1' then tabpage_detail.cbx_5.checked=true
		if mid(qyhf,1,1)='0' then tabpage_detail.cbx_5.checked=false		
		if mid(qyhf,2,1)='1' then tabpage_detail.cbx_6.checked=true
		if mid(qyhf,2,1)='0' then tabpage_detail.cbx_6.checked=false		
		if mid(qyhf,3,1)='1' then tabpage_detail.cbx_7.checked=true
		if mid(qyhf,3,1)='0' then tabpage_detail.cbx_7.checked=false		
		if mid(qyhf,4,1)='1' then tabpage_detail.cbx_8.checked=true
		if mid(qyhf,4,1)='0' then tabpage_detail.cbx_8.checked=false	
		if mid(qyhf,5,1)='1' then tabpage_detail.cbx_9.checked=true
		if mid(qyhf,5,1)='0' then tabpage_detail.cbx_9.checked=false	
		if mid(qyhf,6,1)='1' then tabpage_detail.cbx_10.checked=true
		if mid(qyhf,6,1)='0' then tabpage_detail.cbx_10.checked=false			
	end if				

	//名称不能改动
	this.dw_1.Settaborder('qymc',0)
end if

//登记时不允许对已登记的内容修改,若要修改必须输入参数表中的密码//?
if qy.nbxh<>'' then
	string oldstr,newstr
	int cot
	//在公司登记库中查找是否已存在记录
	//SELECT COUNT(*) INTO :cot FROM a_grdzdj WHERE nbxh = :qy.nbxh ;
	SELECT COUNT(*) INTO :cot FROM a_sykydj WHERE nbxh = :qy.nbxh ;
	if sqlca.sqlcode=0 and cot>0 then//找到
		Openwithparm(w_djxgmm,'')//提示密码
		djmm=message.stringparm
		if djmm<>'modify' then
			dw_retrieve[20]='exit'
			cb_exit.postevent(clicked!)
			return
		end if
		oldstr =this.dw_1.Getsqlselect()//取得原SQL语句
		oldstr=fn_oldsql(oldstr)//截掉where子句
		newstr =oldstr + " where nbxh='" + qy.nbxh +"'"//新的SQL语句
		this.dw_1.Setsqlselect(newstr)//将新的SQL语句放入数据窗口
		this.dw_1.Reset()
		this.dw_1.Retrieve()//取出值
		//名称不能改动
		this.dw_1.Settaborder('qymc',0)
		qy.qymc=this.dw_1.object.qymc[1]
		qy.zch=this.dw_1.object.zch[1]
		qy.qylx=this.dw_1.object.qylx[1]
		
		//修改不能放弃原内容
		//cb_cancel.enabled=false
		//修改标志
		dw_retrieve[tab_1.selectedtab]='1'
	end if
end if
zchxh=this.dw_1.object.zchxh[1]
if Isnull(zchxh) or zchxh='' then
	this.dw_1.object.zchxh[1]='00'
end if

//根据全局变量gs_enterprise_type设置企业类型的范围
if djmm <> 'modify' then		
	datawindowchild dqylx
	string tj
	tab_1.tabpage_detail.dw_1.Getchild('qylx',dqylx)//获得企业类型字段的子数据窗口
	dqylx.Settransobject(sqlca)
	dqylx.Retrieve()
	if Len(gs_enterprise_type)=1 then
		tj="Left(bm,1)="+"'"+gs_enterprise_type+"'"//过滤条件
	else
		tj="Left(bm,2)="+"'"+gs_enterprise_type+"'"//过滤条件
	end if
	dqylx.Setfilter(tj)//过滤
	dqylx.Filter()
end if
qyhzrq=tab_1.tabpage_detail.dw_1.object.hzrq[1]
tab_1.tabpage_detail.dw_1.object.clrq[1]=tab_1.tabpage_detail.dw_1.object.hzrq[1]
tab_1.tabpage_detail.dw_1.object.yyqx1[1]=tab_1.tabpage_detail.dw_1.object.hzrq[1]
//tab_1.tabpage_detail.dw_1.object.pzrq[1]=tab_1.tabpage_detail.dw_1.object.pzrq[1]
//tab_1.tabpage_detail.dw_1.object.zljzrq[1]=tab_1.tabpage_detail.dw_1.object.hzrq[1]

//生成档案号
//string dah
//dah=tab_1.tabpage_detail.dw_1.object.dah[1]
//if Len(dah)=0 or Isnull(dah) then
//	dah=fn_dah()
//	tab_1.tabpage_detail.dw_1.object.dah[1]=dah
//	if dah<>'error' then iv_dah=dah
//end if
//生成注册号
string zch
zch = Trim(tab_1.tabpage_detail.dw_1.GetItemString(1,"zch"))

if Len(zch) = 0 or Isnull(zch) or zch = '' then
   zch = fn_zch()
	if zch<>'error' then
		iv_zch=zch
	   tab_1.tabpage_detail.dw_1.object.zch[1]=zch
	end if
end if

string ydjjg,ydjjgmc,yqymc
date qrrq
if dw_qymccx.Rowcount()>0 then
	ydjjg=dw_qymccx.object.ydjjg[1]
	qrrq=Date(dw_qymccx.object.qrrq[1])
	if Isnull(qrrq) then
	else
		SELECT nr INTO :ydjjgmc FROM a_bm_djjg WHERE bm = :ydjjg ;
		if sqlca.sqlcode<>0 then
			ydjjgmc='地方工商行政管理局'
		end if
		SELECT bcmc INTO :yqymc  FROM a_qymchz WHERE qymc = :qy.qymc   ;
		if Isnull(yqymc) or sqlca.sqlcode<>0 then
			yqymc=''
		end if
		smbz="该企业于 "+String(Year(qrrq))+" 年 "+String(Month(qrrq))+" 月 "+String(Day(qrrq))+&
	   	  " 日从 "+ydjjgmc+" 迁入!~n"
		if Len(yqymc)>0 then
			smbz=smbz+"原企业名称为: "+yqymc+"~n"
		end if
	end if
end if



string oldqylx,newqylx,oldmc,newmc
datetime gzrq
DECLARE c1 CURSOR FOR  
 SELECT bcnr,bghnr,hzrq
   FROM a_qybgqk
  WHERE bcsx='05' AND nbxh=:qy.nbxh AND bzsm like '%改制%';
OPEN c1;
lab1:
FETCH c1 INTO :oldqylx,:newqylx,:gzrq;
if sqlca.sqlcode=0 then
	CHOOSE CASE Mid(oldqylx,1,2)
		CASE '10','11','12'
			oldmc='内资公司'
      CASE '20','21','22'
			oldmc='内资分公司'
		CASE '30','31','32','33','34','35','36','37','39'
			oldmc='内资法人'
		CASE '51','52','53','61','62','63'
			oldmc='外商投资企业'
		case '40','41','42','43','44','45','46','47'
			oldmc='内资营业'
		case '92'
		   oldmc='私营企业'
		case '93'
			oldmc='私营企业分支企业'
	END CHOOSE
	CHOOSE CASE Mid(newqylx,1,2)
		CASE '10','11','12'
			newmc='内资公司'
      CASE '20','21','22'
			newmc='内资分公司'
		CASE '30','31','32','33','34','35','36','37','39'
			newmc='内资法人'
		CASE '51','52','53','61','62','63'
			newmc='外商投资企业'
		case '40','41','42','43','44','45','46','47'
			newmc='内资营业'
	END CHOOSE
	smbz=smbz+"~n~n该企业于 "+String(Year(Date(gzrq)))+" 年 "+String(Month(Date(gzrq)))+" 月 "+&
	     String(Day(Date(gzrq)))+" 日由 "+oldmc+" 改制为 "+newmc
	goto lab1
end if
CLOSE c1;
if left(p_djjg,2) = '13' then 
	tab_1.tabpage_detail.dw_1.Modify("t_1.text='审批情况'")
	tab_1.tabpage_detail.dw_1.Modify("byzd.visible=yes")
	tab_1.tabpage_detail.dw_1.Modify("destroy byzd_1")
else
	tab_1.tabpage_detail.dw_1.Modify("t_1.text='备注'")
	tab_1.tabpage_detail.dw_1.Modify("byzd_1.visible=yes")
	tab_1.tabpage_detail.dw_1.Modify("byzd_1.name = 'byzd'")
	tab_1.tabpage_detail.dw_1.Modify("destroy byzd")
end if	
if Len(smbz)>0 then
	cb_bzsm.visible=true
end if
end event

on tabpage_detail.create
this.st_2=create st_2
this.cbx_10=create cbx_10
this.cbx_9=create cbx_9
this.cbx_8=create cbx_8
this.cbx_7=create cbx_7
this.cbx_6=create cbx_6
this.cbx_5=create cbx_5
this.dw_1=create dw_1
this.Control[]={this.st_2,&
this.cbx_10,&
this.cbx_9,&
this.cbx_8,&
this.cbx_7,&
this.cbx_6,&
this.cbx_5,&
this.dw_1}
end on

on tabpage_detail.destroy
destroy(this.st_2)
destroy(this.cbx_10)
destroy(this.cbx_9)
destroy(this.cbx_8)
destroy(this.cbx_7)
destroy(this.cbx_6)
destroy(this.cbx_5)
destroy(this.dw_1)
end on

type st_2 from statictext within tabpage_detail
boolean visible = false
integer x = 133
integer y = 1444
integer width = 306
integer height = 76
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long backcolor = 12632256
boolean enabled = false
string text = "企业划分"
alignment alignment = right!
boolean focusrectangle = false
end type

type cbx_10 from checkbox within tabpage_detail
boolean visible = false
integer x = 2784
integer y = 1440
integer width = 389
integer height = 76
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long backcolor = 12632256
string text = "生产资料"
end type

type cbx_9 from checkbox within tabpage_detail
boolean visible = false
integer x = 2318
integer y = 1440
integer width = 389
integer height = 76
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long backcolor = 12632256
string text = "中介组织"
end type

type cbx_8 from checkbox within tabpage_detail
boolean visible = false
integer x = 1929
integer y = 1440
integer width = 315
integer height = 76
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long backcolor = 12632256
string text = "房地产"
end type

type cbx_7 from checkbox within tabpage_detail
boolean visible = false
integer x = 1495
integer y = 1440
integer width = 361
integer height = 76
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long backcolor = 12632256
string text = "劳动力"
end type

type cbx_6 from checkbox within tabpage_detail
boolean visible = false
integer x = 983
integer y = 1440
integer width = 439
integer height = 76
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long backcolor = 12632256
string text = "金融企业"
end type

type cbx_5 from checkbox within tabpage_detail
boolean visible = false
integer x = 471
integer y = 1440
integer width = 439
integer height = 76
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long backcolor = 12632256
string text = "科技企业"
end type

type dw_1 from datawindow within tabpage_detail
event dberror pbm_dwndberror
event itemchanged pbm_dwnitemchange
event itemerror pbm_dwnitemvalidationerror
event losefocus pbm_dwnkillfocus
event user_enter pbm_dwnprocessenter
event user_post ( )
integer x = 18
integer y = 56
integer width = 3415
integer height = 1304
integer taborder = 11
string dataobject = "dw_grdzdj_sy"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

event dberror;return 2
end event

event itemchanged;long gs,i,lrow
string colname,zch,lsh,oldstr,newstr,xm,zchxh,tj,zfc,djmm
decimal zczb
datawindowchild dhydm

string ls_type,ls_colname_text,ls_return,ls_colname
//cb_save.enabled = TRUE
if lower(dwo.coltype)='date' or lower(dwo.coltype)='datetime' then
	ls_colname = dwo.name
	ls_type = upper(left(dwo.ColType,4))
	ls_colname_text=Describe(ls_colname + "_t.text" )
	ls_return=f_datawindow_itemerror(ls_colname,ls_type,ls_colname_text,data)
	if not isnull(ls_return) and len(ls_return)>0 then
		messagebox('提示信息',ls_return)
		return 1
	end if
end if

dw_1.accepttext()
colname=this.Getcolumnname()
//检查半角字符
zfc="下面输入的内容中包含有半角字符:~n~n"
colname=this.Getcolumnname()
CHOOSE CASE colname
	CASE 'zs'
		gs=fn_ascii(data)
		if gs>0 then
			data=fn_asc_change(data)
			thasc=data
			this.Postevent("user_post",91,0)
			return
		end if
	CASE 'jyfw'
		gs=fn_ascii(data)
		if gs>0 then
			data=fn_asc_change(data)
			thasc=data
			this.Postevent("user_post",92,0)
			return
		end if
	CASE 'jyfw2'
		gs=fn_ascii(data)
		if gs>0 then
			data=fn_asc_change(data)
			thasc=data
			this.Postevent("user_post",93,0)
			return
		end if		
END CHOOSE

//注册号改变时,在企业名称查询库中查找是否已经被使用
if colname="zch" then
	if data='' or Isnull(data) then
		this.Postevent("user_post",1,0)
		return 1
	end if
	SELECT zch  INTO :zch  FROM a_qymccx  WHERE zch = :data   ;
	if sqlca.sqlcode=0 then
		Messagebox("提 示 信 息","输入的注册号已经被其它企业使用!")
		this.Postevent("user_post",1,0)
		return 1
	end if
	qy.zch=data
end if

//由于企业类型可编辑,所以检查是否输入的内容不在下拉的范围内
if colname='qylx' then
	qy.qylx=data
	tab_1.tabpage_detail.dw_1.Getchild("qylx",dhydm)//获得行业代码字段的子数据窗口
	tj="bm='"+data+"'"
   if dhydm.Find(tj,1,dhydm.Rowcount())<=0 then
		//输入的内容不在范围内
		this.Postevent("user_post",3,0)
	end if
end if

if colname='fddbr' then
	if tab_1.tabpage_legal.dw_legal.Rowcount()=1 then
		tab_1.tabpage_legal.dw_legal.Setitem(1,'xm',data)
	end if
end if

//成立日期和核准日期不能大于操作日期
if colname='clrq' then
   if Daysafter(Date(Mid(data,1,10)),Today())<0 then
		this.Postevent("user_post",4,0)
	end if
end if
if colname='hzrq' then
	if Daysafter(Date(Mid(data,1,10)),Today())<0 then
		this.Postevent("user_post",5,0)
		return
	end if
	qyhzrq=Datetime(Date(Mid(data,1,10)))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -