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

📄 jh31.prg

📁 一个很优秀的企业人事管理系统。本软件免费
💻 PRG
📖 第 1 页 / 共 2 页
字号:
		Name = "Label2"


	ADD OBJECT txtmc AS textbox WITH ;
		Comment = "", ;
		FontSize = 11, ;
		ControlSource = "jhmc", ;
		Enabled = .T., ;
		Height = 24, ;
		Left = 491, ;
		MaxLength = 30, ;
		ReadOnly = .T., ;
		TabIndex = 34, ;
		Top = 24, ;
		Width = 162, ;
		DisabledBackColor = RGB(156,226,193), ;
		DisabledForeColor = RGB(255,0,0), ;
		Name = "txtMc"


	ADD OBJECT label3 AS label WITH ;
		AutoSize = .T., ;
		FontBold = .T., ;
		FontSize = 12, ;
		Caption = "进货编号", ;
		Height = 20, ;
		Left = 14, ;
		Top = 48, ;
		Width = 71, ;
		TabIndex = 35, ;
		ForeColor = RGB(0,0,255), ;
		Name = "Label3"


	ADD OBJECT txtno AS textbox WITH ;
		Comment = "", ;
		FontSize = 11, ;
		ControlSource = "jhno", ;
		Enabled = .T., ;
		Height = 24, ;
		Left = 9, ;
		MaxLength = 10, ;
		ReadOnly = .T., ;
		TabIndex = 36, ;
		Top = 79, ;
		Width = 78, ;
		DisabledBackColor = RGB(156,226,193), ;
		DisabledForeColor = RGB(255,0,0), ;
		Name = "txtNo"


	ADD OBJECT label4 AS label WITH ;
		AutoSize = .T., ;
		FontBold = .T., ;
		FontSize = 11, ;
		Caption = "本商品剩余数量", ;
		Height = 19, ;
		Left = 2, ;
		Top = 119, ;
		Width = 115, ;
		ForeColor = RGB(0,0,255), ;
		Name = "Label4"


	ADD OBJECT text2 AS textbox WITH ;
		FontSize = 11, ;
		Alignment = 3, ;
		Value = 0, ;
		ControlSource = "jhysl", ;
		Format = "", ;
		Height = 25, ;
		InputMask = "", ;
		Left = 24, ;
		ReadOnly = .T., ;
		Top = 144, ;
		Width = 35, ;
		DisabledBackColor = RGB(156,226,193), ;
		DisabledForeColor = RGB(255,0,0), ;
		Name = "Text2"


	ADD OBJECT grid1 AS grid WITH ;
		ColumnCount = 6, ;
		ChildOrder = "Linkno", ;
		DeleteMark = .F., ;
		Height = 93, ;
		Left = 112, ;
		LinkMaster = "Jh1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "fk1", ;
		RelationalExpr = "no+str(no1)", ;
		ScrollBars = 2, ;
		TabIndex = 31, ;
		Top = 296, ;
		Width = 529, ;
		Name = "Grid1", ;
		Column1.ControlSource = "fk1.no2", ;
		Column1.Width = 53, ;
		Column1.ReadOnly = .T., ;
		Column1.Visible = .T., ;
		Column1.Name = "Column1", ;
		Column2.ControlSource = "fk1.rq", ;
		Column2.Width = 62, ;
		Column2.ReadOnly = .T., ;
		Column2.Visible = .T., ;
		Column2.Name = "Column2", ;
		Column3.ControlSource = "fk1.jr", ;
		Column3.Width = 67, ;
		Column3.ReadOnly = .T., ;
		Column3.Visible = .T., ;
		Column3.Name = "Column3", ;
		Column4.ControlSource = "fk1.yr", ;
		Column4.Width = 73, ;
		Column4.ReadOnly = .T., ;
		Column4.Visible = .T., ;
		Column4.Name = "Column4", ;
		Column5.ControlSource = "fk1.jbr", ;
		Column5.Width = 72, ;
		Column5.ReadOnly = .T., ;
		Column5.Visible = .T., ;
		Column5.Name = "Column5", ;
		Column6.ControlSource = "fk1.bz", ;
		Column6.Width = 180, ;
		Column6.ReadOnly = .T., ;
		Column6.Visible = .T., ;
		Column6.Name = "Column6"


	ADD OBJECT jh31.grid1.column1.header1 AS header WITH ;
		Alignment = 2, ;
		Caption = "收款序号", ;
		Name = "Header1"


	ADD OBJECT jh31.grid1.column1.text1 AS textbox WITH ;
		BorderStyle = 0, ;
		Margin = 0, ;
		ReadOnly = .T., ;
		Visible = .T., ;
		ForeColor = RGB(0,0,0), ;
		BackColor = RGB(255,255,255), ;
		Name = "Text1"


	ADD OBJECT jh31.grid1.column2.header1 AS header WITH ;
		Alignment = 2, ;
		Caption = "收款日期", ;
		Name = "Header1"


	ADD OBJECT jh31.grid1.column2.text1 AS textbox WITH ;
		BorderStyle = 0, ;
		Margin = 0, ;
		ReadOnly = .T., ;
		Visible = .T., ;
		ForeColor = RGB(0,0,0), ;
		BackColor = RGB(255,255,255), ;
		Name = "Text1"


	ADD OBJECT jh31.grid1.column3.header1 AS header WITH ;
		Alignment = 2, ;
		Caption = "金  额", ;
		Name = "Header1"


	ADD OBJECT jh31.grid1.column3.text1 AS textbox WITH ;
		BorderStyle = 0, ;
		Margin = 0, ;
		ReadOnly = .T., ;
		Visible = .T., ;
		ForeColor = RGB(0,0,0), ;
		BackColor = RGB(255,255,255), ;
		Name = "Text1"


	ADD OBJECT jh31.grid1.column4.header1 AS header WITH ;
		Alignment = 2, ;
		Caption = "未收金额", ;
		Name = "Header1"


	ADD OBJECT jh31.grid1.column4.text1 AS textbox WITH ;
		BorderStyle = 0, ;
		Margin = 0, ;
		ReadOnly = .T., ;
		Visible = .T., ;
		ForeColor = RGB(0,0,0), ;
		BackColor = RGB(255,255,255), ;
		Name = "Text1"


	ADD OBJECT jh31.grid1.column5.header1 AS header WITH ;
		Alignment = 2, ;
		Caption = "经手人", ;
		Name = "Header1"


	ADD OBJECT jh31.grid1.column5.text1 AS textbox WITH ;
		BorderStyle = 0, ;
		Margin = 0, ;
		ReadOnly = .T., ;
		Visible = .T., ;
		ForeColor = RGB(0,0,0), ;
		BackColor = RGB(255,255,255), ;
		Name = "Text1"


	ADD OBJECT jh31.grid1.column6.header1 AS header WITH ;
		Alignment = 2, ;
		Caption = "说   明", ;
		Name = "Header1"


	ADD OBJECT jh31.grid1.column6.text1 AS textbox WITH ;
		BorderStyle = 0, ;
		Margin = 0, ;
		ReadOnly = .T., ;
		Visible = .T., ;
		ForeColor = RGB(0,0,0), ;
		BackColor = RGB(255,255,255), ;
		Name = "Text1"


	PROCEDURE disp
		select jh1
		if this.jls>0 &&表不为空
		   thisform.commandgroup1.command1.enabled=.T.
		   thisform.commandgroup1.command2.enabled=.T.
		   thisform.commandgroup1.command3.enabled=.T.
		   thisform.commandgroup1.command4.enabled=.T.
		   thisform.commandgroup1.command6.enabled=.T.
		   thisform.commandgroup1.command7.enabled=.T.
		   thisform.commandgroup1.command10.enabled=.T.
		else
		   thisform.commandgroup1.command1.enabled=.F.
		   thisform.commandgroup1.command2.enabled=.F.
		   thisform.commandgroup1.command3.enabled=.F.
		   thisform.commandgroup1.command4.enabled=.F.
		   thisform.commandgroup1.command5.enabled=.T.
		   thisform.commandgroup1.command6.enabled=.F.
		   thisform.commandgroup1.command7.enabled=.F.
		   thisform.commandgroup1.command10.enabled=.F.
		endif  
		thisform.setall("enabled",.F.,"textbox")
		thisform.setall("enabled",.F.,"combobox")
		thisform.commandgroup1.command8.enabled=.F.
		thisform.commandgroup1.command9.enabled=.F.
	ENDPROC


	PROCEDURE Init
		public jhno1,oldsl,newsl,olddj,newdj
		set multilock on
		thisform.txtno.value=jhno
		select jh1
		set filter to no=jhno
		count to rec
		jhno1=rec
		go top
		this.jls=rec
		this.currno=recno()
		this.disp
	ENDPROC


	PROCEDURE txtrq.GotFocus
		THIS.VALUE=DATE()
	ENDPROC


	PROCEDURE txtdj.GotFocus
		olddj=this.value
	ENDPROC


	PROCEDURE txtdj.LostFocus
		newdj=this.value
	ENDPROC


	PROCEDURE txtsl.LostFocus
		newsl=this.value
		thisform.txtjr.value=newdj*this.value
		addyr=(newdj-olddj)*newsl+(newsl-oldsl)*olddj
		thisform.txtyr.value=thisform.txtyr.value+addyr
		jhysl=jhysl-newsl+oldsl
		thisform.text2.value=jhysl
		if jhysl<0 &&响铃警告
		   ?chr(7)
		   ?chr(7)
		   ?chr(7)
		endif
		select fk1
		repl yr with yr+addyr for no=jh1.no and no1=jh1.no1
		select jh1
	ENDPROC


	PROCEDURE txtsl.GotFocus
		oldsl=this.value
	ENDPROC


	PROCEDURE command1.Click
		??CHR(7)
		if thisform.txtyr.value=0
		   =messagebox("本次进货余款已全部付清,不能选择本按钮",48,"信息提示")
		else
		   public byr
		   select jh1
		   byr=yr  &&为本次进货记录的余额
		   select fk1
		   set filter to no=jh1.no and no1=jh1.no1
		   count to bh
		   do form jh32 with bh
		   select jh1
		   repl yf with yf+byr,yr with yr-byr
		   thisform.refresh
		endif
	ENDPROC


	PROCEDURE command1.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE combo1.LostFocus
		select dwb
		locate for alltrim(dw)==alltrim(this.text)
		if !found()
		   select jh1
		   repl dw with this.text
		   if messagebox("输入的新单位,添加到单位表中吗?",48+4,"信息提示")=6
		      select dwb
		      append blank
		      repl dw with this.text
		   endif
		endif
		select jh1
	ENDPROC


	PROCEDURE combo2.LostFocus
		select jbrb
		locate for alltrim(jbr)==alltrim(this.text)
		if !found()
		   select jh1
		   repl jbr with this.text
		   if messagebox("输入的新经办人,添加到经办人表中吗?",48+4,"信息提示")=6
		      select jbrb
		      append blank
		      repl jbr with this.text
		   endif
		endif
		select jh1
	ENDPROC


	PROCEDURE combo3.LostFocus
		select jbrb
		locate for alltrim(jbr)==alltrim(this.text)
		if !found()
		   select jh1
		   repl bgr with this.text
		   if messagebox("输入的新经办人,添加到经办人表中吗?",48+4,"信息提示")=6
		      select jbrb
		      append blank
		      repl jbr with this.text
		   endif
		endif
		select jh1
	ENDPROC


	PROCEDURE command2.Click
		SELECT JH1
		IF YF>0
		   SELECT REPTAB
		   ZAP
		   APPEND BLANK
		   REPL NO WITH JH1.NO,RQ WITH JH1.RQ,DW WITH JH1.DW,MC WITH JH1.MC
		   REPL PZ WITH JH1.PZ,XH WITH JH1.XH,DJ WITH JH1.DJ,SL WITH JH1.SL
		   REPL JR WITH JH1.JR,YF WITH JH1.YF,YR WITH JH1.YR,JBR WITH JH1.JBR
		   REPL BGR WITH JH1.BGR,FHR WITH JH1.SHR,RQ1 WITH FK1.RQ,JR1 WITH FK1.JR,JBR1 WITH FK1.JBR
		   REPO FORM FK1 PREVIEW
		   SELECT JH1
		ELSE
		   =MESSAGEBOX("没有选择任何收款单,不能打印",48,"信息提示")
		ENDIF
	ENDPROC


	PROCEDURE command2.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE commandgroup1.Command1.Click
		go top
		thisform.currno=recno()
		thisform.setall("enabled",.F.,"textbox")
		thisform.setall("enabled",.F.,"combobox")
		thisform.refresh
	ENDPROC


	PROCEDURE commandgroup1.Command1.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE commandgroup1.Command2.Click
		skip -1
		if bof()
		   go top
		endif
		thisform.currno=recno()
		thisform.setall("enabled",.F.,"textbox")
		thisform.setall("enabled",.F.,"combobox")
		thisform.refresh
	ENDPROC


	PROCEDURE commandgroup1.Command2.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE commandgroup1.Command3.Click
		skip
		if eof()
		   go bottom
		endif
		thisform.currno=recno()
		thisform.setall("enabled",.F.,"textbox")
		thisform.setall("enabled",.F.,"combobox")
		thisform.refresh
	ENDPROC


	PROCEDURE commandgroup1.Command3.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE commandgroup1.Command4.Click
		go bottom
		thisform.currno=recno()
		thisform.setall("enabled",.F.,"textbox")
		thisform.setall("enabled",.F.,"combobox")
		thisform.refresh
	ENDPROC


	PROCEDURE commandgroup1.Command4.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE commandgroup1.Command5.Click
		select jh1
		append blank
		thisform.jls=thisform.jls+1
		jhno1=jhno1+1
		repl mc with jhmc,xh with jhxh,pz with jhpz
		repl no with jhno,no1 with jhno1
		thisform.disp
		thisform.setall("enabled",.T.,"textbox")
		thisform.setall("enabled",.T.,"combobox")
		thisform.commandgroup1.command8.enabled=.T.
		thisform.commandgroup1.command9.enabled=.T.
		thisform.opmode=1  &&指定操作模式
		thisform.refresh
		thisform.combo1.setfocus
	ENDPROC


	PROCEDURE commandgroup1.Command5.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE commandgroup1.Command6.Click
		if messagebox("记录一旦删除便不能恢复,真的要删除吗?",48+4,"信息提示")=6 &&回答"是"
		   delete
		   jhysl=jhysl+thisform.txtsl.value
		   thisform.jls=thisform.jls-1
		   thisform.opmode=2  &&指定操作模式
		   select fk1
		   delete for no=jh1.no and no1=jh1.no1
		   thisform.disp
		   thisform.refresh
		endif
		select jh1
	ENDPROC


	PROCEDURE commandgroup1.Command6.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE commandgroup1.Command7.Click
		thisform.setall("enabled",.T.,"textbox")
		thisform.setall("enabled",.T.,"combobox")
		thisform.commandgroup1.command8.enabled=.T.
		thisform.commandgroup1.command9.enabled=.T.
		thisform.opmode=3  &&指定操作模式
		thisform.refresh
		thisform.combo1.setfocus
	ENDPROC


	PROCEDURE commandgroup1.Command7.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE commandgroup1.Command8.Click
		if  messagebox("是否放弃当前操作?", 48+4,"信息提示")=6 &&回答"是"
			=tablerevert(.F.)	&&将数据恢复
		    this.enabled=.F.
		    thisform.commandgroup1.command9.enabled=.F.
		    if thisform.opmode=1 &&添加操作
		       thisform.jls=thisform.jls-1
		       if thisform.jls>0 &&若存在记录,则转向"取消"操作前的记录
		          go thisform.currno
		       endif
		    endif
		    thisform.setall("enabled",.F.,"textbox")
		    thisform.setall("enabled",.F.,"combobox")
		    thisform.disp
			thisform.refresh()
		endif
	ENDPROC


	PROCEDURE commandgroup1.Command8.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE commandgroup1.Command9.Click
		if tableupdate(.F.)=.F.
		   =messagebox("数据保存不成功",48,"信息提示")
		else
		   this.enabled=.F.
		   thisform.commandgroup1.command8.enabled=.F.
		endif
	ENDPROC


	PROCEDURE commandgroup1.Command9.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE commandgroup1.Command10.Click
		SELECT JH1
		THISREC=RECNO()
		REPO FORM JH3 FOR RECNO()=THISREC PREVIEW
	ENDPROC


	PROCEDURE commandgroup1.Command10.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


	PROCEDURE command3.Click
		thisform.release
	ENDPROC


	PROCEDURE command3.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		THIS.MOUSEPOINTER=99
		THIS.MOUSEICON="POINT.CUR"
	ENDPROC


ENDDEFINE
*
*-- 结束定义: jh31
**************************************************

⌨️ 快捷键说明

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