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

📄 breakinfo.~pas

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

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, BASEWIN, TFlatButtonUnit, ComCtrls, XPMenu, Menus, ActnList,
  ImgList, ToolWin, ExtCtrls, StdCtrls, TFlatEditUnit, TFlatCheckBoxUnit,
  Grids, DBGrids, TFlatSpeedButtonUnit, TFlatPanelUnit, TFlatGroupBoxUnit,typinfo,
  TFlatComboBoxUnit, Mask, ToolEdit, DB, RxMemDS;
const screenwidth=1024;
const screenheight=768;
type
  TBreakInfo_frm = class(Tbasewin_frm)
    Panel2: TPanel;
    Panel3: TPanel;
    FlatButton1: TFlatButton;
    GroupBox2: TGroupBox;
    Panel4: TPanel;
    Label32: TLabel;
    Label31: TLabel;
    FlatSpeedButton1: TFlatSpeedButton;
    FlatEdit: TFlatEdit;
    FlatComboBox4: TFlatComboBox;
    FlatComboBox2: TFlatComboBox;
    FlatComboBox1: TFlatComboBox;
    Label1: TLabel;
    FlatComboBox5: TFlatComboBox;
    FlatComboBox3: TFlatComboBox;
    FlatGroupBox1: TFlatGroupBox;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label9: TLabel;
    Label13: TLabel;
    Label17: TLabel;
    Label19: TLabel;
    Label20: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    FlatEdit1: TFlatEdit;
    FlatEdit2: TFlatEdit;
    FlatEdit4: TFlatEdit;
    FlatEdit9: TFlatEdit;
    FlatComboBox6: TFlatComboBox;
    FlatComboBox9: TFlatComboBox;
    Label11: TLabel;
    FlatEdit6: TFlatEdit;
    Label5: TLabel;
    Label12: TLabel;
    FlatEdit5: TFlatEdit;
    Label14: TLabel;
    FlatEdit7: TFlatEdit;
    FlatComboBox7: TFlatComboBox;
    DateEdit2: TDateEdit;
    DateEdit3: TDateEdit;
    FlatComboBox8: TFlatComboBox;
    FlatComboBox10: TFlatComboBox;
    DateEdit1: TDateEdit;
    RMD0: TRxMemoryData;
    RMD0iscode: TStringField;
    RMD0psname: TStringField;
    RMD0psseno: TIntegerField;
    RMD0yearno: TIntegerField;
    RMD0cpsum: TFloatField;
    RMD0cymonths: TIntegerField;
    RMD0cypj: TFloatField;
    RMD0cyints: TFloatField;
    RMD0lysum: TFloatField;
    RMD0lyints: TFloatField;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    RMD00: TRxMemoryData;
    RMD00iscode: TStringField;
    RMD00psname: TStringField;
    RMD00psseno: TIntegerField;
    RMD00yearno: TIntegerField;
    RMD00cpsum: TFloatField;
    RMD00cymonths: TIntegerField;
    RMD00cypj: TFloatField;
    RMD00cyints: TFloatField;
    RMD00lysum: TFloatField;
    RMD00lyints: TFloatField;
    RMD00cyActual: TFloatField;
    RMD00cyrely: TFloatField;
    RMD00cycpints: TFloatField;
    RMD00cypsints: TFloatField;
    RMD00lycpints: TFloatField;
    RMD00lypsints: TFloatField;
    RMD00lycpprin: TFloatField;
    RMD00lypsprin: TFloatField;
    RMD00cyftcpfd: TFloatField;
    RMD00cypsarac: TFloatField;
    RMD00cyrelycpfd: TFloatField;
    RMD00cyrelypsfd: TFloatField;
    RMD00siinter: TFloatField;
    RMD00lycycpints: TFloatField;
    RMD00lycypsints: TFloatField;
    RMD: TRxMemoryData;
    RMDiscode: TStringField;
    RMDpsname: TStringField;
    RMDpsseno: TIntegerField;
    RMDyearno: TIntegerField;
    RMDcpsum: TFloatField;
    RMDcymonths: TIntegerField;
    RMDcypj: TFloatField;
    FlatComboBox11: TFlatComboBox;
    FlatButton5: TFlatButton;
    FlatButton6: TFlatButton;
    FlatButton2: TFlatButton;
    FlatButton7: TFlatButton;
    Add_Record: TRxMemoryData;
    StringField1: TStringField;
    StringField2: TStringField;
    IntegerField1: TIntegerField;
    IntegerField2: TIntegerField;
    FloatField1: TFloatField;
    IntegerField3: TIntegerField;
    FloatField2: TFloatField;
    Del_Record: TFlatComboBox;
    FlatEdit3: TFlatEdit;
    Label15: TLabel;
    FlatEdit8: TFlatEdit;
    FlatEdit10: TFlatEdit;
    FlatEdit11: TFlatEdit;
    FlatEdit12: TFlatEdit;
    FlatEdit13: TFlatEdit;
    RMDnextyearjs: TFloatField;
    RMDindustry: TIntegerField;
    procedure FlatComboBox3Change(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FlatComboBox1Change(Sender: TObject);
    procedure FlatSpeedButton1Click(Sender: TObject);
    procedure FlatButton1Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FlatEdit1Change(Sender: TObject);
    procedure DBGrid1KeyPress(Sender: TObject; var Key: Char);
    procedure DBGrid1CellClick(Column: TColumn);
    procedure FlatButton6Click(Sender: TObject);
    procedure FlatButton5Click(Sender: TObject);
    procedure FlatButton2Click(Sender: TObject);
    procedure FlatButton7Click(Sender: TObject);
    procedure FlatEditKeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
    index:integer;     //记录flatcombobox1.itemindex
    ndx:integer;      //记录flatcombobox3.itemindex
    changed:  boolean;
    Add_Delete:boolean;    //增加删除操作
    RMD_Record_Count:integer;//记录RMD里的记录数量
    procedure ShowData; //显示数据
    procedure SaveV1;  //建帐前中断人员数据保存
    procedure SaveV3;  //建帐后中断人员数据保存    savev2-->sava3计算不正确,
    procedure SaveV2;
    function whetherChanged:boolean;//判断建帐中断人员数据信息是否改变
    function whetherChangedV1:boolean;//建帐后挂帐人员则还要修改下面信息.
    procedure init; //清空控件内容
  public
    { Public declarations }
  end;

var
  BreakInfo_frm: TBreakInfo_frm;

implementation

uses datashare, sbp_psagacct_all, Main,  ChectCount, AddRecord;

{$R *.dfm}
procedure TBreakInfo_frm.SaveV2 ;
var
lypsprin,lypsints,cypsints,lycypsints,cypsarac:double;//个人部分
lycpprin,lycpints,cycpints,lycycpints,cyftcpfd:double;//企业部分
interest:double;
datetimestr:string;
i:integer;
begin
  //------------------20040610---------------------------------月份取值1-12
    //yearno:=RMD.fieldbyname('yearno').AsInteger;
    RMD.First ;
    while not RMD.Eof do
      begin
        if (RMD.FieldByName('cymonths').AsInteger<0) or (RMD.FieldByName('cymonths').AsInteger>13) then
         begin
           application.MessageBox('本年缴费总月数的值只能在0-12之间!','恩普软件',mb_iconerror+mb_ok);
           exit;
         end;
        if (RMD.FieldByName('yearno').AsInteger=1994) and (RMD.FieldByName('nextyearjs').AsFloat>983) then
          begin
           application.MessageBox('1994年的月缴费基数不能超过983元!','恩普软件',mb_iconerror+mb_ok);
           exit;
         end;
       if (RMD.FieldByName('yearno').AsInteger=1995) and (RMD.FieldByName('nextyearjs').AsFloat>1400) then
          begin
           application.MessageBox('1995年的月缴费基数不能超过1440元!','恩普软件',mb_iconerror+mb_ok);
           exit;
         end;
       if (RMD.FieldByName('yearno').AsInteger=1996) and (RMD.FieldByName('nextyearjs').AsFloat>1655) then
          begin
           application.MessageBox('1996年的月缴费基数不能超过1655元!','恩普软件',mb_iconerror+mb_ok);
           exit;
         end;
       if (RMD.FieldByName('yearno').AsInteger=1997) and (RMD.FieldByName('nextyearjs').AsFloat>1854) then
          begin
           application.MessageBox('1997年的月缴费基数不能超过1854元!','恩普软件',mb_iconerror+mb_ok);
           exit;
         end;
       if (RMD.FieldByName('yearno').AsInteger=1998) and (RMD.FieldByName('nextyearjs').AsFloat>2097) then
          begin
           application.MessageBox('1998年的月缴费基数不能超过2097元!','恩普软件',mb_iconerror+mb_ok);
           exit;
         end;
         RMD.Next ;
      end;
//------------------------20040803----------------------------------
  if Del_Record.Items.Count>0 then
  begin
   try
    DataShare_frm.Dbs.StartTransaction ;     //这段代码出现三个事务,前面两个以后来加的,客户需求变化实在大,代码写的实在差.
    with DataShare_frm.Query9 do
      begin
        close;
        sql.Clear ;
        sql.Add('delete from sbdu_pswgcase where psseno=:param1 and yearno=:param2');

        for i:=0 to Del_Record.Items.Count-1 do
        begin
          close;
          parambyname('param1').AsString :=FlatCombobox2.Items[index];
          parambyname('param2').AsString :=Del_Record.Items[i];
          prepare;
          execsql;
        end;
      end;
     DataShare_frm.Dbs.Commit ;
    except
      DataShare_frm.Dbs.Rollback ;
      application.MessageBox('删除记录出现异常!','恩普软件',mb_iconerror+mb_ok);
      exit;
    end;
  end;

  if Add_Record.RecordCount>0 then
  begin
   try
    DataShare_frm.Dbs.StartTransaction ;
    Add_Record.First ;
    while not Add_Record.Eof do
    begin
    with DataShare_frm.Query9 do
          begin
            close;
            sql.Clear ;
            sql.Add('insert into sbdu_pswgcase(cpseno,psseno,yearno,ttwage,months,rewage,opdate,opcode)');
            sql.Add('values(:param1,:param2,:param3,:param4,:param5,:param6,:param7,:param8)');
            parambyname('param1').AsString:=Flatcombobox5.Items[ndx];

⌨️ 快捷键说明

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