📄 numbersale.~pas
字号:
Label170: TLabel;
Label171: TLabel;
Label172: TLabel;
Label173: TLabel;
Label174: TLabel;
Label175: TLabel;
Label176: TLabel;
Label177: TLabel;
Label178: TLabel;
Label179: TLabel;
Label180: TLabel;
ClientButtonAll: TRadioButton;
ClientButton1: TRadioButton;
ClientButton2: TRadioButton;
ClientButton3: TRadioButton;
ClientButton4: TRadioButton;
ClientButton5: TRadioButton;
ClientButton6: TRadioButton;
ClientButton7: TRadioButton;
ClientButton8: TRadioButton;
ClientButton9: TRadioButton;
ClientButton10: TRadioButton;
ClientButton11: TRadioButton;
ClientButton12: TRadioButton;
ClientButton13: TRadioButton;
ClientButton14: TRadioButton;
ClientButton15: TRadioButton;
ClientButton16: TRadioButton;
ClientButton17: TRadioButton;
ClientButton18: TRadioButton;
ClientButton19: TRadioButton;
ClientButton20: TRadioButton;
NumberTotal_sp: TADOStoredProc;
Label3: TLabel;
Label181: TLabel;
Label182: TLabel;
Label183: TLabel;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure TreeView1Change(Sender: TObject; Node: TTreeNode);
procedure RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Edit2KeyPress(Sender: TObject; var Key: Char);
procedure FormShow(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ClientButton1Click(Sender: TObject);
procedure ClientButton2Click(Sender: TObject);
procedure ClientButton3Click(Sender: TObject);
procedure ClientButton4Click(Sender: TObject);
procedure ClientButton5Click(Sender: TObject);
procedure ClientButton6Click(Sender: TObject);
procedure ClientButton7Click(Sender: TObject);
procedure ClientButton8Click(Sender: TObject);
procedure ClientButton9Click(Sender: TObject);
procedure ClientButton10Click(Sender: TObject);
procedure ClientButton11Click(Sender: TObject);
procedure ClientButton12Click(Sender: TObject);
procedure ClientButton13Click(Sender: TObject);
procedure ClientButton14Click(Sender: TObject);
procedure ClientButton15Click(Sender: TObject);
procedure ClientButton16Click(Sender: TObject);
procedure ClientButton17Click(Sender: TObject);
procedure ClientButton18Click(Sender: TObject);
procedure ClientButton19Click(Sender: TObject);
procedure ClientButton20Click(Sender: TObject);
procedure ClientButtonAllClick(Sender: TObject);
private
{ Private declarations }
ClientBz:boolean;
TreeUtil: TTreeUtils;
MainType,TranTypeId,ClientId:integer;
SaleType,Trantype,TypeMain :integer;
TypeName:string;
//系统热键
procedure HotKeyDown(var Msg: Tmessage); message WM_HOTKEY;
procedure TMNumBer_InfList(Sender:Tobject);
procedure TSaveDate(Sender:Tobject);
public
{ Public declarations }
end;
var
NumberSale_Form: TNumberSale_Form;
HotKeyId: Integer;
HotKeyId_1: Integer;
implementation
uses NumberManger,TreeFillThrd;
{$R *.dfm}
procedure TNumberSale_Form.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
TreeUtil.Free;
action:=cafree;
end;
procedure TNumberSale_Form.BitBtn2Click(Sender: TObject);
begin
TreeUtil.Free;
close;
end;
procedure TNumberSale_Form.FormCreate(Sender: TObject);
var
LabelNO:integer;
begin
ClientBz:=false;
TreeUtil := TTreeUtils.Create(TreeView1,NumberMangerMain.NumberManger_Adocon, 'T_Base');
TreeUtil.FillTree;
//注册热键
HotKeyId := GlobalAddAtom('MyHotKey') - $C000;
RegisterHotKey(Handle, HotKeyId,MOD_ALT , VK_F8);
HotKeyId_1 := GlobalAddAtom('MyHotKey') - $C000-1;
RegisterHotKey(Handle, HotKeyId_1, MOD_ALT, VK_F9);
Label115.Caption:=''; Label115.visible:=false;
Label116.Caption:=''; Label116.visible:=false;
Label117.Caption:=''; Label117.visible:=false;
Label118.Caption:=''; Label118.visible:=false;
Label119.Caption:=''; Label119.visible:=false;
Label120.Caption:=''; Label120.visible:=false;
Label121.Caption:=''; Label121.visible:=false;
Label122.Caption:=''; Label122.visible:=false;
Label123.Caption:=''; Label123.visible:=false;
Label124.Caption:=''; Label124.visible:=false;
Label125.Caption:=''; Label125.visible:=false;
Label126.Caption:=''; Label126.visible:=false;
Label127.Caption:=''; Label127.visible:=false;
Label128.Caption:=''; Label128.visible:=false;
Label129.Caption:=''; Label129.visible:=false;
Label130.Caption:=''; Label130.visible:=false;
Label131.Caption:=''; Label131.visible:=false;
Label132.Caption:=''; Label132.visible:=false;
Label133.Caption:=''; Label133.visible:=false;
Label134.Caption:=''; Label134.visible:=false;
Label135.Caption:=''; Label135.visible:=false;
Label136.Caption:=''; Label136.visible:=false;
Label137.Caption:=''; Label137.visible:=false;
Label138.Caption:=''; Label138.visible:=false;
Label139.Caption:=''; Label139.visible:=false;
Label140.Caption:=''; Label140.visible:=false;
Label141.Caption:=''; Label141.visible:=false;
Label142.Caption:=''; Label142.visible:=false;
Label143.Caption:=''; Label143.visible:=false;
Label144.Caption:=''; Label144.visible:=false;
Label145.Caption:=''; Label145.visible:=false;
Label146.Caption:=''; Label146.visible:=false;
Label147.Caption:=''; Label147.visible:=false;
Label148.Caption:=''; Label148.visible:=false;
Label149.Caption:=''; Label149.visible:=false;
Label150.Caption:=''; Label150.visible:=false;
Label151.Caption:=''; Label151.visible:=false;
Label152.Caption:=''; Label152.visible:=false;
Label153.Caption:=''; Label153.visible:=false;
Label154.Caption:=''; Label154.visible:=false;
Label155.Caption:=''; Label155.visible:=false;
Label156.Caption:=''; Label156.visible:=false;
Label157.Caption:=''; Label157.visible:=false;
Label158.Caption:=''; Label158.visible:=false;
Label159.Caption:=''; Label159.visible:=false;
Label160.Caption:=''; Label160.visible:=false;
Label161.Caption:=''; Label161.visible:=false;
Label162.Caption:=''; Label162.visible:=false;
Label163.Caption:=''; Label163.visible:=false;
Label164.Caption:=''; Label164.visible:=false;
Label165.Caption:=''; Label165.visible:=false;
Label166.Caption:=''; Label166.visible:=false;
Label167.Caption:=''; Label167.visible:=false;
Label168.Caption:=''; Label168.visible:=false;
Label169.Caption:=''; Label169.visible:=false;
Label170.Caption:=''; Label170.visible:=false;
Label171.Caption:=''; Label171.visible:=false;
Label172.Caption:=''; Label172.visible:=false;
Label173.Caption:=''; Label173.visible:=false;
Label174.Caption:=''; Label174.visible:=false;
Label175.Caption:=''; Label175.visible:=false;
Label176.Caption:=''; Label176.visible:=false;
Label177.Caption:=''; Label177.visible:=false;
Label178.Caption:=''; Label178.visible:=false;
Label179.Caption:=''; Label179.visible:=false;
Label180.Caption:=''; Label180.visible:=false;
Label182.Caption:=''; Label182.visible:=false;
Label183.Caption:=''; Label183.visible:=false;
end;
procedure TNumberSale_Form.TreeView1Change(Sender: TObject;
Node: TTreeNode);
var Nod: TNodeData;
begin
TypeName:= TreeUtil.getSelNodeCaption;
StatusBar1.Panels[1].Text:=TypeName;
if radiobutton1.Checked then
StatusBar1.Panels[3].Text:='新增'
else
StatusBar1.Panels[3].Text:='翻工';
aminallist.Close;
aminallist.SQL.Clear;
aminallist.SQL.Add('select FTranType from T_Base where FId='''+inttostr(TreeUtil.getSelNodeIndex)+'''');
aminallist.Open;
if aminallist.Fields[0].value>=0 then
begin
Trantype:=aminallist.Fields[0].value;
edit1.Clear; edit2.Clear;
end;
Nod := TreeUtil.getTreeNodeData(TreeView1.Selected.Parent);
if Nod.Caption='特码销售' then TypeMain:=-1 else TypeMain:=-2;
if (Trantype>=0) or ((Trantype<=17) or (Trantype>=38)) then
begin
edit1.Clear;edit1.Enabled:=false ; edit2.SetFocus;
end
else
begin
edit1.Clear; edit1.Enabled:=true ;Edit1.SetFocus;
end;
end;
procedure TNumberSale_Form.RadioButton1Click(Sender: TObject);
begin
StatusBar1.Panels[3].Text:='新增';
MainType:=1; edit1.SetFocus;
end;
procedure TNumberSale_Form.RadioButton2Click(Sender: TObject);
begin
StatusBar1.Panels[3].Text:='翻工';
MainType:=2;edit2.SetFocus;
end;
procedure TNumberSale_Form.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then edit2.SetFocus;
if not (key in ['0'..'9',Chr(8),'+']) then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -