547 lines
14 KiB
ObjectPascal
547 lines
14 KiB
ObjectPascal
|
|
unit U_JGSXCKInPut;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|||
|
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
|||
|
|
cxDataStorage, cxEdit, DB, cxDBData, cxCalendar, cxDropDownEdit,
|
|||
|
|
ComCtrls, ToolWin, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
|||
|
|
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid,
|
|||
|
|
cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, cxButtonEdit,
|
|||
|
|
cxTextEdit, ExtCtrls, StdCtrls, BtnEdit;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
TfrmJGSXCKInPut = class(TForm)
|
|||
|
|
cxGrid2: TcxGrid;
|
|||
|
|
Tv1: TcxGridDBTableView;
|
|||
|
|
v1CRTime: TcxGridDBColumn;
|
|||
|
|
v2Qty: TcxGridDBColumn;
|
|||
|
|
cxGrid2Level1: TcxGridLevel;
|
|||
|
|
ToolBar1: TToolBar;
|
|||
|
|
TBSave: TToolButton;
|
|||
|
|
TBClose: TToolButton;
|
|||
|
|
v1CRType: TcxGridDBColumn;
|
|||
|
|
DataSource3: TDataSource;
|
|||
|
|
CDS_Sub: TClientDataSet;
|
|||
|
|
ADOQueryCmd: TADOQuery;
|
|||
|
|
ADOQueryMain: TADOQuery;
|
|||
|
|
ADOQueryTemp: TADOQuery;
|
|||
|
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
|||
|
|
v1Note: TcxGridDBColumn;
|
|||
|
|
v1FactoryName: TcxGridDBColumn;
|
|||
|
|
v1QtyUnit: TcxGridDBColumn;
|
|||
|
|
v1YLName: TcxGridDBColumn;
|
|||
|
|
v1TuoBie: TcxGridDBColumn;
|
|||
|
|
v1DunWei: TcxGridDBColumn;
|
|||
|
|
Panel1: TPanel;
|
|||
|
|
Label17: TLabel;
|
|||
|
|
Label8: TLabel;
|
|||
|
|
Label23: TLabel;
|
|||
|
|
Label1: TLabel;
|
|||
|
|
FactoryName: TBtnEditA;
|
|||
|
|
CRType: TBtnEditA;
|
|||
|
|
CRTime: TDateTimePicker;
|
|||
|
|
YLName: TBtnEditA;
|
|||
|
|
Qty: TEdit;
|
|||
|
|
Label2: TLabel;
|
|||
|
|
Label3: TLabel;
|
|||
|
|
QtyUnit: TBtnEditA;
|
|||
|
|
Label4: TLabel;
|
|||
|
|
DunWei: TEdit;
|
|||
|
|
Label5: TLabel;
|
|||
|
|
Label6: TLabel;
|
|||
|
|
Note: TEdit;
|
|||
|
|
CheckBox1: TCheckBox;
|
|||
|
|
Label7: TLabel;
|
|||
|
|
CheDui: TBtnEditA;
|
|||
|
|
v1Chedui: TcxGridDBColumn;
|
|||
|
|
Label9: TLabel;
|
|||
|
|
YLQName: TBtnEditA;
|
|||
|
|
Tuobie: TBtnEditA;
|
|||
|
|
Label10: TLabel;
|
|||
|
|
filltime: TDateTimePicker;
|
|||
|
|
YFPrice: TEdit;
|
|||
|
|
Label11: TLabel;
|
|||
|
|
Label12: TLabel;
|
|||
|
|
DHDate: TDateTimePicker;
|
|||
|
|
Label13: TLabel;
|
|||
|
|
CheQty: TEdit;
|
|||
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|||
|
|
procedure TBCloseClick(Sender: TObject);
|
|||
|
|
procedure FormShow(Sender: TObject);
|
|||
|
|
procedure TBSaveClick(Sender: TObject);
|
|||
|
|
procedure v1Column3PropertiesButtonClick(Sender: TObject;
|
|||
|
|
AButtonIndex: Integer);
|
|||
|
|
procedure v1Column14PropertiesButtonClick(Sender: TObject;
|
|||
|
|
AButtonIndex: Integer);
|
|||
|
|
procedure v1Column5PropertiesButtonClick(Sender: TObject;
|
|||
|
|
AButtonIndex: Integer);
|
|||
|
|
procedure v1Column16PropertiesButtonClick(Sender: TObject;
|
|||
|
|
AButtonIndex: Integer);
|
|||
|
|
procedure v1Column13PropertiesButtonClick(Sender: TObject;
|
|||
|
|
AButtonIndex: Integer);
|
|||
|
|
procedure v2Column6PropertiesEditValueChanged(Sender: TObject);
|
|||
|
|
procedure v1PricePropertiesEditValueChanged(Sender: TObject);
|
|||
|
|
procedure CRTypeBtnClick(Sender: TObject);
|
|||
|
|
procedure YLNameBtnClick(Sender: TObject);
|
|||
|
|
procedure QtyUnitBtnClick(Sender: TObject);
|
|||
|
|
procedure CheDuiBtnClick(Sender: TObject);
|
|||
|
|
procedure FactoryNameBtnClick(Sender: TObject);
|
|||
|
|
procedure YLQNameBtnClick(Sender: TObject);
|
|||
|
|
procedure TuobieBtnClick(Sender: TObject);
|
|||
|
|
private
|
|||
|
|
{ Private declarations }
|
|||
|
|
function SaveCKData():Boolean;
|
|||
|
|
public
|
|||
|
|
{ Public declarations }
|
|||
|
|
FBCId,canshu3:String;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
var
|
|||
|
|
frmJGSXCKInPut: TfrmJGSXCKInPut;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
uses
|
|||
|
|
U_DataLink,U_RTFun,U_ClothContractListHZCX,U_ZDYHelp, U_ZdyAttachGYS,U_ProductOrderListSel;
|
|||
|
|
|
|||
|
|
{$R *.dfm}
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.FormClose(Sender: TObject;
|
|||
|
|
var Action: TCloseAction);
|
|||
|
|
begin
|
|||
|
|
Action:=caFree;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
function TfrmJGSXCKInPut.SaveCKData():Boolean;
|
|||
|
|
var
|
|||
|
|
FCRID,Maxno,FFSPID:string;
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
if Trim(FBCId)='' then
|
|||
|
|
begin
|
|||
|
|
if GetLSNo(ADOQueryCmd,Maxno,'YL','CK_SXPB_CR',3,1)=False then
|
|||
|
|
begin
|
|||
|
|
Result:=False;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('ȡԭ<C8A1><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!','<27><>ʾ',0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
end else
|
|||
|
|
begin
|
|||
|
|
Maxno:=Trim(FBCId);
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select * from CK_SXPB_CR where SPID='''+Trim(Maxno)+'''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
if isempty then
|
|||
|
|
begin
|
|||
|
|
Append;
|
|||
|
|
FieldByName('Filler').Value:=Trim(DName);
|
|||
|
|
end else
|
|||
|
|
begin
|
|||
|
|
Edit;
|
|||
|
|
end;
|
|||
|
|
FieldByName('SPID').Value:=Trim(Maxno);
|
|||
|
|
FieldByName('CKName').Value:='ԭ<><D4AD>';
|
|||
|
|
SSetsaveSqlNew(ADOQueryCmd,'CK_SXPB_CR',Panel1,0);
|
|||
|
|
FieldByName('CRFlag').Value:='<27><><EFBFBD><EFBFBD>';
|
|||
|
|
if (Trim(CRType.Text)='<27>̲<EFBFBD><CCB2><EFBFBD><EFBFBD><EFBFBD>') or (Trim(CRType.Text)='<27>ɹ<EFBFBD><C9B9>˻<EFBFBD>') then
|
|||
|
|
FieldByName('CRQtyFlag').Value:=-1
|
|||
|
|
else
|
|||
|
|
FieldByName('CRQtyFlag').Value:=1;
|
|||
|
|
Post;
|
|||
|
|
end;
|
|||
|
|
with CDS_Sub do
|
|||
|
|
begin
|
|||
|
|
Append;
|
|||
|
|
FieldByName('CRTime').Value:=CRTime.DateTime;
|
|||
|
|
FieldByName('CRType').Value:=Trim(CRType.Text);
|
|||
|
|
FieldByName('FactoryName').Value:=Trim(FactoryName.Text);
|
|||
|
|
FieldByName('YLName').Value:=Trim(YLName.Text);
|
|||
|
|
FieldByName('Qty').Value:=Trim(Qty.Text);
|
|||
|
|
FieldByName('QtyUnit').Value:=Trim(QtyUnit.Text);
|
|||
|
|
FieldByName('Tuobie').Value:=Trim(Tuobie.Text);
|
|||
|
|
FieldByName('dunwei').Value:=Trim(dunwei.Text);
|
|||
|
|
FieldByName('Note').Value:=Trim(Note.Text);
|
|||
|
|
FieldByName('Chedui').Value:=Trim(Chedui.Text);
|
|||
|
|
post;
|
|||
|
|
end;
|
|||
|
|
FactoryName.Text:='';
|
|||
|
|
YLName.Text:='';
|
|||
|
|
Note.Text:='';
|
|||
|
|
Chedui.Text:='';
|
|||
|
|
FBCId:='';
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
Result:=True;
|
|||
|
|
except;
|
|||
|
|
Result:=False;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>쳣!','<27><>ʾ',0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.TBCloseClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
WriteCxGrid('ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>FM',Tv1,'ԭ<>ϲֿ<CFB2>');
|
|||
|
|
Close;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.FormShow(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
fsj:String;
|
|||
|
|
begin
|
|||
|
|
ReadCxGrid('ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>FM',Tv1,'ԭ<>ϲֿ<CFB2>');
|
|||
|
|
CRTime.Date:=SGetServerDate10(ADOQueryTemp);
|
|||
|
|
DHDate.Date:=CRTime.Date;
|
|||
|
|
filltime.Date:=CRTime.Date;
|
|||
|
|
with ADOQueryTemp do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add(' select A.* ');
|
|||
|
|
sql.Add(' from CK_SXPB_CR A');
|
|||
|
|
sql.Add(' where SPID='''+Trim(FBCId)+'''');
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCreateCDS20(ADOQueryTemp,CDS_Sub);
|
|||
|
|
if ADOQueryTemp.IsEmpty=false then
|
|||
|
|
SCSHDataNew(ADOQueryTemp,Panel1,0);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.TBSaveClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
Panel1.SetFocus;
|
|||
|
|
if CRType.Text='' then
|
|||
|
|
begin
|
|||
|
|
application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD>Ϊ<EFBFBD><CEAA>','<27><>ʾ');
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
if FactoryName.Text='' then
|
|||
|
|
begin
|
|||
|
|
application.MessageBox('<27><>Ӧ<EFBFBD>̲<EFBFBD><CCB2><EFBFBD>Ϊ<EFBFBD><CEAA>','<27><>ʾ');
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
if YLName.Text='' then
|
|||
|
|
begin
|
|||
|
|
application.MessageBox('ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>','<27><>ʾ');
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
if QtyUnit.Text='' then
|
|||
|
|
begin
|
|||
|
|
application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>','<27><>ʾ');
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
if Tuobie.Text='' then
|
|||
|
|
begin
|
|||
|
|
application.MessageBox('<27>ű<EFBFBD><C5B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>','<27><>ʾ');
|
|||
|
|
exit;
|
|||
|
|
end;
|
|||
|
|
if SaveCKData() then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>!','<27><>ʾ',0);
|
|||
|
|
//ModalResult:=1;
|
|||
|
|
//Exit;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.v1Column3PropertiesButtonClick(Sender: TObject;
|
|||
|
|
AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
|||
|
|
with frmZDYHelp do
|
|||
|
|
begin
|
|||
|
|
flag:='QtyUnit';
|
|||
|
|
flagname:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ';
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
with Self.CDS_Sub do
|
|||
|
|
begin
|
|||
|
|
Edit;
|
|||
|
|
FieldByName('QtyUnit').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmZDYHelp.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.v1Column14PropertiesButtonClick(Sender: TObject;
|
|||
|
|
AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmZdyAttachGYS:=TfrmZdyAttachGYS.Create(Application);
|
|||
|
|
with frmZdyAttachGYS do
|
|||
|
|
begin
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
with Self.CDS_Sub do
|
|||
|
|
begin
|
|||
|
|
edit;
|
|||
|
|
FieldByName('FactoryNo').Value:=Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyCode').AsString) ;
|
|||
|
|
FieldByName('FactoryName').Value:=Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyName').AsString);
|
|||
|
|
//Post;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmZdyAttachGYS.Free;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.v1Column5PropertiesButtonClick(Sender: TObject;
|
|||
|
|
AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
|||
|
|
with frmZDYHelp do
|
|||
|
|
begin
|
|||
|
|
flag:='PLName';
|
|||
|
|
flagname:='ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
with Self.CDS_Sub do
|
|||
|
|
begin
|
|||
|
|
Edit;
|
|||
|
|
FieldByName('YLName').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmZDYHelp.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.v1Column16PropertiesButtonClick(Sender: TObject;
|
|||
|
|
AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmZdyAttachGYS:=TfrmZdyAttachGYS.Create(Application);
|
|||
|
|
with frmZdyAttachGYS do
|
|||
|
|
begin
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
with Self.CDS_Sub do
|
|||
|
|
begin
|
|||
|
|
edit;
|
|||
|
|
FieldByName('FromFactoryNo').Value:=Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyCode').AsString) ;
|
|||
|
|
FieldByName('FromFactoryName').Value:=Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyName').AsString);
|
|||
|
|
//Post;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmZdyAttachGYS.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.v1Column13PropertiesButtonClick(Sender: TObject;
|
|||
|
|
AButtonIndex: Integer);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmProductOrderListSel:=TfrmProductOrderListSel.Create(Application);
|
|||
|
|
with frmProductOrderListSel do
|
|||
|
|
begin
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
with Self.CDS_Sub do
|
|||
|
|
begin
|
|||
|
|
Edit;
|
|||
|
|
FieldByName('ORDMainIdRK').Value:=Trim(frmProductOrderListSel.Order_Main.fieldbyname('MainId').AsString);
|
|||
|
|
FieldByName('ORDSubIdRK').Value:=Trim(frmProductOrderListSel.Order_Main.fieldbyname('SubId').AsString);
|
|||
|
|
FieldByName('OrderNo').Value:=Trim(frmProductOrderListSel.Order_Main.fieldbyname('OrderNo').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmProductOrderListSel.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.v2Column6PropertiesEditValueChanged(
|
|||
|
|
Sender: TObject);
|
|||
|
|
var
|
|||
|
|
mavlue:string;
|
|||
|
|
begin
|
|||
|
|
mavlue:=TcxTextEdit(Sender).EditingText;
|
|||
|
|
if mavlue='' then
|
|||
|
|
begin
|
|||
|
|
mavlue:='0';
|
|||
|
|
end;
|
|||
|
|
with CDS_Sub do
|
|||
|
|
begin
|
|||
|
|
edit;
|
|||
|
|
fieldbyname('Qty').Value:=trim(Mavlue);
|
|||
|
|
end;
|
|||
|
|
with CDS_Sub do
|
|||
|
|
begin
|
|||
|
|
edit;
|
|||
|
|
fieldbyname('Money').Value:=fieldbyname('Qty').AsFloat*fieldbyname('Price').AsFloat;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.v1PricePropertiesEditValueChanged(
|
|||
|
|
Sender: TObject);
|
|||
|
|
var
|
|||
|
|
mavlue:string;
|
|||
|
|
begin
|
|||
|
|
mavlue:=TcxTextEdit(Sender).EditingText;
|
|||
|
|
if mavlue='' then
|
|||
|
|
begin
|
|||
|
|
mavlue:='0';
|
|||
|
|
end;
|
|||
|
|
with CDS_Sub do
|
|||
|
|
begin
|
|||
|
|
edit;
|
|||
|
|
fieldbyname('Price').Value:=trim(Mavlue);
|
|||
|
|
end;
|
|||
|
|
with CDS_Sub do
|
|||
|
|
begin
|
|||
|
|
edit;
|
|||
|
|
fieldbyname('Money').Value:=fieldbyname('Qty').AsFloat*fieldbyname('Price').AsFloat;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.CRTypeBtnClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
|||
|
|
with frmZDYHelp do
|
|||
|
|
begin
|
|||
|
|
flag:='CRType';
|
|||
|
|
flagname:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
CRType.Text:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmZDYHelp.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.YLNameBtnClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
|||
|
|
with frmZDYHelp do
|
|||
|
|
begin
|
|||
|
|
flag:='YLName';
|
|||
|
|
flagname:='ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
|
forderno:=true;
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
YLName.Text:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmZDYHelp.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.QtyUnitBtnClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
|||
|
|
with frmZDYHelp do
|
|||
|
|
begin
|
|||
|
|
flag:='QtyUnit';
|
|||
|
|
flagname:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ';
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
QtyUnit.Text:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally;
|
|||
|
|
frmZDYHelp.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.CheDuiBtnClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
frmZdyAttachGYS:=TfrmZdyAttachGYS.Create(Self);
|
|||
|
|
with frmZdyAttachGYS do
|
|||
|
|
begin
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
CheDui.Text:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
|||
|
|
end;
|
|||
|
|
free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.FactoryNameBtnClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
frmZdyAttachGYS:=TfrmZdyAttachGYS.Create(Self);
|
|||
|
|
with frmZdyAttachGYS do
|
|||
|
|
begin
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
FactoryName.Text:=Trim(CDS_HZ.fieldbyname('ZDYName').AsString);
|
|||
|
|
{if Trim(CDS_HZ.fieldbyname('ZdyName').AsString)='<27><><EFBFBD><EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
YFPrice.Text:='11';
|
|||
|
|
end;}
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add('select Top 1 YFPrice from CK_SXPB_CR where isnull(CKName,'''')=''ԭ<><D4AD>''');
|
|||
|
|
SQL.Add(' and CRFlag=''<27><><EFBFBD><EFBFBD>'' and FactoryName='''+trim(FactoryName.Text)+''' order by CRTime desc,filltime desc');
|
|||
|
|
open;
|
|||
|
|
end;
|
|||
|
|
YFPrice.Text:=Trim(FloatToStr(ADOQueryCmd.fieldbyname('YFPrice').asfloat));
|
|||
|
|
end;
|
|||
|
|
free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.YLQNameBtnClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
|||
|
|
with frmZDYHelp do
|
|||
|
|
begin
|
|||
|
|
flag:='YLQName';
|
|||
|
|
flagname:='ԭ<><D4AD>ȫ<EFBFBD><C8AB>';
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
YLQName.Text:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally;
|
|||
|
|
frmZDYHelp.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmJGSXCKInPut.TuobieBtnClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
|||
|
|
with frmZDYHelp do
|
|||
|
|
begin
|
|||
|
|
flag:='Tuobie';
|
|||
|
|
flagname:='<27>ű<EFBFBD>';
|
|||
|
|
if ShowModal=1 then
|
|||
|
|
begin
|
|||
|
|
Tuobie.Text:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally;
|
|||
|
|
frmZDYHelp.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end.
|