GZBXG.PRG
资源名称:jq_gongzi.ARJ [点击查看]
上传用户:zhanyi0618
上传日期:2013-01-31
资源大小:1118k
文件大小:24k
源码类别:
企业管理
开发平台:
VFP
- ***************************
- * .GZBXG.PRG
- ***************************
- X = GZBWJ+'.dbf'
- Y = GZBWJ+'.%%%'
- ! copy gzb&x gzb&y >nul
- use &gzbwj
- set color to
- clear
- P = 1
- set color to gr/n
- @ 0 , 0 say '挚 诚 奉 献 !'
- @ 0 , 67 say 'JQ系列软件'
- set color to g/n
- @ 0 , 30 say '工资表数据修改'
- @ 1 , 0 say '==============================================================================='
- ? ' '
- ? '==============================================================================='
- @ 23 , 0 say '==============================================================================='
- set color to b/gr
- @ 24 , 0 say 'F1帮助:F2删除列:F3增加列:F4帐号F5姓名:F6增加:F8删除:F9列拷贝:F10排序:^End列清零;
- '
- set color to
- ZDS = fcount()
- PD = 1
- YFGZ = 0
- SFGZ = 0
- do while PD<=ZDS
- if field(PD)='应发工资'
- YFGZ = PD
- endif
- if field(PD)='实发工资'
- SFGZ = PD
- endif
- PD = PD+1
- enddo
- if YFGZ=0
- @ 10 , 30 say '“应发工资”项目没找到!'
- I = inkey(0)
- return
- endif
- if SFGZ=0
- @ 11 , 30 say '“实发工资”项目没找到!'
- I = inkey(0)
- return
- endif
- go bottom
- PD = recno()
- JLS = PD
- PD = PD/19
- PD1 = int(PD)
- YS = PD-PD1
- if YS=0
- YS = PD1
- else
- YS = PD1+1
- endif
- go top
- YC = 1
- BS = 0
- YS1 = 1
- @ 2 , 0 say '编号'
- @ 2 , 6 say '姓名'
- do while .t.
- LC = 0
- JSQ = 4
- P = 1
- if YFGZ>7
- PD1 = 7
- else
- PD1 = YFGZ-1
- P = 0
- endif
- ZD1 = 4
- ZD2 = PD1
- do while JSQ<=PD1
- FIELD = field(JSQ)
- @ 2 , 20+LC say field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- if not eof()
- skip
- BS = BS+1
- else
- exit
- endif
- if BS=19
- exit
- endif
- enddo
- READZD = ZD1
- READLC = 0
- go top
- set color to n/w
- BS = 0
- LC = 0
- JSQ = 4
- if YFGZ>7
- PD1 = 7
- else
- PD1 = YFGZ-1
- endif
- do while JSQ<=PD1
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- PD = 0
- ZY = 0
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- do while .t.
- X = inkey(0)
- do case
- case X=23
- set color to
- if not eof()
- REN = recno()
- DATA = field(READZD)
- repl all &data with 0
- ZDS = fcount()
- PD = 1
- YFGZ = 0
- SFGZ = 0
- do while PD<=ZDS
- if field(PD)='应发工资'
- YFGZ = PD
- endif
- if field(PD)='实发工资'
- SFGZ = PD
- endif
- PD = PD+1
- enddo
- if YFGZ=0
- @ 10 , 30 say '“应发工资”项目没找到!'
- I = inkey(0)
- return
- endif
- if SFGZ=0
- @ 11 , 30 say '“实发工资”项目没找到!'
- I = inkey(0)
- return
- endif
- go top
- do while not eof()
- PD = 5
- JSQ = 0
- do while PD<YFGZ
- PD1 = field(PD)
- jsq=jsq+&pd1
- PD = PD+1
- enddo
- PD1 = field(YFGZ)
- repl &pd1 with jsq
- PD = YFGZ+1
- do while PD<SFGZ
- PD1 = field(PD)
- jsq=jsq-&pd1
- PD = PD+1
- enddo
- PD1 = field(SFGZ)
- repl &pd1 with jsq
- skip
- enddo
- @ 4 , READLC+20 clear to 22 , READLC+31
- set color to gr+/bg
- @ 4+bs,readlc+20 say &data
- go REN
- else
- ?? chr(7)
- endif
- case X=28
- save screen to PM
- clear
- @ 0 , 0 say '帮助信息 黄朝生研制 ;
- JQ001工资表系统'
- ? '┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓'
- ? '┃F1 启用帮助信息 │ F9 列间数据拷贝 ;
- ┃'
- ? '┃F4 修改帐号 │ F2 删除光标所在列 ;
- ┃'
- ? '┃F5 修改姓名、编号 │ F3 在光标所在列前增加一列;
- ┃'
- ? '┃F6 增加一人 │ ;
- ┃'
- ? '┃F8 删除一人 │ ;
- ┃'
- ? '┃F10 依据编号排序 │ ;
- ┃'
- ? '┃← 左移 │ ;
- ┃'
- ? '┃↑ 上移 │ ;
- ┃'
- ? '┃→ 右移 │ ;
- ┃'
- ? '┃↓ 下移 │ ;
- ┃'
- ? '┃|← 左屏 Shift+Tab │ ;
- ┃'
- ? '┃→| 右屏 Tab │ ;
- ┃'
- ? '┃PaGeUp 上页 │ ;
- ┃'
- ? '┃PaGeDoWn 下页 │ ;
- ┃'
- ? '┃ESC 退出 │ ;
- ┃'
- ? '┃+ 本项累加 │ ;
- ┃'
- ? '┃- 本项累减 │ ;
- ┃'
- ? '┃* 本项乘以一数 │ ;
- ┃'
- ? '┃/ 本项除以一数 │ ;
- ┃'
- ? '┃^END 列清零 Ctrl+END │ JQ工资表系统 for foxpro.dos;
- 增强版 ┃'
- ? '┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛'
- ? 'JQ系列软件 联系地址:广西南宁市建政路51号 黄朝生 邮政编码:530023;
- '
- ? ' 按任意键退出 ... ... '
- I = inkey(0)
- restore screen from PM
- case X=-9
- erase gzb.%%%
- sort on 编号 to gzb.%%%
- use
- X = GZBWJ+'.dbf'
- eras &x
- rena gzb.%%% to &x
- use &gzbwj
- set color to
- ZDS = fcount()
- PD = 1
- YFGZ = 0
- SFGZ = 0
- do while PD<=ZDS
- if field(PD)='应发工资'
- YFGZ = PD
- endif
- if field(PD)='实发工资'
- SFGZ = PD
- endif
- PD = PD+1
- enddo
- if YFGZ=0
- @ 10 , 30 say '“应发工资”项目没找到!'
- I = inkey(0)
- return
- endif
- if SFGZ=0
- @ 11 , 30 say '“实发工资”项目没找到!'
- I = inkey(0)
- return
- endif
- go bottom
- PD = recno()
- JLS = PD
- PD = PD/19
- PD1 = int(PD)
- YS = PD-PD1
- if YS=0
- YS = PD1
- else
- YS = PD1+1
- endif
- go top
- YC = 1
- BS = 0
- YS1 = 1
- @ 2 , 0 say '编号'
- @ 2 , 6 say '姓名'
- do while .t.
- LC = 0
- JSQ = 4
- P = 1
- if YFGZ>7
- PD1 = 7
- else
- PD1 = YFGZ-1
- P = 0
- endif
- ZD1 = 4
- ZD2 = PD1
- do while JSQ<=PD1
- FIELD = field(JSQ)
- @ 2 , 20+LC say field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- if not eof()
- skip
- BS = BS+1
- else
- exit
- endif
- if BS=19
- exit
- endif
- enddo
- READZD = ZD1
- READLC = 0
- go top
- set color to n/w
- BS = 0
- LC = 0
- JSQ = 4
- if YFGZ>7
- PD1 = 7
- else
- PD1 = YFGZ-1
- endif
- do while JSQ<=PD1
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- PD = 0
- ZY = 0
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- case X=4
- if READZD<ZD2
- set color to n/w
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- READZD = READZD+1
- READLC = READLC+12
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- else
- ?? chr(7)
- endif
- case X=19
- if READZD>ZD1
- set color to n/w
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- set color to gr+/bg
- READZD = READZD-1
- READLC = READLC-12
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- else
- ?? chr(7)
- endif
- case X=46 or X=45 or X=43 or X>47 and X<58
- if not eof() and field(READZD)<>'帐号'
- if X<>45 and X<>43
- keyboard chr(X)
- @ 0 , 17 say '='
- else
- if X=45
- @ 0 , 17 say '-'
- else
- @ 0 , 17 say '+'
- endif
- endif
- DATA = field(READZD)
- olddata=&data
- repl &data with 0
- @ 4+bs,20+readlc get &data
- read
- @ 0 , 17 say ' '
- if readkey()=268 or readkey()=12
- repl &data with olddata
- else
- if X=45
- repl &data with olddata-&data
- else
- if X=43
- repl &data with olddata+&data
- endif
- endif
- endif
- set color to
- @ 4+BS , 20+READLC say ' '
- PD = 5
- JSQ = 0
- do while PD<YFGZ
- PD1 = field(PD)
- jsq=jsq+&pd1
- PD = PD+1
- enddo
- PD1 = field(YFGZ)
- repl &pd1 with jsq
- PD = YFGZ+1
- do while PD<SFGZ
- PD1 = field(PD)
- jsq=jsq-&pd1
- PD = PD+1
- enddo
- PD1 = field(SFGZ)
- repl &pd1 with jsq
- LC = 0
- if YFGZ>6
- PD1 = 6
- else
- PD1 = YFGZ-1
- endif
- JSQ = ZD1
- PD2 = ZD2
- do while JSQ<=PD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to n/w
- if not BS=18 and not eof()
- endif
- LC = 0
- JSQ = ZD1
- if YFGZ>6
- PD1 = 6
- else
- PD1 = YFGZ-1
- endif
- do while JSQ<=PD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- else
- ?? chr(7)
- endif
- case X=5
- if BS=0 or recno()=1
- ?? chr(7)
- else
- set color to
- LC = 0
- JSQ = 4
- if YFGZ>6
- PD1 = 6
- else
- PD1 = YFGZ-1
- endif
- JSQ = ZD1
- PD1 = ZD2
- do while JSQ<=PD1
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to n/w
- skip -1
- BS = BS-1
- LC = 0
- if YFGZ>6
- PD1 = 6
- else
- PD1 = YFGZ-1
- endif
- JSQ = ZD1
- PD1 = ZD2
- do while JSQ<=PD1
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- endif
- case X=24 or X=13
- if BS=18 or eof()
- ?? chr(7)
- else
- set color to
- LC = 0
- if YFGZ>6
- PD1 = 6
- else
- PD1 = YFGZ-1
- endif
- JSQ = ZD1
- PD2 = ZD2
- do while JSQ<=PD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to n/w
- skip
- BS = BS+1
- LC = 0
- JSQ = ZD1
- if YFGZ>6
- PD1 = 6
- else
- PD1 = YFGZ-1
- endif
- do while JSQ<=PD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- endif
- case X=3
- if YC<YS
- go YC*19+1
- YC = YC+1
- X = recno()
- set color to
- BS = 0
- @ 4 , 0 clear to 22 , 79
- do while .t.
- LC = 0
- JSQ = ZD1
- do while JSQ<=ZD2
- FIELD = field(JSQ)
- @ 2 , 20+LC say field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- if not eof()
- skip
- BS = BS+1
- else
- exit
- endif
- if BS=19
- exit
- endif
- enddo
- go X
- set color to n/w
- BS = 0
- LC = 0
- JSQ = ZD1
- do while JSQ<=ZD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- else
- ?? chr(7)
- endif
- case X=18
- if YC>1
- YC = YC-1
- go YC*19
- skip -18
- X = recno()
- set color to
- BS = 0
- @ 4 , 0 clear to 22 , 79
- do while .t.
- LC = 0
- JSQ = ZD1
- do while JSQ<=ZD2
- FIELD = field(JSQ)
- @ 2 , 20+LC say field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- if not eof()
- skip
- BS = BS+1
- else
- exit
- endif
- if BS=19
- exit
- endif
- enddo
- go X
- set color to n/w
- BS = 0
- LC = 0
- JSQ = ZD1
- do while JSQ<=ZD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- else
- ?? chr(7)
- endif
- case X=9
- if not bof() and not eof()
- RRECN = recno()
- RBS = BS
- if ZD2<SFGZ
- go (YC-1)*19+1
- X = recno()
- set color to
- @ 2 , 20 say space(60)
- @ 4 , 15 clear to 22 , 79
- BS = 0
- JSQ1 = JSQ
- ZD1 = ZD2+1
- if SFGZ-ZD1>=4
- ZD2 = ZD1+4
- else
- ZD2 = SFGZ
- endif
- do while .t.
- JSQ = JSQ1
- LC = 0
- PD2 = ZD2
- do while JSQ<=PD2
- FIELD = field(JSQ)
- @ 2 , 20+LC say field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- if not eof()
- skip
- BS = BS+1
- else
- exit
- endif
- if BS=19
- exit
- endif
- enddo
- go RRECN
- READZD = ZD1
- READLC = 0
- set color to n/w
- BS = RBS
- LC = 0
- JSQ = JSQ1
- do while JSQ<=PD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- else
- ?? chr(7)
- endif
- else
- ?? chr(7)
- endif
- case X=15
- if not bof() and not eof()
- if ZD1>4
- RRECN = recno()
- RBS = BS
- go (YC-1)*19+1
- X = recno()
- set color to
- @ 2 , 20 say space(60)
- @ 4 , 15 clear to 22 , 79
- BS = 0
- JSQ1 = JSQ
- ZD2 = ZD1-1
- ZD1 = ZD2-4
- do while .t.
- JSQ = ZD1
- LC = 0
- PD2 = ZD2
- do while JSQ<=PD2
- FIELD = field(JSQ)
- @ 2 , 20+LC say field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- if not eof()
- skip
- BS = BS+1
- else
- exit
- endif
- if BS=19
- exit
- endif
- enddo
- go RRECN
- READZD = ZD1
- READLC = 0
- set color to n/w
- BS = RBS
- LC = 0
- JSQ = ZD1
- do while JSQ<=PD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- else
- ?? chr(7)
- endif
- endif
- case X=-3
- if not eof()
- save screen to PM
- set color to gr+/g
- @ (4+BS-1) , 18 clear to (4+BS+1) , 33
- @ (4+BS-1) , 22 say '修改帐号:'
- set color to n/w , w+/bg
- @ 4+BS , 20 get 帐号
- read
- restore screen from PM
- if READZD=3
- set color to n/w
- @ 4+BS , 20 say 帐号
- endif
- else
- ?? chr(7)
- endif
- case X=-4
- if not eof()
- set color to n/w , w+/bg
- @ 4+BS , 0 get 编号
- @ 4+BS , 6 get 姓名
- read
- set color to n/w
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- else
- ?? chr(7)
- endif
- case X=-5
- save screen to PM
- set color to n/bg
- @ 5 , 18 clear to 11 , 43
- set color to gr+/bg
- @ 7 , 20 clear to 10 , 40
- X1 = 7
- X2 = 10
- Y1 = 20
- Y2 = 40
- do box-1
- X1 = 0
- X2 = ' '
- @ 6 , 26 say '增 加 一 人'
- @ 8 , 24 say '编号:' get X1 picture '999'
- @ 9 , 24 say '姓名:' get X2
- read
- skip -BS
- if not eof()
- X = recno()
- else
- X = 9999999
- endif
- locate all for 编号>X1
- insert blank before
- replace 编号 with X1 , 姓名 with X2
- JLS = JLS+1
- PD = JLS/19
- PD1 = int(PD)
- YS = PD-PD1
- if YS=0
- YS = PD1
- else
- YS = PD1+1
- endif
- if X<>9999999
- go X
- else
- go top
- endif
- X = recno()
- BS1 = BS
- BS = 0
- restore screen from PM
- set color to
- do while .t.
- LC = 0
- JSQ = ZD1
- do while JSQ<=ZD2
- FIELD = field(JSQ)
- @ 2 , 20+LC say field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- if not eof()
- skip
- BS = BS+1
- else
- exit
- endif
- if BS=19
- exit
- endif
- enddo
- go X
- skip BS1
- set color to n/w
- BS = BS1
- LC = 0
- JSQ = ZD1
- do while JSQ<=ZD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- set color to
- case X=-7
- if not eof()
- save screen to PM
- set color to g+/gr
- @ 6 , 20 clear to 8 , 60
- I = 'F'
- ?? chr(7)
- @ 7 , 24 say '真的删除记录吗?(Y/N)' get I
- read
- restore screen from PM
- RECN = recno()
- if I='y' or I='Y'
- delete
- pack
- JLS = JLS-1
- if RECN>=JLS and BS>=1
- BS = BS-1
- endif
- set color to
- @ 4+BS , 0 clear to 22 , 79
- X1 = BS
- if RECN>JLS
- if not bof() and not eof()
- go JLS
- else
- go top
- endif
- else
- if not bof() and not eof()
- go RECN
- else
- go top
- endif
- endif
- X = 0
- do while .t.
- LC = 0
- JSQ = ZD1
- do while JSQ<=ZD2
- FIELD = field(JSQ)
- @ 2 , 20+LC say field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- if not eof()
- skip
- X = X+1
- BS = BS+1
- else
- exit
- endif
- if BS=19
- exit
- endif
- enddo
- skip -X
- if int(JLS/19)-(JLS/19)=0 and YC>1
- YC = YC-1
- YS = YS-1
- if RECN>JLS
- go JLS
- else
- go RECN
- endif
- skip -18
- X = recno()
- set color to
- BS = 0
- @ 4 , 0 clear to 22 , 79
- do while .t.
- LC = 0
- JSQ = ZD1
- do while JSQ<=ZD2
- FIELD = field(JSQ)
- @ 2 , 20+LC say field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- if not eof()
- skip
- BS = BS+1
- else
- exit
- endif
- if BS=19
- exit
- endif
- enddo
- go X
- set color to n/w
- BS = 0
- LC = 0
- JSQ = ZD1
- do while JSQ<=ZD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- endif
- set color to n/w
- BS = X1
- LC = 0
- JSQ = ZD1
- do while JSQ<=ZD2
- FIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- PD = JLS/19
- PD1 = int(PD)
- YS = PD-PD1
- if YS=0
- YS = PD1
- else
- YS = PD1+1
- endif
- endif
- else
- ?? chr(7)
- endif
- case X=-9
- erase gzb.%%%
- Y2 = field(1)
- sort on (Y2) to gzb.%%%
- use
- X = GZBWJ+'.dbf'
- eras &x
- rena gzb.%%% to &x
- use &gzbwj
- set color to n/w
- ZDS = fcount()
- PD = 1
- YFGZ = 0
- SFGZ = 0
- do while PD<=ZDS
- if field(PD)='应发工资'
- YFGZ = PD
- endif
- if field(PD)='实发工资'
- SFGZ = PD
- endif
- PD = PD+1
- enddo
- if YFGZ=0
- @ 10 , 30 say '“应发工资”项目没找到!'
- I = inkey(0)
- return
- endif
- if SFGZ=0
- @ 11 , 30 say '“实发工资”项目没找到!'
- I = inkey(0)
- return
- endif
- go bottom
- PD = recno()
- JLS = PD
- PD = PD/19
- PD1 = int(PD)
- YS = PD-PD1
- if YS=0
- YS = PD1
- else
- YS = PD1+1
- endif
- go top
- YC = 1
- BS = 0
- YS1 = 1
- @ 2 , 0 say '编号'
- @ 2 , 6 say '姓名'
- do while .t.
- LC = 0
- JSQ = 4
- P = 1
- if YFGZ>7
- PD1 = 7
- else
- PD1 = YFGZ-1
- P = 0
- endif
- ZD1 = 4
- ZD2 = PD1
- do while JSQ<=PD1
- RFIELD = field(JSQ)
- @ 2 , 20+LC say field(JSQ)
- @ 4+bs,20+lc say &Rfield
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- if not eof()
- skip
- BS = BS+1
- else
- exit
- endif
- if BS=19
- exit
- endif
- enddo
- READZD = ZD1
- READLC = 0
- go top
- set color to w+/w
- BS = 0
- LC = 0
- JSQ = 4
- if YFGZ>7
- PD1 = 7
- else
- PD1 = YFGZ-1
- endif
- do while JSQ<=PD1
- RFIELD = field(JSQ)
- @ 4+bs,20+lc say &field
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- PD = 0
- ZY = 0
- set color to gr+/bg
- DATA = field(READZD)
- @ 4+bs,20+readlc say &data
- case X=-8
- do BJCOPY
- case X=-1
- do SCL
- case X=-2
- do CRL
- case X=27
- pack
- exit
- otherwise
- ?? chr(7)
- endcase
- enddo
- set color to
- close all
- return