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

📄 localforretireaccount.pas

📁 企业端数据申报系统:单位管理模块 单位查询. 业务申报模块 在线数据下载 在线数据上传 在线业务申核 申报业务查询 磁盘数据导出 磁盘数据导入 在线业务模块 在线业务
💻 PAS
📖 第 1 页 / 共 5 页
字号:
          prepare;
          open;
          i:=round(1000*Fields[0].AsFloat/7413)/1000;
          if i>3 then j:=j+3 else j:=j+i;

          close;
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1997';
          prepare;
          open;
          i:=round(1000*Fields[0].AsFloat/8386)/1000;
          if i>3 then j:=j+3 else j:=j+i;
        end;
      end;
    if  (industry='02') and ((cmcpseno=3000) or (cmcpseno=3002)or (cmcpseno=4101) or(cmcpseno=4204) or (cmcpseno=12108) or (cmcpseno=12205) or(cmcpseno=12305) or (cmcpseno=12406) or (cmcpseno=3101))   then
      begin
        with  DataShare_frm.Query4 do
        begin
          close;
          sql.Clear ;
          sql.Add('select case when months=0 then 0 else isnull((12*ttwage/isnull(months,1)),0) end from sbdu_pswgcase where psseno=:param1 and yearno=:param2');

          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1995';
          prepare;
          open;                    //  3932
          i:=round(1000*Fields[0].AsFloat/5597)/1000;
          if i>2 then j:=2 else j:=i;

          close;
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1996';
          prepare;
          open;                  //     5597
          i:=round(1000*Fields[0].AsFloat/6619)/1000;
          if i>2 then j:=j+2 else j:=j+i;

          close;
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1997';
          prepare;
          open;                 //    6619
          i:=round(1000*Fields[0].AsFloat/7413 )/1000;
          if i>3 then j:=j+3 else j:=j+i;

          close;
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1998';
          prepare;
          open;                      //    7413
          i:=round(1000*Fields[0].AsFloat/8386)/1000;
          if i>3 then j:=j+3 else j:=j+i;
        end;
      end;
    if ((industry='01')  and (trim(Flatcombobox5.Items[Flatcombobox6.Itemindex])='1001')) then
      begin
        with  DataShare_frm.Query4 do
        begin
          close;
          sql.Clear ;
          sql.Add('select case when months=0 then 0 else isnull((12*ttwage/isnull(months,1)),0) end from sbdu_pswgcase where psseno=:param1 and yearno=:param2');

          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1994';
          prepare;
          open;    //5597
          i:=round(1000*Fields[0].AsFloat/3932)/1000;
          if i>2 then j:=2 else j:=i;

          close;
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1995';
          prepare;
          open;     //6619
          i:=round(1000*Fields[0].AsFloat/5597)/1000;
          if i>2 then j:=j+2 else j:=j+i;

          close;
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1996';
          prepare;
          open;  //7413
          i:=round(1000*Fields[0].AsFloat/6619)/1000;
          if i>3 then j:=j+3 else j:=j+i;

          close;
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1997';
          prepare;
          open;  //8386
          i:=round(1000*Fields[0].AsFloat/7413)/1000;
          if i>3 then j:=j+3 else j:=j+i;
        end;
      end;
    if industry='09' then
      begin
        with  DataShare_frm.Query4 do
        begin
          close;
          sql.Clear ;
          sql.Add('select case when months=0 then 0 else isnull((12*ttwage/isnull(months,1)),0) end from sbdu_pswgcase where psseno=:param1 and yearno=:param2');
         { //--------------------20041112-------------------------
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1994';
          prepare;
          open;                //5597  3932
          i:=round(1000*Fields[0].AsFloat/6619 )/1000;
          if i>2 then j:=2 else j:=i;
          //--------------------20041112-------------------------}
          close;
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1995';
          prepare;
          open;    //   7413
          i:=round(1000*Fields[0].AsFloat/5597)/1000;
          if i>2 then j:=j+2 else j:=j+i;

          close;
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1996';
          prepare;
          open;     //    8386
          i:=round(1000*Fields[0].AsFloat/6619)/1000;
          if i>2 then j:=j+2 else j:=j+i;

          close;
          sql.Clear ;
          sql.Add('select case when months>=6 then rewage*6 when months<=0 then 0 else isnull((ttwage/isnull(months,1)),0) end from sbdu_pswgcase where psseno=:param1 and yearno=:param2');
          parambyname('param1').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
          parambyname('param2').AsString :='1997';
          prepare;
          open;    //
          i:=round(1000*Fields[0].AsFloat/7413)/1000;
          if i>3 then j:=j+3 else j:=j+i;
        end;
      end;
    Result:=round(1000*j)/1000;
end;

procedure TLocalForRetireAccount_frm.FormCreate(Sender: TObject);
begin
  inherited;
  {//行业代号
  industry[1]:='10';//邮电
  industry[2]:='12';//铁路
  industry[3]:='02';//金融
  industry[4]:='01';//民航
  industry[5]:='01';//东航
  industry[6]:='05';//石油
  industry[7]:='09';//交通
  industry[8]:='13';//华东院,杭机所
  industry[9]:='06';//电力
  //C年底前缴费年限
  C[1]:=1992;
  c[2]:=1992;
  c[3]:=1993;
  c[4]:=1992;
  c[5]:=1993;
  c[6]:=1992;
  c[7]:=1993;
  c[8]:=1992;
  c[9]:=1992; }
  SetWindowLong(flatedit5.Handle , GWL_STYLE,  GetWindowLong(FlatEdit5.Handle, GWL_STYLE) or ES_NUMBER);
  flatbutton1.Enabled :=false;
  flatbutton2.Enabled :=false;
  flatbutton5.Enabled :=false;
  flatbutton6.Enabled :=false;
  flatbutton7.Enabled :=false;
  flatbutton8.Enabled :=false;
  flatbutton9.Enabled :=false;
  flatbutton10.Enabled :=false;
  FlatButton11.Enabled :=false;
  with DataShare_frm.RetireAccount_Query  do
    begin
      close;
      sql.Clear ;
      sql.Add('select cpseno,cpname,industry,cmcpseno from sbdb_cparch');
      prepare;
      open;
      Flatcombobox5.Items.Clear ; //记录单位名称
      FlatCombobox6.Items.Clear ; //记录单位编号
      Flatcombobox3.Items.Clear ;//记录行业号
      Flatcombobox7.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);
          Flatcombobox7.Items.Add(Fieldbyname('cmcpseno').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;}
   end;
   {flatbutton1.Enabled :=false;
   flatbutton2.Enabled :=false;
   flatbutton6.Enabled :=false;
   flatbutton8.Enabled :=false;
   flatbutton10.Enabled :=false; }
end;

procedure TLocalForRetireAccount_frm.FlatComboBox6Change(Sender: TObject);
begin
  inherited;
  init;
  flatbutton1.Enabled :=false;
  flatbutton2.Enabled :=false;
  flatbutton5.Enabled :=false;
  flatbutton6.Enabled :=false;
  flatbutton7.Enabled :=false;
  flatbutton8.Enabled :=false;
  flatbutton9.Enabled :=false;
  flatbutton10.Enabled :=false;
  if Flatcombobox6.ItemIndex>=0 then FlatButton11.Enabled :=true;
  with DataShare_frm.Query1 do
  begin
    close;
    sql.Clear ;
    sql.Add('select psseno,psname,iscode from sbdb_rtarch where cpseno=:param1 ');
    parambyname('param1').AsString  :=Flatcombobox5.Items[Flatcombobox6.ItemIndex];
    prepare;
    open;
    Flatcombobox1.Text :='';
    Flatcombobox1.Items.Clear;  //职工姓名
    Flatcombobox2.Items.Clear ; //人员内码
    Flatcombobox4.Items.Clear ; //职工身份证号
      while not eof do
        begin
          Flatcombobox1.Items.Add(Fieldbyname('psname').AsString) ;
          Flatcombobox2.Items.Add(Fieldbyname('psseno').AsString);
          Flatcombobox4.Items.Add(Fieldbyname('iscode').AsString);
          next;
      end;
  end;
  industry:=trim(flatcombobox3.Items[flatcombobox6.itemindex]);

  (*if (industry='10') or (industry='12') or (industry='02') or (industry='01')
   or (industry='13') or (industry='06') then
  label7.Caption :='1997年底前缴费年限:' else
   if (industry='05') then
   label7.Caption :='1995年底前缴费年限:'else
   if (industry='09') then
   label7.Caption :='1996.6年底前缴费年限:'; *)
   if (industry='10') or ((industry='12') and (trim(Flatcombobox7.Items[Flatcombobox6.itemindex])<>'4080'))
   or ((industry='01') and (trim(Flatcombobox5.Items[Flatcombobox6.Itemindex])<>'1001'))
   or (industry='05') or (industry='13') or (industry='06') then
     Label7.Caption :='1992'//年底前缴费年限'
   else
  if (industry='02') or (industry='09')
  or ((industry='01') and (trim(Flatcombobox5.Items[Flatcombobox6.Itemindex])='1001'))  then
     Label7.Caption :='1993'//年底前缴费年限'
  else Label7.Caption :='1994';//年底前缴费年限';  //铁劳服

   if (industry='10') or (industry='12') or (industry='02') or (industry='01') or (industry='13') or (industry='06')then
     begin
       label140.Caption :='1997年底平均指数 =';
       label144.Caption :='1997';//年底前累计缴费年限';
     end
   else if (industry='05') then
     begin
       label140.Caption :='1995年底平均指数 =';
       label144.Caption :='1995';//年底前累计缴费年限';
     end
   else
     begin
       label140.Caption :='1996.6年底平均指数 =';
       label144.Caption :='1996.6';//年底前累计缴费年限';
     end;

  if (industry='10') or ((industry='01') and (trim(Flatcombobox5.Items[Flatcombobox6.Itemindex])<>'1001'))
  or ((industry='12') and (trim(Flatcombobox7.Items[Flatcombobox6.itemindex])<>'4080'))
  or (industry='13') or (industry='06') then
   label143.Caption :='93-97'//年实际缴费工资指数 )'
  else
  if (industry='02') or ((industry='01') and (trim(Flatcombobox5.Items[Flatcombobox6.Itemindex])='1001')) then
   label143.Caption :='94-97'//年实际缴费工资指数 )'
  else
  if (industry='09') then label143.Caption :='94-96.6'//年实际缴费工资指数 )'
  else
  if (industry='05') then label143.Caption :='93-95'//年实际缴费工资指数 )'
  else label143.Caption :='95-97';//年实际缴费工资指数 )';//铁劳服
  {with datashare_frm.RetireAccount_Query do
    begin
      close;
      sql.Clear ;                                                                     //and rtdate>=:param2
      sql.Add('select psseno,cpseno, iscode,psname from sbdb_rtarch where cpseno=:param1 ');
      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);
          Flatcombobox4.Items.Add(Fieldbyname('iscode').AsString);
          next;
        end;
        close;
    end; }
  flatbutton1.Enabled :=false;
  flatbutton2.Enabled :=false;
  flatbutton6.Enabled :=false;
  flatbutton8.Enabled :=false;
  flatbutton10.Enabled :=false; 
end;

procedure TLocalForRetireAccount_frm.FlatComboBox1Change(Sender: TObject);
var
  i:double;
begin
  inherited;
    init;
   
    flatbutton1.Enabled :=true;
    //flatbutton2.Enabled :=true;
    flatbutton5.Enabled :=true;
    //flatbutton6.Enabled :=true;
    flatbutton7.Enabled :=true;
    //flatbutton8.Enabled :=true;
    flatbutton9.Enabled :=true;
    //flatbutton10.Enabled :=true;

    with Datashare_frm.Query1 do
    begin
      close;
      sql.Clear ;
      sql.Add('select psseno,psname,sex,NATIONAL,BDATE ,ISCODE,LXDH,ADDRESS,IDENTITY,WKDATE ,WKATTR, ');
      sql.add('HOUSEHOLD,STATUS,PYYEARS,RTDATE,zip,AGCARDNO,ACCTNO,MADDR,RTWG ,PSACPY,ACCTSAVE,ACPSSAVE,Accountfor2003');
      sql.Add(',stjf,sjjf,tdzs  from sbdb_rtarch  ') ;
      sql.add(' where psseno=:param');
      parambyname('param').AsString :=Flatcombobox2.Items[Flatcombobox1.itemindex];
      prepare;
      open;

      if recordcount>0 then
        begin

          Flatedit2.Text :=Fieldbyname('psseno').AsString ;
          Flatedit3.Text :=Fieldbyname('psname').AsString ;

          if Fieldbyname('sex').AsInteger=0 then Flatedit4.Text :='女'  else Flatedit4.Text :='男';

          Flatedit6.Text :=Fieldbyname('NATIONAL').AsString ;
          Flatedit7.Text :=Fieldbyname('BDATE').AsString ;
          Flatedit11.Text :=Fieldbyname('ISCODE').AsString 

⌨️ 快捷键说明

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