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

📄 yjz.pas

📁 集成酒店桑拿食管管理的完整程序
💻 PAS
字号:
unit yjz;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Grids, DBGrids, ExtCtrls, StdCtrls, Mask, Buttons, Db, DBTables, Spin;

type
  Tjzform = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    MaskEdit1: TMaskEdit;
    Bevel1: TBevel;
    Label3: TLabel;
    rm: TMaskEdit;
    Label4: TLabel;
    xm: TMaskEdit;
    sm: TMaskEdit;
    Label6: TLabel;
    hm: TMaskEdit;
    Bevel2: TBevel;
    Label7: TLabel;
    czy: TMaskEdit;
    BitBtn1: TBitBtn;
    BitBtn3: TBitBtn;
    Label8: TLabel;
    ym: TMaskEdit;
    Label9: TLabel;
    yjm: TMaskEdit;
    Label10: TLabel;
    jym: TMaskEdit;
    xfhdno: TEdit;
    zk: TSpinEdit;
    Label11: TLabel;
    caljz: TStoredProc;
    Q1: TQuery;
    rcsm: TMaskEdit;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    scsm: TMaskEdit;
    zzdd: TCheckBox;
    procedure BitBtn3Click(Sender: TObject);
    procedure xfhdnoExit(Sender: TObject);
    procedure FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure FormCreate(Sender: TObject);
    procedure zkChange(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  jzform: Tjzform;

implementation
uses dataproc;
{$R *.DFM}
var
   acc:string;

procedure formini;
begin
with jzform do
   begin
   xfhdno.Text :='';
   maskedit1.Text :=datetimetostr(now);
   rm.text:='';
   rcsm.text:='';
   sm.Text :='';
   scsm.text:='';
   xm.text:='';
   hm.text:='';
   ym.text:='';
   yjm.text:='';
   jym.Text :='';
   zk.Value :=100;
   end
end;


procedure jjzz;
begin
 with jzform do
   begin
     caljz.ParamByName('@ihand').asstring:=trim(xfhdno.text);
     caljz.ParamByName('@itime').asdatetime:=strtodatetime(maskedit1.text);
     caljz.parambyname('@iiszd').asboolean:=zzdd.checked;
     caljz.prepare;
     caljz.ExecProc;
     rm.text:=floattostr(caljz.ParamByName('@oroommoney').asfloat);
     rcsm.text:=caljz.Parambyname('@ocsmoney').asstring;
     sm.text:=caljz.ParamByName('@osanmoney').asstring;
     scsm.text:=caljz.ParamByName('@osancsmoney').asstring;
     xm.text:=caljz.ParamByName('@ocusmoney').asstring;
     yjm.text:=caljz.ParamByName('@odeposit').asstring;
     hm.text:=floattostr(strtofloat(rm.text)+strtofloat(rcsm.text)+strtofloat(sm.text)+strtofloat(scsm.text));
     ym.text:=floattostr(strtofloat(hm.text)*zk.value/100);
     jym.text:=floattostr(strtofloat(yjm.text)-strtofloat(ym.text));
     caljz.unprepare;
 end;
end;


procedure Tjzform.BitBtn3Click(Sender: TObject);
begin
  jzform.close;
end;

procedure Tjzform.xfhdnoExit(Sender: TObject);
var
  ss:array[0..1] of string;
begin
  getvalue(ss,'select handno from nowin where handno="'+trim(xfhdno.text)+'"');
  if  ss[0]='' then
    begin
      showmessage('手号未登记!');
      xfhdno.setfocus;
    end
end;


procedure Tjzform.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if key=13 then
     selectnext(activecontrol,true,true);
end;

procedure Tjzform.FormCreate(Sender: TObject);
begin
    shortdateformat:='yyyy-mm-dd';
    czy.Text :=curper.code+' '+curper.name;
    formini;
end;

procedure Tjzform.zkChange(Sender: TObject);
begin
    ym.Text :=floattostr((strtofloat(hm.text)*(zk.value)/100));
    jym.text:=floattostr(strtofloat(yjm.text)-strtofloat(ym.text));
end;

procedure Tjzform.BitBtn1Click(Sender: TObject);
begin
  jjzz;
end;

end.

⌨️ 快捷键说明

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