📄 w_grdz_dj.srw
字号:
long textcolor = 128
long backcolor = 79741120
boolean enabled = false
alignment alignment = center!
boolean focusrectangle = false
end type
type st_1 from statictext within w_grdz_dj
boolean visible = false
integer x = 347
integer y = 84
integer width = 361
integer height = 76
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long backcolor = 67108864
boolean enabled = false
string text = "企业名称"
alignment alignment = right!
boolean focusrectangle = false
end type
type dw_qymccx from datawindow within w_grdz_dj
boolean visible = false
integer y = 20
integer width = 558
integer height = 140
integer taborder = 10
string dataobject = "dw_nz_qymccx"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type
type cb_exit from commandbutton within w_grdz_dj
event clicked pbm_bnclicked
integer x = 3127
integer y = 2032
integer width = 325
integer height = 92
integer taborder = 60
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string text = "&X.退 出"
boolean cancel = true
end type
event clicked;close(parent)
end event
type cb_print from commandbutton within w_grdz_dj
event clicked pbm_bnclicked
integer x = 2734
integer y = 2032
integer width = 325
integer height = 92
integer taborder = 70
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
boolean enabled = false
string text = "&P.打 印"
end type
event clicked;tab_1.tabpage_detail.dw_1.Print()
end event
type cb_save from commandbutton within w_grdz_dj
event clicked pbm_bnclicked
integer x = 1554
integer y = 2032
integer width = 325
integer height = 92
integer taborder = 30
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string text = "&S.保 存"
end type
event clicked;datetime czrq,ld_clrq_bj,ld_hzrq_bj
long lrow
int fhz,i
string colname,coltable,coltext,ls_color_save,ls_message
dwitemstatus sta
czrq=datetime(today(),now())//得到操作日期
//1.tab_1.tabpage_detail.dw_1 窗口的初值
tab_1.selectedtab=1
tab_1.tabpage_detail.dw_1.object.rydm[1]=g_userid//操作员代码
tab_1.tabpage_detail.dw_1.object.tzrs[1]=1 //投资人数
tab_1.tabpage_detail.dw_1.object.djjg[1]=p_djjg//登记机关
tab_1.tabpage_detail.dw_1.object.gxdw[1]=manage_unit//管辖单位
tab_1.tabpage_detail.dw_1.object.czrq[1]=czrq//操作日期
tab_1.tabpage_detail.dw_1.object.hyml[1]=Mid(tab_1.tabpage_detail.dw_1.object.hydm[1],1,1)//行业门类
tab_1.tabpage_detail.dw_1.Accepttext()
//检查必须列
ls_message=f_datawindow_message(tab_1.tabpage_detail.dw_1,1,ls_color_save)
if ls_message<>'' then
messagebox('提示信息','基本信息:~n'+space(4)+ls_message,StopSign!)
return
end if
//if isnull(tab_1.tabpage_legal.dw_legal.object.zw[1]) then
// messagebox('','是空值')
//end if
//
ls_message=f_datawindow_message(tab_1.tabpage_legal.dw_legal,1,ls_color_save)
if ls_message<>'' then
messagebox('提示信息','负责人:~n'+space(4)+ls_message,StopSign!)
return
end if
ls_message=f_datawindow_message(tab_1.tabpage_jtcy.uo_1.dw_list,1,ls_color_save)
if ls_message<>'' then
messagebox('提示信息','家庭成员:~n'+space(4)+ls_message,StopSign!)
return
end if
if ls_window_bg=true then
ld_clrq_bj=tab_1.tabpage_detail.dw_1.object.clrq[1]
ld_hzrq_bj=tab_1.tabpage_detail.dw_1.object.hzrq[1]
if string(ld_clrq_bj,'yyyy.mm.dd') < string(ld_hzrq_bj,'yyyy.mm.dd') then
Messagebox("提 示 信 息","成立日期不能小于核准日期!")
tab_1.tabpage_detail.dw_1.Setcolumn("clrq")
tab_1.tabpage_detail.dw_1.Setfocus()
return 1
end if
end if
//ld_clrq_bj=tab_1.tabpage_detail.dw_1.object.clrq[1]
//ld_hzrq_bj=tab_1.tabpage_detail.dw_1.object.yyqx1[1]
//if string(ld_clrq_bj,'yyyy.mm.dd') > string(ld_hzrq_bj,'yyyy.mm.dd') then
// Messagebox("提 示 信 息","经营起始日期不能小于成立日期!")
// tab_1.tabpage_detail.dw_1.Setcolumn("yyqx1")
// tab_1.tabpage_detail.dw_1.Setfocus()
// return 1
//end if
//ld_clrq_bj=tab_1.tabpage_detail.dw_1.object.yyqx1[1]
//ld_hzrq_bj=tab_1.tabpage_detail.dw_1.object.yyqx2[1]
//if string(ld_clrq_bj,'yyyy.mm.dd') > string(ld_hzrq_bj,'yyyy.mm.dd') then
// Messagebox("提 示 信 息","经营起始日期不能大于终止日期!")
// tab_1.tabpage_detail.dw_1.Setcolumn("yyqx1")
// tab_1.tabpage_detail.dw_1.Setfocus()
// return 1
//end if
//根据输入情况对登记窗口的几个字段作出提示
//邮政编码,法定代表人,主要产品为空时显示提示信息
string yzbm,fddbr,zycp,mess,col
yzbm=tab_1.tabpage_detail.dw_1.object.yzbm[1]
fddbr=tab_1.tabpage_detail.dw_1.object.fddbr[1]
zycp=tab_1.tabpage_detail.dw_1.object.zycp[1]
fn_nz_space(fddbr)
if isnull(fddbr) or fddbr='' then
mess=" 负责人~n~n"
col='fddbr'
end if
//fn_nz_space(yzbm)
////if isnull(yzbm) or yzbm='' then
//// mess=mess + " 邮政编码~n~n"
//// if col='' then col='yzbm'
////end if
//fn_nz_space(zycp)
//if isnull(zycp) or zycp='' then
// mess=mess + " 主要产品~n~n"
// if col='' then col='zycp'
//end if
if mess<>'' then
mess="以下字段未输入内容:~n~n"+mess+"是否返回输入这些数据?"
i=Messagebox("提 示 信 息",mess,question!,yesno!,1)
if i=1 then
tab_1.tabpage_detail.dw_1.Setcolumn(col)
tab_1.tabpage_detail.dw_1.Setfocus()
return 1
end if
end if
////2.tab_1.tabpage_legal.dw_legal
sta=tab_1.tabpage_legal.dw_legal.Getitemstatus(1,0,primary!)
if sta=datamodified! or sta=newmodified! then
tab_1.selectedtab=2
tab_1.tabpage_legal.dw_legal.object.nbxh[1]=qy.nbxh//内部序号赋值
tab_1.tabpage_legal.dw_legal.object.hzrq[1]=tab_1.tabpage_detail.dw_1.object.hzrq[1]
ls_message=f_datawindow_message(tab_1.tabpage_legal.dw_legal,1,ls_color_save)
if ls_message<>'' then
messagebox('提示信息','负责人:~n'+space(4)+ls_message,StopSign!)
return
end if
else
if dw_retrieve[2]<>'1' then
tab_1.tabpage_legal.dw_legal.Reset()
end if
end if
////更新各页的数据窗口
tab_1.tabpage_detail.dw_1.object.nbxh[1]=qy.nbxh
//钱的问题
//tab_1.tabpage_detail.dw_1.object.ldzj[1]=round(tab_1.tabpage_detail.dw_1.object.ldzj[1],4)
if tab_1.tabpage_detail.dw_1.Update()<>1 then//1
Rollback;
parent.Postevent("user_error")
return 1
end if
if tab_1.tabpage_legal.dw_legal.Rowcount()>0 or dw_retrieve[2]='1' then//2
if tab_1.tabpage_legal.dw_legal.Update()<>1 then
Rollback;
parent.Postevent("user_error")
return 1
end if
dw_retrieve[2]=fn_dw_retrieve(tab_1.tabpage_legal.dw_legal)
end if
IF NOT(isnull(tab_1.tabpage_jtcy.uo_1.dw_list.dataobject) or tab_1.tabpage_jtcy.uo_1.dw_list.dataobject = '') THEN
//检查必须列
ls_message=f_datawindow_message(tab_1.tabpage_jtcy.uo_1.dw_list,1,ls_color_save)
if ls_message<>'' then
messagebox('提示信息','家庭成员:~n'+space(4)+ls_message,StopSign!)
return
end if
IF tab_1.tabpage_jtcy.uo_1.dw_list.Update()<>1 THEN
MessageBox("提示","家庭成员无法保存!")
RollBack using sqlca;
Return 1
END IF
END IF
////维护企业名称查询库
if dw_qymccx.Rowcount()>0 then
else
dw_qymccx.Insertrow(0)
dw_qymccx.object.nbxh[1]=qy.nbxh
end if
//维护名称简称,字号,字号拼音,外文名称
if qymchz.Rowcount()>0 then
dw_qymccx.object.mcjc[1]=qymchz.object.mcjc[1]
dw_qymccx.object.zh[1]=qymchz.object.zh[1]
dw_qymccx.object.zhpy[1]=qymchz.object.zhpy[1]
dw_qymccx.object.wwmc[1]=qymchz.object.wwmc[1]
else
qymchz.Retrieve(qy.nbxh)
if qymchz.Rowcount()>0 then
dw_qymccx.object.mcjc[1]=qymchz.object.mcjc[1]
dw_qymccx.object.zh[1]=qymchz.object.zh[1]
dw_qymccx.object.zhpy[1]=qymchz.object.zhpy[1]
dw_qymccx.object.wwmc[1]=qymchz.object.wwmc[1]
end if
end if
//登记的数据送回企业名称查询数据窗口
fn_gs_dj_cx(dw_qymccx,tab_1.tabpage_detail.dw_1)
dw_qymccx.Accepttext()
if dw_qymccx.Update()<>1 then
Rollback;
parent.Postevent("user_error")
return 1
end if
//维护企业回查库
datetime hcrq
string qx
datastore qyhc
//取得回查期限
SELECT parm_value INTO :qx FROM a_sys_parm WHERE parm_name = 'hcqx' ;
if sqlca.sqlcode=0 then
hcrq=datetime(Relativedate(Today(),Long(qx)))
else
Rollback;
parent.Postevent("user_error")
return 1
end if
qyhc=Create datastore
qyhc.dataobject='dw_nz_qyhc'
qyhc.settransobject(sqlca)
i=qyhc.Retrieve(qy.nbxh,hcrq)
if i<=0 then
qyhc.Insertrow(0)
qyhc.object.nbxh[1]=qy.nbxh
qyhc.object.hcrq[1]=hcrq
if qyhc.Update()<>1 then
Rollback;
parent.Postevent("user_error")
return 1
end if
end if
////将企业名称预核准库(A_QYMCHZ)中的名称状态标志置为‘2’(开业状态)
fn_update_mcztbz(qy.nbxh,'2')
if tab_1.tabpage_legal.dw_legal.Rowcount()<=0 then
tab_1.tabpage_legal.dw_legal.Insertrow(0)
end if
datetime ls_clrq,ls_hzrq,ls_yyqx1,ls_yyqx2
int ls_row
ls_row=tab_1.tabpage_detail.dw_1.getrow()
ls_clrq = tab_1.tabpage_detail.dw_1.GetItemDateTime(ls_row, "clrq")
ls_hzrq = tab_1.tabpage_detail.dw_1.GetItemDateTime(ls_row, "hzrq")
ls_yyqx1 = tab_1.tabpage_detail.dw_1.GetItemDateTime(ls_row, "yyqx1")
ls_yyqx2 = tab_1.tabpage_detail.dw_1.GetItemDateTime(ls_row, "yyqx2")
//if ls_clrq<>ls_hzrq or ls_clrq<>ls_yyqx1 or ls_hzrq<>ls_yyqx1 then
// MessageBox("提示","成立日期、核准日期、营业期限起始日期应保持一致!",Exclamation!, OKCancel!, 2)
// return
//end if
if ls_yyqx1>ls_yyqx2 then
MessageBox("提示","营业期限终止日期要大于营业期限起始日期!",Exclamation!, OKCancel!, 2)
return
end if
string qyhf
qyhf='0000000000'
if tab_1.tabpage_detail.cbx_5.checked=true then
qyhf=Replace(qyhf, 1, 1, "1")
end if
if tab_1.tabpage_detail.cbx_6.checked=true then
qyhf=Replace(qyhf, 2, 1, "1")
end if
if tab_1.tabpage_detail.cbx_7.checked=true then
qyhf=Replace(qyhf, 3, 1, "1")
end if
if tab_1.tabpage_detail.cbx_8.checked=true then
qyhf=Replace(qyhf, 4, 1, "1")
end if
if tab_1.tabpage_detail.cbx_9.checked=true then
qyhf=Replace(qyhf, 5, 1, "1")
end if
if tab_1.tabpage_detail.cbx_10.checked=true then
qyhf=Replace(qyhf, 6, 1, "1")
end if
update a_qymccx set ssgpmc=:qyhf where nbxh=:qy.nbxh and qymc=:qy.qymc;
if sqlca.sqlcode=0 then
Messagebox("提 示 信 息","本次存盘成功!")
Commit;//全部成功,则提交
DESTROY qyhc//释放
else
Rollback;
parent.Postevent("user_error")
return 1
end if
//this.enabled=false
//cb_cancel.enabled=false
cb_prt_zz.enabled=true
cb_print.enabled=true
tab_1.selectedtab=1
f_hd98_log('个人独资企业登记','1')
end event
type cb_cancel from commandbutton within w_grdz_dj
event clicked pbm_bnclicked
integer x = 1947
integer y = 2032
integer width = 325
integer height = 92
integer taborder = 40
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string text = "&C.放 弃"
end type
event clicked;
int i
i=Messagebox("提 示 信 息","真的要放弃输入的内容吗?",question!,yesno!,2)
if i=2 then
return
end if
i=Messagebox("提 示 信 息","放弃全部输入内容吗?",question!,yesno!,2)
if i=1 then
i=10
else
CHOOSE CASE tab_1.selectedtab
CASE 1
i=10
CASE 2
tab_1.tabpage_legal.dw_legal.Reset()
tab_1.tabpage_legal.dw_legal.Insertrow(0)
tab_1.tabpage_legal.dw_legal.setfocus()
// CASE 3
// tab_1.tabpage_approve.dw_list.Reset()
END CHOOSE
end if
if i=10 then
//清全部数据窗口
tab_1.tabpage_detail.dw_1.Reset()
tab_1.tabpage_legal.dw_legal.Reset()
// tab_1.tabpage_approve.dw_list.Reset()
tab_1.tabpage_legal.dw_legal.Insertrow(0)
tab_1.tabpage_detail.dw_1.Insertrow(0)
tab_1.selectedtab=1
tab_1.tabpage_detail.dw_1.Settaborder('zch',1)
tab_1.tabpage_detail.dw_1.Settaborder('qymc',2)
tab_1.tabpage_detail.dw_1.Setcolumn('zch')
tab_1.tabpage_detail.dw_1.Setfocus()
//隐藏题头
st_1.visible=false
st_name.visible=false
cb_prt_zz.enabled=false
cb_print.enabled=false
//查询输入的值是否存在
tab_1.tabpage_detail.postevent("srcx")
end if
end event
type cb_prt_zz from commandbutton within w_grdz_dj
event clicked pbm_bnclicked
integer x = 2341
integer y = 2032
integer width = 325
integer height = 92
integer taborder = 80
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
boolean enabled = false
string text = "&L.打 照"
end type
event clicked;CHOOSE CASE qy.qylx
// CASE "9200","9230","9260","9270","9280" //公司
// openwithparm(w_sy_zhizhao_print,'gs')
// CASE "9300","9330","9360","9370","9380" //分公司
// openwithparm(w_sy_zhizhao_print,'fgs')
CASE "9210","9310" //独资私营企业以及分支机构
openwithparm(w_sy_zhizhao_print,'yy')
CASE "9240","9340" //个人独资企业以及分支机构
open(w_grdz_zhizhao)
// CASE "9220","9250","9320","9350" //合伙或合伙私营以及分支机构
// openwithparm(w_sy_zhizhao_print,'hh')
// CASE "9500" //集团
// openwithparm(w_sy_zhizhao_print,'jt')
CASE ELSE
Messagebox("提示","该企业的企业类型有错误!",StopSign!)
return 1
END CHOOSE
end event
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -