SCL.PRG
资源名称:jq_gongzi.ARJ [点击查看]
上传用户:zhanyi0618
上传日期:2013-01-31
资源大小:1118k
文件大小:4k
源码类别:
企业管理
开发平台:
VFP
- ***************************
- * .SCL.PRG
- ***************************
- save screen to PM
- PD1 = field(READZD)
- set color to w/g
- @ 6 , 30 , 8 , 53 box ' '
- set color to gr+/bg
- PD = 'N'
- @ 7 , 31 say '真的删除该列吗(Y/N)?' get PD
- read
- if PD='Y' or PD='y'
- FILE1 = GZBWJ+'.dbf'
- use
- if file('gzb-k.dbf')
- erase gzb-k.dbf
- endif
- copy file &file1 to gzb-k.dbf
- use &gzbwj
- if file('gzbk.dbf')
- erase gzbk.dbf
- endif
- copy to gzbk.dbf structure extended
- use gzbk
- locate all for PD1$FIELD_NAME and len(trim(PD1))=len(trim(FIELD_NAME))
- if FIELD_NAME='应发工资' or FIELD_NAME='实发工资' or FIELD_NAME='帐号'
- ?? chr(7)
- else
- delete
- pack
- endif
- set color to gr+/bg
- X1 = 8
- X2 = 10
- Y1 = 28
- Y2 = 48
- do box-1
- @ 9 , 30 say '正在处理数据......'
- delete all for FIELD_NAME=' '
- pack
- use
- FILE = GZBWJ+'.dbf'
- if file(FILE)
- eras &file
- endif
- crea &gzbwj from gzbk
- use &gzbwj
- append from gzb-k.dbf
- use
- use &gzbwj
- select 2
- use
- select 1
- if file('gzjg.dbf')
- erase gzjg.dbf
- endif
- copy to gzjg.dbf structure extended
- select 2
- use gzjg
- select 1
- 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
- restore screen from PM
- set color to w+/b
- @ 2 , 12 clear to 22 , 79
- 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
- set color to w+/b
- 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 = 3
- P = 1
- if YFGZ>7
- PD1 = 7
- else
- PD1 = YFGZ-1
- P = 0
- endif
- ZD1 = 3
- 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 n/w
- BS = 0
- LC = 0
- JSQ = 3
- if YFGZ>7
- PD1 = 7
- else
- PD1 = YFGZ-1
- endif
- do while JSQ<=PD1
- RFIELD = field(JSQ)
- @ 4+bs,20+lc say &Rfield
- JSQ = JSQ+1
- LC = LC+12
- enddo
- @ 4+BS , 0 say 编号
- @ 4+BS , 6 say 姓名
- PD = 0
- ZY = 0
- set color to gr+/bg
- RFIELD = field(READZD)
- @ 4+bs,20+readlc say &Rfield
- else
- restore screen from PM
- endif
- return