www.pudn.com > jq_gongzi.ARJ > BJCOPY.PRG, change:1995-08-08,size:3425b


*************************** 
* .\BJCOPY.PRG 
*************************** 
save screen to PM 
RL = '                ' 
MBL = '                ' 
set color to w/g 
@ 6 , 20 , 12 , 60 box '           ' 
set color to gr+/g 
@ 6 , 34 say '列间数据拷贝' 
set color to w/bg 
@ 7 , 21 clear to 11 , 59 
set color to g+/bg 
@ 7 , 30 say '原列数据 → 目标列' 
set color to w+/bg 
@ 9 , 24 say '请输入 原 列名称:' 
@ 10 , 24 say '请输入目标列名称:' 
@ 9 , 43 get RL picture 'xxxxxxxxxxxxxxxx' 
@ 10 , 43 get MBL picture 'xxxxxxxxxxxxxxxx' 
read  
RPD1 = fcount() 
RPD = 1 
RL1 = 0 
MBL1 = 0 
do while RPD<=RPD1 
  if trim(RL)=trim(field(RPD)) 
    RL1 = 1 
    RLRECN = RPD 
    exit  
  endif  
  RPD = RPD+1 
enddo  
RPD = 1 
do while RPD<=RPD1 
  if trim(MBL)=trim(field(RPD)) 
    MBL1 = 1 
    MBLRECN = RPD 
    exit  
  endif  
  RPD = RPD+1 
enddo  
if RL1=0 
  @ 15 , 30 say '原  列:'+RL+'不存在!' 
  I = inkey(5) 
  restore screen from PM 
  return  
endif  
if MBL1=0 
  @ 15 , 30 say '目标列:'+MBL+'不存在!' 
  I = inkey(3) 
  restore screen from PM 
  return  
endif  
RFIELD = field(RLRECN) 
s=&Rfield 
RFIELD = field(MBLRECN) 
s1=&Rfield 
if type('s')<>type('s1') 
  @ 15 , 30 say '原  列与目标列不同数据类型!' 
  @ 16 , 30 say '不能拷贝! 按任意键继续.....' 
  I = inkey(8) 
  restore screen from PM 
  return  
endif  
go top 
do while  not eof() 
  X1 = field(MBLRECN) 
  X2 = field(RLRECN) 
  repl &x1 with &x2  
  skip  
enddo  
@ 15 , 30 say '数据拷贝完毕,按任意键继续.....' 
I = inkey(10) 
set color to n/w 
@ 2 , 20 say space(60) 
@ 4 , 0 clear to 22 , 79 
P = 1 
set color to gr/w 
@ 0 , 0 say '挚 诚 奉 献 !' 
@ 0 , 67 say 'JQ财务系统' 
set color to g/w 
@ 0 , 30 say '工资表数据修改' 
@ 1 , 0 say '===============================================================================' 
? '   ' 
? '===============================================================================' 
@ 23 , 0 say '===============================================================================' 
set color to b/gr 
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 = 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 g+/b 
RFIELD = field(READZD) 
@ 4+bs,20+readlc say &Rfield 
return