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

📄 retireaccount.~pas

📁 企业端数据申报系统:单位管理模块 单位查询. 业务申报模块 在线数据下载 在线数据上传 在线业务申核 申报业务查询 磁盘数据导出 磁盘数据导入 在线业务模块 在线业务
💻 ~PAS
📖 第 1 页 / 共 4 页
字号:
           execsql;
         end;

       close;
       if trim(flatedit47.Text)<>'' then   //水平差
         begin
           parambyname('param2').AsInteger :=63;
           parambyname('param3').AsString :=formatfloat('0.00',strtofloat(flatedit47.Text));
           prepare;
           execsql;
         end;
       close;

       if trim(flatedit48.Text)<>'' then   //待遇差
         begin
           parambyname('param2').AsInteger :=81;
           parambyname('param3').AsString :=formatfloat('0.00',strtofloat(flatedit48.Text));
           prepare;
           execsql;
         end;

       if trim(flatedit49.Text)<>'' then   //最低保
         begin
           parambyname('param2').AsInteger :=74;
           parambyname('param3').AsString :=formatfloat('0.00',strtofloat(flatedit49.Text));
           prepare;
           execsql;
         end;
     end;

    with DataShare_frm.Query7 do
      begin
        close;
        sql.Clear ;
        sql.Add('select pyitem,pymount from sbdb_rtwage where psseno=:p1');
        parambyname('p1').AsString :=Flatcombobox2.Items[index];
        prepare;
        open;
      end;
   { //--------------------------------20041101----------------------------
    with datashare_frm.Query12 do
      begin
        close;
        sql.Clear ;
        sql.Add('delete from sbdz_rtacct where psseno=:p1 and PROCFLG=:p2');
        parambyname('p1').AsString :=Flatcombobox2.Items[index];
        parambyname('p2').AsString :='1';
        prepare;
        execsql;
      end;
    //--------------------------------20041101----------------------------   }
    with DataShare_frm.Query6 do //更新表sbdz_rtacct
     begin 
       close;
       sql.Clear ;
       sql.Add('insert into sbdz_rtacct( psseno,psname,iscode,yearno,lyrefd,rtwg,psacpy,acctsave,acpssave,OPCODE,OPDATE,PROCFLG ,PYPSACCT,pyitem,pymount)');
       sql.Add('values ( :param1,:param2,:param3,:param4,:param5,:param6,:param7,:param8,:param9,:param10,:param11,:param12,:param13,:param14,:param15 )');
     end;
   while not DataShare_frm.Query7.Eof do
     with DataShare_frm.Query6 do
       begin
         close;
         parambyname('param1').AsString :=Flatcombobox2.Items[index]; // /*人员内码*/
         parambyname('param2').AsString :=RMD.Fields[0].AsString ; //   /*姓名*/
         parambyname('param3').AsString :=RMD.Fields[1].AsString ; //  /*社会保障号*/
         parambyname('param4').AsInteger :=2003; ///*年份*/
         parambyname('param5').AsString :=formatfloat('0.00',total);  //  /*上年末帐户存储额*/ 2003年未
         parambyname('param6').AsString :=formatfloat('0.00',RMD.Fields[5].AsFloat);// /*原基本养老金::退休时核定的月基本养老金*/
         parambyname('param7').AsString :=formatfloat('0.00',RMD.Fields[4].AsFloat);// /*原个人帐户支出额::退休时核定的月基本养老金中的个人帐户支出额*/
         parambyname('param8').AsString :=formatfloat('0.00',RMD.Fields[3].AsFloat);//  /*个人帐户储存额::退休时个人帐户累计储存额*/
         parambyname('param9').AsString :=formatfloat('0.00',RMD.Fields[2].AsFloat);// /*个人帐户个人部分储存额::退休时个人帐户累计储存额中的个人部分储存额*/
         parambyname('param10').AsString :=main_frm.user.OPNAME ;
         parambyname('param11').AsString :=datetimetostr(now);
         parambyname('param12').AsString :='1'; //待申报
         parambyname('param13').asstring :='0';
         parambyname('param14').AsString :=DataShare_frm.Query7.fieldbyname('pyitem').AsString ;
         parambyname('param15').AsString :=DataShare_frm.Query7.fieldbyname('pymount').AsString ;
         prepare;
         execsql;
         DataShare_frm.Query7.Next ;
     end;
end;

procedure TRetireAccount_frm.FormCreate(Sender: TObject);
var
  i:integer;
begin
  inherited;
  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;}
     for i:=0 to self.ControlCount-1 do
     begin
       controls[i].Width:=longint(controls[i].Width)*longint(screen.width) div screenwidth;
       controls[i].Height:=longint(controls[i].Height)*longint(screen.height) div screenheight;
     end;
   end;
  {with datashare_frm.RetireAccount_Query do
    begin
      close;
      sql.Clear ;
      sql.Add('select psseno,cpseno, iscode,psname from sbdb_rtarch');
      prepare;
      open;
      Flatcombobox1.Items.Clear;  //职工姓名
      Flatcombobox2.Items.Clear ; //人员内码
      Flatcombobox3.Items.Clear ; //企业内码
      Flatcombobox4.Items.Clear ; //职工身份证号
      while not eof do
        begin
          Flatcombobox1.Items.Add(Fieldbyname('psname').AsString) ;
          Flatcombobox2.Items.Add(Fieldbyname('psseno').AsString);
          Flatcombobox3.Items.Add(Fieldbyname('cpseno').AsString);
          Flatcombobox4.Items.Add(Fieldbyname('iscode').AsString);
          next;
        end;
        close;
    end; }
    flatbutton1.Enabled :=false;
    flatbutton2.Enabled :=false;
end;

procedure TRetireAccount_frm.FlatComboBox1Change(Sender: TObject);
begin
  if  (RMD.State=dsedit) or changed then
     if application.MessageBox('数据已改动,是否保存?','恩普软件',mb_iconQuestion+mb_okcancel)=idok then
      try
        DataShare_frm.Dbs.StartTransaction ;
        savedata;
        DataShare_frm.Dbs.Commit ;
      except
        application.MessageBox('数据更新异常!','恩普软件',mb_iconerror+mb_ok);
        DataShare_frm.Dbs.Rollback ;
      end;
  init;
  showdata;
  index:=Flatcombobox1.ItemIndex ;
  flatbutton1.Enabled :=true;
  flatbutton2.Enabled :=true;
  changed:=false;
end;

procedure TRetireAccount_frm.FlatSpeedButton1Click(Sender: TObject);
begin
  if trim(Flatedit1.text)<>'' then
    begin
      if Flatcombobox4.Items.IndexOf(Flatedit1.Text)<0 then
        begin
          application.MessageBox('没有该职工的相关记录,请检查输入是否有误!','恩普软件',mb_iconinformation+mb_ok);
          exit;
        end;
     Flatcombobox1.ItemIndex:=Flatcombobox4.Items.IndexOf(Flatedit1.Text);
     Flatcombobox1.Text :=Flatcombobox1.Items[Flatcombobox4.Items.IndexOf(Flatedit1.Text)];
     Flatcombobox1change(nil);
    end else
    application.messagebox('请正确输入职工的身分证号!','恩普软件',mb_iconinformation+mb_ok);
end;

procedure TRetireAccount_frm.FlatComboBox6Change(Sender: TObject);
begin
 //inherited;
  with datashare_frm.RetireAccount_Query do
    begin
      close;
      sql.Clear ;
      sql.Add('select psseno,cpseno, iscode,psname from sbdb_rtarch where cpseno=:param1 and rtdate>=:param2');
      parambyname('param1').AsString  :=Flatcombobox5.Items[Flatcombobox6.ItemIndex];
      parambyname('param2').AsDate :=strtodate('1998-01-01');
      prepare;
      open;
      Flatcombobox1.Text :='';
      Flatcombobox1.Items.Clear;  //职工姓名
      Flatcombobox2.Items.Clear ; //人员内码
     //Flatcombobox3.Items.Clear ; //企业内码
      Flatcombobox4.Items.Clear ; //职工身份证号
      while not eof do
        begin
          Flatcombobox1.Items.Add(Fieldbyname('psname').AsString) ;
          Flatcombobox2.Items.Add(Fieldbyname('psseno').AsString);
          //Flatcombobox3.Items.Add(Fieldbyname('cpseno').AsString);
          Flatcombobox4.Items.Add(Fieldbyname('iscode').AsString);
          next;
        end;
        close;
    end;
   init; 
   flatbutton1.Enabled :=false;
   flatbutton2.Enabled :=false; 
end;

procedure TRetireAccount_frm.FlatEdit41Change(Sender: TObject);
begin
  changed:=true;
end;

procedure TRetireAccount_frm.FlatButton1Click(Sender: TObject);
begin
  if  (RMD.State=dsedit) or changed then 
      try
        DataShare_frm.Dbs.StartTransaction ;
        savedata;
        DataShare_frm.Dbs.Commit ;
      except
        application.MessageBox('数据更新异常!','恩普软件',mb_iconerror+mb_ok);
        DataShare_frm.Dbs.Rollback ;
      end;
  showdata;
  changed:=false;
end;

procedure TRetireAccount_frm.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  {//-------------------20040823----------------
  if  (RMD.State=dsedit) or changed then
     if application.MessageBox('数据已改动,是否保存?','恩普软件',mb_iconQuestion+mb_okcancel)=idok then
      try
        DataShare_frm.Dbs.StartTransaction ;
        savedata;
        DataShare_frm.Dbs.Commit ;
      except
        application.MessageBox('数据更新异常!','恩普软件',mb_iconerror+mb_ok);
        DataShare_frm.Dbs.Rollback ;
      end;
  //-------------------20040823----------------}
end;

procedure TRetireAccount_frm.FormActivate(Sender: TObject);
var
  i:integer;
begin
  inherited;
  SetWindowLong(Flatedit1.Handle, GWL_STYLE,  GetWindowLong(FlatEdit1.Handle, GWL_STYLE) or ES_NUMBER);
  SetWindowLong(Flatedit41.Handle, GWL_STYLE,  GetWindowLong(FlatEdit41.Handle, GWL_STYLE) or ES_NUMBER);
  SetWindowLong(Flatedit42.Handle, GWL_STYLE,  GetWindowLong(FlatEdit42.Handle, GWL_STYLE) or ES_NUMBER);
  SetWindowLong(Flatedit43.Handle, GWL_STYLE,  GetWindowLong(FlatEdit43.Handle, GWL_STYLE) or ES_NUMBER);
  SetWindowLong(Flatedit44.Handle, GWL_STYLE,  GetWindowLong(FlatEdit44.Handle, GWL_STYLE) or ES_NUMBER);
  SetWindowLong(Flatedit40.Handle, GWL_STYLE,  GetWindowLong(FlatEdit40.Handle, GWL_STYLE) or ES_NUMBER);
  SetWindowLong(Flatedit45.Handle, GWL_STYLE,  GetWindowLong(FlatEdit45.Handle, GWL_STYLE) or ES_NUMBER);
  SetWindowLong(Flatedit46.Handle, GWL_STYLE,  GetWindowLong(FlatEdit46.Handle, GWL_STYLE) or ES_NUMBER);
  init;
  Flatcombobox1.Items.Clear ;
   year:=0;
   mon:=0;
   day:=0;
   index:=-1;
   changed:=false;
  with DataShare_frm.RetireAccount_Query  do
    begin
      close;
      sql.Clear ;
      sql.Add('select cpseno,cpname,industry from sbdb_cparch');
      prepare;
      open;
      Flatcombobox6.Text :='';
      Flatcombobox5.Items.Clear ; //记录单位名称
      FlatCombobox6.Items.Clear ; //记录单位编号
      Flatcombobox3.Items.Clear ;//记录行业号
      while not eof do
        begin
          Flatcombobox6.Items.Add(Fieldbyname('cpname').AsString);
          Flatcombobox5.Items.Add(Fieldbyname('cpseno').AsString);
          flatcombobox3.Items.Add(Fieldbyname('industry').AsString);
          next;
        end;
        close;
    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;
     for i:=0 to self.ControlCount-1 do
     begin
       controls[i].Width:=longint(controls[i].Width)*longint(screen.width) div screenwidth;
       controls[i].Height:=longint(controls[i].Height)*longint(screen.height) div screenheight;
     end;
   end; }
end;

procedure TRetireAccount_frm.FlatButton2Click(Sender: TObject);
begin
  inherited;
  init;
  FlatComboBox1.Items.Clear ;
  FlatComboBox6.ItemIndex :=-1;
  FlatComboBox1.Text :='';
  FlatComboBox6.Text :='';
end;

procedure TRetireAccount_frm.FlatEdit1KeyPress(Sender: TObject;
  var Key: Char);
begin
  inherited;
  if (key=chr(vk_tab)) or (key=chr(vk_return)) then
    FlatSpeedButton1.Click ;
end;

end.

⌨️ 快捷键说明

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