📄 ar_enter_saleinvoice4_c.pas
字号:
unit Ar_Enter_SaleInvoice4_C;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Condition, Db, AdODB, StdCtrls, Mask, ExtEdit, linkedit;
Type
TFrm_Ar_Enter_SaleInvoice4_C = Class(TFrm_Base_Condition)
Edt_ShipNoStArt: TEdit;
Edt_ShipNoend: TEdit;
Label1: TLabel;
Label2: TLabel;
Label5: TLabel;
Lab_CoustomerName: TLabel;
Extedt_CustomerCode: TLinkEdit;
procedure FormShow(Sender: TObject);
procedure btn_okClick(Sender: TObject);
procedure btn_CancelClick(Sender: TObject);
procedure ExtEdt_CustomerCodeKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure ExtEdt_CustomerCodeExit(Sender: TObject);
procedure Extedt_CustomerCodeButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Frm_Ar_Enter_SaleInvoice4_C: TFrm_Ar_Enter_SaleInvoice4_C;
implementation
uses Ar_Enter_SaleInvoice4_C1,Sys_Global;
{$R *.DFM}
procedure TFrm_Ar_Enter_SaleInvoice4_C.FormShow(Sender: TObject);
begin
inherited;
ExtEdt_CustomerCode.SetFocus;
Edt_ShipNoend.Text :='ZZZZZZ';
end;
procedure TFrm_Ar_Enter_SaleInvoice4_C.btn_okClick(Sender: TObject);
begin
inherited;
Frm_Ar_Enter_SaleInvoice4_C1.CustomerCode:=ExtEdt_CustomerCode.text;
Frm_Ar_Enter_SaleInvoice4_C1.CustomerName:=Lab_CoustomerName.Caption;
Frm_Ar_Enter_SaleInvoice4_C1.ShipNoStArt:=Edt_ShipNoStArt.Text;
Frm_Ar_Enter_SaleInvoice4_C1.ShipNoend:=Edt_ShipNoend.Text;
self.ModalResult:=mrOk;
end;
procedure TFrm_Ar_Enter_SaleInvoice4_C.btn_CancelClick(Sender: TObject);
begin
inherited;
Frm_Ar_Enter_SaleInvoice4_C1.Close;
end;
procedure TFrm_Ar_Enter_SaleInvoice4_C.ExtEdt_CustomerCodeKeyDown(
Sender: TObject; var Key: Word; Shift: TShiftState);
begin
inherited;
if(Key=120)then
CommonHint(Sender,AdoQry_Tmp,'customerName','客户名称','customerCode','客户代码','customer','IsNull(customertaxno,'''')<>'+quotedstr(''));
end;
procedure TFrm_Ar_Enter_SaleInvoice4_C.ExtEdt_CustomerCodeExit(
Sender: TObject);
begin
inherited;
if activecontrol.Name='btn_Cancel' then
exit;
Executesql(AdoQry_tmp,'select * from customer '
+' where customerCode='+quotedstr(Trim(Extedt_CustomerCode.text)),0);
// +' and IsNull(customertaxno,'''')<>'+quotedstr(''),0);
if AdoQry_tmp.RecordCount=0 then
begin
DispInfo('客户代码输入错误!',1);
Extedt_CustomerCode.SetFocus;
abort;
end;
Executesql(AdoQry_tmp,'select * from customer '
+' where customerCode='+quotedstr(Trim(Extedt_CustomerCode.text))
+' and IsNull(customertaxno,'''')<>'+quotedstr(''),0);
if AdoQry_tmp.RecordCount=0 then
begin
DispInfo('该客户没有税号!',1);
Extedt_CustomerCode.SetFocus;
abort;
end;
lab_CoustomerName.Caption:=AdoQry_tmp.fieldbyname('customerName').asstring;
end;
procedure TFrm_Ar_Enter_SaleInvoice4_C.Extedt_CustomerCodeButtonClick(
Sender: TObject);
begin
inherited;
CommonHint(Sender,AdoQry_Tmp,'customerName','客户名称','customerCode','客户代码','customer','IsNull(customertaxno,'''')<>'+quotedstr(''));
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -