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

📄 fcase.pas

📁 仲裁委仲裁案件计酬程序.有基础资料设置、分级设置
💻 PAS
📖 第 1 页 / 共 2 页
字号:
unit FCase;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, ADODB, ImgList, ActnList, ComCtrls, ToolWin, StdCtrls,
  DBCtrlsEh, Mask, ExtCtrls, DBGridEh, DBCtrls, DBLookupEh, Menus,Ime,
  cxPC, cxControls;

type
  TCaseFrm = class(TForm)
    pnlClient: TPanel;
    StateLab: TStaticText;
    CoolBar1: TCoolBar;
    ToolBar1: TToolBar;
    ToolButton1: TToolButton;
    ToolButton5: TToolButton;
    ToolButton4: TToolButton;
    ToolButton2: TToolButton;
    TBCheck: TToolButton;
    TBFinish: TToolButton;
    ToolButton9: TToolButton;
    ToolButton7: TToolButton;
    ToolButton8: TToolButton;
    ActList: TActionList;
    BNew: TAction;
    BCal: TAction;
    BSave: TAction;
    BCheck: TAction;
    BCheckData: TAction;
    BQuit: TAction;
    BJudges: TAction;
    BFinish: TAction;
    ImageList: TImageList;
    BillHead: TADOQuery;
    _BillHead: TDataSource;
    _People: TDataSource;
    People: TADOQuery;
    Status: TADOQuery;
    _Status: TDataSource;
    GetBrandList: TADOQuery;
    GetRate: TADOQuery;
    Judge: TADOQuery;
    _Judge: TDataSource;
    BSecrotory: TAction;
    ToolButton3: TToolButton;
    GetTaxRate: TADOQuery;
    BFirst: TAction;
    BPre: TAction;
    BNext: TAction;
    BLast: TAction;
    BtnList: TToolBar;
    ToolButton6: TToolButton;
    ToolButton10: TToolButton;
    ToolButton11: TToolButton;
    ToolButton12: TToolButton;
    ToolButton13: TToolButton;
    CharacterPages: TcxPageControl;
    Page_0: TcxTabSheet;
    BillForm: TPanel;
    Label2: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label3: TLabel;
    Label14: TLabel;
    Label17: TLabel;
    Label15: TLabel;
    Shape1: TShape;
    Shape2: TShape;
    Shape3: TShape;
    Shape4: TShape;
    Shape5: TShape;
    Shape6: TShape;
    Shape7: TShape;
    Shape8: TShape;
    Shape9: TShape;
    Shape10: TShape;
    Shape11: TShape;
    Shape12: TShape;
    Shape13: TShape;
    Shape17: TShape;
    Label18: TLabel;
    Label13: TLabel;
    EBillDate: TDBDateTimeEditEh;
    EPeopleB: TDBEditEh;
    EAmountD: TDBNumberEditEh;
    EPeopleA: TDBEditEh;
    EAmountA: TDBNumberEditEh;
    EAmountC: TDBNumberEditEh;
    EAmountB: TDBNumberEditEh;
    EJudgeA: TDBLookupComboboxEh;
    EJudgeB: TDBLookupComboboxEh;
    ECaled: TDBCheckBox;
    ESecretory: TDBLookupComboboxEh;
    EStatus: TDBLookupComboboxEh;
    ESecretoryAmount: TDBNumberEditEh;
    EBillNo: TDBEditEh;
    EJudgeC: TDBLookupComboboxEh;
    EMethod: TDBComboBox;
    Page_1: TcxTabSheet;
    Shape14: TShape;
    EJudgeAAmount: TDBNumberEditEh;
    Label1: TLabel;
    EJudgeBAmount: TDBNumberEditEh;
    Shape15: TShape;
    Label6: TLabel;
    Label16: TLabel;
    EJudgeCAmount: TDBNumberEditEh;
    Shape16: TShape;
    Shape18: TShape;
    EAmountAllA: TDBNumberEditEh;
    Label19: TLabel;
    Label20: TLabel;
    EAmountAllB: TDBNumberEditEh;
    Shape19: TShape;
    Label21: TLabel;
    EAmountAllC: TDBNumberEditEh;
    Shape20: TShape;
    Shape21: TShape;
    ETaxA: TDBNumberEditEh;
    Label22: TLabel;
    ETaxB: TDBNumberEditEh;
    Shape24: TShape;
    Label25: TLabel;
    Label23: TLabel;
    ETaxC: TDBNumberEditEh;
    Shape22: TShape;
    Shape23: TShape;
    ETaxD: TDBNumberEditEh;
    Label24: TLabel;
    Shape25: TShape;
    EReceiveA: TDBNumberEditEh;
    Label26: TLabel;
    Shape26: TShape;
    EReceiveB: TDBNumberEditEh;
    Label27: TLabel;
    Shape27: TShape;
    EReceiveC: TDBNumberEditEh;
    Label28: TLabel;
    Shape28: TShape;
    EReceiveD: TDBNumberEditEh;
    Label29: TLabel;
    Shape29: TShape;
    Shape30: TShape;
    Shape31: TShape;
    DBLookupComboboxEh1: TDBLookupComboboxEh;
    Label30: TLabel;
    Label31: TLabel;
    DBLookupComboboxEh2: TDBLookupComboboxEh;
    Label32: TLabel;
    DBLookupComboboxEh3: TDBLookupComboboxEh;
    GetPayRate: TADOQuery;
    DBNumberEditEh1: TDBNumberEditEh;
    DBNumberEditEh2: TDBNumberEditEh;
    DBNumberEditEh3: TDBNumberEditEh;
    DBNumberEditEh4: TDBNumberEditEh;
    DBNumberEditEh5: TDBNumberEditEh;
    DBNumberEditEh6: TDBNumberEditEh;
    procedure BQuitExecute(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure BNewExecute(Sender: TObject);
    procedure EJudgeAEnter(Sender: TObject);
    procedure EJudgeAExit(Sender: TObject);
    procedure EBillDateExit(Sender: TObject);
    procedure EStatusEnter(Sender: TObject);
    procedure EStatusExit(Sender: TObject);
    procedure EBillDateEnter(Sender: TObject);
    procedure BSaveExecute(Sender: TObject);
    procedure BJudgesExecute(Sender: TObject);
    procedure BCalExecute(Sender: TObject);
    procedure BSecrotoryExecute(Sender: TObject);
    procedure EAmountCChange(Sender: TObject);
    procedure EBillNoKeyPress(Sender: TObject; var Key: Char);
    procedure EPeopleAEnter(Sender: TObject);
    procedure EPeopleBEnter(Sender: TObject);
    procedure BNextExecute(Sender: TObject);
    procedure BPreExecute(Sender: TObject);
    procedure BFirstExecute(Sender: TObject);
    procedure BLastExecute(Sender: TObject);
  private
  FInterID:Integer;
  Function CheckCurrentData: Boolean;
  Function SaveBill:Boolean;
  Procedure CalAmount;
 Procedure GetBill(FInterID:Integer);
    { Private declarations }
  public
  Constructor Create(AOwner:TComponent;BillID:Integer);Reintroduce;

    { Public declarations }
  end;

var
  CaseFrm: TCaseFrm;

implementation


{$R *.dfm}
Uses Link,Judge,EMP,CaseList;
//检验当前行数据是否完整
Type
TReturnValue=record
        FromAmount:Double;
        EndAmount:Double;

        FEntryID:Integer;
        end;
Function TCaseFrm.CheckCurrentData: Boolean;
begin
    with BillHead do
        Result :=
                (Not VarisNull(FieldByName('案号').Value))
            and (Not VarisNull(FieldByName('申请人').Value))
            and (Not VarisNull(FieldByName('被申请人').Value))
            and (Not VarisNull(FieldByName('标的').Value))
            and (Not VarisNull(FieldByName('反请求标的').Value))
            and (Not VarisNull(FieldByName('仲裁受理费').Value))
            and (Not VarisNull(FieldByName('反请求受理费').Value))
            and
(
(
(Not VarisNull(FieldByName('首席仲裁员').Value)) And
(VarisNull(FieldByName('仲裁员一').Value)) And (VarisNull(FieldByName('仲裁员二').Value))

)
OR
(
(Not VarisNull(FieldByName('首席仲裁员').Value)) And
(Not VarisNull(FieldByName('仲裁员一').Value)) And (Not VarisNull(FieldByName('仲裁员二').Value))
)
)


end;
Procedure TCaseFrm.CalAmount;
Var Amount:Double; //受理费总额:受理费+反请求受理费
LowAmount:Double;//当前挡的起始金额
CalType:Integer; //计算类型
JudgeCounts:Integer;//仲裁员人数
Rate:Double;//比例
Limits:Double;//速加数
Amount0,Amount1,Amount2,Amount3:Double ; //总报酬,首席,第二,秘书处
Rate1,Rate2,Rate3:Double;
TaxRate1,TaxRate2,TaxRate3:Double;
PayRate1,PayRate2:Double;// 支付比例
AllAmount1,AllAmount2,AllAmount3:Double ; //首席,第二计税总额
Tax1,Tax2,Tax3,Tax4,Tax11,Tax22,Tax33:Double;//应缴税额
ActAmount1,ActAmount2,ActAmount3,ActAmount4:Double ;//税后所得
ActAmount11,ActAmount22,ActAmount33:Double;   //仲裁员上缴秘书处

Begin
//获得仲裁员人数
JudgeCounts:=0;
If (EJudgeB.Text='') AND (EJudgeC.Text='') Then
JudgeCounts:=1;
If (EJudgeB.Text<>'') AND (EJudgeC.Text<>'') Then
JudgeCounts:=3;

//获得计算类型
If BillHead.FieldByName('计算类型').AsString='按高限计算' Then
CalType:=1
        Else if BillHead.FieldByName('计算类型').AsString='按中限计算' Then
        CalType:=2
                Else If BillHead.FieldByName('计算类型').AsString='按低限计算' Then
                CalType:=3
                        Else CalType:=0;
If CalType=0 Then
Begin
Application.MessageBox('仲裁员报酬计算方式不明确,请检查!','提示',MB_ICONInformation);
Exit;
End;

If JudgeCounts=0 Then
Begin
Application.MessageBox('仲裁员登记有问题,请检查!','提示',MB_ICONInformation);
Exit;
End;
Amount:=BillHead.FieldByName('仲裁受理费').Value+BillHead.FieldByName('反请求受理费').Value;
//得到分配比例
GetRate.Active:=False;
GetRate.Parameters.ParamByName('@PeopleCount').Value:=JudgeCounts;
GetRate.Prepared;
GetRate.Open;
Rate1:=GetRate.FieldByName('首席仲裁员比例').Value;
Rate2:=GetRate.FieldByName('第二仲裁员比例').Value;
Rate3:=GetRate.FieldByName('秘书处比例').Value;
//得到计税比例
GetTaxRate.Active:=False;
GetTaxRate.Parameters.ParamByName('@PeopleCount').Value:=JudgeCounts;
GetTaxRate.Prepared;
GetTaxRate.Open;
TaxRate1:=GetTaxRate.FieldByName('首席仲裁员比例').Value;
TaxRate2:=GetTaxRate.FieldByName('第一仲裁员比例').Value;
TaxRate3:=GetTaxRate.FieldByName('第二仲裁员比例').Value;
//得到支付比例
GetPayRate.Active:=False;
GetPayRate.Parameters.ParamByName('@PeopleCount').Value:=JudgeCounts;
GetPayRate.Prepared;
GetPayRate.Open;
PayRate1:=GetPayRate.FieldByName('仲裁员支付比例').Value;
PayRate2:=GetPayRate.FieldByName('秘书处支付比例').Value;

Try
GetBrandList.Active:=False;
GetBrandList.Active:=True;
While Not GetBrandList.Eof Do
Begin
If (Amount<=GetBrandList.FieldByName('截至金额').Value)And(Amount>GetBrandList.FieldByName('起始金额').Value) Then
Begin
//得到挡数
case CalType of
  1: Begin

⌨️ 快捷键说明

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