📄 accountmoving.pas
字号:
if node1<>nil then Node1.StringData :=Fieldbyname('cpseno').AsString ;
next;
end;
while not eof do
begin
node1:=treeview.Items.AddChildFirst(node,Fieldbyname('cpname').AsString);
if node1<>nil then Node1.StringData :=Fieldbyname('cpseno').AsString ;
next;
end;
end;
with DataShare_frm.Query6 do //人员基本信息,建帐时间,在RMD的setup字段里
begin
close;
sql.Clear ;
sql.Add(' select a.iscode,a.psname,a.sex,a.wkdate,a.joindate,a.BFIDYEARS,a.BFRPYEARS,a.notes,');
sql.Add('c.cpname,c.cpcode from sbdb_psarch a,sbdb_cparch c where a.cpseno=c.cpseno and a.psseno=:al_ps');
end;
with DataShare_frm.Query7 do
begin
close;
sql.Clear ;
sql.Add('select a.psseno psseno,a.yearno yearno,a.rewage rewage,a.months cymonths,');
sql.Add('0 cyacmons,0 psrate,0 cprate,0 siinter,');
sql.Add('0 lypsfund,0 lycpfund,0 lycypsints,0 lycycpints,');
sql.Add('0 psfund,0 cpfund,0 psints,0 cpints,');
sql.Add('0 psadj,0 cpadj from sbdu_pswgcase a where a.psseno=:al_ps and a.yearno<:yearno order by yearno');
end;
with DataShare_frm.Query8 do
begin
close;
sql.Clear ;
//sql.Add('select psseno,yearno,(case cymonths when 0 then 0 else cyrewg/(cymonths+lymonths) end) rewage,cymonths+lymonths,');
//sql.Add('select e.psseno,e.yearno,f.rewage,cymonths+lymonths,');
sql.Add('select e.psseno,e.yearno,f.rewage,cymonths,'); // +lymonths
sql.Add('cyacmons,psrate+cprate sum1,psrate,cprate,siinter,LYPSFUND+LYCYPSINTS+LYCPFUND+LYCYCPINTS sum2,');
sql.Add('lypsprin+lypsints lypsfund,lycypsints,lycpprin+lycpints lycpfund,');
sql.Add('lycycpints,psfund+psints+cpfund+cpints sum3 ,cypsarac+cyrelypsarac psfund,cypsints+acpswginupints psints,');
sql.Add('cyftcpfd+accpinup+splycpfd+cyrelycpac cpfund,cycpints+accpinupints cpints,');
sql.Add('isnull(acpswginup+acpswginupints+accpinup+accpinupints,0) sum4,isnull(acpswginup+acpswginupints,0) psadj,isnull(accpinup+accpinupints,0) cpadj,');
sql.Add('isnull(LYCPFUND+LYCYCPINTS+cpfund+cpadj+cpints+LYPSFUND+LYCYPSINTS+psfund+psadj+psints,0) sum5,');
sql.Add('isnull(LYPSFUND+LYCYPSINTS+psfund+psadj+psints,0) sum6');
sql.Add(',lymonths ');
//sql.Add('from sbda_psagacct where psseno=:al_ps order by yearno');
sql.Add('from sbda_psagacct e,sbdu_pswgcase f where e.psseno=f.psseno and e.psseno=:al_ps and e.yearno=f.yearno order by e.yearno');
end;
with DataShare_frm.Query9 do
begin
close;
sql.Clear ;
sql.Add('select min(yearno) yearno from sbda_psagacct where psseno=:al_ps group by psseno');
end;
Scaled:=true;
if screen.Width<>screenwidth then
begin
height:=longint(height)*longint(screen.height) div screenheight;
width:=longint(width)*longint(screen.width) div screenwidth;
scaleby(screen.Width,screenwidth);
{for i:=0 to componentcount-1 do
with components[i] do
begin
if GetPropInfo(ClassInfo, 'font') <> nil then
font.size := (screen.Width DIV screenWidth) * font.size;
end;}
end;
end;
procedure TAccountMoving_frm.onprint(Sender: TObject);
var
str,s1,s2,sqlstr,d,iszj,t:widestring;
i,j:integer;
Data:array[1..15] of widestring;
msg0:com_empire_webapp_util_Msg;
DownLoadFile:TFileStream;
begin
inherited;//501231
msg0:=com_empire_webapp_util_Msg.Create ;
iszj:='';
if FlatCombobox1.itemindex<0 then
begin
application.MessageBox('请选择人员姓名!','恩普软件',mb_iconerror+mb_ok);
Flatcombobox1.SetFocus ;
exit;
end;
if trim(Edit06.Text)<'' then
begin
application.MessageBox('请输入转入单位!','恩普软件',mb_iconerror+mb_ok);
Edit06.SetFocus ;
exit;
end;
if trim(Edit14.Text)='' then
begin
application.MessageBox('请输入转入地社会保险机构名称!','恩普软件',mb_iconerror+mb_ok);
Edit14.SetFocus ;
exit;
end;
if trim(edit15.Text)='' then
begin
application.MessageBox('请输入转入地社会保险机构开户行!','恩普软件',mb_iconerror+mb_ok);
Edit15.SetFocus ;
exit;
end;
if trim(edit16.Text)='' then
begin
application.MessageBox('请输入转入地社会保险机构邮编!','恩普软件',mb_iconerror+mb_ok);
Edit16.SetFocus ;
exit;
end;
if trim(edit17.Text)='' then
begin
application.MessageBox('请输入转入地社会保险机构帐户!','恩普软件',mb_iconerror+mb_ok);
Edit17.SetFocus ;
exit;
end;
if trim(edit18.Text)='' then
begin
application.MessageBox('请输入转入地社会保险机构地址!','恩普软件',mb_iconerror+mb_ok);
Edit18.SetFocus ;
exit;
end;
if (not radiobutton1.Checked) and (not radiobutton2.Checked) then
begin
application.MessageBox('请选择转入社保类型!','恩普软件',mb_iconerror+mb_ok);
radiogroup1.SetFocus ;
exit;
end;
if radiobutton1.Checked then iszj:='1';
if radiobutton2.Checked then iszj:='2';
if not netlogin then
begin
if not assigned(Onlinelogin_frm) then Onlinelogin_frm:=TOnlinelogin_frm.Create(nil);
if Onlinelogin_frm.ShowModal=mrok then
begin
netusername:=onlinelogin_frm.FlatEdit1.text;
netpassword:=onlinelogin_frm.FlatEdit2.Text;
netlogin:=true;
Onlinelogin_frm.Free ;
Onlinelogin_frm:=nil;
end;
try
screen.Cursor :=crhourglass;
msg:=fecho.checkUser(netusername,netpassword);
except
screen.Cursor :=crdefault;
application.MessageBox('网络连接异常!','恩普软件',mb_iconerror+mb_ok);
exit;
end;
if msg.msgCode<>1 then
begin
netlogin:=false;
screen.Cursor :=crdefault;
application.MessageBox(pchar(string(msg.msgText)),'恩普软件',mb_iconerror+mb_ok);
exit;
end ;
end;
screen.Cursor :=crhourglass;
//main_frm.httprio.URL :=url;
//fecho:=(main_frm.httprio as OnlineOperationJavaPortType); //
try
msg:=fecho.psacctOut(username,Flatcombobox2.Items[FlatCombobox1.itemindex],StringReplace(Edit06.Text,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]),
StringReplace(Edit14.Text,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]),StringReplace(Edit15.Text,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]),
StringReplace(Edit16.Text,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]),StringReplace(Edit17.text,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]),
StringReplace(Edit18.text,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]),iszj);
msg0:=fecho.getPsagacctFileName(username,Flatcombobox2.Items[FlatCombobox1.itemindex]);
except
screen.Cursor :=crdefault;
application.MessageBox('网络连接异常!','恩普软件',mb_iconerror+mb_ok);
exit;
end;
if msg.msgCode<>1 then
begin
screen.Cursor :=crdefault;
application.MessageBox(pchar(string((msg.msgText))),'恩普软件',mb_iconerror+mb_ok);
exit;
end;
if msg0.msgCode<>1 then
begin
screen.Cursor :=crdefault;
application.MessageBox(pchar(string((msg.msgText))),'恩普软件',mb_iconerror+mb_ok);
exit;
end;
str:=msg.msgText ;
str:=trim(str);
if length(str)<1 then
begin
screen.Cursor :=crdefault;
application.MessageBox('没有相应的信息!','恩普软件',mb_iconinformation+mb_ok);
exit;
end;
i:=pos('|',str); j:=1;
while i>0 do
begin
Data[j]:=copy(str,1,i-1);
str:=copy(str,i+1,length(str)-i);
inc(j);
i:=pos('|',str);
if j>16 then break;
end;
i:=pos('.',Data[1]);
if i>0 then
l03.Caption :=' '+copy(Data[1],1,i-1)+' 年 '+copy(Data[1],i+1,length(Data[1])-i)+' 月'
else l03.Caption :=' '+inttostr(strtoint(Data[1]) div 12) +' 年 '+inttostr(strtoint(data[1]) mod 12)+' 月' ;
i:=pos('.',Data[2]);
{if i>0 then
l04.Caption:=copy(Data[2],1,i-1)+' 年 '+copy(Data[2],i+1,length(Data[2])-i)+'月'
else l04.Caption :=Data[2]+' 年';
}
l07.Caption :=Data[3];
l08.Caption :=Data[4];
l19.Caption :=Data[5];
l20.Caption :=Data[6];
l21.Caption :=formatfloat('0.00',strtofloat(Data[7])*100);
l22.Caption :=Data[8];
l23.Caption :=Data[9];
l24.Caption :=Data[10];
l25.Caption :=Data[11];
l26.Caption :=Data[12];
l27.Caption :=formatfloat('0.00',strtofloat(data[5])+strtofloat(data[6])+strtofloat(data[9])+strtofloat(data[10])+strtofloat(data[11])+strtofloat(data[12]));
l28.Caption :='结息时间:至 '+data[13]+'年 '+data[14]+'月底止. 截止缴费时间是指末次缴费时间';
RMD.Close;
RMD.Open ;
for i:=1 to 5 do
begin
RMD.Append ; // 20041018 RMD的又一个bug,fieldstring 只能存10个汉字
RMD.Fields[0].AsString :=Flatcombobox2.Items[FlatCombobox1.itemindex];
RMD.Fields[1].AsString :=Flatcombobox1.Items[FlatCombobox1.itemindex];
RMD.Fields[2].AsString :=trim(l02.Caption);
RMD.Fields[3].AsString :=trim(l03.Caption) ;
RMD.Fields[4].AsString :='';//l04.Caption ;
RMD.Fields[5].AsString :=trim(l05.Caption) ;
t:=trim(edit06.Text);
t:=StringReplace(t,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]);
if (length(t)>14) and (IsChinese(t)) then t:=copy(t,1,14)+chr(vk_return)+copy(t,15,length(t)-14)
else if length(t)>28 then t:=copy(t,1,28)+chr(vk_return)+copy(t,29,length(t)-28);
RMD.Fields[6].AsString :=t;//trim(Edit06.Text) ;
RMD.Fields[7].AsString :=trim(l07.Caption) ;
RMD.Fields[8].AsString :=trim(l08.Caption) ;
RMD.Fields[9].AsString :=trim(l09.Caption) ;
RMD.Fields[10].AsString :=trim(l10.Caption) ;
RMD.Fields[11].AsString :=trim(l11.Caption) ;
RMD.Fields[12].AsString :=trim(l12.Caption) ;
RMD.Fields[13].AsString :=trim(l13.Caption) ;
t:=trim(edit14.Text);
t:=StringReplace(t,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]);
if (length(t)>14) and (IsChinese(t)) then t:=copy(t,1,14)+chr(vk_return)+copy(t,15,length(t)-14)
else if length(t)>28 then t:=copy(t,1,28)+chr(vk_return)+copy(t,29,length(t)-28);
RMD.Fields[14].AsString :=t;//trim(Edit14.Text) ;
t:=trim(edit15.Text ) ;
t:=StringReplace(t,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]);
if (length(t)>10) and (IsChinese(t)) then t:=copy(t,1,10)+chr(vk_return)+copy(t,11,length(t)-10)
else if length(t)>20 then t:=copy(t,1,20)+chr(vk_return)+copy(t,21,length(t)-20);
RMD.Fields[15].AsString :=trim(t) ;
RMD.Fields[16].AsString :=trim(Edit16.Text) ;
t:=trim(edit17.Text);
t:=StringReplace(t,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]);
if (length(t)>19) then t:=copy(t,1,19)+chr(vk_return)+copy(t,20,length(t)-19);
RMD.Fields[17].AsString :=trim(t) ;
t:=edit18.Text ;
t:=StringReplace(t,chr(vk_return),'',[rfReplaceAll, rfIgnoreCase]);
if (length(t)>10) and (IsChinese(t)) then t:=copy(t,1,10)+chr(vk_return)+copy(t,11,length(t)-10)
else if length(t)>20 then t:=copy(t,1,20)+chr(vk_return)+copy(t,21,length(t)-20);
RMD.Fields[18].AsString :=trim(t) ;
RMD.Fields[19].AsString :=trim(l19.Caption) ;
RMD.Fields[20].AsString :=trim(l20.Caption) ;
RMD.Fields[21].AsString :=trim(l21.Caption) ;
RMD.Fields[22].AsString :=trim(l22.Caption) ;
RMD.Fields[23].AsString :=trim(l23.Caption) ;
RMD.Fields[24].AsString :=trim(l24.Caption) ;
RMD.Fields[25].AsString :=trim(l25.Caption) ;
RMD.Fields[26].AsString :=trim(l26.Caption) ;
RMD.Fields[27].AsString :=trim(l27.Caption) ;
RMD.Fields[28].AsString :=trim(l28.Caption) ;
RMD.FieldByName('Account_setup').AsString :=trim(Data[15]);
RMD.FieldByName('operator').AsString :=trim(flatedit1.Text) ;
RMD.FieldByName('tel').AsString :=trim(flatedit2.Text) ;
RMD.FieldByName('oper_date').AsString :=trim(flatedit3.Text) ;
{if i=1 then
str:='第'+chr(vk_return)+chr(vk_return)+'一'+chr(vk_return)+chr(vk_return)+'联'+chr(vk_return)+chr(vk_return)+chr(vk_return)+chr(vk_return)+
'转'+chr(vk_return)+chr(vk_return)+'出'+chr(vk_return)+chr(vk_return)+'地'+chr(vk_return)+chr(vk_return)+
'业'+chr(vk_return)+chr(vk_return)+'务'+chr(vk_return)+chr(vk_return)+'留'+chr(vk_return)+chr(vk_return)+'存'
else if i=2 then
str:='第'+chr(vk_return)+chr(vk_return)+'二'+chr(vk_return)+chr(vk_return)+'联'+chr(vk_return)+chr(vk_return)+chr(vk_return)+chr(vk_return)+
'转'+chr(vk_return)+chr(vk_return)+'出'+chr(vk_return)+chr(vk_return)+'地'+chr(vk_return)+chr(vk_return)+
'财'+chr(vk_return)+chr(vk_return)+'务'+chr(vk_return)+chr(vk_return)+'留'+chr(vk_return)+chr(vk_return)+'存'
else if i=3 then
str:='第'+chr(vk_return)+chr(vk_return)+'三'+chr(vk_return)+chr(vk_return)+'联'+chr(vk_return)+chr(vk_return)+chr(vk_return)+chr(vk_return)+
'省'+chr(vk_return)+chr(vk_return)+'社'+chr(vk_return)+chr(vk_return)+'保'+chr(vk_return)+chr(vk_return)+
'中'+chr(vk_return)+chr(vk_return)+'心'+chr(vk_return)+chr(vk_return)+'留'+chr(vk_return)+chr(vk_return)+'存'
else if i=4 then
str:='第'+chr(vk_return)+chr(vk_return)+'四'+chr(vk_return)+chr(vk_return)+'联'+chr(vk_return)+chr(vk_return)+chr(vk_return)+chr(vk_return)+
'转'+chr(vk_return)+chr(vk_return)+'入'+chr(vk_return)+chr(vk_return)+'地'+chr(vk_return)+chr(vk_return)+
'社'+chr(vk_return)+chr(vk_return)+'保'+chr(vk_return)+chr(vk_return)+'机'+chr(vk_return)+chr(vk_return)+
'构'+chr(vk_return)+chr(vk_return)+'留'+chr(vk_return)+chr(vk_return)+'存'
else str:='第'+chr(vk_return)+chr(vk_return)+'五'+chr(vk_return)+chr(vk_return)+'联'+chr(vk_return)+chr(vk_return)+chr(vk_return)+chr(vk_return)+
'转'+chr(vk_return)+chr(vk_return)+'入'+chr(vk_return)+chr(vk_return)+'单'+chr(vk_return)+chr(vk_return)+
'位'+chr(vk_return)+chr(vk_return)+'留'+chr(vk_return)+chr(vk_return)+'存';}
RMD.FieldByName('label').AsString :=QRlabel[i];
end;
RMD.Post ;
//---------------------下载该职工的缴费记录
if directoryexists(extractfilepath(application.ExeName)+'importfile') then
createdir(extractfilepath(application.ExeName)+'importfile');
if fileexists(extractfilepath(application.ExeName)+'importfile\bb.zip') then
deletefile(extractfilepath(application.ExeName)+'importfile\bb.zip');
DownLoadFile:=TFileStream.Create(extractfilepath(application.ExeName)+'importfile\bb.zip',fmCreate);
IdHTTP1.Get(download+msg0.msgText,DownLoadFile);
DownLoadFile.Free;
Fecho.deleteDataFile(msg0.msgText);
d:=extractfilepath(application.ExeName);
DeleteAll(extractfilepath(application.ExeName)+'importfile\');
unzip.ArchiveFile :=extractfilepath(application.ExeName)+'importfile\bb.zip';
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -