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

📄 inessiscontinue.pas

📁 企业端数据申报系统:单位管理模块 单位查询. 业务申报模块 在线数据下载 在线数据上传 在线业务申核 申报业务查询 磁盘数据导出 磁盘数据导入 在线业务模块 在线业务
💻 PAS
📖 第 1 页 / 共 2 页
字号:
    end;
  if not trystrtoint(flatedit17.Text,j) then
    begin
      application.MessageBox('输入的转入当年转入前缴费总月数非法!','恩普软件',mb_iconerror+mb_ok);
      flatedit17.SetFocus ;
      result:=false;
      exit;
    end;
  if (dateedit1.Date=0) then
    begin
      application.MessageBox('输入的出生日期非法!','恩普软件',mb_iconerror+mb_ok);
      dateedit1.SetFocus ;
      result:=false;
      exit;
    end;
  if (dateedit2.Date=0) then
    begin
      application.MessageBox('输入的参加工作时间非法!','恩普软件',mb_iconerror+mb_ok);
      dateedit2.SetFocus ;
      result:=false;
      exit;
    end;
  if (dateedit3.Date=0) then
    begin
      application.MessageBox('输入的首次参保时间非法!','恩普软件',mb_iconerror+mb_ok);
      dateedit3.SetFocus ;
      result:=false;
      exit;
    end;
  if (dateedit4.Date=0) then
    begin
      application.MessageBox('输入的转入时间非法!','恩普软件',mb_iconerror+mb_ok);
      dateedit4.SetFocus ;
      result:=false;
      exit;
    end;
  if flatcombobox1.ItemIndex<0 then
    begin
      application.MessageBox('输入的性别非法!','恩普软件',mb_iconerror+mb_ok);
      flatcombobox1.SetFocus ;
      result:=false;
      exit;
    end;
  if flatcombobox2.ItemIndex<0 then
    begin
      application.MessageBox('输入的个人身份非法!','恩普软件',mb_iconerror+mb_ok);
      flatcombobox2.SetFocus ;
      result:=false;
      exit;
    end;
  if flatcombobox3.ItemIndex<0 then
    begin
      application.MessageBox('输入的用工形式非法!','恩普软件',mb_iconerror+mb_ok);
      flatcombobox3.SetFocus ;
      result:=false;
      exit;
    end;
  if flatcombobox4.ItemIndex<0 then
    begin
      application.MessageBox('输入的参保状态非法!','恩普软件',mb_iconerror+mb_ok);
      flatcombobox4.SetFocus ;
      result:=false;
      exit;
    end;
  if flatcombobox5.ItemIndex<0 then
    begin
      application.MessageBox('输入的户籍关系非法!','恩普软件',mb_iconerror+mb_ok);
      flatcombobox5.SetFocus ;
      result:=false;
      exit;
    end;
  j:=strtoint(flatedit17.Text);
  if (j>12) or (j<0) then
    begin
      application.MessageBox('输入的转入当年转入前缴费总月数非法!','恩普软件',mb_iconerror+mb_ok);
      Flatedit17.SetFocus  ;
      result:=false;
      exit;
    end;

  if abs(strtofloat(flatedit9.Text)-strtofloat(flatedit10.Text)-strtofloat(flatedit11.Text))>0.01 then
   begin
      application.MessageBox('输入的调整金额<>个人部分+单位部分!','恩普软件',mb_iconerror+mb_ok);
      Flatedit9.SetFocus  ;
      result:=false;
      exit;
    end;
 if abs(strtofloat(flatedit12.Text)-strtofloat(flatedit13.Text)-strtofloat(flatedit14.Text))>0.01 then
   begin
      application.MessageBox('输入的转入上年末累计储存额<>个人部分+单位部分!','恩普软件',mb_iconerror+mb_ok);
      Flatedit12.SetFocus  ;
      result:=false;
      exit;
    end;
  RMD.First ;
  list:=Tstringlist.Create ;
  while not RMD.Eof do
    begin
      if (list.IndexOf(trim(RMD.FieldByName('yearno').AsString))>=0) then
        begin
          application.MessageBox('没有输入重复的年份!','恩普软件',mb_iconerror+mb_ok);
          list.Free ;
          Result:=false;
          exit;
        end;
      list.Add(trim(RMD.FieldByName('yearno').AsString));
      if RMD.FieldByName('cymonths').IsNull then
        begin
          application.MessageBox('没有输入相应的缴费总月数!','恩普软件',mb_iconerror+mb_ok);
          Result:=false;list.Free ;
          exit;
        end;
      if RMD.FieldByName('cpsum').IsNull then
        begin
          application.MessageBox('没有输入相应的缴费总额!','恩普软件',mb_iconerror+mb_ok);
          Result:=false;list.Free ;
          exit;
        end;
      if RMD.FieldByName('yearno').IsNull then
        begin
          application.MessageBox('没有输入相应的年份!','恩普软件',mb_iconerror+mb_ok);
          Result:=false;list.Free ;
          exit;
        end;
      if (RMD.FieldByName('cymonths').AsInteger>12) or (RMD.FieldByName('cymonths').AsInteger<0 ) then
        begin
          application.MessageBox('输入的缴费总月数非法!','恩普软件',mb_iconerror+mb_ok);
          Result:=false; list.Free ;
          exit;
        end;
      RMD.next;
    end;
    list.Free ;
end;

procedure TInEssisContinue_frm.Save_sbdu_pswgcase ;
begin
   with DataShare_frm.Query4 do
   begin
     close;
     sql.Clear ;                                     //iscode,psname,
     sql.Add('insert into sbdu_pswgcase(cpseno,psseno,yearno,ttwage,months,rewage,opdate,opcode) values(' );
     sql.Add(':p1,:p2,:p5,:p6,:p7,:p8,:p9,:p10)');
                     //:p3,:p4,
     RMD.First ;
     while not RMD.Eof do
       begin
         parambyname('p1').AsString :=Flatcombobox7.Items[Flatcombobox6.itemindex];
         parambyname('p2').AsString :=Flatedit1.Text ;
        // parambyname('p3').AsString :=flatedit3.Text ;
        // parambyname('p4').AsString :=flatedit2.Text ;
         parambyname('p5').AsString :=RMD.fieldbyname('yearno').AsString ;
         parambyname('p6').AsString :=formatfloat('0.00',RMD.fieldbyname('cpsum').AsFloat);
         parambyname('p7').asstring :=RMD.FieldByName('cymonths').asstring;
         if RMD.FieldByName('cymonths').AsInteger=0 then
            parambyname('p8').AsInteger:=0 else
            parambyname('p8').AsString:=formatfloat('0.00',RMD.fieldbyname('cpsum').AsFloat/RMD.fieldbyname('cymonths').AsInteger);
         parambyname('p9').AsString:=datetimetostr(now);
         parambyname('p10').AsString:=main_frm.user.OPNAME;
         prepare;
         execsql;
         RMD.Next ;
       end;
   end;

   with DataShare_frm.Query5 do
     begin
     close;
     sql.Clear ;                         //cpseno,
     sql.Add('insert into sbdz_pswgcase(psseno,iscode,psname,yearno,ttwage,months,rewage,opdate,opcode,PROCFLG,upflag) values(' );
     sql.Add(':p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,:p10,:p11,:p12)');
              //:p1,
     RMD.First ;
     while not RMD.Eof do
       begin
        // parambyname('p1').AsString :=Flatcombobox7.Items[Flatcombobox6.itemindex];
         parambyname('p2').AsString :=Flatedit1.Text ;
         parambyname('p3').AsString :=flatedit3.Text ;
         parambyname('p4').AsString :=flatedit2.Text ;
         parambyname('p5').AsString :=RMD.fieldbyname('yearno').AsString ;
         parambyname('p6').AsString :=formatfloat('0.00',RMD.fieldbyname('cpsum').AsFloat);
         parambyname('p7').asstring :=RMD.FieldByName('cymonths').asstring;
         if RMD.FieldByName('cymonths').AsInteger=0 then
            parambyname('p8').AsInteger:=0 else
            parambyname('p8').AsString:=formatfloat('0.00',RMD.fieldbyname('cpsum').AsFloat/RMD.fieldbyname('cymonths').AsInteger);
         parambyname('p9').AsString:=datetimetostr(now);
         parambyname('p10').AsString:=main_frm.user.OPNAME;
         parambyname('p11').AsString :='1'; //审核标志 1待审报,2已申报 4 申报通过 6不通过
         parambyname('p12').AsString :='1';//  /*上传标志,1个人帐户数据整理,2固定职工和合同制职工缴费后建帐前数据,3原异地转入人员数据未处理,4原异地转入人员数据已处理*/
         prepare;
         execsql;
         RMD.Next ;
       end;
     end;
end;

procedure TInEssisContinue_frm.Save_sbdz_InEsiis;
begin
  with DataShare_frm.Query6 do
    begin
      close;
      sql.Clear ;
      sql.Add('insert into sbdz_InEsiis(psseno,cpseno,iscode,psname,sex,bdate,household,wkattr,');
      sql.Add('identity,wkdate,joindate,status,notes,address,tel,zip,');
      sql.Add('indate,tot,cymonths,ly,lyps,lycp,t2tot,t2ps,t2cp,lyrewage,rewage,');
      sql.Add('opcode,opdate,procflg,upflag)');
      sql.Add('  values(:p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,:p10,:p11,:p12,:p13,:p14,:p15,:p16,');
      sql.Add(':p17,:p18,:p19,:p20,:p21,:p22,:p23,:p24,:p25,:p26,:p27,');
      sql.Add(':p28,:p29,:p30,:p31)');

      parambyname('p1').AsString :=flatedit1.Text ;
      parambyname('p2').AsString :=flatcombobox7.Items[flatcombobox6.itemindex];
      parambyname('p3').AsString :=flatedit3.Text ;
      parambyname('p4').AsString :=flatedit4.Text ;
      parambyname('p5').AsInteger :=flatcombobox1.itemindex;
      parambyname('p6').AsDateTime :=dateedit1.Date ;
      parambyname('p7').AsInteger  :=flatcombobox5.ItemIndex ;
      parambyname('p8').AsInteger :=flatcombobox3.ItemIndex ;
      parambyname('p9').AsInteger :=flatcombobox1.ItemIndex ;
      parambyname('p10').AsDateTime :=dateedit2.Date ;
      parambyname('p11').AsDateTime :=dateedit3.Date ;
      parambyname('p12').AsInteger :=flatcombobox4.ItemIndex ;
      parambyname('p13').AsString :=flatedit7.Text ;
      parambyname('p14').AsString :=flatedit5.Text ;
      parambyname('p15').AsString :=trim(flatedit4.Text );
      parambyname('p16').AsString :=trim(flatedit6.Text );

      parambyname('p17').AsDateTime :=dateedit4.Date ;
      parambyname('p18').AsString :=formatfloat('0.00',strtofloat(flatedit8.Text));
      parambyname('p19').AsInteger:=strtoint(flatedit17.Text);
      parambyname('p20').AsString :=formatfloat('0.00',strtofloat(flatedit12.Text));
      parambyname('p21').AsString :=formatfloat('0.00',strtofloat(flatedit13.text));
      parambyname('p22').AsString :=formatfloat('0.00',strtofloat(flatedit14.Text));
      parambyname('p23').AsString :=formatfloat('0.00',strtofloat(flatedit9.Text));
      parambyname('p24').AsString :=formatfloat('0.00',strtofloat(flatedit10.Text));
      parambyname('p25').AsString :=formatfloat('0.00',strtofloat(flatedit11.Text));
      parambyname('p26').AsString :=formatfloat('0.00',strtofloat(flatedit16.Text));
      parambyname('p27').AsString :=formatfloat('0.00',strtofloat(flatedit15.Text));

      parambyname('p28').AsString :=main_frm.user.OPNAME;
      parambyname('p29').AsDateTime :=now;
      parambyname('p30').AsString :='1';//审核标志 1待审报,2已申报 4 申报通过 6不通过
      parambyname('p31').AsString :='4';  //  /*上传标志,1个人帐户数据整理,2固定职工和合同制职工缴费后建帐前数据,3原异地转入人员数据未处理,4原异地转入人员数据已处理*/
      prepare;
      execsql;
    end;
{psseno,cpseno,iscode,psname,sex,bdate,household,wkattr,
identify,wkdate,joindate,status,notes,address,tel,zip,
indate,tot,cymonths,ly,lyps,lycp,t2tot,t2ps,t2cp,lyrewage,

opcode,opdate,procflg,ckcode,ckdate,notpassnotes}
end;

procedure TInEssisContinue_frm.FormCreate(Sender: TObject);
begin
  inherited;
  with DataShare_frm.Query1 do
    begin
      close;
      sql.Clear ;
      sql.Add('select cpseno,cpname from sbdb_cparch');
      prepare;
      open;
      Flatcombobox6.Items.Clear ;
      Flatcombobox7.Items.Clear ;
      while not eof do
        begin
          Flatcombobox6.Items.Add(Fields[1].asstring);
          Flatcombobox7.Items.Add(Fields[0].asstring);
          next;  
        end;
    end;
  init;
  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 TInEssisContinue_frm.FlatButton2Click(Sender: TObject);
begin
  inherited;
  init;
end;

procedure TInEssisContinue_frm.DBGrid1KeyPress(Sender: TObject;
  var Key: Char);
begin
  inherited;
   if key=chr(vk_return) then RMD.Append ;
end;

procedure TInEssisContinue_frm.RMDNewRecord(DataSet: TDataSet);
begin
  inherited;
  RMD.FieldByName('psseno').AsString :=flatedit1.Text ;
  RMD.FieldByName('iscode').AsString :=flatedit3.Text ;
  RMD.FieldByName('psname').AsString :=Flatedit2.Text ;
end;

procedure TInEssisContinue_frm.FlatButton1Click(Sender: TObject);
begin
  inherited;
  screen.Cursor :=crhourglass;
  if validate_data then
  begin
  try
    msg:=fecho.getNewPsseno ;
    if msg.msgCode<>1 then
      begin
        screen.Cursor :=crdefault;
        application.MessageBox(pchar(string(msg.msgText)),'恩普软件',mb_iconerror+mb_ok);
        exit;
      end;
  except
    screen.Cursor :=crdefault;
    application.MessageBox('网络连接异常!','恩普软件',mb_iconerror+mb_ok);
    exit;
  end;
  try
    flatedit1.Text :=msg.msgText ;
    DataShare_frm.Dbs.StartTransaction ;
    saveinfo;
    Save_sbdz_InEsiis;
    if RMD.Active then  Save_sbdu_pswgcase;
    DataShare_frm.Dbs.Commit ;
  except
    DataShare_frm.Dbs.Rollback ;
    screen.cursor:=crdefault;
    application.MessageBox('保存数据出现异常!','恩普软件',mb_iconerror+mb_ok);
    exit;
  end;
 init;
 end;
 screen.Cursor :=crdefault; 
end;

procedure TInEssisContinue_frm.FlatButton5Click(Sender: TObject);
begin
  inherited;
  init;
  FlatEdit2.SetFocus ;
end;

end.

⌨️ 快捷键说明

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